Mercurial > pidgin.yaz
annotate configure.ac @ 2178:a22f18ae43c1
[gaim-migrate @ 2188]
protocols don't link against gtk
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Mon, 27 Aug 2001 21:56:29 +0000 |
parents | f47ff201c53c |
children | 64d8ef561763 |
rev | line source |
---|---|
2129 | 1 dnl Process this file with autoconf to produce a configure script. |
2 AC_INIT(src/aim.c) | |
3 AM_CONFIG_HEADER(config.h) | |
4 AM_INIT_AUTOMAKE([gaim], [0.11.0]) | |
5 | |
6 AC_PATH_PROG(sedpath, sed) | |
7 | |
8 dnl Checks for programs. | |
9 AC_PROG_CC | |
10 AC_DISABLE_STATIC | |
11 AM_PROG_LIBTOOL | |
12 LIBTOOL="$LIBTOOL --silent" | |
13 AC_PROG_INSTALL | |
14 | |
15 | |
16 ALL_LINGUAS="de es fr ko ru zh_CN" | |
17 AM_GNU_GETTEXT | |
18 | |
19 AC_CYGWIN | |
20 | |
21 | |
22 dnl Checks for header files. | |
23 AC_HEADER_STDC | |
24 AC_HEADER_SYS_WAIT | |
25 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h locale.h signal.h) | |
26 | |
27 dnl Checks for typedefs, structures, and compiler characteristics. | |
28 AC_C_CONST | |
29 AC_STRUCT_TM | |
30 | |
31 dnl Checks for library functions. | |
32 AC_TYPE_SIGNAL | |
33 AC_FUNC_STRFTIME | |
34 AC_CHECK_FUNCS(socket strdup strstr atexit getaddrinfo) | |
2162
a464da684307
[gaim-migrate @ 2172]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2129
diff
changeset
|
35 AC_TRY_COMPILE([#include <sys/types.h> |
2163
f47ff201c53c
[gaim-migrate @ 2173]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2162
diff
changeset
|
36 #include <sys/socket.h>], [socklen_t slen;],,[AC_DEFINE(NEED_SOCKLEN_T)]) |
2129 | 37 |
38 dnl Checks for getopt in standard library | |
39 AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] ) | |
40 AC_SUBST(LIBOBJS) | |
41 | |
42 dnl This is a bad, bad hack. I am a bad, bad man. | |
43 CFLAGS="$CFLAGS -I/usr/local/include -I/opt/include -I\$(top_srcdir)" | |
44 | |
45 AC_ARG_ENABLE(distrib,,,enable_distrib=no) | |
46 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes") | |
47 AC_ARG_ENABLE(multi, [ --disable-multi disable multiple connections],,enable_multi=yes) | |
48 AC_ARG_ENABLE(prpls, [ --disable-prpls don't build dynamic protocol plugins],,enable_prpls=yes) | |
49 AC_ARG_WITH(static-prpls, [ --with-static-prpls link in certain protocols statically],[STATIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`],STATIC_PRPLS="oscar toc") | |
50 if test "x$STATIC_PRPLS" = "xall" ; then | |
51 STATIC_PRPLS="icq irc jabber msn napster oscar toc yahoo zephyr" | |
52 fi | |
53 AC_SUBST(STATIC_PRPLS) | |
54 STATIC_LINK_LIBS= | |
55 extern_init= | |
56 load_proto= | |
57 for i in $STATIC_PRPLS ; do | |
58 STATIC_LINK_LIBS="$STATIC_LINK_LIBS protocols/$i/lib$i.a" | |
59 extern_init="$extern_init extern void ${i}_init(struct prpl *);" | |
60 load_proto="$load_proto load_protocol(${i}_init, sizeof(struct prpl));" | |
61 case $i in | |
62 icq) AM_CONDITIONAL(STATIC_ICQ, true) ;; | |
63 irc) AM_CONDITIONAL(STATIC_IRC, true) ;; | |
64 jabber) AM_CONDITIONAL(STATIC_JABBER, true) ;; | |
65 msn) AM_CONDITIONAL(STATIC_MSN, true) ;; | |
66 napster) AM_CONDITIONAL(STATIC_NAPSTER, true) ;; | |
67 oscar) AM_CONDITIONAL(STATIC_OSCAR, true) ;; | |
68 toc) AM_CONDITIONAL(STATIC_TOC, true) ;; | |
69 yahoo) AM_CONDITIONAL(STATIC_YAHOO, true) ;; | |
70 zephyr) AM_CONDITIONAL(STATIC_ZEPHYR, true) ;; | |
71 *) echo "Invalid static protocol $i!!" ; exit ;; | |
72 esac | |
73 done | |
74 AC_SUBST(STATIC_LINK_LIBS) | |
75 AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init void static_proto_init() { $load_proto }) | |
76 | |
77 AC_ARG_ENABLE(gnome, [ --disable-gnome compile without Gnome bits],,enable_gnome=yes) | |
78 AC_ARG_ENABLE(pixbuf, [ --disable-pixbuf compile without GdkPixbuf (needed for Buddy Icons)],,enable_pixbuf=yes) | |
79 AC_ARG_ENABLE(panel, [ --enable-panel compile as a GNOME applet],,enable_panel=$enable_distrib) | |
80 | |
81 AM_CONDITIONAL(GNOMEAPPLET, test "x$enable_panel" = "xyes") | |
82 AC_ARG_ENABLE(esd, [ --disable-esd Turn off ESD (default=auto)],,enable_esd=yes) | |
83 AC_ARG_ENABLE(nas, [ --enable-nas Enable NAS (Network Audio System) support],,enable_nas=no) | |
84 | |
85 AC_ARG_ENABLE(plugins, [ --disable-plugins compile without plugin support],,enable_plugins=yes) | |
86 AC_ARG_ENABLE(perl, [ --disable-perl compile without perl scripting],,enable_perl=yes) | |
87 | |
88 AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging support],,enable_debug=no) | |
89 AC_ARG_ENABLE(screensaver, [ --disable-screensaver compile without X screensaver extension],,enable_xss=yes) | |
90 AC_ARG_WITH(krb4, [ --with-krb4=PREFIX Compile Zephyr plugin with Kerberos 4 support],kerberos="$withval",kerberos="no") | |
91 | |
92 if test "$enable_debug" = yes ; then | |
93 CFLAGS="$CFLAGS -Wall -g" | |
94 AC_DEFINE(DEBUG) | |
95 fi | |
96 | |
97 if test "x$enable_gnome" = "xyes" ; then | |
98 if test "x$enable_panel" = "xyes" ; then | |
99 GNOME_INIT(applets) | |
100 GNOME_X_CHECKS | |
101 CFLAGS="$CFLAGS $GNOME_INCLUDEDIR" | |
102 AC_DEFINE(USE_APPLET) | |
103 AC_DEFINE(USE_GNOME) | |
2178
a22f18ae43c1
[gaim-migrate @ 2188]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2163
diff
changeset
|
104 UI_LIBS="$GTK_LIBS $GNOME_LIBDIR $GNOME_APPLETS_LIBS $GNOMEUI_LIBS" |
2129 | 105 AC_PATH_PROG(gaimpath, gaim_applet) |
106 else | |
107 AC_PATH_PROG(gnomepath, gnome-config) | |
108 AC_MSG_CHECKING(for Gnome compile flags) | |
109 GNOME_CFLAGS=`$gnomepath gnomeui --cflags 2>/dev/null` | |
110 if test "x$GNOME_CFLAGS" = "x" ; then | |
111 enable_gnome=no | |
112 AC_MSG_RESULT([Gnome not found, building without it.]) | |
113 else | |
114 GNOME_VER=`$gnomepath --version |$sedpath 's/gnome-libs //' 2>/dev/null` | |
115 GNOME_MAJOR=`echo $GNOME_VER |$sedpath 's/\([[0-9]*]*\).\([[0-9]*]*\).\([[0-9]*]*\)/\1/' 2>/dev/null` | |
116 if test "x$GNOME_MAJOR" = "x0" ; then | |
117 enable_gnome = no | |
118 AC_MSG_RESULT([old Gnome found, building without it.]) | |
119 else | |
120 AC_MSG_RESULT(ok) | |
121 CFLAGS="$CFLAGS $GNOME_CFLAGS" | |
2178
a22f18ae43c1
[gaim-migrate @ 2188]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2163
diff
changeset
|
122 UI_LIBS="`$gnomepath gnomeui --libs 2>/dev/null`" |
2129 | 123 AC_DEFINE(USE_GNOME) |
124 GNOME_CONFIG="$gnomepath" | |
125 AC_SUBST(GNOME_CONFIG) | |
126 AC_PATH_PROG(gaimpath, gaim) | |
127 fi | |
128 fi | |
129 fi | |
130 fi | |
131 | |
132 if test "x$enable_gnome" != "xyes" ; then | |
133 AM_PATH_GLIB(1.2.0,,AC_MSG_ERROR([ | |
134 *** GLib is required to build Gaim; please make sure you have the GLib | |
135 *** development headers installed. The latest version of GLib is | |
136 *** always available at http://www.gtk.org/.])) | |
137 AM_PATH_GTK(1.2.0,,AC_MSG_ERROR([ | |
138 *** GTK+ is required to build Gaim; please make sure you have the GTK+ | |
139 *** development headers installed. The latest version of GTK+ is | |
140 *** always available at http://www.gtk.org/.]),gthread) | |
2178
a22f18ae43c1
[gaim-migrate @ 2188]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2163
diff
changeset
|
141 UI_LIBS="$GTK_LIBS" |
2129 | 142 AC_PATH_PROG(gaimpath, gaim) |
143 fi | |
144 CFLAGS="$CFLAGS $GTK_CFLAGS" | |
145 | |
146 use_pixbuf=no | |
147 if test "x$enable_pixbuf" = "xyes" ; then | |
148 AC_PATH_PROG(pixbufcfg, gdk-pixbuf-config) | |
149 if test "x$pixbufcfg" != "x" ; then | |
150 GDK_PIXBUF_CFLAGS=`$pixbufcfg --cflags` | |
151 GDK_PIXBUF_LIBS=`$pixbufcfg --libs` | |
152 GDK_PIXBUF_CONFIG="$pixbufcfg" | |
153 AC_SUBST(GDK_PIXBUF_CONFIG) | |
154 AC_SUBST(GDK_PIXBUF_CFLAGS) | |
155 AC_SUBST(GDK_PIXBUF_LIBS) | |
156 CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS" | |
2178
a22f18ae43c1
[gaim-migrate @ 2188]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2163
diff
changeset
|
157 UI_LIBS="$GDK_PIXBUF_LIBS" |
2129 | 158 dnl We should be doing checks to see that the header files and functions exist. eh. |
159 AC_DEFINE(USE_PIXBUF) | |
160 use_pixbuf=yes | |
161 fi | |
162 fi | |
2178
a22f18ae43c1
[gaim-migrate @ 2188]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2163
diff
changeset
|
163 AC_SUBST(UI_LIBS) |
2129 | 164 |
165 dnl Check for XScreenSaver | |
166 if test "x$enable_xss" = "xyes" ; then | |
167 XSS_LIBS="no" | |
168 XSS_HEADERS="no" | |
169 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS=""],[],[-lX11 -lXext -lm]) | |
170 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="-lXss"],[],[-lX11 -lXext -lm]) | |
171 if test \! "$XSS_LIBS" = "no"; then | |
172 AC_TRY_COMPILE([ | |
173 #include <X11/extensions/scrnsaver.h> | |
174 ],[],[enable_xss=no],[ | |
175 AC_DEFINE(USE_SCREENSAVER) | |
176 ]) | |
177 else | |
178 XSS_LIBS="" | |
179 enable_xss=no | |
180 fi | |
181 else | |
182 XSS_LIBS="" | |
183 enable_xss=no | |
184 fi | |
185 AC_SUBST(XSS_LIBS) | |
186 | |
187 | |
188 | |
189 dnl This was taken straight from X-Chat. | |
190 dnl X-Chat is the greatest application ever, not only | |
191 dnl because it's a rocking IRC client but also because | |
192 dnl it's very easy to learn from. | |
193 if test "$enable_perl" = yes ; then | |
194 AC_PATH_PROG(perlpath, perl) | |
195 AC_MSG_CHECKING(for Perl compile flags) | |
196 PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null` | |
197 if test "_$PERL_CFLAGS" = _ ; then | |
198 AC_MSG_RESULT([not found, building without perl.]) | |
199 enable_perl = no | |
200 else | |
201 PERL_LIBS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null |$sedpath 's/-lgdbm //'` | |
202 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-ldb //'` | |
203 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lndbm //'` | |
204 if test "$system" = "Linux"; then | |
205 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lnsl //'` | |
206 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lposix //'` | |
207 fi | |
208 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lc //'` | |
209 AC_MSG_RESULT(ok) | |
210 AC_SUBST(PERL_CFLAGS) | |
211 AC_SUBST(PERL_LIBS) | |
212 AC_DEFINE(USE_PERL) | |
213 AC_CHECK_FUNCS(Perl_eval_pv) | |
214 fi | |
215 fi | |
216 | |
217 if test "$enable_nas" = yes ; then | |
218 AC_DEFINE(NAS_SOUND) | |
2178
a22f18ae43c1
[gaim-migrate @ 2188]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2163
diff
changeset
|
219 SOUND_LIBS="-laudio -lXt" |
2129 | 220 fi |
221 if test "$enable_esd" = yes ; then | |
222 AM_PATH_GESD | |
223 if test "$no_esd" != yes ; then | |
224 CFLAGS="$CFLAGS $ESD_CFLAGS" | |
225 AC_DEFINE(ESD_SOUND) | |
2178
a22f18ae43c1
[gaim-migrate @ 2188]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2163
diff
changeset
|
226 SOUND_LIBS="$SOUND_LIBS $ESD_LIBS" |
2129 | 227 else |
228 enable_esd=no | |
229 fi | |
230 fi | |
2178
a22f18ae43c1
[gaim-migrate @ 2188]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2163
diff
changeset
|
231 AC_SUBST(SOUND_LIBS) |
2129 | 232 |
233 if test "$ac_cv_cygwin" = yes ; then | |
234 LDADD="$LDADD -static" | |
235 CFLAGS="$CFLAGS -Wall -g" | |
236 AC_DEFINE(DEBUG) | |
237 fi | |
238 | |
239 AC_SUBST(CFLAGS) | |
240 AC_SUBST(LDADD) | |
241 AC_SUBST(LIBS) | |
242 | |
243 if test "x$enable_multi" != "xyes" ; then | |
244 AC_DEFINE(NO_MULTI) | |
245 enable_multi=no | |
246 fi | |
247 | |
248 if test "x$enable_plugins" = "xyes" ; then | |
249 AC_DEFINE(GAIM_PLUGINS) | |
250 AM_CONDITIONAL(PLUGINS, test "x$enable_plugins" = "xyes") | |
251 else | |
252 enable_plugins=no | |
253 enable_prpls=no | |
254 fi | |
255 | |
256 if test "x$enable_prpls" = "xyes" ; then | |
257 AM_CONDITIONAL(PRPLS, test "x$enable_plugins" = "xyes") | |
258 else | |
259 enable_prpls=no | |
260 fi | |
261 | |
262 dnl checks for icqlib | |
263 AC_CHECK_HEADERS(asm/byteorder.h byteswap.h endian.h machine/endian.h arpa/nameser_compat.h) | |
264 AC_CHECK_FUNCS(bswap_32 bswap_16) | |
265 AC_C_BIGENDIAN | |
266 | |
267 dnl checks for jabber | |
268 dnl AC_CHECK_SIZEOF(short) | |
269 AC_CHECK_FUNCS(snprintf connect) | |
270 AC_CHECK_LIB(nsl, gethostent) | |
271 | |
272 dnl checks for zephyr | |
273 AC_DEFINE(ZEPHYR_INT32, long) | |
274 AC_SUBST(KRB4_CFLAGS) | |
275 AC_SUBST(KRB4_LDFLAGS) | |
276 AC_SUBST(KRB4_LIBS) | |
277 if test "$kerberos" != "no" ; then | |
278 if test "$kerberos" != "yes" ; then | |
279 KRB4_CFLAGS="-I${kerberos}/include" | |
280 if test -d "$kerberos/include/kerberosIV" ; then | |
281 KRB4_CFLAGS="$KRB4_CFLAGS -I${kerberos}/include/kerberosIV" | |
282 fi | |
283 KRB4_LDFLAGS="-L${kerberos}/lib" | |
284 elif test -d /usr/local/include/kerberosIV ; then | |
285 KRB4_CFLAGS="-I/usr/local/include/kerberosIV" | |
286 elif test -d /usr/include/kerberosIV ; then | |
287 KRB4_CFLAGS="-I/usr/include/kerberosIV" | |
288 fi | |
289 AC_DEFINE(ZEPHYR_USES_KERBEROS) | |
290 | |
291 orig_LDFLAGS="$LDFLAGS" | |
292 LDFLAGS="$LDFLAGS $KRB4_LDFLAGS" | |
293 AC_CHECK_LIB(krb4, krb_rd_req, | |
294 [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"], | |
295 [AC_CHECK_LIB(krb, krb_rd_req, | |
296 [KRB4_LIBS="-lkrb -ldes"], | |
297 [AC_ERROR(Kerberos 4 libraries not found)], | |
298 -ldes)], | |
299 -ldes425 -lkrb5 -lk5crypto -lcom_err) | |
300 orig_LIBS="$LIBS" | |
301 LIBS="$LIBS $KRB4_LIBS" | |
302 AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm) | |
303 AC_CHECK_FUNCS(krb_get_err_text krb_log) | |
304 LIBS="$orig_LIBS" | |
305 LDFLAGS="$orig_LDFLAGS" | |
306 fi | |
307 AC_CHECK_FUNCS(gethostid lrand48) | |
308 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf) | |
309 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h) | |
310 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h) | |
311 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h) | |
312 AC_CHECK_HEADERS(termios.h) | |
313 | |
314 AC_OUTPUT([Makefile | |
315 doc/Makefile | |
316 intl/Makefile | |
317 m4/Makefile | |
318 pixmaps/Makefile | |
319 plugins/Makefile | |
320 po/Makefile.in | |
321 sounds/Makefile | |
322 src/Makefile | |
323 src/protocols/Makefile | |
324 src/protocols/icq/Makefile | |
325 src/protocols/irc/Makefile | |
326 src/protocols/jabber/Makefile | |
327 src/protocols/msn/Makefile | |
328 src/protocols/napster/Makefile | |
329 src/protocols/oscar/Makefile | |
330 src/protocols/toc/Makefile | |
331 src/protocols/yahoo/Makefile | |
332 src/protocols/zephyr/Makefile | |
333 gaim.spec | |
334 ]) | |
335 | |
336 echo | |
337 echo $PACKAGE $VERSION | |
338 | |
339 echo | |
340 echo Allow Multiple Connections.. : $enable_multi | |
341 echo Build Protocol Plugins...... : $enable_prpls | |
342 echo Protocols to link statically : $STATIC_PRPLS | |
343 echo | |
344 echo Build with GNOME bits....... : $enable_gnome | |
345 echo Use GdkPixbuf for Icons..... : $use_pixbuf | |
346 echo Build as GNOME applet....... : $enable_panel | |
347 echo | |
348 echo Build with Plugin support... : $enable_plugins | |
349 echo Build with Perl support..... : $enable_perl | |
350 echo | |
351 echo Use XScreenSaver Extension.. : $enable_xss | |
352 echo | |
353 echo Build with ESD.............. : $enable_esd | |
354 echo Build with NAS.............. : $enable_nas | |
355 echo | |
356 echo Print debugging messages.... : $enable_debug | |
357 echo | |
358 echo Gaim will be installed in $prefix/bin. | |
359 if test "x$gaimpath" != "x" ; then | |
360 echo Warning: You have an old copy of gaim at $gaimpath. | |
361 fi | |
362 echo | |
363 echo configure complete, now type \'make\' | |
364 echo |