source: trunk/third/gedit/configure.in @ 18815

Revision 18815, 6.2 KB checked in by ghudson, 21 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18814, which included commits to RCS files with non-trunk default branches.
Line 
1dnl Process this file with autoconf to produce a configure script.
2
3AC_PREREQ(2.52)
4
5AC_INIT(gedit, 2.2.0.1, http://bugzilla.gnome.org/enter_bug.cgi?product=gedit)
6AC_CONFIG_SRCDIR(src/gedit2.c)
7AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
8
9AM_MAINTAINER_MODE
10AM_CONFIG_HEADER(config.h)
11AM_DISABLE_STATIC
12
13AC_PATH_PROG(GCONFTOOL, gconftool-2)
14AC_PROG_INTLTOOL([0.22])
15
16AM_PROG_LIBTOOL
17
18AC_ISC_POSIX
19AC_PROG_CC
20AC_PROG_INSTALL
21AC_PROG_MAKE_SET
22
23
24dnl ================================================================
25dnl Gettext stuff.
26dnl ================================================================
27GETTEXT_PACKAGE=gedit-2.0
28AC_SUBST(GETTEXT_PACKAGE)
29AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
30ALL_LINGUAS="am ar be bg az ca cs da de el es et eu fi fr ga gl he hi hu it ja ko lt lv mk mn ms nl nn no pl pt pt_BR ro ru sv sk sl ta th tr uk vi wa zh_CN zh_TW"
31AM_GLIB_GNU_GETTEXT
32
33dnl ******************
34dnl pspell checks
35dnl ******************
36
37AC_MSG_CHECKING([for pspell])
38if pspell-config version > /dev/null 2>&1; then
39        pspell_ver=`pspell-config version`
40        pspell_num=`echo ${pspell_ver} | awk 'BEGIN {FS="."}{printf $1*10000 + $2*100 + $3;}'`
41        if test ${pspell_num} -lt 1200; then
42                AC_MSG_RESULT([pspell version .12 or later required, you have ${pspell_ver} installed])
43        else
44                AC_MSG_RESULT([found ($pspell_ver)])
45                AC_CHECK_HEADER(pspell/pspell.h,
46                        PSPELL_LIBS="-lpspell"
47                        SPELL_PLUGIN_DIR="spell"
48                        AC_SUBST(SPELL_PLUGIN_DIR))
49        fi
50else
51        AC_MSG_RESULT([not found])
52fi
53
54AC_CHECK_LIB(aspell,main,
55             AC_CHECK_LIB(pspell_aspell,main,
56             PSPELL_LIBS="$PSPELL_LIBS -lpspell_aspell -laspell"
57             AC_DEFINE(HAVE_ASPELL_MODULE,,[Use aspell]),,-laspell $PSPELL_LIBS),,)
58AC_CHECK_LIB(pspell_ispell,main,
59             PSPELL_LIBS="$PSPELL_LIBS -lpspell_ispell"
60             AC_DEFINE(HAVE_ISPELL_MODULE,,[Use ispell]),,$PSPELL_LIBS)
61
62AC_SUBST(PSPELL_LIBS)
63AC_SUBST(CFLAGS)
64AC_SUBST(CPPFLAGS)
65AC_SUBST(LDFLAGS)
66
67dnl
68dnl Start of pkg-config checks
69dnl
70PKG_CHECK_MODULES(GEDIT, libgnomeui-2.0 >= 2.2.0 libglade-2.0 >= 2.0.0
71                         libgnomeprintui-2.2 >= 2.2.0
72                         eel-2.0 >= 2.2.0)
73GEDIT_LIBS="${GEDIT_LIBS}"
74AC_SUBST(GEDIT_LIBS)
75AC_SUBST(GEDIT_CFLAGS)
76
77dnl
78dnl GConf related settings
79dnl
80
81GCONF_CONFIG_SOURCE=
82
83AC_ARG_ENABLE(gconf-source, [  --enable-gconf-source=sourceaddress Where to install schema files.], GCONF_CONFIG_SOURCE=$enable_gconf_source,)
84
85if test "x$GCONF_CONFIG_SOURCE" = "x"; then
86        GCONF_CONFIG_SOURCE="xml::\${sysconfdir}/gconf/gconf.xml.defaults"
87fi
88
89AC_SUBST(GCONF_CONFIG_SOURCE)
90
91AC_MSG_CHECKING("GConf configuration source")
92AC_MSG_RESULT(${GCONF_CONFIG_SOURCE})
93
94dnl
95dnl Check popt
96dnl
97
98AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is required to build
99gedit. You can download the latest version from ftp://people.redhat.com/sopwith/popt/]))
100
101
102dnl ================================================================
103dnl GEDIT_DATA_DIR - Sets the location of the data directory, where we install
104dnl source files added to projects (such as all the Gnome m4 macros).
105dnl This will substitute GEDIT_DATA_DIR in config.h.
106dnl ================================================================
107if test "x${datadir}" = 'x${prefix}/share'; then
108  if test "x${prefix}" = "xNONE"; then
109    AC_DEFINE_UNQUOTED(GEDIT_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", [Directory of data files])
110  else
111    AC_DEFINE_UNQUOTED(GEDIT_DATA_DIR, "${prefix}/share/${PACKAGE}", [Directory of data files])
112  fi
113else
114  AC_DEFINE_UNQUOTED(GEDIT_DATA_DIR, "${datadir}/${PACKAGE}", [Directory of data files])
115fi
116
117dnl ================================================================
118dnl PIXMAPS
119dnl ================================================================
120if test "x${prefix}" = "xNONE"; then
121  AC_DEFINE_UNQUOTED(PIXMAPS_DIR, "${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps", [Directory of pixmaps])
122  pixmapsdir="${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
123else
124  AC_DEFINE_UNQUOTED(PIXMAPS_DIR, "${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps", [Directory of pixmaps])
125  pixmapsdir="${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps"
126fi
127
128AC_SUBST(pixmapsdir)
129
130AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
131
132dnl ==========================================================================
133
134dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
135
136AC_ARG_ENABLE(more-warnings,
137[  --enable-more-warnings  Maximum compiler warnings],
138set_more_warnings="$enableval",[
139if test -f $srcdir/CVSVERSION; then
140        is_cvs_version=true
141        set_more_warnings=yes
142else
143        set_more_warnings=no
144fi
145])
146AC_MSG_CHECKING(for more warnings, including -Werror)
147if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
148        AC_MSG_RESULT(yes)
149        CFLAGS="\
150        -Wall \
151        -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
152        -Wnested-externs -Wpointer-arith \
153        -Wcast-align -Wsign-compare \
154        -Werror \
155        $CFLAGS"
156
157        for option in -Wsign-promo -Wno-sign-compare; do
158                SAVE_CFLAGS="$CFLAGS"
159                CFLAGS="$option $CFLAGS"
160                AC_MSG_CHECKING([whether gcc understands $option])
161                AC_TRY_COMPILE([], [],
162                        has_option=yes,
163                        has_option=no,)
164                if test $has_option = no; then
165                        CFLAGS="$SAVE_CFLAGS"
166                fi
167                AC_MSG_RESULT($has_option)
168                unset has_option
169                unset SAVE_CFLAGS
170        done
171        unset option
172else
173        AC_MSG_RESULT(no)
174fi
175
176dnl ==========================================================================
177
178dnl stuff for the CORBA interface
179
180ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
181AC_SUBST(ORBIT_IDL)
182
183LIBBONOBO_IDL="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
184AC_SUBST(LIBBONOBO_IDL)
185
186BONOBO_ACTIVATION_IDL="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
187AC_SUBST(BONOBO_ACTIVATION_IDL)
188
189PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
190AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
191
192AC_OUTPUT([
193Makefile
194data/Makefile
195po/Makefile.in
196src/Makefile
197src/dialogs/Makefile
198src/recent-files/Makefile
199pixmaps/Makefile
200plugins/Makefile
201plugins/ASCII/Makefile
202plugins/spell/Makefile
203plugins/diff/Makefile
204plugins/docinfo/Makefile
205plugins/sample/Makefile
206plugins/cvschangelog/Makefile
207plugins/indent/Makefile
208plugins/taglist/Makefile
209plugins/time/Makefile
210plugins/shell_output/Makefile
211plugins/sort/Makefile
212help/Makefile
213help/C/Makefile
214help/ro/Makefile
215])
216
217
218echo "
219
220Configuration:
221
222        Source code location:   ${srcdir}
223        Compiler:               ${CC}
224
225"
226
227# cat $srcdir/message-of-doom
Note: See TracBrowser for help on using the repository browser.