Mercurial > pidgin.yaz
annotate configure.in @ 3496:784ded279bfd
[gaim-migrate @ 3557]
Jason Willis submitted a patch to make unaliasing someone in the edit tab unalias
the person in the online tab also. bug fixes are always good things.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Thu, 12 Sep 2002 14:33:33 +0000 |
parents | cb090243aa78 |
children | e23909729192 |
rev | line source |
---|---|
3174 | 1 dnl Process this file with autoconf to produce a configure script. |
2 AC_INIT(src/aim.c) | |
3 AM_CONFIG_HEADER(config.h) | |
3351 | 4 AM_INIT_AUTOMAKE([gaim], [0.60cvs]) |
3174 | 5 |
6 | |
7 | |
8 AC_PATH_PROG(sedpath, sed) | |
9 | |
10 dnl Checks for programs. | |
11 AC_PROG_CC | |
12 AC_DISABLE_STATIC | |
13 AM_PROG_LIBTOOL | |
14 LIBTOOL="$LIBTOOL --silent" | |
15 AC_PROG_INSTALL | |
16 | |
17 | |
3462 | 18 ALL_LINGUAS="bg cs da de es fi fr hu it ja ko nl pl ro ru sk sv zh_CN zh_TW" |
3408
ba6d0856c8e4
[gaim-migrate @ 3427]
Christian Hammond <chipx86@chipx86.com>
parents:
3394
diff
changeset
|
19 AM_GNU_GETTEXT_VERSION(0.10.40) |
3174 | 20 AM_GNU_GETTEXT |
21 | |
22 AC_CYGWIN | |
23 | |
24 | |
25 dnl Checks for header files. | |
26 AC_HEADER_STDC | |
27 AC_HEADER_SYS_WAIT | |
28 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h locale.h signal.h) | |
29 | |
30 dnl Checks for typedefs, structures, and compiler characteristics. | |
31 AC_C_CONST | |
32 AC_STRUCT_TM | |
33 | |
34 dnl Checks for library functions. | |
35 AC_TYPE_SIGNAL | |
36 AC_FUNC_STRFTIME | |
37 AC_CHECK_FUNCS(socket strdup strstr atexit getaddrinfo) | |
38 | |
39 dnl Checks for getopt in standard library | |
40 AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] ) | |
41 AC_SUBST(LIBOBJS) | |
42 | |
43 dnl Check for inet_aton | |
44 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, , | |
45 [AC_ERROR(inet_aton not found)])]) | |
46 | |
47 dnl Check for socklen_t (in Unix98) | |
48 AC_MSG_CHECKING(for socklen_t) | |
49 AC_TRY_COMPILE([#include <sys/types.h> | |
50 #include <sys/socket.h> | |
51 socklen_t x; | |
52 ], [], [AC_MSG_RESULT(yes)], [ | |
3194 | 53 AC_TRY_COMPILE([#include <sys/types.h> |
3174 | 54 #include <sys/socket.h> |
55 int accept(int, struct sockaddr *, size_t *); | |
56 ], [], [ | |
57 AC_MSG_RESULT(size_t) | |
3194 | 58 AC_DEFINE(socklen_t, size_t)], [ |
3174 | 59 AC_MSG_RESULT(int) |
60 AC_DEFINE(socklen_t, int)])]) | |
61 | |
62 dnl This is a bad, bad hack. I am a bad, bad man. | |
63 CFLAGS="$CFLAGS -I/usr/local/include -I/opt/include -I\$(top_srcdir)" | |
64 | |
65 AC_ARG_ENABLE(distrib,,,enable_distrib=no) | |
66 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes") | |
67 AC_ARG_ENABLE(multi, [ --disable-multi disable multiple connections],,enable_multi=yes) | |
68 AC_ARG_ENABLE(prpls, [ --disable-prpls don't build dynamic protocol plugins],,enable_prpls=yes) | |
3383 | 69 AC_ARG_WITH(static-prpls, [ --with-static-prpls link in certain protocols statically],[STATIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`],STATIC_PRPLS="oscar") |
3174 | 70 if test "x$STATIC_PRPLS" = "xall" ; then |
3382 | 71 STATIC_PRPLS="gg irc jabber msn napster oscar toc yahoo zephyr" |
3174 | 72 fi |
73 AC_SUBST(STATIC_PRPLS) | |
74 STATIC_LINK_LIBS= | |
75 extern_init= | |
76 load_proto= | |
77 for i in $STATIC_PRPLS ; do | |
78 STATIC_LINK_LIBS="$STATIC_LINK_LIBS protocols/$i/lib$i.a" | |
79 extern_init="$extern_init extern void ${i}_init(struct prpl *);" | |
80 load_proto="$load_proto load_protocol(${i}_init, sizeof(struct prpl));" | |
81 case $i in | |
82 gg) static_gg=yes ;; | |
83 irc) static_irc=yes ;; | |
84 jabber) static_jabber=yes ;; | |
85 msn) static_msn=yes ;; | |
86 napster) static_napster=yes ;; | |
87 oscar) static_oscar=yes ;; | |
88 toc) static_toc=yes ;; | |
89 yahoo) static_yahoo=yes ;; | |
90 zephyr) static_zephyr=yes ;; | |
91 *) echo "Invalid static protocol $i!!" ; exit ;; | |
92 esac | |
93 done | |
94 AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes") | |
95 AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes") | |
96 AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes") | |
97 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes") | |
98 AM_CONDITIONAL(STATIC_NAPSTER, test "x$static_napster" = "xyes") | |
99 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes") | |
100 AM_CONDITIONAL(STATIC_TOC, test "x$static_toc" = "xyes") | |
101 AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes") | |
102 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes") | |
103 AC_SUBST(STATIC_LINK_LIBS) | |
104 AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init void static_proto_init() { $load_proto }) | |
105 | |
106 AC_ARG_ENABLE(esd, [ --disable-esd Turn off ESD (default=auto)],,enable_esd=yes) | |
107 AC_ARG_ENABLE(nas, [ --enable-nas Enable NAS (Network Audio System) support],,enable_nas=no) | |
108 AC_ARG_ENABLE(artsc, [ --disable-artsc Turn off ArtsC (default=auto)],,enable_artsc=yes) | |
109 | |
110 AC_ARG_ENABLE(plugins, [ --disable-plugins compile without plugin support],,enable_plugins=yes) | |
111 AC_ARG_ENABLE(perl, [ --disable-perl compile without perl scripting],,enable_perl=yes) | |
112 | |
113 AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging support],,enable_debug=no) | |
114 AC_ARG_ENABLE(screensaver, [ --disable-screensaver compile without X screensaver extension],,enable_xss=yes) | |
115 AC_ARG_WITH(krb4, [ --with-krb4=PREFIX Compile Zephyr plugin with Kerberos 4 support],kerberos="$withval",kerberos="no") | |
116 | |
117 if test "$enable_debug" = yes ; then | |
118 CFLAGS="$CFLAGS -Wall -g3" | |
119 AC_DEFINE(DEBUG) | |
120 fi | |
121 | |
122 | |
3454 | 123 AM_PATH_GLIB_2_0(1.3.0,,AC_MSG_ERROR([ |
124 *** GLib 2.0 is required to build Gaim; please make sure you have the GLib | |
125 *** development headers installed. The latest version of GLib is | |
126 *** always available at http://www.gtk.org/.])) | |
127 AM_PATH_GTK_2_0(1.3.0,,AC_MSG_ERROR([ | |
128 *** GTK+ 2.0 is required to build Gaim; please make sure you have the GTK+ | |
129 *** development headers installed. The latest version of GTK+ is | |
130 *** always available at http://www.gtk.org/.])) | |
131 | |
3425 | 132 AC_PATH_PROG(gaimpath, gaim) |
133 CFLAGS="$CFLAGS $GTK_CFLAGS -DGTK_ENABLE_BROKEN" | |
3174 | 134 |
135 dnl Check for XScreenSaver | |
136 if test "x$enable_xss" = "xyes" ; then | |
3285 | 137 AC_PATH_X |
3174 | 138 old_LIBS="$LIBS" |
3425 | 139 LIBS="$LIBS $GTK_LIBS -L$x_libraries" |
3174 | 140 XSS_LIBS="no" |
141 XSS_HEADERS="no" | |
3282 | 142 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="-L$x_libraries"],[],[-lX11 -lXext -lm]) |
3288 | 143 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="-L$x_libraries -lXss"],[],[-lX11 -lXext -lm]) |
3174 | 144 if test \! "$XSS_LIBS" = "no"; then |
145 AC_TRY_COMPILE([ | |
146 #include <X11/extensions/scrnsaver.h> | |
147 ],[],[enable_xss=no],[ | |
148 AC_DEFINE(USE_SCREENSAVER) | |
149 ]) | |
150 else | |
151 XSS_LIBS="" | |
152 enable_xss=no | |
153 fi | |
154 LIBS="$old_LIBS" | |
155 else | |
156 XSS_LIBS="" | |
157 enable_xss=no | |
158 fi | |
159 AC_SUBST(XSS_LIBS) | |
160 | |
3203 | 161 AC_DEFUN(GC_TM_GMTOFF, |
162 [AC_REQUIRE([AC_STRUCT_TM])dnl | |
163 AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, | |
164 [AC_TRY_COMPILE([#include <sys/types.h> | |
165 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;], | |
166 ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)]) | |
167 if test "$ac_cv_struct_tm_gmtoff" = yes; then | |
168 AC_DEFINE(HAVE_TM_GMTOFF) | |
169 fi | |
170 ]) | |
171 | |
172 GC_TM_GMTOFF | |
3174 | 173 |
174 | |
175 dnl This was taken straight from X-Chat. | |
176 dnl X-Chat is the greatest application ever, not only | |
177 dnl because it's a rocking IRC client but also because | |
178 dnl it's very easy to learn from. | |
179 if test "$enable_perl" = yes ; then | |
180 AC_PATH_PROG(perlpath, perl) | |
181 AC_MSG_CHECKING(for Perl compile flags) | |
182 PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null` | |
183 if test "_$PERL_CFLAGS" = _ ; then | |
184 AC_MSG_RESULT([not found, building without perl.]) | |
185 enable_perl = no | |
186 else | |
187 PERL_LIBS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null |$sedpath 's/-lgdbm //'` | |
188 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-ldb //'` | |
189 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lndbm //'` | |
190 if test "$system" = "Linux"; then | |
191 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lnsl //'` | |
192 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lposix //'` | |
193 fi | |
194 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lc //'` | |
195 AC_MSG_RESULT(ok) | |
196 AC_SUBST(PERL_CFLAGS) | |
197 AC_SUBST(PERL_LIBS) | |
198 AC_DEFINE(USE_PERL) | |
199 AC_CHECK_FUNCS(Perl_eval_pv) | |
200 fi | |
201 fi | |
202 | |
203 if test "$enable_nas" = yes ; then | |
204 AC_DEFINE(NAS_SOUND) | |
205 SOUND_LIBS="-laudio -lXt" | |
206 fi | |
207 if test "$enable_esd" = yes ; then | |
208 AM_PATH_GESD | |
209 if test "$no_esd" != yes ; then | |
210 old_CFLAGS="$CFLAGS" | |
211 CFLAGS="$CFLAGS $ESD_CFLAGS" | |
212 AC_TRY_COMPILE(,[#include <esd.h>], | |
213 [ | |
214 AC_DEFINE(ESD_SOUND) | |
215 SOUND_LIBS="$SOUND_LIBS $ESD_LIBS" | |
216 ],[ | |
217 enable_esd=no | |
218 CFLAGS="$old_CFLAGS" | |
219 ]) | |
220 else | |
221 enable_esd=no | |
222 fi | |
223 fi | |
224 if test "x$enable_artsc" = "xyes"; then | |
225 AM_PATH_ARTSC | |
226 if test "x$no_artsc" != "xyes" ; then | |
227 old_CFLAGS="$CFLAGS" | |
228 CFLAGS="$CFLAGS $ARTSC_CFLAGS" | |
229 AC_TRY_COMPILE(,[#include <artsc.h>], | |
230 [ | |
231 AC_DEFINE(ARTSC_SOUND) | |
232 SOUND_LIBS="$SOUND_LIBS $ARTSC_LIBS" | |
233 ],[ | |
234 enable_artsc=no | |
235 CFLAGS="$old_CFLAGS" | |
236 ]) | |
237 else | |
238 enable_artsc=no | |
239 fi | |
240 fi | |
241 AC_SUBST(SOUND_LIBS) | |
242 | |
243 if test "$ac_cv_cygwin" = yes ; then | |
244 LDADD="$LDADD -static" | |
245 CFLAGS="$CFLAGS -Wall -g" | |
246 AC_DEFINE(DEBUG) | |
247 fi | |
248 | |
249 AC_SUBST(CFLAGS) | |
250 AC_SUBST(LDADD) | |
251 AC_SUBST(LIBS) | |
252 | |
253 if test "x$enable_multi" != "xyes" ; then | |
254 AC_DEFINE(NO_MULTI) | |
255 enable_multi=no | |
256 fi | |
257 | |
258 if test "x$enable_plugins" = "xyes" ; then | |
259 AC_DEFINE(GAIM_PLUGINS) | |
260 AM_CONDITIONAL(PLUGINS, test "x$enable_plugins" = "xyes") | |
261 else | |
3411
5df423e0bca8
[gaim-migrate @ 3430]
Christian Hammond <chipx86@chipx86.com>
parents:
3408
diff
changeset
|
262 AM_CONDITIONAL(PLUGINS, false) |
3174 | 263 enable_plugins=no |
264 enable_prpls=no | |
265 fi | |
266 | |
267 if test "x$enable_prpls" = "xyes" ; then | |
268 AM_CONDITIONAL(PRPLS, test "x$enable_plugins" = "xyes") | |
269 else | |
3411
5df423e0bca8
[gaim-migrate @ 3430]
Christian Hammond <chipx86@chipx86.com>
parents:
3408
diff
changeset
|
270 AM_CONDITIONAL(PRPLS, false) |
3174 | 271 enable_prpls=no |
272 fi | |
273 | |
274 dnl checks for icqlib | |
275 AC_CHECK_HEADERS(asm/byteorder.h byteswap.h endian.h machine/endian.h arpa/nameser_compat.h) | |
276 AC_CHECK_FUNCS(bswap_32 bswap_16) | |
277 AC_C_BIGENDIAN | |
278 | |
279 dnl checks for jabber | |
280 dnl AC_CHECK_SIZEOF(short) | |
281 AC_CHECK_FUNCS(snprintf connect) | |
282 AC_CHECK_LIB(nsl, gethostent) | |
283 | |
284 dnl checks for zephyr | |
285 AC_DEFINE(ZEPHYR_INT32, long) | |
286 AC_SUBST(KRB4_CFLAGS) | |
287 AC_SUBST(KRB4_LDFLAGS) | |
288 AC_SUBST(KRB4_LIBS) | |
289 if test "$kerberos" != "no" ; then | |
290 if test "$kerberos" != "yes" ; then | |
291 KRB4_CFLAGS="-I${kerberos}/include" | |
292 if test -d "$kerberos/include/kerberosIV" ; then | |
293 KRB4_CFLAGS="$KRB4_CFLAGS -I${kerberos}/include/kerberosIV" | |
294 fi | |
295 KRB4_LDFLAGS="-L${kerberos}/lib" | |
296 elif test -d /usr/local/include/kerberosIV ; then | |
297 KRB4_CFLAGS="-I/usr/local/include/kerberosIV" | |
298 elif test -d /usr/include/kerberosIV ; then | |
299 KRB4_CFLAGS="-I/usr/include/kerberosIV" | |
300 fi | |
301 AC_DEFINE(ZEPHYR_USES_KERBEROS) | |
302 | |
303 orig_LDFLAGS="$LDFLAGS" | |
304 LDFLAGS="$LDFLAGS $KRB4_LDFLAGS" | |
305 AC_CHECK_LIB(krb4, krb_rd_req, | |
306 [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"], | |
307 [AC_CHECK_LIB(krb, krb_rd_req, | |
308 [KRB4_LIBS="-lkrb -ldes"], | |
309 [AC_ERROR(Kerberos 4 libraries not found)], | |
310 -ldes)], | |
311 -ldes425 -lkrb5 -lk5crypto -lcom_err) | |
312 orig_LIBS="$LIBS" | |
313 LIBS="$LIBS $KRB4_LIBS" | |
314 AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm) | |
315 AC_CHECK_FUNCS(krb_get_err_text krb_log) | |
316 LIBS="$orig_LIBS" | |
317 LDFLAGS="$orig_LDFLAGS" | |
318 fi | |
319 AC_CHECK_FUNCS(gethostid lrand48) | |
320 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf) | |
321 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h) | |
322 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h) | |
323 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h) | |
324 AC_CHECK_HEADERS(termios.h) | |
3194 | 325 AC_VAR_TIMEZONE_EXTERNALS |
3174 | 326 |
327 AC_OUTPUT([Makefile | |
328 doc/Makefile | |
329 intl/Makefile | |
330 m4/Makefile | |
331 pixmaps/Makefile | |
332 pixmaps/protocols/Makefile | |
333 pixmaps/protocols/msn/Makefile | |
334 pixmaps/protocols/yahoo/Makefile | |
3491 | 335 pixmaps/protocols/oscar/Makefile |
3174 | 336 plugins/Makefile |
3394
bc71eb7428ef
[gaim-migrate @ 3413]
Christian Hammond <chipx86@chipx86.com>
parents:
3391
diff
changeset
|
337 plugins/ticker/Makefile |
3174 | 338 po/Makefile.in |
339 sounds/Makefile | |
340 src/Makefile | |
341 src/protocols/Makefile | |
342 src/protocols/gg/Makefile | |
343 src/protocols/icq/Makefile | |
344 src/protocols/irc/Makefile | |
345 src/protocols/jabber/Makefile | |
346 src/protocols/msn/Makefile | |
347 src/protocols/napster/Makefile | |
348 src/protocols/oscar/Makefile | |
349 src/protocols/toc/Makefile | |
350 src/protocols/yahoo/Makefile | |
351 src/protocols/zephyr/Makefile | |
352 gaim.spec | |
353 ]) | |
354 | |
355 echo | |
356 echo $PACKAGE $VERSION | |
357 | |
358 echo | |
359 echo Allow Multiple Connections.... : $enable_multi | |
360 echo Build Protocol Plugins........ : $enable_prpls | |
361 echo Protocols to link statically.. : $STATIC_PRPLS | |
362 echo | |
3425 | 363 echo UI Library.................... : GTK 2.0 |
3174 | 364 echo |
365 echo Build with Plugin support..... : $enable_plugins | |
366 echo Build with Perl support....... : $enable_perl | |
367 echo | |
368 echo Use XScreenSaver Extension.... : $enable_xss | |
369 echo | |
370 echo Build with ESD................ : $enable_esd | |
371 echo Build with NAS................ : $enable_nas | |
372 echo Build with ArtsC.............. : $enable_artsc | |
373 echo | |
374 echo Print debugging messages...... : $enable_debug | |
375 echo | |
376 eval eval echo Gaim will be installed in $bindir. | |
377 if test "x$gaimpath" != "x" ; then | |
378 echo Warning: You have an old copy of gaim at $gaimpath. | |
379 fi | |
380 echo | |
381 echo configure complete, now type \'make\' | |
382 echo |