1 dnl Process this file with autoconf to produce a configure script.
4 # UPDATING VERSION NUMBERS FOR RELEASES
6 # purple_micro_version += 1
8 # If any functions have been added to libpurple, Pidgin, or Finch:
9 # purple_micro_version = 0
10 # purple_minor_version += 1
11 # purple_lt_current += 1
13 # If backwards compatibility has been broken in libpurple, Pidgin, or Finch:
14 # purple_micro_version = 0
15 # purple_minor_version = 0
16 # purple_major_version += 1;
17 # purple_lt_current += 1
19 # purple_version_suffix should be similar to one of the following:
20 # For beta releases: [beta2]
21 # For code under development: [devel]
22 # For production releases: []
25 # If any code has changed in libgnt:
26 # gnt_micro_version += 1
28 # If any functions have been added to libgnt:
29 # gnt_micro_version = 0
30 # gnt_minor_version += 1
33 # If backwards compatibility has been broken in libgnt:
34 # gnt_micro_version = 0
35 # gnt_minor_version = 0
36 # gnt_major_version += 1;
39 # gnt_version_suffix should be similar to one of the following:
40 # For beta releases: [beta2]
41 # For code under development: [devel]
42 # For production releases: []
44 # Make sure to update finch/libgnt/configure.ac with libgnt version changes.
46 m4_define([purple_lt_current], [0])
47 m4_define([purple_major_version], [2])
48 m4_define([purple_minor_version], [0])
49 m4_define([purple_micro_version], [0])
50 m4_define([purple_version_suffix], [beta7])
51 m4_define([purple_version],
52 [purple_major_version.purple_minor_version.purple_micro_version])
53 m4_define([purple_display_version], purple_version[]m4_ifdef([purple_version_suffix],[purple_version_suffix]))
55 m4_define([gnt_lt_current], [0])
56 m4_define([gnt_major_version], [1])
57 m4_define([gnt_minor_version], [0])
58 m4_define([gnt_micro_version], [0])
59 m4_define([gnt_version_suffix], [beta7])
60 m4_define([gnt_version],
61 [gnt_major_version.gnt_minor_version.gnt_micro_version])
62 m4_define([gnt_display_version], gnt_version[]m4_ifdef([gnt_version_suffix],[gnt_version_suffix]))
65 AC_INIT([pidgin], [purple_display_version], [devel@pidgin.im])
68 AM_CONFIG_HEADER(config.h)
69 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
70 #AM_INIT_AUTOMAKE([foreign dist-bzip2])
72 PURPLE_MAJOR_VERSION=purple_major_version
73 PURPLE_MINOR_VERSION=purple_minor_version
74 PURPLE_MICRO_VERSION=purple_micro_version
75 PURPLE_VERSION=[purple_display_version]
76 AC_SUBST(PURPLE_MAJOR_VERSION)
77 AC_SUBST(PURPLE_MINOR_VERSION)
78 AC_SUBST(PURPLE_MICRO_VERSION)
79 AC_SUBST(PURPLE_VERSION)
81 PURPLE_LT_VERSION_INFO="purple_lt_current:purple_micro_version:purple_minor_version"
82 AC_SUBST(PURPLE_LT_VERSION_INFO)
84 GNT_MAJOR_VERSION=gnt_major_version
85 GNT_MINOR_VERSION=gnt_minor_version
86 GNT_MICRO_VERSION=gnt_micro_version
87 GNT_VERSION=[gnt_display_version]
88 AC_SUBST(GNT_MAJOR_VERSION)
89 AC_SUBST(GNT_MINOR_VERSION)
90 AC_SUBST(GNT_MICRO_VERSION)
93 GNT_LT_VERSION_INFO="gnt_lt_current:gnt_micro_version:gnt_minor_version"
94 AC_SUBST(GNT_LT_VERSION_INFO)
96 AC_DEFINE(PIDGIN_NAME, "Pidgin", [The user-visible application name])
98 AC_PATH_PROG(sedpath, sed)
100 dnl Storing configure arguments
101 AC_DEFINE_UNQUOTED(CONFIG_ARGS, "$ac_configure_args", [configure arguments])
103 dnl Checks for programs.
107 LIBTOOL="$LIBTOOL --silent"
112 GETTEXT_PACKAGE=pidgin
113 AC_SUBST(GETTEXT_PACKAGE)
116 # before gettexting, in case iconv matters
119 AC_CHECK_LIB(resolv, res_query)
121 AC_CHECK_HEADER(CoreFoundation/CoreFoundation.h, [
122 AC_CHECK_HEADER(IOKit/IOKitLib.h, [
123 AC_DEFINE(HAVE_IOKIT, 1, [Define if we have IOKit])
124 LIBS="$LIBS -framework IOKit -framework CoreFoundation"
128 AC_MSG_CHECKING([for fink])
130 AC_MSG_RESULT([found, adding /sw to search paths])
131 CPPFLAGS="$CPPFLAGS -I/sw/include"
132 LDFLAGS="$LDFLAGS -L/sw/lib"
134 AC_MSG_RESULT([not found])
141 ALL_LINGUAS="af am ar az bg bn bs ca ca@valencia cs da de dz el en_AU en_CA en_GB eo es et eu fa fi fr gl gu he hi hu id it ja ka kn ko ku lt mk my_MM nb ne nl nn pa pl pt_BR pt ps ro ru sk sl sq sr sr@Latn sv ta te th tr uk vi xh zh_CN zh_HK zh_TW"
144 dnl we don't use autobreak on cygwin!!
147 dnl Checks for header files.
150 AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h)
152 dnl Checks for typedefs, structures, and compiler characteristics.
155 AC_CHECK_SIZEOF(time_t, ,[
161 dnl Checks for library functions.
164 AC_CHECK_FUNCS(strdup strstr atexit setlocale)
165 dnl Checks for getopt in standard library
166 AC_CHECK_FUNCS(getopt_long,,
172 dnl Check for inet_aton
173 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
174 [AC_ERROR(inet_aton not found)])])
175 AC_CHECK_LIB(resolv, __res_query)
176 AC_CHECK_LIB(nsl, gethostent)
177 AC_CHECK_FUNC(socket, ,
178 [AC_CHECK_LIB(socket, socket, , [AC_ERROR([socket not found])])])
179 dnl If all goes well, by this point the previous two checks will have
180 dnl pulled in -lsocket and -lnsl if we need them.
181 AC_CHECK_FUNC(getaddrinfo,
182 [AC_DEFINE([HAVE_GETADDRINFO], [1],
183 [Define to 1 if you have the getaddrinfo function.])],
184 [AC_CHECK_LIB(socket, getaddrinfo,
185 [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)])
187 dnl Check for socklen_t (in Unix98)
188 AC_MSG_CHECKING(for socklen_t)
190 #include <sys/types.h>
191 #include <sys/socket.h>
198 #include <sys/types.h>
199 #include <sys/socket.h>
200 int accept(int, struct sockaddr *, size_t *);
202 AC_MSG_RESULT(size_t)
203 AC_DEFINE(socklen_t, size_t, [socklen_t size])
206 AC_DEFINE(socklen_t, int, [socklen_t size])
210 dnl to prevent the g_stat()/g_unlink() crash,
211 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
214 dnl FreeBSD doesn't have libdl, dlopen is provided by libc
215 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
217 AC_MSG_CHECKING(for the %z format string in strftime())
219 #ifdef HAVE_SYS_TIME_H
220 #include <sys/time.h>
228 time_t t = time(NULL);
230 if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5)
233 fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf);
235 return !((buf[0] == '-' || buf[0] == '+') &&
236 (buf[1] >= '0' && buf[1] <= '9') &&
237 (buf[2] >= '0' && buf[2] <= '9') &&
238 (buf[3] >= '0' && buf[3] <= '9') &&
239 (buf[4] >= '0' && buf[4] <= '9')
244 AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
245 [Define to 1 if you have a strftime() that supports the %z format string.])
249 # Fallback for Cross Compiling...
250 # This will enable the compatibility code.
255 dnl #######################################################################
256 dnl # Check for GLib 2.0 (required)
257 dnl #######################################################################
258 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [
262 You must have the GLib 2.0 development headers installed to build.
264 AC_SUBST(GLIB_CFLAGS)
267 AC_ARG_ENABLE(gtkui, [AC_HELP_STRING([--disable-gtkui],
268 [compile without GTK+ user interface])],
269 enable_gtkui="$enableval", enable_gtkui="yes")
270 AC_ARG_ENABLE(consoleui, [AC_HELP_STRING([--disable-consoleui],
271 [compile without console user interface])],
272 enable_consoleui=$enableval, enable_consoleui=yes)
274 dnl #######################################################################
275 dnl # Check for GTK+ 2.0 and other things used by the GTK UI
276 dnl #######################################################################
277 AC_ARG_ENABLE(screensaver,
278 [AC_HELP_STRING([--disable-screensaver],
279 [compile without X screensaver extension (used to detect idleness)])],
280 enable_screensaver="$enableval", enable_screensaver="yes")
282 [AC_HELP_STRING([--disable-sm],
283 [compile without X session management support])],
284 enable_sm="$enableval", enable_sm="yes")
285 AC_ARG_ENABLE(startup-notification,
286 [AC_HELP_STRING([--disable-startup-notification],
287 [compile without startup notification support])],
288 enable_startup_notification="$enableval", enable_startup_notification="yes")
289 AC_ARG_ENABLE(gtkspell,
290 [AC_HELP_STRING([--disable-gtkspell],
291 [compile without GtkSpell automatic spell checking])],
292 enable_gtkspell="$enableval", enable_gtkspell="yes")
293 AC_ARG_ENABLE(gevolution,
294 [AC_HELP_STRING([--disable-gevolution],
295 [compile without the Evolution plugin])],
296 enable_gevolution="$enableval", enable_gevolution="yes")
298 [AC_HELP_STRING([--disable-cap],
299 [compile without Contact Availability Prediction plugin])],
300 enable_cap="$enableval", enable_cap="yes")
304 # We can't assume that $x_libraries will be set, because autoconf does not
305 # set it in the case when the X libraries are in a standard place.
306 # Ditto for $x_includes
307 if test X"$x_libraries" = X"" || test X"$x_libraries" = XNONE; then
310 x_libpath_add="-L$x_libraries"
312 if test X"$x_includes" = X"" || test X"$x_includes" = XNONE; then
315 x_incpath_add="-I$x_includes"
318 if test "x$enable_gtkui" = "xyes" ; then
319 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.0.0], , [
323 You must have the GTK+ 2.0 development headers installed to compile Pidgin.
324 If you only want to build Finch then specify --disable-gtkui when running configure.
330 dnl We only really need Pango >= 1.4 for decent RTL support
331 PKG_CHECK_MODULES(pango, [pango >= 1.4.0],
332 AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:)
334 dnl #######################################################################
335 dnl # Check for XScreenSaver
336 dnl #######################################################################
337 if test "x$enable_screensaver" = "xyes" ; then
339 LIBS="$LIBS $GTK_LIBS $x_libpath_add"
342 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm])
343 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm])
344 if test "x$XSS_LIBS" != "x"; then
345 oldCPPFLAGS="$CPPFLAGS"
346 CPPFLAGS="$CPPFLAGS $x_incpath_add"
348 #include <X11/Xlib.h>
349 #include <X11/extensions/scrnsaver.h>
350 ], [], [], [enable_screensaver=no])
351 CPPFLAGS="$oldCPPFLAGS"
353 enable_screensaver=no
357 if test "x$enable_screensaver" = "xyes" ; then
358 AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])
363 dnl #######################################################################
364 dnl # Check for X session management libs
365 dnl #######################################################################
366 if test "x$enable_sm" = "xyes"; then
368 AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE])
369 if test "x$found_sm_lib" = "xtrue"; then
370 oldCPPFLAGS="$CPPFLAGS"
371 CPPFLAGS="$CPPFLAGS $x_incpath_add"
372 AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes)
373 CPPFLAGS="$oldCPPFLAGS"
376 if test "x$enable_sm" = "xyes"; then
377 AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.])
382 dnl #######################################################################
383 dnl # Check for startup notification
384 dnl #######################################################################
385 if test "x$enable_startup_notification" = "xyes"; then
386 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, [libstartup-notification-1.0 >= 0.5], , [
388 enable_startup_notification=no
391 if test "x$enable_startup_notification" = "xyes"; then
392 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
393 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
394 AC_SUBST(STARTUP_NOTIFICATION_LIBS)
398 dnl #######################################################################
399 dnl # Check for GtkSpell
400 dnl #######################################################################
401 if test "x$enable_gtkspell" = "xyes" ; then
402 PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , [
406 if test "x$enable_gtkspell" = "xyes" ; then
407 AC_DEFINE(USE_GTKSPELL, 1, [Define if we're using GtkSpell])
408 AC_SUBST(GTKSPELL_CFLAGS)
409 AC_SUBST(GTKSPELL_LIBS)
413 dnl #######################################################################
414 dnl # Check for stuff needed by the Evolution integration plugin.
415 dnl #######################################################################
416 if test "x$enable_gevolution" = "xyes"; then
417 evo_deps="libebook-1.2 libedata-book-1.2"
418 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, , [
420 enable_gevolution="no"
422 if test "x$enable_gevolution" = "xno"; then
423 evo_deps="libebook-1.0 libedata-book-1.0"
424 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [
425 enable_gevolution="yes"
430 if test "x$enable_gevolution" = "xyes"; then
431 AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.])
432 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
433 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
437 dnl #######################################################################
438 dnl # Check for libsqlite3 (for the Contact Availability Prediction plugin)
439 dnl #######################################################################
440 if test "x$enable_cap" = "xyes"; then
441 PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[
451 enable_screensaver=no
453 enable_startup_notification=no
456 AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtkui" = "xyes")
457 AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$enable_gevolution" = "xyes")
458 AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes")
460 dnl #######################################################################
461 dnl # Check for ncurses and other things used by the console UI
462 dnl #######################################################################
465 AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR],
466 [compile finch against the ncurses includes in DIR])],
467 [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""])
468 if test "x$enable_consoleui" = "xyes"; then
469 AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no])
470 AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_consoleui=no])
472 if test "x$enable_consoleui" = "xyes"; then
473 dnl # Some distros put the headers in ncursesw/, some don't
475 for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include
477 f="$location/ncurses.h"
479 AC_MSG_CHECKING([if $f supports wide characters])
481 #define _XOPEN_SOURCE_EXTENDED
485 # error get_wch not found!
489 if test x"$dir" != x"." ; then
504 if test x"$found_ncurses_h" = x"no" ; then
510 # ncursesw was not found. Look for plain old ncurses
512 AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no])
513 AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"], [enable_consoleui=no])
514 AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.])
515 if test x"$ac_ncurses_includes" != "x"; then
516 GNT_CFLAGS="-I$ac_ncurses_includes"
518 if test x"$NCURSES_HEADERS" != "x"; then
519 GNT_CFLAGS="-I$NCURSES_HEADERS"
524 PKG_CHECK_MODULES(X11, x11,
525 [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])], [AC_MSG_RESULT(no)])
532 AM_CONDITIONAL(ENABLE_GNT, test "x$enable_consoleui" = "xyes")
534 #AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])])
536 dnl #######################################################################
537 dnl # Check for LibXML2 (required)
538 dnl #######################################################################
539 PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= 2.6.0], , [
543 You must have libxml2 >= 2.6.0 development headers installed to build.
545 AC_SUBST(LIBXML_CFLAGS)
546 AC_SUBST(LIBXML_LIBS)
548 dnl #######################################################################
550 dnl #######################################################################
551 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
552 AM_CONDITIONAL(USE_GCONFTOOL, test "x$GCONFTOOL" != "xno")
555 dnl #######################################################################
556 dnl # Check for GStreamer
557 dnl #######################################################################
558 AC_ARG_ENABLE(gstreamer,
559 [AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
560 enable_gst="$enableval", enable_gst="yes")
561 PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], , [
565 if test "x$enable_gst" != "xno"; then
566 AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
567 AC_SUBST(GSTREAMER_CFLAGS)
568 AC_SUBST(GSTREAMER_LIBS)
571 dnl #######################################################################
572 dnl # Check for Meanwhile headers (for Sametime)
573 dnl #######################################################################
574 PKG_CHECK_MODULES(MEANWHILE, [meanwhile >= 1.0.0 meanwhile < 2.0.0], [
580 AC_SUBST(MEANWHILE_CFLAGS)
581 AC_SUBST(MEANWHILE_LIBS)
583 dnl #######################################################################
584 dnl # Check for Howl headers (for Bonjour)
585 dnl #######################################################################
586 AC_ARG_WITH(howl-includes, [AC_HELP_STRING([--with-howl-includes=DIR], [compile the Bonjour plugin against the Howl includes in DIR])], [ac_howl_includes="$withval"], [ac_howl_includes="no"])
587 AC_ARG_WITH(howl-libs, [AC_HELP_STRING([--with-howl-libs=DIR], [compile the Bonjour plugin against the Howl libs in DIR])], [ac_howl_libs="$withval"], [ac_howl_libs="no"])
591 dnl Attempt to autodetect avahi-compat-howl
592 PKG_CHECK_MODULES(HOWL, avahi-compat-howl, [
601 dnl Attempt to autodetect Howl
602 if test "x$howlincludes" = "xno"; then
603 PKG_CHECK_MODULES(HOWL, howl, [
613 dnl Override HOWL_CFLAGS if the user specified an include dir
614 if test "$ac_howl_includes" != "no"; then
615 HOWL_CFLAGS="-I$ac_howl_includes"
617 CPPFLAGS_save="$CPPFLAGS"
618 CPPFLAGS="$CPPFLAGS $HOWL_CFLAGS"
619 AC_CHECK_HEADER(howl.h, [howlincludes=yes], [howlincludes=no])
620 CPPFLAGS="$CPPFLAGS_save"
622 dnl Override HOWL_LIBS if the user specified a libs dir
623 if test "$ac_howl_libs" != "no"; then
624 HOWL_LIBS="-L$ac_howl_libs -lhowl"
626 AC_CHECK_LIB(howl, sw_discovery_init, [howllibs=yes], [howllibs=no], $HOWL_LIBS)
628 AC_SUBST(HOWL_CFLAGS)
631 dnl #######################################################################
632 dnl # Check for SILC client includes and libraries
633 dnl #######################################################################
634 AC_ARG_WITH(silc-includes, [AC_HELP_STRING([--with-silc-includes=DIR], [compile the SILC plugin against includes in DIR])], [ac_silc_includes="$withval"], [ac_silc_includes="no"])
635 AC_ARG_WITH(silc-libs, [AC_HELP_STRING([--with-silc-libs=DIR], [compile the SILC plugin against the SILC libs in DIR])], [ac_silc_libs="$withval"], [ac_silc_libs="no"])
638 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
639 silc_manual_check="yes"
641 silc_manual_check="no"
643 if test "x$silc_manual_check" = "xno"; then
644 PKG_CHECK_MODULES(SILC, silcclient, [
652 dnl If silcclient.pc wasn't found, check for just silc.pc
653 if test "x$have_silc" = "xno"; then
654 PKG_CHECK_MODULES(SILC, silc, [
664 if test "$ac_silc_includes" != "no"; then
665 SILC_CFLAGS="-I$ac_silc_includes"
667 CPPFLAGS_save="$CPPFLAGS"
668 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
669 AC_CHECK_HEADER(silcincludes.h, [silcincludes=yes])
670 CPPFLAGS="$CPPFLAGS_save"
672 if test "$ac_silc_libs" != "no"; then
673 SILC_LIBS="-L$ac_silc_libs"
675 SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
676 AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS)
679 AC_SUBST(SILC_CFLAGS)
680 dnl SILC Toolkit >= 1.0.1 has a new MIME API
681 if test "x$silcclient" = "xyes"; then
682 CPPFLAGS_save="$CPPFLAGS"
683 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
684 AC_MSG_CHECKING(for silcmime.h)
686 #include <silcincludes.h>
687 #include <silcmime.h>
690 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
694 CPPFLAGS="$CPPFLAGS_save"
697 dnl #######################################################################
698 dnl # Check for Gadu-Gadu client includes and libraries
699 dnl #######################################################################
700 AC_ARG_WITH(gadu-includes, [AC_HELP_STRING([--with-gadu-includes=DIR], [compile the Gadu-Gadu plugin against includes in DIR])], [ac_gadu_includes="$withval"], [ac_gadu_includes="no"])
701 AC_ARG_WITH(gadu-libs, [AC_HELP_STRING([--with-gadu-libs=DIR], [compile the Gadu-Gadu plugin against the libs in DIR])], [ac_gadu_libs="$withval"], [ac_gadu_libs="no"])
704 if test -n "$with_gadu_includes" || test -n "$with_gadu_libs"; then
705 gadu_manual_check="yes"
707 gadu_manual_check="no"
709 if test "x$gadu_manual_check" = "xno"; then
710 PKG_CHECK_MODULES(GADU, libgadu, [
717 if test "$ac_gadu_includes" != "no"; then
718 GADU_CFLAGS="-I$ac_gadu_includes"
720 CPPFLAGS_save="$CPPFLAGS"
721 CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
722 AC_CHECK_HEADER(libgadu.h, [gadu_includes=yes])
723 CPPFLAGS="$CPPFLAGS_save"
725 if test "$ac_gadu_libs" != "no"; then
726 GADU_LIBS="-L$ac_gadu_libs"
728 GADU_LIBS="$GADU_LIBS -lgadu"
729 AC_CHECK_LIB(gadu, gg_libgadu_version, [gadu_libs=yes], , $GADU_LIBS)
731 GADU_CFLAGS=`echo $GADU_CFLAGS |$sedpath 's/-Wall//'`
733 if test "x$gadu_libs" = "xyes"; then
734 AC_MSG_CHECKING(for libgadu GPL compatibility)
735 CPPFLAGS_save="$CPPFLAGS"
736 CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
737 AC_TRY_COMPILE([#include <libgadu.h>], [
738 #ifdef __GG_LIBGADU_HAVE_OPENSSL
739 #error "libgadu is not compatible with the GPL when compiled with OpenSSL support."
743 AC_DEFINE([HAVE_LIBGADU], [1],
744 [Define to 1 if you have libgadu.])
749 echo "libgadu is not compatible with the GPL when compiled with OpenSSL support."
750 echo "Please recompile libgadu using:"
751 echo "./autogen.sh --disable-libgadu-openssl --disable-static --enable-shared"
752 echo "Then rerun this ./configure"
759 CPPFLAGS="$CPPFLAGS_save"
762 AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes")
765 AC_SUBST(GADU_CFLAGS)
768 AC_ARG_ENABLE(distrib,,,enable_distrib=no)
769 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
771 AC_ARG_WITH(static-prpls, [AC_HELP_STRING([--with-static-prpls], [Link to certain protocols statically])], [STATIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`], [STATIC_PRPLS=""])
772 if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then
776 if test "x$STATIC_PRPLS" = "xall" ; then
777 STATIC_PRPLS="bonjour gg irc jabber msn novell oscar qq sametime silc simple yahoo zephyr"
779 if test "x$have_meanwhile" != "xyes" ; then
780 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'`
782 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then
783 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'`
785 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
786 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc//'`
788 AC_SUBST(STATIC_PRPLS)
792 for i in $STATIC_PRPLS ; do
793 dnl Ugly special case for "libsilcpurple.a":
794 if test "x$i" = "xsilc"; then
795 STATIC_LINK_LIBS="$STATIC_LINK_LIBS protocols/$i/lib${i}purple.a"
797 STATIC_LINK_LIBS="$STATIC_LINK_LIBS protocols/$i/lib$i.a"
799 extern_init="$extern_init extern gboolean purple_init_${i}_plugin();"
800 load_proto="$load_proto purple_init_${i}_plugin();"
802 bonjour) static_bonjour=yes ;;
804 irc) static_irc=yes ;;
805 jabber) static_jabber=yes ;;
806 msn) static_msn=yes ;;
807 novell) static_novell=yes ;;
808 oscar) static_oscar=yes ;;
809 aim) static_oscar=yes ;;
810 icq) static_oscar=yes ;;
812 sametime) static_sametime=yes ;;
813 silc) static_silc=yes ;;
814 simple) static_simple=yes ;;
815 toc) static_toc=yes ;;
816 yahoo) static_yahoo=yes ;;
817 zephyr) static_zephyr=yes ;;
818 *) echo "Invalid static protocol $i!!" ; exit ;;
821 AM_CONDITIONAL(STATIC_BONJOUR, test "x$static_bonjour" = "xyes" -a "x$howlincludes" = "xyes" -a "x$howllibs" = "xyes")
822 AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes")
823 AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes")
824 AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes")
825 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes")
826 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes")
827 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes")
828 AM_CONDITIONAL(STATIC_QQ, test "x$static_qq" = "xyes")
829 AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_meanwhile" = "xyes")
830 AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes")
831 AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes")
832 AM_CONDITIONAL(STATIC_TOC, test "x$static_toc" = "xyes")
833 AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes")
834 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes")
835 AC_SUBST(STATIC_LINK_LIBS)
836 AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init static void static_proto_init() { $load_proto },
837 [Loads static protocol plugin module initialization functions.])
839 AC_ARG_WITH(dynamic_prpls, [AC_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`])
840 if test "x$DYNAMIC_PRPLS" = "xall" ; then
841 DYNAMIC_PRPLS="bonjour gg irc jabber msn novell oscar qq sametime silc simple yahoo zephyr"
843 if test "x$have_meanwhile" != "xyes"; then
844 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'`
846 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then
847 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
849 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
850 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc//'`
852 AC_SUBST(DYNAMIC_PRPLS)
853 for i in $DYNAMIC_PRPLS ; do
855 bonjour) dynamic_bonjour=yes ;;
856 gg) dynamic_gg=yes ;;
857 irc) dynamic_irc=yes ;;
858 jabber) dynamic_jabber=yes ;;
859 msn) dynamic_msn=yes ;;
860 novell) dynamic_novell=yes ;;
861 oscar) dynamic_oscar=yes ;;
862 aim) dynamic_oscar=yes ;;
863 icq) dynamic_oscar=yes ;;
864 qq) dynamic_qq=yes ;;
865 sametime) dynamic_sametime=yes ;;
866 silc) dynamic_silc=yes ;;
867 simple) dynamic_simple=yes ;;
868 toc) dynamic_toc=yes ;;
869 yahoo) dynamic_yahoo=yes ;;
870 zephyr) dynamic_zephyr=yes ;;
871 *) echo "Invalid dynamic protocol $i!!" ; exit ;;
874 AM_CONDITIONAL(DYNAMIC_BONJOUR, test "x$dynamic_bonjour" = "xyes" -a "x$bonjourincludes" = "xyes" -a "x$bonjourclient" = "xyes")
875 AM_CONDITIONAL(DYNAMIC_GG, test "x$dynamic_gg" = "xyes")
876 AM_CONDITIONAL(DYNAMIC_IRC, test "x$dynamic_irc" = "xyes")
877 AM_CONDITIONAL(DYNAMIC_JABBER, test "x$dynamic_jabber" = "xyes")
878 AM_CONDITIONAL(DYNAMIC_MSN, test "x$dynamic_msn" = "xyes")
879 AM_CONDITIONAL(DYNAMIC_NOVELL, test "x$dynamic_novell" = "xyes")
880 AM_CONDITIONAL(DYNAMIC_OSCAR, test "x$dynamic_oscar" = "xyes")
881 AM_CONDITIONAL(DYNAMIC_QQ, test "x$dynamic_qq" = "xyes")
882 AM_CONDITIONAL(DYNAMIC_SAMETIME, test "x$dynamic_sametime" = "xyes" -a "x$have_meanwhile" = "xyes")
883 AM_CONDITIONAL(DYNAMIC_SILC, test "x$dynamic_silc" = "xyes" -a "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes")
884 AM_CONDITIONAL(DYNAMIC_SIMPLE, test "x$dynamic_simple" = "xyes")
885 AM_CONDITIONAL(DYNAMIC_TOC, test "x$dynamic_toc" = "xyes")
886 AM_CONDITIONAL(DYNAMIC_YAHOO, test "x$dynamic_yahoo" = "xyes")
887 AM_CONDITIONAL(DYNAMIC_ZEPHYR, test "x$dynamic_zephyr" = "xyes")
889 AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes)
890 AC_ARG_WITH(krb4, [AC_HELP_STRING([--with-krb4=PREFIX], [compile Zephyr plugin with Kerberos 4 support])], kerberos="$withval", kerberos="no")
891 AC_ARG_WITH(zephyr, [AC_HELP_STRING([--with-zephyr=PREFIX], [compile Zephyr plugin against external libzephyr])], zephyr="$withval", zephyr="no")
892 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
894 AC_CHECK_HEADER(sys/utsname.h)
897 AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], enable_fortify="$enableval", enable_fortify=yes)
899 AC_ARG_ENABLE(mcheck, [AC_HELP_STRING([--enable-mcheck], [compile with mcheck (malloc debugging) support])], enable_mcheck="$enableval", enable_mcheck="$enable_debug")
900 if test "x$enable_mcheck" = "xyes" ; then
902 LIBS="$LIBS -lmcheck"
903 AC_MSG_CHECKING(for mcheck support)
905 int main() {return 0;}
914 if test "x$GCC" = "xyes"; then
915 dnl We enable -Wall later.
916 dnl If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
917 dnl This leads to warnings we don't want.
918 CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
920 dnl ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE
922 dnl Future Possibilities
924 dnl Consider adding -Wbad-function-cast.
925 dnl This leads to spurious warnings using GPOINTER_TO_INT(), et al. directly on a function call.
926 dnl We'd need an intermediate variable.
928 dnl Consider adding -Wfloat-equal.
929 dnl This leads to warnings with Perl.
930 dnl Perhaps we could write ugly configure magic and pass -Wno-float-equal down to that subdirectory.
931 dnl On the other hand, it's probably actually broken, so maybe the Perl folks should fix that?
933 dnl Consider removing -Wno-sign-compare (from the -Wextra set) and fixing all those cases.
934 dnl This is likely non-trivial.
937 "-Waggregate-return" \
939 "-Wdeclaration-after-statement" \
941 "-Werror-implicit-function-declaration" \
942 "-Wextra -Wno-sign-compare -Wno-unused-parameter" \
944 "-Wmissing-declarations" \
945 "-Wmissing-noreturn" \
946 "-Wmissing-prototypes" \
951 orig_CFLAGS="$CFLAGS"
952 CFLAGS="$CFLAGS $newflag"
953 AC_MSG_CHECKING(for $newflag option to gcc)
955 int main() {return 0;}
958 CFLAGS="$orig_CFLAGS"
959 DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
962 CFLAGS="$orig_CFLAGS"
966 if test "x$enable_fortify" = "xyes"; then
967 AC_MSG_CHECKING(for FORTIFY_SOURCE support)
968 AC_TRY_COMPILE([#include <features.h>], [
970 #if !(__GNUC_PREREQ (4, 1) \
971 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
972 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
973 && __GNUC_MINOR__ == 4 \
974 && (__GNUC_PATCHLEVEL__ > 2 \
975 || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
976 #error No FORTIFY_SOURCE support
982 DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2"
988 DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
993 AC_PATH_PROG(pidginpath, pidgin)
995 dnl #######################################################################
996 dnl # Check for D-Bus libraries
997 dnl #######################################################################
999 AC_ARG_ENABLE(dbus, [AC_HELP_STRING([--enable-dbus], [enable D-Bus support])], , enable_dbus=yes)
1000 AC_ARG_ENABLE(nm, [AC_HELP_STRING([--enable-nm], [enable NetworkManager support (buggy) (requires D-Bus)])], enable_libnm=yes, enable_libnm=no)
1002 if test "x$enable_dbus" = "xyes" ; then
1003 AC_CHECK_PROG(enable_dbus, dbus-binding-tool, yes, no)
1006 if test "x$enable_dbus" = "xyes" ; then
1007 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.35 dbus-glib-1 >= 0.35], [
1008 AC_SUBST(DBUS_CFLAGS)
1016 dnl Check for libnm_glib; if we don't have it, oh well
1017 if test "x$enable_libnm" = "xyes" ; then
1020 PKG_CHECK_MODULES(LIBNM, libnm_glib,
1022 AC_DEFINE(HAVE_LIBNM, 1, [Define if you have NetworkManager])
1029 AC_SUBST(LIBNM_CFLAGS)
1030 AC_SUBST(LIBNM_LIBS)
1036 dnl #######################################################################
1037 dnl # Check for Python
1038 dnl #######################################################################
1040 dnl Python scripts are used to auto-generate about 3000 lines of C
1041 dnl and XML code that wraps (part of) the existing API so that
1042 dnl it is now accessible through D-Bus.
1044 dnl Python is only required if --enable-dbus is used, and only for
1045 dnl the build process to generate the code, not for running pidgin.
1046 dnl This autogenerated code is system-independent, so in principle we
1047 dnl can generate all of it before shipping. But I thought adding
1048 dnl auto-generated stuff to the repository is inelegant.
1049 dnl Alternatively, these python scripts could be rewritten
1050 dnl in C (brrrr ...).
1052 AC_ARG_WITH([python],
1053 AC_HELP_STRING([--with-python=PATH],
1054 [which python interpreter to use for dbus code generation]),
1057 if test "x$enable_dbus" = "xyes" ; then
1058 if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then
1059 AC_PATH_PROG([PYTHON], [python], [no])
1062 if test x"$python" = x"no" ; then
1063 AC_MSG_WARN([python interpreter not found in your path])
1068 if test "x$enable_dbus" = "xyes" ; then
1069 if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then
1070 AC_MSG_WARN([python version >= 2.4 required])
1075 dnl ###########################################################################
1076 dnl # Find the D-Bus services dir.
1078 dnl # This is a 3 step process that
1080 dnl # 1. checks if --with-dbus-services was set, if so use that.
1081 dnl # 2. checks if --prefix was given, if so use that.
1082 dnl # 3. fallbacks to installing into what should be the correct system
1085 dnl # This is still prone to error if one of the legacy directories exist
1086 dnl # although a newer dbus is installed. But I have tried to order the
1087 dnl # directory searching to keep this situation at a minimum.
1088 dnl ###########################################################################
1089 AC_ARG_WITH(dbus-services, [AC_HELP_STRING([--with-dbus-services=<dir>], [where the D-Bus services directory is located.])])
1091 DBUS_SERVICES_DIR=""
1093 if test x"$enable_dbus" = "xyes" ; then
1094 AC_MSG_CHECKING([location of the D-Bus services directory])
1095 if ! test -z "$with_dbus_services" ; then
1096 if ! test -d "$with_dbus_services" ; then
1097 AC_MSG_ERROR([$with_dbus_services does not exist, if this is the correct location please make sure that it exists.])
1100 DBUS_SERVICES_DIR="$with_dbus_services"
1102 if test x"$prefix" = x"NONE" ; then
1103 dnl # no prefix given, so we look for the correct dbus system paths.
1104 dnl # if a prefix is given, we use it.
1106 serviceprefixes="$datadir $libdir /usr/share /usr/local/share"
1107 DBUS_SERVICES_DIR=""
1109 for d in $serviceprefixes ; do
1110 dir="$d/dbus-1/services"
1111 if test -d $dir ; then
1112 DBUS_SERVICES_DIR="$dir"
1117 if test -z $DBUS_SERVICES_DIR ; then
1118 AC_MSG_ERROR([D-Bus services directory was not found! Please use --with-dbus-services and specify it's location.])
1121 DBUS_SERVICES_DIR="$datadir/dbus-1/services"
1124 AC_MSG_RESULT([$DBUS_SERVICES_DIR])
1125 AC_DEFINE(HAVE_DBUS, 1, [Define if we are using D-Bus.])
1127 AC_SUBST(DBUS_SERVICES_DIR)
1129 if test "x$enable_dbus" = "xyes" ; then
1130 echo "Building with D-Bus support"
1132 echo "Building without D-Bus support"
1135 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
1137 dnl #######################################################################
1138 dnl # Check for Mono support
1139 dnl #######################################################################
1140 AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support (experimental)])], , enable_mono=no)
1141 if test x"$enable_mono" = x"yes" ; then
1142 PKG_CHECK_MODULES(MONO, mono, [
1143 AC_SUBST(MONO_CFLAGS)
1150 if test x"$enable_mono" = x"yes"; then
1152 LIBS="$LIBS $MONO_LIBS"
1153 AC_MSG_CHECKING(for libmono)
1154 AC_CHECK_FUNCS(mono_jit_init, [], enable_mono=no)
1157 oldCPPFLAGS="$CPPFLAGS"
1158 CPPFLAGS="$CPPFLAGS $MONO_CFLAGS"
1159 AC_CHECK_HEADERS(mono/jit/jit.h, [], enable_mono=no)
1160 AC_CHECK_HEADERS(mono/metadata/object.h, [], enable_mono=no)
1161 CPPFLAGS="$oldCPPFLAGS"
1163 AC_DEFINE(ENABLE_MONO, 1, [Define if mono enabled.])
1171 AC_SUBST(MONO_CFLAGS)
1173 AM_CONDITIONAL(USE_MONO, test x"$enable_mono" = x"yes")
1175 dnl #######################################################################
1176 dnl # Check for Perl support
1177 dnl #######################################################################
1178 AC_ARG_ENABLE(perl, [AC_HELP_STRING([--disable-perl], [compile without perl scripting])], , enable_perl=yes)
1180 if test "$enable_plugins" = no ; then
1184 if test "$enable_perl" = yes ; then
1185 AC_PATH_PROG(perlpath, perl)
1186 AC_MSG_CHECKING(for Perl compile flags)
1187 PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
1188 if test "_$PERL_CFLAGS" = _ ; then
1189 AC_MSG_RESULT([not found, building without perl.])
1192 PERL_LIBS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null |$sedpath 's/-lgdbm //'`
1193 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-ldb //'`
1194 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lndbm //'`
1195 if test "$system" = "Linux"; then
1196 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lnsl //'`
1197 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lposix //'`
1199 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lc //'`
1203 LIBS="$LIBS $PERL_LIBS"
1204 AC_MSG_CHECKING(for libperl)
1205 AC_CHECK_FUNCS(perl_run, [], enable_perl=no)
1208 oldCPPFLAGS="$CPPFLAGS"
1209 CPPFLAGS="$CPPFLAGS $PERL_CFLAGS"
1210 AC_CHECK_HEADERS(EXTERN.h)
1211 AC_CHECK_HEADERS(perl.h, [], enable_perl=no,
1213 # include <EXTERN.h>
1215 CPPFLAGS="$oldCPPFLAGS"
1219 if test "$enable_perl" = yes ; then
1220 AC_PROG_PERL_MODULES(ExtUtils::MakeMaker, , have_makemaker=no)
1222 if test "x$have_makemaker" = "xno"; then
1226 AM_CONDITIONAL(USE_PERL, false)
1227 AC_MSG_WARN(Compiling perl requires ExtUtils::MakeMaker)
1229 AC_DEFINE(HAVE_PERL, [1], [Compile with support for perl])
1230 AC_SUBST(PERL_CFLAGS)
1232 AM_CONDITIONAL(USE_PERL, true)
1234 dnl This is almost definitely wrong, but in case there's
1235 dnl something I'm missing, I'll leave it in.
1236 AC_CHECK_FUNCS(Perl_eval_pv)
1238 AC_MSG_CHECKING(for old perl)
1239 PERL_OLD=`$perlpath -e 'if($]<5.006){printf"yes\n";}else{printf"no\n";}'`
1241 if test "x$PERL_OLD" = "xyes"; then
1242 AC_DEFINE(OLD_PERL, 1, [Define if old perl is installed.])
1248 if test "x$prefix" != "xNONE"; then
1249 prefix=`eval echo $prefix`
1250 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=$prefix"
1253 AC_ARG_WITH(perl-lib,
1254 [AC_HELP_STRING([--with-perl-lib=[site|vendor|DIR]],
1255 [specify where to install the Perl libraries for pidgin. Default is site.])],
1257 if test "x$withval" = xsite; then
1259 elif test "x$withval" = xvendor; then
1260 if test -z "`$perlpath -v | grep '5\.0'`"; then
1261 PERL_MM_PARAMS="INSTALLDIRS=vendor"
1263 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=`perl -e 'use Config; print $Config{prefix}'`"
1266 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=$withval"
1270 AC_SUBST(PERL_MM_PARAMS)
1272 AC_MSG_CHECKING(for DynaLoader.a)
1273 DYNALOADER_A=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*([[^ ]]*DynaLoader\.a).*/\2/'`
1275 dnl Don't check libperl.a if dynaloader.a wasn't found.
1276 if test -n "$DYNALOADER_A"; then
1279 dnl Find either libperl.a or libperl.so
1280 AC_MSG_CHECKING(for libperl.a or libperl.so)
1281 LIBPERL_A=`echo "$PERL_LDFLAGS -L/usr/lib"|$perlpath -e 'foreach (split(/ /, <STDIN>)) { if (/^-L(.*)/) { my $dir=$1; if (\`ls $dir/libperl.so* 2>/dev/null\`) { print "-lperl"; last; }; if (-e "$dir/libperl.a") { print "$dir/libperl.a"; last } } };'`
1282 if test -z "$LIBPERL_A"; then
1288 if test "$LIBPERL_A" = "-lperl"; then
1293 PERL_LIBS=`echo $PERL_LIBS | $perlpath -pe 's/^(.* )*[[^ ]]*DynaLoader\.a/\1libperl_dynaloader.la/'`
1295 if test -n "$LIBPERL_A"; then
1296 PERL_LIBS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lperl /libperl_orig.la /' -e 's/-lperl$/libperl_orig.la$/'`
1299 AC_SUBST(DYNALOADER_A)
1308 AM_CONDITIONAL(USE_PERL, false)
1311 dnl #######################################################################
1314 dnl # Thanks go to Evolution for the checks.
1315 dnl #######################################################################
1317 dnl These two are inverses of each other <-- stolen from evolution!
1319 AC_ARG_ENABLE(gnutls,
1320 [ --enable-gnutls=[yes,no] attempt to use GnuTLS for SSL support (preferred) [default=yes]],
1321 [enable_gnutls="$enableval"],
1322 [enable_gnutls="yes"])
1325 [ --enable-nss=[yes,no,static] attempt to use Mozilla libnss for SSL support [default=yes]],
1326 [enable_nss="$enableval"],
1329 msg_ssl="None (MSN and Google Talk will not work without SSL!)"
1332 dnl # Check for GnuTLS if it's specified.
1334 if test "x$enable_gnutls" != "xno"; then
1336 prefix=`eval echo $prefix`
1338 AC_ARG_WITH(gnutls-includes,
1339 [ --with-gnutls-includes=PREFIX location of GnuTLS includes.],
1340 [ with_gnutls_includes="$withval" ],
1341 [ with_gnutls_includes="$prefix/include" ])
1343 have_gnutls_includes="no"
1345 if test "x$with_gnutls_includes" != "xno"; then
1346 CPPFLAGS_save="$CPPFLAGS"
1348 AC_MSG_CHECKING(for GnuTLS includes)
1351 CPPFLAGS="$CPPFLAGS -I$with_gnutls_includes"
1352 AC_CHECK_HEADERS(gnutls/gnutls.h, [ gnutls_includes="yes" ])
1353 CPPFLAGS="$CPPFLAGS_save"
1355 if test "x$gnutls_includes" != "xno" -a \
1356 "x$gnutls_includes" != "x"; then
1357 have_gnutls_includes="yes"
1359 if test "x$with_gnutls_includes" != "xNONE/include"; then
1360 GNUTLS_CFLAGS="-I$with_gnutls_includes"
1366 AC_MSG_CHECKING(for GnuTLS includes)
1370 AC_ARG_WITH(gnutls-libs,
1371 [AC_HELP_STRING([--with-gnutls-libs=PREFIX], [location of GnuTLS libraries.])],
1372 [ with_gnutls_libs="$withval" ])
1374 if test "x$with_gnutls_libs" != "xno" -a \
1375 "x$have_gnutls_includes" != "xno"; then
1379 case $with_gnutls_libs in
1381 *) with_gnutls_libs="-L$with_gnutls_libs" ;;
1384 AC_CACHE_CHECK([for GnuTLS libraries], gnutls_libs,
1386 LIBS="$LIBS $with_gnutls_libs -lgnutls -lgcrypt"
1387 AC_TRY_LINK_FUNC(gnutls_init, gnutls_libs="yes", gnutls_libs="no")
1391 if test "x$gnutls_libs" != "xno"; then
1392 AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GnuTLS])
1395 GNUTLS_LIBS="$with_gnutls_libs -lgnutls -lgcrypt"
1403 AC_MSG_CHECKING(for GnuTLS libraries)
1411 AC_SUBST(GNUTLS_CFLAGS)
1412 AC_SUBST(GNUTLS_LIBS)
1414 AM_CONDITIONAL(USE_GNUTLS, test "x$enable_gnutls" = "xyes")
1418 dnl # Check for NSS if it's specified, or if GnuTLS checks failed.
1420 if test "x$enable_nss" != "xno"; then
1422 AC_ARG_WITH(nspr-includes,
1423 [AC_HELP_STRING([--with-nspr-includes=PREFIX], [specify location of Mozilla nspr4 includes.])],
1424 [with_nspr_includes="$withval"])
1426 AC_ARG_WITH(nspr-libs,
1427 [AC_HELP_STRING([--with-nspr-libs=PREFIX], [specify location of Mozilla nspr4 libs.])],
1428 [with_nspr_libs="$withval"])
1430 AC_ARG_WITH(nss-includes,
1431 [AC_HELP_STRING([--with-nss-includes=PREFIX], [specify location of Mozilla nss3 includes.])],
1432 [with_nss_includes="$withval"])
1434 AC_ARG_WITH(nss-libs,
1435 [AC_HELP_STRING([--with-nss-libs=PREFIX], [specify location of Mozilla nss3 libs.])],
1436 [with_nss_libs="$withval"])
1439 if test -n "$with_nspr_includes" || test -n "$with_nspr_libs" || \
1440 test -n "$with_nss_includes" || test -n "$with_nss_libs" ||
1441 test "x$enable_nss" = "xstatic"; then
1443 nss_manual_check="yes"
1445 nss_manual_check="no"
1450 if test "x$nss_manual_check" = "xno"; then
1451 if `$PKG_CONFIG --exists mozilla-nss`; then
1452 PKG_CHECK_MODULES(NSS, mozilla-nss, [
1458 mozilla_nspr="mozilla-nspr"
1459 mozilla_nss="mozilla-nss"
1461 if `$PKG_CONFIG --exists nss`; then
1462 PKG_CHECK_MODULES(NSS, nss, [
1472 if test "x$have_nss" = "xyes"; then
1474 AC_DEFINE(HAVE_NSS, 1, [Define if you have Mozilla NSS])
1475 AC_DEFINE(HAVE_SSL, 1, [Define if you have SSL])
1477 msg_nss="Mozilla NSS"
1480 nss_manual_check="yes"
1484 if test "x$nss_manual_check" = "xyes"; then
1486 have_nspr_includes="no"
1488 if test "x$with_nspr_includes" != "xno"; then
1489 CPPFLAGS_save=$CPPFLAGS
1491 AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)
1494 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
1495 AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ])
1496 CPPFLAGS=$CPPFLAGS_save
1498 if test "x$moz_nspr_includes" != "xno" -a \
1499 "x$moz_nspr_includes" != "x"; then
1501 have_nspr_includes="yes"
1502 NSPR_CFLAGS="-I$with_nspr_includes"
1505 AC_MSG_CHECKING(for Mozilla nspr4 includes)
1513 if test "x$with_nspr_libs" != "xno" -a \
1514 "x$have_nspr_includes" != "xno"; then
1517 LDFLAGS_save=$LDFLAGS
1519 if test "$enable_nss" = "static"; then
1520 if test -z "$with_nspr_libs"; then
1522 [Static linkage requested, but path to nspr libraries not set.]
1523 [Please specify the path to libnspr4.a]
1524 [Example: --with-nspr-libs=/usr/lib])
1528 nsprlibs="$LIBDL $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB"
1531 nsprlibs="$LIBDL -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
1534 AC_CACHE_CHECK([for Mozilla nspr libraries], moz_nspr_libs,
1537 CFLAGS="$CFLAGS $NSPR_CFLAGS"
1541 if test "x$with_nspr_libs" != "x"; then
1542 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
1547 AC_TRY_LINK_FUNC(PR_Init,
1548 [moz_nspr_libs="yes"],
1549 [moz_nspr_libs="no"])
1552 LDFLAGS=$LDFLAGS_save
1556 if test "x$moz_nspr_libs" != "xno"; then
1557 have_nspr_libs="yes"
1558 NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
1564 AC_MSG_CHECKING(for Mozilla nspr4 libraries)
1568 have_nss_includes="no"
1570 if test "x$with_nss_includes" != "xno" -a \
1571 "x$have_nspr_libs" != "xno"; then
1573 CPPFLAGS_save=$CPPFLAGS
1575 AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)
1578 if test "x$with_nspr_includes" != "x"; then
1579 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
1581 CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
1584 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
1585 [moz_nss_includes="yes"],
1586 [moz_nss_includes="no"])
1588 CPPFLAGS=$CPPFLAGS_save
1590 if test "x$moz_nss_includes" = "xyes"; then
1591 have_nss_includes="yes"
1592 NSS_CFLAGS="-I$with_nss_includes"
1599 AC_MSG_CHECKING(for Mozilla nss3 includes)
1604 if test "x$with_nss_libs" != "xno" -a \
1605 "x$have_nss_includes" != "xno"; then
1607 LDFLAGS_save=$LDFLAGS
1609 if test "$enable_nss" = "static"; then
1610 if test -z "$with_nss_libs"; then
1612 [Static linkage requested, but path to nss libraries not set.]
1613 [Please specify the path to libnss3.a]
1614 [Example: --with-nspr-libs=/usr/lib/mozilla])
1617 nsslibs="-ldb1 $with_nss_libs/libnssckfw.a $with_nss_libs/libasn1.a $with_nss_libs/libcrmf.a $with_nss_libs/libswfci.a $with_nss_libs/libjar.a $with_nss_libs/libpkcs12.a $with_nss_libs/libpkcs7.a $with_nss_libs/libpki1.a $with_nss_libs/libsmime.a $with_nss_libs/libssl.a $with_nss_libs/libnss.a $with_nss_libs/libpk11wrap.a $with_nss_libs/libsoftokn.a $with_nss_libs/libfreebl.a $with_nss_libs/libnsspki.a $with_nss_libs/libnssdev.a $with_nss_libs/libcryptohi.a $with_nss_libs/libcerthi.a $with_nss_libs/libcertdb.a $with_nss_libs/libsecutil.a $with_nss_libs/libnssb.a"
1621 nsslibs="$nsslibs $with_nss_libs/libfreeb1.a"
1626 nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
1629 AC_CACHE_CHECK([for Mozilla nss libraries], moz_nss_libs,
1632 LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
1633 LIBS="$nsslibs $nsprlibs"
1635 AC_TRY_LINK_FUNC(NSS_Init,
1636 [moz_nss_libs="yes"],
1637 [moz_nss_libs="no"])
1639 if test "x$moz_nss_libs" = "xno"; then
1640 nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
1641 LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
1642 LIBS="$LIBS $nsslibs"
1643 AC_TRY_LINK_FUNC(NSS_Init,
1644 [moz_nss_libs="yes"],
1645 [moz_nss_libs="no"])
1648 LDFLAGS=$LDFLAGS_save
1652 if test "x$moz_nss_libs" != "xno"; then
1656 NSS_LIBS="-L$with_nss_libs $nsslibs"
1658 if test "$enable_nss" = "static"; then
1659 msg_nss="Mozilla NSS (static)"
1661 msg_nss="Mozilla NSS"
1672 AC_MSG_CHECKING(for Mozilla nss libraries)
1676 NSS_CFLAGS="$NSPR_CFLAGS $NSS_CFLAGS"
1677 NSS_LIBS="$NSPR_LIBS $NSS_LIBS"
1680 AC_SUBST(NSS_CFLAGS)
1684 AM_CONDITIONAL(USE_NSS, test "x$enable_nss" = "xyes")
1686 if test "x$msg_nss" != "x" -a "x$msg_gnutls" != "x"; then
1687 msg_ssl="$msg_nss and $msg_gnutls"
1688 elif test "x$msg_nss" != "x"; then
1690 elif test "x$msg_gnutls" != "x"; then
1694 dnl #######################################################################
1696 dnl #######################################################################
1697 AC_ARG_ENABLE(tcl, [AC_HELP_STRING([--disable-tcl],
1698 [compile without Tcl scripting])], enable_tcl="$enableval", enable_tcl="yes")
1699 AC_ARG_WITH(tclconfig, [AC_HELP_STRING([--with-tclconfig=DIR],
1700 [directory containing tclConfig.sh])])
1702 if test "$enable_plugins" = no; then
1706 if test "$enable_tcl" = yes; then
1707 AC_MSG_CHECKING([for tclConfig.sh])
1709 TCLCONFIGDIRS="/usr/lib \
1714 /System/Library/Tcl/8.3 \
1716 for dir in $with_tclconfig $TCLCONFIGDIRS; do
1717 if test -f $dir/tclConfig.sh; then
1718 TCLCONFIG=$dir/tclConfig.sh
1719 AC_MSG_RESULT([yes ($TCLCONFIG)])
1722 if test "$TCLCONFIG" = "no"; then
1727 AC_MSG_CHECKING([Tcl version compatability])
1728 if test "$TCL_MAJOR_VERSION" -ne 8 -o "$TCL_MINOR_VERSION" -lt 3; then
1729 AC_MSG_RESULT([bad, $TCL_VERSION found but 8.3 or later required])
1732 AC_MSG_RESULT([ok, $TCL_VERSION])
1733 eval "TCL_LIB_SPEC=\"$TCL_LIB_SPEC\""
1734 AC_MSG_CHECKING([for Tcl linkability])
1735 oldCPPFLAGS=$CPPFLAGS
1736 CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
1738 LIBS="$LIBS $TCL_LIB_SPEC"
1739 AC_TRY_LINK([#include <tcl.h>],
1740 [Tcl_Interp *interp=NULL; Tcl_Init(interp)],
1741 [AC_MSG_RESULT([yes]);enable_tcl=yes],
1742 [AC_MSG_RESULT([no]);enable_tcl=no])
1743 CPPFLAGS="$oldCPPFLAGS"
1749 if test "$enable_tcl" = yes; then
1750 AM_CONDITIONAL(USE_TCL, true)
1751 TCL_LIBS=$TCL_LIB_SPEC
1752 AC_DEFINE(HAVE_TCL, [1], [Compile with support for the Tcl toolkit])
1754 TCL_CFLAGS="$TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
1755 if test "x$GCC" = "xyes"; then
1756 TCL_CFLAGS="$TCL_CFLAGS -fno-strict-aliasing"
1758 AC_SUBST(TCL_CFLAGS)
1760 AM_CONDITIONAL(USE_TCL, false)
1763 dnl #######################################################################
1765 dnl #######################################################################
1766 AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk],
1767 [compile without Tcl support for Tk])], enable_tk="$enableval", enable_tk="yes")
1768 AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR],
1769 [directory containing tkConfig.sh])])
1771 if test "$enable_tcl" = yes -a "$enable_tk" = yes; then
1772 AC_MSG_CHECKING([for tkConfig.sh])
1774 TKCONFIGDIRS="/usr/lib \
1780 for dir in $with_tkconfig $TKCONFIGDIRS; do
1781 if test -f $dir/tkConfig.sh; then
1782 TKCONFIG=$dir/tkConfig.sh
1783 AC_MSG_RESULT([yes ($TKCONFIG)])
1786 if test "$TKCONFIG" = "no"; then
1791 eval "TK_LIB_SPEC=\"$TK_LIB_SPEC\""
1792 AC_MSG_CHECKING([for Tk linkability])
1793 oldCPPFLAGS=$CPPFLAGS
1794 CPPFLAGS="$CPPFLAGS $TCL_CFLAGS"
1796 LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC"
1797 AC_TRY_LINK([#include <tk.h>],
1798 [Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);],
1799 [AC_MSG_RESULT([yes]);enable_tk=yes],
1800 [AC_MSG_RESULT([no]);enable_tk=no])
1801 CPPFLAGS="$oldCPPFLAGS"
1808 if test "$enable_tk" = yes; then
1809 AM_CONDITIONAL(USE_TK, true)
1810 AC_DEFINE(HAVE_TK, [1], [Compile with support for the Tk toolkit])
1811 TK_LIBS=$TK_LIB_SPEC
1814 AM_CONDITIONAL(USE_TK, false)
1817 if test "$ac_cv_cygwin" = yes ; then
1818 LDADD="$LDADD -static"
1819 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
1822 AC_SUBST(DEBUG_CFLAGS)
1826 if test "x$enable_plugins" = "xyes" ; then
1827 AC_DEFINE(PURPLE_PLUGINS, 1, [Define if plugins are enabled.])
1828 AM_CONDITIONAL(PLUGINS, true)
1830 AM_CONDITIONAL(PLUGINS, false)
1833 dnl #######################################################################
1834 dnl # Check for Cyrus-SASL (for Jabber)
1835 dnl #######################################################################
1836 dnl AC_CHECK_SIZEOF(short)
1837 AC_CHECK_FUNCS(snprintf connect)
1839 AC_ARG_ENABLE(cyrus-sasl, AC_HELP_STRING([--enable-cyrus-sasl], [enable Cyrus SASL support for jabberd]), enable_cyrus_sasl=$enableval, enable_cyrus_sasl=no)
1840 if test "x$enable_cyrus_sasl" = "xyes" ; then
1841 AC_CHECK_LIB(sasl2, sasl_client_init, [
1842 AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present])
1845 AC_ERROR(Cyrus SASL library not found)
1849 dnl #######################################################################
1850 dnl # Check for Kerberos (for Zephyr)
1851 dnl #######################################################################
1852 AC_DEFINE(ZEPHYR_INT32, long, [Size of an int32.])
1853 AC_SUBST(KRB4_CFLAGS)
1854 AC_SUBST(KRB4_LDFLAGS)
1856 if test "$kerberos" != "no" ; then
1857 if test "$kerberos" != "yes" ; then
1858 KRB4_CFLAGS="-I${kerberos}/include"
1859 if test -d "$kerberos/include/kerberosIV" ; then
1860 KRB4_CFLAGS="$KRB4_CFLAGS -I${kerberos}/include/kerberosIV"
1862 KRB4_LDFLAGS="-L${kerberos}/lib"
1863 elif test -d /usr/local/include/kerberosIV ; then
1864 KRB4_CFLAGS="-I/usr/local/include/kerberosIV"
1865 elif test -d /usr/include/kerberosIV ; then
1866 KRB4_CFLAGS="-I/usr/include/kerberosIV"
1868 AC_DEFINE(ZEPHYR_USES_KERBEROS, 1, [Define if kerberos should be used in Zephyr.])
1870 orig_LDFLAGS="$LDFLAGS"
1871 LDFLAGS="$LDFLAGS $KRB4_LDFLAGS"
1872 AC_CHECK_LIB(krb4, krb_rd_req,
1873 [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
1874 [AC_CHECK_LIB(krb, krb_rd_req,
1875 [KRB4_LIBS="-lkrb -ldes"],
1876 [AC_ERROR(Kerberos 4 libraries not found)],
1878 -ldes425 -lkrb5 -lk5crypto -lcom_err)
1880 LIBS="$LIBS $KRB4_LIBS"
1881 AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm)
1882 AC_CHECK_FUNCS(krb_get_err_text krb_log)
1884 LDFLAGS="$orig_LDFLAGS"
1887 dnl #######################################################################
1888 dnl # Check for external libzephyr
1889 dnl #######################################################################
1890 AC_SUBST(ZEPHYR_CFLAGS)
1891 AC_SUBST(ZEPHYR_LDFLAGS)
1892 AC_SUBST(ZEPHYR_LIBS)
1893 if test "$zephyr" != "no" ; then
1894 if test "$zephyr" != "yes" ; then
1895 ZEPHYR_CFLAGS="-I${zephyr}/include"
1896 ZEPHYR_LDFLAGS="-L${zephyr}/lib"
1897 elif test -d /usr/athena/include/zephyr ; then
1898 ZEPHYR_CFLAGS="-I/usr/athena/include"
1899 elif test -d /usr/include/zephyr ; then
1900 ZEPHYR_CFLAGS="-I/usr/include"
1901 elif test -d /usr/local/include/zephyr ; then
1902 ZEPHYR_CFLAGS="-I/usr/local/include"
1904 AC_DEFINE(LIBZEPHYR_EXT, 1 , [Define if external libzephyr should be used.])
1905 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
1906 orig_LDFLAGS="$LDFLAGS"
1907 LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS"
1908 AC_CHECK_LIB(zephyr, ZInitialize,
1909 [ZEPHYR_LIBS="-lzephyr"],
1910 [AC_ERROR(Zephyr libraries not found)],
1914 LDFLAGS="$orig_LDFLAGS"
1917 AC_MSG_CHECKING(for me pot o' gold)
1919 AC_CHECK_FUNCS(gethostid lrand48)
1920 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
1921 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
1922 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
1923 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
1924 AC_CHECK_HEADERS(termios.h)
1925 AC_VAR_TIMEZONE_EXTERNALS
1927 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
1933 ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
1934 if test $ac_cv_struct_tm_gmtoff = yes; then
1935 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
1938 dnl #######################################################################
1939 dnl # Check for check
1940 dnl #######################################################################
1941 PKG_CHECK_MODULES(CHECK,[check >= 0.9.4],:,[
1942 ifdef([AM_PATH_CHECK],
1943 [AM_PATH_CHECK(0.8.2,:,:)],
1944 [AC_MSG_RESULT([no, testing is disabled])])
1946 AM_CONDITIONAL(HAVE_CHECK, [test "x$CHECK_LIBS" != "x"])
1947 AC_SUBST(CHECK_CFLAGS)
1948 AC_SUBST(CHECK_LIBS)
1950 dnl #######################################################################
1951 dnl # Check for Doxygen and dot (part of GraphViz)
1952 dnl #######################################################################
1953 AC_ARG_ENABLE(doxygen,
1954 [AC_HELP_STRING([--disable-doxygen],
1955 [enable documentation with doxygen])],
1956 enable_doxygen="$enableval", enable_doxygen="yes")
1958 [AC_HELP_STRING([--enable-dot],
1959 [enable graphs in doxygen via 'dot'])],
1960 enable_dot="$enableval", enable_dot="yes")
1962 if test "x$enable_doxygen" = xyes; then
1963 AC_CHECK_PROG(DOXYGEN, doxygen, true, false)
1964 if test $DOXYGEN = false; then
1965 AC_MSG_WARN([*** Doxygen not found, docs will not be available])
1968 AC_DEFINE_UNQUOTED(HAVE_DOXYGEN, 1, [whether or not we have doxygen])
1970 if test "x$enable_dot" = "xyes"; then
1971 AC_CHECK_PROG(DOT, dot, true, false)
1973 if test $DOT = false; then
1975 AC_MSG_WARN([*** GraphViz dot not found, docs will not have graphs])
1977 AC_DEFINE_UNQUOTED(HAVE_DOT, 1, [whether or not we have dot])
1985 AC_SUBST(enable_doxygen)
1986 AC_SUBST(enable_dot)
1987 AM_CONDITIONAL(HAVE_DOXYGEN, test "x$enable_doxygen" = "xyes")
1989 AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],
1990 [compile with debugging support])], , enable_debug=no)
1991 if test "x$enable_debug" = "xyes" ; then
1992 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
1995 AC_ARG_ENABLE(fatal-asserts, [AC_HELP_STRING([--enable-fatal-asserts],
1996 [make assertions fatal (useful for debugging)])], , enable_fatal_asserts=no)
1997 if test "x$enable_fatal_asserts" = "xyes" ; then
1998 AC_DEFINE(PURPLE_FATAL_ASSERTS, 1, [Define to make assertions fatal (useful for debugging).])
2010 pidgin/pidgin-uninstalled.pc
2011 pidgin/pixmaps/Makefile
2012 pidgin/pixmaps/animations/Makefile
2013 pidgin/pixmaps/animations/16/Makefile
2014 pidgin/pixmaps/buddy_icons/Makefile
2015 pidgin/pixmaps/buddy_icons/qq/Makefile
2016 pidgin/pixmaps/dialogs/Makefile
2017 pidgin/pixmaps/dialogs/16/Makefile
2018 pidgin/pixmaps/dialogs/16/scalable/Makefile
2019 pidgin/pixmaps/dialogs/64/Makefile
2020 pidgin/pixmaps/dialogs/64/scalable/Makefile
2021 pidgin/pixmaps/emblems/Makefile
2022 pidgin/pixmaps/emblems/16/Makefile
2023 pidgin/pixmaps/emblems/16/scalable/Makefile
2024 pidgin/pixmaps/emotes/Makefile
2025 pidgin/pixmaps/emotes/default/Makefile
2026 pidgin/pixmaps/emotes/default/22/Makefile
2027 pidgin/pixmaps/emotes/default/22/scalable/Makefile
2028 pidgin/pixmaps/emotes/none/Makefile
2029 pidgin/pixmaps/icons/Makefile
2030 pidgin/pixmaps/icons/16/Makefile
2031 pidgin/pixmaps/icons/16/scalable/Makefile
2032 pidgin/pixmaps/icons/24/Makefile
2033 pidgin/pixmaps/icons/24/scalable/Makefile
2034 pidgin/pixmaps/icons/32/Makefile
2035 pidgin/pixmaps/icons/32/scalable/Makefile
2036 pidgin/pixmaps/icons/48/Makefile
2037 pidgin/pixmaps/icons/48/scalable/Makefile
2038 pidgin/pixmaps/protocols/Makefile
2039 pidgin/pixmaps/protocols/16/Makefile
2040 pidgin/pixmaps/protocols/16/scalable/Makefile
2041 pidgin/pixmaps/protocols/22/Makefile
2042 pidgin/pixmaps/protocols/22/scalable/Makefile
2043 pidgin/pixmaps/protocols/48/Makefile
2044 pidgin/pixmaps/protocols/48/scalable/Makefile
2045 pidgin/pixmaps/status/Makefile
2046 pidgin/pixmaps/status/16/Makefile
2047 pidgin/pixmaps/status/16/rtl/Makefile
2048 pidgin/pixmaps/status/16/scalable/Makefile
2049 pidgin/pixmaps/status/22/Makefile
2050 pidgin/pixmaps/status/22/rtl/Makefile
2051 pidgin/pixmaps/status/22/scalable/Makefile
2052 pidgin/pixmaps/status/32/Makefile
2053 pidgin/pixmaps/status/32/rtl/Makefile
2054 pidgin/pixmaps/status/32/scalable/Makefile
2055 pidgin/pixmaps/status/48/Makefile
2056 pidgin/pixmaps/status/48/rtl/Makefile
2057 pidgin/pixmaps/toolbar/Makefile
2058 pidgin/pixmaps/toolbar/16/Makefile
2059 pidgin/pixmaps/toolbar/16/scalable/Makefile
2060 pidgin/pixmaps/toolbar/22/Makefile
2061 pidgin/pixmaps/toolbar/22/scalable/Makefile
2062 pidgin/pixmaps/tray/Makefile
2063 pidgin/pixmaps/tray/16/Makefile
2064 pidgin/pixmaps/tray/22/Makefile
2065 pidgin/plugins/Makefile
2066 pidgin/plugins/cap/Makefile
2067 pidgin/plugins/gestures/Makefile
2068 pidgin/plugins/gevolution/Makefile
2069 pidgin/plugins/musicmessaging/Makefile
2070 pidgin/plugins/perl/Makefile
2071 pidgin/plugins/perl/common/Makefile.PL
2072 pidgin/plugins/ticker/Makefile
2073 pidgin/sounds/Makefile
2074 libpurple/example/Makefile
2075 libpurple/gconf/Makefile
2077 libpurple/purple-uninstalled.pc
2078 libpurple/plugins/Makefile
2079 libpurple/plugins/mono/Makefile
2080 libpurple/plugins/mono/api/Makefile
2081 libpurple/plugins/mono/loader/Makefile
2082 libpurple/plugins/perl/Makefile
2083 libpurple/plugins/perl/common/Makefile.PL
2084 libpurple/plugins/ssl/Makefile
2085 libpurple/plugins/tcl/Makefile
2087 libpurple/protocols/Makefile
2088 libpurple/protocols/bonjour/Makefile
2089 libpurple/protocols/gg/Makefile
2090 libpurple/protocols/irc/Makefile
2091 libpurple/protocols/jabber/Makefile
2092 libpurple/protocols/msn/Makefile
2093 libpurple/protocols/novell/Makefile
2094 libpurple/protocols/oscar/Makefile
2095 libpurple/protocols/qq/Makefile
2096 libpurple/protocols/sametime/Makefile
2097 libpurple/protocols/silc/Makefile
2098 libpurple/protocols/simple/Makefile
2099 libpurple/protocols/toc/Makefile
2100 libpurple/protocols/yahoo/Makefile
2101 libpurple/protocols/zephyr/Makefile
2102 libpurple/tests/Makefile
2105 finch/libgnt/Makefile
2107 finch/libgnt/wms/Makefile
2108 finch/plugins/Makefile
2114 echo $PACKAGE $VERSION
2117 echo Build GTK+ 2.x UI............. : $enable_gtkui
2118 echo Build console UI.............. : $enable_consoleui
2120 echo Protocols to build dynamically : $DYNAMIC_PRPLS
2121 echo Protocols to link statically.. : $STATIC_PRPLS
2123 echo Build with GStreamer support.. : $enable_gst
2124 echo Build with D-Bus support...... : $enable_dbus
2125 if test "x$enable_dbus" = "xyes" ; then
2126 eval eval echo D-Bus services directory...... : $DBUS_SERVICES_DIR
2128 echo Build with NetworkManager..... : $enable_libnm
2129 echo SSL Library/Libraries......... : $msg_ssl
2130 echo Build with Cyrus SASL support. : $enable_cyrus_sasl
2131 echo Use kerberos 4 with zephyr.... : $kerberos
2132 echo Use external libzephyr........ : $zephyr
2133 echo Has you....................... : yes
2135 echo Use XScreenSaver Extension.... : $enable_screensaver
2136 echo Use X Session Management...... : $enable_sm
2137 echo Use startup notification...... : $enable_startup_notification
2138 echo Build with GtkSpell support... : $enable_gtkspell
2140 echo Build with plugin support..... : $enable_plugins
2141 echo Build with Mono support....... : $enable_mono
2142 echo Build with Perl support....... : $enable_perl
2143 echo Build with Tcl support........ : $enable_tcl
2144 echo Build with Tk support......... : $enable_tk
2146 echo Print debugging messages...... : $enable_debug
2147 echo Assertions are fatal.......... : $enable_fatal_asserts
2149 eval eval echo Pidgin will be installed in $bindir.
2150 if test "x$pidginpath" != "x" ; then
2151 echo Warning: You have an old copy of Pidgin at $pidginpath.
2154 echo configure complete, now type \'make\'