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], [0])
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 AC_MSG_CHECKING(for fileno())
206 AC_RUN_IFELSE([AC_LANG_SOURCE([[
209 int main(int argc, char *argv[])
219 AC_DEFINE([HAVE_FILENO], [1],
220 [Define to 1 if your stdio has int fileno(FILE *).])
224 # Fallback for Cross Compiling...
225 # This will enable the compatibility code.
229 AC_MSG_CHECKING(for the %z format string in strftime())
230 AC_RUN_IFELSE([AC_LANG_SOURCE([[
231 #ifdef HAVE_SYS_TIME_H
232 #include <sys/time.h>
240 time_t t = time(NULL);
242 if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5)
245 fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf);
247 return !((buf[0] == '-' || buf[0] == '+') &&
248 (buf[1] >= '0' && buf[1] <= '9') &&
249 (buf[2] >= '0' && buf[2] <= '9') &&
250 (buf[3] >= '0' && buf[3] <= '9') &&
251 (buf[4] >= '0' && buf[4] <= '9')
256 AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
257 [Define to 1 if you have a strftime() that supports the %z format string.])
261 # Fallback for Cross Compiling...
262 # This will enable the compatibility code.
266 # before gettexting, in case iconv matters
269 AC_CHECK_LIB(resolv, res_query)
271 AC_CHECK_HEADER(CoreFoundation/CoreFoundation.h, [
272 AC_CHECK_HEADER(IOKit/IOKitLib.h, [
273 AC_DEFINE(HAVE_IOKIT, 1, [Define if we have IOKit])
274 LIBS="$LIBS -framework IOKit -framework CoreFoundation"
278 AC_MSG_CHECKING([for fink])
280 AC_MSG_RESULT([found, adding /sw to search paths])
281 CPPFLAGS="$CPPFLAGS -I/sw/include"
282 LDFLAGS="$LDFLAGS -L/sw/lib"
284 AC_MSG_RESULT([not found])
291 dnl #######################################################################
292 dnl # Disable creation and installation of translation files
293 dnl #######################################################################
294 AC_ARG_ENABLE(nls, AC_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes)
296 if test x$enable_i18n = xyes; then
298 GETTEXT_PACKAGE=pidgin
299 AC_SUBST(GETTEXT_PACKAGE)
301 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"
304 dnl If we don't have msgfmt, then po/ is going to fail -- ensure that
305 dnl AM_GLIB_GNU_GETTEXT found it.
307 if test x$MSGFMT = xno -o x$MSGFMT$GMSGFMT$INTLTOOL_MSGFMT = x
311 The msgfmt command is required to build libpurple. If it is installed
312 on your system, ensure that it is in your path. If it is not, install
313 GNU gettext to continue.
315 If you have msgfmt installed, but for some reason this error message
316 is still displayed, you have encountered what appears to be a bug in
317 third-party configure macros. Try setting the MSGFMT environment
318 variable to the absolute path to your msgfmt binary and trying
319 configure again, like this:
321 MSGFMT=/path/to/msgfmt ./configure ...
326 AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes")
328 dnl #######################################################################
329 dnl # Check for GLib 2.16 (required)
330 dnl #######################################################################
331 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.16.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [
335 You must have GLib 2.16.0 or newer development headers installed to build.
337 If you have these installed already you may need to install pkg-config so
340 AC_SUBST(GLIB_CFLAGS)
343 GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
344 AC_SUBST(GLIB_GENMARSHAL)
346 AC_ARG_WITH([extraversion],
347 AC_HELP_STRING([--with-extraversion=STRING],
348 [extra version number to be displayed in Help->About and --help (for packagers)]),
349 EXTRA_VERSION=$withval)
351 if test x"$EXTRA_VERSION" != "x" ; then
352 AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION-$EXTRA_VERSION", [display version info])
354 AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION", [display version info])
357 AC_ARG_ENABLE(missing-dependencies, [AC_HELP_STRING([--disable-missing-dependencies],
358 [skip missing dependencies instead of aborting configure])],
359 force_deps="$enableval", force_deps="yes")
362 with_x="$withval", with_x="yes")
363 AC_ARG_ENABLE(gtkui, [AC_HELP_STRING([--disable-gtkui],
364 [compile without GTK+ user interface])],
365 enable_gtkui="$enableval", enable_gtkui="yes")
366 AC_ARG_ENABLE(consoleui, [AC_HELP_STRING([--disable-consoleui],
367 [compile without console user interface])],
368 [enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no])
370 dnl #######################################################################
371 dnl # Check for GTK+ 2.10 and other things used by the GTK UI
372 dnl #######################################################################
373 AC_ARG_ENABLE(screensaver,
374 [AC_HELP_STRING([--disable-screensaver],
375 [compile without X screensaver extension (used to detect idleness)])],
376 enable_screensaver="$enableval", enable_screensaver="yes")
378 [AC_HELP_STRING([--disable-sm],
379 [compile without X session management support])],
380 enable_sm="$enableval", enable_sm="yes")
381 AC_ARG_ENABLE(startup-notification,
382 [AC_HELP_STRING([--disable-startup-notification],
383 [compile without startup notification support])],
384 enable_startup_notification="$enableval", enable_startup_notification="yes")
385 AC_ARG_ENABLE(gtkspell,
386 [AC_HELP_STRING([--disable-gtkspell],
387 [compile without GtkSpell automatic spell checking])],
388 enable_gtkspell="$enableval", enable_gtkspell="yes")
389 AC_ARG_ENABLE(gevolution,
390 [AC_HELP_STRING([--enable-gevolution],
391 [compile with the Evolution plugin])],
392 enable_gevolution="$enableval", enable_gevolution="no")
394 [AC_HELP_STRING([--enable-cap],
395 [compile with Contact Availability Prediction plugin])],
396 enable_cap="$enableval", enable_cap="no")
397 AC_ARG_ENABLE(gestures,
398 [AC_HELP_STRING([--disable-gestures],
399 [compile without the gestures plugin])],
400 enable_gestures="$enableval", enable_gestures="yes")
403 # We can't assume that $x_libraries will be set, because autoconf does not
404 # set it in the case when the X libraries are in a standard place.
405 # Ditto for $x_includes
406 if test X"$x_libraries" = X"" || test X"$x_libraries" = XNONE; then
409 x_libpath_add="-L$x_libraries"
411 if test X"$x_includes" = X"" || test X"$x_includes" = XNONE; then
414 x_incpath_add="-I$x_includes"
417 if test "x$enable_gtkui" = "xyes" ; then
418 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0], , [
422 You must have GTK+ 2.10.0 or newer development headers installed to compile
423 Pidgin. If you want to build only Finch then specify --disable-gtkui when
430 dnl We only really need Pango >= 1.4 for decent RTL support
431 PKG_CHECK_MODULES(PANGO, [pango >= 1.4.0],
432 AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:)
434 dnl #######################################################################
435 dnl # Check if we should compile with X support
436 dnl #######################################################################
437 if test "x$with_x" = "xyes" ; then
438 PKG_CHECK_MODULES(X11, x11,
439 [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])],
441 if test "x$x_incpath_add" != "x" -a "x$x_libpath_add" != "x"; then
442 X11_LIBS="$x_libpath_add"
443 X11_CFLAGS="$x_incpath_add"
446 if test "x$force_deps" = "xyes" ; then
448 X11 development headers not found.
449 Use --without-x if you do not need X11 support.
457 enable_screensaver=no
462 dnl #######################################################################
463 dnl # Check for XScreenSaver
464 dnl #######################################################################
465 if test "x$enable_screensaver" = "xyes" ; then
466 if test "x$with_x" = "xyes" ; then
468 LIBS="$LIBS $GTK_LIBS $x_libpath_add"
471 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm])
472 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm])
473 if test "x$XSS_LIBS" != "x"; then
474 oldCPPFLAGS="$CPPFLAGS"
475 CPPFLAGS="$CPPFLAGS $x_incpath_add"
476 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
477 #include <X11/Xlib.h>
478 #include <X11/extensions/scrnsaver.h>
479 ]], [[]])], [], [enable_screensaver=no])
480 CPPFLAGS="$oldCPPFLAGS"
482 enable_screensaver=no
486 if test "x$enable_screensaver" = "xyes" ; then
487 AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])
490 if test "x$force_deps" = "xyes" ; then
492 XScreenSaver extension development headers not found.
493 Use --disable-screensaver if you do not need XScreenSaver extension support,
494 this is required for detecting idle time by mouse and keyboard usage.
499 AC_MSG_ERROR([X support is required to build with XScreenSaver extensions])
503 dnl #######################################################################
504 dnl # Check for X session management libs
505 dnl #######################################################################
506 if test "x$enable_sm" = "xyes"; then
507 if test "x$with_x" = "xyes" ; then
509 AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE])
510 if test "x$found_sm_lib" = "xtrue"; then
511 oldCPPFLAGS="$CPPFLAGS"
512 CPPFLAGS="$CPPFLAGS $x_incpath_add"
513 AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes)
514 CPPFLAGS="$oldCPPFLAGS"
517 if test "x$enable_sm" = "xyes"; then
518 AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.])
521 if test "x$force_deps" = "xyes" ; then
523 X session management development headers not found.
524 Use --disable-sm if you do not need session management support.
529 AC_MSG_ERROR([X support is required to build with X session management support])
533 dnl #######################################################################
534 dnl # Check for X11 to allow the gestures plugin
535 dnl #######################################################################
536 if test "x$enable_gestures" = "xyes"; then
537 if test "x$with_x" = "xno" ; then
542 dnl #######################################################################
543 dnl # Check for GtkSpell
544 dnl #######################################################################
545 if test "x$enable_gtkspell" = "xyes" ; then
546 PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , [
549 if test "x$force_deps" = "xyes" ; then
551 GtkSpell development headers not found.
552 Use --disable-gtkspell if you do not need it.
555 if test "x$enable_gtkspell" = "xyes" ; then
556 AC_DEFINE(USE_GTKSPELL, 1, [Define if we're using GtkSpell])
557 AC_SUBST(GTKSPELL_CFLAGS)
558 AC_SUBST(GTKSPELL_LIBS)
562 dnl #######################################################################
563 dnl # Check for stuff needed by the Evolution integration plugin.
564 dnl #######################################################################
565 if test "x$enable_gevolution" = "xyes"; then
566 evo_deps="libebook-1.2 libedata-book-1.2"
567 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, , [
568 enable_gevolution="no"
570 if test "x$enable_gevolution" = "xno"; then
571 evo_deps="libebook-1.0 libedata-book-1.0"
572 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [
573 enable_gevolution="yes"
576 if test "x$enable_gevolution" = "xyes"; then
577 AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.])
578 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
579 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
581 if test "x$force_deps" = "xyes" ; then
583 Evolution development headers not found.
584 Use --disable-gevolution if you do not need it.
590 dnl #######################################################################
591 dnl # Check for libsqlite3 (for the Contact Availability Prediction plugin)
592 dnl #######################################################################
593 if test "x$enable_cap" = "xyes"; then
594 PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[
597 if test "x$force_deps" = "xyes" ; then
599 sqlite3 development headers not found.
600 Use --disable-cap if you do not need the Contact Availability Prediction plugin.
610 enable_screensaver=no
612 enable_startup_notification=no
615 AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtkui" = "xyes")
616 AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$enable_gevolution" = "xyes")
617 AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes")
618 AM_CONDITIONAL(ENABLE_GESTURES, test "x$enable_gestures" = "xyes")
621 dnl #######################################################################
622 dnl # Check for ncurses and other things used by the console UI
623 dnl #######################################################################
626 AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR],
627 [compile finch against the ncurses includes in DIR])],
628 [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""])
629 if test "x$enable_consoleui" = "xyes"; then
630 AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no])
631 AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"],
632 [enable_consoleui=no], [$GNT_LIBS])
634 if test "x$enable_consoleui" = "xyes"; then
635 dnl # Some distros put the headers in ncursesw/, some don't
637 for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include
639 f="$location/ncurses.h"
640 orig_CFLAGS="$CFLAGS"
641 orig_CPPFLAGS="$CPPFLAGS"
642 CFLAGS="$CFLAGS -I$location"
643 CPPFLAGS="$CPPFLAGS -I$location"
645 AC_MSG_CHECKING([if $f supports wide characters])
646 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
647 #define _XOPEN_SOURCE_EXTENDED
651 # error get_wch not found!
655 if test x"$dir" != x"." ; then
662 CFLAGS="$orig_CFLAGS"
663 CPPFLAGS="$orig_CPPFLAGS"
667 CFLAGS="$orig_CFLAGS"
668 CPPFLAGS="$orig_CPPFLAGS"
674 if test x"$found_ncurses_h" = x"no" ; then
680 # ncursesw was not found. Look for plain old ncurses
682 AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no])
683 AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"],
684 [enable_consoleui=no], [$GNT_LIBS])
685 AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.])
686 if test x"$ac_ncurses_includes" != "x"; then
687 GNT_CFLAGS="-I$ac_ncurses_includes"
689 if test x"$NCURSES_HEADERS" != "x"; then
690 GNT_CFLAGS="-I$NCURSES_HEADERS"
696 if test "x$force_finch" = "xyes" -a "x$enable_consoleui" != "xyes"; then
699 Finch will not be built. You need to install ncursesw (or ncurses) and its development headers.
706 AM_CONDITIONAL(ENABLE_GNT, test "x$enable_consoleui" = "xyes")
708 #AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])])
710 dnl #######################################################################
711 dnl # Check for LibXML2 (required)
712 dnl #######################################################################
713 PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= 2.6.0], , [
716 You must have libxml2 >= 2.6.0 development headers installed to build.
718 PKG_CHECK_EXISTS([libxml-2.0 >= 2.6.18], , [
720 Versions of libxml2 < 2.6.18 may contain bugs that could cause XMPP messages to be discarded.
723 AC_SUBST(LIBXML_CFLAGS)
724 AC_SUBST(LIBXML_LIBS)
726 dnl #######################################################################
728 dnl #######################################################################
729 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
730 AM_CONDITIONAL(USE_GCONFTOOL, test "x$GCONFTOOL" != "xno")
733 dnl #######################################################################
734 dnl # Check for GStreamer
735 dnl #######################################################################
737 dnl TODO: Depend on gstreamer >= 0.10.10, and remove the conditional use of
738 dnl gst_registry_fork_set_enabled.
739 AC_ARG_ENABLE(gstreamer,
740 [AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
741 enable_gst="$enableval", enable_gst="yes")
742 if test "x$enable_gst" != "xno"; then
743 PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], [
744 AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
745 AC_SUBST(GSTREAMER_CFLAGS)
746 AC_SUBST(GSTREAMER_LIBS)
747 AC_CHECK_LIB(gstreamer-0.10, gst_registry_fork_set_enabled,
748 [ AC_DEFINE(GST_CAN_DISABLE_FORKING, [],
749 [Define if gst_registry_fork_set_enabled exists])],
750 [], [$GSTREAMER_LIBS])
754 if test "x$force_deps" = "xyes" ; then
756 GStreamer development headers not found.
757 Use --disable-gstreamer if you do not need GStreamer (sound) support.
762 dnl #######################################################################
763 dnl # Check for GStreamer Interfaces
764 dnl #######################################################################
765 if test "x$enable_gst" != "xno"; then
766 AC_ARG_ENABLE(gstreamer-interfaces,
767 [AC_HELP_STRING([--disable-gstreamer-interfaces], [compile without GStreamer interface support])],
768 enable_gstinterfaces="$enableval", enable_gstinterfaces="yes")
769 if test "x$enable_gstinterfaces" != "xno"; then
770 PKG_CHECK_MODULES(GSTINTERFACES, [gstreamer-interfaces-0.10], [
771 AC_DEFINE(USE_GSTINTERFACES, 1, [Use GStreamer interfaces for X overlay support])
772 AC_SUBST(GSTINTERFACES_CFLAGS)
773 AC_SUBST(GSTINTERFACES_LIBS)
775 enable_gstinterfaces="no"
779 enable_gstinterfaces="no"
782 dnl #######################################################################
783 dnl # Check for Farsight
784 dnl #######################################################################
785 AC_ARG_ENABLE(farsight,
786 [AC_HELP_STRING([--disable-farsight], [compile without farsight support])],
787 enable_farsight="$enableval", enable_farsight="yes")
788 if test "x$enable_farsight" != "xno"; then
789 PKG_CHECK_MODULES(FARSIGHT, [farsight2-0.10 >= 0.0.9], [
790 AC_DEFINE(USE_FARSIGHT, 1, [Use Farsight for voice and video])
791 AC_SUBST(FARSIGHT_CFLAGS)
792 AC_SUBST(FARSIGHT_LIBS)
798 dnl #######################################################################
799 dnl # Check for Voice and Video support
800 dnl #######################################################################
802 [AC_HELP_STRING([--disable-vv], [compile without voice and video support])],
803 enable_vv="$enableval", enable_vv="yes")
804 if test "x$enable_vv" != "xno"; then
805 if test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farsight" != "xno"; then
806 AC_DEFINE(USE_VV, 1, [Use voice and video])
809 if test "x$force_deps" = "xyes"; then
811 Dependencies for voice/video were not met.
812 Install the necessary gstreamer and farsight packages first.
813 Or use --disable-vv if you do not need voice/video support.
818 AM_CONDITIONAL(USE_VV, test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farsight" != "xno")
820 dnl #######################################################################
821 dnl # Check for Internationalized Domain Name support
822 dnl #######################################################################
825 [AC_HELP_STRING([--disable-idn], [compile without IDN support])],
826 [enable_idn="$enableval" force_idn=$enableval], [enable_idn="yes" force_idn=no])
827 if test "x$enable_idn" != "xno"; then
828 PKG_CHECK_MODULES(IDN, libidn >= 0.0.0, [
829 AC_DEFINE(USE_IDN, 1, [Use GNU Libidn for stringprep and IDN])
835 if test "x$force_deps" = "xyes" ; then
837 GNU Libidn development headers not found.
838 Use --disable-idn if you do not need it.
844 dnl #######################################################################
845 dnl # Check for Meanwhile headers (for Sametime)
846 dnl #######################################################################
847 AC_ARG_ENABLE(meanwhile,
848 [AC_HELP_STRING([--disable-meanwhile],
849 [compile without meanwhile (required for Sametime support)])],
850 enable_meanwhile="$enableval", enable_meanwhile="yes")
851 if test "x$enable_meanwhile" = "xyes"; then
852 PKG_CHECK_MODULES(MEANWHILE, [meanwhile >= 1.0.0 meanwhile < 2.0.0], [
856 if test "x$force_deps" = "xyes" ; then
858 Meanwhile development headers not found.
859 Use --disable-meanwhile if you do not need meanwhile (Sametime) support.
863 AC_SUBST(MEANWHILE_CFLAGS)
864 AC_SUBST(MEANWHILE_LIBS)
866 dnl #######################################################################
867 dnl # Check for Native Avahi headers (for Bonjour)
868 dnl #######################################################################
870 [AC_HELP_STRING([--disable-avahi],
871 [compile without avahi (required for Bonjour support)])],
872 enable_avahi="$enableval", enable_avahi="yes")
874 if test "x$enable_avahi" = "xyes"; then
875 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"])
876 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"])
880 dnl Attempt to autodetect Avahi
881 PKG_CHECK_MODULES(AVAHI, [avahi-client avahi-glib], [
889 dnl Override AVAHI_CFLAGS if the user specified an include dir
890 if test "$ac_avahi_client_includes" != "no"; then
891 AVAHI_CFLAGS="-I$ac_avahi_client_includes"
893 CPPFLAGS_save="$CPPFLAGS"
894 CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS"
895 AC_CHECK_HEADER(avahi-client/client.h, [avahiincludes=yes], [avahiincludes=no])
896 CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS $GLIB_CFLAGS"
897 AC_CHECK_HEADER(avahi-glib/glib-malloc.h, [avahiincludes=yes], [avahiincludes=no])
898 CPPFLAGS="$CPPFLAGS_save"
900 dnl Override AVAHI_LIBS if the user specified a libs dir
901 if test "$ac_avahi_client_libs" != "no"; then
902 AVAHI_LIBS="-L$ac_avahi_client_libs -lavahi-common -lavahi-client -lavahi-glib "
904 AC_CHECK_LIB(avahi-client, avahi_client_new, [avahilibs=yes], [avahilibs=no], $AVAHI_LIBS)
907 if test "x$enable_avahi" = "xyes" -a \( "x$avahiincludes" = "xno" -o "x$avahilibs" = "xno" \); then
909 if test "x$force_deps" = "xyes"; then
911 avahi development headers not found.
912 Use --disable-avahi if you do not need avahi (Bonjour) support.
916 AC_SUBST(AVAHI_CFLAGS)
920 dnl #######################################################################
921 dnl # Check for SILC client includes and libraries
922 dnl #######################################################################
923 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"])
924 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"])
928 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
929 silc_manual_check="yes"
931 silc_manual_check="no"
933 if test "x$silc_manual_check" = "xno"; then
934 PKG_CHECK_MODULES(SILC, [silcclient >= 1.1], [
941 if test "x$have_silc" = "xno"; then
942 PKG_CHECK_MODULES(SILC, silcclient, [
949 dnl If silcclient.pc wasn't found, check for just silc.pc
950 if test "x$have_silc" = "xno"; then
951 PKG_CHECK_MODULES(SILC, silc, [
961 if test "$ac_silc_includes" != "no"; then
962 SILC_CFLAGS="-I$ac_silc_includes"
964 CPPFLAGS_save="$CPPFLAGS"
965 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
966 AC_CHECK_HEADER(silc.h, [silcincludes=yes])
967 CPPFLAGS="$CPPFLAGS_save"
969 if test "$ac_silc_libs" != "no"; then
970 SILC_LIBS="-L$ac_silc_libs"
972 SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
973 AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS)
975 if test "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes"; then
978 CPPFLAGS_save="$CPPFLAGS"
979 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
980 AC_CHECK_HEADER(silcincludes.h, [silc10includes=yes])
981 CPPFLAGS="$CPPFLAGS_save"
983 SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
984 AC_CHECK_LIB(silcclient, silc_client_init, [silc10client=yes], , $SILC_LIBS)
985 if test "x$silc10includes" = "xyes" -a "x$silc10client" = "xyes"; then
991 AC_SUBST(SILC_CFLAGS)
992 dnl SILC Toolkit >= 1.0.1 has a new MIME API
993 if test "x$silcclient" = "xyes"; then
994 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
995 elif test "x$silc10client" = "xyes"; then
996 CPPFLAGS_save="$CPPFLAGS"
997 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
998 AC_MSG_CHECKING(for silcmime.h)
999 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1000 #include <silcincludes.h>
1001 #include <silcmime.h>
1004 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
1008 CPPFLAGS="$CPPFLAGS_save"
1011 dnl #######################################################################
1012 dnl # Check for Gadu-Gadu client includes and libraries
1013 dnl #######################################################################
1014 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"])
1015 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"])
1018 if test -n "$with_gadu_includes" || test -n "$with_gadu_libs"; then
1019 gadu_manual_check="yes"
1021 gadu_manual_check="no"
1023 if test "x$gadu_manual_check" = "xno"; then
1024 PKG_CHECK_MODULES(GADU, [libgadu >= 1.11.0], [
1031 if test "$ac_gadu_includes" != "no"; then
1032 GADU_CFLAGS="-I$ac_gadu_includes"
1034 CPPFLAGS_save="$CPPFLAGS"
1035 CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
1036 AC_CHECK_HEADER(libgadu.h, [gadu_includes=yes])
1037 CPPFLAGS="$CPPFLAGS_save"
1039 if test "$ac_gadu_libs" != "no"; then
1040 GADU_LIBS="-L$ac_gadu_libs"
1042 GADU_LIBS="$GADU_LIBS -lgadu"
1043 AC_CHECK_LIB(gadu, gg_libgadu_version, [gadu_libs=yes], , $GADU_LIBS)
1045 GADU_CFLAGS=`echo $GADU_CFLAGS |$sedpath 's/-Wall//'`
1047 if test "x$gadu_libs" = "xyes"; then
1048 AC_MSG_CHECKING(for libgadu GPL compatibility)
1049 CPPFLAGS_save="$CPPFLAGS"
1050 CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
1051 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
1052 #if defined(__GG_LIBGADU_HAVE_OPENSSL) || defined(GG_CONFIG_HAVE_OPENSSL)
1053 #error "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1056 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
1057 #if GG_DEFAULT_PROTOCOL_VERSION < 0x2e
1058 #error "Your libgadu version is too old. libpurple requires 1.11.0 or higher."
1062 AC_DEFINE([HAVE_LIBGADU], [1],
1063 [Define to 1 if you have libgadu.])
1068 echo "Your supplied copy of libgadu is too old."
1069 echo "Install version 1.11.0 or newer."
1070 echo "Then rerun this ./configure"
1072 echo "Falling back to using our own copy of libgadu"
1082 echo "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1083 echo "To compile against system libgadu, please recompile libgadu using:"
1084 echo "./autogen.sh --disable-libgadu-openssl --disable-static --enable-shared"
1085 echo "Then rerun this ./configure"
1087 echo "Falling back to using our own copy of libgadu"
1093 CPPFLAGS="$CPPFLAGS_save"
1096 AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes")
1098 if test "x$gadu_libs" = "x"; then
1103 AC_SUBST(GADU_CFLAGS)
1105 AC_ARG_ENABLE(distrib,,,enable_distrib=no)
1106 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
1108 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=""])
1109 if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then
1113 if test "x$STATIC_PRPLS" = "xall" ; then
1114 STATIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar sametime silc simple yahoo zephyr"
1116 if test "x$have_meanwhile" != "xyes" ; then
1117 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'`
1119 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1120 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'`
1122 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1123 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc/silc10/'`
1125 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1126 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc10//'`
1128 AC_SUBST(STATIC_PRPLS)
1132 for i in $STATIC_PRPLS ; do
1133 dnl Ugly special case for "libsilcpurple.la":
1134 dnl ... and Ugly special case for multi-protocol oscar and yahoo
1135 if test \( "x$i" = "xoscar" -o "x$i" = "xaim" -o "x$i" = "xicq" \) -a "x$static_oscar" != "xyes"; then
1136 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/oscar/liboscar.la"
1137 extern_init="$extern_init extern gboolean purple_init_aim_plugin();"
1138 extern_init="$extern_init extern gboolean purple_init_icq_plugin();"
1139 load_proto="$load_proto purple_init_aim_plugin();"
1140 load_proto="$load_proto purple_init_icq_plugin();"
1141 elif test "x$i" = "xyahoo"; then
1142 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/yahoo/libymsg.la"
1143 extern_init="$extern_init extern gboolean purple_init_yahoo_plugin();"
1144 extern_init="$extern_init extern gboolean purple_init_yahoojp_plugin();"
1145 load_proto="$load_proto purple_init_yahoo_plugin();"
1146 load_proto="$load_proto purple_init_yahoojp_plugin();"
1148 if test "x$i" = "xsilc"; then
1149 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.la"
1150 elif test "x$i" = "xsilc10"; then
1151 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libsilcpurple.la"
1153 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.la"
1155 extern_init="$extern_init extern gboolean purple_init_${i}_plugin();"
1156 load_proto="$load_proto purple_init_${i}_plugin();"
1159 bonjour) static_bonjour=yes ;;
1160 gg) static_gg=yes ;;
1161 irc) static_irc=yes ;;
1162 jabber) static_jabber=yes ;;
1163 msn) static_msn=yes ;;
1164 myspace) static_myspace=yes ;;
1165 mxit) static_mxit=yes ;;
1166 novell) static_novell=yes ;;
1167 oscar) static_oscar=yes ;;
1168 aim) static_oscar=yes ;;
1169 icq) static_oscar=yes ;;
1170 sametime) static_sametime=yes ;;
1171 silc) static_silc=yes ;;
1172 silc10) static_silc=yes ;;
1173 simple) static_simple=yes ;;
1174 yahoo) static_yahoo=yes ;;
1175 zephyr) static_zephyr=yes ;;
1176 *) echo "Invalid static protocol $i!!" ; exit ;;
1179 AM_CONDITIONAL(STATIC_BONJOUR, test "x$static_bonjour" = "xyes")
1180 AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes")
1181 AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes")
1182 AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes")
1183 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes")
1184 AM_CONDITIONAL(STATIC_MYSPACE, test "x$static_myspace" = "xyes")
1185 AM_CONDITIONAL(STATIC_MXIT, test "x$static_mxit" = "xyes")
1186 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes")
1187 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes")
1188 AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_meanwhile" = "xyes")
1189 AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$have_silc" = "xyes")
1190 AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes")
1191 AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes")
1192 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes")
1193 AC_SUBST(STATIC_LINK_LIBS)
1194 AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init static void static_proto_init(void) { $load_proto },
1195 [Loads static protocol plugin module initialization functions.])
1197 AC_ARG_WITH(dynamic_prpls, [AC_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`])
1198 if test "x$DYNAMIC_PRPLS" = "xall" ; then
1199 DYNAMIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar sametime silc simple yahoo zephyr"
1201 if test "x$have_meanwhile" != "xyes"; then
1202 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'`
1204 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1205 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
1207 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1208 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc/silc10/'`
1210 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1211 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc10//'`
1213 AC_SUBST(DYNAMIC_PRPLS)
1214 for i in $DYNAMIC_PRPLS ; do
1216 bonjour) dynamic_bonjour=yes ;;
1217 gg) dynamic_gg=yes ;;
1218 irc) dynamic_irc=yes ;;
1219 jabber) dynamic_jabber=yes ;;
1220 msn) dynamic_msn=yes ;;
1221 myspace) dynamic_myspace=yes ;;
1222 mxit) dynamic_mxit=yes ;;
1223 novell) dynamic_novell=yes ;;
1224 null) dynamic_null=yes ;;
1225 oscar) dynamic_oscar=yes ;;
1226 aim) dynamic_oscar=yes ;;
1227 icq) dynamic_oscar=yes ;;
1228 sametime) dynamic_sametime=yes ;;
1229 silc) dynamic_silc=yes ;;
1230 silc10) dynamic_silc=yes ;;
1231 simple) dynamic_simple=yes ;;
1232 yahoo) dynamic_yahoo=yes ;;
1233 zephyr) dynamic_zephyr=yes ;;
1234 *) echo "Invalid dynamic protocol $i!!" ; exit ;;
1238 AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes)
1239 AC_ARG_WITH(krb4, [AC_HELP_STRING([--with-krb4=PREFIX], [compile Zephyr plugin with Kerberos 4 support])], kerberos="$withval", kerberos="no")
1240 AC_ARG_WITH(zephyr, [AC_HELP_STRING([--with-zephyr=PREFIX], [compile Zephyr plugin against external libzephyr])], zephyr="$withval", zephyr="no")
1241 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
1243 AC_CHECK_HEADERS(sys/utsname.h)
1244 AC_CHECK_FUNC(uname)
1246 AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes)
1248 DEBUG_CFLAGS="$DEBUG_CFLAGS -DPURPLE_DISABLE_DEPRECATED -DPIDGIN_DISABLE_DEPRECATED -DFINCH_DISABLE_DEPRECATED -DGNT_DISABLE_DEPRECATED"
1249 if test "x$GCC" = "xyes"; then
1250 dnl We enable -Wall later.
1251 dnl If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
1252 dnl This leads to warnings we don't want.
1253 CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
1255 dnl ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE
1257 dnl Future Possibilities
1259 dnl Consider adding -Wbad-function-cast.
1260 dnl This leads to spurious warnings using GPOINTER_TO_INT(), et al. directly on a function call.
1261 dnl We'd need an intermediate variable.
1263 dnl Consider adding -Wfloat-equal.
1264 dnl This leads to warnings with Perl.
1265 dnl Perhaps we could write ugly configure magic and pass -Wno-float-equal down to that subdirectory.
1266 dnl On the other hand, it's probably actually broken, so maybe the Perl folks should fix that?
1268 dnl Consider removing -Wno-sign-compare (from the -Wextra set) and fixing all those cases.
1269 dnl This is likely non-trivial.
1272 "-Waggregate-return" \
1274 "-Wdeclaration-after-statement" \
1276 "-Werror-implicit-function-declaration" \
1277 "-Wextra -Wno-sign-compare -Wno-unused-parameter" \
1278 "-Wformat-security" \
1279 "-Werror=format-security" \
1281 "-Wmissing-declarations" \
1282 "-Wmissing-noreturn" \
1283 "-Wmissing-prototypes" \
1287 orig_CFLAGS="$CFLAGS"
1288 CFLAGS="$CFLAGS $newflag"
1289 AC_MSG_CHECKING(for $newflag option to gcc)
1290 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
1291 int main() {return 0;}
1294 CFLAGS="$orig_CFLAGS"
1295 DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
1298 CFLAGS="$orig_CFLAGS"
1302 if test "x$enable_fortify" = "xyes"; then
1303 AC_MSG_CHECKING(for FORTIFY_SOURCE support)
1304 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <features.h>]], [[
1306 #if !(__GNUC_PREREQ (4, 1) \
1307 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
1308 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
1309 && __GNUC_MINOR__ == 4 \
1310 && (__GNUC_PATCHLEVEL__ > 2 \
1311 || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
1312 #error No FORTIFY_SOURCE support
1318 DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2"
1324 DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
1328 if test "x$SUNCC" = "xyes"; then
1329 CFLAGS="$CFLAGS -features=extensions"
1333 AC_PATH_PROG(pidginpath, pidgin)
1335 dnl #######################################################################
1336 dnl # Check for D-Bus libraries
1337 dnl #######################################################################
1339 AC_ARG_ENABLE(dbus, [AC_HELP_STRING([--disable-dbus], [disable D-Bus support])], , enable_dbus=yes)
1340 AC_ARG_ENABLE(nm, [AC_HELP_STRING([--disable-nm], [disable NetworkManager support (requires D-Bus)])], enable_nm=$enableval, enable_nm=yes)
1342 if test "x$enable_dbus" = "xyes" ; then
1343 AC_CHECK_PROG(enable_dbus, dbus-binding-tool, yes, no)
1346 if test "x$enable_dbus" = "xyes" ; then
1347 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60 dbus-glib-1 >= 0.60], [
1348 AC_SUBST(DBUS_CFLAGS)
1353 if test "x$force_deps" = "xyes" ; then
1355 D-Bus development headers not found.
1356 Use --disable-dbus if you do not need D-Bus support.
1361 dnl Check for NetworkManager.h; if we don't have it, oh well
1362 if test "x$enable_dbus" = "xyes" ; then
1363 if test "x$enable_nm" = "xyes" ; then
1364 PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [
1365 AC_SUBST(NETWORKMANAGER_CFLAGS)
1366 AC_SUBST(NETWORKMANAGER_LIBS)
1367 AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.])
1370 if test "x$force_deps" = "xyes" ; then
1372 NetworkManager development headers not found.
1373 Use --disable-nm if you do not need NetworkManager support.
1381 dnl #######################################################################
1382 dnl # Check for Python
1383 dnl #######################################################################
1385 dnl Python scripts are used to auto-generate about 3000 lines of C
1386 dnl and XML code that wraps (part of) the existing API so that
1387 dnl it is now accessible through D-Bus.
1389 dnl Python is only required if --enable-dbus is used, and only for
1390 dnl the build process to generate the code, not for running pidgin.
1391 dnl This autogenerated code is system-independent, so in principle we
1392 dnl can generate all of it before shipping. But I thought adding
1393 dnl auto-generated stuff to the repository is inelegant.
1394 dnl Alternatively, these python scripts could be rewritten
1395 dnl in C (brrrr ...).
1397 AC_ARG_WITH([python],
1398 AC_HELP_STRING([--with-python=PATH],
1399 [which python interpreter to use for dbus code generation]),
1402 if test "x$enable_dbus" = "xyes" || test "x$enable_consoleui" = "xyes" ; then
1403 if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then
1404 AC_PATH_PROG([PYTHON], [python], [no])
1407 if test x"$PYTHON" = x"no" ; then
1408 AC_MSG_WARN([python interpreter not found in your path])
1412 if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then
1413 AC_MSG_WARN([python version >= 2.4 required])
1418 dnl ###########################################################################
1419 dnl # Find the D-Bus services dir.
1421 dnl # This is a 3 step process that
1423 dnl # 1. checks if --with-dbus-services was set, if so use that.
1424 dnl # 2. checks if --prefix was given, if so use that.
1425 dnl # 3. fallbacks to installing into what should be the correct system
1428 dnl # This is still prone to error if one of the legacy directories exist
1429 dnl # although a newer dbus is installed. But I have tried to order the
1430 dnl # directory searching to keep this situation at a minimum.
1431 dnl ###########################################################################
1432 AC_ARG_WITH(dbus-services, [AC_HELP_STRING([--with-dbus-services=<dir>], [where the D-Bus services directory is located.])])
1434 DBUS_SERVICES_DIR=""
1436 if test x"$enable_dbus" = "xyes" ; then
1437 AC_MSG_CHECKING([location of the D-Bus services directory])
1438 if ! test -z "$with_dbus_services" ; then
1439 if ! test -d "$with_dbus_services" ; then
1440 AC_MSG_ERROR([$with_dbus_services does not exist, if this is the correct location please make sure that it exists.])
1443 DBUS_SERVICES_DIR="$with_dbus_services"
1445 if test x"$prefix" = x"NONE" ; then
1446 dnl # no prefix given, so we look for the correct dbus system paths.
1447 dnl # if a prefix is given, we use it.
1449 serviceprefixes="$prefix/share $prefix/lib /usr/share /usr/local/share"
1450 DBUS_SERVICES_DIR=""
1452 for d in $serviceprefixes ; do
1453 dir="$d/dbus-1/services"
1454 if test -d $dir ; then
1455 DBUS_SERVICES_DIR="$dir"
1460 if test -z $DBUS_SERVICES_DIR ; then
1461 AC_MSG_ERROR([D-Bus services directory was not found! Please use --with-dbus-services and specify its location.])
1464 DBUS_SERVICES_DIR="$datadir/dbus-1/services"
1467 AC_MSG_RESULT([$DBUS_SERVICES_DIR])
1468 AC_DEFINE(HAVE_DBUS, 1, [Define if we are using D-Bus.])
1470 AC_SUBST(DBUS_SERVICES_DIR)
1472 if test "x$enable_dbus" = "xyes" ; then
1473 echo "Building with D-Bus support"
1475 echo "Building without D-Bus support"
1478 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
1480 dnl Check for Python headers (currently useful only for libgnt)
1481 dnl (Thanks to XChat)
1482 if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ; then
1483 AC_MSG_CHECKING(for Python compile flags)
1484 PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
1485 PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'`
1486 changequote(<<, >>)dnl
1487 PY_VERSION=`$PYTHON -c 'import sys ; print sys.version[0:3]'`
1488 PY_MAJOR=`$PYTHON -c 'import sys ; print sys.version[0:2]'`
1489 changequote([, ])dnl
1490 if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then
1492 AC_CHECK_LIB(pthread, pthread_create, )
1493 AC_CHECK_LIB(util, openpty, )
1494 AC_CHECK_LIB(db, dbopen, )
1495 PY_LIBS="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config -lpython$PY_VERSION"
1496 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
1497 AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.])
1498 dnl Because the above AC_CHECK_LIB get in the way...
1499 AC_MSG_CHECKING(for Python compile flags)
1502 AC_MSG_RESULT([Can't find Python.h])
1510 dnl #######################################################################
1511 dnl # Check for Mono support
1512 dnl #######################################################################
1513 AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support (experimental)])], , enable_mono=no)
1514 if test x"$enable_mono" = x"yes" ; then
1515 PKG_CHECK_MODULES(MONO, mono, [
1516 AC_SUBST(MONO_CFLAGS)
1522 Mono development headers not found.
1523 Use --disable-mono if you do not need Mono support.
1526 if test x"$enable_mono" = x"yes"; then
1528 LIBS="$LIBS $MONO_LIBS"
1529 AC_MSG_CHECKING(for libmono)
1530 AC_CHECK_FUNCS(mono_jit_init, [], enable_mono=no)
1533 oldCPPFLAGS="$CPPFLAGS"
1534 CPPFLAGS="$CPPFLAGS $MONO_CFLAGS"
1535 AC_CHECK_HEADERS(mono/jit/jit.h, [], enable_mono=no)
1536 AC_CHECK_HEADERS(mono/metadata/object.h, [], enable_mono=no)
1537 CPPFLAGS="$oldCPPFLAGS"
1539 AC_DEFINE(ENABLE_MONO, 1, [Define if mono enabled.])
1547 AC_SUBST(MONO_CFLAGS)
1549 AM_CONDITIONAL(USE_MONO, test x"$enable_mono" = x"yes")
1551 dnl #######################################################################
1552 dnl # Check for Perl support
1553 dnl #######################################################################
1554 AC_ARG_ENABLE(perl, [AC_HELP_STRING([--disable-perl], [compile without perl scripting])], , enable_perl=yes)
1556 if test "$enable_plugins" = no ; then
1559 looked_for_perl="no"
1560 if test "$enable_perl" = yes ; then
1561 looked_for_perl="yes"
1562 AC_PATH_PROG(perlpath, perl)
1563 AC_MSG_CHECKING(for Perl compile flags)
1564 PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
1565 if test "_$PERL_CFLAGS" = _ ; then
1566 AC_MSG_RESULT([not found, building without perl.])
1569 PERL_LIBS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null |$sedpath 's/-lgdbm //'`
1570 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-ldb //'`
1571 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lndbm //'`
1572 if test "$system" = "Linux"; then
1573 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lnsl //'`
1574 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lposix //'`
1576 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lc //'`
1580 LIBS="$LIBS $PERL_LIBS"
1581 AC_MSG_CHECKING(for libperl)
1582 AC_CHECK_FUNCS(perl_run, [], enable_perl=no)
1585 oldCPPFLAGS="$CPPFLAGS"
1586 CPPFLAGS="$CPPFLAGS $PERL_CFLAGS"
1587 AC_CHECK_HEADERS(EXTERN.h)
1588 AC_CHECK_HEADERS(perl.h, [], enable_perl=no,
1590 # include <EXTERN.h>
1592 CPPFLAGS="$oldCPPFLAGS"
1596 if test "$enable_perl" = yes ; then
1597 AC_PROG_PERL_MODULES(ExtUtils::MakeMaker, , have_makemaker=no)
1599 if test "x$have_makemaker" = "xno"; then
1603 AM_CONDITIONAL(USE_PERL, false)
1604 AC_MSG_WARN(Compiling perl requires ExtUtils::MakeMaker)
1606 AC_DEFINE(HAVE_PERL, [1], [Compile with support for perl])
1607 AC_SUBST(PERL_CFLAGS)
1609 AM_CONDITIONAL(USE_PERL, true)
1611 dnl This is almost definitely wrong, but in case there's
1612 dnl something I'm missing, I'll leave it in.
1613 AC_CHECK_FUNCS(Perl_eval_pv)
1615 AC_MSG_CHECKING(for old perl)
1616 PERL_OLD=`$perlpath -e 'if($]<5.006){printf"yes\n";}else{printf"no\n";}'`
1618 if test "x$PERL_OLD" = "xyes"; then
1619 AC_DEFINE(OLD_PERL, 1, [Define if old perl is installed.])
1625 AC_MSG_CHECKING(for DynaLoader.a)
1626 DYNALOADER_A=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*([[^ ]]*DynaLoader\.a).*/\2/'`
1628 dnl Don't check libperl.a if dynaloader.a wasn't found.
1629 if test -n "$DYNALOADER_A"; then
1632 dnl Find either libperl.a or libperl.so
1633 AC_MSG_CHECKING(for libperl.a or libperl.so)
1634 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 } } };'`
1635 if test -z "$LIBPERL_A"; then
1641 if test "$LIBPERL_A" = "-lperl"; then
1646 PERL_LIBS=`echo $PERL_LIBS | $perlpath -pe 's/^(.* )*[[^ ]]*DynaLoader\.a/\1libperl_dynaloader.la/'`
1648 if test -n "$LIBPERL_A"; then
1649 PERL_LIBS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lperl /libperl_orig.la /' -e 's/-lperl$/libperl_orig.la$/'`
1652 AC_SUBST(DYNALOADER_A)
1661 AM_CONDITIONAL(USE_PERL, false)
1664 if test "x$looked_for_perl" = "xyes" -a "x$enable_perl" = "xno" -a "x$force_deps" = "xyes"; then
1666 Perl development headers not found.
1667 Use --disable-perl if you do not need Perl scripting support.
1671 dnl #######################################################################
1674 dnl # Thanks go to Evolution for the checks.
1675 dnl #######################################################################
1677 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])
1679 SSL_CERTIFICATES_DIR=""
1680 if ! test -z "$ssl_certificates_dir" ; then
1681 if test "x$ssl_certificates_dir" = "xyes" ; then
1682 AC_MSG_ERROR([--with-system-ssl-certs requires that a location is specified, eg. --with-system-ssl-certs=/etc/pki/tls/certs])
1684 if ! test -d "$ssl_certificates_dir" ; then
1685 AC_MSG_ERROR([$ssl_certificates_dir does not exist, if this is the correct location please make sure that it exists.])
1687 SSL_CERTIFICATES_DIR="$ssl_certificates_dir"
1689 AC_SUBST(SSL_CERTIFICATES_DIR)
1690 AM_CONDITIONAL(INSTALL_SSL_CERTIFICATES, test "x$SSL_CERTIFICATES_DIR" = "x")
1692 dnl These two are inverses of each other <-- stolen from evolution!
1694 AC_ARG_ENABLE(gnutls,
1695 [ --enable-gnutls=[yes,no] attempt to use GnuTLS for SSL support [default=yes]],
1696 [enable_gnutls="$enableval"],
1697 [enable_gnutls="yes"])
1700 [ --enable-nss=[yes,no,static] attempt to use Mozilla libnss for SSL support [default=yes]],
1701 [enable_nss="$enableval"],
1704 msg_ssl="None. MSN, Yahoo!, Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!"
1705 looked_for_gnutls="no"
1707 dnl # Check for GnuTLS if it's specified.
1709 if test "x$enable_gnutls" != "xno"; then
1711 prefix=`eval echo $prefix`
1712 looked_for_gnutls="yes"
1714 AC_ARG_WITH(gnutls-includes,
1715 [ --with-gnutls-includes=PREFIX location of GnuTLS includes.],
1716 [ with_gnutls_includes="$withval" ],
1717 [ with_gnutls_includes="$prefix/include" ])
1719 have_gnutls_includes="no"
1721 if test "x$with_gnutls_includes" != "xno"; then
1722 CPPFLAGS_save="$CPPFLAGS"
1724 AC_MSG_CHECKING(for GnuTLS includes)
1727 CPPFLAGS="$CPPFLAGS -I$with_gnutls_includes"
1728 AC_CHECK_HEADERS(gnutls/gnutls.h, [ gnutls_includes="yes" ])
1729 CPPFLAGS="$CPPFLAGS_save"
1731 if test "x$gnutls_includes" != "xno" -a \
1732 "x$gnutls_includes" != "x"; then
1733 have_gnutls_includes="yes"
1735 if test "x$with_gnutls_includes" != "xNONE/include"; then
1736 GNUTLS_CFLAGS="-I$with_gnutls_includes"
1742 AC_MSG_CHECKING(for GnuTLS includes)
1746 AC_ARG_WITH(gnutls-libs,
1747 [AC_HELP_STRING([--with-gnutls-libs=PREFIX], [location of GnuTLS libraries.])],
1748 [ with_gnutls_libs="$withval" ])
1750 if test "x$with_gnutls_libs" != "xno" -a \
1751 "x$have_gnutls_includes" != "xno"; then
1755 case $with_gnutls_libs in
1757 *) with_gnutls_libs="-L$with_gnutls_libs" ;;
1760 AC_CACHE_CHECK([for GnuTLS libraries], ac_cv_gnutls_libs,
1762 LIBS="$LIBS $with_gnutls_libs -lgnutls -lgcrypt"
1763 AC_TRY_LINK_FUNC(gnutls_init, ac_cv_gnutls_libs="yes", ac_cv_gnutls_libs="no")
1767 if test "x$ac_cv_gnutls_libs" != "xno"; then
1768 AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GnuTLS])
1771 GNUTLS_LIBS="$with_gnutls_libs -lgnutls -lgcrypt"
1779 AC_MSG_CHECKING(for GnuTLS libraries)
1787 AC_SUBST(GNUTLS_CFLAGS)
1788 AC_SUBST(GNUTLS_LIBS)
1790 if test "x$enable_gnutls" = "xyes"; then
1791 AC_MSG_CHECKING(for gnutls_priority_set_direct and gnutls_priority_set)
1793 LIBS="$LIBS $GNUTLS_LIBS"
1794 CPPFLAGS_save="$CPPFLAGS"
1795 CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
1796 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
1797 [[gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL); gnutls_priority_set(s, NULL);]])],
1798 [AC_DEFINE([HAVE_GNUTLS_PRIORITY_FUNCS], 1,
1799 [Define if your gnutls has gnutls_priority_set_direct and friends])
1800 AC_MSG_RESULT(yes)],
1801 [AC_MSG_RESULT(no)])
1802 CPPFLAGS="$CPPFLAGS_save"
1806 if test "x$enable_gnutls" = "xyes"; then
1807 AC_MSG_CHECKING(for GNUTLS_CERT_INSECURE_ALGORITHM)
1809 LIBS="$LIBS $GNUTLS_LIBS"
1810 CPPFLAGS_save="$CPPFLAGS"
1811 CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
1812 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
1813 [[unsigned int verify = GNUTLS_CERT_INSECURE_ALGORITHM;]])],
1814 [AC_DEFINE([HAVE_GNUTLS_CERT_INSECURE_ALGORITHM], 1,
1815 [Define if your gnutls has the GNUTLS_CERT_INSECURE_ALGORITHM flag])
1816 AC_MSG_RESULT(yes)],
1817 [AC_MSG_RESULT(no)])
1818 CPPFLAGS="$CPPFLAGS_save"
1823 AM_CONDITIONAL(USE_GNUTLS, test "x$enable_gnutls" = "xyes")
1827 dnl # Check for NSS if it's specified, or if GnuTLS checks failed.
1830 if test "x$enable_nss" != "xno"; then
1831 looked_for_nss="yes"
1833 AC_ARG_WITH(nspr-includes,
1834 [AC_HELP_STRING([--with-nspr-includes=PREFIX], [specify location of Mozilla nspr4 includes.])],
1835 [with_nspr_includes="$withval"])
1837 AC_ARG_WITH(nspr-libs,
1838 [AC_HELP_STRING([--with-nspr-libs=PREFIX], [specify location of Mozilla nspr4 libs.])],
1839 [with_nspr_libs="$withval"])
1841 AC_ARG_WITH(nss-includes,
1842 [AC_HELP_STRING([--with-nss-includes=PREFIX], [specify location of Mozilla nss3 includes.])],
1843 [with_nss_includes="$withval"])
1845 AC_ARG_WITH(nss-libs,
1846 [AC_HELP_STRING([--with-nss-libs=PREFIX], [specify location of Mozilla nss3 libs.])],
1847 [with_nss_libs="$withval"])
1850 if test -n "$with_nspr_includes" || test -n "$with_nspr_libs" || \
1851 test -n "$with_nss_includes" || test -n "$with_nss_libs" ||
1852 test "x$enable_nss" = "xstatic"; then
1854 nss_manual_check="yes"
1856 nss_manual_check="no"
1861 if test "x$nss_manual_check" = "xno"; then
1862 if `$PKG_CONFIG --exists mozilla-nss`; then
1863 PKG_CHECK_MODULES(NSS, mozilla-nss, [
1869 mozilla_nspr="mozilla-nspr"
1870 mozilla_nss="mozilla-nss"
1871 elif `$PKG_CONFIG --exists nss`; then
1872 PKG_CHECK_MODULES(NSS, nss, [
1880 elif `$PKG_CONFIG --exists microb-engine-nss`; then
1881 PKG_CHECK_MODULES(NSS, microb-engine-nss, [
1887 mozilla_nspr="mozilla-nspr"
1888 mozilla_nss="microb-engine-nss"
1891 if test "x$have_nss" = "xyes"; then
1893 AC_DEFINE(HAVE_NSS, 1, [Define if you have Mozilla NSS])
1894 AC_DEFINE(HAVE_SSL, 1, [Define if you have SSL])
1896 msg_nss="Mozilla NSS"
1899 nss_manual_check="yes"
1903 if test "x$nss_manual_check" = "xyes"; then
1905 have_nspr_includes="no"
1907 if test "x$with_nspr_includes" != "xno"; then
1908 CPPFLAGS_save=$CPPFLAGS
1910 AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)
1913 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
1914 AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ])
1915 CPPFLAGS=$CPPFLAGS_save
1917 if test "x$moz_nspr_includes" != "xno" -a \
1918 "x$moz_nspr_includes" != "x"; then
1920 have_nspr_includes="yes"
1921 NSPR_CFLAGS="-I$with_nspr_includes"
1924 AC_MSG_CHECKING(for Mozilla nspr4 includes)
1932 if test "x$with_nspr_libs" != "xno" -a \
1933 "x$have_nspr_includes" != "xno"; then
1936 LDFLAGS_save=$LDFLAGS
1938 if test "$enable_nss" = "static"; then
1939 if test -z "$with_nspr_libs"; then
1941 [Static linkage requested, but path to nspr libraries not set.]
1942 [Please specify the path to libnspr4.a]
1943 [Example: --with-nspr-libs=/usr/lib])
1947 nsprlibs="$LIBDL $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB"
1950 nsprlibs="$LIBDL -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
1953 AC_CACHE_CHECK([for Mozilla nspr libraries], ac_cv_moz_nspr_libs,
1956 CFLAGS="$CFLAGS $NSPR_CFLAGS"
1960 if test "x$with_nspr_libs" != "x"; then
1961 LDFLAGS="$LDFLAGS -L$with_nspr_libs"
1966 AC_TRY_LINK_FUNC(PR_Init,
1967 [ac_cv_moz_nspr_libs="yes"],
1968 [ac_cv_moz_nspr_libs="no"])
1971 LDFLAGS=$LDFLAGS_save
1975 if test "x$ac_cv_moz_nspr_libs" != "xno"; then
1976 have_nspr_libs="yes"
1977 NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
1983 AC_MSG_CHECKING(for Mozilla nspr4 libraries)
1987 have_nss_includes="no"
1989 if test "x$with_nss_includes" != "xno" -a \
1990 "x$have_nspr_libs" != "xno"; then
1992 CPPFLAGS_save=$CPPFLAGS
1994 AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)
1997 if test "x$with_nspr_includes" != "x"; then
1998 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
2000 CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
2003 AC_CHECK_HEADERS(nss.h ssl.h smime.h,
2004 [moz_nss_includes="yes"],
2005 [moz_nss_includes="no"])
2007 CPPFLAGS=$CPPFLAGS_save
2009 if test "x$moz_nss_includes" = "xyes"; then
2010 have_nss_includes="yes"
2011 NSS_CFLAGS="-I$with_nss_includes"
2018 AC_MSG_CHECKING(for Mozilla nss3 includes)
2023 if test "x$with_nss_libs" != "xno" -a \
2024 "x$have_nss_includes" != "xno"; then
2026 LDFLAGS_save=$LDFLAGS
2028 if test "$enable_nss" = "static"; then
2029 if test -z "$with_nss_libs"; then
2031 [Static linkage requested, but path to nss libraries not set.]
2032 [Please specify the path to libnss3.a]
2033 [Example: --with-nspr-libs=/usr/lib/mozilla])
2036 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"
2040 nsslibs="$nsslibs $with_nss_libs/libfreeb1.a"
2045 nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
2048 AC_CACHE_CHECK([for Mozilla nss libraries], ac_cv_moz_nss_libs,
2051 LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
2052 LIBS="$nsslibs $nsprlibs"
2054 AC_TRY_LINK_FUNC(NSS_Init,
2055 [ac_cv_moz_nss_libs="yes"],
2056 [ac_cv_moz_nss_libs="no"])
2058 if test "x$ac_cv_moz_nss_libs" = "xno"; then
2059 nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
2060 LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
2061 LIBS="$LIBS $nsslibs"
2062 AC_TRY_LINK_FUNC(NSS_Init,
2063 [ac_cv_moz_nss_libs="yes"],
2064 [ac_cv_moz_nss_libs="no"])
2067 LDFLAGS=$LDFLAGS_save
2071 if test "x$ac_cv_moz_nss_libs" != "xno"; then
2075 NSS_LIBS="-L$with_nss_libs $nsslibs"
2077 if test "$enable_nss" = "static"; then
2078 msg_nss="Mozilla NSS (static)"
2080 msg_nss="Mozilla NSS"
2091 AC_MSG_CHECKING(for Mozilla nss libraries)
2095 NSS_CFLAGS="$NSPR_CFLAGS $NSS_CFLAGS"
2096 NSS_LIBS="$NSPR_LIBS $NSS_LIBS"
2099 AC_SUBST(NSS_CFLAGS)
2103 AM_CONDITIONAL(USE_NSS, test "x$enable_nss" = "xyes")
2105 if test "x$msg_nss" != "x" -a "x$msg_gnutls" != "x"; then
2106 msg_ssl="$msg_nss and $msg_gnutls"
2107 elif test "x$msg_nss" != "x"; then
2109 elif test "x$msg_gnutls" != "x"; then
2111 elif test "x$looked_for_gnutls" = "xyes" -a "x$looked_for_nss" = "xyes" -a "x$force_deps" = "xyes" ; then
2113 Neither GnuTLS or NSS SSL development headers found.
2114 Use --disable-nss --disable-gnutls if you do not need SSL support.
2115 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!
2117 elif test "x$looked_for_gnutls" = "xyes" -a "x$force_deps" = "xyes" ; then
2119 GnuTLS SSL development headers not found.
2120 Use --disable-gnutls if you do not need SSL support.
2121 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without SSL support.
2123 elif test "x$looked_for_nss" = "xyes" -a "x$force_deps" = "xyes" ; then
2125 NSS SSL development headers not found.
2126 Use --disable-nss if you do not need SSL support.
2127 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without SSL support.
2131 dnl #######################################################################
2133 dnl #######################################################################
2134 AC_ARG_ENABLE(tcl, [AC_HELP_STRING([--disable-tcl],
2135 [compile without Tcl scripting])], enable_tcl="$enableval", enable_tcl="yes")
2136 AC_ARG_WITH(tclconfig, [AC_HELP_STRING([--with-tclconfig=DIR],
2137 [directory containing tclConfig.sh])])
2139 if test "$enable_plugins" = no; then
2143 if test "$enable_tcl" = yes; then
2144 AC_MSG_CHECKING([for tclConfig.sh])
2146 TCLCONFIGDIRS="/usr/lib \
2154 /System/Library/Tcl/8.3 \
2156 for dir in $with_tclconfig $TCLCONFIGDIRS; do
2157 if test -f $dir/tclConfig.sh; then
2158 TCLCONFIG=$dir/tclConfig.sh
2159 AC_MSG_RESULT([yes ($TCLCONFIG)])
2163 if test "$TCLCONFIG" = "no"; then
2166 if test "x$force_deps" = "xyes" ; then
2168 Tcl development headers not found.
2169 Use --disable-tcl if you do not need Tcl scripting support.
2174 AC_MSG_CHECKING([Tcl version compatability])
2175 if test "$TCL_MAJOR_VERSION" -ne 8 -o "$TCL_MINOR_VERSION" -lt 3; then
2176 AC_MSG_RESULT([bad, $TCL_VERSION found but 8.3 or later required])
2179 AC_MSG_RESULT([ok, $TCL_VERSION])
2180 eval "TCL_LIB_SPEC=\"$TCL_LIB_SPEC\""
2181 AC_MSG_CHECKING([for Tcl linkability])
2182 oldCPPFLAGS=$CPPFLAGS
2183 CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
2185 LIBS="$LIBS $TCL_LIB_SPEC"
2186 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <tcl.h>]],
2187 [[Tcl_Interp *interp=NULL; Tcl_Init(interp)]])],
2188 [AC_MSG_RESULT([yes]);enable_tcl=yes],
2189 [AC_MSG_RESULT([no]);enable_tcl=no])
2190 CPPFLAGS="$oldCPPFLAGS"
2196 if test "$enable_tcl" = yes; then
2197 AM_CONDITIONAL(USE_TCL, true)
2198 TCL_LIBS=$TCL_LIB_SPEC
2199 AC_DEFINE(HAVE_TCL, [1], [Compile with support for the Tcl toolkit])
2201 TCL_CFLAGS="$TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
2202 if test "x$GCC" = "xyes"; then
2203 TCL_CFLAGS="$TCL_CFLAGS -fno-strict-aliasing"
2205 AC_SUBST(TCL_CFLAGS)
2207 AM_CONDITIONAL(USE_TCL, false)
2210 dnl #######################################################################
2212 dnl #######################################################################
2213 AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk],
2214 [compile without Tcl support for Tk])], enable_tk="$enableval", enable_tk="yes")
2215 AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR],
2216 [directory containing tkConfig.sh])])
2218 if test "$enable_tcl" = yes -a "$enable_tk" = yes; then
2219 AC_MSG_CHECKING([for tkConfig.sh])
2221 TKCONFIGDIRS="/usr/lib \
2228 for dir in $with_tkconfig $TKCONFIGDIRS; do
2229 if test -f $dir/tkConfig.sh; then
2230 TKCONFIG=$dir/tkConfig.sh
2231 AC_MSG_RESULT([yes ($TKCONFIG)])
2235 if test "$TKCONFIG" = "no"; then
2238 if test "x$force_deps" = "xyes" ; then
2240 Tk development headers not found.
2241 Use --disable-tk if you do not need Tk scripting support.
2246 eval "TK_LIB_SPEC=\"$TK_LIB_SPEC\""
2247 AC_MSG_CHECKING([for Tk linkability])
2248 oldCPPFLAGS=$CPPFLAGS
2249 CPPFLAGS="$CPPFLAGS $TCL_CFLAGS"
2251 LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC"
2252 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <tk.h>]],
2253 [[Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);]])],
2254 [AC_MSG_RESULT([yes]);enable_tk=yes],
2255 [AC_MSG_RESULT([no]);enable_tk=no])
2256 CPPFLAGS="$oldCPPFLAGS"
2263 if test "$enable_tk" = yes; then
2264 AM_CONDITIONAL(USE_TK, true)
2265 AC_DEFINE(HAVE_TK, [1], [Compile with support for the Tk toolkit])
2266 TK_LIBS=$TK_LIB_SPEC
2269 AM_CONDITIONAL(USE_TK, false)
2272 if test "$ac_cv_cygwin" = yes ; then
2273 LDADD="$LDADD -static"
2274 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2277 AC_SUBST(DEBUG_CFLAGS)
2281 if test "x$enable_plugins" = "xyes" ; then
2282 AC_DEFINE(PURPLE_PLUGINS, 1, [Define if plugins are enabled.])
2283 AM_CONDITIONAL(PLUGINS, true)
2284 PLUGINS_DEFINE="#define PURPLE_PLUGINS 1"
2286 AM_CONDITIONAL(PLUGINS, false)
2287 PLUGINS_DEFINE="#undef PURPLE_PLUGINS"
2289 AC_SUBST(PLUGINS_DEFINE)
2291 dnl #######################################################################
2292 dnl # Check for Cyrus-SASL (for Jabber)
2293 dnl #######################################################################
2294 dnl AC_CHECK_SIZEOF(short)
2295 AC_CHECK_FUNCS(snprintf connect)
2297 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)
2298 if test "x$enable_cyrus_sasl" = "xyes" ; then
2299 AC_CHECK_LIB(sasl2, sasl_client_init, [
2300 AM_CONDITIONAL(USE_CYRUS_SASL, true)
2301 AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present])
2304 AM_CONDITIONAL(USE_CYRUS_SASL, false)
2305 AC_MSG_ERROR([Cyrus SASL library not found])
2308 AM_CONDITIONAL(USE_CYRUS_SASL, false)
2311 dnl #######################################################################
2312 dnl # Check for Kerberos (for Zephyr)
2313 dnl #######################################################################
2314 AC_DEFINE(ZEPHYR_INT32, long, [Size of an int32.])
2315 AC_SUBST(KRB4_CFLAGS)
2316 AC_SUBST(KRB4_LDFLAGS)
2318 if test "$kerberos" != "no" ; then
2319 if test "$kerberos" != "yes" ; then
2320 KRB4_CFLAGS="-I${kerberos}/include"
2321 if test -d "$kerberos/include/kerberosIV" ; then
2322 KRB4_CFLAGS="$KRB4_CFLAGS -I${kerberos}/include/kerberosIV"
2324 KRB4_LDFLAGS="-L${kerberos}/lib"
2325 elif test -d /usr/local/include/kerberosIV ; then
2326 KRB4_CFLAGS="-I/usr/local/include/kerberosIV"
2327 elif test -d /usr/include/kerberosIV ; then
2328 KRB4_CFLAGS="-I/usr/include/kerberosIV"
2330 AC_DEFINE(ZEPHYR_USES_KERBEROS, 1, [Define if kerberos should be used in Zephyr.])
2332 orig_LDFLAGS="$LDFLAGS"
2333 LDFLAGS="$LDFLAGS $KRB4_LDFLAGS"
2334 AC_CHECK_LIB(krb4, krb_rd_req,
2335 [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
2336 [AC_CHECK_LIB(krb, krb_rd_req,
2337 [KRB4_LIBS="-lkrb -ldes"],
2338 [AC_MSG_ERROR([Kerberos 4 libraries not found])],
2340 -ldes425 -lkrb5 -lk5crypto -lcom_err)
2342 LIBS="$LIBS $KRB4_LIBS"
2343 AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm)
2344 AC_CHECK_FUNCS(krb_get_err_text krb_log)
2346 LDFLAGS="$orig_LDFLAGS"
2349 dnl #######################################################################
2350 dnl # Check for external libzephyr
2351 dnl #######################################################################
2352 AC_SUBST(ZEPHYR_CFLAGS)
2353 AC_SUBST(ZEPHYR_LDFLAGS)
2354 AC_SUBST(ZEPHYR_LIBS)
2355 if test "$zephyr" != "no" ; then
2356 if test "$zephyr" != "yes" ; then
2357 ZEPHYR_CFLAGS="-I${zephyr}/include"
2358 ZEPHYR_LDFLAGS="-L${zephyr}/lib"
2359 elif test -d /usr/athena/include/zephyr ; then
2360 ZEPHYR_CFLAGS="-I/usr/athena/include"
2361 elif test -d /usr/include/zephyr ; then
2362 ZEPHYR_CFLAGS="-I/usr/include"
2363 elif test -d /usr/local/include/zephyr ; then
2364 ZEPHYR_CFLAGS="-I/usr/local/include"
2366 AC_DEFINE(LIBZEPHYR_EXT, 1 , [Define if external libzephyr should be used.])
2367 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
2368 orig_LDFLAGS="$LDFLAGS"
2369 LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS"
2370 AC_CHECK_LIB(zephyr, ZInitialize,
2371 [ZEPHYR_LIBS="-lzephyr"],
2372 [AC_MSG_ERROR([Zephyr libraries not found])],
2376 LDFLAGS="$orig_LDFLAGS"
2379 AC_MSG_CHECKING(for me pot o' gold)
2381 AC_CHECK_FUNCS(gethostid lrand48 timegm)
2382 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
2383 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
2384 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
2385 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
2386 AC_CHECK_HEADERS(termios.h)
2388 # sys/sysctl.h on OpenBSD 4.2 requires sys/param.h
2389 # sys/sysctl.h on FreeBSD requires sys/types.h
2390 AC_CHECK_HEADERS(sys/param.h)
2391 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
2393 #include <sys/types.h>
2395 # include <sys/param.h>
2399 AC_CHECK_HEADERS(sys/socket.h)
2400 AC_VAR_TIMEZONE_EXTERNALS
2402 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
2403 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2408 ]])], [ac_cv_struct_tm_gmtoff=yes], [ac_cv_struct_tm_gmtoff=no]))
2409 if test $ac_cv_struct_tm_gmtoff = yes; then
2410 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
2413 AC_CACHE_CHECK([whether va_lists can be copied by value], ac_cv_va_val_copy,[
2414 AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdarg.h>
2416 void f (int i, ...) {
2417 va_list args1, args2;
2418 va_start (args1, i);
2420 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
2422 va_end (args1); va_end (args2);
2428 [ac_cv_va_val_copy=yes],
2429 [ac_cv_va_val_copy=no],
2430 [ac_cv_va_val_copy=yes])
2433 if test "x$ac_cv_va_val_copy" = "xno"; then
2434 AC_DEFINE(VA_COPY_AS_ARRAY, 1, ['va_lists' cannot be copied as values])
2437 dnl #######################################################################
2438 dnl # Check for check
2439 dnl #######################################################################
2440 PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], , [AC_MSG_RESULT([no, testing is disabled])])
2441 AM_CONDITIONAL(HAVE_CHECK, [test "x$CHECK_LIBS" != "x"])
2442 AC_SUBST(CHECK_CFLAGS)
2443 AC_SUBST(CHECK_LIBS)
2445 dnl #######################################################################
2446 dnl # Disable pixmap installation
2447 dnl #######################################################################
2448 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)
2450 AM_CONDITIONAL(INSTALL_PIXMAPS, test "x$enable_pixmaps" = "xyes")
2452 dnl #######################################################################
2453 dnl # Tweak status tray icon installation directory
2454 dnl #######################################################################
2455 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)
2457 AM_CONDITIONAL(ENABLE_TRAYCOMPAT, test "x$enable_traycompat" = "xyes")
2459 dnl #######################################################################
2460 dnl # Check for Doxygen and dot (part of GraphViz)
2461 dnl #######################################################################
2462 AC_ARG_ENABLE(doxygen,
2463 [AC_HELP_STRING([--disable-doxygen],
2464 [disable documentation with doxygen])],
2465 enable_doxygen="$enableval", enable_doxygen="yes")
2467 [AC_HELP_STRING([--disable-dot],
2468 [disable graphs in doxygen via 'dot'])],
2469 enable_dot="$enableval", enable_dot="yes")
2470 AC_ARG_ENABLE(devhelp,
2471 [AC_HELP_STRING([--disable-devhelp],
2472 [disable building index for devhelp documentation browser])],
2473 enable_devhelp="$enableval", enable_devhelp="yes")
2475 if test "x$enable_doxygen" = xyes; then
2476 AC_CHECK_PROG(DOXYGEN, doxygen, true, false)
2477 if test $DOXYGEN = false; then
2478 AC_MSG_WARN([*** Doxygen not found, docs will not be available])
2481 AC_DEFINE_UNQUOTED(HAVE_DOXYGEN, 1, [whether or not we have doxygen])
2483 if test "x$enable_dot" = "xyes"; then
2484 AC_CHECK_PROG(DOT, dot, true, false)
2486 if test $DOT = false; then
2488 AC_MSG_WARN([*** GraphViz dot not found, docs will not have graphs])
2490 AC_DEFINE_UNQUOTED(HAVE_DOT, 1, [whether or not we have dot])
2494 if test "x$enable_devhelp" = "xyes"; then
2495 AC_CHECK_PROG(XSLTPROC, xsltproc, true, false)
2497 if test $XSLTPROC = false; then
2498 enable_devhelp="no";
2499 AC_MSG_WARN([*** xsltproc not found; devhelp index will not be created])
2501 AC_DEFINE_UNQUOTED(HAVE_XSLTPROC, 1, [whether or not we have xsltproc for devhelp index])
2510 AC_SUBST(enable_doxygen)
2511 AC_SUBST(enable_dot)
2512 AC_SUBST(enable_devhelp)
2513 AM_CONDITIONAL(HAVE_DOXYGEN, test "x$enable_doxygen" = "xyes")
2514 AM_CONDITIONAL(HAVE_XSLTPROC, test "x$enable_devhelp" = "xyes")
2516 AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],
2517 [compile with debugging support])], , enable_debug=no)
2519 if test "x$enable_debug" = "xyes" ; then
2520 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2523 AM_CONDITIONAL(PURPLE_AVAILABLE, true)
2525 AC_CONFIG_FILES([Makefile
2534 pidgin/pidgin-uninstalled.pc
2536 pidgin/pidgin-2-uninstalled.pc
2537 pidgin/pixmaps/Makefile
2538 pidgin/pixmaps/emotes/default/24/Makefile
2539 pidgin/pixmaps/emotes/none/Makefile
2540 pidgin/pixmaps/emotes/small/16/Makefile
2541 pidgin/plugins/Makefile
2542 pidgin/plugins/cap/Makefile
2543 pidgin/plugins/disco/Makefile
2544 pidgin/plugins/gestures/Makefile
2545 pidgin/plugins/gevolution/Makefile
2546 pidgin/plugins/musicmessaging/Makefile
2547 pidgin/plugins/perl/Makefile
2548 pidgin/plugins/perl/common/Makefile.PL
2549 pidgin/plugins/ticker/Makefile
2550 libpurple/ciphers/Makefile
2551 libpurple/example/Makefile
2552 libpurple/gconf/Makefile
2554 libpurple/purple-uninstalled.pc
2555 libpurple/purple-2.pc
2556 libpurple/purple-2-uninstalled.pc
2557 libpurple/plugins/Makefile
2558 libpurple/plugins/mono/Makefile
2559 libpurple/plugins/mono/api/Makefile
2560 libpurple/plugins/mono/loader/Makefile
2561 libpurple/plugins/perl/Makefile
2562 libpurple/plugins/perl/common/Makefile.PL
2563 libpurple/plugins/ssl/Makefile
2564 libpurple/plugins/tcl/Makefile
2566 libpurple/protocols/Makefile
2567 libpurple/protocols/bonjour/Makefile
2568 libpurple/protocols/gg/Makefile
2569 libpurple/protocols/irc/Makefile
2570 libpurple/protocols/jabber/Makefile
2571 libpurple/protocols/msn/Makefile
2572 libpurple/protocols/myspace/Makefile
2573 libpurple/protocols/mxit/Makefile
2574 libpurple/protocols/novell/Makefile
2575 libpurple/protocols/null/Makefile
2576 libpurple/protocols/oscar/Makefile
2577 libpurple/protocols/sametime/Makefile
2578 libpurple/protocols/silc/Makefile
2579 libpurple/protocols/silc10/Makefile
2580 libpurple/protocols/simple/Makefile
2581 libpurple/protocols/yahoo/Makefile
2582 libpurple/protocols/zephyr/Makefile
2583 libpurple/tests/Makefile
2586 share/sounds/Makefile
2587 share/ca-certs/Makefile
2590 finch/libgnt/Makefile
2592 finch/libgnt/wms/Makefile
2593 finch/plugins/Makefile
2600 echo $PACKAGE $VERSION
2603 echo Build GTK+ 2.x UI............. : $enable_gtkui
2604 echo Build console UI.............. : $enable_consoleui
2605 echo Build for X11................. : $with_x
2607 echo Enable Gestures............... : $enable_gestures
2608 echo Protocols to build dynamically : $DYNAMIC_PRPLS
2609 echo Protocols to link statically.. : $STATIC_PRPLS
2611 echo Build with GStreamer support.. : $enable_gst
2612 echo Build with D-Bus support...... : $enable_dbus
2613 echo Build with voice and video.... : $enable_vv
2614 if test "x$enable_dbus" = "xyes" ; then
2615 eval eval echo D-Bus services directory...... : $DBUS_SERVICES_DIR
2617 echo Build with GNU Libidn......... : $enable_idn
2618 echo Build with NetworkManager..... : $enable_nm
2619 echo SSL Library/Libraries......... : $msg_ssl
2620 if test "x$SSL_CERTIFICATES_DIR" != "x" ; then
2621 eval eval echo SSL CA certificates directory. : $SSL_CERTIFICATES_DIR
2623 echo Build with Cyrus SASL support. : $enable_cyrus_sasl
2624 echo Use kerberos 4 with zephyr.... : $kerberos
2625 echo Use external libzephyr........ : $zephyr
2626 echo Use external libgadu.......... : $gadu_libs
2627 echo Install pixmaps............... : $enable_pixmaps
2628 echo Old tray icon compatibility... : $enable_traycompat
2629 echo Install translations.......... : $enable_i18n
2630 echo Has you....................... : yes
2632 echo Use XScreenSaver Extension.... : $enable_screensaver
2633 echo Use X Session Management...... : $enable_sm
2634 echo Use startup notification...... : $enable_startup_notification
2635 echo Build with GtkSpell support... : $enable_gtkspell
2637 echo Build with plugin support..... : $enable_plugins
2638 echo Build with Mono support....... : $enable_mono
2639 echo Build with Perl support....... : $enable_perl
2640 echo Build with Tcl support........ : $enable_tcl
2641 echo Build with Tk support......... : $enable_tk
2643 echo Print debugging messages...... : $enable_debug
2645 eval eval echo Pidgin will be installed in $bindir.
2646 if test "x$pidginpath" != "x" ; then
2647 echo Warning: You have an old copy of Pidgin at $pidginpath.
2649 if test "x$enable_pixmaps" = "xno" ; then
2651 echo Warning: You have disabled the installation of pixmap data, but Pidgin
2652 echo still requires installed pixmaps. Be sure you know what you are doing.
2654 if test "x$enable_i18n" = "xno" ; then
2656 echo Warning: You have disabled the building and installation of translation
2657 echo data. This will prevent building pidgin.desktop and the GConf schemas.
2658 echo Be sure you know what you are doing.
2661 echo configure complete, now type \'make\'