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], [7])
47 m4_define([purple_major_version], [2])
48 m4_define([purple_minor_version], [7])
49 m4_define([purple_micro_version], [0])
50 m4_define([purple_version_suffix], [])
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], [7])
56 m4_define([gnt_major_version], [2])
57 m4_define([gnt_minor_version], [7])
58 m4_define([gnt_micro_version], [0])
59 m4_define([gnt_version_suffix], [])
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])
67 if test `pwd | wc -w` -ne 1; then
69 You are attempting to build in a path that contains spaces. This
70 will fail. Relocate this source tree to a path that does not contain
71 spaces and run configure again.
76 AC_CONFIG_HEADERS([config.h])
77 AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2])
79 PURPLE_MAJOR_VERSION=purple_major_version
80 PURPLE_MINOR_VERSION=purple_minor_version
81 PURPLE_MICRO_VERSION=purple_micro_version
82 PURPLE_VERSION=[purple_display_version]
83 AC_SUBST(PURPLE_MAJOR_VERSION)
84 AC_SUBST(PURPLE_MINOR_VERSION)
85 AC_SUBST(PURPLE_MICRO_VERSION)
86 AC_SUBST(PURPLE_VERSION)
88 PURPLE_LT_VERSION_INFO="purple_lt_current:purple_micro_version:purple_minor_version"
89 AC_SUBST(PURPLE_LT_VERSION_INFO)
91 GNT_MAJOR_VERSION=gnt_major_version
92 GNT_MINOR_VERSION=gnt_minor_version
93 GNT_MICRO_VERSION=gnt_micro_version
94 GNT_VERSION=[gnt_display_version]
95 AC_SUBST(GNT_MAJOR_VERSION)
96 AC_SUBST(GNT_MINOR_VERSION)
97 AC_SUBST(GNT_MICRO_VERSION)
100 GNT_LT_VERSION_INFO="gnt_lt_current:gnt_micro_version:gnt_minor_version"
101 AC_SUBST(GNT_LT_VERSION_INFO)
103 AC_PATH_PROG(sedpath, sed)
105 dnl Storing configure arguments
106 AC_DEFINE_UNQUOTED(CONFIG_ARGS, "$ac_configure_args", [configure arguments])
108 dnl Checks for programs.
113 LIBTOOL="$LIBTOOL --silent"
118 dnl Checks for header files.
121 AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h)
123 dnl Checks for typedefs, structures, and compiler characteristics.
126 AC_CHECK_SIZEOF(time_t, ,[
132 dnl Checks for library functions.
135 AC_CHECK_FUNCS(strdup strstr atexit setlocale)
136 dnl Checks for getopt in standard library
137 AC_CHECK_FUNCS(getopt_long,,
143 dnl Check for inet_aton
144 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
145 [AC_MSG_ERROR([inet_aton not found])])])
146 AC_CHECK_LIB(resolv, __res_query)
147 AC_CHECK_LIB(nsl, gethostent)
148 AC_CHECK_FUNC(socket, ,
149 [AC_CHECK_LIB(socket, socket, , [AC_MSG_ERROR([socket not found])])])
150 dnl If all goes well, by this point the previous two checks will have
151 dnl pulled in -lsocket and -lnsl if we need them.
152 AC_CHECK_FUNC(getaddrinfo,
153 [AC_DEFINE([HAVE_GETADDRINFO], [1],
154 [Define to 1 if you have the getaddrinfo function.])],
155 [AC_CHECK_LIB(socket, getaddrinfo,
156 [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)])
157 AC_CHECK_FUNCS(inet_ntop)
158 AC_CHECK_FUNCS(getifaddrs)
159 dnl Check for socklen_t (in Unix98)
160 AC_MSG_CHECKING(for socklen_t)
161 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
162 #include <sys/types.h>
163 #include <sys/socket.h>
168 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
169 #include <sys/types.h>
170 #include <sys/socket.h>
171 int accept(int, struct sockaddr *, size_t *);
173 AC_MSG_RESULT(size_t)
174 AC_DEFINE(socklen_t, size_t, [socklen_t size])
177 AC_DEFINE(socklen_t, int, [socklen_t size])
181 dnl Some systems do not have sa_len field for struct sockaddr.
182 AC_CHECK_MEMBER([struct sockaddr.sa_len],
183 [AC_DEFINE([HAVE_STRUCT_SOCKADDR_SA_LEN],[1],
184 [Define if struct sockaddr has an sa_len member])],[:],
185 [#include <sys/socket.h>])
187 dnl Check for v6-only sockets
188 AC_CHECK_DECL([IPV6_V6ONLY],
189 [AC_DEFINE([HAVE_IPV6_V6ONLY],[1],
190 [Define if the IPV6_V6ONLY setsockopt option exists])],
191 [], [#include <netinet/in.h>])
193 dnl to prevent the g_stat()/g_unlink() crash,
194 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
197 dnl FreeBSD doesn't have libdl, dlopen is provided by libc
198 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
200 AC_MSG_CHECKING(for fileno())
201 AC_RUN_IFELSE([AC_LANG_SOURCE([[
204 int main(int argc, char *argv[])
214 AC_DEFINE([HAVE_FILENO], [1],
215 [Define to 1 if your stdio has int fileno(FILE *).])
219 # Fallback for Cross Compiling...
220 # This will enable the compatibility code.
224 AC_MSG_CHECKING(for the %z format string in strftime())
225 AC_RUN_IFELSE([AC_LANG_SOURCE([[
226 #ifdef HAVE_SYS_TIME_H
227 #include <sys/time.h>
235 time_t t = time(NULL);
237 if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5)
240 fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf);
242 return !((buf[0] == '-' || buf[0] == '+') &&
243 (buf[1] >= '0' && buf[1] <= '9') &&
244 (buf[2] >= '0' && buf[2] <= '9') &&
245 (buf[3] >= '0' && buf[3] <= '9') &&
246 (buf[4] >= '0' && buf[4] <= '9')
251 AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
252 [Define to 1 if you have a strftime() that supports the %z format string.])
256 # Fallback for Cross Compiling...
257 # This will enable the compatibility code.
261 dnl #######################################################################
262 dnl # Disable creation and installation of translation files
263 dnl #######################################################################
264 AC_ARG_ENABLE(nls, AC_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes)
266 if test x$enable_i18n = xyes; then
268 GETTEXT_PACKAGE=pidgin
269 AC_SUBST(GETTEXT_PACKAGE)
272 # before gettexting, in case iconv matters
275 AC_CHECK_LIB(resolv, res_query)
277 AC_CHECK_HEADER(CoreFoundation/CoreFoundation.h, [
278 AC_CHECK_HEADER(IOKit/IOKitLib.h, [
279 AC_DEFINE(HAVE_IOKIT, 1, [Define if we have IOKit])
280 LIBS="$LIBS -framework IOKit -framework CoreFoundation"
284 AC_MSG_CHECKING([for fink])
286 AC_MSG_RESULT([found, adding /sw to search paths])
287 CPPFLAGS="$CPPFLAGS -I/sw/include"
288 LDFLAGS="$LDFLAGS -L/sw/lib"
290 AC_MSG_RESULT([not found])
297 ALL_LINGUAS="af am ar az be@latin bg bn bn_IN bs ca ca@valencia cs da de dz el en_AU en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hu hy id it ja ka km kn ko ku lo lt mk mn mr ms_MY my_MM nb ne nl nn oc or pa pl pt_BR pt ps ro ru si sk sl sq sr sr@latin sv sw ta te th tr uk ur vi xh zh_CN zh_HK zh_TW"
300 dnl If we don't have msgfmt, then po/ is going to fail -- ensure that
301 dnl AM_GLIB_GNU_GETTEXT found it.
303 if test x$MSGFMT = xno -o x$MSGFMT$GMSGFMT$INTLTOOL_MSGFMT = x
307 The msgfmt command is required to build libpurple. If it is installed
308 on your system, ensure that it is in your path. If it is not, install
309 GNU gettext to continue.
311 If you have msgfmt installed, but for some reason this error message
312 is still displayed, you have encountered what appears to be a bug in
313 third-party configure macros. Try setting the MSGFMT environment
314 variable to the absolute path to your msgfmt binary and trying
315 configure again, like this:
317 MSGFMT=/path/to/msgfmt ./configure ...
322 dnl #######################################################################
323 dnl # Check for GLib 2.12 (required)
324 dnl #######################################################################
325 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.12.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [
329 You must have GLib 2.12.0 or newer development headers installed to build.
331 If you have these installed already you may need to install pkg-config so
334 AC_SUBST(GLIB_CFLAGS)
337 GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
338 AC_SUBST(GLIB_GENMARSHAL)
340 AC_ARG_WITH([extraversion],
341 AC_HELP_STRING([--with-extraversion=STRING],
342 [extra version number to be displayed in Help->About and --help (for packagers)]),
343 EXTRA_VERSION=$withval)
345 if test x"$EXTRA_VERSION" != "x" ; then
346 AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION-$EXTRA_VERSION", [display version info])
348 AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION", [display version info])
351 AC_ARG_ENABLE(missing-dependencies, [AC_HELP_STRING([--disable-missing-dependencies],
352 [skip missing dependencies instead of aborting configure])],
353 force_deps="$enableval", force_deps="yes")
356 with_x="$withval", with_x="yes")
357 AC_ARG_ENABLE(gtkui, [AC_HELP_STRING([--disable-gtkui],
358 [compile without GTK+ user interface])],
359 enable_gtkui="$enableval", enable_gtkui="yes")
360 AC_ARG_ENABLE(consoleui, [AC_HELP_STRING([--disable-consoleui],
361 [compile without console user interface])],
362 [enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no])
364 dnl #######################################################################
365 dnl # Check for GTK+ 2.10 and other things used by the GTK UI
366 dnl #######################################################################
367 AC_ARG_ENABLE(screensaver,
368 [AC_HELP_STRING([--disable-screensaver],
369 [compile without X screensaver extension (used to detect idleness)])],
370 enable_screensaver="$enableval", enable_screensaver="yes")
372 [AC_HELP_STRING([--disable-sm],
373 [compile without X session management support])],
374 enable_sm="$enableval", enable_sm="yes")
375 AC_ARG_ENABLE(startup-notification,
376 [AC_HELP_STRING([--disable-startup-notification],
377 [compile without startup notification support])],
378 enable_startup_notification="$enableval", enable_startup_notification="yes")
379 AC_ARG_ENABLE(gtkspell,
380 [AC_HELP_STRING([--disable-gtkspell],
381 [compile without GtkSpell automatic spell checking])],
382 enable_gtkspell="$enableval", enable_gtkspell="yes")
383 AC_ARG_ENABLE(gevolution,
384 [AC_HELP_STRING([--enable-gevolution],
385 [compile with the Evolution plugin])],
386 enable_gevolution="$enableval", enable_gevolution="no")
388 [AC_HELP_STRING([--enable-cap],
389 [compile with Contact Availability Prediction plugin])],
390 enable_cap="$enableval", enable_cap="no")
391 AC_ARG_ENABLE(gestures,
392 [AC_HELP_STRING([--disable-gestures],
393 [compile without the gestures plugin])],
394 enable_gestures="$enableval", enable_gestures="yes")
397 # We can't assume that $x_libraries will be set, because autoconf does not
398 # set it in the case when the X libraries are in a standard place.
399 # Ditto for $x_includes
400 if test X"$x_libraries" = X"" || test X"$x_libraries" = XNONE; then
403 x_libpath_add="-L$x_libraries"
405 if test X"$x_includes" = X"" || test X"$x_includes" = XNONE; then
408 x_incpath_add="-I$x_includes"
411 if test "x$enable_gtkui" = "xyes" ; then
412 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0], , [
416 You must have GTK+ 2.10.0 or newer development headers installed to compile
417 Pidgin. If you want to build only Finch then specify --disable-gtkui when
424 dnl We only really need Pango >= 1.4 for decent RTL support
425 PKG_CHECK_MODULES(PANGO, [pango >= 1.4.0],
426 AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:)
428 dnl #######################################################################
429 dnl # Check if we should compile with X support
430 dnl #######################################################################
431 if test "x$with_x" = "xyes" ; then
432 PKG_CHECK_MODULES(X11, x11,
433 [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])],
435 if test "x$x_incpath_add" != "x" -a "x$x_libpath_add" != "x"; then
436 X11_LIBS="$x_libpath_add"
437 X11_CFLAGS="$x_incpath_add"
440 if test "x$force_deps" = "xyes" ; then
442 X11 development headers not found.
443 Use --without-x if you do not need X11 support.
451 enable_screensaver=no
456 dnl #######################################################################
457 dnl # Check for XScreenSaver
458 dnl #######################################################################
459 if test "x$enable_screensaver" = "xyes" ; then
460 if test "x$with_x" = "xyes" ; then
462 LIBS="$LIBS $GTK_LIBS $x_libpath_add"
465 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm])
466 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm])
467 if test "x$XSS_LIBS" != "x"; then
468 oldCPPFLAGS="$CPPFLAGS"
469 CPPFLAGS="$CPPFLAGS $x_incpath_add"
470 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
471 #include <X11/Xlib.h>
472 #include <X11/extensions/scrnsaver.h>
473 ]], [[]])], [], [enable_screensaver=no])
474 CPPFLAGS="$oldCPPFLAGS"
476 enable_screensaver=no
480 if test "x$enable_screensaver" = "xyes" ; then
481 AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])
484 if test "x$force_deps" = "xyes" ; then
486 XScreenSaver extension development headers not found.
487 Use --disable-screensaver if you do not need XScreenSaver extension support,
488 this is required for detecting idle time by mouse and keyboard usage.
493 AC_MSG_ERROR([X support is required to build with XScreenSaver extensions])
497 dnl #######################################################################
498 dnl # Check for X session management libs
499 dnl #######################################################################
500 if test "x$enable_sm" = "xyes"; then
501 if test "x$with_x" = "xyes" ; then
503 AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE])
504 if test "x$found_sm_lib" = "xtrue"; then
505 oldCPPFLAGS="$CPPFLAGS"
506 CPPFLAGS="$CPPFLAGS $x_incpath_add"
507 AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes)
508 CPPFLAGS="$oldCPPFLAGS"
511 if test "x$enable_sm" = "xyes"; then
512 AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.])
515 if test "x$force_deps" = "xyes" ; then
517 X session management development headers not found.
518 Use --disable-sm if you do not need session management support.
523 AC_MSG_ERROR([X support is required to build with X session management support])
527 dnl #######################################################################
528 dnl # Check for X11 to allow the gestures plugin
529 dnl #######################################################################
530 if test "x$enable_gestures" = "xyes"; then
531 if test "x$with_x" = "xno" ; then
536 dnl #######################################################################
537 dnl # Check for startup notification
538 dnl #######################################################################
539 if test "x$enable_startup_notification" = "xyes"; then
540 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, [libstartup-notification-1.0 >= 0.5], , [
542 enable_startup_notification="no"
543 if test "x$force_deps" = "xyes" ; then
545 Startup notification development headers not found.
546 Use --disable-startup-notification if you do not need it.
550 if test "x$enable_startup_notification" = "xyes"; then
551 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
552 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
553 AC_SUBST(STARTUP_NOTIFICATION_LIBS)
557 dnl #######################################################################
558 dnl # Check for GtkSpell
559 dnl #######################################################################
560 if test "x$enable_gtkspell" = "xyes" ; then
561 PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , [
564 if test "x$force_deps" = "xyes" ; then
566 GtkSpell development headers not found.
567 Use --disable-gtkspell if you do not need it.
570 if test "x$enable_gtkspell" = "xyes" ; then
571 AC_DEFINE(USE_GTKSPELL, 1, [Define if we're using GtkSpell])
572 AC_SUBST(GTKSPELL_CFLAGS)
573 AC_SUBST(GTKSPELL_LIBS)
577 dnl #######################################################################
578 dnl # Check for stuff needed by the Evolution integration plugin.
579 dnl #######################################################################
580 if test "x$enable_gevolution" = "xyes"; then
581 evo_deps="libebook-1.2 libedata-book-1.2"
582 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, , [
584 enable_gevolution="no"
586 if test "x$enable_gevolution" = "xno"; then
587 evo_deps="libebook-1.0 libedata-book-1.0"
588 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [
589 enable_gevolution="yes"
594 if test "x$enable_gevolution" = "xyes"; then
595 AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.])
596 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
597 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
599 if test "x$force_deps" = "xyes" ; then
601 Evolution development headers not found.
602 Use --disable-gevolution if you do not need it.
608 dnl #######################################################################
609 dnl # Check for libsqlite3 (for the Contact Availability Prediction plugin)
610 dnl #######################################################################
611 if test "x$enable_cap" = "xyes"; then
612 PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[
615 if test "x$force_deps" = "xyes" ; then
617 sqlite3 development headers not found.
618 Use --disable-cap if you do not need the Contact Availability Prediction plugin.
628 enable_screensaver=no
630 enable_startup_notification=no
633 AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtkui" = "xyes")
634 AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$enable_gevolution" = "xyes")
635 AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes")
636 AM_CONDITIONAL(ENABLE_GESTURES, test "x$enable_gestures" = "xyes")
639 dnl #######################################################################
640 dnl # Check for ncurses and other things used by the console UI
641 dnl #######################################################################
644 AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR],
645 [compile finch against the ncurses includes in DIR])],
646 [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""])
647 if test "x$enable_consoleui" = "xyes"; then
648 AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no])
649 AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"],
650 [enable_consoleui=no], [$GNT_LIBS])
652 if test "x$enable_consoleui" = "xyes"; then
653 dnl # Some distros put the headers in ncursesw/, some don't
655 for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include
657 f="$location/ncurses.h"
659 AC_MSG_CHECKING([if $f supports wide characters])
660 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
661 #define _XOPEN_SOURCE_EXTENDED
665 # error get_wch not found!
669 if test x"$dir" != x"." ; then
684 if test x"$found_ncurses_h" = x"no" ; then
690 # ncursesw was not found. Look for plain old ncurses
692 AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no])
693 AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"],
694 [enable_consoleui=no], [$GNT_LIBS])
695 AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.])
696 if test x"$ac_ncurses_includes" != "x"; then
697 GNT_CFLAGS="-I$ac_ncurses_includes"
699 if test x"$NCURSES_HEADERS" != "x"; then
700 GNT_CFLAGS="-I$NCURSES_HEADERS"
706 if test "x$force_finch" = "xyes" -a "x$enable_consoleui" != "xyes"; then
709 Finch will not be built. You need to install ncursesw (or ncurses) and its development headers.
716 AM_CONDITIONAL(ENABLE_GNT, test "x$enable_consoleui" = "xyes")
718 #AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])])
720 dnl #######################################################################
721 dnl # Check for LibXML2 (required)
722 dnl #######################################################################
723 PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= 2.6.0], , [
726 You must have libxml2 >= 2.6.0 development headers installed to build.
728 PKG_CHECK_EXISTS([libxml-2.0 >= 2.6.18], , [
730 Versions of libxml2 < 2.6.18 may contain bugs that could cause XMPP messages to be discarded.
733 AC_SUBST(LIBXML_CFLAGS)
734 AC_SUBST(LIBXML_LIBS)
736 dnl #######################################################################
738 dnl #######################################################################
739 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
740 AM_CONDITIONAL(USE_GCONFTOOL, test "x$GCONFTOOL" != "xno")
743 dnl #######################################################################
744 dnl # Check for GStreamer
745 dnl #######################################################################
747 dnl TODO: Depend on gstreamer >= 0.10.10, and remove the conditional use of
748 dnl gst_registry_fork_set_enabled.
749 AC_ARG_ENABLE(gstreamer,
750 [AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
751 enable_gst="$enableval", enable_gst="yes")
752 if test "x$enable_gst" != "xno"; then
753 PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], [
754 AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
755 AC_SUBST(GSTREAMER_CFLAGS)
756 AC_SUBST(GSTREAMER_LIBS)
757 AC_CHECK_LIB(gstreamer-0.10, gst_registry_fork_set_enabled,
758 [ AC_DEFINE(GST_CAN_DISABLE_FORKING, [],
759 [Define if gst_registry_fork_set_enabled exists])],
760 [], [$GSTREAMER_LIBS])
764 if test "x$force_deps" = "xyes" ; then
766 GStreamer development headers not found.
767 Use --disable-gstreamer if you do not need GStreamer (sound) support.
772 dnl #######################################################################
773 dnl # Check for GStreamer Interfaces
774 dnl #######################################################################
775 if test "x$enable_gst" != "xno"; then
776 AC_ARG_ENABLE(gstreamer-interfaces,
777 [AC_HELP_STRING([--disable-gstreamer-interfaces], [compile without GStreamer interface support])],
778 enable_gstinterfaces="$enableval", enable_gstinterfaces="yes")
779 if test "x$enable_gstinterfaces" != "xno"; then
780 PKG_CHECK_MODULES(GSTINTERFACES, [gstreamer-interfaces-0.10], [
781 AC_DEFINE(USE_GSTINTERFACES, 1, [Use GStreamer interfaces for X overlay support])
782 AC_SUBST(GSTINTERFACES_CFLAGS)
783 AC_SUBST(GSTINTERFACES_LIBS)
785 enable_gstinterfaces="no"
789 enable_gstinterfaces="no"
792 dnl #######################################################################
793 dnl # Check for Farsight
794 dnl #######################################################################
795 AC_ARG_ENABLE(farsight,
796 [AC_HELP_STRING([--disable-farsight], [compile without farsight support])],
797 enable_farsight="$enableval", enable_farsight="yes")
798 if test "x$enable_farsight" != "xno"; then
799 PKG_CHECK_MODULES(FARSIGHT, [farsight2-0.10 >= 0.0.9], [
800 AC_DEFINE(USE_FARSIGHT, 1, [Use Farsight for voice and video])
801 AC_SUBST(FARSIGHT_CFLAGS)
802 AC_SUBST(FARSIGHT_LIBS)
808 dnl #######################################################################
809 dnl # Check for Voice and Video support
810 dnl #######################################################################
812 [AC_HELP_STRING([--disable-vv], [compile without voice and video support])],
813 enable_vv="$enableval", enable_vv="yes")
814 if test "x$enable_vv" != "xno"; then
815 if test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farsight" != "xno"; then
816 AC_DEFINE(USE_VV, 1, [Use voice and video])
819 if test "x$force_deps" = "xyes"; then
821 Dependencies for voice/video were not met.
822 Install the necessary gstreamer and farsight packages first.
823 Or use --disable-vv if you do not need voice/video support.
828 AM_CONDITIONAL(USE_VV, test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farsight" != "xno")
830 dnl #######################################################################
831 dnl # Check for Internationalized Domain Name support
832 dnl #######################################################################
835 [AC_HELP_STRING([--disable-idn], [compile without IDN support])],
836 [enable_idn="$enableval" force_idn=$enableval], [enable_idn="yes" force_idn=no])
837 if test "x$enable_idn" != "xno"; then
838 PKG_CHECK_MODULES(IDN, libidn >= 0.0.0, [
839 AC_DEFINE(USE_IDN, 1, [Use GNU Libidn for stringprep and IDN])
845 if test "x$force_deps" = "xyes" ; then
847 GNU Libidn development headers not found.
848 Use --disable-idn if you do not need it.
854 dnl #######################################################################
855 dnl # Check for Meanwhile headers (for Sametime)
856 dnl #######################################################################
857 AC_ARG_ENABLE(meanwhile,
858 [AC_HELP_STRING([--disable-meanwhile],
859 [compile without meanwhile (required for Sametime support)])],
860 enable_meanwhile="$enableval", enable_meanwhile="yes")
861 if test "x$enable_meanwhile" = "xyes"; then
862 PKG_CHECK_MODULES(MEANWHILE, [meanwhile >= 1.0.0 meanwhile < 2.0.0], [
866 if test "x$force_deps" = "xyes" ; then
868 Meanwhile development headers not found.
869 Use --disable-meanwhile if you do not need meanwhile (Sametime) support.
873 AC_SUBST(MEANWHILE_CFLAGS)
874 AC_SUBST(MEANWHILE_LIBS)
876 dnl #######################################################################
877 dnl # Check for Native Avahi headers (for Bonjour)
878 dnl #######################################################################
880 [AC_HELP_STRING([--disable-avahi],
881 [compile without avahi (required for Bonjour support)])],
882 enable_avahi="$enableval", enable_avahi="yes")
884 if test "x$enable_avahi" = "xyes"; then
885 AC_ARG_WITH(avahi-client-includes, [AC_HELP_STRING([--with-avahi-client-includes=DIR], [compile the Bonjour plugin against the Avahi Client includes in DIR])], [ac_avahi_client_includes="$withval"], [ac_avahi_client_includes="no"])
886 AC_ARG_WITH(avahi-client-libs, [AC_HELP_STRING([--with-avahi-client-libs=DIR], [compile the Bonjour plugin against the Avahi Client libs in DIR])], [ac_avahi_client_libs="$withval"], [ac_avahi_client_libs="no"])
890 dnl Attempt to autodetect Avahi
891 PKG_CHECK_MODULES(AVAHI, [avahi-client avahi-glib], [
899 dnl Override AVAHI_CFLAGS if the user specified an include dir
900 if test "$ac_avahi_client_includes" != "no"; then
901 AVAHI_CFLAGS="-I$ac_avahi_client_includes"
903 CPPFLAGS_save="$CPPFLAGS"
904 CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS"
905 AC_CHECK_HEADER(avahi-client/client.h, [avahiincludes=yes], [avahiincludes=no])
906 CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS $GLIB_CFLAGS"
907 AC_CHECK_HEADER(avahi-glib/glib-malloc.h, [avahiincludes=yes], [avahiincludes=no])
908 CPPFLAGS="$CPPFLAGS_save"
910 dnl Override AVAHI_LIBS if the user specified a libs dir
911 if test "$ac_avahi_client_libs" != "no"; then
912 AVAHI_LIBS="-L$ac_avahi_client_libs -lavahi-common -lavahi-client -lavahi-glib "
914 AC_CHECK_LIB(avahi-client, avahi_client_new, [avahilibs=yes], [avahilibs=no], $AVAHI_LIBS)
917 if test "x$enable_avahi" = "xyes" -a \( "x$avahiincludes" = "xno" -o "x$avahilibs" = "xno" \); then
919 if test "x$force_deps" = "xyes"; then
921 avahi development headers not found.
922 Use --disable-avahi if you do not need avahi (Bonjour) support.
926 AC_SUBST(AVAHI_CFLAGS)
930 dnl #######################################################################
931 dnl # Check for SILC client includes and libraries
932 dnl #######################################################################
933 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"])
934 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"])
938 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
939 silc_manual_check="yes"
941 silc_manual_check="no"
943 if test "x$silc_manual_check" = "xno"; then
944 PKG_CHECK_MODULES(SILC, [silcclient >= 1.1], [
951 if test "x$have_silc" = "xno"; then
952 PKG_CHECK_MODULES(SILC, silcclient, [
959 dnl If silcclient.pc wasn't found, check for just silc.pc
960 if test "x$have_silc" = "xno"; then
961 PKG_CHECK_MODULES(SILC, silc, [
971 if test "$ac_silc_includes" != "no"; then
972 SILC_CFLAGS="-I$ac_silc_includes"
974 CPPFLAGS_save="$CPPFLAGS"
975 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
976 AC_CHECK_HEADER(silc.h, [silcincludes=yes])
977 CPPFLAGS="$CPPFLAGS_save"
979 if test "$ac_silc_libs" != "no"; then
980 SILC_LIBS="-L$ac_silc_libs"
982 SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
983 AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS)
985 if test "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes"; then
988 CPPFLAGS_save="$CPPFLAGS"
989 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
990 AC_CHECK_HEADER(silcincludes.h, [silc10includes=yes])
991 CPPFLAGS="$CPPFLAGS_save"
993 SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
994 AC_CHECK_LIB(silcclient, silc_client_init, [silc10client=yes], , $SILC_LIBS)
995 if test "x$silc10includes" = "xyes" -a "x$silc10client" = "xyes"; then
1001 AC_SUBST(SILC_CFLAGS)
1002 dnl SILC Toolkit >= 1.0.1 has a new MIME API
1003 if test "x$silcclient" = "xyes"; then
1004 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
1005 elif test "x$silc10client" = "xyes"; then
1006 CPPFLAGS_save="$CPPFLAGS"
1007 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
1008 AC_MSG_CHECKING(for silcmime.h)
1009 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1010 #include <silcincludes.h>
1011 #include <silcmime.h>
1014 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
1018 CPPFLAGS="$CPPFLAGS_save"
1021 dnl #######################################################################
1022 dnl # Check for Gadu-Gadu client includes and libraries
1023 dnl #######################################################################
1024 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"])
1025 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"])
1028 if test -n "$with_gadu_includes" || test -n "$with_gadu_libs"; then
1029 gadu_manual_check="yes"
1031 gadu_manual_check="no"
1033 if test "x$gadu_manual_check" = "xno"; then
1034 PKG_CHECK_MODULES(GADU, [libgadu >= 1.9.0-rc2], [
1041 if test "$ac_gadu_includes" != "no"; then
1042 GADU_CFLAGS="-I$ac_gadu_includes"
1044 CPPFLAGS_save="$CPPFLAGS"
1045 CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
1046 AC_CHECK_HEADER(libgadu.h, [gadu_includes=yes])
1047 CPPFLAGS="$CPPFLAGS_save"
1049 if test "$ac_gadu_libs" != "no"; then
1050 GADU_LIBS="-L$ac_gadu_libs"
1052 GADU_LIBS="$GADU_LIBS -lgadu"
1053 AC_CHECK_LIB(gadu, gg_libgadu_version, [gadu_libs=yes], , $GADU_LIBS)
1055 GADU_CFLAGS=`echo $GADU_CFLAGS |$sedpath 's/-Wall//'`
1057 if test "x$gadu_libs" = "xyes"; then
1058 AC_MSG_CHECKING(for libgadu GPL compatibility)
1059 CPPFLAGS_save="$CPPFLAGS"
1060 CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
1061 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
1062 #if defined(__GG_LIBGADU_HAVE_OPENSSL) || defined(GG_CONFIG_HAVE_OPENSSL)
1063 #error "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1066 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
1067 #if GG_DEFAULT_PROTOCOL_VERSION < 0x2e
1068 #error "Your libgadu version is too old. libpurple requires 1.9.0-rc2 or higher."
1072 AC_DEFINE([HAVE_LIBGADU], [1],
1073 [Define to 1 if you have libgadu.])
1078 echo "Your supplied copy of libgadu is too old."
1079 echo "Install version 1.9.0-rc2 or newer."
1080 echo "Then rerun this ./configure"
1082 echo "Falling back to using our own copy of libgadu"
1092 echo "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1093 echo "To compile against system libgadu, please recompile libgadu using:"
1094 echo "./autogen.sh --disable-libgadu-openssl --disable-static --enable-shared"
1095 echo "Then rerun this ./configure"
1097 echo "Falling back to using our own copy of libgadu"
1103 CPPFLAGS="$CPPFLAGS_save"
1106 AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes")
1108 if test "x$gadu_libs" = "x"; then
1113 AC_SUBST(GADU_CFLAGS)
1115 AC_ARG_ENABLE(distrib,,,enable_distrib=no)
1116 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
1118 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=""])
1119 if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then
1123 if test "x$STATIC_PRPLS" = "xall" ; then
1124 STATIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar qq sametime silc simple yahoo zephyr"
1126 if test "x$have_meanwhile" != "xyes" ; then
1127 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'`
1129 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1130 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'`
1132 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1133 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc/silc10/'`
1135 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1136 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc10//'`
1138 AC_SUBST(STATIC_PRPLS)
1142 for i in $STATIC_PRPLS ; do
1143 dnl Ugly special case for "libsilcpurple.la":
1144 dnl ... and Ugly special case for multi-protocol oscar and yahoo
1145 if test \( "x$i" = "xoscar" -o "x$i" = "xaim" -o "x$i" = "xicq" \) -a "x$static_oscar" != "xyes"; then
1146 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/oscar/liboscar.la"
1147 extern_init="$extern_init extern gboolean purple_init_aim_plugin();"
1148 extern_init="$extern_init extern gboolean purple_init_icq_plugin();"
1149 load_proto="$load_proto purple_init_aim_plugin();"
1150 load_proto="$load_proto purple_init_icq_plugin();"
1151 elif test "x$i" = "xyahoo"; then
1152 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/yahoo/libymsg.la"
1153 extern_init="$extern_init extern gboolean purple_init_yahoo_plugin();"
1154 extern_init="$extern_init extern gboolean purple_init_yahoojp_plugin();"
1155 load_proto="$load_proto purple_init_yahoo_plugin();"
1156 load_proto="$load_proto purple_init_yahoojp_plugin();"
1158 if test "x$i" = "xsilc"; then
1159 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.la"
1160 elif test "x$i" = "xsilc10"; then
1161 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libsilcpurple.la"
1163 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.la"
1165 extern_init="$extern_init extern gboolean purple_init_${i}_plugin();"
1166 load_proto="$load_proto purple_init_${i}_plugin();"
1169 bonjour) static_bonjour=yes ;;
1170 gg) static_gg=yes ;;
1171 irc) static_irc=yes ;;
1172 jabber) static_jabber=yes ;;
1173 msn) static_msn=yes ;;
1174 myspace) static_myspace=yes ;;
1175 mxit) static_mxit=yes ;;
1176 novell) static_novell=yes ;;
1177 oscar) static_oscar=yes ;;
1178 aim) static_oscar=yes ;;
1179 icq) static_oscar=yes ;;
1180 qq) static_qq=yes ;;
1181 sametime) static_sametime=yes ;;
1182 silc) static_silc=yes ;;
1183 silc10) static_silc=yes ;;
1184 simple) static_simple=yes ;;
1185 yahoo) static_yahoo=yes ;;
1186 zephyr) static_zephyr=yes ;;
1187 *) echo "Invalid static protocol $i!!" ; exit ;;
1190 AM_CONDITIONAL(STATIC_BONJOUR, test "x$static_bonjour" = "xyes")
1191 AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes")
1192 AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes")
1193 AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes")
1194 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes")
1195 AM_CONDITIONAL(STATIC_MYSPACE, test "x$static_myspace" = "xyes")
1196 AM_CONDITIONAL(STATIC_MXIT, test "x$static_mxit" = "xyes")
1197 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes")
1198 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes")
1199 AM_CONDITIONAL(STATIC_QQ, test "x$static_qq" = "xyes")
1200 AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_meanwhile" = "xyes")
1201 AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$have_silc" = "xyes")
1202 AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes")
1203 AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes")
1204 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes")
1205 AC_SUBST(STATIC_LINK_LIBS)
1206 AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init static void static_proto_init(void) { $load_proto },
1207 [Loads static protocol plugin module initialization functions.])
1209 AC_ARG_WITH(dynamic_prpls, [AC_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`])
1210 if test "x$DYNAMIC_PRPLS" = "xall" ; then
1211 DYNAMIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar qq sametime silc simple yahoo zephyr"
1213 if test "x$have_meanwhile" != "xyes"; then
1214 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'`
1216 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1217 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
1219 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1220 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc/silc10/'`
1222 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1223 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc10//'`
1225 AC_SUBST(DYNAMIC_PRPLS)
1226 for i in $DYNAMIC_PRPLS ; do
1228 bonjour) dynamic_bonjour=yes ;;
1229 gg) dynamic_gg=yes ;;
1230 irc) dynamic_irc=yes ;;
1231 jabber) dynamic_jabber=yes ;;
1232 msn) dynamic_msn=yes ;;
1233 myspace) dynamic_myspace=yes ;;
1234 mxit) dynamic_mxit=yes ;;
1235 novell) dynamic_novell=yes ;;
1236 null) dynamic_null=yes ;;
1237 oscar) dynamic_oscar=yes ;;
1238 aim) dynamic_oscar=yes ;;
1239 icq) dynamic_oscar=yes ;;
1240 qq) dynamic_qq=yes ;;
1241 sametime) dynamic_sametime=yes ;;
1242 silc) dynamic_silc=yes ;;
1243 silc10) dynamic_silc=yes ;;
1244 simple) dynamic_simple=yes ;;
1245 yahoo) dynamic_yahoo=yes ;;
1246 zephyr) dynamic_zephyr=yes ;;
1247 *) echo "Invalid dynamic protocol $i!!" ; exit ;;
1251 AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes)
1252 AC_ARG_WITH(krb4, [AC_HELP_STRING([--with-krb4=PREFIX], [compile Zephyr plugin with Kerberos 4 support])], kerberos="$withval", kerberos="no")
1253 AC_ARG_WITH(zephyr, [AC_HELP_STRING([--with-zephyr=PREFIX], [compile Zephyr plugin against external libzephyr])], zephyr="$withval", zephyr="no")
1254 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
1256 AC_CHECK_HEADERS(sys/utsname.h)
1257 AC_CHECK_FUNC(uname)
1259 AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes)
1261 DEBUG_CFLAGS="$DEBUG_CFLAGS -DPURPLE_DISABLE_DEPRECATED -DPIDGIN_DISABLE_DEPRECATED -DFINCH_DISABLE_DEPRECATED -DGNT_DISABLE_DEPRECATED"
1262 if test "x$GCC" = "xyes"; then
1263 dnl We enable -Wall later.
1264 dnl If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
1265 dnl This leads to warnings we don't want.
1266 CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
1268 dnl ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE
1270 dnl Future Possibilities
1272 dnl Consider adding -Wbad-function-cast.
1273 dnl This leads to spurious warnings using GPOINTER_TO_INT(), et al. directly on a function call.
1274 dnl We'd need an intermediate variable.
1276 dnl Consider adding -Wfloat-equal.
1277 dnl This leads to warnings with Perl.
1278 dnl Perhaps we could write ugly configure magic and pass -Wno-float-equal down to that subdirectory.
1279 dnl On the other hand, it's probably actually broken, so maybe the Perl folks should fix that?
1281 dnl Consider removing -Wno-sign-compare (from the -Wextra set) and fixing all those cases.
1282 dnl This is likely non-trivial.
1285 "-Waggregate-return" \
1287 "-Wdeclaration-after-statement" \
1289 "-Werror-implicit-function-declaration" \
1290 "-Wextra -Wno-sign-compare -Wno-unused-parameter" \
1291 "-Wformat-security" \
1292 "-Werror=format-security" \
1294 "-Wmissing-declarations" \
1295 "-Wmissing-noreturn" \
1296 "-Wmissing-prototypes" \
1300 orig_CFLAGS="$CFLAGS"
1301 CFLAGS="$CFLAGS $newflag"
1302 AC_MSG_CHECKING(for $newflag option to gcc)
1303 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
1304 int main() {return 0;}
1307 CFLAGS="$orig_CFLAGS"
1308 DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
1311 CFLAGS="$orig_CFLAGS"
1315 if test "x$enable_fortify" = "xyes"; then
1316 AC_MSG_CHECKING(for FORTIFY_SOURCE support)
1317 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <features.h>]], [[
1319 #if !(__GNUC_PREREQ (4, 1) \
1320 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
1321 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
1322 && __GNUC_MINOR__ == 4 \
1323 && (__GNUC_PATCHLEVEL__ > 2 \
1324 || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
1325 #error No FORTIFY_SOURCE support
1331 DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2"
1337 DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
1342 AC_PATH_PROG(pidginpath, pidgin)
1344 dnl #######################################################################
1345 dnl # Check for D-Bus libraries
1346 dnl #######################################################################
1348 AC_ARG_ENABLE(dbus, [AC_HELP_STRING([--disable-dbus], [disable D-Bus support])], , enable_dbus=yes)
1349 AC_ARG_ENABLE(nm, [AC_HELP_STRING([--disable-nm], [disable NetworkManager support (requires D-Bus)])], enable_nm=$enableval, enable_nm=yes)
1351 if test "x$enable_dbus" = "xyes" ; then
1352 AC_CHECK_PROG(enable_dbus, dbus-binding-tool, yes, no)
1355 if test "x$enable_dbus" = "xyes" ; then
1356 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60 dbus-glib-1 >= 0.60], [
1357 AC_SUBST(DBUS_CFLAGS)
1362 if test "x$force_deps" = "xyes" ; then
1364 D-Bus development headers not found.
1365 Use --disable-dbus if you do not need D-Bus support.
1370 dnl Check for NetworkManager.h; if we don't have it, oh well
1371 if test "x$enable_dbus" = "xyes" ; then
1372 if test "x$enable_nm" = "xyes" ; then
1373 PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [
1374 AC_SUBST(NETWORKMANAGER_CFLAGS)
1375 AC_SUBST(NETWORKMANAGER_LIBS)
1376 AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.])
1379 if test "x$force_deps" = "xyes" ; then
1381 NetworkManager development headers not found.
1382 Use --disable-nm if you do not need NetworkManager support.
1390 dnl #######################################################################
1391 dnl # Check for Python
1392 dnl #######################################################################
1394 dnl Python scripts are used to auto-generate about 3000 lines of C
1395 dnl and XML code that wraps (part of) the existing API so that
1396 dnl it is now accessible through D-Bus.
1398 dnl Python is only required if --enable-dbus is used, and only for
1399 dnl the build process to generate the code, not for running pidgin.
1400 dnl This autogenerated code is system-independent, so in principle we
1401 dnl can generate all of it before shipping. But I thought adding
1402 dnl auto-generated stuff to the repository is inelegant.
1403 dnl Alternatively, these python scripts could be rewritten
1404 dnl in C (brrrr ...).
1406 AC_ARG_WITH([python],
1407 AC_HELP_STRING([--with-python=PATH],
1408 [which python interpreter to use for dbus code generation]),
1411 if test "x$enable_dbus" = "xyes" || test "x$enable_consoleui" = "xyes" ; then
1412 if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then
1413 AC_PATH_PROG([PYTHON], [python], [no])
1416 if test x"$PYTHON" = x"no" ; then
1417 AC_MSG_WARN([python interpreter not found in your path])
1421 if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then
1422 AC_MSG_WARN([python version >= 2.4 required])
1427 dnl ###########################################################################
1428 dnl # Find the D-Bus services dir.
1430 dnl # This is a 3 step process that
1432 dnl # 1. checks if --with-dbus-services was set, if so use that.
1433 dnl # 2. checks if --prefix was given, if so use that.
1434 dnl # 3. fallbacks to installing into what should be the correct system
1437 dnl # This is still prone to error if one of the legacy directories exist
1438 dnl # although a newer dbus is installed. But I have tried to order the
1439 dnl # directory searching to keep this situation at a minimum.
1440 dnl ###########################################################################
1441 AC_ARG_WITH(dbus-services, [AC_HELP_STRING([--with-dbus-services=<dir>], [where the D-Bus services directory is located.])])
1443 DBUS_SERVICES_DIR=""
1445 if test x"$enable_dbus" = "xyes" ; then
1446 AC_MSG_CHECKING([location of the D-Bus services directory])
1447 if ! test -z "$with_dbus_services" ; then
1448 if ! test -d "$with_dbus_services" ; then
1449 AC_MSG_ERROR([$with_dbus_services does not exist, if this is the correct location please make sure that it exists.])
1452 DBUS_SERVICES_DIR="$with_dbus_services"
1454 if test x"$prefix" = x"NONE" ; then
1455 dnl # no prefix given, so we look for the correct dbus system paths.
1456 dnl # if a prefix is given, we use it.
1458 serviceprefixes="$prefix/share $prefix/lib /usr/share /usr/local/share"
1459 DBUS_SERVICES_DIR=""
1461 for d in $serviceprefixes ; do
1462 dir="$d/dbus-1/services"
1463 if test -d $dir ; then
1464 DBUS_SERVICES_DIR="$dir"
1469 if test -z $DBUS_SERVICES_DIR ; then
1470 AC_MSG_ERROR([D-Bus services directory was not found! Please use --with-dbus-services and specify its location.])
1473 DBUS_SERVICES_DIR="$datadir/dbus-1/services"
1476 AC_MSG_RESULT([$DBUS_SERVICES_DIR])
1477 AC_DEFINE(HAVE_DBUS, 1, [Define if we are using D-Bus.])
1479 AC_SUBST(DBUS_SERVICES_DIR)
1481 if test "x$enable_dbus" = "xyes" ; then
1482 echo "Building with D-Bus support"
1484 echo "Building without D-Bus support"
1487 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
1489 dnl Check for Python headers (currently useful only for libgnt)
1490 dnl (Thanks to XChat)
1491 if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ; then
1492 AC_MSG_CHECKING(for Python compile flags)
1493 PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
1494 PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'`
1495 changequote(<<, >>)dnl
1496 PY_VERSION=`$PYTHON -c 'import sys ; print sys.version[0:3]'`
1497 PY_MAJOR=`$PYTHON -c 'import sys ; print sys.version[0:2]'`
1498 changequote([, ])dnl
1499 if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then
1501 AC_CHECK_LIB(pthread, pthread_create, )
1502 AC_CHECK_LIB(util, openpty, )
1503 AC_CHECK_LIB(db, dbopen, )
1504 PY_LIBS="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config -lpython$PY_VERSION"
1505 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
1506 AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.])
1507 dnl Because the above AC_CHECK_LIB get in the way...
1508 AC_MSG_CHECKING(for Python compile flags)
1511 AC_MSG_RESULT([Can't find Python.h])
1519 dnl #######################################################################
1520 dnl # Check for Mono support
1521 dnl #######################################################################
1522 AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support (experimental)])], , enable_mono=no)
1523 if test x"$enable_mono" = x"yes" ; then
1524 PKG_CHECK_MODULES(MONO, mono, [
1525 AC_SUBST(MONO_CFLAGS)
1531 Mono development headers not found.
1532 Use --disable-mono if you do not need Mono support.
1535 if test x"$enable_mono" = x"yes"; then
1537 LIBS="$LIBS $MONO_LIBS"
1538 AC_MSG_CHECKING(for libmono)
1539 AC_CHECK_FUNCS(mono_jit_init, [], enable_mono=no)
1542 oldCPPFLAGS="$CPPFLAGS"
1543 CPPFLAGS="$CPPFLAGS $MONO_CFLAGS"
1544 AC_CHECK_HEADERS(mono/jit/jit.h, [], enable_mono=no)
1545 AC_CHECK_HEADERS(mono/metadata/object.h, [], enable_mono=no)
1546 CPPFLAGS="$oldCPPFLAGS"
1548 AC_DEFINE(ENABLE_MONO, 1, [Define if mono enabled.])
1556 AC_SUBST(MONO_CFLAGS)
1558 AM_CONDITIONAL(USE_MONO, test x"$enable_mono" = x"yes")
1560 dnl #######################################################################
1561 dnl # Check for Perl support
1562 dnl #######################################################################
1563 AC_ARG_ENABLE(perl, [AC_HELP_STRING([--disable-perl], [compile without perl scripting])], , enable_perl=yes)
1565 if test "$enable_plugins" = no ; then
1568 looked_for_perl="no"
1569 if test "$enable_perl" = yes ; then
1570 looked_for_perl="yes"
1571 AC_PATH_PROG(perlpath, perl)
1572 AC_MSG_CHECKING(for Perl compile flags)
1573 PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
1574 if test "_$PERL_CFLAGS" = _ ; then
1575 AC_MSG_RESULT([not found, building without perl.])
1578 PERL_LIBS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null |$sedpath 's/-lgdbm //'`
1579 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-ldb //'`
1580 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lndbm //'`
1581 if test "$system" = "Linux"; then
1582 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lnsl //'`
1583 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lposix //'`
1585 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lc //'`
1589 LIBS="$LIBS $PERL_LIBS"
1590 AC_MSG_CHECKING(for libperl)
1591 AC_CHECK_FUNCS(perl_run, [], enable_perl=no)
1594 oldCPPFLAGS="$CPPFLAGS"
1595 CPPFLAGS="$CPPFLAGS $PERL_CFLAGS"
1596 AC_CHECK_HEADERS(EXTERN.h)
1597 AC_CHECK_HEADERS(perl.h, [], enable_perl=no,
1599 # include <EXTERN.h>
1601 CPPFLAGS="$oldCPPFLAGS"
1605 if test "$enable_perl" = yes ; then
1606 AC_PROG_PERL_MODULES(ExtUtils::MakeMaker, , have_makemaker=no)
1608 if test "x$have_makemaker" = "xno"; then
1612 AM_CONDITIONAL(USE_PERL, false)
1613 AC_MSG_WARN(Compiling perl requires ExtUtils::MakeMaker)
1615 AC_DEFINE(HAVE_PERL, [1], [Compile with support for perl])
1616 AC_SUBST(PERL_CFLAGS)
1618 AM_CONDITIONAL(USE_PERL, true)
1620 dnl This is almost definitely wrong, but in case there's
1621 dnl something I'm missing, I'll leave it in.
1622 AC_CHECK_FUNCS(Perl_eval_pv)
1624 AC_MSG_CHECKING(for old perl)
1625 PERL_OLD=`$perlpath -e 'if($]<5.006){printf"yes\n";}else{printf"no\n";}'`
1627 if test "x$PERL_OLD" = "xyes"; then
1628 AC_DEFINE(OLD_PERL, 1, [Define if old perl is installed.])
1634 AC_MSG_CHECKING(for DynaLoader.a)
1635 DYNALOADER_A=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*([[^ ]]*DynaLoader\.a).*/\2/'`
1637 dnl Don't check libperl.a if dynaloader.a wasn't found.
1638 if test -n "$DYNALOADER_A"; then
1641 dnl Find either libperl.a or libperl.so
1642 AC_MSG_CHECKING(for libperl.a or libperl.so)
1643 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 } } };'`
1644 if test -z "$LIBPERL_A"; then
1650 if test "$LIBPERL_A" = "-lperl"; then
1655 PERL_LIBS=`echo $PERL_LIBS | $perlpath -pe 's/^(.* )*[[^ ]]*DynaLoader\.a/\1libperl_dynaloader.la/'`
1657 if test -n "$LIBPERL_A"; then
1658 PERL_LIBS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lperl /libperl_orig.la /' -e 's/-lperl$/libperl_orig.la$/'`
1661 AC_SUBST(DYNALOADER_A)
1670 AM_CONDITIONAL(USE_PERL, false)
1673 if test "x$looked_for_perl" = "xyes" -a "x$enable_perl" = "xno" -a "x$force_deps" = "xyes"; then
1675 Perl development headers not found.
1676 Use --disable-perl if you do not need Perl scripting support.
1680 dnl #######################################################################
1683 dnl # Thanks go to Evolution for the checks.
1684 dnl #######################################################################
1686 AC_ARG_WITH(system-ssl-certs, [AC_HELP_STRING([--with-system-ssl-certs=<dir>], [directory containing system-wide SSL CA certificates])], [ssl_certificates_dir=$withval])
1688 SSL_CERTIFICATES_DIR=""
1689 if ! test -z "$ssl_certificates_dir" ; then
1690 if test "x$ssl_certificates_dir" = "xyes" ; then
1691 AC_MSG_ERROR([--with-system-ssl-certs requires that a location is specified, eg. --with-system-ssl-certs=/etc/pki/tls/certs])
1693 if ! test -d "$ssl_certificates_dir" ; then
1694 AC_MSG_ERROR([$ssl_certificates_dir does not exist, if this is the correct location please make sure that it exists.])
1696 SSL_CERTIFICATES_DIR="$ssl_certificates_dir"
1698 AC_SUBST(SSL_CERTIFICATES_DIR)
1699 AM_CONDITIONAL(INSTALL_SSL_CERTIFICATES, test "x$SSL_CERTIFICATES_DIR" = "x")
1701 dnl These two are inverses of each other <-- stolen from evolution!
1703 AC_ARG_ENABLE(gnutls,
1704 [ --enable-gnutls=[yes,no] attempt to use GnuTLS for SSL support [default=yes]],
1705 [enable_gnutls="$enableval"],
1706 [enable_gnutls="yes"])
1709 [ --enable-nss=[yes,no,static] attempt to use Mozilla libnss for SSL support [default=yes]],
1710 [enable_nss="$enableval"],
1713 msg_ssl="None. MSN, Yahoo!, Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!"
1714 looked_for_gnutls="no"
1716 dnl # Check for GnuTLS if it's specified.
1718 if test "x$enable_gnutls" != "xno"; then
1720 prefix=`eval echo $prefix`
1721 looked_for_gnutls="yes"
1723 AC_ARG_WITH(gnutls-includes,
1724 [ --with-gnutls-includes=PREFIX location of GnuTLS includes.],
1725 [ with_gnutls_includes="$withval" ],
1726 [ with_gnutls_includes="$prefix/include" ])
1728 have_gnutls_includes="no"
1730 if test "x$with_gnutls_includes" != "xno"; then
1731 CPPFLAGS_save="$CPPFLAGS"
1733 AC_MSG_CHECKING(for GnuTLS includes)
1736 CPPFLAGS="$CPPFLAGS -I$with_gnutls_includes"
1737 AC_CHECK_HEADERS(gnutls/gnutls.h, [ gnutls_includes="yes" ])
1738 CPPFLAGS="$CPPFLAGS_save"
1740 if test "x$gnutls_includes" != "xno" -a \
1741 "x$gnutls_includes" != "x"; then
1742 have_gnutls_includes="yes"
1744 if test "x$with_gnutls_includes" != "xNONE/include"; then
1745 GNUTLS_CFLAGS="-I$with_gnutls_includes"
1751 AC_MSG_CHECKING(for GnuTLS includes)
1755 AC_ARG_WITH(gnutls-libs,
1756 [AC_HELP_STRING([--with-gnutls-libs=PREFIX], [location of GnuTLS libraries.])],
1757 [ with_gnutls_libs="$withval" ])
1759 if test "x$with_gnutls_libs" != "xno" -a \
1760 "x$have_gnutls_includes" != "xno"; then
1764 case $with_gnutls_libs in
1766 *) with_gnutls_libs="-L$with_gnutls_libs" ;;
1769 AC_CACHE_CHECK([for GnuTLS libraries], ac_cv_gnutls_libs,
1771 LIBS="$LIBS $with_gnutls_libs -lgnutls -lgcrypt"
1772 AC_TRY_LINK_FUNC(gnutls_init, ac_cv_gnutls_libs="yes", ac_cv_gnutls_libs="no")
1776 if test "x$ac_cv_gnutls_libs" != "xno"; then
1777 AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GnuTLS])
1780 GNUTLS_LIBS="$with_gnutls_libs -lgnutls -lgcrypt"
1788 AC_MSG_CHECKING(for GnuTLS libraries)
1796 AC_SUBST(GNUTLS_CFLAGS)
1797 AC_SUBST(GNUTLS_LIBS)
1799 if test "x$enable_gnutls" = "xyes"; then
1800 AC_MSG_CHECKING(for gnutls_priority_set_direct and gnutls_priority_set)
1802 LIBS="$LIBS $GNUTLS_LIBS"
1803 CPPFLAGS_save="$CPPFLAGS"
1804 CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
1805 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
1806 [[gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL); gnutls_priority_set(s, NULL);]])],
1807 [AC_DEFINE([HAVE_GNUTLS_PRIORITY_FUNCS], 1,
1808 [Define if your gnutls has gnutls_priority_set_direct and friends])
1809 AC_MSG_RESULT(yes)],
1810 [AC_MSG_RESULT(no)])
1811 CPPFLAGS="$CPPFLAGS_save"
1815 if test "x$enable_gnutls" = "xyes"; then
1816 AC_MSG_CHECKING(for GNUTLS_CERT_INSECURE_ALGORITHM)
1818 LIBS="$LIBS $GNUTLS_LIBS"
1819 CPPFLAGS_save="$CPPFLAGS"
1820 CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
1821 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
1822 [[unsigned int verify = GNUTLS_CERT_INSECURE_ALGORITHM;]])],
1823 [AC_DEFINE([HAVE_GNUTLS_CERT_INSECURE_ALGORITHM], 1,
1824 [Define if your gnutls has the GNUTLS_CERT_INSECURE_ALGORITHM flag])
1825 AC_MSG_RESULT(yes)],
1826 [AC_MSG_RESULT(no)])
1827 CPPFLAGS="$CPPFLAGS_save"
1832 AM_CONDITIONAL(USE_GNUTLS, test "x$enable_gnutls" = "xyes")
1836 dnl # Check for NSS if it's specified, or if GnuTLS checks failed.
1839 if test "x$enable_nss" != "xno"; then
1840 looked_for_nss="yes"
1842 AC_ARG_WITH(nspr-includes,
1843 [AC_HELP_STRING([--with-nspr-includes=PREFIX], [specify location of Mozilla nspr4 includes.])],
1844 [with_nspr_includes="$withval"])
1846 AC_ARG_WITH(nspr-libs,
1847 [AC_HELP_STRING([--with-nspr-libs=PREFIX], [specify location of Mozilla nspr4 libs.])],
1848 [with_nspr_libs="$withval"])
1850 AC_ARG_WITH(nss-includes,
1851 [AC_HELP_STRING([--with-nss-includes=PREFIX], [specify location of Mozilla nss3 includes.])],
1852 [with_nss_includes="$withval"])
1854 AC_ARG_WITH(nss-libs,
1855 [AC_HELP_STRING([--with-nss-libs=PREFIX], [specify location of Mozilla nss3 libs.])],
1856 [with_nss_libs="$withval"])
1859 if test -n "$with_nspr_includes" || test -n "$with_nspr_libs" || \
1860 test -n "$with_nss_includes" || test -n "$with_nss_libs" ||
1861 test "x$enable_nss" = "xstatic"; then
1863 nss_manual_check="yes"
1865 nss_manual_check="no"
1870 if test "x$nss_manual_check" = "xno"; then
1871 if `$PKG_CONFIG --exists mozilla-nss`; then
1872 PKG_CHECK_MODULES(NSS, mozilla-nss, [
1878 mozilla_nspr="mozilla-nspr"
1879 mozilla_nss="mozilla-nss"
1880 elif `$PKG_CONFIG --exists nss`; then
1881 PKG_CHECK_MODULES(NSS, nss, [
1889 elif `$PKG_CONFIG --exists microb-engine-nss`; then
1890 PKG_CHECK_MODULES(NSS, microb-engine-nss, [
1896 mozilla_nspr="mozilla-nspr"
1897 mozilla_nss="microb-engine-nss"
1900 if test "x$have_nss" = "xyes"; then
1902 AC_DEFINE(HAVE_NSS, 1, [Define if you have Mozilla NSS])
1903 AC_DEFINE(HAVE_SSL, 1, [Define if you have SSL])
1905 msg_nss="Mozilla NSS"
1908 nss_manual_check="yes"
1912 if test "x$nss_manual_check" = "xyes"; then
1914 have_nspr_includes="no"
1916 if test "x$with_nspr_includes" != "xno"; then
1917 CPPFLAGS_save=$CPPFLAGS
1919 AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)
1922 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
1923 AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ])
1924 CPPFLAGS=$CPPFLAGS_save
1926 if test "x$moz_nspr_includes" != "xno" -a \
1927 "x$moz_nspr_includes" != "x"; then
1929 have_nspr_includes="yes"
1930 NSPR_CFLAGS="-I$with_nspr_includes"
1933 AC_MSG_CHECKING(for Mozilla nspr4 includes)
1941 if test "x$with_nspr_libs" != "xno" -a \
1942 "x$have_nspr_includes" != "xno"; then
1945 LDFLAGS_save=$LDFLAGS
1947 if test "$enable_nss" = "static"; then
1948 if test -z "$with_nspr_libs"; then
1950 [Static linkage requested, but path to nspr libraries not set.]
1951 [Please specify the path to libnspr4.a]
1952 [Example: --with-nspr-libs=/usr/lib])
1956 nsprlibs="$LIBDL $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB"
1959 nsprlibs="$LIBDL -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
1962 AC_CACHE_CHECK([for Mozilla nspr libraries], ac_cv_moz_nspr_libs,
1965 CFLAGS="$CFLAGS $NSPR_CFLAGS"
1969 if test "x$with_nspr_libs" != "x"; then
1970 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
1975 AC_TRY_LINK_FUNC(PR_Init,
1976 [ac_cv_moz_nspr_libs="yes"],
1977 [ac_cv_moz_nspr_libs="no"])
1980 LDFLAGS=$LDFLAGS_save
1984 if test "x$ac_cv_moz_nspr_libs" != "xno"; then
1985 have_nspr_libs="yes"
1986 NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
1992 AC_MSG_CHECKING(for Mozilla nspr4 libraries)
1996 have_nss_includes="no"
1998 if test "x$with_nss_includes" != "xno" -a \
1999 "x$have_nspr_libs" != "xno"; then
2001 CPPFLAGS_save=$CPPFLAGS
2003 AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)
2006 if test "x$with_nspr_includes" != "x"; then
2007 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
2009 CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
2012 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
2013 [moz_nss_includes="yes"],
2014 [moz_nss_includes="no"])
2016 CPPFLAGS=$CPPFLAGS_save
2018 if test "x$moz_nss_includes" = "xyes"; then
2019 have_nss_includes="yes"
2020 NSS_CFLAGS="-I$with_nss_includes"
2027 AC_MSG_CHECKING(for Mozilla nss3 includes)
2032 if test "x$with_nss_libs" != "xno" -a \
2033 "x$have_nss_includes" != "xno"; then
2035 LDFLAGS_save=$LDFLAGS
2037 if test "$enable_nss" = "static"; then
2038 if test -z "$with_nss_libs"; then
2040 [Static linkage requested, but path to nss libraries not set.]
2041 [Please specify the path to libnss3.a]
2042 [Example: --with-nspr-libs=/usr/lib/mozilla])
2045 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"
2049 nsslibs="$nsslibs $with_nss_libs/libfreeb1.a"
2054 nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
2057 AC_CACHE_CHECK([for Mozilla nss libraries], ac_cv_moz_nss_libs,
2060 LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
2061 LIBS="$nsslibs $nsprlibs"
2063 AC_TRY_LINK_FUNC(NSS_Init,
2064 [ac_cv_moz_nss_libs="yes"],
2065 [ac_cv_moz_nss_libs="no"])
2067 if test "x$ac_cv_moz_nss_libs" = "xno"; then
2068 nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
2069 LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
2070 LIBS="$LIBS $nsslibs"
2071 AC_TRY_LINK_FUNC(NSS_Init,
2072 [ac_cv_moz_nss_libs="yes"],
2073 [ac_cv_moz_nss_libs="no"])
2076 LDFLAGS=$LDFLAGS_save
2080 if test "x$ac_cv_moz_nss_libs" != "xno"; then
2084 NSS_LIBS="-L$with_nss_libs $nsslibs"
2086 if test "$enable_nss" = "static"; then
2087 msg_nss="Mozilla NSS (static)"
2089 msg_nss="Mozilla NSS"
2100 AC_MSG_CHECKING(for Mozilla nss libraries)
2104 NSS_CFLAGS="$NSPR_CFLAGS $NSS_CFLAGS"
2105 NSS_LIBS="$NSPR_LIBS $NSS_LIBS"
2108 AC_SUBST(NSS_CFLAGS)
2112 AM_CONDITIONAL(USE_NSS, test "x$enable_nss" = "xyes")
2114 if test "x$msg_nss" != "x" -a "x$msg_gnutls" != "x"; then
2115 msg_ssl="$msg_nss and $msg_gnutls"
2116 elif test "x$msg_nss" != "x"; then
2118 elif test "x$msg_gnutls" != "x"; then
2120 elif test "x$looked_for_gnutls" = "xyes" -a "x$looked_for_nss" = "xyes" -a "x$force_deps" = "xyes" ; then
2122 Neither GnuTLS or NSS SSL development headers found.
2123 Use --disable-nss --disable-gnutls if you do not need SSL support.
2124 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!
2126 elif test "x$looked_for_gnutls" = "xyes" -a "x$force_deps" = "xyes" ; then
2128 GnuTLS SSL development headers not found.
2129 Use --disable-gnutls if you do not need SSL support.
2130 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without SSL support.
2132 elif test "x$looked_for_nss" = "xyes" -a "x$force_deps" = "xyes" ; then
2134 NSS SSL development headers not found.
2135 Use --disable-nss if you do not need SSL support.
2136 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without SSL support.
2140 dnl #######################################################################
2142 dnl #######################################################################
2143 AC_ARG_ENABLE(tcl, [AC_HELP_STRING([--disable-tcl],
2144 [compile without Tcl scripting])], enable_tcl="$enableval", enable_tcl="yes")
2145 AC_ARG_WITH(tclconfig, [AC_HELP_STRING([--with-tclconfig=DIR],
2146 [directory containing tclConfig.sh])])
2148 if test "$enable_plugins" = no; then
2152 if test "$enable_tcl" = yes; then
2153 AC_MSG_CHECKING([for tclConfig.sh])
2155 TCLCONFIGDIRS="/usr/lib \
2163 /System/Library/Tcl/8.3 \
2165 for dir in $with_tclconfig $TCLCONFIGDIRS; do
2166 if test -f $dir/tclConfig.sh; then
2167 TCLCONFIG=$dir/tclConfig.sh
2168 AC_MSG_RESULT([yes ($TCLCONFIG)])
2172 if test "$TCLCONFIG" = "no"; then
2175 if test "x$force_deps" = "xyes" ; then
2177 Tcl development headers not found.
2178 Use --disable-tcl if you do not need Tcl scripting support.
2183 AC_MSG_CHECKING([Tcl version compatability])
2184 if test "$TCL_MAJOR_VERSION" -ne 8 -o "$TCL_MINOR_VERSION" -lt 3; then
2185 AC_MSG_RESULT([bad, $TCL_VERSION found but 8.3 or later required])
2188 AC_MSG_RESULT([ok, $TCL_VERSION])
2189 eval "TCL_LIB_SPEC=\"$TCL_LIB_SPEC\""
2190 AC_MSG_CHECKING([for Tcl linkability])
2191 oldCPPFLAGS=$CPPFLAGS
2192 CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
2194 LIBS="$LIBS $TCL_LIB_SPEC"
2195 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <tcl.h>]],
2196 [[Tcl_Interp *interp=NULL; Tcl_Init(interp)]])],
2197 [AC_MSG_RESULT([yes]);enable_tcl=yes],
2198 [AC_MSG_RESULT([no]);enable_tcl=no])
2199 CPPFLAGS="$oldCPPFLAGS"
2205 if test "$enable_tcl" = yes; then
2206 AM_CONDITIONAL(USE_TCL, true)
2207 TCL_LIBS=$TCL_LIB_SPEC
2208 AC_DEFINE(HAVE_TCL, [1], [Compile with support for the Tcl toolkit])
2210 TCL_CFLAGS="$TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
2211 if test "x$GCC" = "xyes"; then
2212 TCL_CFLAGS="$TCL_CFLAGS -fno-strict-aliasing"
2214 AC_SUBST(TCL_CFLAGS)
2216 AM_CONDITIONAL(USE_TCL, false)
2219 dnl #######################################################################
2221 dnl #######################################################################
2222 AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk],
2223 [compile without Tcl support for Tk])], enable_tk="$enableval", enable_tk="yes")
2224 AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR],
2225 [directory containing tkConfig.sh])])
2227 if test "$enable_tcl" = yes -a "$enable_tk" = yes; then
2228 AC_MSG_CHECKING([for tkConfig.sh])
2230 TKCONFIGDIRS="/usr/lib \
2236 for dir in $with_tkconfig $TKCONFIGDIRS; do
2237 if test -f $dir/tkConfig.sh; then
2238 TKCONFIG=$dir/tkConfig.sh
2239 AC_MSG_RESULT([yes ($TKCONFIG)])
2243 if test "$TKCONFIG" = "no"; then
2246 if test "x$force_deps" = "xyes" ; then
2248 Tk development headers not found.
2249 Use --disable-tk if you do not need Tk scripting support.
2254 eval "TK_LIB_SPEC=\"$TK_LIB_SPEC\""
2255 AC_MSG_CHECKING([for Tk linkability])
2256 oldCPPFLAGS=$CPPFLAGS
2257 CPPFLAGS="$CPPFLAGS $TCL_CFLAGS"
2259 LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC"
2260 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <tk.h>]],
2261 [[Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);]])],
2262 [AC_MSG_RESULT([yes]);enable_tk=yes],
2263 [AC_MSG_RESULT([no]);enable_tk=no])
2264 CPPFLAGS="$oldCPPFLAGS"
2271 if test "$enable_tk" = yes; then
2272 AM_CONDITIONAL(USE_TK, true)
2273 AC_DEFINE(HAVE_TK, [1], [Compile with support for the Tk toolkit])
2274 TK_LIBS=$TK_LIB_SPEC
2277 AM_CONDITIONAL(USE_TK, false)
2280 if test "$ac_cv_cygwin" = yes ; then
2281 LDADD="$LDADD -static"
2282 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2285 AC_SUBST(DEBUG_CFLAGS)
2289 if test "x$enable_plugins" = "xyes" ; then
2290 AC_DEFINE(PURPLE_PLUGINS, 1, [Define if plugins are enabled.])
2291 AM_CONDITIONAL(PLUGINS, true)
2292 PLUGINS_DEFINE="#define PURPLE_PLUGINS 1"
2294 AM_CONDITIONAL(PLUGINS, false)
2295 PLUGINS_DEFINE="#undef PURPLE_PLUGINS"
2297 AC_SUBST(PLUGINS_DEFINE)
2299 dnl #######################################################################
2300 dnl # Check for Cyrus-SASL (for Jabber)
2301 dnl #######################################################################
2302 dnl AC_CHECK_SIZEOF(short)
2303 AC_CHECK_FUNCS(snprintf connect)
2305 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)
2306 if test "x$enable_cyrus_sasl" = "xyes" ; then
2307 AC_CHECK_LIB(sasl2, sasl_client_init, [
2308 AM_CONDITIONAL(USE_CYRUS_SASL, true)
2309 AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present])
2312 AM_CONDITIONAL(USE_CYRUS_SASL, false)
2313 AC_MSG_ERROR([Cyrus SASL library not found])
2316 AM_CONDITIONAL(USE_CYRUS_SASL, false)
2319 dnl #######################################################################
2320 dnl # Check for Kerberos (for Zephyr)
2321 dnl #######################################################################
2322 AC_DEFINE(ZEPHYR_INT32, long, [Size of an int32.])
2323 AC_SUBST(KRB4_CFLAGS)
2324 AC_SUBST(KRB4_LDFLAGS)
2326 if test "$kerberos" != "no" ; then
2327 if test "$kerberos" != "yes" ; then
2328 KRB4_CFLAGS="-I${kerberos}/include"
2329 if test -d "$kerberos/include/kerberosIV" ; then
2330 KRB4_CFLAGS="$KRB4_CFLAGS -I${kerberos}/include/kerberosIV"
2332 KRB4_LDFLAGS="-L${kerberos}/lib"
2333 elif test -d /usr/local/include/kerberosIV ; then
2334 KRB4_CFLAGS="-I/usr/local/include/kerberosIV"
2335 elif test -d /usr/include/kerberosIV ; then
2336 KRB4_CFLAGS="-I/usr/include/kerberosIV"
2338 AC_DEFINE(ZEPHYR_USES_KERBEROS, 1, [Define if kerberos should be used in Zephyr.])
2340 orig_LDFLAGS="$LDFLAGS"
2341 LDFLAGS="$LDFLAGS $KRB4_LDFLAGS"
2342 AC_CHECK_LIB(krb4, krb_rd_req,
2343 [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
2344 [AC_CHECK_LIB(krb, krb_rd_req,
2345 [KRB4_LIBS="-lkrb -ldes"],
2346 [AC_MSG_ERROR([Kerberos 4 libraries not found])],
2348 -ldes425 -lkrb5 -lk5crypto -lcom_err)
2350 LIBS="$LIBS $KRB4_LIBS"
2351 AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm)
2352 AC_CHECK_FUNCS(krb_get_err_text krb_log)
2354 LDFLAGS="$orig_LDFLAGS"
2357 dnl #######################################################################
2358 dnl # Check for external libzephyr
2359 dnl #######################################################################
2360 AC_SUBST(ZEPHYR_CFLAGS)
2361 AC_SUBST(ZEPHYR_LDFLAGS)
2362 AC_SUBST(ZEPHYR_LIBS)
2363 if test "$zephyr" != "no" ; then
2364 if test "$zephyr" != "yes" ; then
2365 ZEPHYR_CFLAGS="-I${zephyr}/include"
2366 ZEPHYR_LDFLAGS="-L${zephyr}/lib"
2367 elif test -d /usr/athena/include/zephyr ; then
2368 ZEPHYR_CFLAGS="-I/usr/athena/include"
2369 elif test -d /usr/include/zephyr ; then
2370 ZEPHYR_CFLAGS="-I/usr/include"
2371 elif test -d /usr/local/include/zephyr ; then
2372 ZEPHYR_CFLAGS="-I/usr/local/include"
2374 AC_DEFINE(LIBZEPHYR_EXT, 1 , [Define if external libzephyr should be used.])
2375 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
2376 orig_LDFLAGS="$LDFLAGS"
2377 LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS"
2378 AC_CHECK_LIB(zephyr, ZInitialize,
2379 [ZEPHYR_LIBS="-lzephyr"],
2380 [AC_MSG_ERROR([Zephyr libraries not found])],
2384 LDFLAGS="$orig_LDFLAGS"
2387 AC_MSG_CHECKING(for me pot o' gold)
2389 AC_CHECK_FUNCS(gethostid lrand48)
2390 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
2391 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
2392 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
2393 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
2394 AC_CHECK_HEADERS(termios.h)
2396 # sys/sysctl.h on OpenBSD 4.2 requires sys/param.h
2397 # sys/sysctl.h on FreeBSD requires sys/types.h
2398 AC_CHECK_HEADERS(sys/param.h)
2399 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
2401 #include <sys/types.h>
2403 # include <sys/param.h>
2407 AC_CHECK_HEADERS(sys/socket.h)
2408 AC_VAR_TIMEZONE_EXTERNALS
2410 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
2411 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2416 ]])], [ac_cv_struct_tm_gmtoff=yes], [ac_cv_struct_tm_gmtoff=no]))
2417 if test $ac_cv_struct_tm_gmtoff = yes; then
2418 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
2421 AC_CACHE_CHECK([whether va_lists can be copied by value], ac_cv_va_val_copy,[
2422 AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdarg.h>
2424 void f (int i, ...) {
2425 va_list args1, args2;
2426 va_start (args1, i);
2428 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
2430 va_end (args1); va_end (args2);
2436 [ac_cv_va_val_copy=yes],
2437 [ac_cv_va_val_copy=no],
2438 [ac_cv_va_val_copy=yes])
2441 if test "x$ac_cv_va_val_copy" = "xno"; then
2442 AC_DEFINE(VA_COPY_AS_ARRAY, 1, ['va_lists' cannot be copied as values])
2445 dnl #######################################################################
2446 dnl # Check for check
2447 dnl #######################################################################
2448 PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], , [AC_MSG_RESULT([no, testing is disabled])])
2449 AM_CONDITIONAL(HAVE_CHECK, [test "x$CHECK_LIBS" != "x"])
2450 AC_SUBST(CHECK_CFLAGS)
2451 AC_SUBST(CHECK_LIBS)
2453 dnl #######################################################################
2454 dnl # Disable pixmap installation
2455 dnl #######################################################################
2456 AC_ARG_ENABLE(pixmaps-install, AC_HELP_STRING([--disable-pixmaps-install], [disable installation of pixmap files - Pidgin still needs them!]), enable_pixmaps="$enableval", enable_pixmaps=yes)
2458 AM_CONDITIONAL(INSTALL_PIXMAPS, test "x$enable_pixmaps" = "xyes")
2460 AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes")
2462 dnl #######################################################################
2463 dnl # Check for Doxygen and dot (part of GraphViz)
2464 dnl #######################################################################
2465 AC_ARG_ENABLE(doxygen,
2466 [AC_HELP_STRING([--disable-doxygen],
2467 [disable documentation with doxygen])],
2468 enable_doxygen="$enableval", enable_doxygen="yes")
2470 [AC_HELP_STRING([--disable-dot],
2471 [disable graphs in doxygen via 'dot'])],
2472 enable_dot="$enableval", enable_dot="yes")
2473 AC_ARG_ENABLE(devhelp,
2474 [AC_HELP_STRING([--disable-devhelp],
2475 [disable building index for devhelp documentation browser])],
2476 enable_devhelp="$enableval", enable_devhelp="yes")
2478 if test "x$enable_doxygen" = xyes; then
2479 AC_CHECK_PROG(DOXYGEN, doxygen, true, false)
2480 if test $DOXYGEN = false; then
2481 AC_MSG_WARN([*** Doxygen not found, docs will not be available])
2484 AC_DEFINE_UNQUOTED(HAVE_DOXYGEN, 1, [whether or not we have doxygen])
2486 if test "x$enable_dot" = "xyes"; then
2487 AC_CHECK_PROG(DOT, dot, true, false)
2489 if test $DOT = false; then
2491 AC_MSG_WARN([*** GraphViz dot not found, docs will not have graphs])
2493 AC_DEFINE_UNQUOTED(HAVE_DOT, 1, [whether or not we have dot])
2497 if test "x$enable_devhelp" = "xyes"; then
2498 AC_CHECK_PROG(XSLTPROC, xsltproc, true, false)
2500 if test $XSLTPROC = false; then
2501 enable_devhelp="no";
2502 AC_MSG_WARN([*** xsltproc not found; devhelp index will not be created])
2504 AC_DEFINE_UNQUOTED(HAVE_XSLTPROC, 1, [whether or not we have xsltproc for devhelp index])
2513 AC_SUBST(enable_doxygen)
2514 AC_SUBST(enable_dot)
2515 AC_SUBST(enable_devhelp)
2516 AM_CONDITIONAL(HAVE_DOXYGEN, test "x$enable_doxygen" = "xyes")
2517 AM_CONDITIONAL(HAVE_XSLTPROC, test "x$enable_devhelp" = "xyes")
2519 AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],
2520 [compile with debugging support])], , enable_debug=no)
2522 if test "x$enable_debug" = "xyes" ; then
2523 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2526 AM_CONDITIONAL(PURPLE_AVAILABLE, true)
2528 AC_CONFIG_FILES([Makefile
2537 pidgin/pidgin-uninstalled.pc
2539 pidgin/pidgin-2-uninstalled.pc
2540 pidgin/pixmaps/Makefile
2541 pidgin/pixmaps/emotes/default/24/Makefile
2542 pidgin/pixmaps/emotes/none/Makefile
2543 pidgin/pixmaps/emotes/small/16/Makefile
2544 pidgin/plugins/Makefile
2545 pidgin/plugins/cap/Makefile
2546 pidgin/plugins/disco/Makefile
2547 pidgin/plugins/gestures/Makefile
2548 pidgin/plugins/gevolution/Makefile
2549 pidgin/plugins/musicmessaging/Makefile
2550 pidgin/plugins/perl/Makefile
2551 pidgin/plugins/perl/common/Makefile.PL
2552 pidgin/plugins/ticker/Makefile
2553 libpurple/example/Makefile
2554 libpurple/gconf/Makefile
2556 libpurple/purple-uninstalled.pc
2557 libpurple/purple-2.pc
2558 libpurple/purple-2-uninstalled.pc
2559 libpurple/plugins/Makefile
2560 libpurple/plugins/mono/Makefile
2561 libpurple/plugins/mono/api/Makefile
2562 libpurple/plugins/mono/loader/Makefile
2563 libpurple/plugins/perl/Makefile
2564 libpurple/plugins/perl/common/Makefile.PL
2565 libpurple/plugins/ssl/Makefile
2566 libpurple/plugins/tcl/Makefile
2568 libpurple/protocols/Makefile
2569 libpurple/protocols/bonjour/Makefile
2570 libpurple/protocols/gg/Makefile
2571 libpurple/protocols/irc/Makefile
2572 libpurple/protocols/jabber/Makefile
2573 libpurple/protocols/msn/Makefile
2574 libpurple/protocols/myspace/Makefile
2575 libpurple/protocols/mxit/Makefile
2576 libpurple/protocols/novell/Makefile
2577 libpurple/protocols/null/Makefile
2578 libpurple/protocols/oscar/Makefile
2579 libpurple/protocols/qq/Makefile
2580 libpurple/protocols/sametime/Makefile
2581 libpurple/protocols/silc/Makefile
2582 libpurple/protocols/silc10/Makefile
2583 libpurple/protocols/simple/Makefile
2584 libpurple/protocols/yahoo/Makefile
2585 libpurple/protocols/zephyr/Makefile
2586 libpurple/tests/Makefile
2589 share/sounds/Makefile
2590 share/ca-certs/Makefile
2593 finch/libgnt/Makefile
2595 finch/libgnt/wms/Makefile
2596 finch/plugins/Makefile
2603 echo $PACKAGE $VERSION
2606 echo Build GTK+ 2.x UI............. : $enable_gtkui
2607 echo Build console UI.............. : $enable_consoleui
2608 echo Build for X11................. : $with_x
2610 echo Enable Gestures............... : $enable_gestures
2611 echo Protocols to build dynamically : $DYNAMIC_PRPLS
2612 echo Protocols to link statically.. : $STATIC_PRPLS
2614 echo Build with GStreamer support.. : $enable_gst
2615 echo Build with D-Bus support...... : $enable_dbus
2616 echo Build with voice and video.... : $enable_vv
2617 if test "x$enable_dbus" = "xyes" ; then
2618 eval eval echo D-Bus services directory...... : $DBUS_SERVICES_DIR
2620 echo Build with GNU Libidn......... : $enable_idn
2621 echo Build with NetworkManager..... : $enable_nm
2622 echo SSL Library/Libraries......... : $msg_ssl
2623 if test "x$SSL_CERTIFICATES_DIR" != "x" ; then
2624 eval eval echo SSL CA certificates directory. : $SSL_CERTIFICATES_DIR
2626 echo Build with Cyrus SASL support. : $enable_cyrus_sasl
2627 echo Use kerberos 4 with zephyr.... : $kerberos
2628 echo Use external libzephyr........ : $zephyr
2629 echo Use external libgadu.......... : $gadu_libs
2630 echo Install pixmaps............... : $enable_pixmaps
2631 echo Install translations.......... : $enable_i18n
2632 echo Has you....................... : yes
2634 echo Use XScreenSaver Extension.... : $enable_screensaver
2635 echo Use X Session Management...... : $enable_sm
2636 echo Use startup notification...... : $enable_startup_notification
2637 echo Build with GtkSpell support... : $enable_gtkspell
2639 echo Build with plugin support..... : $enable_plugins
2640 echo Build with Mono support....... : $enable_mono
2641 echo Build with Perl support....... : $enable_perl
2642 echo Build with Tcl support........ : $enable_tcl
2643 echo Build with Tk support......... : $enable_tk
2645 echo Print debugging messages...... : $enable_debug
2647 eval eval echo Pidgin will be installed in $bindir.
2648 if test "x$pidginpath" != "x" ; then
2649 echo Warning: You have an old copy of Pidgin at $pidginpath.
2651 if test "x$enable_pixmaps" = "xno" ; then
2653 echo Warning: You have disabled the installation of pixmap data, but Pidgin
2654 echo still requires installed pixmaps. Be sure you know what you are doing.
2656 if test "x$enable_i18n" = "xno" ; then
2658 echo Warning: You have disabled the building and intallation of translation
2659 echo data. This will prevent building pidgin.desktop and the GConf schemas.
2660 echo Be sure you know what you are doing.
2663 echo configure complete, now type \'make\'