1 | dnl Process this file with autoconf to produce a configure script. |
---|
2 | |
---|
3 | AC_PREREQ(2.52) |
---|
4 | |
---|
5 | AC_INIT(gedit, 2.2.0.1, http://bugzilla.gnome.org/enter_bug.cgi?product=gedit) |
---|
6 | AC_CONFIG_SRCDIR(src/gedit2.c) |
---|
7 | AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) |
---|
8 | |
---|
9 | AM_MAINTAINER_MODE |
---|
10 | AM_CONFIG_HEADER(config.h) |
---|
11 | AM_DISABLE_STATIC |
---|
12 | |
---|
13 | AC_PATH_PROG(GCONFTOOL, gconftool-2) |
---|
14 | AC_PROG_INTLTOOL([0.22]) |
---|
15 | |
---|
16 | AM_PROG_LIBTOOL |
---|
17 | |
---|
18 | AC_ISC_POSIX |
---|
19 | AC_PROG_CC |
---|
20 | AC_PROG_INSTALL |
---|
21 | AC_PROG_MAKE_SET |
---|
22 | |
---|
23 | |
---|
24 | dnl ================================================================ |
---|
25 | dnl Gettext stuff. |
---|
26 | dnl ================================================================ |
---|
27 | GETTEXT_PACKAGE=gedit-2.0 |
---|
28 | AC_SUBST(GETTEXT_PACKAGE) |
---|
29 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package]) |
---|
30 | ALL_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" |
---|
31 | AM_GLIB_GNU_GETTEXT |
---|
32 | |
---|
33 | dnl ****************** |
---|
34 | dnl pspell checks |
---|
35 | dnl ****************** |
---|
36 | |
---|
37 | AC_MSG_CHECKING([for pspell]) |
---|
38 | if 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 |
---|
50 | else |
---|
51 | AC_MSG_RESULT([not found]) |
---|
52 | fi |
---|
53 | |
---|
54 | AC_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),,) |
---|
58 | AC_CHECK_LIB(pspell_ispell,main, |
---|
59 | PSPELL_LIBS="$PSPELL_LIBS -lpspell_ispell" |
---|
60 | AC_DEFINE(HAVE_ISPELL_MODULE,,[Use ispell]),,$PSPELL_LIBS) |
---|
61 | |
---|
62 | AC_SUBST(PSPELL_LIBS) |
---|
63 | AC_SUBST(CFLAGS) |
---|
64 | AC_SUBST(CPPFLAGS) |
---|
65 | AC_SUBST(LDFLAGS) |
---|
66 | |
---|
67 | dnl |
---|
68 | dnl Start of pkg-config checks |
---|
69 | dnl |
---|
70 | PKG_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) |
---|
73 | GEDIT_LIBS="${GEDIT_LIBS}" |
---|
74 | AC_SUBST(GEDIT_LIBS) |
---|
75 | AC_SUBST(GEDIT_CFLAGS) |
---|
76 | |
---|
77 | dnl |
---|
78 | dnl GConf related settings |
---|
79 | dnl |
---|
80 | |
---|
81 | GCONF_CONFIG_SOURCE= |
---|
82 | |
---|
83 | AC_ARG_ENABLE(gconf-source, [ --enable-gconf-source=sourceaddress Where to install schema files.], GCONF_CONFIG_SOURCE=$enable_gconf_source,) |
---|
84 | |
---|
85 | if test "x$GCONF_CONFIG_SOURCE" = "x"; then |
---|
86 | GCONF_CONFIG_SOURCE="xml::\${sysconfdir}/gconf/gconf.xml.defaults" |
---|
87 | fi |
---|
88 | |
---|
89 | AC_SUBST(GCONF_CONFIG_SOURCE) |
---|
90 | |
---|
91 | AC_MSG_CHECKING("GConf configuration source") |
---|
92 | AC_MSG_RESULT(${GCONF_CONFIG_SOURCE}) |
---|
93 | |
---|
94 | dnl |
---|
95 | dnl Check popt |
---|
96 | dnl |
---|
97 | |
---|
98 | AC_CHECK_LIB(popt, poptStrippedArgv,, AC_MSG_ERROR([popt 1.5 or newer is required to build |
---|
99 | gedit. You can download the latest version from ftp://people.redhat.com/sopwith/popt/])) |
---|
100 | |
---|
101 | |
---|
102 | dnl ================================================================ |
---|
103 | dnl GEDIT_DATA_DIR - Sets the location of the data directory, where we install |
---|
104 | dnl source files added to projects (such as all the Gnome m4 macros). |
---|
105 | dnl This will substitute GEDIT_DATA_DIR in config.h. |
---|
106 | dnl ================================================================ |
---|
107 | if 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 |
---|
113 | else |
---|
114 | AC_DEFINE_UNQUOTED(GEDIT_DATA_DIR, "${datadir}/${PACKAGE}", [Directory of data files]) |
---|
115 | fi |
---|
116 | |
---|
117 | dnl ================================================================ |
---|
118 | dnl PIXMAPS |
---|
119 | dnl ================================================================ |
---|
120 | if 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" |
---|
123 | else |
---|
124 | AC_DEFINE_UNQUOTED(PIXMAPS_DIR, "${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps", [Directory of pixmaps]) |
---|
125 | pixmapsdir="${prefix}/${DATADIRNAME}/${PACKAGE}/pixmaps" |
---|
126 | fi |
---|
127 | |
---|
128 | AC_SUBST(pixmapsdir) |
---|
129 | |
---|
130 | AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) |
---|
131 | |
---|
132 | dnl ========================================================================== |
---|
133 | |
---|
134 | dnl Turn on the additional warnings last, so -Werror doesn't affect other tests. |
---|
135 | |
---|
136 | AC_ARG_ENABLE(more-warnings, |
---|
137 | [ --enable-more-warnings Maximum compiler warnings], |
---|
138 | set_more_warnings="$enableval",[ |
---|
139 | if test -f $srcdir/CVSVERSION; then |
---|
140 | is_cvs_version=true |
---|
141 | set_more_warnings=yes |
---|
142 | else |
---|
143 | set_more_warnings=no |
---|
144 | fi |
---|
145 | ]) |
---|
146 | AC_MSG_CHECKING(for more warnings, including -Werror) |
---|
147 | if 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 |
---|
172 | else |
---|
173 | AC_MSG_RESULT(no) |
---|
174 | fi |
---|
175 | |
---|
176 | dnl ========================================================================== |
---|
177 | |
---|
178 | dnl stuff for the CORBA interface |
---|
179 | |
---|
180 | ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`" |
---|
181 | AC_SUBST(ORBIT_IDL) |
---|
182 | |
---|
183 | LIBBONOBO_IDL="`$PKG_CONFIG --variable=idldir libbonobo-2.0`" |
---|
184 | AC_SUBST(LIBBONOBO_IDL) |
---|
185 | |
---|
186 | BONOBO_ACTIVATION_IDL="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`" |
---|
187 | AC_SUBST(BONOBO_ACTIVATION_IDL) |
---|
188 | |
---|
189 | PLUGIN_LIBTOOL_FLAGS="-module -avoid-version" |
---|
190 | AC_SUBST(PLUGIN_LIBTOOL_FLAGS) |
---|
191 | |
---|
192 | AC_OUTPUT([ |
---|
193 | Makefile |
---|
194 | data/Makefile |
---|
195 | po/Makefile.in |
---|
196 | src/Makefile |
---|
197 | src/dialogs/Makefile |
---|
198 | src/recent-files/Makefile |
---|
199 | pixmaps/Makefile |
---|
200 | plugins/Makefile |
---|
201 | plugins/ASCII/Makefile |
---|
202 | plugins/spell/Makefile |
---|
203 | plugins/diff/Makefile |
---|
204 | plugins/docinfo/Makefile |
---|
205 | plugins/sample/Makefile |
---|
206 | plugins/cvschangelog/Makefile |
---|
207 | plugins/indent/Makefile |
---|
208 | plugins/taglist/Makefile |
---|
209 | plugins/time/Makefile |
---|
210 | plugins/shell_output/Makefile |
---|
211 | plugins/sort/Makefile |
---|
212 | help/Makefile |
---|
213 | help/C/Makefile |
---|
214 | help/ro/Makefile |
---|
215 | ]) |
---|
216 | |
---|
217 | |
---|
218 | echo " |
---|
219 | |
---|
220 | Configuration: |
---|
221 | |
---|
222 | Source code location: ${srcdir} |
---|
223 | Compiler: ${CC} |
---|
224 | |
---|
225 | " |
---|
226 | |
---|
227 | # cat $srcdir/message-of-doom |
---|