Prepping for release.
[pidgin-git.git] / configure.ac
blob7e95b1d8da37b330d9d267d3f962acceff52fb0d
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ([2.50])
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
31 #   gnt_lt_current += 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;
37 #   gnt_lt_current += 1
39 # gnt_version_suffix should be similar to one of the following:
40 #   For beta releases:          [beta2]
41 #   For code under development: [devel]
42 #   For production releases:    []
44 # Make sure to update finch/libgnt/configure.ac with libgnt version changes.
46 m4_define([purple_lt_current], [7])
47 m4_define([purple_major_version], [2])
48 m4_define([purple_minor_version], [7])
49 m4_define([purple_micro_version], [0])
50 m4_define([purple_version_suffix], [])
51 m4_define([purple_version],
52           [purple_major_version.purple_minor_version.purple_micro_version])
53 m4_define([purple_display_version], purple_version[]m4_ifdef([purple_version_suffix],[purple_version_suffix]))
55 m4_define([gnt_lt_current], [7])
56 m4_define([gnt_major_version], [2])
57 m4_define([gnt_minor_version], [7])
58 m4_define([gnt_micro_version], [0])
59 m4_define([gnt_version_suffix], [])
60 m4_define([gnt_version],
61           [gnt_major_version.gnt_minor_version.gnt_micro_version])
62 m4_define([gnt_display_version], gnt_version[]m4_ifdef([gnt_version_suffix],[gnt_version_suffix]))
65 AC_INIT([pidgin], [purple_display_version], [devel@pidgin.im])
67 if test `pwd | wc -w` -ne 1; then
68         AC_MSG_ERROR([
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.
75 AC_CANONICAL_HOST
76 AC_CONFIG_HEADERS([config.h])
77 AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2])
79 PURPLE_MAJOR_VERSION=purple_major_version
80 PURPLE_MINOR_VERSION=purple_minor_version
81 PURPLE_MICRO_VERSION=purple_micro_version
82 PURPLE_VERSION=[purple_display_version]
83 AC_SUBST(PURPLE_MAJOR_VERSION)
84 AC_SUBST(PURPLE_MINOR_VERSION)
85 AC_SUBST(PURPLE_MICRO_VERSION)
86 AC_SUBST(PURPLE_VERSION)
88 PURPLE_LT_VERSION_INFO="purple_lt_current:purple_micro_version:purple_minor_version"
89 AC_SUBST(PURPLE_LT_VERSION_INFO)
91 GNT_MAJOR_VERSION=gnt_major_version
92 GNT_MINOR_VERSION=gnt_minor_version
93 GNT_MICRO_VERSION=gnt_micro_version
94 GNT_VERSION=[gnt_display_version]
95 AC_SUBST(GNT_MAJOR_VERSION)
96 AC_SUBST(GNT_MINOR_VERSION)
97 AC_SUBST(GNT_MICRO_VERSION)
98 AC_SUBST(GNT_VERSION)
100 GNT_LT_VERSION_INFO="gnt_lt_current:gnt_micro_version:gnt_minor_version"
101 AC_SUBST(GNT_LT_VERSION_INFO)
103 AC_PATH_PROG(sedpath, sed)
105 dnl Storing configure arguments
106 AC_DEFINE_UNQUOTED(CONFIG_ARGS, "$ac_configure_args", [configure arguments])
108 dnl Checks for programs.
109 AC_PROG_CC
110 AM_PROG_CC_C_O
111 AC_DISABLE_STATIC
112 AC_PROG_LIBTOOL
113 LIBTOOL="$LIBTOOL --silent"
114 AC_PROG_INSTALL
115 PKG_PROG_PKG_CONFIG
116 AC_FUNC_ALLOCA
118 dnl Checks for header files.
119 AC_HEADER_STDC
120 AC_HEADER_SYS_WAIT
121 AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h)
123 dnl Checks for typedefs, structures, and compiler characteristics.
124 AC_C_CONST
125 AC_STRUCT_TM
126 AC_CHECK_SIZEOF(time_t, ,[
127 #include <stdio.h>
128 #include <time.h>])
130 AC_C_BIGENDIAN
132 dnl Checks for library functions.
133 AC_TYPE_SIGNAL
134 AC_FUNC_STRFTIME
135 AC_CHECK_FUNCS(strdup strstr atexit setlocale)
136 dnl Checks for getopt in standard library
137 AC_CHECK_FUNCS(getopt_long,,
139         AC_LIBOBJ(getopt)
140         AC_LIBOBJ(getopt1)
143 dnl Check for inet_aton
144 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
145                                          [AC_MSG_ERROR([inet_aton not found])])])
146 AC_CHECK_LIB(resolv, __res_query)
147 AC_CHECK_LIB(nsl, gethostent)
148 AC_CHECK_FUNC(socket, ,
149         [AC_CHECK_LIB(socket, socket, , [AC_MSG_ERROR([socket not found])])])
150 dnl If all goes well, by this point the previous two checks will have
151 dnl pulled in -lsocket and -lnsl if we need them.
152 AC_CHECK_FUNC(getaddrinfo,
153         [AC_DEFINE([HAVE_GETADDRINFO], [1],
154                 [Define to 1 if you have the getaddrinfo function.])],
155         [AC_CHECK_LIB(socket, getaddrinfo,
156                 [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)])
157 AC_CHECK_FUNCS(inet_ntop)
158 AC_CHECK_FUNCS(getifaddrs)
159 dnl Check for socklen_t (in Unix98)
160 AC_MSG_CHECKING(for socklen_t)
161 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
162         #include <sys/types.h>
163         #include <sys/socket.h>
164         socklen_t x;
165 ]], [[]])], [
166         AC_MSG_RESULT(yes)
167 ], [
168         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
169                 #include <sys/types.h>
170                 #include <sys/socket.h>
171                 int accept(int, struct sockaddr *, size_t *);
172         ]], [[]])], [
173                 AC_MSG_RESULT(size_t)
174                 AC_DEFINE(socklen_t, size_t, [socklen_t size])
175         ], [
176                 AC_MSG_RESULT(int)
177                 AC_DEFINE(socklen_t, int, [socklen_t size])
178         ])
181 dnl Some systems do not have sa_len field for struct sockaddr.
182 AC_CHECK_MEMBER([struct sockaddr.sa_len],
183         [AC_DEFINE([HAVE_STRUCT_SOCKADDR_SA_LEN],[1],
184         [Define if struct sockaddr has an sa_len member])],[:],
185         [#include <sys/socket.h>])
187 dnl Check for v6-only sockets
188 AC_CHECK_DECL([IPV6_V6ONLY],
189         [AC_DEFINE([HAVE_IPV6_V6ONLY],[1],
190         [Define if the IPV6_V6ONLY setsockopt option exists])],
191         [], [#include <netinet/in.h>])
193 dnl to prevent the g_stat()/g_unlink() crash,
194 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
195 AC_SYS_LARGEFILE
197 dnl FreeBSD doesn't have libdl, dlopen is provided by libc
198 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
200 AC_MSG_CHECKING(for fileno())
201 AC_RUN_IFELSE([AC_LANG_SOURCE([[
202 #include <stdio.h>
204 int main(int argc, char *argv[])
206         int fd;
208         fd = fileno(stdout);
210         return !(fd > 0);
212 ]])], [
213         AC_MSG_RESULT(yes)
214         AC_DEFINE([HAVE_FILENO], [1],
215                   [Define to 1 if your stdio has int fileno(FILE *).])
216 ], [
217         AC_MSG_RESULT(no)
218 ], [
219         # Fallback for Cross Compiling...
220         # This will enable the compatibility code.
221         AC_MSG_RESULT(no)
224 AC_MSG_CHECKING(for the %z format string in strftime())
225 AC_RUN_IFELSE([AC_LANG_SOURCE([[
226 #ifdef HAVE_SYS_TIME_H
227 #include <sys/time.h>
228 #endif
229 #include <time.h>
230 #include <stdio.h>
232 int main()
234         char buf[6];
235         time_t t = time(NULL);
237         if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5)
238                 return 1;
240         fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf);
242         return !((buf[0] == '-' || buf[0] == '+') &&
243                  (buf[1] >= '0' && buf[1] <= '9') &&
244                  (buf[2] >= '0' && buf[2] <= '9') &&
245                  (buf[3] >= '0' && buf[3] <= '9') &&
246                  (buf[4] >= '0' && buf[4] <= '9')
247                 );
249 ]])], [
250         AC_MSG_RESULT(yes)
251         AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
252                 [Define to 1 if you have a strftime() that supports the %z format string.])
253 ], [
254         AC_MSG_RESULT(no)
255 ], [
256         # Fallback for Cross Compiling...
257         # This will enable the compatibility code.
258         AC_MSG_RESULT(no)
261 dnl #######################################################################
262 dnl # Disable creation and installation of translation files
263 dnl #######################################################################
264 AC_ARG_ENABLE(nls, AC_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes)
266 if test x$enable_i18n = xyes; then
267         AC_PROG_INTLTOOL
268         GETTEXT_PACKAGE=pidgin
269         AC_SUBST(GETTEXT_PACKAGE)
272         # before gettexting, in case iconv matters
273         case "$host_os" in
274         darwin*)
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"
281                         ], [])
282                 ], [])
284                 AC_MSG_CHECKING([for fink])
285                 if test -d /sw; then
286                         AC_MSG_RESULT([found, adding /sw to search paths])
287                         CPPFLAGS="$CPPFLAGS -I/sw/include"
288                         LDFLAGS="$LDFLAGS -L/sw/lib"
289                 else
290                         AC_MSG_RESULT([not found])
291                 fi
292                 ;;
293         *)
294                 ;;
295         esac
297         ALL_LINGUAS="af am ar az be@latin bg bn bn_IN bs ca ca@valencia cs da de dz el en_AU en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hu hy id it ja ka km kn ko ku lo lt mk mn mr ms_MY my_MM nb ne nl nn oc or pa pl pt_BR pt ps ro ru si sk sl sq sr sr@latin sv sw ta te th tr uk ur vi xh zh_CN zh_HK zh_TW"
298         AM_GLIB_GNU_GETTEXT
300         dnl If we don't have msgfmt, then po/ is going to fail -- ensure that
301         dnl AM_GLIB_GNU_GETTEXT found it.
303         if test x$MSGFMT = xno -o x$MSGFMT$GMSGFMT$INTLTOOL_MSGFMT = x
304         then
305                 AC_MSG_ERROR([
307 The msgfmt command is required to build libpurple.  If it is installed
308 on your system, ensure that it is in your path.  If it is not, install
309 GNU gettext to continue.
311 If you have msgfmt installed, but for some reason this error message
312 is still displayed, you have encountered what appears to be a bug in
313 third-party configure macros.  Try setting the MSGFMT environment
314 variable to the absolute path to your msgfmt binary and trying
315 configure again, like this:
317 MSGFMT=/path/to/msgfmt ./configure ...
318         ])
319         fi
320 fi #enable_i18n
322 dnl #######################################################################
323 dnl # Check for GLib 2.12 (required)
324 dnl #######################################################################
325 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.12.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [
326         AC_MSG_RESULT(no)
327         AC_MSG_ERROR([
329 You must have GLib 2.12.0 or newer development headers installed to build.
331 If you have these installed already you may need to install pkg-config so
332 I can find them.
333 ])])
334 AC_SUBST(GLIB_CFLAGS)
335 AC_SUBST(GLIB_LIBS)
337 GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
338 AC_SUBST(GLIB_GENMARSHAL)
340 AC_ARG_WITH([extraversion],
341                         AC_HELP_STRING([--with-extraversion=STRING],
342                                                    [extra version number to be displayed in Help->About and --help (for packagers)]),
343                                                    EXTRA_VERSION=$withval)
345 if test x"$EXTRA_VERSION" != "x" ; then
346         AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION-$EXTRA_VERSION", [display version info])
347 else
348         AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION", [display version info])
351 AC_ARG_ENABLE(missing-dependencies, [AC_HELP_STRING([--disable-missing-dependencies],
352                 [skip missing dependencies instead of aborting configure])],
353         force_deps="$enableval", force_deps="yes")
355 AC_ARG_WITH(x, [],
356         with_x="$withval", with_x="yes")
357 AC_ARG_ENABLE(gtkui, [AC_HELP_STRING([--disable-gtkui],
358                 [compile without GTK+ user interface])],
359         enable_gtkui="$enableval", enable_gtkui="yes")
360 AC_ARG_ENABLE(consoleui, [AC_HELP_STRING([--disable-consoleui],
361                 [compile without console user interface])],
362         [enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no])
364 dnl #######################################################################
365 dnl # Check for GTK+ 2.10 and other things used by the GTK UI
366 dnl #######################################################################
367 AC_ARG_ENABLE(screensaver,
368         [AC_HELP_STRING([--disable-screensaver],
369                 [compile without X screensaver extension (used to detect idleness)])],
370         enable_screensaver="$enableval", enable_screensaver="yes")
371 AC_ARG_ENABLE(sm,
372         [AC_HELP_STRING([--disable-sm],
373                 [compile without X session management support])],
374         enable_sm="$enableval", enable_sm="yes")
375 AC_ARG_ENABLE(startup-notification,
376         [AC_HELP_STRING([--disable-startup-notification],
377                 [compile without startup notification support])],
378         enable_startup_notification="$enableval", enable_startup_notification="yes")
379 AC_ARG_ENABLE(gtkspell,
380         [AC_HELP_STRING([--disable-gtkspell],
381                 [compile without GtkSpell automatic spell checking])],
382         enable_gtkspell="$enableval", enable_gtkspell="yes")
383 AC_ARG_ENABLE(gevolution,
384         [AC_HELP_STRING([--enable-gevolution],
385                 [compile with the Evolution plugin])],
386         enable_gevolution="$enableval", enable_gevolution="no")
387 AC_ARG_ENABLE(cap,
388         [AC_HELP_STRING([--enable-cap],
389                 [compile with Contact Availability Prediction plugin])],
390         enable_cap="$enableval", enable_cap="no")
391 AC_ARG_ENABLE(gestures,
392         [AC_HELP_STRING([--disable-gestures],
393                 [compile without the gestures plugin])],
394         enable_gestures="$enableval", enable_gestures="yes")
396 AC_PATH_XTRA
397 # We can't assume that $x_libraries will be set, because autoconf does not
398 # set it in the case when the X libraries are in a standard place.
399 # Ditto for $x_includes
400 if test X"$x_libraries" = X"" || test X"$x_libraries" = XNONE; then
401     x_libpath_add=
402 else
403     x_libpath_add="-L$x_libraries"
405 if test X"$x_includes" = X"" || test X"$x_includes" = XNONE; then
406     x_incpath_add=
407 else
408     x_incpath_add="-I$x_includes"
411 if test "x$enable_gtkui" = "xyes" ; then
412         PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0], , [
413                 AC_MSG_RESULT(no)
414                 AC_MSG_ERROR([
416 You must have GTK+ 2.10.0 or newer development headers installed to compile
417 Pidgin.  If you want to build only Finch then specify --disable-gtkui when
418 running configure.
419 ])])
421         AC_SUBST(GTK_CFLAGS)
422         AC_SUBST(GTK_LIBS)
424         dnl We only really need Pango >= 1.4 for decent RTL support
425         PKG_CHECK_MODULES(PANGO, [pango >= 1.4.0],
426                         AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:)
428         dnl #######################################################################
429         dnl # Check if we should compile with X support
430         dnl #######################################################################
431         if test "x$with_x" = "xyes" ; then
432                 PKG_CHECK_MODULES(X11, x11,
433                         [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])],
434                         [AC_MSG_RESULT(no)
435                                 if test "x$x_incpath_add" != "x" -a "x$x_libpath_add" != "x"; then
436                                         X11_LIBS="$x_libpath_add"
437                                         X11_CFLAGS="$x_incpath_add"
438                                 else
439                                         with_x="no"
440                                         if test "x$force_deps" = "xyes" ; then
441                                                 AC_MSG_ERROR([
442 X11 development headers not found.
443 Use --without-x if you do not need X11 support.
445                                         fi
446                                 fi
447                         ])
448                 AC_SUBST(X11_LIBS)
449                 AC_SUBST(X11_CFLAGS)
450         else
451                 enable_screensaver=no
452                 enable_sm=no
453                 enable_gestures=no
454         fi
456         dnl #######################################################################
457         dnl # Check for XScreenSaver
458         dnl #######################################################################
459         if test "x$enable_screensaver" = "xyes" ; then
460                 if test "x$with_x" = "xyes" ; then
461                         old_LIBS="$LIBS"
462                         LIBS="$LIBS $GTK_LIBS $x_libpath_add"
463                         XSS_LIBS=""
464                         XSS_HEADERS=""
465                         AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm])
466                         AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm])
467                         if test "x$XSS_LIBS" != "x"; then
468                                 oldCPPFLAGS="$CPPFLAGS"
469                                 CPPFLAGS="$CPPFLAGS $x_incpath_add"
470                                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
471                                         #include <X11/Xlib.h>
472                                         #include <X11/extensions/scrnsaver.h>
473                                         ]], [[]])], [], [enable_screensaver=no])
474                                 CPPFLAGS="$oldCPPFLAGS"
475                         else
476                                 enable_screensaver=no
477                         fi
478                         LIBS="$old_LIBS"
480                         if test "x$enable_screensaver" = "xyes" ; then
481                                 AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])
482                                 AC_SUBST(XSS_LIBS)
483                         else
484                                 if test "x$force_deps" = "xyes" ; then
485                                         AC_MSG_ERROR([
486 XScreenSaver extension development headers not found.
487 Use --disable-screensaver if you do not need XScreenSaver extension support,
488 this is required for detecting idle time by mouse and keyboard usage.
490                                 fi
491                         fi
492                 else
493                         AC_MSG_ERROR([X support is required to build with XScreenSaver extensions])
494                 fi
495         fi
497         dnl #######################################################################
498         dnl # Check for X session management libs
499         dnl #######################################################################
500         if test "x$enable_sm" = "xyes"; then
501                 if test "x$with_x" = "xyes" ; then
502                         enable_sm=no
503                         AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE])
504                         if test "x$found_sm_lib" = "xtrue"; then
505                                 oldCPPFLAGS="$CPPFLAGS"
506                                 CPPFLAGS="$CPPFLAGS $x_incpath_add"
507                                 AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes)
508                                 CPPFLAGS="$oldCPPFLAGS"
509                         fi
511                         if test "x$enable_sm" = "xyes"; then
512                                 AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.])
513                                 AC_SUBST(SM_LIBS)
514                         else
515                                 if test "x$force_deps" = "xyes" ; then
516                                         AC_MSG_ERROR([
517 X session management development headers not found.
518 Use --disable-sm if you do not need session management support.
520                                 fi
521                         fi
522                 else
523                         AC_MSG_ERROR([X support is required to build with X session management support])
524                 fi
525         fi
527         dnl #######################################################################
528         dnl # Check for X11 to allow the gestures plugin
529         dnl #######################################################################
530         if test "x$enable_gestures" = "xyes"; then
531                 if test "x$with_x" = "xno" ; then
532                         enable_gestures=no
533                 fi
534         fi
536         dnl #######################################################################
537         dnl # Check for startup notification
538         dnl #######################################################################
539         if test "x$enable_startup_notification" = "xyes"; then
540                 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, [libstartup-notification-1.0 >= 0.5], , [
541                         AC_MSG_RESULT(no)
542                         enable_startup_notification="no"
543                         if test "x$force_deps" = "xyes" ; then
544                                 AC_MSG_ERROR([
545 Startup notification development headers not found.
546 Use --disable-startup-notification if you do not need it.
548                         fi])
550                 if test "x$enable_startup_notification" = "xyes"; then
551                         AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
552                         AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
553                         AC_SUBST(STARTUP_NOTIFICATION_LIBS)
554                 fi
555         fi
557         dnl #######################################################################
558         dnl # Check for GtkSpell
559         dnl #######################################################################
560         if test "x$enable_gtkspell" = "xyes" ; then
561                 PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , [
562                         AC_MSG_RESULT(no)
563                         enable_gtkspell="no"
564                         if test "x$force_deps" = "xyes" ; then
565                                 AC_MSG_ERROR([
566 GtkSpell development headers not found.
567 Use --disable-gtkspell if you do not need it.
569                         fi])
570                 if test "x$enable_gtkspell" = "xyes" ; then
571                         AC_DEFINE(USE_GTKSPELL, 1, [Define if we're using GtkSpell])
572                         AC_SUBST(GTKSPELL_CFLAGS)
573                         AC_SUBST(GTKSPELL_LIBS)
574                 fi
575         fi
577         dnl #######################################################################
578         dnl # Check for stuff needed by the Evolution integration plugin.
579         dnl #######################################################################
580         if test "x$enable_gevolution" = "xyes"; then
581                 evo_deps="libebook-1.2 libedata-book-1.2"
582                 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, , [
583                         AC_MSG_RESULT(yes)
584                         enable_gevolution="no"
585                 ])
586                 if test "x$enable_gevolution" = "xno"; then
587                         evo_deps="libebook-1.0 libedata-book-1.0"
588                         PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [
589                                 enable_gevolution="yes"
590                         ], [
591                                 AC_MSG_RESULT(yes)
592                         ])
593                 fi
594                 if test "x$enable_gevolution" = "xyes"; then
595                         AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.])
596                         AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
597                         AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
598                 else
599                         if test "x$force_deps" = "xyes" ; then
600                                 AC_MSG_ERROR([
601 Evolution development headers not found.
602 Use --disable-gevolution if you do not need it.
604                         fi
605                 fi
606         fi
608         dnl #######################################################################
609         dnl # Check for libsqlite3 (for the Contact Availability Prediction plugin)
610         dnl #######################################################################
611         if test "x$enable_cap" = "xyes"; then
612                 PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[
613                         AC_MSG_RESULT(no)
614                         enable_cap="no"
615                         if test "x$force_deps" = "xyes" ; then
616                                 AC_MSG_ERROR([
617 sqlite3 development headers not found.
618 Use --disable-cap if you do not need the Contact Availability Prediction plugin.
620                         fi])
621         fi
622         
624 else # GTK
625         enable_cap=no
626         enable_gevolution=no
627         enable_gtkspell=no
628         enable_screensaver=no
629         enable_sm=no
630         enable_startup_notification=no
631 fi      # GTK
633 AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtkui" = "xyes")
634 AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$enable_gevolution" = "xyes")
635 AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes")
636 AM_CONDITIONAL(ENABLE_GESTURES, test "x$enable_gestures" = "xyes")
639 dnl #######################################################################
640 dnl # Check for ncurses and other things used by the console UI
641 dnl #######################################################################
642 GNT_LIBS=""
643 GNT_CFLAGS=""
644 AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR],
645                 [compile finch against the ncurses includes in DIR])],
646                 [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""])
647 if test "x$enable_consoleui" = "xyes"; then
648         AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no])
649         AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"],
650             [enable_consoleui=no], [$GNT_LIBS])
652         if test "x$enable_consoleui" = "xyes"; then
653                 dnl # Some distros put the headers in ncursesw/, some don't
654                 found_ncurses_h=no
655                 for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include
656                 do
657                         f="$location/ncurses.h"
658                         AC_CHECK_HEADER($f,[
659                                 AC_MSG_CHECKING([if $f supports wide characters])
660                                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
661                                         #define _XOPEN_SOURCE_EXTENDED
662                                         #include <$f>
663                                 ]], [[
664                                         #ifndef get_wch
665                                         # error get_wch not found!
666                                         #endif
667                                 ]])], [
668                                         dir=$location
669                                         if test x"$dir" != x"." ; then
670                                                 GNT_CFLAGS="-I$dir/"
671                                         else
672                                                 GNT_CFLAGS=""
673                                         fi
675                                         found_ncurses_h=yes
676                                         AC_MSG_RESULT([yes])
677                                         break
678                                 ], [
679                                         AC_MSG_RESULT([no])
680                                 ])
681                         ])
682                 done
684                 if test x"$found_ncurses_h" = x"no" ; then
685                         GNT_LIBS=""
686                         GNT_CFLAGS=""
687                         enable_consoleui=no
688                 fi
689         else
690                 # ncursesw was not found. Look for plain old ncurses
691                 enable_consoleui=yes
692                 AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no])
693                 AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"],
694                     [enable_consoleui=no], [$GNT_LIBS])
695                 AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.])
696                 if test x"$ac_ncurses_includes" != "x"; then
697                         GNT_CFLAGS="-I$ac_ncurses_includes"
698                 else
699                         if test x"$NCURSES_HEADERS" != "x"; then
700                                 GNT_CFLAGS="-I$NCURSES_HEADERS"
701                         fi
702                 fi
703         fi
706 if test "x$force_finch" = "xyes" -a "x$enable_consoleui" != "xyes"; then
707         AC_MSG_ERROR([
709 Finch will not be built. You need to install ncursesw (or ncurses) and its development headers.
714 AC_SUBST(GNT_LIBS)
715 AC_SUBST(GNT_CFLAGS)
716 AM_CONDITIONAL(ENABLE_GNT, test "x$enable_consoleui" = "xyes")
718 #AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])])
720 dnl #######################################################################
721 dnl # Check for LibXML2 (required)
722 dnl #######################################################################
723 PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= 2.6.0], , [
724         AC_MSG_RESULT(no)
725         AC_MSG_ERROR([
726 You must have libxml2 >= 2.6.0 development headers installed to build.
727 ])])
728 PKG_CHECK_EXISTS([libxml-2.0 >= 2.6.18], , [
729         AC_MSG_WARN([
730 Versions of libxml2 < 2.6.18 may contain bugs that could cause XMPP messages to be discarded.
731 ])])
733 AC_SUBST(LIBXML_CFLAGS)
734 AC_SUBST(LIBXML_LIBS)
736 dnl #######################################################################
737 dnl # GConf schemas
738 dnl #######################################################################
739 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
740 AM_CONDITIONAL(USE_GCONFTOOL, test "x$GCONFTOOL" != "xno")
741 AM_GCONF_SOURCE_2
743 dnl #######################################################################
744 dnl # Check for GStreamer
745 dnl #######################################################################
747 dnl TODO: Depend on gstreamer >= 0.10.10, and remove the conditional use of
748 dnl       gst_registry_fork_set_enabled.
749 AC_ARG_ENABLE(gstreamer,
750         [AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
751         enable_gst="$enableval", enable_gst="yes")
752 if test "x$enable_gst" != "xno"; then
753         PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], [
754                 AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
755                 AC_SUBST(GSTREAMER_CFLAGS)
756                 AC_SUBST(GSTREAMER_LIBS)
757                 AC_CHECK_LIB(gstreamer-0.10, gst_registry_fork_set_enabled,
758                         [ AC_DEFINE(GST_CAN_DISABLE_FORKING, [],
759                           [Define if gst_registry_fork_set_enabled exists])],
760                         [], [$GSTREAMER_LIBS])
761         ], [
762                 AC_MSG_RESULT(no)
763                 enable_gst="no"
764                 if test "x$force_deps" = "xyes" ; then
765                         AC_MSG_ERROR([
766 GStreamer development headers not found.
767 Use --disable-gstreamer if you do not need GStreamer (sound) support.
769                 fi])
772 dnl #######################################################################
773 dnl # Check for GStreamer Interfaces
774 dnl #######################################################################
775 if test "x$enable_gst" != "xno"; then
776         AC_ARG_ENABLE(gstreamer-interfaces,
777                 [AC_HELP_STRING([--disable-gstreamer-interfaces], [compile without GStreamer interface support])],
778                         enable_gstinterfaces="$enableval", enable_gstinterfaces="yes")
779         if test "x$enable_gstinterfaces" != "xno"; then
780                 PKG_CHECK_MODULES(GSTINTERFACES, [gstreamer-interfaces-0.10], [
781                         AC_DEFINE(USE_GSTINTERFACES, 1, [Use GStreamer interfaces for X overlay support])
782                         AC_SUBST(GSTINTERFACES_CFLAGS)
783                         AC_SUBST(GSTINTERFACES_LIBS)
784                 ], [
785                         enable_gstinterfaces="no"
786                 ])
787         fi
788 else
789         enable_gstinterfaces="no"
792 dnl #######################################################################
793 dnl # Check for Farsight
794 dnl #######################################################################
795 AC_ARG_ENABLE(farsight,
796         [AC_HELP_STRING([--disable-farsight], [compile without farsight support])],
797         enable_farsight="$enableval", enable_farsight="yes")
798 if test "x$enable_farsight" != "xno"; then
799         PKG_CHECK_MODULES(FARSIGHT, [farsight2-0.10 >= 0.0.9], [
800                 AC_DEFINE(USE_FARSIGHT, 1, [Use Farsight for voice and video])
801                 AC_SUBST(FARSIGHT_CFLAGS)
802                 AC_SUBST(FARSIGHT_LIBS)
803         ], [
804                 enable_farsight="no"
805         ])
808 dnl #######################################################################
809 dnl # Check for Voice and Video support
810 dnl #######################################################################
811 AC_ARG_ENABLE(vv,
812         [AC_HELP_STRING([--disable-vv], [compile without voice and video support])],
813         enable_vv="$enableval", enable_vv="yes")
814 if test "x$enable_vv" != "xno"; then
815         if test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farsight" != "xno"; then
816                 AC_DEFINE(USE_VV, 1, [Use voice and video])
817         else
818                 enable_vv="no"
819                 if test "x$force_deps" = "xyes"; then
820                         AC_MSG_ERROR([
821 Dependencies for voice/video were not met.
822 Install the necessary gstreamer and farsight packages first.
823 Or use --disable-vv if you do not need voice/video support.
824                         ])
825                 fi
826         fi
828 AM_CONDITIONAL(USE_VV, test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farsight" != "xno")
830 dnl #######################################################################
831 dnl # Check for Internationalized Domain Name support
832 dnl #######################################################################
834 AC_ARG_ENABLE(idn,
835         [AC_HELP_STRING([--disable-idn], [compile without IDN support])],
836         [enable_idn="$enableval" force_idn=$enableval], [enable_idn="yes" force_idn=no])
837 if test "x$enable_idn" != "xno"; then
838         PKG_CHECK_MODULES(IDN, libidn >= 0.0.0, [
839                 AC_DEFINE(USE_IDN, 1, [Use GNU Libidn for stringprep and IDN])
840                 AC_SUBST(IDN_CFLAGS)
841                 AC_SUBST(IDN_LIBS)
842         ], [
843                 AC_MSG_RESULT(no)
844                 enable_idn="no"
845                 if test "x$force_deps" = "xyes" ; then
846                         AC_MSG_ERROR([
847 GNU Libidn development headers not found.
848 Use --disable-idn if you do not need it.
850                 fi
851         ])
854 dnl #######################################################################
855 dnl # Check for Meanwhile headers (for Sametime)
856 dnl #######################################################################
857 AC_ARG_ENABLE(meanwhile,
858         [AC_HELP_STRING([--disable-meanwhile],
859                 [compile without meanwhile (required for Sametime support)])],
860         enable_meanwhile="$enableval", enable_meanwhile="yes")
861 if test "x$enable_meanwhile" = "xyes"; then
862         PKG_CHECK_MODULES(MEANWHILE, [meanwhile >= 1.0.0 meanwhile < 2.0.0], [
863                 have_meanwhile="yes"
864         ], [
865                 have_meanwhile="no"
866                 if test "x$force_deps" = "xyes" ; then
867                         AC_MSG_ERROR([
868 Meanwhile development headers not found.
869 Use --disable-meanwhile if you do not need meanwhile (Sametime) support.
871                 fi])
873 AC_SUBST(MEANWHILE_CFLAGS)
874 AC_SUBST(MEANWHILE_LIBS)
876 dnl #######################################################################
877 dnl # Check for Native Avahi headers (for Bonjour)
878 dnl #######################################################################
879 AC_ARG_ENABLE(avahi,
880         [AC_HELP_STRING([--disable-avahi],
881                 [compile without avahi (required for Bonjour support)])],
882         enable_avahi="$enableval", enable_avahi="yes")
884 if test "x$enable_avahi" = "xyes"; then
885         AC_ARG_WITH(avahi-client-includes, [AC_HELP_STRING([--with-avahi-client-includes=DIR], [compile the Bonjour plugin against the Avahi Client includes in DIR])], [ac_avahi_client_includes="$withval"], [ac_avahi_client_includes="no"])
886         AC_ARG_WITH(avahi-client-libs, [AC_HELP_STRING([--with-avahi-client-libs=DIR], [compile the Bonjour plugin against the Avahi Client libs in DIR])], [ac_avahi_client_libs="$withval"], [ac_avahi_client_libs="no"])
887         AVAHI_CFLAGS=""
888         AVAHI_LIBS=""
890         dnl Attempt to autodetect Avahi
891         PKG_CHECK_MODULES(AVAHI, [avahi-client avahi-glib], [
892                 avahiincludes="yes"
893                 avahilibs="yes"
894         ], [
895                 avahiincludes="no"
896                 avahilibs="no"
897         ])
899         dnl Override AVAHI_CFLAGS if the user specified an include dir
900         if test "$ac_avahi_client_includes" != "no"; then
901                 AVAHI_CFLAGS="-I$ac_avahi_client_includes"
902         fi
903         CPPFLAGS_save="$CPPFLAGS"
904         CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS"
905         AC_CHECK_HEADER(avahi-client/client.h, [avahiincludes=yes], [avahiincludes=no])
906         CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS $GLIB_CFLAGS"
907         AC_CHECK_HEADER(avahi-glib/glib-malloc.h, [avahiincludes=yes], [avahiincludes=no])
908         CPPFLAGS="$CPPFLAGS_save"
910         dnl Override AVAHI_LIBS if the user specified a libs dir
911         if test "$ac_avahi_client_libs" != "no"; then
912                 AVAHI_LIBS="-L$ac_avahi_client_libs -lavahi-common -lavahi-client -lavahi-glib "
913         fi
914         AC_CHECK_LIB(avahi-client, avahi_client_new, [avahilibs=yes], [avahilibs=no], $AVAHI_LIBS)
917 if test "x$enable_avahi" = "xyes" -a \( "x$avahiincludes" = "xno" -o "x$avahilibs" = "xno" \); then
918         enable_avahi="no"
919         if test "x$force_deps" = "xyes"; then
920                 AC_MSG_ERROR([
921 avahi development headers not found.
922 Use --disable-avahi if you do not need avahi (Bonjour) support.
924         fi
926 AC_SUBST(AVAHI_CFLAGS)
927 AC_SUBST(AVAHI_LIBS)
930 dnl #######################################################################
931 dnl # Check for SILC client includes and libraries
932 dnl #######################################################################
933 AC_ARG_WITH(silc-includes, [AC_HELP_STRING([--with-silc-includes=DIR], [compile the SILC plugin against includes in DIR])], [ac_silc_includes="$withval"], [ac_silc_includes="no"])
934 AC_ARG_WITH(silc-libs, [AC_HELP_STRING([--with-silc-libs=DIR], [compile the SILC plugin against the SILC libs in DIR])], [ac_silc_libs="$withval"], [ac_silc_libs="no"])
935 SILC_CFLAGS=""
936 SILC_LIBS=""
937 have_silc="no"
938 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
939         silc_manual_check="yes"
940 else
941         silc_manual_check="no"
943 if test "x$silc_manual_check" = "xno"; then
944         PKG_CHECK_MODULES(SILC, [silcclient >= 1.1], [
945                 have_silc="yes"
946                 silcincludes="yes"
947                 silcclient="yes"
948         ], [
949                 have_silc="no"
950         ])
951         if test "x$have_silc" = "xno"; then
952                 PKG_CHECK_MODULES(SILC, silcclient, [
953                         have_silc="yes"
954                         silc10includes="yes"
955                         silc10client="yes"
956                 ], [
957                         have_silc="no"
958                 ])
959                 dnl If silcclient.pc wasn't found, check for just silc.pc
960                 if test "x$have_silc" = "xno"; then
961                         PKG_CHECK_MODULES(SILC, silc, [
962                                 have_silc="yes"
963                                 silc10includes="yes"
964                                 silc10client="yes"
965                         ], [
966                                 have_silc="no"
967                         ])
968                 fi
969         fi
970 else
971         if test "$ac_silc_includes" != "no"; then
972                 SILC_CFLAGS="-I$ac_silc_includes"
973         fi
974         CPPFLAGS_save="$CPPFLAGS"
975         CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
976         AC_CHECK_HEADER(silc.h, [silcincludes=yes])
977         CPPFLAGS="$CPPFLAGS_save"
979         if test "$ac_silc_libs" != "no"; then
980                 SILC_LIBS="-L$ac_silc_libs"
981         fi
982         SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
983         AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS)
985         if test "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes"; then
986                 have_silc="yes"
987         else
988                 CPPFLAGS_save="$CPPFLAGS"
989                 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
990                 AC_CHECK_HEADER(silcincludes.h, [silc10includes=yes])
991                 CPPFLAGS="$CPPFLAGS_save"
993                 SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
994                 AC_CHECK_LIB(silcclient, silc_client_init, [silc10client=yes], , $SILC_LIBS)
995                 if test "x$silc10includes" = "xyes" -a "x$silc10client" = "xyes"; then
996                         have_silc="yes"
997                 fi
998         fi
1000 AC_SUBST(SILC_LIBS)
1001 AC_SUBST(SILC_CFLAGS)
1002 dnl SILC Toolkit >= 1.0.1 has a new MIME API
1003 if test "x$silcclient" = "xyes"; then
1004         AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
1005 elif test "x$silc10client" = "xyes"; then
1006         CPPFLAGS_save="$CPPFLAGS"
1007         CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
1008                 AC_MSG_CHECKING(for silcmime.h)
1009                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1010 #include <silcincludes.h>
1011 #include <silcmime.h>
1012                 ]], [[]])], [
1013                 AC_MSG_RESULT(yes)
1014                 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
1015                 ], [
1016                 AC_MSG_RESULT(no)
1017                 ])
1018         CPPFLAGS="$CPPFLAGS_save"
1021 dnl #######################################################################
1022 dnl # Check for Gadu-Gadu client includes and libraries
1023 dnl #######################################################################
1024 AC_ARG_WITH(gadu-includes, [AC_HELP_STRING([--with-gadu-includes=DIR], [compile the Gadu-Gadu plugin against includes in DIR])], [ac_gadu_includes="$withval"], [ac_gadu_includes="no"])
1025 AC_ARG_WITH(gadu-libs, [AC_HELP_STRING([--with-gadu-libs=DIR], [compile the Gadu-Gadu plugin against the libs in DIR])], [ac_gadu_libs="$withval"], [ac_gadu_libs="no"])
1026 GADU_CFLAGS=""
1027 GADU_LIBS=""
1028 if test -n "$with_gadu_includes" || test -n "$with_gadu_libs"; then
1029         gadu_manual_check="yes"
1030 else
1031         gadu_manual_check="no"
1033 if test "x$gadu_manual_check" = "xno"; then
1034         PKG_CHECK_MODULES(GADU, [libgadu >= 1.9.0-rc2], [
1035                 gadu_includes="yes"
1036                 gadu_libs="yes"
1037         ], [
1038                 gadu_includes="no"
1039         ])
1040 else
1041         if test "$ac_gadu_includes" != "no"; then
1042                 GADU_CFLAGS="-I$ac_gadu_includes"
1043         fi
1044         CPPFLAGS_save="$CPPFLAGS"
1045         CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
1046         AC_CHECK_HEADER(libgadu.h, [gadu_includes=yes])
1047         CPPFLAGS="$CPPFLAGS_save"
1049         if test "$ac_gadu_libs" != "no"; then
1050                 GADU_LIBS="-L$ac_gadu_libs"
1051         fi
1052         GADU_LIBS="$GADU_LIBS -lgadu"
1053         AC_CHECK_LIB(gadu, gg_libgadu_version, [gadu_libs=yes], , $GADU_LIBS)
1055 GADU_CFLAGS=`echo $GADU_CFLAGS |$sedpath 's/-Wall//'`
1057 if test "x$gadu_libs" = "xyes"; then
1058         AC_MSG_CHECKING(for libgadu GPL compatibility)
1059         CPPFLAGS_save="$CPPFLAGS"
1060         CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
1061         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
1062 #if defined(__GG_LIBGADU_HAVE_OPENSSL) || defined(GG_CONFIG_HAVE_OPENSSL)
1063 #error "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1064 #endif
1065         ]])], [
1066                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
1067 #if GG_DEFAULT_PROTOCOL_VERSION < 0x2e
1068 #error "Your libgadu version is too old. libpurple requires 1.9.0-rc2 or higher."
1069 #endif
1070                 ]])], [
1071                         AC_MSG_RESULT(yes)
1072                         AC_DEFINE([HAVE_LIBGADU], [1],
1073                                 [Define to 1 if you have libgadu.])
1074                 ], [
1075                         AC_MSG_RESULT(no)
1076                         echo
1077                         echo
1078                         echo "Your supplied copy of libgadu is too old."
1079                         echo "Install version 1.9.0-rc2 or newer."
1080                         echo "Then rerun this ./configure"
1081                         echo
1082                         echo "Falling back to using our own copy of libgadu"
1083                         echo
1084                         GADU_LIBS=""
1085                         GADU_CFLAGS=""
1086                         gadu_libs=no
1087                 ])
1088         ], [
1089                 AC_MSG_RESULT(no)
1090                 echo
1091                 echo
1092                 echo "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1093                 echo "To compile against system libgadu, please recompile libgadu using:"
1094                 echo "./autogen.sh --disable-libgadu-openssl --disable-static --enable-shared"
1095                 echo "Then rerun this ./configure"
1096                 echo
1097                 echo "Falling back to using our own copy of libgadu"
1098                 echo
1099                 GADU_LIBS=""
1100                 GADU_CFLAGS=""
1101                 gadu_libs=no
1102         ])
1103         CPPFLAGS="$CPPFLAGS_save"
1106 AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes")
1108 if test "x$gadu_libs" = "x"; then
1109         gadu_libs=no
1112 AC_SUBST(GADU_LIBS)
1113 AC_SUBST(GADU_CFLAGS)
1115 AC_ARG_ENABLE(distrib,,,enable_distrib=no)
1116 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
1117 DYNAMIC_PRPLS=all
1118 AC_ARG_WITH(static-prpls, [AC_HELP_STRING([--with-static-prpls], [Link to certain protocols statically])], [STATIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`], [STATIC_PRPLS=""])
1119 if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then
1120         DYNAMIC_PRPLS=""
1123 if test "x$STATIC_PRPLS" = "xall" ; then
1124         STATIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar qq sametime silc simple yahoo zephyr"
1126 if test "x$have_meanwhile" != "xyes" ; then
1127         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'`
1129 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1130         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'`
1132 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1133         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc/silc10/'`
1135 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1136         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc10//'`
1138 AC_SUBST(STATIC_PRPLS)
1139 STATIC_LINK_LIBS=
1140 extern_init=
1141 load_proto=
1142 for i in $STATIC_PRPLS ; do
1143         dnl Ugly special case for "libsilcpurple.la":
1144         dnl ... and Ugly special case for multi-protocol oscar and yahoo
1145         if test \( "x$i" = "xoscar" -o "x$i" = "xaim" -o "x$i" = "xicq" \) -a "x$static_oscar" != "xyes"; then
1146                 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/oscar/liboscar.la"
1147                 extern_init="$extern_init extern gboolean purple_init_aim_plugin();"
1148                 extern_init="$extern_init extern gboolean purple_init_icq_plugin();"
1149                 load_proto="$load_proto purple_init_aim_plugin();"
1150                 load_proto="$load_proto purple_init_icq_plugin();"
1151         elif test "x$i" = "xyahoo"; then
1152                 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/yahoo/libymsg.la"
1153                 extern_init="$extern_init extern gboolean purple_init_yahoo_plugin();"
1154                 extern_init="$extern_init extern gboolean purple_init_yahoojp_plugin();"
1155                 load_proto="$load_proto purple_init_yahoo_plugin();"
1156                 load_proto="$load_proto purple_init_yahoojp_plugin();"
1157         else
1158                 if test "x$i" = "xsilc"; then
1159                         STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.la"
1160                 elif test "x$i" = "xsilc10"; then
1161                         STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libsilcpurple.la"
1162                 else
1163                         STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.la"
1164                 fi
1165                 extern_init="$extern_init extern gboolean purple_init_${i}_plugin();"
1166                 load_proto="$load_proto purple_init_${i}_plugin();"
1167         fi
1168         case $i in
1169                 bonjour)        static_bonjour=yes ;;
1170                 gg)                     static_gg=yes ;;
1171                 irc)            static_irc=yes ;;
1172                 jabber)         static_jabber=yes ;;
1173                 msn)            static_msn=yes ;;
1174                 myspace)        static_myspace=yes ;;
1175                 mxit)           static_mxit=yes ;;
1176                 novell)         static_novell=yes ;;
1177                 oscar)          static_oscar=yes ;;
1178                 aim)            static_oscar=yes ;;
1179                 icq)            static_oscar=yes ;;
1180                 qq)                     static_qq=yes ;;
1181                 sametime)       static_sametime=yes ;;
1182                 silc)           static_silc=yes ;;
1183                 silc10)         static_silc=yes ;;
1184                 simple)         static_simple=yes ;;
1185                 yahoo)          static_yahoo=yes ;;
1186                 zephyr)         static_zephyr=yes ;;
1187                 *)                      echo "Invalid static protocol $i!!" ; exit ;;
1188         esac
1189 done
1190 AM_CONDITIONAL(STATIC_BONJOUR, test "x$static_bonjour" = "xyes")
1191 AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes")
1192 AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes")
1193 AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes")
1194 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes")
1195 AM_CONDITIONAL(STATIC_MYSPACE, test "x$static_myspace" = "xyes")
1196 AM_CONDITIONAL(STATIC_MXIT, test "x$static_mxit" = "xyes")
1197 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes")
1198 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes")
1199 AM_CONDITIONAL(STATIC_QQ, test "x$static_qq" = "xyes")
1200 AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_meanwhile" = "xyes")
1201 AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$have_silc" = "xyes")
1202 AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes")
1203 AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes")
1204 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes")
1205 AC_SUBST(STATIC_LINK_LIBS)
1206 AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init static void static_proto_init(void) { $load_proto },
1207         [Loads static protocol plugin module initialization functions.])
1209 AC_ARG_WITH(dynamic_prpls, [AC_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`])
1210 if test "x$DYNAMIC_PRPLS" = "xall" ; then
1211         DYNAMIC_PRPLS="bonjour gg irc jabber msn myspace mxit novell oscar qq sametime silc simple yahoo zephyr"
1213 if test "x$have_meanwhile" != "xyes"; then
1214         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'`
1216 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1217         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
1219 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1220         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc/silc10/'`
1222 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1223         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc10//'`
1225 AC_SUBST(DYNAMIC_PRPLS)
1226 for i in $DYNAMIC_PRPLS ; do
1227         case $i in
1228                 bonjour)        dynamic_bonjour=yes ;;
1229                 gg)                     dynamic_gg=yes ;;
1230                 irc)            dynamic_irc=yes ;;
1231                 jabber)         dynamic_jabber=yes ;;
1232                 msn)            dynamic_msn=yes ;;
1233                 myspace)        dynamic_myspace=yes ;;
1234                 mxit)           dynamic_mxit=yes ;;
1235                 novell)         dynamic_novell=yes ;;
1236                 null)           dynamic_null=yes ;;
1237                 oscar)          dynamic_oscar=yes ;;
1238                 aim)            dynamic_oscar=yes ;;
1239                 icq)            dynamic_oscar=yes ;;
1240                 qq)                     dynamic_qq=yes ;;
1241                 sametime)       dynamic_sametime=yes ;;
1242                 silc)           dynamic_silc=yes ;;
1243                 silc10)         dynamic_silc=yes ;;
1244                 simple)         dynamic_simple=yes ;;
1245                 yahoo)          dynamic_yahoo=yes ;;
1246                 zephyr)         dynamic_zephyr=yes ;;
1247                 *)                      echo "Invalid dynamic protocol $i!!" ; exit ;;
1248         esac
1249 done
1251 AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes)
1252 AC_ARG_WITH(krb4, [AC_HELP_STRING([--with-krb4=PREFIX], [compile Zephyr plugin with Kerberos 4 support])], kerberos="$withval", kerberos="no")
1253 AC_ARG_WITH(zephyr, [AC_HELP_STRING([--with-zephyr=PREFIX], [compile Zephyr plugin against external libzephyr])], zephyr="$withval", zephyr="no")
1254 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
1256 AC_CHECK_HEADERS(sys/utsname.h)
1257 AC_CHECK_FUNC(uname)
1259 AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes)
1261 DEBUG_CFLAGS="$DEBUG_CFLAGS -DPURPLE_DISABLE_DEPRECATED -DPIDGIN_DISABLE_DEPRECATED -DFINCH_DISABLE_DEPRECATED -DGNT_DISABLE_DEPRECATED"
1262 if test "x$GCC" = "xyes"; then
1263         dnl We enable -Wall later.
1264         dnl If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
1265         dnl This leads to warnings we don't want.
1266         CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
1268         dnl ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE
1269         dnl
1270         dnl Future Possibilities
1271         dnl
1272         dnl Consider adding -Wbad-function-cast.
1273         dnl     This leads to spurious warnings using GPOINTER_TO_INT(), et al. directly on a function call.
1274         dnl             We'd need an intermediate variable.
1275         dnl
1276         dnl Consider adding -Wfloat-equal.
1277         dnl     This leads to warnings with Perl.
1278         dnl             Perhaps we could write ugly configure magic and pass -Wno-float-equal down to that subdirectory.
1279         dnl             On the other hand, it's probably actually broken, so maybe the Perl folks should fix that?
1280         dnl
1281         dnl Consider removing -Wno-sign-compare (from the -Wextra set) and fixing all those cases.
1282         dnl     This is likely non-trivial.
1283         dnl
1284         for newflag in \
1285                         "-Waggregate-return" \
1286                         "-Wcast-align" \
1287                         "-Wdeclaration-after-statement" \
1288                         "-Wendif-labels" \
1289                         "-Werror-implicit-function-declaration" \
1290                         "-Wextra -Wno-sign-compare -Wno-unused-parameter" \
1291                         "-Wformat-security" \
1292                                 "-Werror=format-security" \
1293                         "-Winit-self" \
1294                         "-Wmissing-declarations" \
1295                         "-Wmissing-noreturn" \
1296                         "-Wmissing-prototypes" \
1297                         "-Wpointer-arith" \
1298                         "-Wundef" \
1299         ; do
1300                 orig_CFLAGS="$CFLAGS"
1301                 CFLAGS="$CFLAGS $newflag"
1302                 AC_MSG_CHECKING(for $newflag option to gcc)
1303                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
1304                         int main() {return 0;}
1305                 ]])], [
1306                         AC_MSG_RESULT(yes)
1307                         CFLAGS="$orig_CFLAGS"
1308                         DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
1309                 ], [
1310                         AC_MSG_RESULT(no)
1311                         CFLAGS="$orig_CFLAGS"
1312                 ])
1313         done
1315         if test "x$enable_fortify" = "xyes"; then
1316                 AC_MSG_CHECKING(for FORTIFY_SOURCE support)
1317                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <features.h>]], [[
1318                         int main() {
1319                         #if !(__GNUC_PREREQ (4, 1) \
1320                                 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
1321                                 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
1322                                         && __GNUC_MINOR__ == 4 \
1323                                         && (__GNUC_PATCHLEVEL__ > 2 \
1324                                                 || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
1325                         #error No FORTIFY_SOURCE support
1326                         #endif
1327                                 return 0;
1328                         }
1329                 ]])], [
1330                         AC_MSG_RESULT(yes)
1331                         DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2"
1332                 ], [
1333                         AC_MSG_RESULT(no)
1334                 ])
1335         fi
1337         DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
1338         CFLAGS="-g $CFLAGS"
1340 AC_SUBST(CFLAGS)
1342 AC_PATH_PROG(pidginpath, pidgin)
1344 dnl #######################################################################
1345 dnl # Check for D-Bus libraries
1346 dnl #######################################################################
1348 AC_ARG_ENABLE(dbus, [AC_HELP_STRING([--disable-dbus], [disable D-Bus support])], , enable_dbus=yes)
1349 AC_ARG_ENABLE(nm, [AC_HELP_STRING([--disable-nm], [disable NetworkManager support (requires D-Bus)])], enable_nm=$enableval, enable_nm=yes)
1351 if test "x$enable_dbus" = "xyes" ; then
1352         AC_CHECK_PROG(enable_dbus, dbus-binding-tool, yes, no)
1355 if test "x$enable_dbus" = "xyes" ; then
1356         PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60 dbus-glib-1 >= 0.60], [
1357                 AC_SUBST(DBUS_CFLAGS)
1358                 AC_SUBST(DBUS_LIBS)
1359                 enable_dbus=yes
1360         ], [
1361         enable_dbus=no
1362         if test "x$force_deps" = "xyes" ; then
1363                 AC_MSG_ERROR([
1364 D-Bus development headers not found.
1365 Use --disable-dbus if you do not need D-Bus support.
1367         fi])
1370 dnl Check for NetworkManager.h; if we don't have it, oh well
1371 if test "x$enable_dbus" = "xyes" ; then
1372         if test "x$enable_nm" = "xyes" ; then
1373                 PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [
1374                         AC_SUBST(NETWORKMANAGER_CFLAGS)
1375                         AC_SUBST(NETWORKMANAGER_LIBS)
1376                         AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.])
1377                 ], [
1378                         enable_nm=no
1379                         if test "x$force_deps" = "xyes" ; then
1380                                 AC_MSG_ERROR([
1381 NetworkManager development headers not found.
1382 Use --disable-nm if you do not need NetworkManager support.
1384                         fi])
1385         fi
1386 else
1387         enable_nm=no
1390 dnl #######################################################################
1391 dnl # Check for Python
1392 dnl #######################################################################
1394 dnl Python scripts are used to auto-generate about 3000 lines of C
1395 dnl and XML code that wraps (part of) the existing API so that
1396 dnl it is now accessible through D-Bus.
1398 dnl Python is only required if --enable-dbus is used, and only for
1399 dnl the build process to generate the code, not for running pidgin.
1400 dnl This autogenerated code is system-independent, so in principle we
1401 dnl can generate all of it before shipping.  But I thought adding
1402 dnl auto-generated stuff to the repository is inelegant.
1403 dnl Alternatively, these python scripts could be rewritten
1404 dnl in C (brrrr ...).
1406 AC_ARG_WITH([python],
1407                         AC_HELP_STRING([--with-python=PATH],
1408                                                    [which python interpreter to use for dbus code generation]),
1409                         PYTHON=$withval)
1411 if test "x$enable_dbus" = "xyes" || test "x$enable_consoleui" = "xyes" ; then
1412         if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then
1413                 AC_PATH_PROG([PYTHON], [python], [no])
1414         fi
1416         if test x"$PYTHON" = x"no" ; then
1417                 AC_MSG_WARN([python interpreter not found in your path])
1418                 enable_dbus=no
1419         fi
1421         if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then
1422                 AC_MSG_WARN([python version >= 2.4 required])
1423                 enable_dbus=no
1424         fi
1427 dnl ###########################################################################
1428 dnl # Find the D-Bus services dir.
1429 dnl #
1430 dnl # This is a 3 step process that
1431 dnl #
1432 dnl # 1. checks if --with-dbus-services was set, if so use that.
1433 dnl # 2. checks if --prefix was given, if so use that.
1434 dnl # 3. fallbacks to installing into what should be the correct system
1435 dnl #    directories.
1436 dnl #
1437 dnl # This is still prone to error if one of the legacy directories exist
1438 dnl # although a newer dbus is installed.  But I have tried to order the
1439 dnl # directory searching to keep this situation at a minimum.
1440 dnl ###########################################################################
1441 AC_ARG_WITH(dbus-services, [AC_HELP_STRING([--with-dbus-services=<dir>], [where the D-Bus services directory is located.])])
1443 DBUS_SERVICES_DIR=""
1445 if test x"$enable_dbus" = "xyes" ; then
1446         AC_MSG_CHECKING([location of the D-Bus services directory])
1447         if ! test -z "$with_dbus_services" ; then
1448                 if ! test -d "$with_dbus_services" ; then
1449                         AC_MSG_ERROR([$with_dbus_services does not exist, if this is the correct location please make sure that it exists.])
1450                 fi
1452                 DBUS_SERVICES_DIR="$with_dbus_services"
1453         else
1454                 if test x"$prefix" = x"NONE" ; then
1455                         dnl # no prefix given, so we look for the correct dbus system paths.
1456                         dnl # if a prefix is given, we use it.
1458                         serviceprefixes="$prefix/share $prefix/lib /usr/share /usr/local/share"
1459                         DBUS_SERVICES_DIR=""
1461                         for d in $serviceprefixes ; do
1462                                 dir="$d/dbus-1/services"
1463                                 if test -d $dir ; then
1464                                         DBUS_SERVICES_DIR="$dir"
1465                                         break
1466                                 fi
1467                         done
1469                         if test -z $DBUS_SERVICES_DIR ; then
1470                                 AC_MSG_ERROR([D-Bus services directory was not found!  Please use --with-dbus-services and specify its location.])
1471                         fi
1472                 else
1473                         DBUS_SERVICES_DIR="$datadir/dbus-1/services"
1474                 fi
1475         fi
1476         AC_MSG_RESULT([$DBUS_SERVICES_DIR])
1477         AC_DEFINE(HAVE_DBUS, 1, [Define if we are using D-Bus.])
1479 AC_SUBST(DBUS_SERVICES_DIR)
1481 if test "x$enable_dbus" = "xyes" ; then
1482         echo "Building with D-Bus support"
1483 else
1484         echo "Building without D-Bus support"
1487 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
1489 dnl Check for Python headers (currently useful only for libgnt)
1490 dnl (Thanks to XChat)
1491 if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ; then
1492         AC_MSG_CHECKING(for Python compile flags)
1493         PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
1494         PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'`
1495         changequote(<<, >>)dnl
1496         PY_VERSION=`$PYTHON -c 'import sys ; print sys.version[0:3]'`
1497         PY_MAJOR=`$PYTHON -c 'import sys ; print sys.version[0:2]'`
1498         changequote([, ])dnl
1499         if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then
1500                 AC_MSG_RESULT()
1501                 AC_CHECK_LIB(pthread, pthread_create, )
1502                 AC_CHECK_LIB(util, openpty, )
1503                 AC_CHECK_LIB(db, dbopen, )
1504                 PY_LIBS="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config -lpython$PY_VERSION"
1505                 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
1506                 AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.])
1507                 dnl Because the above AC_CHECK_LIB get in the way...
1508                 AC_MSG_CHECKING(for Python compile flags)
1509                 AC_MSG_RESULT(ok)
1510         else
1511                 AC_MSG_RESULT([Can't find Python.h])
1512                 PY_LIBS=""
1513                 PY_CFLAGS=""
1514         fi
1516 AC_SUBST(PY_CFLAGS)
1517 AC_SUBST(PY_LIBS)
1519 dnl #######################################################################
1520 dnl # Check for Mono support
1521 dnl #######################################################################
1522 AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support (experimental)])], , enable_mono=no)
1523 if test x"$enable_mono" = x"yes" ; then
1524         PKG_CHECK_MODULES(MONO, mono, [
1525                 AC_SUBST(MONO_CFLAGS)
1526                 AC_SUBST(MONO_LIBS)
1527                 enable_mono=yes
1528         ], [
1529                 AC_MSG_RESULT(no)
1530                 AC_MSG_ERROR([
1531 Mono development headers not found.
1532 Use --disable-mono if you do not need Mono support.
1534         ])
1535         if test x"$enable_mono" = x"yes"; then
1536                 oldLIBS="$LIBS"
1537                 LIBS="$LIBS $MONO_LIBS"
1538                 AC_MSG_CHECKING(for libmono)
1539                 AC_CHECK_FUNCS(mono_jit_init, [], enable_mono=no)
1540                 LIBS="$oldLIBS"
1542                 oldCPPFLAGS="$CPPFLAGS"
1543                 CPPFLAGS="$CPPFLAGS $MONO_CFLAGS"
1544                 AC_CHECK_HEADERS(mono/jit/jit.h, [], enable_mono=no)
1545                 AC_CHECK_HEADERS(mono/metadata/object.h, [], enable_mono=no)
1546                 CPPFLAGS="$oldCPPFLAGS"
1548                 AC_DEFINE(ENABLE_MONO, 1, [Define if mono enabled.])
1549         fi
1550 else
1551         MONO_CFLAGS=
1552         MONO_LIBS=
1553         enable_mono=no
1556 AC_SUBST(MONO_CFLAGS)
1557 AC_SUBST(MONO_LIBS)
1558 AM_CONDITIONAL(USE_MONO, test x"$enable_mono" = x"yes")
1560 dnl #######################################################################
1561 dnl # Check for Perl support
1562 dnl #######################################################################
1563 AC_ARG_ENABLE(perl, [AC_HELP_STRING([--disable-perl], [compile without perl scripting])], , enable_perl=yes)
1565 if test "$enable_plugins" = no ; then
1566         enable_perl=no
1568 looked_for_perl="no"
1569 if test "$enable_perl" = yes ; then
1570         looked_for_perl="yes"
1571         AC_PATH_PROG(perlpath, perl)
1572         AC_MSG_CHECKING(for Perl compile flags)
1573         PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
1574         if test "_$PERL_CFLAGS" = _ ; then
1575                 AC_MSG_RESULT([not found, building without perl.])
1576                 enable_perl=no
1577         else
1578                 PERL_LIBS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null |$sedpath 's/-lgdbm //'`
1579                 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-ldb //'`
1580                 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lndbm //'`
1581                 if test "$system" = "Linux"; then
1582                         PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lnsl //'`
1583                         PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lposix //'`
1584                 fi
1585                 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lc //'`
1586                 AC_MSG_RESULT(ok)
1588                 oldLIBS="$LIBS"
1589                 LIBS="$LIBS $PERL_LIBS"
1590                 AC_MSG_CHECKING(for libperl)
1591                 AC_CHECK_FUNCS(perl_run, [], enable_perl=no)
1592                 LIBS="$oldLIBS"
1594                 oldCPPFLAGS="$CPPFLAGS"
1595                 CPPFLAGS="$CPPFLAGS $PERL_CFLAGS"
1596                 AC_CHECK_HEADERS(EXTERN.h)
1597                 AC_CHECK_HEADERS(perl.h, [], enable_perl=no,
1598                 [#if HAVE_EXTERN_H
1599                  # include <EXTERN.h>
1600                  #endif])
1601                 CPPFLAGS="$oldCPPFLAGS"
1602         fi
1605 if test "$enable_perl" = yes ; then
1606         AC_PROG_PERL_MODULES(ExtUtils::MakeMaker, , have_makemaker=no)
1608         if test "x$have_makemaker" = "xno"; then
1609                 enable_perl=no
1610                 PERL_CFLAGS=
1611                 PERL_LIBS=
1612                 AM_CONDITIONAL(USE_PERL, false)
1613                 AC_MSG_WARN(Compiling perl requires ExtUtils::MakeMaker)
1614         else
1615                 AC_DEFINE(HAVE_PERL, [1], [Compile with support for perl])
1616                 AC_SUBST(PERL_CFLAGS)
1617                 AC_SUBST(PERL_LIBS)
1618                 AM_CONDITIONAL(USE_PERL, true)
1620                 dnl This is almost definitely wrong, but in case there's
1621                 dnl something I'm missing, I'll leave it in.
1622                 AC_CHECK_FUNCS(Perl_eval_pv)
1624                 AC_MSG_CHECKING(for old perl)
1625                 PERL_OLD=`$perlpath -e 'if($]<5.006){printf"yes\n";}else{printf"no\n";}'`
1627                 if test "x$PERL_OLD" = "xyes"; then
1628                         AC_DEFINE(OLD_PERL, 1, [Define if old perl is installed.])
1629                         AC_MSG_RESULT(yes)
1630                 else
1631                         AC_MSG_RESULT(no)
1632                 fi
1634                 AC_MSG_CHECKING(for DynaLoader.a)
1635                 DYNALOADER_A=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*([[^ ]]*DynaLoader\.a).*/\2/'`
1637                 dnl Don't check libperl.a if dynaloader.a wasn't found.
1638                 if test -n "$DYNALOADER_A"; then
1639                         AC_MSG_RESULT(yes)
1641                         dnl Find either libperl.a or libperl.so
1642                         AC_MSG_CHECKING(for libperl.a or libperl.so)
1643                         LIBPERL_A=`echo "$PERL_LDFLAGS -L/usr/lib"|$perlpath -e 'foreach (split(/ /, <STDIN>)) { if (/^-L(.*)/) { my $dir=$1; if (\`ls $dir/libperl.so* 2>/dev/null\`) { print "-lperl"; last; }; if (-e "$dir/libperl.a") { print "$dir/libperl.a"; last } } };'`
1644                         if test -z "$LIBPERL_A"; then
1645                                 AC_MSG_RESULT(no)
1646                                 DYNALOADER_A=
1647                         else
1648                                 AC_MSG_RESULT(yes)
1650                                 if test "$LIBPERL_A" = "-lperl"; then
1651                                         LIBPERL_A=
1652                                 fi
1653                         fi
1655                         PERL_LIBS=`echo $PERL_LIBS | $perlpath -pe 's/^(.* )*[[^ ]]*DynaLoader\.a/\1libperl_dynaloader.la/'`
1657                         if test -n "$LIBPERL_A"; then
1658                                 PERL_LIBS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lperl /libperl_orig.la /' -e 's/-lperl$/libperl_orig.la$/'`
1659                         fi
1661                         AC_SUBST(DYNALOADER_A)
1662                         AC_SUBST(LIBPERL_A)
1663                 else
1664                         AC_MSG_RESULT(no)
1665                 fi
1666         fi
1667 else
1668         PERL_CFLAGS=
1669         PERL_LIBS=
1670         AM_CONDITIONAL(USE_PERL, false)
1673 if test "x$looked_for_perl" = "xyes" -a "x$enable_perl" = "xno" -a "x$force_deps" = "xyes"; then
1674         AC_MSG_ERROR([
1675 Perl development headers not found.
1676 Use --disable-perl if you do not need Perl scripting support.
1680 dnl #######################################################################
1681 dnl # SSL support
1682 dnl #
1683 dnl # Thanks go to Evolution for the checks.
1684 dnl #######################################################################
1686 AC_ARG_WITH(system-ssl-certs, [AC_HELP_STRING([--with-system-ssl-certs=<dir>], [directory containing system-wide SSL CA certificates])], [ssl_certificates_dir=$withval])
1688 SSL_CERTIFICATES_DIR=""
1689 if ! test -z "$ssl_certificates_dir" ; then
1690         if test "x$ssl_certificates_dir" = "xyes" ; then
1691                 AC_MSG_ERROR([--with-system-ssl-certs requires that a location is specified, eg. --with-system-ssl-certs=/etc/pki/tls/certs])
1692         fi
1693         if ! test -d "$ssl_certificates_dir" ; then
1694                 AC_MSG_ERROR([$ssl_certificates_dir does not exist, if this is the correct location please make sure that it exists.])
1695         fi
1696         SSL_CERTIFICATES_DIR="$ssl_certificates_dir"
1698 AC_SUBST(SSL_CERTIFICATES_DIR)
1699 AM_CONDITIONAL(INSTALL_SSL_CERTIFICATES, test "x$SSL_CERTIFICATES_DIR" = "x")
1701 dnl These two are inverses of each other <-- stolen from evolution!
1703 AC_ARG_ENABLE(gnutls,
1704         [  --enable-gnutls=[yes,no]  attempt to use GnuTLS for SSL support [default=yes]],
1705         [enable_gnutls="$enableval"],
1706         [enable_gnutls="yes"])
1708 AC_ARG_ENABLE(nss,
1709         [  --enable-nss=[yes,no,static]    attempt to use Mozilla libnss for SSL support [default=yes]],
1710         [enable_nss="$enableval"],
1711         [enable_nss="yes"])
1713 msg_ssl="None. MSN, Yahoo!, Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!"
1714 looked_for_gnutls="no"
1715 dnl #
1716 dnl # Check for GnuTLS if it's specified.
1717 dnl #
1718 if test "x$enable_gnutls" != "xno"; then
1719         enable_gnutls="no"
1720         prefix=`eval echo $prefix`
1721         looked_for_gnutls="yes"
1723         AC_ARG_WITH(gnutls-includes,
1724                 [  --with-gnutls-includes=PREFIX   location of GnuTLS includes.],
1725                 [ with_gnutls_includes="$withval" ],
1726                 [ with_gnutls_includes="$prefix/include" ])
1728         have_gnutls_includes="no"
1730         if test "x$with_gnutls_includes" != "xno"; then
1731                 CPPFLAGS_save="$CPPFLAGS"
1733                 AC_MSG_CHECKING(for GnuTLS includes)
1734                 AC_MSG_RESULT("")
1736                 CPPFLAGS="$CPPFLAGS -I$with_gnutls_includes"
1737                 AC_CHECK_HEADERS(gnutls/gnutls.h, [ gnutls_includes="yes" ])
1738                 CPPFLAGS="$CPPFLAGS_save"
1740                 if test "x$gnutls_includes" != "xno" -a \
1741                         "x$gnutls_includes" != "x"; then
1742                         have_gnutls_includes="yes"
1744                         if test "x$with_gnutls_includes" != "xNONE/include"; then
1745                                 GNUTLS_CFLAGS="-I$with_gnutls_includes"
1746                         fi
1747                 else
1748                         GNUTLS_CFLAGS=""
1749                 fi
1750         else
1751                 AC_MSG_CHECKING(for GnuTLS includes)
1752                 AC_MSG_RESULT(no)
1753         fi
1755         AC_ARG_WITH(gnutls-libs,
1756                 [AC_HELP_STRING([--with-gnutls-libs=PREFIX], [location of GnuTLS libraries.])],
1757                 [ with_gnutls_libs="$withval" ])
1759         if test "x$with_gnutls_libs"     != "xno" -a \
1760                 "x$have_gnutls_includes" != "xno"; then
1762                 LIBS_save="$LIBS"
1764                 case $with_gnutls_libs in
1765                         ""|-L*) ;;
1766                         *) with_gnutls_libs="-L$with_gnutls_libs" ;;
1767                 esac
1769                 AC_CACHE_CHECK([for GnuTLS libraries], ac_cv_gnutls_libs,
1770                 [
1771                         LIBS="$LIBS $with_gnutls_libs -lgnutls -lgcrypt"
1772                         AC_TRY_LINK_FUNC(gnutls_init, ac_cv_gnutls_libs="yes", ac_cv_gnutls_libs="no")
1773                         LIBS="$LIBS_save"
1774                 ])
1776                 if test "x$ac_cv_gnutls_libs" != "xno"; then
1777                         AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GnuTLS])
1778                         AC_DEFINE(HAVE_SSL)
1779                         msg_gnutls="GnuTLS"
1780                         GNUTLS_LIBS="$with_gnutls_libs -lgnutls -lgcrypt"
1782                         enable_gnutls="yes"
1783                 else
1784                         GNUTLS_CFLAGS=""
1785                         GNUTLS_LIBS=""
1786                 fi
1787         else
1788                 AC_MSG_CHECKING(for GnuTLS libraries)
1789                 AC_MSG_RESULT(no)
1790         fi
1791 else
1792         GNUTLS_CFLAGS=""
1793         GNUTLS_LIBS=""
1796 AC_SUBST(GNUTLS_CFLAGS)
1797 AC_SUBST(GNUTLS_LIBS)
1799 if test "x$enable_gnutls" = "xyes"; then
1800         AC_MSG_CHECKING(for gnutls_priority_set_direct and gnutls_priority_set)
1801         LIBS_save="$LIBS"
1802         LIBS="$LIBS $GNUTLS_LIBS"
1803         CPPFLAGS_save="$CPPFLAGS"
1804         CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
1805         AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
1806                                         [[gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL); gnutls_priority_set(s, NULL);]])],
1807                        [AC_DEFINE([HAVE_GNUTLS_PRIORITY_FUNCS], 1,
1808                                   [Define if your gnutls has gnutls_priority_set_direct and friends])
1809                         AC_MSG_RESULT(yes)],
1810                        [AC_MSG_RESULT(no)])
1811         CPPFLAGS="$CPPFLAGS_save"
1812         LIBS="$LIBS_save"
1815 if test "x$enable_gnutls" = "xyes"; then
1816         AC_MSG_CHECKING(for GNUTLS_CERT_INSECURE_ALGORITHM)
1817         LIBS_save="$LIBS"
1818         LIBS="$LIBS $GNUTLS_LIBS"
1819         CPPFLAGS_save="$CPPFLAGS"
1820         CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
1821         AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
1822                                         [[unsigned int verify = GNUTLS_CERT_INSECURE_ALGORITHM;]])],
1823                        [AC_DEFINE([HAVE_GNUTLS_CERT_INSECURE_ALGORITHM], 1,
1824                                   [Define if your gnutls has the GNUTLS_CERT_INSECURE_ALGORITHM flag])
1825                         AC_MSG_RESULT(yes)],
1826                        [AC_MSG_RESULT(no)])
1827         CPPFLAGS="$CPPFLAGS_save"
1828         LIBS="$LIBS_save"
1832 AM_CONDITIONAL(USE_GNUTLS, test "x$enable_gnutls" = "xyes")
1835 dnl #
1836 dnl # Check for NSS if it's specified, or if GnuTLS checks failed.
1837 dnl #
1838 looked_for_nss="no"
1839 if test "x$enable_nss" != "xno"; then
1840         looked_for_nss="yes"
1842         AC_ARG_WITH(nspr-includes,
1843                 [AC_HELP_STRING([--with-nspr-includes=PREFIX], [specify location of Mozilla nspr4 includes.])],
1844                 [with_nspr_includes="$withval"])
1846         AC_ARG_WITH(nspr-libs,
1847                 [AC_HELP_STRING([--with-nspr-libs=PREFIX], [specify location of Mozilla nspr4 libs.])],
1848                 [with_nspr_libs="$withval"])
1850         AC_ARG_WITH(nss-includes,
1851                 [AC_HELP_STRING([--with-nss-includes=PREFIX], [specify location of Mozilla nss3 includes.])],
1852                 [with_nss_includes="$withval"])
1854         AC_ARG_WITH(nss-libs,
1855                 [AC_HELP_STRING([--with-nss-libs=PREFIX], [specify location of Mozilla nss3 libs.])],
1856                 [with_nss_libs="$withval"])
1859         if test -n "$with_nspr_includes" || test -n "$with_nspr_libs" || \
1860            test -n "$with_nss_includes"  || test -n "$with_nss_libs"  ||
1861            test "x$enable_nss" = "xstatic"; then
1863                 nss_manual_check="yes"
1864         else
1865                 nss_manual_check="no"
1866         fi
1868         enable_nss="no"
1870         if test "x$nss_manual_check" = "xno"; then
1871                 if `$PKG_CONFIG --exists mozilla-nss`; then
1872                         PKG_CHECK_MODULES(NSS, mozilla-nss, [
1873                                 have_nss="yes"
1874                         ], [
1875                                 AC_MSG_RESULT(no)
1876                                 have_nss="no"
1877                         ])
1878                         mozilla_nspr="mozilla-nspr"
1879                         mozilla_nss="mozilla-nss"
1880                 elif `$PKG_CONFIG --exists nss`; then
1881                         PKG_CHECK_MODULES(NSS, nss, [
1882                                 have_nss="yes"
1883                         ], [
1884                                 AC_MSG_RESULT(no)
1885                                 have_nss="no"
1886                         ])
1887                         mozilla_nspr="nspr"
1888                         mozilla_nss="nss"
1889                 elif `$PKG_CONFIG --exists microb-engine-nss`; then
1890                         PKG_CHECK_MODULES(NSS, microb-engine-nss, [
1891                                 have_nss="yes"
1892                         ], [
1893                                 AC_MSG_RESULT(no)
1894                                 have_nss="no"
1895                         ])
1896                         mozilla_nspr="mozilla-nspr"
1897                         mozilla_nss="microb-engine-nss"
1898                 fi
1900                 if test "x$have_nss" = "xyes"; then
1902                         AC_DEFINE(HAVE_NSS, 1, [Define if you have Mozilla NSS])
1903                         AC_DEFINE(HAVE_SSL, 1, [Define if you have SSL])
1905                         msg_nss="Mozilla NSS"
1906                         enable_nss="yes"
1907                 else
1908                         nss_manual_check="yes"
1909                 fi
1910         fi
1912         if test "x$nss_manual_check" = "xyes"; then
1913                 mozilla_nss=""
1914                 have_nspr_includes="no"
1916                 if test "x$with_nspr_includes" != "xno"; then
1917                         CPPFLAGS_save=$CPPFLAGS
1919                         AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)
1920                         AC_MSG_RESULT("")
1922                         CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
1923                         AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ])
1924                         CPPFLAGS=$CPPFLAGS_save
1926                         if test "x$moz_nspr_includes" != "xno" -a \
1927                                 "x$moz_nspr_includes" != "x"; then
1929                                 have_nspr_includes="yes"
1930                                 NSPR_CFLAGS="-I$with_nspr_includes"
1931                         fi
1932                 else
1933                         AC_MSG_CHECKING(for Mozilla nspr4 includes)
1934                         AC_MSG_RESULT(no)
1936                         enable_nss="no"
1937                 fi
1939                 have_nspr_libs="no"
1941                 if test "x$with_nspr_libs"     != "xno" -a \
1942                         "x$have_nspr_includes" != "xno"; then
1944                         CFLAGS_save=$CFLAGS
1945                         LDFLAGS_save=$LDFLAGS
1947                         if test "$enable_nss" = "static"; then
1948                                 if test -z "$with_nspr_libs"; then
1949                                         AC_MSG_ERROR(
1950                                                 [Static linkage requested, but path to nspr libraries not set.]
1951                                                 [Please specify the path to libnspr4.a]
1952                                                 [Example: --with-nspr-libs=/usr/lib])
1954                                         enable_nss="no"
1955                                 else
1956                                         nsprlibs="$LIBDL $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB"
1957                                 fi
1958                         else
1959                                 nsprlibs="$LIBDL -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
1960                         fi
1962                         AC_CACHE_CHECK([for Mozilla nspr libraries], ac_cv_moz_nspr_libs,
1963                         [
1964                                 LIBS_save=$LIBS
1965                                 CFLAGS="$CFLAGS $NSPR_CFLAGS"
1967                                 LIBS="$nsprlibs"
1969                                 if test "x$with_nspr_libs" != "x"; then
1970                                         LDFLAGS="$LDFLAGS -L$with_nspr_libs"
1971                                 else
1972                                         LDFLAGS="$LDFLAGS"
1973                                 fi
1975                                 AC_TRY_LINK_FUNC(PR_Init,
1976                                         [ac_cv_moz_nspr_libs="yes"],
1977                                         [ac_cv_moz_nspr_libs="no"])
1979                                 CFLAGS=$CFLAGS_save
1980                                 LDFLAGS=$LDFLAGS_save
1981                                 LIBS=$LIBS_save
1982                         ])
1984                         if test "x$ac_cv_moz_nspr_libs" != "xno"; then
1985                                 have_nspr_libs="yes"
1986                                 NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
1987                         else
1988                                 NSPR_CFLAGS=""
1989                                 enable_nss="no"
1990                         fi
1991                 else
1992                         AC_MSG_CHECKING(for Mozilla nspr4 libraries)
1993                         AC_MSG_RESULT(no)
1994                 fi
1996                 have_nss_includes="no"
1998                 if test "x$with_nss_includes" != "xno" -a \
1999                                 "x$have_nspr_libs"    != "xno"; then
2001                         CPPFLAGS_save=$CPPFLAGS
2003                         AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)
2004                         AC_MSG_RESULT("")
2006                         if test "x$with_nspr_includes" != "x"; then
2007                                 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
2008                         else
2009                                 CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
2010                         fi
2012                         AC_CHECK_HEADERS(nss.h ssl.h smime.h,
2013                                 [moz_nss_includes="yes"],
2014                                 [moz_nss_includes="no"])
2016                         CPPFLAGS=$CPPFLAGS_save
2018                         if test "x$moz_nss_includes" = "xyes"; then
2019                                 have_nss_includes="yes"
2020                                 NSS_CFLAGS="-I$with_nss_includes"
2021                         else
2022                                 NSPR_CFLAGS=""
2023                                 NSPR_LIBS=""
2024                                 enable_nss="no"
2025                         fi
2026                 else
2027                         AC_MSG_CHECKING(for Mozilla nss3 includes)
2028                         AC_MSG_RESULT(no)
2029                         enable_nss="no"
2030                 fi
2032                 if test "x$with_nss_libs"     != "xno" -a \
2033                                 "x$have_nss_includes" != "xno"; then
2035                         LDFLAGS_save=$LDFLAGS
2037                         if test "$enable_nss" = "static"; then
2038                                 if test -z "$with_nss_libs"; then
2039                                         AC_MSG_ERROR(
2040                                                 [Static linkage requested, but path to nss libraries not set.]
2041                                                 [Please specify the path to libnss3.a]
2042                                                 [Example: --with-nspr-libs=/usr/lib/mozilla])
2043                                         enable_nss="no"
2044                                 else
2045                                         nsslibs="-ldb1 $with_nss_libs/libnssckfw.a $with_nss_libs/libasn1.a $with_nss_libs/libcrmf.a $with_nss_libs/libswfci.a $with_nss_libs/libjar.a $with_nss_libs/libpkcs12.a $with_nss_libs/libpkcs7.a $with_nss_libs/libpki1.a $with_nss_libs/libsmime.a $with_nss_libs/libssl.a $with_nss_libs/libnss.a $with_nss_libs/libpk11wrap.a $with_nss_libs/libsoftokn.a $with_nss_libs/libfreebl.a $with_nss_libs/libnsspki.a $with_nss_libs/libnssdev.a $with_nss_libs/libcryptohi.a $with_nss_libs/libcerthi.a $with_nss_libs/libcertdb.a $with_nss_libs/libsecutil.a $with_nss_libs/libnssb.a"
2047                                         case "$host" in
2048                                                 *solaris*)
2049                                                         nsslibs="$nsslibs $with_nss_libs/libfreeb1.a"
2050                                                         ;;
2051                                         esac
2052                                 fi
2053                         else
2054                                 nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
2055                         fi
2057                         AC_CACHE_CHECK([for Mozilla nss libraries], ac_cv_moz_nss_libs,
2058                         [
2059                                 LIBS_save=$LIBS
2060                                 LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
2061                                 LIBS="$nsslibs $nsprlibs"
2063                                 AC_TRY_LINK_FUNC(NSS_Init,
2064                                         [ac_cv_moz_nss_libs="yes"],
2065                                         [ac_cv_moz_nss_libs="no"])
2067                                 if test "x$ac_cv_moz_nss_libs" = "xno"; then
2068                                         nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
2069                                         LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
2070                                         LIBS="$LIBS $nsslibs"
2071                                         AC_TRY_LINK_FUNC(NSS_Init,
2072                                                 [ac_cv_moz_nss_libs="yes"],
2073                                                 [ac_cv_moz_nss_libs="no"])
2074                                 fi
2076                                 LDFLAGS=$LDFLAGS_save
2077                                 LIBS=$LIBS_save
2078                         ])
2080                         if test "x$ac_cv_moz_nss_libs" != "xno"; then
2081                                 AC_DEFINE(HAVE_NSS)
2082                                 AC_DEFINE(HAVE_SSL)
2084                                 NSS_LIBS="-L$with_nss_libs $nsslibs"
2086                                 if test "$enable_nss" = "static"; then
2087                                         msg_nss="Mozilla NSS (static)"
2088                                 else
2089                                         msg_nss="Mozilla NSS"
2090                                 fi
2092                                 enable_nss="yes"
2093                         else
2094                                 NSS_CFLAGS=""
2095                                 NSPR_CFLAGS=""
2096                                 NSPR_LIBS=""
2097                                 enable_nss="no"
2098                         fi
2099                 else
2100                         AC_MSG_CHECKING(for Mozilla nss libraries)
2101                         AC_MSG_RESULT(no)
2102                 fi
2104                 NSS_CFLAGS="$NSPR_CFLAGS $NSS_CFLAGS"
2105                 NSS_LIBS="$NSPR_LIBS $NSS_LIBS"
2106         fi
2108         AC_SUBST(NSS_CFLAGS)
2109         AC_SUBST(NSS_LIBS)
2112 AM_CONDITIONAL(USE_NSS, test "x$enable_nss" = "xyes")
2114 if test "x$msg_nss" != "x" -a "x$msg_gnutls" != "x"; then
2115         msg_ssl="$msg_nss and $msg_gnutls"
2116 elif test "x$msg_nss" != "x"; then
2117         msg_ssl=$msg_nss
2118 elif test "x$msg_gnutls" != "x"; then
2119         msg_ssl=$msg_gnutls
2120 elif test "x$looked_for_gnutls" = "xyes" -a "x$looked_for_nss" = "xyes" -a "x$force_deps" = "xyes" ; then
2121         AC_MSG_ERROR([
2122 Neither GnuTLS or NSS SSL development headers found.
2123 Use --disable-nss --disable-gnutls if you do not need SSL support.
2124 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!
2126 elif test "x$looked_for_gnutls" = "xyes" -a "x$force_deps" = "xyes" ; then
2127         AC_MSG_ERROR([
2128 GnuTLS SSL development headers not found.
2129 Use --disable-gnutls if you do not need SSL support.
2130 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without SSL support.
2132 elif test "x$looked_for_nss" = "xyes" -a "x$force_deps" = "xyes" ; then
2133         AC_MSG_ERROR([
2134 NSS SSL development headers not found.
2135 Use --disable-nss if you do not need SSL support.
2136 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without SSL support.
2140 dnl #######################################################################
2141 dnl # Check for Tcl
2142 dnl #######################################################################
2143 AC_ARG_ENABLE(tcl, [AC_HELP_STRING([--disable-tcl],
2144         [compile without Tcl scripting])], enable_tcl="$enableval", enable_tcl="yes")
2145 AC_ARG_WITH(tclconfig, [AC_HELP_STRING([--with-tclconfig=DIR],
2146         [directory containing tclConfig.sh])])
2148 if test "$enable_plugins" = no; then
2149         enable_tcl=no
2152 if test "$enable_tcl" = yes; then
2153         AC_MSG_CHECKING([for tclConfig.sh])
2154         TCLCONFIG=no
2155         TCLCONFIGDIRS="/usr/lib \
2156                         /usr/lib64 \
2157                         /usr/lib/tcl8.5 \
2158                         /usr/lib/tcl8.4 \
2159                         /usr/lib/tcl8.3 \
2160                         /usr/lib/tcl8.2 \
2161                         /usr/lib64/tcl8.5 \
2162                         /usr/lib64/tcl8.4 \
2163                         /System/Library/Tcl/8.3 \
2164                         /usr/local/lib"
2165         for dir in $with_tclconfig $TCLCONFIGDIRS; do
2166                 if test -f $dir/tclConfig.sh; then
2167                         TCLCONFIG=$dir/tclConfig.sh
2168                         AC_MSG_RESULT([yes ($TCLCONFIG)])
2169                         break
2170                 fi
2171         done
2172         if test "$TCLCONFIG" = "no"; then
2173                 AC_MSG_RESULT([no])
2174                 enable_tcl=no
2175                 if test "x$force_deps" = "xyes" ; then
2176                         AC_MSG_ERROR([
2177 Tcl development headers not found.
2178 Use --disable-tcl if you do not need Tcl scripting support.
2180                 fi
2181         else
2182                 . $TCLCONFIG
2183                 AC_MSG_CHECKING([Tcl version compatability])
2184                 if test "$TCL_MAJOR_VERSION" -ne 8 -o "$TCL_MINOR_VERSION" -lt 3; then
2185                         AC_MSG_RESULT([bad, $TCL_VERSION found but 8.3 or later required])
2186                         enable_tcl=no
2187                 else
2188                         AC_MSG_RESULT([ok, $TCL_VERSION])
2189                         eval "TCL_LIB_SPEC=\"$TCL_LIB_SPEC\""
2190                         AC_MSG_CHECKING([for Tcl linkability])
2191                         oldCPPFLAGS=$CPPFLAGS
2192                         CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
2193                         oldLIBS=$LIBS
2194                         LIBS="$LIBS $TCL_LIB_SPEC"
2195                         AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <tcl.h>]],
2196                                 [[Tcl_Interp *interp=NULL; Tcl_Init(interp)]])],
2197                                 [AC_MSG_RESULT([yes]);enable_tcl=yes],
2198                                 [AC_MSG_RESULT([no]);enable_tcl=no])
2199                         CPPFLAGS="$oldCPPFLAGS"
2200                         LIBS="$oldLIBS"
2201                 fi
2202         fi
2205 if test "$enable_tcl" = yes; then
2206         AM_CONDITIONAL(USE_TCL, true)
2207         TCL_LIBS=$TCL_LIB_SPEC
2208         AC_DEFINE(HAVE_TCL, [1], [Compile with support for the Tcl toolkit])
2209         AC_SUBST(TCL_LIBS)
2210         TCL_CFLAGS="$TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
2211         if test "x$GCC" = "xyes"; then
2212                 TCL_CFLAGS="$TCL_CFLAGS -fno-strict-aliasing"
2213         fi
2214         AC_SUBST(TCL_CFLAGS)
2215 else
2216         AM_CONDITIONAL(USE_TCL, false)
2219 dnl #######################################################################
2220 dnl # Check for Tk
2221 dnl #######################################################################
2222 AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk],
2223         [compile without Tcl support for Tk])], enable_tk="$enableval", enable_tk="yes")
2224 AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR],
2225         [directory containing tkConfig.sh])])
2227 if test "$enable_tcl" = yes -a "$enable_tk" = yes; then
2228         AC_MSG_CHECKING([for tkConfig.sh])
2229         TKCONFIG=no
2230         TKCONFIGDIRS="/usr/lib \
2231                         /usr/lib64 \
2232                         /usr/lib/tk8.4 \
2233                         /usr/lib/tk8.3 \
2234                         /usr/lib/tk8.2 \
2235                         /usr/local/lib"
2236         for dir in $with_tkconfig $TKCONFIGDIRS; do
2237                 if test -f $dir/tkConfig.sh; then
2238                         TKCONFIG=$dir/tkConfig.sh
2239                         AC_MSG_RESULT([yes ($TKCONFIG)])
2240                         break
2241                 fi
2242         done
2243         if test "$TKCONFIG" = "no"; then
2244                 AC_MSG_RESULT([no])
2245                 enable_tk=no
2246                 if test "x$force_deps" = "xyes" ; then
2247                         AC_MSG_ERROR([
2248 Tk development headers not found.
2249 Use --disable-tk if you do not need Tk scripting support.
2251                 fi
2252         else
2253                 . $TKCONFIG
2254                 eval "TK_LIB_SPEC=\"$TK_LIB_SPEC\""
2255                 AC_MSG_CHECKING([for Tk linkability])
2256                 oldCPPFLAGS=$CPPFLAGS
2257                 CPPFLAGS="$CPPFLAGS $TCL_CFLAGS"
2258                 oldLIBS=$LIBS
2259                 LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC"
2260                 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <tk.h>]],
2261                                 [[Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);]])],
2262                                 [AC_MSG_RESULT([yes]);enable_tk=yes],
2263                                 [AC_MSG_RESULT([no]);enable_tk=no])
2264                 CPPFLAGS="$oldCPPFLAGS"
2265                 LIBS="$oldLIBS"
2266         fi
2267 else
2268         enable_tk=no
2271 if test "$enable_tk" = yes; then
2272         AM_CONDITIONAL(USE_TK, true)
2273         AC_DEFINE(HAVE_TK, [1], [Compile with support for the Tk toolkit])
2274         TK_LIBS=$TK_LIB_SPEC
2275         AC_SUBST(TK_LIBS)
2276 else
2277         AM_CONDITIONAL(USE_TK, false)
2280 if test "$ac_cv_cygwin" = yes ; then
2281         LDADD="$LDADD -static"
2282         AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2285 AC_SUBST(DEBUG_CFLAGS)
2286 AC_SUBST(LDADD)
2287 AC_SUBST(LIBS)
2289 if test "x$enable_plugins" = "xyes" ; then
2290         AC_DEFINE(PURPLE_PLUGINS, 1, [Define if plugins are enabled.])
2291         AM_CONDITIONAL(PLUGINS, true)
2292         PLUGINS_DEFINE="#define PURPLE_PLUGINS 1"
2293 else
2294         AM_CONDITIONAL(PLUGINS, false)
2295         PLUGINS_DEFINE="#undef PURPLE_PLUGINS"
2297 AC_SUBST(PLUGINS_DEFINE)
2299 dnl #######################################################################
2300 dnl # Check for Cyrus-SASL (for Jabber)
2301 dnl #######################################################################
2302 dnl AC_CHECK_SIZEOF(short)
2303 AC_CHECK_FUNCS(snprintf connect)
2304 AC_SUBST(SASL_LIBS)
2305 AC_ARG_ENABLE(cyrus-sasl, AC_HELP_STRING([--enable-cyrus-sasl], [enable Cyrus SASL support for jabberd]), enable_cyrus_sasl=$enableval, enable_cyrus_sasl=no)
2306 if test "x$enable_cyrus_sasl" = "xyes" ; then
2307         AC_CHECK_LIB(sasl2, sasl_client_init, [
2308                         AM_CONDITIONAL(USE_CYRUS_SASL, true)
2309                         AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present])
2310                         SASL_LIBS=-"lsasl2"
2311                 ], [
2312                         AM_CONDITIONAL(USE_CYRUS_SASL, false)
2313                         AC_MSG_ERROR([Cyrus SASL library not found])
2314                 ])
2315 else
2316         AM_CONDITIONAL(USE_CYRUS_SASL, false)
2319 dnl #######################################################################
2320 dnl # Check for Kerberos (for Zephyr)
2321 dnl #######################################################################
2322 AC_DEFINE(ZEPHYR_INT32, long, [Size of an int32.])
2323 AC_SUBST(KRB4_CFLAGS)
2324 AC_SUBST(KRB4_LDFLAGS)
2325 AC_SUBST(KRB4_LIBS)
2326 if test "$kerberos" != "no" ; then
2327         if test "$kerberos" != "yes" ; then
2328                 KRB4_CFLAGS="-I${kerberos}/include"
2329                 if test -d "$kerberos/include/kerberosIV" ; then
2330                         KRB4_CFLAGS="$KRB4_CFLAGS -I${kerberos}/include/kerberosIV"
2331                 fi
2332                 KRB4_LDFLAGS="-L${kerberos}/lib"
2333         elif test -d /usr/local/include/kerberosIV ; then
2334                 KRB4_CFLAGS="-I/usr/local/include/kerberosIV"
2335         elif test -d /usr/include/kerberosIV ; then
2336                 KRB4_CFLAGS="-I/usr/include/kerberosIV"
2337         fi
2338         AC_DEFINE(ZEPHYR_USES_KERBEROS, 1, [Define if kerberos should be used in Zephyr.])
2340         orig_LDFLAGS="$LDFLAGS"
2341         LDFLAGS="$LDFLAGS $KRB4_LDFLAGS"
2342         AC_CHECK_LIB(krb4, krb_rd_req,
2343                         [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
2344                         [AC_CHECK_LIB(krb, krb_rd_req,
2345                                 [KRB4_LIBS="-lkrb -ldes"],
2346                                 [AC_MSG_ERROR([Kerberos 4 libraries not found])],
2347                                 -ldes)],
2348                         -ldes425 -lkrb5 -lk5crypto -lcom_err)
2349         orig_LIBS="$LIBS"
2350         LIBS="$LIBS $KRB4_LIBS"
2351         AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm)
2352         AC_CHECK_FUNCS(krb_get_err_text krb_log)
2353         LIBS="$orig_LIBS"
2354         LDFLAGS="$orig_LDFLAGS"
2357 dnl #######################################################################
2358 dnl # Check for external libzephyr
2359 dnl #######################################################################
2360 AC_SUBST(ZEPHYR_CFLAGS)
2361 AC_SUBST(ZEPHYR_LDFLAGS)
2362 AC_SUBST(ZEPHYR_LIBS)
2363 if test "$zephyr" != "no" ; then
2364         if test "$zephyr" != "yes" ; then
2365                 ZEPHYR_CFLAGS="-I${zephyr}/include"
2366                 ZEPHYR_LDFLAGS="-L${zephyr}/lib"
2367         elif test -d /usr/athena/include/zephyr ; then
2368                 ZEPHYR_CFLAGS="-I/usr/athena/include"
2369         elif test -d /usr/include/zephyr ; then
2370                 ZEPHYR_CFLAGS="-I/usr/include"
2371         elif test -d /usr/local/include/zephyr ; then
2372                 ZEPHYR_CFLAGS="-I/usr/local/include"
2373         fi
2374         AC_DEFINE(LIBZEPHYR_EXT, 1 , [Define if external libzephyr should be used.])
2375         AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
2376         orig_LDFLAGS="$LDFLAGS"
2377         LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS"
2378         AC_CHECK_LIB(zephyr, ZInitialize,
2379                 [ZEPHYR_LIBS="-lzephyr"],
2380                 [AC_MSG_ERROR([Zephyr libraries not found])],
2381                 -lzephyr)
2382         orig_LIBS="$LIBS"
2383         LIBS="$orig_LIBS"
2384         LDFLAGS="$orig_LDFLAGS"
2387 AC_MSG_CHECKING(for me pot o' gold)
2388 AC_MSG_RESULT(no)
2389 AC_CHECK_FUNCS(gethostid lrand48)
2390 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
2391 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
2392 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
2393 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
2394 AC_CHECK_HEADERS(termios.h)
2396 # sys/sysctl.h on OpenBSD 4.2 requires sys/param.h
2397 # sys/sysctl.h on FreeBSD requires sys/types.h
2398 AC_CHECK_HEADERS(sys/param.h)
2399 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
2400         [[
2401                 #include <sys/types.h>
2402                 #ifdef HAVE_PARAM_H
2403                 # include <sys/param.h>
2404                 #endif
2405         ]])
2407 AC_CHECK_HEADERS(sys/socket.h)
2408 AC_VAR_TIMEZONE_EXTERNALS
2410 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
2411         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2412                 #include <time.h>
2413         ]], [[
2414                 struct tm tm;
2415                 tm.tm_gmtoff = 1;
2416         ]])], [ac_cv_struct_tm_gmtoff=yes], [ac_cv_struct_tm_gmtoff=no]))
2417 if test $ac_cv_struct_tm_gmtoff = yes; then
2418         AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
2421 AC_CACHE_CHECK([whether va_lists can be copied by value], ac_cv_va_val_copy,[
2422         AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdarg.h>
2423 #include <stdlib.h>
2424         void f (int i, ...) {
2425         va_list args1, args2;
2426         va_start (args1, i);
2427         args2 = args1;
2428         if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
2429           exit (1);
2430         va_end (args1); va_end (args2);
2431         }
2432         int main() {
2433           f (0, 42);
2434           return 0;
2435         }]])],
2436         [ac_cv_va_val_copy=yes],
2437         [ac_cv_va_val_copy=no],
2438         [ac_cv_va_val_copy=yes])
2441 if test "x$ac_cv_va_val_copy" = "xno"; then
2442         AC_DEFINE(VA_COPY_AS_ARRAY, 1, ['va_lists' cannot be copied as values])
2445 dnl #######################################################################
2446 dnl # Check for check
2447 dnl #######################################################################
2448 PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], , [AC_MSG_RESULT([no, testing is disabled])])
2449 AM_CONDITIONAL(HAVE_CHECK, [test "x$CHECK_LIBS" != "x"])
2450 AC_SUBST(CHECK_CFLAGS)
2451 AC_SUBST(CHECK_LIBS)
2453 dnl #######################################################################
2454 dnl # Disable pixmap installation
2455 dnl #######################################################################
2456 AC_ARG_ENABLE(pixmaps-install, AC_HELP_STRING([--disable-pixmaps-install], [disable installation of pixmap files - Pidgin still needs them!]), enable_pixmaps="$enableval", enable_pixmaps=yes)
2458 AM_CONDITIONAL(INSTALL_PIXMAPS, test "x$enable_pixmaps" = "xyes")
2460 AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes")
2462 dnl #######################################################################
2463 dnl # Check for Doxygen and dot (part of GraphViz)
2464 dnl #######################################################################
2465 AC_ARG_ENABLE(doxygen,
2466         [AC_HELP_STRING([--disable-doxygen],
2467                 [disable documentation with doxygen])],
2468         enable_doxygen="$enableval", enable_doxygen="yes")
2469 AC_ARG_ENABLE(dot,
2470         [AC_HELP_STRING([--disable-dot],
2471                 [disable graphs in doxygen via 'dot'])],
2472         enable_dot="$enableval", enable_dot="yes")
2473 AC_ARG_ENABLE(devhelp,
2474         [AC_HELP_STRING([--disable-devhelp],
2475                 [disable building index for devhelp documentation browser])],
2476         enable_devhelp="$enableval", enable_devhelp="yes")
2478 if test "x$enable_doxygen" = xyes; then
2479         AC_CHECK_PROG(DOXYGEN, doxygen, true, false)
2480         if test $DOXYGEN = false; then
2481                 AC_MSG_WARN([*** Doxygen not found, docs will not be available])
2482                 enable_doxygen="no"
2483         else
2484                 AC_DEFINE_UNQUOTED(HAVE_DOXYGEN, 1, [whether or not we have doxygen])
2486                 if test "x$enable_dot" = "xyes"; then
2487                         AC_CHECK_PROG(DOT, dot, true, false)
2489                         if test $DOT = false; then
2490                                 enable_dot="no";
2491                                 AC_MSG_WARN([*** GraphViz dot not found, docs will not have graphs])
2492                         else
2493                                 AC_DEFINE_UNQUOTED(HAVE_DOT, 1, [whether or not we have dot])
2494                         fi
2495                 fi
2497                 if test "x$enable_devhelp" = "xyes"; then
2498                         AC_CHECK_PROG(XSLTPROC, xsltproc, true, false)
2500                         if test $XSLTPROC = false; then
2501                                 enable_devhelp="no";
2502                                 AC_MSG_WARN([*** xsltproc not found; devhelp index will not be created])
2503                         else
2504                                 AC_DEFINE_UNQUOTED(HAVE_XSLTPROC, 1, [whether or not we have xsltproc for devhelp index])
2505                         fi
2506                 fi
2507         fi
2508 else
2509         enable_dot="no"
2510         enable_devhelp="no"
2513 AC_SUBST(enable_doxygen)
2514 AC_SUBST(enable_dot)
2515 AC_SUBST(enable_devhelp)
2516 AM_CONDITIONAL(HAVE_DOXYGEN, test "x$enable_doxygen" = "xyes")
2517 AM_CONDITIONAL(HAVE_XSLTPROC, test "x$enable_devhelp" = "xyes")
2519 AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],
2520         [compile with debugging support])], , enable_debug=no)
2522 if test "x$enable_debug" = "xyes" ; then
2523         AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2526 AM_CONDITIONAL(PURPLE_AVAILABLE, true)
2528 AC_CONFIG_FILES([Makefile
2529                    Doxyfile
2530                    doc/Makefile
2531                    doc/pidgin.1
2532                    doc/finch.1
2533                    m4macros/Makefile
2534                    pidgin.apspec
2535                    pidgin/Makefile
2536                    pidgin/pidgin.pc
2537                    pidgin/pidgin-uninstalled.pc
2538                    pidgin/pidgin-2.pc
2539                    pidgin/pidgin-2-uninstalled.pc
2540                    pidgin/pixmaps/Makefile
2541                    pidgin/pixmaps/emotes/default/24/Makefile
2542                    pidgin/pixmaps/emotes/none/Makefile
2543                    pidgin/pixmaps/emotes/small/16/Makefile
2544                    pidgin/plugins/Makefile
2545                    pidgin/plugins/cap/Makefile
2546                    pidgin/plugins/disco/Makefile
2547                    pidgin/plugins/gestures/Makefile
2548                    pidgin/plugins/gevolution/Makefile
2549                    pidgin/plugins/musicmessaging/Makefile
2550                    pidgin/plugins/perl/Makefile
2551                    pidgin/plugins/perl/common/Makefile.PL
2552                    pidgin/plugins/ticker/Makefile
2553                    libpurple/example/Makefile
2554                    libpurple/gconf/Makefile
2555                    libpurple/purple.pc
2556                    libpurple/purple-uninstalled.pc
2557                    libpurple/purple-2.pc
2558                    libpurple/purple-2-uninstalled.pc
2559                    libpurple/plugins/Makefile
2560                    libpurple/plugins/mono/Makefile
2561                    libpurple/plugins/mono/api/Makefile
2562                    libpurple/plugins/mono/loader/Makefile
2563                    libpurple/plugins/perl/Makefile
2564                    libpurple/plugins/perl/common/Makefile.PL
2565                    libpurple/plugins/ssl/Makefile
2566                    libpurple/plugins/tcl/Makefile
2567                    libpurple/Makefile
2568                    libpurple/protocols/Makefile
2569                    libpurple/protocols/bonjour/Makefile
2570                    libpurple/protocols/gg/Makefile
2571                    libpurple/protocols/irc/Makefile
2572                    libpurple/protocols/jabber/Makefile
2573                    libpurple/protocols/msn/Makefile
2574                    libpurple/protocols/myspace/Makefile
2575                    libpurple/protocols/mxit/Makefile
2576                    libpurple/protocols/novell/Makefile
2577                    libpurple/protocols/null/Makefile
2578                    libpurple/protocols/oscar/Makefile
2579                    libpurple/protocols/qq/Makefile
2580                    libpurple/protocols/sametime/Makefile
2581                    libpurple/protocols/silc/Makefile
2582                    libpurple/protocols/silc10/Makefile
2583                    libpurple/protocols/simple/Makefile
2584                    libpurple/protocols/yahoo/Makefile
2585                    libpurple/protocols/zephyr/Makefile
2586                    libpurple/tests/Makefile
2587                    libpurple/purple.h
2588                    libpurple/version.h
2589                    share/sounds/Makefile
2590                    share/ca-certs/Makefile
2591                    finch/finch.pc
2592                    finch/Makefile
2593                    finch/libgnt/Makefile
2594                    finch/libgnt/gnt.pc
2595                    finch/libgnt/wms/Makefile
2596                    finch/plugins/Makefile
2597                    po/Makefile.in
2598                    pidgin.spec
2599                   ])
2600 AC_OUTPUT
2602 echo
2603 echo $PACKAGE $VERSION
2605 echo
2606 echo Build GTK+ 2.x UI............. : $enable_gtkui
2607 echo Build console UI.............. : $enable_consoleui
2608 echo Build for X11................. : $with_x
2609 echo
2610 echo Enable Gestures............... : $enable_gestures
2611 echo Protocols to build dynamically : $DYNAMIC_PRPLS
2612 echo Protocols to link statically.. : $STATIC_PRPLS
2613 echo
2614 echo Build with GStreamer support.. : $enable_gst
2615 echo Build with D-Bus support...... : $enable_dbus
2616 echo Build with voice and video.... : $enable_vv
2617 if test "x$enable_dbus" = "xyes" ; then
2618         eval eval echo D-Bus services directory...... : $DBUS_SERVICES_DIR
2620 echo Build with GNU Libidn......... : $enable_idn
2621 echo Build with NetworkManager..... : $enable_nm
2622 echo SSL Library/Libraries......... : $msg_ssl
2623 if test "x$SSL_CERTIFICATES_DIR" != "x" ; then
2624         eval eval echo SSL CA certificates directory. : $SSL_CERTIFICATES_DIR
2626 echo Build with Cyrus SASL support. : $enable_cyrus_sasl
2627 echo Use kerberos 4 with zephyr.... : $kerberos
2628 echo Use external libzephyr........ : $zephyr
2629 echo Use external libgadu.......... : $gadu_libs
2630 echo Install pixmaps............... : $enable_pixmaps
2631 echo Install translations.......... : $enable_i18n
2632 echo Has you....................... : yes
2633 echo
2634 echo Use XScreenSaver Extension.... : $enable_screensaver
2635 echo Use X Session Management...... : $enable_sm
2636 echo Use startup notification...... : $enable_startup_notification
2637 echo Build with GtkSpell support... : $enable_gtkspell
2638 echo
2639 echo Build with plugin support..... : $enable_plugins
2640 echo Build with Mono support....... : $enable_mono
2641 echo Build with Perl support....... : $enable_perl
2642 echo Build with Tcl support........ : $enable_tcl
2643 echo Build with Tk support......... : $enable_tk
2644 echo
2645 echo Print debugging messages...... : $enable_debug
2646 echo
2647 eval eval echo Pidgin will be installed in $bindir.
2648 if test "x$pidginpath" != "x" ; then
2649         echo Warning: You have an old copy of Pidgin at $pidginpath.
2651 if test "x$enable_pixmaps" = "xno" ; then
2652         echo
2653         echo Warning: You have disabled the installation of pixmap data, but Pidgin
2654         echo still requires installed pixmaps.  Be sure you know what you are doing.
2656 if test "x$enable_i18n" = "xno" ; then
2657         echo
2658         echo Warning: You have disabled the building and intallation of translation
2659         echo data.  This will prevent building pidgin.desktop and the GConf schemas.
2660         echo Be sure you know what you are doing.
2662 echo
2663 echo configure complete, now type \'make\'
2664 echo