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], [10])
47 m4_define([purple_major_version], [2])
48 m4_define([purple_minor_version], [10])
49 m4_define([purple_micro_version], [5])
50 m4_define([purple_version_suffix], [devel])
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], [8])
56 m4_define([gnt_major_version], [2])
57 m4_define([gnt_minor_version], [8])
58 m4_define([gnt_micro_version], [9])
59 m4_define([gnt_version_suffix], [devel])
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])
78 dnl TODO: Always use AM_SILENT_RULES when we depend on automake >= 1.11
79 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
81 PURPLE_MAJOR_VERSION=purple_major_version
82 PURPLE_MINOR_VERSION=purple_minor_version
83 PURPLE_MICRO_VERSION=purple_micro_version
84 PURPLE_VERSION=[purple_display_version]
85 AC_SUBST(PURPLE_MAJOR_VERSION)
86 AC_SUBST(PURPLE_MINOR_VERSION)
87 AC_SUBST(PURPLE_MICRO_VERSION)
88 AC_SUBST(PURPLE_VERSION)
90 PURPLE_LT_VERSION_INFO="purple_lt_current:purple_micro_version:purple_minor_version"
91 AC_SUBST(PURPLE_LT_VERSION_INFO)
93 GNT_MAJOR_VERSION=gnt_major_version
94 GNT_MINOR_VERSION=gnt_minor_version
95 GNT_MICRO_VERSION=gnt_micro_version
96 GNT_VERSION=[gnt_display_version]
97 AC_SUBST(GNT_MAJOR_VERSION)
98 AC_SUBST(GNT_MINOR_VERSION)
99 AC_SUBST(GNT_MICRO_VERSION)
100 AC_SUBST(GNT_VERSION)
102 GNT_LT_VERSION_INFO="gnt_lt_current:gnt_micro_version:gnt_minor_version"
103 AC_SUBST(GNT_LT_VERSION_INFO)
105 AC_PATH_PROG(sedpath, sed)
107 dnl Storing configure arguments
108 AC_DEFINE_UNQUOTED(CONFIG_ARGS, "$ac_configure_args", [configure arguments])
110 dnl Checks for programs.
115 LIBTOOL="$LIBTOOL --silent"
120 dnl Check for Sun compiler
121 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
123 dnl Checks for header files.
126 AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h)
128 dnl Checks for typedefs, structures, and compiler characteristics.
131 AC_CHECK_SIZEOF(time_t, ,[
137 dnl Checks for library functions.
140 AC_CHECK_FUNCS(strdup strstr atexit setlocale)
141 dnl Checks for getopt in standard library
142 AC_CHECK_FUNCS(getopt_long,,
148 dnl Check for inet_aton
149 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
150 [AC_MSG_ERROR([inet_aton not found])])])
151 AC_CHECK_LIB(resolv, __res_query)
152 AC_CHECK_LIB(nsl, gethostent)
153 AC_CHECK_FUNC(socket, ,
154 [AC_CHECK_LIB(socket, socket, , [AC_MSG_ERROR([socket not found])])])
155 dnl If all goes well, by this point the previous two checks will have
156 dnl pulled in -lsocket and -lnsl if we need them.
157 AC_CHECK_FUNC(getaddrinfo,
158 [AC_DEFINE([HAVE_GETADDRINFO], [1],
159 [Define to 1 if you have the getaddrinfo function.])],
160 [AC_CHECK_LIB(socket, getaddrinfo,
161 [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)])
162 AC_CHECK_FUNCS(inet_ntop)
163 AC_CHECK_FUNCS(getifaddrs)
164 dnl Check for socklen_t (in Unix98)
165 AC_MSG_CHECKING(for socklen_t)
166 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
167 #include <sys/types.h>
168 #include <sys/socket.h>
173 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
174 #include <sys/types.h>
175 #include <sys/socket.h>
176 int accept(int, struct sockaddr *, size_t *);
178 AC_MSG_RESULT(size_t)
179 AC_DEFINE(socklen_t, size_t, [socklen_t size])
182 AC_DEFINE(socklen_t, int, [socklen_t size])
186 dnl Some systems do not have sa_len field for struct sockaddr.
187 AC_CHECK_MEMBER([struct sockaddr.sa_len],
188 [AC_DEFINE([HAVE_STRUCT_SOCKADDR_SA_LEN],[1],
189 [Define if struct sockaddr has an sa_len member])],[:],
190 [#include <sys/socket.h>])
192 dnl Check for v6-only sockets
193 AC_CHECK_DECL([IPV6_V6ONLY],
194 [AC_DEFINE([HAVE_IPV6_V6ONLY],[1],
195 [Define if the IPV6_V6ONLY setsockopt option exists])],
196 [], [#include <netinet/in.h>])
198 dnl to prevent the g_stat()/g_unlink() crash,
199 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
202 dnl FreeBSD doesn't have libdl, dlopen is provided by libc
203 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
205 dnl Haiku does not use libm for the math functions, they are part
207 AC_SEARCH_LIBS([ceil], [m], [], [
208 AC_MSG_ERROR([unable to find the floor() function])
211 AC_MSG_CHECKING(for fileno())
212 AC_RUN_IFELSE([AC_LANG_SOURCE([[
215 int main(int argc, char *argv[])
225 AC_DEFINE([HAVE_FILENO], [1],
226 [Define to 1 if your stdio has int fileno(FILE *).])
230 # Fallback for Cross Compiling...
231 # This will enable the compatibility code.
235 AC_MSG_CHECKING(for the %z format string in strftime())
236 AC_RUN_IFELSE([AC_LANG_SOURCE([[
237 #ifdef HAVE_SYS_TIME_H
238 #include <sys/time.h>
246 time_t t = time(NULL);
248 if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5)
251 fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf);
253 return !((buf[0] == '-' || buf[0] == '+') &&
254 (buf[1] >= '0' && buf[1] <= '9') &&
255 (buf[2] >= '0' && buf[2] <= '9') &&
256 (buf[3] >= '0' && buf[3] <= '9') &&
257 (buf[4] >= '0' && buf[4] <= '9')
262 AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
263 [Define to 1 if you have a strftime() that supports the %z format string.])
267 # Fallback for Cross Compiling...
268 # This will enable the compatibility code.
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 dnl #######################################################################
298 dnl # Disable creation and installation of translation files
299 dnl #######################################################################
300 AC_ARG_ENABLE(nls, AC_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes)
302 if test x$enable_i18n = xyes; then
304 GETTEXT_PACKAGE=pidgin
305 AC_SUBST(GETTEXT_PACKAGE)
307 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 hr hu hy id it ja ka km kn ko ku lo lt mai mhr 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"
310 dnl If we don't have msgfmt, then po/ is going to fail -- ensure that
311 dnl AM_GLIB_GNU_GETTEXT found it.
313 if test x$MSGFMT = xno -o x$MSGFMT$GMSGFMT$INTLTOOL_MSGFMT = x
317 The msgfmt command is required to build libpurple. If it is installed
318 on your system, ensure that it is in your path. If it is not, install
319 GNU gettext to continue.
321 If you have msgfmt installed, but for some reason this error message
322 is still displayed, you have encountered what appears to be a bug in
323 third-party configure macros. Try setting the MSGFMT environment
324 variable to the absolute path to your msgfmt binary and trying
325 configure again, like this:
327 MSGFMT=/path/to/msgfmt ./configure ...
332 AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes")
334 dnl #######################################################################
335 dnl # Check for GLib 2.16 (required)
336 dnl #######################################################################
337 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.16.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [
341 You must have GLib 2.16.0 or newer development headers installed to build.
343 If you have these installed already you may need to install pkg-config so
346 AC_SUBST(GLIB_CFLAGS)
349 GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
350 AC_SUBST(GLIB_GENMARSHAL)
352 AC_ARG_WITH([extraversion],
353 AC_HELP_STRING([--with-extraversion=STRING],
354 [extra version number to be displayed in Help->About and --help (for packagers)]),
355 EXTRA_VERSION=$withval)
357 if test x"$EXTRA_VERSION" != "x" ; then
358 AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION-$EXTRA_VERSION", [display version info])
360 AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION", [display version info])
363 AC_ARG_ENABLE(missing-dependencies, [AC_HELP_STRING([--disable-missing-dependencies],
364 [skip missing dependencies instead of aborting configure])],
365 force_deps="$enableval", force_deps="yes")
368 with_x="$withval", with_x="yes")
369 AC_ARG_ENABLE(gtkui, [AC_HELP_STRING([--disable-gtkui],
370 [compile without GTK+ user interface])],
371 enable_gtkui="$enableval", enable_gtkui="yes")
372 AC_ARG_ENABLE(consoleui, [AC_HELP_STRING([--disable-consoleui],
373 [compile without console user interface])],
374 [enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no])
376 dnl #######################################################################
377 dnl # Check for GTK+ 2.10 and other things used by the GTK UI
378 dnl #######################################################################
379 AC_ARG_ENABLE(screensaver,
380 [AC_HELP_STRING([--disable-screensaver],
381 [compile without X screensaver extension (used to detect idleness)])],
382 enable_screensaver="$enableval", enable_screensaver="yes")
384 [AC_HELP_STRING([--disable-sm],
385 [compile without X session management support])],
386 enable_sm="$enableval", enable_sm="yes")
387 AC_ARG_ENABLE(startup-notification,
388 [AC_HELP_STRING([--disable-startup-notification],
389 [compile without startup notification support])],
390 enable_startup_notification="$enableval", enable_startup_notification="yes")
391 AC_ARG_ENABLE(gtkspell,
392 [AC_HELP_STRING([--disable-gtkspell],
393 [compile without GtkSpell automatic spell checking])],
394 enable_gtkspell="$enableval", enable_gtkspell="yes")
395 AC_ARG_ENABLE(gevolution,
396 [AC_HELP_STRING([--enable-gevolution],
397 [compile with the Evolution plugin])],
398 enable_gevolution="$enableval", enable_gevolution="no")
400 [AC_HELP_STRING([--enable-cap],
401 [compile with Contact Availability Prediction plugin])],
402 enable_cap="$enableval", enable_cap="no")
403 AC_ARG_ENABLE(gestures,
404 [AC_HELP_STRING([--disable-gestures],
405 [compile without the gestures plugin])],
406 enable_gestures="$enableval", enable_gestures="yes")
409 # We can't assume that $x_libraries will be set, because autoconf does not
410 # set it in the case when the X libraries are in a standard place.
411 # Ditto for $x_includes
412 if test X"$x_libraries" = X"" || test X"$x_libraries" = XNONE; then
415 x_libpath_add="-L$x_libraries"
417 if test X"$x_includes" = X"" || test X"$x_includes" = XNONE; then
420 x_incpath_add="-I$x_includes"
423 if test "x$enable_gtkui" = "xyes" ; then
424 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0], , [
428 You must have GTK+ 2.10.0 or newer development headers installed to compile
429 Pidgin. If you want to build only Finch then specify --disable-gtkui when
436 dnl We only really need Pango >= 1.4 for decent RTL support
437 PKG_CHECK_MODULES(PANGO, [pango >= 1.4.0],
438 AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:)
440 dnl #######################################################################
441 dnl # Check if we should compile with X support
442 dnl #######################################################################
443 if test "x$with_x" = "xyes" ; then
444 PKG_CHECK_MODULES(X11, x11,
445 [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])],
447 if test "x$x_incpath_add" != "x" -a "x$x_libpath_add" != "x"; then
448 X11_LIBS="$x_libpath_add"
449 X11_CFLAGS="$x_incpath_add"
452 if test "x$force_deps" = "xyes" ; then
454 X11 development headers not found.
455 Use --without-x if you do not need X11 support.
463 enable_screensaver=no
468 dnl #######################################################################
469 dnl # Check for XScreenSaver
470 dnl #######################################################################
471 if test "x$enable_screensaver" = "xyes" ; then
472 if test "x$with_x" = "xyes" ; then
474 LIBS="$LIBS $GTK_LIBS $x_libpath_add"
477 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm])
478 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm])
479 if test "x$XSS_LIBS" != "x"; then
480 oldCPPFLAGS="$CPPFLAGS"
481 CPPFLAGS="$CPPFLAGS $x_incpath_add"
482 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
483 #include <X11/Xlib.h>
484 #include <X11/extensions/scrnsaver.h>
485 ]], [[]])], [], [enable_screensaver=no])
486 CPPFLAGS="$oldCPPFLAGS"
488 enable_screensaver=no
492 if test "x$enable_screensaver" = "xyes" ; then
493 AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])
496 if test "x$force_deps" = "xyes" ; then
498 XScreenSaver extension development headers not found.
499 Use --disable-screensaver if you do not need XScreenSaver extension support,
500 this is required for detecting idle time by mouse and keyboard usage.
505 AC_MSG_ERROR([X support is required to build with XScreenSaver extensions])
509 dnl #######################################################################
510 dnl # Check for X session management libs
511 dnl #######################################################################
512 if test "x$enable_sm" = "xyes"; then
513 if test "x$with_x" = "xyes" ; then
515 AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE])
516 if test "x$found_sm_lib" = "xtrue"; then
517 oldCPPFLAGS="$CPPFLAGS"
518 CPPFLAGS="$CPPFLAGS $x_incpath_add"
519 AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes)
520 CPPFLAGS="$oldCPPFLAGS"
523 if test "x$enable_sm" = "xyes"; then
524 AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.])
527 if test "x$force_deps" = "xyes" ; then
529 X session management development headers not found.
530 Use --disable-sm if you do not need session management support.
535 AC_MSG_ERROR([X support is required to build with X session management support])
539 dnl #######################################################################
540 dnl # Check for X11 to allow the gestures plugin
541 dnl #######################################################################
542 if test "x$enable_gestures" = "xyes"; then
543 if test "x$with_x" = "xno" ; then
548 dnl #######################################################################
549 dnl # Check for GtkSpell
550 dnl #######################################################################
551 if test "x$enable_gtkspell" = "xyes" ; then
552 PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , [
555 if test "x$force_deps" = "xyes" ; then
557 GtkSpell development headers not found.
558 Use --disable-gtkspell if you do not need it.
561 if test "x$enable_gtkspell" = "xyes" ; then
562 AC_DEFINE(USE_GTKSPELL, 1, [Define if we're using GtkSpell])
563 AC_SUBST(GTKSPELL_CFLAGS)
564 AC_SUBST(GTKSPELL_LIBS)
568 dnl #######################################################################
569 dnl # Check for stuff needed by the Evolution integration plugin.
570 dnl #######################################################################
571 if test "x$enable_gevolution" = "xyes"; then
572 evo_deps="libebook-1.2 libedata-book-1.2"
573 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, , [
574 enable_gevolution="no"
576 if test "x$enable_gevolution" = "xno"; then
577 evo_deps="libebook-1.0 libedata-book-1.0"
578 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [
579 enable_gevolution="yes"
582 if test "x$enable_gevolution" = "xyes"; then
583 AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.])
584 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
585 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
587 if test "x$force_deps" = "xyes" ; then
589 Evolution development headers not found.
590 Use --disable-gevolution if you do not need it.
596 dnl #######################################################################
597 dnl # Check for libsqlite3 (for the Contact Availability Prediction plugin)
598 dnl #######################################################################
599 if test "x$enable_cap" = "xyes"; then
600 PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[
603 if test "x$force_deps" = "xyes" ; then
605 sqlite3 development headers not found.
606 Use --disable-cap if you do not need the Contact Availability Prediction plugin.
616 enable_screensaver=no
618 enable_startup_notification=no
621 AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtkui" = "xyes")
622 AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$enable_gevolution" = "xyes")
623 AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes")
624 AM_CONDITIONAL(ENABLE_GESTURES, test "x$enable_gestures" = "xyes")
627 dnl #######################################################################
628 dnl # Check for ncurses and other things used by the console UI
629 dnl #######################################################################
632 AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR],
633 [compile finch against the ncurses includes in DIR])],
634 [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""])
635 if test "x$enable_consoleui" = "xyes"; then
636 AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no])
637 AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"],
638 [enable_consoleui=no], [$GNT_LIBS])
640 if test "x$enable_consoleui" = "xyes"; then
641 dnl # Some distros put the headers in ncursesw/, some don't
643 for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include
645 f="$location/ncurses.h"
646 orig_CFLAGS="$CFLAGS"
647 orig_CPPFLAGS="$CPPFLAGS"
648 CFLAGS="$CFLAGS -I$location"
649 CPPFLAGS="$CPPFLAGS -I$location"
651 AC_MSG_CHECKING([if $f supports wide characters])
652 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
653 #define _XOPEN_SOURCE_EXTENDED
657 # error get_wch not found!
661 if test x"$dir" != x"." ; then
668 CFLAGS="$orig_CFLAGS"
669 CPPFLAGS="$orig_CPPFLAGS"
673 CFLAGS="$orig_CFLAGS"
674 CPPFLAGS="$orig_CPPFLAGS"
680 if test x"$found_ncurses_h" = x"no" ; then
686 # ncursesw was not found. Look for plain old ncurses
688 AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no])
689 AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"],
690 [enable_consoleui=no], [$GNT_LIBS])
691 AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.])
692 if test x"$ac_ncurses_includes" != "x"; then
693 GNT_CFLAGS="-I$ac_ncurses_includes"
695 if test x"$NCURSES_HEADERS" != "x"; then
696 GNT_CFLAGS="-I$NCURSES_HEADERS"
702 if test "x$force_finch" = "xyes" -a "x$enable_consoleui" != "xyes"; then
705 Finch will not be built. You need to install ncursesw (or ncurses) and its development headers.
712 AM_CONDITIONAL(ENABLE_GNT, test "x$enable_consoleui" = "xyes")
714 #AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])])
716 dnl #######################################################################
717 dnl # Check for LibXML2 (required)
718 dnl #######################################################################
719 PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= 2.6.0], , [
722 You must have libxml2 >= 2.6.0 development headers installed to build.
724 PKG_CHECK_EXISTS([libxml-2.0 >= 2.6.18], , [
726 Versions of libxml2 < 2.6.18 may contain bugs that could cause XMPP messages to be discarded.
729 AC_SUBST(LIBXML_CFLAGS)
730 AC_SUBST(LIBXML_LIBS)
732 dnl #######################################################################
734 dnl #######################################################################
735 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
736 AM_CONDITIONAL(USE_GCONFTOOL, test "x$GCONFTOOL" != "xno")
739 dnl #######################################################################
740 dnl # Check for GStreamer
741 dnl #######################################################################
743 dnl TODO: Depend on gstreamer >= 0.10.10, and remove the conditional use of
744 dnl gst_registry_fork_set_enabled.
745 AC_ARG_ENABLE(gstreamer,
746 [AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
747 enable_gst="$enableval", enable_gst="yes")
748 if test "x$enable_gst" != "xno"; then
749 PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], [
750 AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
751 AC_SUBST(GSTREAMER_CFLAGS)
752 AC_SUBST(GSTREAMER_LIBS)
753 AC_CHECK_LIB(gstreamer-0.10, gst_registry_fork_set_enabled,
754 [ AC_DEFINE(GST_CAN_DISABLE_FORKING, [],
755 [Define if gst_registry_fork_set_enabled exists])],
756 [], [$GSTREAMER_LIBS])
760 if test "x$force_deps" = "xyes" ; then
762 GStreamer development headers not found.
763 Use --disable-gstreamer if you do not need GStreamer (sound) support.
768 dnl #######################################################################
769 dnl # Check for GStreamer Interfaces
770 dnl #######################################################################
771 if test "x$enable_gst" != "xno"; then
772 AC_ARG_ENABLE(gstreamer-interfaces,
773 [AC_HELP_STRING([--disable-gstreamer-interfaces], [compile without GStreamer interface support])],
774 enable_gstinterfaces="$enableval", enable_gstinterfaces="yes")
775 if test "x$enable_gstinterfaces" != "xno"; then
776 PKG_CHECK_MODULES(GSTINTERFACES, [gstreamer-interfaces-0.10], [
777 AC_DEFINE(USE_GSTINTERFACES, 1, [Use GStreamer interfaces for X overlay support])
778 AC_SUBST(GSTINTERFACES_CFLAGS)
779 AC_SUBST(GSTINTERFACES_LIBS)
781 enable_gstinterfaces="no"
785 enable_gstinterfaces="no"
788 dnl #######################################################################
789 dnl # Check for Farstream
790 dnl #######################################################################
791 AC_ARG_ENABLE(farstream,
792 [AC_HELP_STRING([--disable-farstream], [compile without farstream support])],
793 enable_farstream="$enableval", enable_farstream="yes")
794 if test "x$enable_farstream" != "xno"; then
795 PKG_CHECK_MODULES(FARSTREAM, [farstream-0.1], [
796 AC_SUBST(FARSTREAM_CFLAGS)
797 AC_SUBST(FARSTREAM_LIBS)
800 PKG_CHECK_MODULES(FARSTREAM, [farsight2-0.10 >= 0.0.9], [
801 AC_DEFINE(HAVE_FARSIGHT, 1, [Use Farsight instead of Farstream])
802 AC_SUBST(FARSTREAM_CFLAGS)
803 AC_SUBST(FARSTREAM_LIBS)
805 enable_farstream="no"
810 dnl #######################################################################
811 dnl # Check for Voice and Video support
812 dnl #######################################################################
814 [AC_HELP_STRING([--disable-vv], [compile without voice and video support])],
815 enable_vv="$enableval", enable_vv="yes")
816 if test "x$enable_vv" != "xno"; then
817 if test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farstream" != "xno"; then
818 AC_DEFINE(USE_VV, 1, [Use voice and video])
821 if test "x$force_deps" = "xyes"; then
823 Dependencies for voice/video were not met.
824 Install the necessary gstreamer and farstream packages first.
825 Or use --disable-vv if you do not need voice/video support.
830 AM_CONDITIONAL(USE_VV, test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farstream" != "xno")
832 dnl #######################################################################
833 dnl # Check for Internationalized Domain Name support
834 dnl #######################################################################
837 [AC_HELP_STRING([--disable-idn], [compile without IDN support])],
838 [enable_idn="$enableval" force_idn=$enableval], [enable_idn="yes" force_idn=no])
839 if test "x$enable_idn" != "xno"; then
840 PKG_CHECK_MODULES(IDN, libidn >= 0.0.0, [
841 AC_DEFINE(USE_IDN, 1, [Use GNU Libidn for stringprep and IDN])
847 if test "x$force_deps" = "xyes" ; then
849 GNU Libidn development headers not found.
850 Use --disable-idn if you do not need it.
856 dnl #######################################################################
857 dnl # Check for Meanwhile headers (for Sametime)
858 dnl #######################################################################
859 AC_ARG_ENABLE(meanwhile,
860 [AC_HELP_STRING([--disable-meanwhile],
861 [compile without meanwhile (required for Sametime support)])],
862 enable_meanwhile="$enableval", enable_meanwhile="yes")
863 if test "x$enable_meanwhile" = "xyes"; then
864 PKG_CHECK_MODULES(MEANWHILE, [meanwhile >= 1.0.0 meanwhile < 2.0.0], [
868 if test "x$force_deps" = "xyes" ; then
870 Meanwhile development headers not found.
871 Use --disable-meanwhile if you do not need meanwhile (Sametime) support.
875 AC_SUBST(MEANWHILE_CFLAGS)
876 AC_SUBST(MEANWHILE_LIBS)
878 dnl #######################################################################
879 dnl # Check for Native Avahi headers (for Bonjour)
880 dnl #######################################################################
882 [AC_HELP_STRING([--disable-avahi],
883 [compile without avahi (required for Bonjour support)])],
884 enable_avahi="$enableval", enable_avahi="yes")
886 if test "x$enable_avahi" = "xyes"; then
887 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"])
888 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"])
892 dnl Attempt to autodetect Avahi
893 PKG_CHECK_MODULES(AVAHI, [avahi-client avahi-glib], [
901 dnl Override AVAHI_CFLAGS if the user specified an include dir
902 if test "$ac_avahi_client_includes" != "no"; then
903 AVAHI_CFLAGS="-I$ac_avahi_client_includes"
905 CPPFLAGS_save="$CPPFLAGS"
906 CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS"
907 AC_CHECK_HEADER(avahi-client/client.h, [avahiincludes=yes], [avahiincludes=no])
908 CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS $GLIB_CFLAGS"
909 AC_CHECK_HEADER(avahi-glib/glib-malloc.h, [avahiincludes=yes], [avahiincludes=no])
910 CPPFLAGS="$CPPFLAGS_save"
912 dnl Override AVAHI_LIBS if the user specified a libs dir
913 if test "$ac_avahi_client_libs" != "no"; then
914 AVAHI_LIBS="-L$ac_avahi_client_libs -lavahi-common -lavahi-client -lavahi-glib "
916 AC_CHECK_LIB(avahi-client, avahi_client_new, [avahilibs=yes], [avahilibs=no], $AVAHI_LIBS)
919 if test "x$enable_avahi" = "xyes" -a \( "x$avahiincludes" = "xno" -o "x$avahilibs" = "xno" \); then
921 if test "x$force_deps" = "xyes"; then
923 avahi development headers not found.
924 Use --disable-avahi if you do not need avahi (Bonjour) support.
928 AC_SUBST(AVAHI_CFLAGS)
932 dnl #######################################################################
933 dnl # Check for SILC client includes and libraries
934 dnl #######################################################################
935 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"])
936 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"])
940 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
941 silc_manual_check="yes"
943 silc_manual_check="no"
945 if test "x$silc_manual_check" = "xno"; then
946 PKG_CHECK_MODULES(SILC, [silcclient >= 1.1], [
953 if test "x$have_silc" = "xno"; then
954 PKG_CHECK_MODULES(SILC, silcclient, [
961 dnl If silcclient.pc wasn't found, check for just silc.pc
962 if test "x$have_silc" = "xno"; then
963 PKG_CHECK_MODULES(SILC, silc, [
973 if test "$ac_silc_includes" != "no"; then
974 SILC_CFLAGS="-I$ac_silc_includes"
976 CPPFLAGS_save="$CPPFLAGS"
977 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
978 AC_CHECK_HEADER(silc.h, [silcincludes=yes])
979 CPPFLAGS="$CPPFLAGS_save"
981 if test "$ac_silc_libs" != "no"; then
982 SILC_LIBS="-L$ac_silc_libs"
984 SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
985 AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS)
987 if test "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes"; then
990 CPPFLAGS_save="$CPPFLAGS"
991 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
992 AC_CHECK_HEADER(silcincludes.h, [silc10includes=yes])
993 CPPFLAGS="$CPPFLAGS_save"
995 SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
996 AC_CHECK_LIB(silcclient, silc_client_init, [silc10client=yes], , $SILC_LIBS)
997 if test "x$silc10includes" = "xyes" -a "x$silc10client" = "xyes"; then
1003 AC_SUBST(SILC_CFLAGS)
1004 dnl SILC Toolkit >= 1.0.1 has a new MIME API
1005 if test "x$silcclient" = "xyes"; then
1006 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
1007 elif test "x$silc10client" = "xyes"; then
1008 CPPFLAGS_save="$CPPFLAGS"
1009 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
1010 AC_MSG_CHECKING(for silcmime.h)
1011 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1012 #include <silcincludes.h>
1013 #include <silcmime.h>
1016 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
1020 CPPFLAGS="$CPPFLAGS_save"
1023 dnl #######################################################################
1024 dnl # Check for Gadu-Gadu client includes and libraries
1025 dnl #######################################################################
1026 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"])
1027 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"])
1030 if test -n "$with_gadu_includes" || test -n "$with_gadu_libs"; then
1031 gadu_manual_check="yes"
1033 gadu_manual_check="no"
1035 if test "x$gadu_manual_check" = "xno"; then
1036 PKG_CHECK_MODULES(GADU, [libgadu >= 1.11.0], [
1043 if test "$ac_gadu_includes" != "no"; then
1044 GADU_CFLAGS="-I$ac_gadu_includes"
1046 CPPFLAGS_save="$CPPFLAGS"
1047 CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
1048 AC_CHECK_HEADER(libgadu.h, [gadu_includes=yes])
1049 CPPFLAGS="$CPPFLAGS_save"
1051 if test "$ac_gadu_libs" != "no"; then
1052 GADU_LIBS="-L$ac_gadu_libs"
1054 GADU_LIBS="$GADU_LIBS -lgadu"
1055 AC_CHECK_LIB(gadu, gg_libgadu_version, [gadu_libs=yes], , $GADU_LIBS)
1057 GADU_CFLAGS=`echo $GADU_CFLAGS |$sedpath 's/-Wall//'`
1059 if test "x$gadu_libs" = "xyes"; then
1060 AC_MSG_CHECKING(for libgadu GPL compatibility)
1061 CPPFLAGS_save="$CPPFLAGS"
1062 CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
1063 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
1064 #if defined(__GG_LIBGADU_HAVE_OPENSSL) || defined(GG_CONFIG_HAVE_OPENSSL)
1065 #error "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1068 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
1069 #if GG_DEFAULT_PROTOCOL_VERSION < 0x2e
1070 #error "Your libgadu version is too old. libpurple requires 1.11.0 or higher."
1074 AC_DEFINE([HAVE_LIBGADU], [1],
1075 [Define to 1 if you have libgadu.])
1080 echo "Your supplied copy of libgadu is too old."
1081 echo "Install version 1.11.0 or newer."
1082 echo "Then rerun this ./configure"
1084 echo "Falling back to using our own copy of libgadu"
1094 echo "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1095 echo "To compile against system libgadu, please recompile libgadu using:"
1096 echo "./autogen.sh --disable-libgadu-openssl --disable-static --enable-shared"
1097 echo "Then rerun this ./configure"
1099 echo "Falling back to using our own copy of libgadu"
1105 CPPFLAGS="$CPPFLAGS_save"
1108 AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes")
1110 if test "x$gadu_libs" = "x"; then
1115 AC_SUBST(GADU_CFLAGS)
1117 AC_ARG_ENABLE(distrib,,,enable_distrib=no)
1118 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
1120 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=""])
1121 if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then
1125 if test "x$STATIC_PRPLS" = "xall" ; then
1126 STATIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar sametime silc simple yahoo zephyr"
1128 if test "x$have_meanwhile" != "xyes" ; then
1129 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'`
1131 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1132 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'`
1134 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1135 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc/silc10/'`
1137 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1138 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc10//'`
1140 AC_SUBST(STATIC_PRPLS)
1144 for i in $STATIC_PRPLS ; do
1145 dnl Ugly special case for "libsilcpurple.la":
1146 dnl ... and Ugly special case for multi-protocol oscar and yahoo
1147 if test \( "x$i" = "xoscar" -o "x$i" = "xaim" -o "x$i" = "xicq" \) -a "x$static_oscar" != "xyes"; then
1148 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/oscar/liboscar.la"
1149 extern_init="$extern_init extern gboolean purple_init_aim_plugin();"
1150 extern_init="$extern_init extern gboolean purple_init_icq_plugin();"
1151 load_proto="$load_proto purple_init_aim_plugin();"
1152 load_proto="$load_proto purple_init_icq_plugin();"
1153 elif test "x$i" = "xyahoo"; then
1154 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/yahoo/libymsg.la"
1155 extern_init="$extern_init extern gboolean purple_init_yahoo_plugin();"
1156 extern_init="$extern_init extern gboolean purple_init_yahoojp_plugin();"
1157 load_proto="$load_proto purple_init_yahoo_plugin();"
1158 load_proto="$load_proto purple_init_yahoojp_plugin();"
1160 if test "x$i" = "xsilc"; then
1161 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.la"
1162 elif test "x$i" = "xsilc10"; then
1163 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libsilcpurple.la"
1165 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.la"
1167 extern_init="$extern_init extern gboolean purple_init_${i}_plugin();"
1168 load_proto="$load_proto purple_init_${i}_plugin();"
1171 bonjour) static_bonjour=yes ;;
1172 gg) static_gg=yes ;;
1173 irc) static_irc=yes ;;
1174 jabber) static_jabber=yes ;;
1175 msn) static_msn=yes ;;
1176 myspace) static_myspace=yes ;;
1177 mxit) static_mxit=yes ;;
1178 novell) static_novell=yes ;;
1179 oscar) static_oscar=yes ;;
1180 aim) static_oscar=yes ;;
1181 icq) static_oscar=yes ;;
1182 sametime) static_sametime=yes ;;
1183 silc) static_silc=yes ;;
1184 silc10) static_silc=yes ;;
1185 simple) static_simple=yes ;;
1186 yahoo) static_yahoo=yes ;;
1187 zephyr) static_zephyr=yes ;;
1188 *) echo "Invalid static protocol $i!!" ; exit ;;
1191 AM_CONDITIONAL(STATIC_BONJOUR, test "x$static_bonjour" = "xyes")
1192 AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes")
1193 AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes")
1194 AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes")
1195 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes")
1196 AM_CONDITIONAL(STATIC_MYSPACE, test "x$static_myspace" = "xyes")
1197 AM_CONDITIONAL(STATIC_MXIT, test "x$static_mxit" = "xyes")
1198 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes")
1199 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "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 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 sametime) dynamic_sametime=yes ;;
1241 silc) dynamic_silc=yes ;;
1242 silc10) dynamic_silc=yes ;;
1243 simple) dynamic_simple=yes ;;
1244 yahoo) dynamic_yahoo=yes ;;
1245 zephyr) dynamic_zephyr=yes ;;
1246 *) echo "Invalid dynamic protocol $i!!" ; exit ;;
1250 AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes)
1251 AC_ARG_WITH(krb4, [AC_HELP_STRING([--with-krb4=PREFIX], [compile Zephyr plugin with Kerberos 4 support])], kerberos="$withval", kerberos="no")
1252 AC_ARG_WITH(zephyr, [AC_HELP_STRING([--with-zephyr=PREFIX], [compile Zephyr plugin against external libzephyr])], zephyr="$withval", zephyr="no")
1253 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
1255 AC_CHECK_HEADERS(sys/utsname.h)
1256 AC_CHECK_FUNC(uname)
1258 AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes)
1260 DEBUG_CFLAGS="$DEBUG_CFLAGS -DPURPLE_DISABLE_DEPRECATED -DPIDGIN_DISABLE_DEPRECATED -DFINCH_DISABLE_DEPRECATED -DGNT_DISABLE_DEPRECATED"
1261 if test "x$GCC" = "xyes"; then
1262 dnl We enable -Wall later.
1263 dnl If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
1264 dnl This leads to warnings we don't want.
1265 CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
1267 dnl ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE
1269 dnl Future Possibilities
1271 dnl Consider adding -Wbad-function-cast.
1272 dnl This leads to spurious warnings using GPOINTER_TO_INT(), et al. directly on a function call.
1273 dnl We'd need an intermediate variable.
1275 dnl Consider adding -Wfloat-equal.
1276 dnl This leads to warnings with Perl.
1277 dnl Perhaps we could write ugly configure magic and pass -Wno-float-equal down to that subdirectory.
1278 dnl On the other hand, it's probably actually broken, so maybe the Perl folks should fix that?
1280 dnl Consider removing -Wno-sign-compare (from the -Wextra set) and fixing all those cases.
1281 dnl This is likely non-trivial.
1284 "-Waggregate-return" \
1286 "-Wdeclaration-after-statement" \
1288 "-Werror-implicit-function-declaration" \
1289 "-Wextra -Wno-sign-compare -Wno-unused-parameter" \
1290 "-Wformat-security" \
1291 "-Werror=format-security" \
1293 "-Wmissing-declarations" \
1294 "-Wmissing-noreturn" \
1295 "-Wmissing-prototypes" \
1299 orig_CFLAGS="$CFLAGS"
1300 CFLAGS="$CFLAGS $newflag"
1301 AC_MSG_CHECKING(for $newflag option to gcc)
1302 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
1303 int main() {return 0;}
1306 CFLAGS="$orig_CFLAGS"
1307 DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
1310 CFLAGS="$orig_CFLAGS"
1314 if test "x$enable_fortify" = "xyes"; then
1315 AC_MSG_CHECKING(for FORTIFY_SOURCE support)
1316 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <features.h>]], [[
1318 #if !(__GNUC_PREREQ (4, 1) \
1319 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
1320 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
1321 && __GNUC_MINOR__ == 4 \
1322 && (__GNUC_PATCHLEVEL__ > 2 \
1323 || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
1324 #error No FORTIFY_SOURCE support
1330 DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2"
1336 DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
1340 if test "x$SUNCC" = "xyes"; then
1341 CFLAGS="$CFLAGS -features=extensions"
1345 AC_PATH_PROG(pidginpath, pidgin)
1347 dnl #######################################################################
1348 dnl # Check for D-Bus libraries
1349 dnl #######################################################################
1351 AC_ARG_ENABLE(dbus, [AC_HELP_STRING([--disable-dbus], [disable D-Bus support])], , enable_dbus=yes)
1352 AC_ARG_ENABLE(nm, [AC_HELP_STRING([--disable-nm], [disable NetworkManager support (requires D-Bus)])], enable_nm=$enableval, enable_nm=yes)
1354 if test "x$enable_dbus" = "xyes" ; then
1355 AC_CHECK_PROG(enable_dbus, dbus-binding-tool, yes, no)
1358 if test "x$enable_dbus" = "xyes" ; then
1359 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60 dbus-glib-1 >= 0.60], [
1360 AC_SUBST(DBUS_CFLAGS)
1365 if test "x$force_deps" = "xyes" ; then
1367 D-Bus development headers not found.
1368 Use --disable-dbus if you do not need D-Bus support.
1373 dnl Check for NetworkManager.h; if we don't have it, oh well
1374 if test "x$enable_dbus" = "xyes" ; then
1375 if test "x$enable_nm" = "xyes" ; then
1376 PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [
1377 AC_SUBST(NETWORKMANAGER_CFLAGS)
1378 AC_SUBST(NETWORKMANAGER_LIBS)
1379 AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.])
1382 if test "x$force_deps" = "xyes" ; then
1384 NetworkManager development headers not found.
1385 Use --disable-nm if you do not need NetworkManager support.
1393 dnl #######################################################################
1394 dnl # Check for Python
1395 dnl #######################################################################
1397 dnl Python scripts are used to auto-generate about 3000 lines of C
1398 dnl and XML code that wraps (part of) the existing API so that
1399 dnl it is now accessible through D-Bus.
1401 dnl Python is only required if --enable-dbus is used, and only for
1402 dnl the build process to generate the code, not for running pidgin.
1403 dnl This autogenerated code is system-independent, so in principle we
1404 dnl can generate all of it before shipping. But I thought adding
1405 dnl auto-generated stuff to the repository is inelegant.
1406 dnl Alternatively, these python scripts could be rewritten
1407 dnl in C (brrrr ...).
1409 AC_ARG_WITH([python],
1410 AC_HELP_STRING([--with-python=PATH],
1411 [which python interpreter to use for dbus code generation]),
1414 if test "x$enable_dbus" = "xyes" || test "x$enable_consoleui" = "xyes" ; then
1415 if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then
1416 AC_PATH_PROG([PYTHON], [python], [no])
1419 if test x"$PYTHON" = x"no" ; then
1420 AC_MSG_WARN([python interpreter not found in your path])
1424 if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then
1425 AC_MSG_WARN([python version >= 2.4 required])
1430 dnl ###########################################################################
1431 dnl # Find the D-Bus services dir.
1433 dnl # This is a 3 step process that
1435 dnl # 1. checks if --with-dbus-services was set, if so use that.
1436 dnl # 2. checks if --prefix was given, if so use that.
1437 dnl # 3. fallbacks to installing into what should be the correct system
1440 dnl # This is still prone to error if one of the legacy directories exist
1441 dnl # although a newer dbus is installed. But I have tried to order the
1442 dnl # directory searching to keep this situation at a minimum.
1443 dnl ###########################################################################
1444 AC_ARG_WITH(dbus-services, [AC_HELP_STRING([--with-dbus-services=<dir>], [where the D-Bus services directory is located.])])
1446 DBUS_SERVICES_DIR=""
1448 if test x"$enable_dbus" = "xyes" ; then
1449 AC_MSG_CHECKING([location of the D-Bus services directory])
1450 if ! test -z "$with_dbus_services" ; then
1451 if ! test -d "$with_dbus_services" ; then
1452 AC_MSG_ERROR([$with_dbus_services does not exist, if this is the correct location please make sure that it exists.])
1455 DBUS_SERVICES_DIR="$with_dbus_services"
1457 if test x"$prefix" = x"NONE" ; then
1458 dnl # no prefix given, so we look for the correct dbus system paths.
1459 dnl # if a prefix is given, we use it.
1461 serviceprefixes="$prefix/share $prefix/lib /usr/share /usr/local/share"
1462 DBUS_SERVICES_DIR=""
1464 for d in $serviceprefixes ; do
1465 dir="$d/dbus-1/services"
1466 if test -d $dir ; then
1467 DBUS_SERVICES_DIR="$dir"
1472 if test -z $DBUS_SERVICES_DIR ; then
1473 AC_MSG_ERROR([D-Bus services directory was not found! Please use --with-dbus-services and specify its location.])
1476 DBUS_SERVICES_DIR="$datadir/dbus-1/services"
1479 AC_MSG_RESULT([$DBUS_SERVICES_DIR])
1480 AC_DEFINE(HAVE_DBUS, 1, [Define if we are using D-Bus.])
1482 AC_SUBST(DBUS_SERVICES_DIR)
1484 if test "x$enable_dbus" = "xyes" ; then
1485 echo "Building with D-Bus support"
1487 echo "Building without D-Bus support"
1490 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
1492 dnl Check for Python headers (currently useful only for libgnt)
1493 dnl (Thanks to XChat)
1494 if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ; then
1495 AC_MSG_CHECKING(for Python compile flags)
1496 PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
1497 PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'`
1498 changequote(<<, >>)dnl
1499 PY_VERSION=`$PYTHON -c 'import sys ; print sys.version[0:3]'`
1500 PY_MAJOR=`$PYTHON -c 'import sys ; print sys.version[0:2]'`
1501 changequote([, ])dnl
1502 if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then
1504 AC_CHECK_LIB(pthread, pthread_create, )
1505 AC_CHECK_LIB(util, openpty, )
1506 AC_CHECK_LIB(db, dbopen, )
1507 PY_LIBS="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config -lpython$PY_VERSION"
1508 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
1509 AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.])
1510 dnl Because the above AC_CHECK_LIB get in the way...
1511 AC_MSG_CHECKING(for Python compile flags)
1514 AC_MSG_RESULT([Can't find Python.h])
1522 dnl #######################################################################
1523 dnl # Check for Mono support
1524 dnl #######################################################################
1525 AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support (experimental)])], , enable_mono=no)
1526 if test x"$enable_mono" = x"yes" ; then
1527 PKG_CHECK_MODULES(MONO, mono, [
1528 AC_SUBST(MONO_CFLAGS)
1534 Mono development headers not found.
1535 Use --disable-mono if you do not need Mono support.
1538 if test x"$enable_mono" = x"yes"; then
1540 LIBS="$LIBS $MONO_LIBS"
1541 AC_MSG_CHECKING(for libmono)
1542 AC_CHECK_FUNCS(mono_jit_init, [], enable_mono=no)
1545 oldCPPFLAGS="$CPPFLAGS"
1546 CPPFLAGS="$CPPFLAGS $MONO_CFLAGS"
1547 AC_CHECK_HEADERS(mono/jit/jit.h, [], enable_mono=no)
1548 AC_CHECK_HEADERS(mono/metadata/object.h, [], enable_mono=no)
1549 CPPFLAGS="$oldCPPFLAGS"
1551 AC_DEFINE(ENABLE_MONO, 1, [Define if mono enabled.])
1559 AC_SUBST(MONO_CFLAGS)
1561 AM_CONDITIONAL(USE_MONO, test x"$enable_mono" = x"yes")
1563 dnl #######################################################################
1564 dnl # Check for Perl support
1565 dnl #######################################################################
1566 AC_ARG_ENABLE(perl, [AC_HELP_STRING([--disable-perl], [compile without perl scripting])], , enable_perl=yes)
1568 if test "$enable_plugins" = no ; then
1571 looked_for_perl="no"
1572 if test "$enable_perl" = yes ; then
1573 looked_for_perl="yes"
1574 AC_PATH_PROG(perlpath, perl)
1575 AC_MSG_CHECKING(for Perl compile flags)
1576 PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
1577 if test "_$PERL_CFLAGS" = _ ; then
1578 AC_MSG_RESULT([not found, building without perl.])
1581 PERL_LIBS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null |$sedpath 's/-lgdbm //'`
1582 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-ldb //'`
1583 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lndbm //'`
1584 if test "$system" = "Linux"; then
1585 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lnsl //'`
1586 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lposix //'`
1588 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lc //'`
1592 LIBS="$LIBS $PERL_LIBS"
1593 AC_MSG_CHECKING(for libperl)
1594 AC_CHECK_FUNCS(perl_run, [], enable_perl=no)
1597 oldCPPFLAGS="$CPPFLAGS"
1598 CPPFLAGS="$CPPFLAGS $PERL_CFLAGS"
1599 AC_CHECK_HEADERS(EXTERN.h)
1600 AC_CHECK_HEADERS(perl.h, [], enable_perl=no,
1602 # include <EXTERN.h>
1604 CPPFLAGS="$oldCPPFLAGS"
1608 if test "$enable_perl" = yes ; then
1609 AC_PROG_PERL_MODULES(ExtUtils::MakeMaker, , have_makemaker=no)
1611 if test "x$have_makemaker" = "xno"; then
1615 AM_CONDITIONAL(USE_PERL, false)
1616 AC_MSG_WARN(Compiling perl requires ExtUtils::MakeMaker)
1618 AC_DEFINE(HAVE_PERL, [1], [Compile with support for perl])
1619 AC_SUBST(PERL_CFLAGS)
1621 AM_CONDITIONAL(USE_PERL, true)
1623 dnl This is almost definitely wrong, but in case there's
1624 dnl something I'm missing, I'll leave it in.
1625 AC_CHECK_FUNCS(Perl_eval_pv)
1627 AC_MSG_CHECKING(for old perl)
1628 PERL_OLD=`$perlpath -e 'if($]<5.006){printf"yes\n";}else{printf"no\n";}'`
1630 if test "x$PERL_OLD" = "xyes"; then
1631 AC_DEFINE(OLD_PERL, 1, [Define if old perl is installed.])
1637 AC_MSG_CHECKING(for DynaLoader.a)
1638 DYNALOADER_A=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*([[^ ]]*DynaLoader\.a).*/\2/'`
1640 dnl Don't check libperl.a if dynaloader.a wasn't found.
1641 if test -n "$DYNALOADER_A"; then
1644 dnl Find either libperl.a or libperl.so
1645 AC_MSG_CHECKING(for libperl.a or libperl.so)
1646 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 } } };'`
1647 if test -z "$LIBPERL_A"; then
1653 if test "$LIBPERL_A" = "-lperl"; then
1658 PERL_LIBS=`echo $PERL_LIBS | $perlpath -pe 's/^(.* )*[[^ ]]*DynaLoader\.a/\1libperl_dynaloader.la/'`
1660 if test -n "$LIBPERL_A"; then
1661 PERL_LIBS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lperl /libperl_orig.la /' -e 's/-lperl$/libperl_orig.la$/'`
1664 AC_SUBST(DYNALOADER_A)
1673 AM_CONDITIONAL(USE_PERL, false)
1676 if test "x$looked_for_perl" = "xyes" -a "x$enable_perl" = "xno" -a "x$force_deps" = "xyes"; then
1678 Perl development headers not found.
1679 Use --disable-perl if you do not need Perl scripting support.
1683 dnl #######################################################################
1686 dnl # Thanks go to Evolution for the checks.
1687 dnl #######################################################################
1689 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])
1691 SSL_CERTIFICATES_DIR=""
1692 if ! test -z "$ssl_certificates_dir" ; then
1693 if test "x$ssl_certificates_dir" = "xyes" ; then
1694 AC_MSG_ERROR([--with-system-ssl-certs requires that a location is specified, eg. --with-system-ssl-certs=/etc/pki/tls/certs])
1696 if ! test -d "$ssl_certificates_dir" ; then
1697 AC_MSG_ERROR([$ssl_certificates_dir does not exist, if this is the correct location please make sure that it exists.])
1699 SSL_CERTIFICATES_DIR="$ssl_certificates_dir"
1701 AC_SUBST(SSL_CERTIFICATES_DIR)
1702 AM_CONDITIONAL(INSTALL_SSL_CERTIFICATES, test "x$SSL_CERTIFICATES_DIR" = "x")
1704 dnl These two are inverses of each other <-- stolen from evolution!
1706 AC_ARG_ENABLE(gnutls,
1707 [ --enable-gnutls=[yes,no] attempt to use GnuTLS for SSL support [default=yes]],
1708 [enable_gnutls="$enableval"],
1709 [enable_gnutls="yes"])
1712 [ --enable-nss=[yes,no,static] attempt to use Mozilla libnss for SSL support [default=yes]],
1713 [enable_nss="$enableval"],
1716 msg_ssl="None. MSN, Yahoo!, Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!"
1717 looked_for_gnutls="no"
1719 dnl # Check for GnuTLS if it's specified.
1721 if test "x$enable_gnutls" != "xno"; then
1723 prefix=`eval echo $prefix`
1724 looked_for_gnutls="yes"
1726 AC_ARG_WITH(gnutls-includes,
1727 [ --with-gnutls-includes=PREFIX location of GnuTLS includes.],
1728 [ with_gnutls_includes="$withval" ],
1729 [ with_gnutls_includes="$prefix/include" ])
1731 have_gnutls_includes="no"
1733 if test "x$with_gnutls_includes" != "xno"; then
1734 CPPFLAGS_save="$CPPFLAGS"
1736 AC_MSG_CHECKING(for GnuTLS includes)
1739 CPPFLAGS="$CPPFLAGS -I$with_gnutls_includes"
1740 AC_CHECK_HEADERS(gnutls/gnutls.h, [ gnutls_includes="yes" ])
1741 CPPFLAGS="$CPPFLAGS_save"
1743 if test "x$gnutls_includes" != "xno" -a \
1744 "x$gnutls_includes" != "x"; then
1745 have_gnutls_includes="yes"
1747 if test "x$with_gnutls_includes" != "xNONE/include"; then
1748 GNUTLS_CFLAGS="-I$with_gnutls_includes"
1754 AC_MSG_CHECKING(for GnuTLS includes)
1758 AC_ARG_WITH(gnutls-libs,
1759 [AC_HELP_STRING([--with-gnutls-libs=PREFIX], [location of GnuTLS libraries.])],
1760 [ with_gnutls_libs="$withval" ])
1762 if test "x$with_gnutls_libs" != "xno" -a \
1763 "x$have_gnutls_includes" != "xno"; then
1767 case $with_gnutls_libs in
1769 *) with_gnutls_libs="-L$with_gnutls_libs" ;;
1772 AC_CACHE_CHECK([for GnuTLS libraries], ac_cv_gnutls_libs,
1774 LIBS="$LIBS $with_gnutls_libs -lgnutls -lgcrypt"
1775 AC_TRY_LINK_FUNC(gnutls_init, ac_cv_gnutls_libs="yes", ac_cv_gnutls_libs="no")
1779 if test "x$ac_cv_gnutls_libs" != "xno"; then
1780 AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GnuTLS])
1783 GNUTLS_LIBS="$with_gnutls_libs -lgnutls -lgcrypt"
1791 AC_MSG_CHECKING(for GnuTLS libraries)
1799 AC_SUBST(GNUTLS_CFLAGS)
1800 AC_SUBST(GNUTLS_LIBS)
1802 if test "x$enable_gnutls" = "xyes"; then
1803 AC_MSG_CHECKING(for gnutls_priority_set_direct and gnutls_priority_set)
1805 LIBS="$LIBS $GNUTLS_LIBS"
1806 CPPFLAGS_save="$CPPFLAGS"
1807 CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
1808 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
1809 [[gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL); gnutls_priority_set(s, NULL);]])],
1810 [AC_DEFINE([HAVE_GNUTLS_PRIORITY_FUNCS], 1,
1811 [Define if your gnutls has gnutls_priority_set_direct and friends])
1812 AC_MSG_RESULT(yes)],
1813 [AC_MSG_RESULT(no)])
1814 CPPFLAGS="$CPPFLAGS_save"
1818 if test "x$enable_gnutls" = "xyes"; then
1819 AC_MSG_CHECKING(for GNUTLS_CERT_INSECURE_ALGORITHM)
1821 LIBS="$LIBS $GNUTLS_LIBS"
1822 CPPFLAGS_save="$CPPFLAGS"
1823 CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
1824 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
1825 [[unsigned int verify = GNUTLS_CERT_INSECURE_ALGORITHM;]])],
1826 [AC_DEFINE([HAVE_GNUTLS_CERT_INSECURE_ALGORITHM], 1,
1827 [Define if your gnutls has the GNUTLS_CERT_INSECURE_ALGORITHM flag])
1828 AC_MSG_RESULT(yes)],
1829 [AC_MSG_RESULT(no)])
1830 CPPFLAGS="$CPPFLAGS_save"
1835 AM_CONDITIONAL(USE_GNUTLS, test "x$enable_gnutls" = "xyes")
1839 dnl # Check for NSS if it's specified, or if GnuTLS checks failed.
1842 if test "x$enable_nss" != "xno"; then
1843 looked_for_nss="yes"
1845 AC_ARG_WITH(nspr-includes,
1846 [AC_HELP_STRING([--with-nspr-includes=PREFIX], [specify location of Mozilla nspr4 includes.])],
1847 [with_nspr_includes="$withval"])
1849 AC_ARG_WITH(nspr-libs,
1850 [AC_HELP_STRING([--with-nspr-libs=PREFIX], [specify location of Mozilla nspr4 libs.])],
1851 [with_nspr_libs="$withval"])
1853 AC_ARG_WITH(nss-includes,
1854 [AC_HELP_STRING([--with-nss-includes=PREFIX], [specify location of Mozilla nss3 includes.])],
1855 [with_nss_includes="$withval"])
1857 AC_ARG_WITH(nss-libs,
1858 [AC_HELP_STRING([--with-nss-libs=PREFIX], [specify location of Mozilla nss3 libs.])],
1859 [with_nss_libs="$withval"])
1862 if test -n "$with_nspr_includes" || test -n "$with_nspr_libs" || \
1863 test -n "$with_nss_includes" || test -n "$with_nss_libs" ||
1864 test "x$enable_nss" = "xstatic"; then
1866 nss_manual_check="yes"
1868 nss_manual_check="no"
1873 if test "x$nss_manual_check" = "xno"; then
1874 if `$PKG_CONFIG --exists mozilla-nss`; then
1875 PKG_CHECK_MODULES(NSS, mozilla-nss, [
1881 mozilla_nspr="mozilla-nspr"
1882 mozilla_nss="mozilla-nss"
1883 elif `$PKG_CONFIG --exists nss`; then
1884 PKG_CHECK_MODULES(NSS, nss, [
1892 elif `$PKG_CONFIG --exists microb-engine-nss`; then
1893 PKG_CHECK_MODULES(NSS, microb-engine-nss, [
1899 mozilla_nspr="mozilla-nspr"
1900 mozilla_nss="microb-engine-nss"
1903 if test "x$have_nss" = "xyes"; then
1905 AC_DEFINE(HAVE_NSS, 1, [Define if you have Mozilla NSS])
1906 AC_DEFINE(HAVE_SSL, 1, [Define if you have SSL])
1908 msg_nss="Mozilla NSS"
1911 nss_manual_check="yes"
1915 if test "x$nss_manual_check" = "xyes"; then
1917 have_nspr_includes="no"
1919 if test "x$with_nspr_includes" != "xno"; then
1920 CPPFLAGS_save=$CPPFLAGS
1922 AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)
1925 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
1926 AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ])
1927 CPPFLAGS=$CPPFLAGS_save
1929 if test "x$moz_nspr_includes" != "xno" -a \
1930 "x$moz_nspr_includes" != "x"; then
1932 have_nspr_includes="yes"
1933 NSPR_CFLAGS="-I$with_nspr_includes"
1936 AC_MSG_CHECKING(for Mozilla nspr4 includes)
1944 if test "x$with_nspr_libs" != "xno" -a \
1945 "x$have_nspr_includes" != "xno"; then
1948 LDFLAGS_save=$LDFLAGS
1950 if test "$enable_nss" = "static"; then
1951 if test -z "$with_nspr_libs"; then
1953 [Static linkage requested, but path to nspr libraries not set.]
1954 [Please specify the path to libnspr4.a]
1955 [Example: --with-nspr-libs=/usr/lib])
1959 nsprlibs="$LIBDL $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB"
1962 nsprlibs="$LIBDL -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
1965 AC_CACHE_CHECK([for Mozilla nspr libraries], ac_cv_moz_nspr_libs,
1968 CFLAGS="$CFLAGS $NSPR_CFLAGS"
1972 if test "x$with_nspr_libs" != "x"; then
1973 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
1978 AC_TRY_LINK_FUNC(PR_Init,
1979 [ac_cv_moz_nspr_libs="yes"],
1980 [ac_cv_moz_nspr_libs="no"])
1983 LDFLAGS=$LDFLAGS_save
1987 if test "x$ac_cv_moz_nspr_libs" != "xno"; then
1988 have_nspr_libs="yes"
1989 NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
1995 AC_MSG_CHECKING(for Mozilla nspr4 libraries)
1999 have_nss_includes="no"
2001 if test "x$with_nss_includes" != "xno" -a \
2002 "x$have_nspr_libs" != "xno"; then
2004 CPPFLAGS_save=$CPPFLAGS
2006 AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)
2009 if test "x$with_nspr_includes" != "x"; then
2010 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
2012 CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
2015 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
2016 [moz_nss_includes="yes"],
2017 [moz_nss_includes="no"])
2019 CPPFLAGS=$CPPFLAGS_save
2021 if test "x$moz_nss_includes" = "xyes"; then
2022 have_nss_includes="yes"
2023 NSS_CFLAGS="-I$with_nss_includes"
2030 AC_MSG_CHECKING(for Mozilla nss3 includes)
2035 if test "x$with_nss_libs" != "xno" -a \
2036 "x$have_nss_includes" != "xno"; then
2038 LDFLAGS_save=$LDFLAGS
2040 if test "$enable_nss" = "static"; then
2041 if test -z "$with_nss_libs"; then
2043 [Static linkage requested, but path to nss libraries not set.]
2044 [Please specify the path to libnss3.a]
2045 [Example: --with-nspr-libs=/usr/lib/mozilla])
2048 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"
2052 nsslibs="$nsslibs $with_nss_libs/libfreeb1.a"
2057 nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
2060 AC_CACHE_CHECK([for Mozilla nss libraries], ac_cv_moz_nss_libs,
2063 LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
2064 LIBS="$nsslibs $nsprlibs"
2066 AC_TRY_LINK_FUNC(NSS_Init,
2067 [ac_cv_moz_nss_libs="yes"],
2068 [ac_cv_moz_nss_libs="no"])
2070 if test "x$ac_cv_moz_nss_libs" = "xno"; then
2071 nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
2072 LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
2073 LIBS="$LIBS $nsslibs"
2074 AC_TRY_LINK_FUNC(NSS_Init,
2075 [ac_cv_moz_nss_libs="yes"],
2076 [ac_cv_moz_nss_libs="no"])
2079 LDFLAGS=$LDFLAGS_save
2083 if test "x$ac_cv_moz_nss_libs" != "xno"; then
2087 NSS_LIBS="-L$with_nss_libs $nsslibs"
2089 if test "$enable_nss" = "static"; then
2090 msg_nss="Mozilla NSS (static)"
2092 msg_nss="Mozilla NSS"
2103 AC_MSG_CHECKING(for Mozilla nss libraries)
2107 NSS_CFLAGS="$NSPR_CFLAGS $NSS_CFLAGS"
2108 NSS_LIBS="$NSPR_LIBS $NSS_LIBS"
2111 AC_SUBST(NSS_CFLAGS)
2115 AM_CONDITIONAL(USE_NSS, test "x$enable_nss" = "xyes")
2117 if test "x$msg_nss" != "x" -a "x$msg_gnutls" != "x"; then
2118 msg_ssl="$msg_nss and $msg_gnutls"
2119 elif test "x$msg_nss" != "x"; then
2121 elif test "x$msg_gnutls" != "x"; then
2123 elif test "x$looked_for_gnutls" = "xyes" -a "x$looked_for_nss" = "xyes" -a "x$force_deps" = "xyes" ; then
2125 Neither GnuTLS or NSS SSL development headers found.
2126 Use --disable-nss --disable-gnutls if you do not need SSL support.
2127 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!
2129 elif test "x$looked_for_gnutls" = "xyes" -a "x$force_deps" = "xyes" ; then
2131 GnuTLS SSL development headers not found.
2132 Use --disable-gnutls if you do not need SSL support.
2133 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without SSL support.
2135 elif test "x$looked_for_nss" = "xyes" -a "x$force_deps" = "xyes" ; then
2137 NSS SSL development headers not found.
2138 Use --disable-nss if you do not need SSL support.
2139 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without SSL support.
2143 dnl #######################################################################
2145 dnl #######################################################################
2146 AC_ARG_ENABLE(tcl, [AC_HELP_STRING([--disable-tcl],
2147 [compile without Tcl scripting])], enable_tcl="$enableval", enable_tcl="yes")
2148 AC_ARG_WITH(tclconfig, [AC_HELP_STRING([--with-tclconfig=DIR],
2149 [directory containing tclConfig.sh])])
2151 if test "$enable_plugins" = no; then
2155 if test "$enable_tcl" = yes; then
2156 AC_MSG_CHECKING([for tclConfig.sh])
2158 TCLCONFIGDIRS="/usr/lib \
2166 /System/Library/Tcl/8.3 \
2168 for dir in $with_tclconfig $TCLCONFIGDIRS; do
2169 if test -f $dir/tclConfig.sh; then
2170 TCLCONFIG=$dir/tclConfig.sh
2171 AC_MSG_RESULT([yes ($TCLCONFIG)])
2175 if test "$TCLCONFIG" = "no"; then
2178 if test "x$force_deps" = "xyes" ; then
2180 Tcl development headers not found.
2181 Use --disable-tcl if you do not need Tcl scripting support.
2186 AC_MSG_CHECKING([Tcl version compatability])
2187 if test "$TCL_MAJOR_VERSION" -ne 8 -o "$TCL_MINOR_VERSION" -lt 3; then
2188 AC_MSG_RESULT([bad, $TCL_VERSION found but 8.3 or later required])
2191 AC_MSG_RESULT([ok, $TCL_VERSION])
2192 eval "TCL_LIB_SPEC=\"$TCL_LIB_SPEC\""
2193 AC_MSG_CHECKING([for Tcl linkability])
2194 oldCPPFLAGS=$CPPFLAGS
2195 CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
2197 LIBS="$LIBS $TCL_LIB_SPEC"
2198 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <tcl.h>]],
2199 [[Tcl_Interp *interp=NULL; Tcl_Init(interp)]])],
2200 [AC_MSG_RESULT([yes]);enable_tcl=yes],
2201 [AC_MSG_RESULT([no]);enable_tcl=no])
2202 CPPFLAGS="$oldCPPFLAGS"
2208 if test "$enable_tcl" = yes; then
2209 AM_CONDITIONAL(USE_TCL, true)
2210 TCL_LIBS=$TCL_LIB_SPEC
2211 AC_DEFINE(HAVE_TCL, [1], [Compile with support for the Tcl toolkit])
2213 TCL_CFLAGS="$TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
2214 if test "x$GCC" = "xyes"; then
2215 TCL_CFLAGS="$TCL_CFLAGS -fno-strict-aliasing"
2217 AC_SUBST(TCL_CFLAGS)
2219 AM_CONDITIONAL(USE_TCL, false)
2222 dnl #######################################################################
2224 dnl #######################################################################
2225 AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk],
2226 [compile without Tcl support for Tk])], enable_tk="$enableval", enable_tk="yes")
2227 AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR],
2228 [directory containing tkConfig.sh])])
2230 if test "$enable_tcl" = yes -a "$enable_tk" = yes; then
2231 AC_MSG_CHECKING([for tkConfig.sh])
2233 TKCONFIGDIRS="/usr/lib \
2240 for dir in $with_tkconfig $TKCONFIGDIRS; do
2241 if test -f $dir/tkConfig.sh; then
2242 TKCONFIG=$dir/tkConfig.sh
2243 AC_MSG_RESULT([yes ($TKCONFIG)])
2247 if test "$TKCONFIG" = "no"; then
2250 if test "x$force_deps" = "xyes" ; then
2252 Tk development headers not found.
2253 Use --disable-tk if you do not need Tk scripting support.
2258 eval "TK_LIB_SPEC=\"$TK_LIB_SPEC\""
2259 AC_MSG_CHECKING([for Tk linkability])
2260 oldCPPFLAGS=$CPPFLAGS
2261 CPPFLAGS="$CPPFLAGS $TCL_CFLAGS"
2263 LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC"
2264 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <tk.h>]],
2265 [[Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);]])],
2266 [AC_MSG_RESULT([yes]);enable_tk=yes],
2267 [AC_MSG_RESULT([no]);enable_tk=no])
2268 CPPFLAGS="$oldCPPFLAGS"
2275 if test "$enable_tk" = yes; then
2276 AM_CONDITIONAL(USE_TK, true)
2277 AC_DEFINE(HAVE_TK, [1], [Compile with support for the Tk toolkit])
2278 TK_LIBS=$TK_LIB_SPEC
2281 AM_CONDITIONAL(USE_TK, false)
2284 if test "$ac_cv_cygwin" = yes ; then
2285 LDADD="$LDADD -static"
2286 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2289 AC_SUBST(DEBUG_CFLAGS)
2293 if test "x$enable_plugins" = "xyes" ; then
2294 AC_DEFINE(PURPLE_PLUGINS, 1, [Define if plugins are enabled.])
2295 AM_CONDITIONAL(PLUGINS, true)
2296 PLUGINS_DEFINE="#define PURPLE_PLUGINS 1"
2298 AM_CONDITIONAL(PLUGINS, false)
2299 PLUGINS_DEFINE="#undef PURPLE_PLUGINS"
2301 AC_SUBST(PLUGINS_DEFINE)
2303 dnl #######################################################################
2304 dnl # Check for Cyrus-SASL (for Jabber)
2305 dnl #######################################################################
2306 dnl AC_CHECK_SIZEOF(short)
2307 AC_CHECK_FUNCS(snprintf connect)
2309 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)
2310 if test "x$enable_cyrus_sasl" = "xyes" ; then
2311 AC_CHECK_LIB(sasl2, sasl_client_init, [
2312 AM_CONDITIONAL(USE_CYRUS_SASL, true)
2313 AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present])
2316 AM_CONDITIONAL(USE_CYRUS_SASL, false)
2317 AC_MSG_ERROR([Cyrus SASL library not found])
2320 AM_CONDITIONAL(USE_CYRUS_SASL, false)
2323 dnl #######################################################################
2324 dnl # Check for Kerberos (for Zephyr)
2325 dnl #######################################################################
2326 AC_DEFINE(ZEPHYR_INT32, long, [Size of an int32.])
2327 AC_SUBST(KRB4_CFLAGS)
2328 AC_SUBST(KRB4_LDFLAGS)
2330 if test "$kerberos" != "no" ; then
2331 if test "$kerberos" != "yes" ; then
2332 KRB4_CFLAGS="-I${kerberos}/include"
2333 if test -d "$kerberos/include/kerberosIV" ; then
2334 KRB4_CFLAGS="$KRB4_CFLAGS -I${kerberos}/include/kerberosIV"
2336 KRB4_LDFLAGS="-L${kerberos}/lib"
2337 elif test -d /usr/local/include/kerberosIV ; then
2338 KRB4_CFLAGS="-I/usr/local/include/kerberosIV"
2339 elif test -d /usr/include/kerberosIV ; then
2340 KRB4_CFLAGS="-I/usr/include/kerberosIV"
2342 AC_DEFINE(ZEPHYR_USES_KERBEROS, 1, [Define if kerberos should be used in Zephyr.])
2344 orig_LDFLAGS="$LDFLAGS"
2345 LDFLAGS="$LDFLAGS $KRB4_LDFLAGS"
2346 AC_CHECK_LIB(krb4, krb_rd_req,
2347 [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
2348 [AC_CHECK_LIB(krb, krb_rd_req,
2349 [KRB4_LIBS="-lkrb -ldes"],
2350 [AC_MSG_ERROR([Kerberos 4 libraries not found])],
2352 -ldes425 -lkrb5 -lk5crypto -lcom_err)
2354 LIBS="$LIBS $KRB4_LIBS"
2355 AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm)
2356 AC_CHECK_FUNCS(krb_get_err_text krb_log)
2358 LDFLAGS="$orig_LDFLAGS"
2361 dnl #######################################################################
2362 dnl # Check for external libzephyr
2363 dnl #######################################################################
2364 AC_SUBST(ZEPHYR_CFLAGS)
2365 AC_SUBST(ZEPHYR_LDFLAGS)
2366 AC_SUBST(ZEPHYR_LIBS)
2367 if test "$zephyr" != "no" ; then
2368 if test "$zephyr" != "yes" ; then
2369 ZEPHYR_CFLAGS="-I${zephyr}/include"
2370 ZEPHYR_LDFLAGS="-L${zephyr}/lib"
2371 elif test -d /usr/athena/include/zephyr ; then
2372 ZEPHYR_CFLAGS="-I/usr/athena/include"
2373 elif test -d /usr/include/zephyr ; then
2374 ZEPHYR_CFLAGS="-I/usr/include"
2375 elif test -d /usr/local/include/zephyr ; then
2376 ZEPHYR_CFLAGS="-I/usr/local/include"
2378 AC_DEFINE(LIBZEPHYR_EXT, 1 , [Define if external libzephyr should be used.])
2379 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
2380 orig_LDFLAGS="$LDFLAGS"
2381 LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS"
2382 AC_CHECK_LIB(zephyr, ZInitialize,
2383 [ZEPHYR_LIBS="-lzephyr"],
2384 [AC_MSG_ERROR([Zephyr libraries not found])],
2388 LDFLAGS="$orig_LDFLAGS"
2391 AC_MSG_CHECKING(for me pot o' gold)
2393 AC_CHECK_FUNCS(gethostid lrand48 timegm)
2394 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
2395 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
2396 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
2397 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
2398 AC_CHECK_HEADERS(termios.h)
2400 # sys/sysctl.h on OpenBSD 4.2 requires sys/param.h
2401 # sys/sysctl.h on FreeBSD requires sys/types.h
2402 AC_CHECK_HEADERS(sys/param.h)
2403 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
2405 #include <sys/types.h>
2407 # include <sys/param.h>
2411 AC_CHECK_HEADERS(sys/socket.h)
2412 AC_VAR_TIMEZONE_EXTERNALS
2414 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
2415 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2420 ]])], [ac_cv_struct_tm_gmtoff=yes], [ac_cv_struct_tm_gmtoff=no]))
2421 if test $ac_cv_struct_tm_gmtoff = yes; then
2422 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
2425 AC_CACHE_CHECK([whether va_lists can be copied by value], ac_cv_va_val_copy,[
2426 AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdarg.h>
2428 void f (int i, ...) {
2429 va_list args1, args2;
2430 va_start (args1, i);
2432 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
2434 va_end (args1); va_end (args2);
2440 [ac_cv_va_val_copy=yes],
2441 [ac_cv_va_val_copy=no],
2442 [ac_cv_va_val_copy=yes])
2445 if test "x$ac_cv_va_val_copy" = "xno"; then
2446 AC_DEFINE(VA_COPY_AS_ARRAY, 1, ['va_lists' cannot be copied as values])
2449 dnl #######################################################################
2450 dnl # Check for check
2451 dnl #######################################################################
2452 PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], , [AC_MSG_RESULT([no, testing is disabled])])
2453 AM_CONDITIONAL(HAVE_CHECK, [test "x$CHECK_LIBS" != "x"])
2454 AC_SUBST(CHECK_CFLAGS)
2455 AC_SUBST(CHECK_LIBS)
2457 dnl #######################################################################
2458 dnl # Disable pixmap installation
2459 dnl #######################################################################
2460 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)
2462 AM_CONDITIONAL(INSTALL_PIXMAPS, test "x$enable_pixmaps" = "xyes")
2464 dnl #######################################################################
2465 dnl # Tweak status tray icon installation directory
2466 dnl #######################################################################
2467 AC_ARG_ENABLE(trayicon-compat, AC_HELP_STRING([--enable-trayicon-compat], [install tray icons in location compatible with older releases of hicolor-icon-theme]), enable_traycompat="$enableval", enable_traycompat=no)
2469 AM_CONDITIONAL(ENABLE_TRAYCOMPAT, test "x$enable_traycompat" = "xyes")
2471 dnl #######################################################################
2472 dnl # Check for Doxygen and dot (part of GraphViz)
2473 dnl #######################################################################
2474 AC_ARG_ENABLE(doxygen,
2475 [AC_HELP_STRING([--disable-doxygen],
2476 [disable documentation with doxygen])],
2477 enable_doxygen="$enableval", enable_doxygen="yes")
2479 [AC_HELP_STRING([--disable-dot],
2480 [disable graphs in doxygen via 'dot'])],
2481 enable_dot="$enableval", enable_dot="yes")
2482 AC_ARG_ENABLE(devhelp,
2483 [AC_HELP_STRING([--disable-devhelp],
2484 [disable building index for devhelp documentation browser])],
2485 enable_devhelp="$enableval", enable_devhelp="yes")
2487 if test "x$enable_doxygen" = xyes; then
2488 AC_CHECK_PROG(DOXYGEN, doxygen, true, false)
2489 if test $DOXYGEN = false; then
2490 AC_MSG_WARN([*** Doxygen not found, docs will not be available])
2493 AC_DEFINE_UNQUOTED(HAVE_DOXYGEN, 1, [whether or not we have doxygen])
2495 if test "x$enable_dot" = "xyes"; then
2496 AC_CHECK_PROG(DOT, dot, true, false)
2498 if test $DOT = false; then
2500 AC_MSG_WARN([*** GraphViz dot not found, docs will not have graphs])
2502 AC_DEFINE_UNQUOTED(HAVE_DOT, 1, [whether or not we have dot])
2506 if test "x$enable_devhelp" = "xyes"; then
2507 AC_CHECK_PROG(XSLTPROC, xsltproc, true, false)
2509 if test $XSLTPROC = false; then
2510 enable_devhelp="no";
2511 AC_MSG_WARN([*** xsltproc not found; devhelp index will not be created])
2513 AC_DEFINE_UNQUOTED(HAVE_XSLTPROC, 1, [whether or not we have xsltproc for devhelp index])
2522 AC_SUBST(enable_doxygen)
2523 AC_SUBST(enable_dot)
2524 AC_SUBST(enable_devhelp)
2525 AM_CONDITIONAL(HAVE_DOXYGEN, test "x$enable_doxygen" = "xyes")
2526 AM_CONDITIONAL(HAVE_XSLTPROC, test "x$enable_devhelp" = "xyes")
2528 AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],
2529 [compile with debugging support])], , enable_debug=no)
2531 if test "x$enable_debug" = "xyes" ; then
2532 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2535 AM_CONDITIONAL(PURPLE_AVAILABLE, true)
2537 AC_CONFIG_FILES([Makefile
2546 pidgin/pidgin-uninstalled.pc
2548 pidgin/pidgin-2-uninstalled.pc
2549 pidgin/pixmaps/Makefile
2550 pidgin/pixmaps/emotes/default/24/Makefile
2551 pidgin/pixmaps/emotes/none/Makefile
2552 pidgin/pixmaps/emotes/small/16/Makefile
2553 pidgin/plugins/Makefile
2554 pidgin/plugins/cap/Makefile
2555 pidgin/plugins/disco/Makefile
2556 pidgin/plugins/gestures/Makefile
2557 pidgin/plugins/gevolution/Makefile
2558 pidgin/plugins/musicmessaging/Makefile
2559 pidgin/plugins/perl/Makefile
2560 pidgin/plugins/perl/common/Makefile.PL
2561 pidgin/plugins/ticker/Makefile
2562 libpurple/ciphers/Makefile
2563 libpurple/example/Makefile
2564 libpurple/gconf/Makefile
2566 libpurple/purple-uninstalled.pc
2567 libpurple/purple-2.pc
2568 libpurple/purple-2-uninstalled.pc
2569 libpurple/plugins/Makefile
2570 libpurple/plugins/mono/Makefile
2571 libpurple/plugins/mono/api/Makefile
2572 libpurple/plugins/mono/loader/Makefile
2573 libpurple/plugins/perl/Makefile
2574 libpurple/plugins/perl/common/Makefile.PL
2575 libpurple/plugins/ssl/Makefile
2576 libpurple/plugins/tcl/Makefile
2578 libpurple/protocols/Makefile
2579 libpurple/protocols/bonjour/Makefile
2580 libpurple/protocols/gg/Makefile
2581 libpurple/protocols/irc/Makefile
2582 libpurple/protocols/jabber/Makefile
2583 libpurple/protocols/msn/Makefile
2584 libpurple/protocols/myspace/Makefile
2585 libpurple/protocols/mxit/Makefile
2586 libpurple/protocols/novell/Makefile
2587 libpurple/protocols/null/Makefile
2588 libpurple/protocols/oscar/Makefile
2589 libpurple/protocols/sametime/Makefile
2590 libpurple/protocols/silc/Makefile
2591 libpurple/protocols/silc10/Makefile
2592 libpurple/protocols/simple/Makefile
2593 libpurple/protocols/yahoo/Makefile
2594 libpurple/protocols/zephyr/Makefile
2595 libpurple/tests/Makefile
2598 share/sounds/Makefile
2599 share/ca-certs/Makefile
2602 finch/libgnt/Makefile
2604 finch/libgnt/wms/Makefile
2605 finch/plugins/Makefile
2612 echo $PACKAGE $VERSION
2615 echo Build GTK+ 2.x UI............. : $enable_gtkui
2616 echo Build console UI.............. : $enable_consoleui
2617 echo Build for X11................. : $with_x
2619 echo Enable Gestures............... : $enable_gestures
2620 echo Protocols to build dynamically : $DYNAMIC_PRPLS
2621 echo Protocols to link statically.. : $STATIC_PRPLS
2623 echo Build with GStreamer support.. : $enable_gst
2624 echo Build with D-Bus support...... : $enable_dbus
2625 echo Build with voice and video.... : $enable_vv
2626 if test "x$enable_dbus" = "xyes" ; then
2627 eval eval echo D-Bus services directory...... : $DBUS_SERVICES_DIR
2629 echo Build with GNU Libidn......... : $enable_idn
2630 echo Build with NetworkManager..... : $enable_nm
2631 echo SSL Library/Libraries......... : $msg_ssl
2632 if test "x$SSL_CERTIFICATES_DIR" != "x" ; then
2633 eval eval echo SSL CA certificates directory. : $SSL_CERTIFICATES_DIR
2635 echo Build with Cyrus SASL support. : $enable_cyrus_sasl
2636 echo Use kerberos 4 with zephyr.... : $kerberos
2637 echo Use external libzephyr........ : $zephyr
2638 echo Use external libgadu.......... : $gadu_libs
2639 echo Install pixmaps............... : $enable_pixmaps
2640 echo Old tray icon compatibility... : $enable_traycompat
2641 echo Install translations.......... : $enable_i18n
2642 echo Has you....................... : yes
2644 echo Use XScreenSaver Extension.... : $enable_screensaver
2645 echo Use X Session Management...... : $enable_sm
2646 echo Use startup notification...... : $enable_startup_notification
2647 echo Build with GtkSpell support... : $enable_gtkspell
2649 echo Build with plugin support..... : $enable_plugins
2650 echo Build with Mono support....... : $enable_mono
2651 echo Build with Perl support....... : $enable_perl
2652 echo Build with Tcl support........ : $enable_tcl
2653 echo Build with Tk support......... : $enable_tk
2655 echo Print debugging messages...... : $enable_debug
2657 eval eval echo Pidgin will be installed in $bindir.
2658 if test "x$pidginpath" != "x" ; then
2659 echo Warning: You have an old copy of Pidgin at $pidginpath.
2661 if test "x$enable_pixmaps" = "xno" ; then
2663 echo Warning: You have disabled the installation of pixmap data, but Pidgin
2664 echo still requires installed pixmaps. Be sure you know what you are doing.
2666 if test "x$enable_i18n" = "xno" ; then
2668 echo Warning: You have disabled the building and installation of translation
2669 echo data. This will prevent building pidgin.desktop and the GConf schemas.
2670 echo Be sure you know what you are doing.
2673 echo configure complete, now type \'make\'