propagate from branch 'im.pidgin.pidgin' (head 732d7332dd1537d25b59073beeec74d96da39f13)
[pidgin-git.git] / configure.ac
bloba4a01f0b89379d035501f820145f8c948fe65e13
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], [devel])
51 m4_define([purple_version],
52           [purple_major_version.purple_minor_version.purple_micro_version])
53 m4_define([purple_display_version], purple_version[]m4_ifdef([purple_version_suffix],[purple_version_suffix]))
55 m4_define([gnt_lt_current], [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], [devel])
60 m4_define([gnt_version],
61           [gnt_major_version.gnt_minor_version.gnt_micro_version])
62 m4_define([gnt_display_version], gnt_version[]m4_ifdef([gnt_version_suffix],[gnt_version_suffix]))
65 AC_INIT([pidgin], [purple_display_version], [devel@pidgin.im])
67 if test `pwd | wc -w` -ne 1; then
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_SYSTEM
76 AM_CONFIG_HEADER(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 AC_PROG_INTLTOOL
116 PKG_PROG_PKG_CONFIG
117 AC_FUNC_ALLOCA
118 GETTEXT_PACKAGE=pidgin
119 AC_SUBST(GETTEXT_PACKAGE)
122 # before gettexting, in case iconv matters
123 case "$host_os" in
124 darwin*)
125         AC_CHECK_LIB(resolv, res_query)
127         AC_CHECK_HEADER(CoreFoundation/CoreFoundation.h, [
128                 AC_CHECK_HEADER(IOKit/IOKitLib.h, [
129                         AC_DEFINE(HAVE_IOKIT, 1, [Define if we have IOKit])
130                         LIBS="$LIBS -framework IOKit -framework CoreFoundation"
131                 ], [])
132         ], [])
134         AC_MSG_CHECKING([for fink])
135         if test -d /sw; then
136                 AC_MSG_RESULT([found, adding /sw to search paths])
137                 CPPFLAGS="$CPPFLAGS -I/sw/include"
138                 LDFLAGS="$LDFLAGS -L/sw/lib"
139         else
140                 AC_MSG_RESULT([not found])
141         fi
142         ;;
144         ;;
145 esac
147 ALL_LINGUAS="af am ar az be@latin bg bn 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 my_MM nb ne nl nn oc 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"
148 AM_GLIB_GNU_GETTEXT
150 dnl If we don't have msgfmt, then po/ is going to fail -- ensure that
151 dnl AM_GLIB_GNU_GETTEXT found it.
153 if test x$MSGFMT = xno -o x$MSGFMT$GMSGFMT$INTLTOOL_MSGFMT = x
154 then
155         AC_ERROR([
157 The msgfmt command is required to build libpurple.  If it is installed
158 on your system, ensure that it is in your path.  If it is not, install
159 GNU gettext to continue.
161 If you have msgfmt installed, but for some reason this error message
162 is still displayed, you have encountered what appears to be a bug in
163 third-party configure macros.  Try setting the MSGFMT environment
164 variable to the absolute path to your msgfmt binary and trying
165 configure again, like this:
167 MSGFMT=/path/to/msgfmt ./configure ...
171 dnl we don't use autobreak on cygwin!!
172 dnl AC_CYGWIN
174 dnl Checks for header files.
175 AC_HEADER_STDC
176 AC_HEADER_SYS_WAIT
177 AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h)
179 dnl Checks for typedefs, structures, and compiler characteristics.
180 AC_C_CONST
181 AC_STRUCT_TM
182 AC_CHECK_SIZEOF(time_t, ,[
183 #include <stdio.h>
184 #include <time.h>])
186 AC_C_BIGENDIAN
188 dnl Checks for library functions.
189 AC_TYPE_SIGNAL
190 AC_FUNC_STRFTIME
191 AC_CHECK_FUNCS(strdup strstr atexit setlocale)
192 dnl Checks for getopt in standard library
193 AC_CHECK_FUNCS(getopt_long,,
195         AC_LIBOBJ(getopt)
196         AC_LIBOBJ(getopt1)
199 dnl Check for inet_aton
200 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
201                                          [AC_ERROR(inet_aton not found)])])
202 AC_CHECK_LIB(resolv, __res_query)
203 AC_CHECK_LIB(nsl, gethostent)
204 AC_CHECK_FUNC(socket, ,
205         [AC_CHECK_LIB(socket, socket, , [AC_ERROR([socket not found])])])
206 dnl If all goes well, by this point the previous two checks will have
207 dnl pulled in -lsocket and -lnsl if we need them.
208 AC_CHECK_FUNC(getaddrinfo,
209         [AC_DEFINE([HAVE_GETADDRINFO], [1],
210                 [Define to 1 if you have the getaddrinfo function.])],
211         [AC_CHECK_LIB(socket, getaddrinfo,
212                 [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)])
213 AC_CHECK_FUNCS(inet_ntop)
214 dnl Check for socklen_t (in Unix98)
215 AC_MSG_CHECKING(for socklen_t)
216 AC_TRY_COMPILE([
217         #include <sys/types.h>
218         #include <sys/socket.h>
219         socklen_t x;
220 ], [],
222         AC_MSG_RESULT(yes)
223 ], [
224         AC_TRY_COMPILE([
225                 #include <sys/types.h>
226                 #include <sys/socket.h>
227                 int accept(int, struct sockaddr *, size_t *);
228         ], [], [
229                 AC_MSG_RESULT(size_t)
230                 AC_DEFINE(socklen_t, size_t, [socklen_t size])
231         ], [
232                 AC_MSG_RESULT(int)
233                 AC_DEFINE(socklen_t, int, [socklen_t size])
234         ])
237 dnl Some systems do not have sa_len field for struct sockaddr.
238 AC_CHECK_MEMBER([struct sockaddr.sa_len],
239         [AC_DEFINE([HAVE_STRUCT_SOCKADDR_SA_LEN],[1],
240         [Define if struct sockaddr has an sa_len member])],[:],
241         [#include <sys/socket.h>])
243 dnl to prevent the g_stat()/g_unlink() crash,
244 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
245 AC_SYS_LARGEFILE
247 dnl FreeBSD doesn't have libdl, dlopen is provided by libc
248 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
250 AC_MSG_CHECKING(for fileno())
251 AC_TRY_RUN([
252 #include <stdio.h>
254 int main(int argc, char *argv[])
256         int fd;
258         fd = fileno(stdout);
260         return !(fd > 0);
262 ], [
263         AC_MSG_RESULT(yes)
264         AC_DEFINE([HAVE_FILENO], [1],
265                   [Define to 1 if your stdio has int fileno(FILE *).])
266 ], [
267         AC_MSG_RESULT(no)
268 ], [
269         # Fallback for Cross Compiling...
270         # This will enable the compatibility code.
271         AC_MSG_RESULT(no)
274 AC_MSG_CHECKING(for the %z format string in strftime())
275 AC_TRY_RUN([
276 #ifdef HAVE_SYS_TIME_H
277 #include <sys/time.h>
278 #endif
279 #include <time.h>
280 #include <stdio.h>
282 int main()
284         char buf[6];
285         time_t t = time(NULL);
287         if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5)
288                 return 1;
290         fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf);
292         return !((buf[0] == '-' || buf[0] == '+') &&
293                  (buf[1] >= '0' && buf[1] <= '9') &&
294                  (buf[2] >= '0' && buf[2] <= '9') &&
295                  (buf[3] >= '0' && buf[3] <= '9') &&
296                  (buf[4] >= '0' && buf[4] <= '9')
297                 );
299 ], [
300         AC_MSG_RESULT(yes)
301         AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
302                 [Define to 1 if you have a strftime() that supports the %z format string.])
303 ], [
304         AC_MSG_RESULT(no)
305 ], [
306         # Fallback for Cross Compiling...
307         # This will enable the compatibility code.
308         AC_MSG_RESULT(no)
312 dnl #######################################################################
313 dnl # Check for GLib 2.12 (required)
314 dnl #######################################################################
315 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.12.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [
316         AC_MSG_RESULT(no)
317         AC_MSG_ERROR([
319 You must have GLib 2.4.0 or newer development headers installed to build.
321 If you have these installed already you may need to install pkg-config so
322 I can find them.
323 ])])
324 AC_SUBST(GLIB_CFLAGS)
325 AC_SUBST(GLIB_LIBS)
327 GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
328 AC_SUBST(GLIB_GENMARSHAL)
330 AC_ARG_WITH([extraversion],
331                         AC_HELP_STRING([--with-extraversion=STRING],
332                                                    [extra version number to be displayed in Help->About and --help (for packagers)]),
333                                                    EXTRA_VERSION=$withval)
335 if test x"$EXTRA_VERSION" != "x" ; then
336         AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION-$EXTRA_VERSION", [display version info])
337 else
338         AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION", [display version info])
341 AC_ARG_ENABLE(missing-dependencies, [AC_HELP_STRING([--disable-missing-dependencies],
342                 [skip missing dependencies instead of aborting configure])],
343         force_deps="$enableval", force_deps="yes")
345 AC_ARG_WITH(x, [],
346         with_x="$withval", with_x="yes")
347 AC_ARG_ENABLE(gtkui, [AC_HELP_STRING([--disable-gtkui],
348                 [compile without GTK+ user interface])],
349         enable_gtkui="$enableval", enable_gtkui="yes")
350 AC_ARG_ENABLE(consoleui, [AC_HELP_STRING([--disable-consoleui],
351                 [compile without console user interface])],
352         [enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no])
354 dnl #######################################################################
355 dnl # Check for GTK+ 2.10 and other things used by the GTK UI
356 dnl #######################################################################
357 AC_ARG_ENABLE(screensaver,
358         [AC_HELP_STRING([--disable-screensaver],
359                 [compile without X screensaver extension (used to detect idleness)])],
360         enable_screensaver="$enableval", enable_screensaver="yes")
361 AC_ARG_ENABLE(sm,
362         [AC_HELP_STRING([--disable-sm],
363                 [compile without X session management support])],
364         enable_sm="$enableval", enable_sm="yes")
365 AC_ARG_ENABLE(startup-notification,
366         [AC_HELP_STRING([--disable-startup-notification],
367                 [compile without startup notification support])],
368         enable_startup_notification="$enableval", enable_startup_notification="yes")
369 AC_ARG_ENABLE(gtkspell,
370         [AC_HELP_STRING([--disable-gtkspell],
371                 [compile without GtkSpell automatic spell checking])],
372         enable_gtkspell="$enableval", enable_gtkspell="yes")
373 AC_ARG_ENABLE(gevolution,
374         [AC_HELP_STRING([--enable-gevolution],
375                 [compile with the Evolution plugin])],
376         enable_gevolution="$enableval", enable_gevolution="no")
377 AC_ARG_ENABLE(cap,
378         [AC_HELP_STRING([--enable-cap],
379                 [compile with Contact Availability Prediction plugin])],
380         enable_cap="$enableval", enable_cap="no")
381 AC_ARG_ENABLE(gestures,
382         [AC_HELP_STRING([--disable-gestures],
383                 [compile without the gestures plugin])],
384         enable_gestures="$enableval", enable_gestures="yes")
386 AC_PATH_XTRA
387 # We can't assume that $x_libraries will be set, because autoconf does not
388 # set it in the case when the X libraries are in a standard place.
389 # Ditto for $x_includes
390 if test X"$x_libraries" = X"" || test X"$x_libraries" = XNONE; then
391     x_libpath_add=
392 else
393     x_libpath_add="-L$x_libraries"
395 if test X"$x_includes" = X"" || test X"$x_includes" = XNONE; then
396     x_incpath_add=
397 else
398     x_incpath_add="-I$x_includes"
401 if test "x$enable_gtkui" = "xyes" ; then
402         PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0], , [
403                 AC_MSG_RESULT(no)
404                 AC_MSG_ERROR([
406 You must have GTK+ 2.10.0 or newer development headers installed to compile
407 Pidgin.  If you want to build only Finch then specify --disable-gtkui when
408 running configure.
409 ])])
411         AC_SUBST(GTK_CFLAGS)
412         AC_SUBST(GTK_LIBS)
414         dnl We only really need Pango >= 1.4 for decent RTL support
415         PKG_CHECK_MODULES(PANGO, [pango >= 1.4.0],
416                         AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:)
418         dnl #######################################################################
419         dnl # Check if we should compile with X support
420         dnl #######################################################################
421         if test "x$with_x" = "xyes" ; then
422                 PKG_CHECK_MODULES(X11, x11,
423                         [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])],
424                         [AC_MSG_RESULT(no)
425                                 if test "x$x_incpath_add" != "x" -a "x$x_libpath_add" != "x"; then
426                                         X11_LIBS="$x_libpath_add"
427                                         X11_CFLAGS="$x_incpath_add"
428                                 else
429                                         if test "x$force_deps" = "xyes" ; then
430                                                 AC_MSG_ERROR([
431 X11 development headers not found.
432 Use --without-x if you do not need X11 support.
434                                         fi
435                                 fi
436                         ])
437                 AC_SUBST(X11_LIBS)
438                 AC_SUBST(X11_CFLAGS)
439         else
440                 enable_screensaver=no
441                 enable_sm=no
442                 enable_gestures=no
443         fi
445         dnl #######################################################################
446         dnl # Check for XScreenSaver
447         dnl #######################################################################
448         if test "x$enable_screensaver" = "xyes" ; then
449                 if test "x$with_x" = "xyes" ; then
450                         old_LIBS="$LIBS"
451                         LIBS="$LIBS $GTK_LIBS $x_libpath_add"
452                         XSS_LIBS=""
453                         XSS_HEADERS=""
454                         AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm])
455                         AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm])
456                         if test "x$XSS_LIBS" != "x"; then
457                                 oldCPPFLAGS="$CPPFLAGS"
458                                 CPPFLAGS="$CPPFLAGS $x_incpath_add"
459                                 AC_TRY_COMPILE([
460                                         #include <X11/Xlib.h>
461                                         #include <X11/extensions/scrnsaver.h>
462                                         ], [], [], [enable_screensaver=no])
463                                 CPPFLAGS="$oldCPPFLAGS"
464                         else
465                                 enable_screensaver=no
466                         fi
467                         LIBS="$old_LIBS"
469                         if test "x$enable_screensaver" = "xyes" ; then
470                                 AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])
471                                 AC_SUBST(XSS_LIBS)
472                         else
473                                 if test "x$force_deps" = "xyes" ; then
474                                         AC_MSG_ERROR([
475 XScreenSaver extension development headers not found.
476 Use --disable-screensaver if you do not need XScreenSaver extension support,
477 this is required for detecting idle time by mouse and keyboard usage.
479                                 fi
480                         fi
481                 else
482                         AC_MSG_ERROR([X support is required to build with XScreenSaver extensions])
483                 fi
484         fi
486         dnl #######################################################################
487         dnl # Check for X session management libs
488         dnl #######################################################################
489         if test "x$enable_sm" = "xyes"; then
490                 if test "x$with_x" = "xyes" ; then
491                         enable_sm=no
492                         AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE])
493                         if test "x$found_sm_lib" = "xtrue"; then
494                                 oldCPPFLAGS="$CPPFLAGS"
495                                 CPPFLAGS="$CPPFLAGS $x_incpath_add"
496                                 AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes)
497                                 CPPFLAGS="$oldCPPFLAGS"
498                         fi
500                         if test "x$enable_sm" = "xyes"; then
501                                 AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.])
502                                 AC_SUBST(SM_LIBS)
503                         else
504                                 if test "x$force_deps" = "xyes" ; then
505                                         AC_MSG_ERROR([
506 X session management development headers not found.
507 Use --disable-sm if you do not need session management support.
509                                 fi
510                         fi
511                 else
512                         AC_MSG_ERROR([X support is required to build with X session management support])
513                 fi
514         fi
516         dnl #######################################################################
517         dnl # Check for X11 to allow the gestures plugin
518         dnl #######################################################################
519         if test "x$enable_gestures" = "xyes"; then
520                 if test "x$with_x" = "xno" ; then
521                         enable_gestures=no
522                 fi
523         fi
525         dnl #######################################################################
526         dnl # Check for startup notification
527         dnl #######################################################################
528         if test "x$enable_startup_notification" = "xyes"; then
529                 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, [libstartup-notification-1.0 >= 0.5], , [
530                         AC_MSG_RESULT(no)
531                         if test "x$force_deps" = "xyes" ; then
532                                 AC_MSG_ERROR([
533 Startup notification development headers not found.
534 Use --disable-startup-notification if you do not need it.
536                         fi])
538                 if test "x$enable_startup_notification" = "xyes"; then
539                         AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
540                         AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
541                         AC_SUBST(STARTUP_NOTIFICATION_LIBS)
542                 fi
543         fi
545         dnl #######################################################################
546         dnl # Check for GtkSpell
547         dnl #######################################################################
548         if test "x$enable_gtkspell" = "xyes" ; then
549                 PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , [
550                         AC_MSG_RESULT(no)
551                         if test "x$force_deps" = "xyes" ; then
552                                 AC_MSG_ERROR([
553 GtkSpell development headers not found.
554 Use --disable-gtkspell if you do not need it.
556                         fi])
557                 if test "x$enable_gtkspell" = "xyes" ; then
558                         AC_DEFINE(USE_GTKSPELL, 1, [Define if we're using GtkSpell])
559                         AC_SUBST(GTKSPELL_CFLAGS)
560                         AC_SUBST(GTKSPELL_LIBS)
561                 fi
562         fi
564         dnl #######################################################################
565         dnl # Check for stuff needed by the Evolution integration plugin.
566         dnl #######################################################################
567         if test "x$enable_gevolution" = "xyes"; then
568                 evo_deps="libebook-1.2 libedata-book-1.2"
569                 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, , [
570                         AC_MSG_RESULT(yes)
571                         enable_gevolution="no"
572                 ])
573                 if test "x$enable_gevolution" = "xno"; then
574                         evo_deps="libebook-1.0 libedata-book-1.0"
575                         PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [
576                                 enable_gevolution="yes"
577                         ], [
578                                 AC_MSG_RESULT(yes)
579                         ])
580                 fi
581                 if test "x$enable_gevolution" = "xyes"; then
582                         AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.])
583                         AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
584                         AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
585                 else
586                         if test "x$force_deps" = "xyes" ; then
587                                 AC_MSG_ERROR([
588 Evolution development headers not found.
589 Use --disable-gevolution if you do not need it.
591                         fi
592                 fi
593         fi
595         dnl #######################################################################
596         dnl # Check for libsqlite3 (for the Contact Availability Prediction plugin)
597         dnl #######################################################################
598         if test "x$enable_cap" = "xyes"; then
599                 PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[
600                         AC_MSG_RESULT(no)
601                         if test "x$force_deps" = "xyes" ; then
602                                 AC_MSG_ERROR([
603 sqlite3 development headers not found.
604 Use --disable-cap if you do not need the Contact Availability Prediction plugin.
606                         fi])
607         fi
608         
610 else # GTK
611         enable_cap=no
612         enable_gevolution=no
613         enable_gtkspell=no
614         enable_screensaver=no
615         enable_sm=no
616         enable_startup_notification=no
617 fi      # GTK
619 AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtkui" = "xyes")
620 AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$enable_gevolution" = "xyes")
621 AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes")
622 AM_CONDITIONAL(ENABLE_GESTURES, test "x$enable_gestures" = "xyes")
625 dnl #######################################################################
626 dnl # Check for ncurses and other things used by the console UI
627 dnl #######################################################################
628 GNT_LIBS=""
629 GNT_CFLAGS=""
630 AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR],
631                 [compile finch against the ncurses includes in DIR])],
632                 [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""])
633 if test "x$enable_consoleui" = "xyes"; then
634         AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no])
635         AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"],
636             [enable_consoleui=no], [$GNT_LIBS])
638         if test "x$enable_consoleui" = "xyes"; then
639                 dnl # Some distros put the headers in ncursesw/, some don't
640                 found_ncurses_h=no
641                 for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include
642                 do
643                         f="$location/ncurses.h"
644                         AC_CHECK_HEADER($f,[
645                                 AC_MSG_CHECKING([if $f supports wide characters])
646                                 AC_TRY_COMPILE([
647                                         #define _XOPEN_SOURCE_EXTENDED
648                                         #include <$f>
649                                 ], [
650                                         #ifndef get_wch
651                                         # error get_wch not found!
652                                         #endif
653                                 ], [
654                                         dir=$location
655                                         if test x"$dir" != x"." ; then
656                                                 GNT_CFLAGS="-I$dir/"
657                                         else
658                                                 GNT_CFLAGS=""
659                                         fi
661                                         found_ncurses_h=yes
662                                         AC_MSG_RESULT([yes])
663                                         break
664                                 ], [
665                                         AC_MSG_RESULT([no])
666                                 ])
667                         ])
668                 done
670                 if test x"$found_ncurses_h" = x"no" ; then
671                         GNT_LIBS=""
672                         GNT_CFLAGS=""
673                         enable_consoleui=no
674                 fi
675         else
676                 # ncursesw was not found. Look for plain old ncurses
677                 enable_consoleui=yes
678                 AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no])
679                 AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"],
680                     [enable_consoleui=no], [$GNT_LIBS])
681                 AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.])
682                 if test x"$ac_ncurses_includes" != "x"; then
683                         GNT_CFLAGS="-I$ac_ncurses_includes"
684                 else
685                         if test x"$NCURSES_HEADERS" != "x"; then
686                                 GNT_CFLAGS="-I$NCURSES_HEADERS"
687                         fi
688                 fi
689         fi
692 if test "x$force_finch" = "xyes" -a "x$enable_consoleui" != "xyes"; then
693         AC_MSG_ERROR([
695 Finch will not be built. You need to install ncursesw (or ncurses) and its development headers.
700 AC_SUBST(GNT_LIBS)
701 AC_SUBST(GNT_CFLAGS)
702 AM_CONDITIONAL(ENABLE_GNT, test "x$enable_consoleui" = "xyes")
704 #AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])])
706 dnl #######################################################################
707 dnl # Check for LibXML2 (required)
708 dnl #######################################################################
709 PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= 2.6.0], , [
710         AC_MSG_RESULT(no)
711         AC_MSG_ERROR([
712 You must have libxml2 >= 2.6.0 development headers installed to build.
713 ])])
714 PKG_CHECK_EXISTS([libxml-2.0 >= 2.6.18], , [
715         AC_MSG_WARN([
716 Versions of libxml2 < 2.6.18 may contain bugs that could cause XMPP messages to be discarded.
717 ])])
719 AC_SUBST(LIBXML_CFLAGS)
720 AC_SUBST(LIBXML_LIBS)
722 dnl #######################################################################
723 dnl # GConf schemas
724 dnl #######################################################################
725 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
726 AM_CONDITIONAL(USE_GCONFTOOL, test "x$GCONFTOOL" != "xno")
727 AM_GCONF_SOURCE_2
729 dnl #######################################################################
730 dnl # Check for GStreamer
731 dnl #######################################################################
733 dnl TODO: Depend on gstreamer >= 0.10.10, and remove the conditional use of
734 dnl       gst_registry_fork_set_enabled.
735 AC_ARG_ENABLE(gstreamer,
736         [AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
737         enable_gst="$enableval", enable_gst="yes")
738 if test "x$enable_gst" != "xno"; then
739         PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], [
740                 AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
741                 AC_SUBST(GSTREAMER_CFLAGS)
742                 AC_SUBST(GSTREAMER_LIBS)
743                 AC_CHECK_LIB(gstreamer-0.10, gst_registry_fork_set_enabled,
744                         [ AC_DEFINE(GST_CAN_DISABLE_FORKING, [],
745                           [Define if gst_registry_fork_set_enabled exists])],
746                         [], [$GSTREAMER_LIBS])
747         ], [
748                 AC_MSG_RESULT(no)
749                 if test "x$force_deps" = "xyes" ; then
750                         AC_MSG_ERROR([
751 GStreamer development headers not found.
752 Use --disable-gstreamer if you do not need GStreamer (sound) support.
754                 fi])
757 dnl #######################################################################
758 dnl # Check for GStreamer Interfaces
759 dnl #######################################################################
760 if test "x$enable_gst" != "xno"; then
761         AC_ARG_ENABLE(gstreamer-interfaces,
762                 [AC_HELP_STRING([--disable-gstreamer-interfaces], [compile without GStreamer interface support])],
763                         enable_gstinterfaces="$enableval", enable_gstinterfaces="yes")
764         if test "x$enable_gstinterfaces" != "xno"; then
765                 PKG_CHECK_MODULES(GSTINTERFACES, [gstreamer-interfaces-0.10], [
766                         AC_DEFINE(USE_GSTINTERFACES, 1, [Use GStreamer interfaces for X overlay support])
767                         AC_SUBST(GSTINTERFACES_CFLAGS)
768                         AC_SUBST(GSTINTERFACES_LIBS)
769                 ], [
770                         enable_gstinterfaces="no"
771                 ])
772         fi
773 else
774         enable_gstinterfaces="no"
777 dnl #######################################################################
778 dnl # Check for Farsight
779 dnl #######################################################################
780 AC_ARG_ENABLE(farsight,
781         [AC_HELP_STRING([--disable-farsight], [compile without farsight support])],
782         enable_farsight="$enableval", enable_farsight="yes")
783 if test "x$enable_farsight" != "xno"; then
784         PKG_CHECK_MODULES(FARSIGHT, [farsight2-0.10 >= 0.0.9], [
785                 AC_DEFINE(USE_FARSIGHT, 1, [Use Farsight for voice and video])
786                 AC_SUBST(FARSIGHT_CFLAGS)
787                 AC_SUBST(FARSIGHT_LIBS)
788         ], [
789                 enable_farsight="no"
790         ])
793 dnl #######################################################################
794 dnl # Check for Voice and Video support
795 dnl #######################################################################
796 AC_ARG_ENABLE(vv,
797         [AC_HELP_STRING([--disable-vv], [compile without voice and video support])],
798         enable_vv="$enableval", enable_vv="yes")
799 if test "x$enable_vv" != "xno"; then
800         if test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farsight" != "xno"; then
801                 AC_DEFINE(USE_VV, 1, [Use voice and video])
802         else
803                 enable_vv="no"
804                 if test "x$force_deps" = "xyes"; then
805                         AC_MSG_ERROR([
806 Dependencies for voice/video were not met.
807 Install the necessary gstreamer and farsight packages first.
808 Or use --disable-vv if you do not need voice/video support.
809                         ])
810                 fi
811         fi
813 AM_CONDITIONAL(USE_VV, test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farsight" != "xno")
815 AC_ARG_ENABLE(idn,
816         [AC_HELP_STRING([--disable-idn], [compile without IDN support])],
817         [enable_idn="$enableval" force_idn=$enableval], [enable_idn="yes" force_idn=no])
818 if test "x$enable_idn" != "xno"; then
819         PKG_CHECK_MODULES(IDN, libidn >= 0.0.0, [
820                 AC_DEFINE(USE_IDN, 1, [Use GNU Libidn for stringprep and IDN])
821                 AC_SUBST(IDN_CFLAGS)
822                 AC_SUBST(IDN_LIBS)
823         ], [
824                 AC_MSG_RESULT(no)
825                 if test "x$force_deps" = "xyes" ; then
826                         AC_MSG_ERROR([
827 GNU Libidn development headers not found.
828 Use --disable-idn if you do not need it.
830                 fi
831         ])
834 dnl #######################################################################
835 dnl # Check for Meanwhile headers (for Sametime)
836 dnl #######################################################################
837 AC_ARG_ENABLE(meanwhile,
838         [AC_HELP_STRING([--disable-meanwhile],
839                 [compile without meanwhile (required for Sametime support)])],
840         enable_meanwhile="$enableval", enable_meanwhile="yes")
841 if test "x$enable_meanwhile" = "xyes"; then
842         PKG_CHECK_MODULES(MEANWHILE, [meanwhile >= 1.0.0 meanwhile < 2.0.0], [
843                 have_meanwhile="yes"
844         ], [
845                 have_meanwhile="no"
846                 if test "x$force_deps" = "xyes" ; then
847                         AC_MSG_ERROR([
848 Meanwhile development headers not found.
849 Use --disable-meanwhile if you do not need meanwhile (Sametime) support.
851                 fi])
853 AC_SUBST(MEANWHILE_CFLAGS)
854 AC_SUBST(MEANWHILE_LIBS)
856 dnl #######################################################################
857 dnl # Check for Native Avahi headers (for Bonjour)
858 dnl #######################################################################
859 AC_ARG_ENABLE(avahi,
860         [AC_HELP_STRING([--disable-avahi],
861                 [compile without avahi (required for Bonjour support)])],
862         enable_avahi="$enableval", enable_avahi="yes")
864 if test "x$enable_avahi" = "xyes"; then
865         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"])
866         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"])
867         AVAHI_CFLAGS=""
868         AVAHI_LIBS=""
870         dnl Attempt to autodetect Avahi
871         PKG_CHECK_MODULES(AVAHI, [avahi-client avahi-glib], [
872                 avahiincludes="yes"
873                 avahilibs="yes"
874         ], [
875                 avahiincludes="no"
876                 avahilibs="no"
877         ])
879         dnl Override AVAHI_CFLAGS if the user specified an include dir
880         if test "$ac_avahi_client_includes" != "no"; then
881                 AVAHI_CFLAGS="-I$ac_avahi_client_includes"
882         fi
883         CPPFLAGS_save="$CPPFLAGS"
884         CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS"
885         AC_CHECK_HEADER(avahi-client/client.h, [avahiincludes=yes], [avahiincludes=no])
886         CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS $GLIB_CFLAGS"
887         AC_CHECK_HEADER(avahi-glib/glib-malloc.h, [avahiincludes=yes], [avahiincludes=no])
888         CPPFLAGS="$CPPFLAGS_save"
890         dnl Override AVAHI_LIBS if the user specified a libs dir
891         if test "$ac_avahi_client_libs" != "no"; then
892                 AVAHI_LIBS="-L$ac_avahi_client_libs -lavahi-common -lavahi-client -lavahi-glib "
893         fi
894         AC_CHECK_LIB(avahi-client, avahi_client_new, [avahilibs=yes], [avahilibs=no], $AVAHI_LIBS)
897 if test "x$enable_avahi" = "xyes" -a "x$force_deps" = "xyes" -a \( "x$avahiincludes" = "xno" -o "x$avahilibs" = "xno" \); then
898         AC_MSG_ERROR([
899 avahi development headers not found.
900 Use --disable-avahi if you do not need avahi (Bonjour) support.
903 AC_SUBST(AVAHI_CFLAGS)
904 AC_SUBST(AVAHI_LIBS)
907 dnl #######################################################################
908 dnl # Check for SILC client includes and libraries
909 dnl #######################################################################
910 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"])
911 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"])
912 SILC_CFLAGS=""
913 SILC_LIBS=""
914 have_silc="no"
915 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
916         silc_manual_check="yes"
917 else
918         silc_manual_check="no"
920 if test "x$silc_manual_check" = "xno"; then
921         PKG_CHECK_MODULES(SILC, [silcclient >= 1.1], [
922                 have_silc="yes"
923                 silcincludes="yes"
924                 silcclient="yes"
925         ], [
926                 have_silc="no"
927         ])
928         if test "x$have_silc" = "xno"; then
929                 PKG_CHECK_MODULES(SILC, silcclient, [
930                         have_silc="yes"
931                         silc10includes="yes"
932                         silc10client="yes"
933                 ], [
934                         have_silc="no"
935                 ])
936                 dnl If silcclient.pc wasn't found, check for just silc.pc
937                 if test "x$have_silc" = "xno"; then
938                         PKG_CHECK_MODULES(SILC, silc, [
939                                 have_silc="yes"
940                                 silc10includes="yes"
941                                 silc10client="yes"
942                         ], [
943                                 have_silc="no"
944                         ])
945                 fi
946         fi
947 else
948         if test "$ac_silc_includes" != "no"; then
949                 SILC_CFLAGS="-I$ac_silc_includes"
950         fi
951         CPPFLAGS_save="$CPPFLAGS"
952         CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
953         AC_CHECK_HEADER(silc.h, [silcincludes=yes])
954         CPPFLAGS="$CPPFLAGS_save"
956         if test "$ac_silc_libs" != "no"; then
957                 SILC_LIBS="-L$ac_silc_libs"
958         fi
959         SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
960         AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS)
962         if test "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes"; then
963                 have_silc="yes"
964         else
965                 CPPFLAGS_save="$CPPFLAGS"
966                 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
967                 AC_CHECK_HEADER(silcincludes.h, [silc10includes=yes])
968                 CPPFLAGS="$CPPFLAGS_save"
970                 SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
971                 AC_CHECK_LIB(silcclient, silc_client_init, [silc10client=yes], , $SILC_LIBS)
972                 if test "x$silc10includes" = "xyes" -a "x$silc10client" = "xyes"; then
973                         have_silc="yes"
974                 fi
975         fi
977 AC_SUBST(SILC_LIBS)
978 AC_SUBST(SILC_CFLAGS)
979 dnl SILC Toolkit >= 1.0.1 has a new MIME API
980 if test "x$silcclient" = "xyes"; then
981         AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
982 elif test "x$silc10client" = "xyes"; then
983         CPPFLAGS_save="$CPPFLAGS"
984         CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
985                 AC_MSG_CHECKING(for silcmime.h)
986                 AC_TRY_COMPILE([
987 #include <silcincludes.h>
988 #include <silcmime.h>
989                 ], [], [
990                 AC_MSG_RESULT(yes)
991                 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
992                 ], [
993                 AC_MSG_RESULT(no)
994                 ])
995         CPPFLAGS="$CPPFLAGS_save"
998 dnl #######################################################################
999 dnl # Check for Gadu-Gadu client includes and libraries
1000 dnl #######################################################################
1001 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"])
1002 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"])
1003 GADU_CFLAGS=""
1004 GADU_LIBS=""
1005 if test -n "$with_gadu_includes" || test -n "$with_gadu_libs"; then
1006         gadu_manual_check="yes"
1007 else
1008         gadu_manual_check="no"
1010 if test "x$gadu_manual_check" = "xno"; then
1011         PKG_CHECK_MODULES(GADU, libgadu, [
1012                 gadu_includes="yes"
1013                 gadu_libs="yes"
1014         ], [
1015                 gadu_includes="no"
1016         ])
1017 else
1018         if test "$ac_gadu_includes" != "no"; then
1019                 GADU_CFLAGS="-I$ac_gadu_includes"
1020         fi
1021         CPPFLAGS_save="$CPPFLAGS"
1022         CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
1023         AC_CHECK_HEADER(libgadu.h, [gadu_includes=yes])
1024         CPPFLAGS="$CPPFLAGS_save"
1026         if test "$ac_gadu_libs" != "no"; then
1027                 GADU_LIBS="-L$ac_gadu_libs"
1028         fi
1029         GADU_LIBS="$GADU_LIBS -lgadu"
1030         AC_CHECK_LIB(gadu, gg_libgadu_version, [gadu_libs=yes], , $GADU_LIBS)
1032 GADU_CFLAGS=`echo $GADU_CFLAGS |$sedpath 's/-Wall//'`
1034 if test "x$gadu_libs" = "xyes"; then
1035         AC_MSG_CHECKING(for libgadu GPL compatibility)
1036         CPPFLAGS_save="$CPPFLAGS"
1037         CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
1038         AC_TRY_COMPILE([#include <libgadu.h>], [
1039 #if defined(__GG_LIBGADU_HAVE_OPENSSL) || defined(GG_CONFIG_HAVE_OPENSSL)
1040 #error "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1041 #endif
1042         ], [
1043                 AC_MSG_RESULT(yes)
1044                 AC_DEFINE([HAVE_LIBGADU], [1],
1045                         [Define to 1 if you have libgadu.])
1046         ], [
1047                 AC_MSG_RESULT(no)
1048                 echo
1049                 echo
1050                 echo "libgadu is not compatible with the GPL when compiled with OpenSSL support."
1051                 echo "To compile against system libgadu, please recompile libgadu using:"
1052                 echo "./autogen.sh --disable-libgadu-openssl --disable-static --enable-shared"
1053                 echo "Then rerun this ./configure"
1054                 echo
1055                 echo "Falling back to using our own copy of libgadu"
1056                 echo
1057                 GADU_LIBS=""
1058                 GADU_CFLAGS=""
1059                 gadu_libs=no
1060         ])
1061         CPPFLAGS="$CPPFLAGS_save"
1064 AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes")
1066 AC_SUBST(GADU_LIBS)
1067 AC_SUBST(GADU_CFLAGS)
1069 # change the next line to not make MSNP15 the default (s/disable/enable/; s/yes/no/;)
1070 AC_ARG_ENABLE(msnp15,[AC_HELP_STRING([--disable-msnp15], [Disable the newer MSNP15 protocol])],enable_msnp15=$enableval,enable_msnp15=yes)
1072 AC_ARG_ENABLE(distrib,,,enable_distrib=no)
1073 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
1074 DYNAMIC_PRPLS=all
1075 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=""])
1076 if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then
1077         DYNAMIC_PRPLS=""
1080 if test "x$STATIC_PRPLS" = "xall" ; then
1081         STATIC_PRPLS="bonjour gg irc jabber msn myspace novell oscar qq sametime silc simple yahoo zephyr"
1083 if test "x$have_meanwhile" != "xyes" ; then
1084         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'`
1086 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1087         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'`
1089 if test "x$enable_msnp15" != "xyes" ; then
1090         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/msn/msnp9/'`
1092 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1093         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc/silc10/'`
1095 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1096         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc10//'`
1098 AC_SUBST(STATIC_PRPLS)
1099 STATIC_LINK_LIBS=
1100 extern_init=
1101 load_proto=
1102 for i in $STATIC_PRPLS ; do
1103         dnl Ugly special case for "libsilcpurple.la":
1104         dnl ... and Ugly special case for multi-protocol oscar and yahoo
1105         if test \( "x$i" = "xoscar" -o "x$i" = "xaim" -o "x$i" = "xicq" \) -a "x$static_oscar" != "xyes"; then
1106                 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/oscar/liboscar.la"
1107                 extern_init="$extern_init extern gboolean purple_init_aim_plugin();"
1108                 extern_init="$extern_init extern gboolean purple_init_icq_plugin();"
1109                 load_proto="$load_proto purple_init_aim_plugin();"
1110                 load_proto="$load_proto purple_init_icq_plugin();"
1111         elif test "x$i" = "xyahoo"; then
1112                 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/yahoo/libymsg.la"
1113                 extern_init="$extern_init extern gboolean purple_init_yahoo_plugin();"
1114                 extern_init="$extern_init extern gboolean purple_init_yahoojp_plugin();"
1115                 load_proto="$load_proto purple_init_yahoo_plugin();"
1116                 load_proto="$load_proto purple_init_yahoojp_plugin();"
1117         else
1118                 if test "x$i" = "xsilc"; then
1119                         STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.la"
1120                 elif test "x$i" = "xsilc10"; then
1121                         STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libsilcpurple.la"
1122                 elif test "x$i" = "xmsnp9"; then
1123                         STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libmsn.la"
1124                 else
1125                         STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.la"
1126                 fi
1127                 extern_init="$extern_init extern gboolean purple_init_${i}_plugin();"
1128                 load_proto="$load_proto purple_init_${i}_plugin();"
1129         fi
1130         case $i in
1131                 bonjour)        static_bonjour=yes ;;
1132                 gg)                     static_gg=yes ;;
1133                 irc)            static_irc=yes ;;
1134                 jabber)         static_jabber=yes ;;
1135                 msn)            static_msn=yes ;;
1136                 msnp9)          static_msn=yes ;;
1137                 myspace)        static_myspace=yes ;;
1138                 novell)         static_novell=yes ;;
1139                 oscar)          static_oscar=yes ;;
1140                 aim)            static_oscar=yes ;;
1141                 icq)            static_oscar=yes ;;
1142                 qq)                     static_qq=yes ;;
1143                 sametime)       static_sametime=yes ;;
1144                 silc)           static_silc=yes ;;
1145                 silc10)         static_silc=yes ;;
1146                 simple)         static_simple=yes ;;
1147                 yahoo)          static_yahoo=yes ;;
1148                 zephyr)         static_zephyr=yes ;;
1149                 *)                      echo "Invalid static protocol $i!!" ; exit ;;
1150         esac
1151 done
1152 AM_CONDITIONAL(STATIC_BONJOUR, test "x$static_bonjour" = "xyes")
1153 AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes")
1154 AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes")
1155 AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes")
1156 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes")
1157 AM_CONDITIONAL(STATIC_MYSPACE, test "x$static_myspace" = "xyes")
1158 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes")
1159 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes")
1160 AM_CONDITIONAL(STATIC_QQ, test "x$static_qq" = "xyes")
1161 AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_meanwhile" = "xyes")
1162 AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$have_silc" = "xyes")
1163 AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes")
1164 AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes")
1165 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes")
1166 AC_SUBST(STATIC_LINK_LIBS)
1167 AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init static void static_proto_init(void) { $load_proto },
1168         [Loads static protocol plugin module initialization functions.])
1170 AC_ARG_WITH(dynamic_prpls, [AC_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`])
1171 if test "x$DYNAMIC_PRPLS" = "xall" ; then
1172         DYNAMIC_PRPLS="bonjour gg irc jabber msn myspace novell oscar qq sametime silc simple yahoo zephyr"
1174 if test "x$have_meanwhile" != "xyes"; then
1175         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'`
1177 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1178         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
1180 if test "x$enable_msnp15" != "xyes" ; then
1181         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/msn/msnp9/'`
1183 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1184         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc/silc10/'`
1186 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
1187         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc10//'`
1189 AC_SUBST(DYNAMIC_PRPLS)
1190 for i in $DYNAMIC_PRPLS ; do
1191         case $i in
1192                 bonjour)        dynamic_bonjour=yes ;;
1193                 gg)                     dynamic_gg=yes ;;
1194                 irc)            dynamic_irc=yes ;;
1195                 jabber)         dynamic_jabber=yes ;;
1196                 msn)            dynamic_msn=yes ;;
1197                 msnp9)          dynamic_msn=yes ;;
1198                 myspace)        dynamic_myspace=yes ;;
1199                 novell)         dynamic_novell=yes ;;
1200                 null)           dynamic_null=yes ;;
1201                 oscar)          dynamic_oscar=yes ;;
1202                 aim)            dynamic_oscar=yes ;;
1203                 icq)            dynamic_oscar=yes ;;
1204                 qq)                     dynamic_qq=yes ;;
1205                 sametime)       dynamic_sametime=yes ;;
1206                 silc)           dynamic_silc=yes ;;
1207                 silc10)         dynamic_silc=yes ;;
1208                 simple)         dynamic_simple=yes ;;
1209                 yahoo)          dynamic_yahoo=yes ;;
1210                 zephyr)         dynamic_zephyr=yes ;;
1211                 *)                      echo "Invalid dynamic protocol $i!!" ; exit ;;
1212         esac
1213 done
1215 AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes)
1216 AC_ARG_WITH(krb4, [AC_HELP_STRING([--with-krb4=PREFIX], [compile Zephyr plugin with Kerberos 4 support])], kerberos="$withval", kerberos="no")
1217 AC_ARG_WITH(zephyr, [AC_HELP_STRING([--with-zephyr=PREFIX], [compile Zephyr plugin against external libzephyr])], zephyr="$withval", zephyr="no")
1218 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
1220 AC_CHECK_HEADERS(sys/utsname.h)
1221 AC_CHECK_FUNC(uname)
1223 AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes)
1225 DEBUG_CFLAGS="$DEBUG_CFLAGS -DPURPLE_DISABLE_DEPRECATED -DPIDGIN_DISABLE_DEPRECATED -DFINCH_DISABLE_DEPRECATED -DGNT_DISABLE_DEPRECATED"
1226 if test "x$GCC" = "xyes"; then
1227         dnl We enable -Wall later.
1228         dnl If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
1229         dnl This leads to warnings we don't want.
1230         CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
1232         dnl ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE
1233         dnl
1234         dnl Future Possibilities
1235         dnl
1236         dnl Consider adding -Wbad-function-cast.
1237         dnl     This leads to spurious warnings using GPOINTER_TO_INT(), et al. directly on a function call.
1238         dnl             We'd need an intermediate variable.
1239         dnl
1240         dnl Consider adding -Wfloat-equal.
1241         dnl     This leads to warnings with Perl.
1242         dnl             Perhaps we could write ugly configure magic and pass -Wno-float-equal down to that subdirectory.
1243         dnl             On the other hand, it's probably actually broken, so maybe the Perl folks should fix that?
1244         dnl
1245         dnl Consider removing -Wno-sign-compare (from the -Wextra set) and fixing all those cases.
1246         dnl     This is likely non-trivial.
1247         dnl
1248         for newflag in \
1249                         "-Waggregate-return" \
1250                         "-Wcast-align" \
1251                         "-Wdeclaration-after-statement" \
1252                         "-Wendif-labels" \
1253                         "-Werror-implicit-function-declaration" \
1254                         "-Wextra -Wno-sign-compare -Wno-unused-parameter" \
1255                         "-Wformat-security" \
1256                                 "-Werror=format-security" \
1257                         "-Winit-self" \
1258                         "-Wmissing-declarations" \
1259                         "-Wmissing-noreturn" \
1260                         "-Wmissing-prototypes" \
1261                         "-Wpointer-arith" \
1262                         "-Wundef" \
1263         ; do
1264                 orig_CFLAGS="$CFLAGS"
1265                 CFLAGS="$CFLAGS $newflag"
1266                 AC_MSG_CHECKING(for $newflag option to gcc)
1267                 AC_TRY_COMPILE([], [
1268                         int main() {return 0;}
1269                 ], [
1270                         AC_MSG_RESULT(yes)
1271                         CFLAGS="$orig_CFLAGS"
1272                         DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
1273                 ], [
1274                         AC_MSG_RESULT(no)
1275                         CFLAGS="$orig_CFLAGS"
1276                 ])
1277         done
1279         if test "x$enable_fortify" = "xyes"; then
1280                 AC_MSG_CHECKING(for FORTIFY_SOURCE support)
1281                 AC_TRY_COMPILE([#include <features.h>], [
1282                         int main() {
1283                         #if !(__GNUC_PREREQ (4, 1) \
1284                                 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
1285                                 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
1286                                         && __GNUC_MINOR__ == 4 \
1287                                         && (__GNUC_PATCHLEVEL__ > 2 \
1288                                                 || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
1289                         #error No FORTIFY_SOURCE support
1290                         #endif
1291                                 return 0;
1292                         }
1293                 ], [
1294                         AC_MSG_RESULT(yes)
1295                         DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2"
1296                 ], [
1297                         AC_MSG_RESULT(no)
1298                 ])
1299         fi
1301         DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
1302         CFLAGS="-g $CFLAGS"
1304 AC_SUBST(CFLAGS)
1306 AC_PATH_PROG(pidginpath, pidgin)
1308 dnl #######################################################################
1309 dnl # Check for D-Bus libraries
1310 dnl #######################################################################
1312 AC_ARG_ENABLE(dbus, [AC_HELP_STRING([--disable-dbus], [disable D-Bus support])], , enable_dbus=yes)
1313 AC_ARG_ENABLE(nm, [AC_HELP_STRING([--disable-nm], [disable NetworkManager support (requires D-Bus)])], enable_nm=$enableval, enable_nm=yes)
1315 if test "x$enable_dbus" = "xyes" ; then
1316         AC_CHECK_PROG(enable_dbus, dbus-binding-tool, yes, no)
1319 if test "x$enable_dbus" = "xyes" ; then
1320         PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60 dbus-glib-1 >= 0.60], [
1321                 AC_SUBST(DBUS_CFLAGS)
1322                 AC_SUBST(DBUS_LIBS)
1323                 enable_dbus=yes
1324         ], [
1325         enable_dbus=no
1326         if test "x$force_deps" = "xyes" ; then
1327                 AC_MSG_ERROR([
1328 D-Bus development headers not found.
1329 Use --disable-dbus if you do not need D-Bus support.
1331         fi])
1334 dnl Check for NetworkManager.h; if we don't have it, oh well
1335 if test "x$enable_dbus" = "xyes" ; then
1336         if test "x$enable_nm" = "xyes" ; then
1337                 PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [
1338                         AC_SUBST(NETWORKMANAGER_CFLAGS)
1339                         AC_SUBST(NETWORKMANAGER_LIBS)
1340                         AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.])
1341                 ], [
1342                         enable_nm=no
1343                         if test "x$force_deps" = "xyes" ; then
1344                                 AC_MSG_ERROR([
1345 NetworkManager development headers not found.
1346 Use --disable-nm if you do not need NetworkManager support.
1348                         fi])
1349         fi
1350 else
1351         enable_nm=no
1354 dnl #######################################################################
1355 dnl # Check for Python
1356 dnl #######################################################################
1358 dnl Python scripts are used to auto-generate about 3000 lines of C
1359 dnl and XML code that wraps (part of) the existing API so that
1360 dnl it is now accessible through D-Bus.
1362 dnl Python is only required if --enable-dbus is used, and only for
1363 dnl the build process to generate the code, not for running pidgin.
1364 dnl This autogenerated code is system-independent, so in principle we
1365 dnl can generate all of it before shipping.  But I thought adding
1366 dnl auto-generated stuff to the repository is inelegant.
1367 dnl Alternatively, these python scripts could be rewritten
1368 dnl in C (brrrr ...).
1370 AC_ARG_WITH([python],
1371                         AC_HELP_STRING([--with-python=PATH],
1372                                                    [which python interpreter to use for dbus code generation]),
1373                         PYTHON=$withval)
1375 if test "x$enable_dbus" = "xyes" ; then
1376         if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then
1377                 AC_PATH_PROG([PYTHON], [python], [no])
1378         fi
1380         if test x"$PYTHON" = x"no" ; then
1381                 AC_MSG_WARN([python interpreter not found in your path])
1382                 enable_dbus=no
1383         fi
1386 if test "x$enable_dbus" = "xyes" ; then
1387         if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then
1388                 AC_MSG_WARN([python version >= 2.4 required])
1389                 enable_dbus=no
1390         fi
1393 dnl ###########################################################################
1394 dnl # Find the D-Bus services dir.
1395 dnl #
1396 dnl # This is a 3 step process that
1397 dnl #
1398 dnl # 1. checks if --with-dbus-services was set, if so use that.
1399 dnl # 2. checks if --prefix was given, if so use that.
1400 dnl # 3. fallbacks to installing into what should be the correct system
1401 dnl #    directories.
1402 dnl #
1403 dnl # This is still prone to error if one of the legacy directories exist
1404 dnl # although a newer dbus is installed.  But I have tried to order the
1405 dnl # directory searching to keep this situation at a minimum.
1406 dnl ###########################################################################
1407 AC_ARG_WITH(dbus-services, [AC_HELP_STRING([--with-dbus-services=<dir>], [where the D-Bus services directory is located.])])
1409 DBUS_SERVICES_DIR=""
1411 if test x"$enable_dbus" = "xyes" ; then
1412         AC_MSG_CHECKING([location of the D-Bus services directory])
1413         if ! test -z "$with_dbus_services" ; then
1414                 if ! test -d "$with_dbus_services" ; then
1415                         AC_MSG_ERROR([$with_dbus_services does not exist, if this is the correct location please make sure that it exists.])
1416                 fi
1418                 DBUS_SERVICES_DIR="$with_dbus_services"
1419         else
1420                 if test x"$prefix" = x"NONE" ; then
1421                         dnl # no prefix given, so we look for the correct dbus system paths.
1422                         dnl # if a prefix is given, we use it.
1424                         serviceprefixes="$prefix/share $prefix/lib /usr/share /usr/local/share"
1425                         DBUS_SERVICES_DIR=""
1427                         for d in $serviceprefixes ; do
1428                                 dir="$d/dbus-1/services"
1429                                 if test -d $dir ; then
1430                                         DBUS_SERVICES_DIR="$dir"
1431                                         break
1432                                 fi
1433                         done
1435                         if test -z $DBUS_SERVICES_DIR ; then
1436                                 AC_MSG_ERROR([D-Bus services directory was not found!  Please use --with-dbus-services and specify it's location.])
1437                         fi
1438                 else
1439                         DBUS_SERVICES_DIR="$datadir/dbus-1/services"
1440                 fi
1441         fi
1442         AC_MSG_RESULT([$DBUS_SERVICES_DIR])
1443         AC_DEFINE(HAVE_DBUS, 1, [Define if we are using D-Bus.])
1445 AC_SUBST(DBUS_SERVICES_DIR)
1447 if test "x$enable_dbus" = "xyes" ; then
1448         echo "Building with D-Bus support"
1449 else
1450         echo "Building without D-Bus support"
1453 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
1455 dnl Check for Python headers (currently useful only for libgnt)
1456 dnl (Thanks to XChat)
1457 AC_PATH_PROG(pythonpath, python)
1458 if test "_$pythonpath" != _ ; then
1459         AC_MSG_CHECKING(for Python compile flags)
1460         PY_PREFIX=`$pythonpath -c 'import sys ; print sys.prefix'`
1461         PY_EXEC_PREFIX=`$pythonpath -c 'import sys ; print sys.exec_prefix'`
1462         changequote(<<, >>)dnl
1463         PY_VERSION=`$pythonpath -c 'import sys ; print sys.version[0:3]'`
1464         PY_MAJOR=`$pythonpath -c 'import sys ; print sys.version[0:2]'`
1465         changequote([, ])dnl
1466         if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then
1467                 AC_CHECK_LIB(pthread, pthread_create, )
1468                 AC_CHECK_LIB(util, openpty, )
1469                 AC_CHECK_LIB(db, dbopen, )
1470                 PY_LIBS="-lpython$PY_VERSION -L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config"
1471                 PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
1472                 AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.])
1473                 AC_MSG_RESULT(ok)
1474         else
1475                 AC_MSG_RESULT([Can't find Python.h])
1476                 PY_LIBS=""
1477                 PY_CFLAGS=""
1478         fi
1480 AC_SUBST(PY_CFLAGS)
1481 AC_SUBST(PY_LIBS)
1483 dnl #######################################################################
1484 dnl # Check for Mono support
1485 dnl #######################################################################
1486 AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support (experimental)])], , enable_mono=no)
1487 if test x"$enable_mono" = x"yes" ; then
1488         PKG_CHECK_MODULES(MONO, mono, [
1489                 AC_SUBST(MONO_CFLAGS)
1490                 AC_SUBST(MONO_LIBS)
1491                 enable_mono=yes
1492         ], [
1493                 AC_MSG_RESULT(no)
1494                 AC_MSG_ERROR([
1495 Mono development headers not found.
1496 Use --disable-mono if you do not need Mono support.
1498         ])
1499         if test x"$enable_mono" = x"yes"; then
1500                 oldLIBS="$LIBS"
1501                 LIBS="$LIBS $MONO_LIBS"
1502                 AC_MSG_CHECKING(for libmono)
1503                 AC_CHECK_FUNCS(mono_jit_init, [], enable_mono=no)
1504                 LIBS="$oldLIBS"
1506                 oldCPPFLAGS="$CPPFLAGS"
1507                 CPPFLAGS="$CPPFLAGS $MONO_CFLAGS"
1508                 AC_CHECK_HEADERS(mono/jit/jit.h, [], enable_mono=no)
1509                 AC_CHECK_HEADERS(mono/metadata/object.h, [], enable_mono=no)
1510                 CPPFLAGS="$oldCPPFLAGS"
1512                 AC_DEFINE(ENABLE_MONO, 1, [Define if mono enabled.])
1513         fi
1514 else
1515         MONO_CFLAGS=
1516         MONO_LIBS=
1517         enable_mono=no
1520 AC_SUBST(MONO_CFLAGS)
1521 AC_SUBST(MONO_LIBS)
1522 AM_CONDITIONAL(USE_MONO, test x"$enable_mono" = x"yes")
1524 dnl #######################################################################
1525 dnl # Check for Perl support
1526 dnl #######################################################################
1527 AC_ARG_ENABLE(perl, [AC_HELP_STRING([--disable-perl], [compile without perl scripting])], , enable_perl=yes)
1529 if test "$enable_plugins" = no ; then
1530         enable_perl=no
1532 looked_for_perl="no"
1533 if test "$enable_perl" = yes ; then
1534         looked_for_perl="yes"
1535         AC_PATH_PROG(perlpath, perl)
1536         AC_MSG_CHECKING(for Perl compile flags)
1537         PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
1538         if test "_$PERL_CFLAGS" = _ ; then
1539                 AC_MSG_RESULT([not found, building without perl.])
1540                 enable_perl=no
1541         else
1542                 PERL_LIBS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null |$sedpath 's/-lgdbm //'`
1543                 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-ldb //'`
1544                 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lndbm //'`
1545                 if test "$system" = "Linux"; then
1546                         PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lnsl //'`
1547                         PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lposix //'`
1548                 fi
1549                 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lc //'`
1550                 AC_MSG_RESULT(ok)
1552                 oldLIBS="$LIBS"
1553                 LIBS="$LIBS $PERL_LIBS"
1554                 AC_MSG_CHECKING(for libperl)
1555                 AC_CHECK_FUNCS(perl_run, [], enable_perl=no)
1556                 LIBS="$oldLIBS"
1558                 oldCPPFLAGS="$CPPFLAGS"
1559                 CPPFLAGS="$CPPFLAGS $PERL_CFLAGS"
1560                 AC_CHECK_HEADERS(EXTERN.h)
1561                 AC_CHECK_HEADERS(perl.h, [], enable_perl=no,
1562                 [#if HAVE_EXTERN_H
1563                  # include <EXTERN.h>
1564                  #endif])
1565                 CPPFLAGS="$oldCPPFLAGS"
1566         fi
1569 if test "$enable_perl" = yes ; then
1570         AC_PROG_PERL_MODULES(ExtUtils::MakeMaker, , have_makemaker=no)
1572         if test "x$have_makemaker" = "xno"; then
1573                 enable_perl=no
1574                 PERL_CFLAGS=
1575                 PERL_LIBS=
1576                 AM_CONDITIONAL(USE_PERL, false)
1577                 AC_MSG_WARN(Compiling perl requires ExtUtils::MakeMaker)
1578         else
1579                 AC_DEFINE(HAVE_PERL, [1], [Compile with support for perl])
1580                 AC_SUBST(PERL_CFLAGS)
1581                 AC_SUBST(PERL_LIBS)
1582                 AM_CONDITIONAL(USE_PERL, true)
1584                 dnl This is almost definitely wrong, but in case there's
1585                 dnl something I'm missing, I'll leave it in.
1586                 AC_CHECK_FUNCS(Perl_eval_pv)
1588                 AC_MSG_CHECKING(for old perl)
1589                 PERL_OLD=`$perlpath -e 'if($]<5.006){printf"yes\n";}else{printf"no\n";}'`
1591                 if test "x$PERL_OLD" = "xyes"; then
1592                         AC_DEFINE(OLD_PERL, 1, [Define if old perl is installed.])
1593                         AC_MSG_RESULT(yes)
1594                 else
1595                         AC_MSG_RESULT(no)
1596                 fi
1598                 AC_MSG_CHECKING(for DynaLoader.a)
1599                 DYNALOADER_A=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*([[^ ]]*DynaLoader\.a).*/\2/'`
1601                 dnl Don't check libperl.a if dynaloader.a wasn't found.
1602                 if test -n "$DYNALOADER_A"; then
1603                         AC_MSG_RESULT(yes)
1605                         dnl Find either libperl.a or libperl.so
1606                         AC_MSG_CHECKING(for libperl.a or libperl.so)
1607                         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 } } };'`
1608                         if test -z "$LIBPERL_A"; then
1609                                 AC_MSG_RESULT(no)
1610                                 DYNALOADER_A=
1611                         else
1612                                 AC_MSG_RESULT(yes)
1614                                 if test "$LIBPERL_A" = "-lperl"; then
1615                                         LIBPERL_A=
1616                                 fi
1617                         fi
1619                         PERL_LIBS=`echo $PERL_LIBS | $perlpath -pe 's/^(.* )*[[^ ]]*DynaLoader\.a/\1libperl_dynaloader.la/'`
1621                         if test -n "$LIBPERL_A"; then
1622                                 PERL_LIBS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lperl /libperl_orig.la /' -e 's/-lperl$/libperl_orig.la$/'`
1623                         fi
1625                         AC_SUBST(DYNALOADER_A)
1626                         AC_SUBST(LIBPERL_A)
1627                 else
1628                         AC_MSG_RESULT(no)
1629                 fi
1630         fi
1631 else
1632         PERL_CFLAGS=
1633         PERL_LIBS=
1634         AM_CONDITIONAL(USE_PERL, false)
1637 if test "x$looked_for_perl" = "xyes" -a "x$enable_perl" = "xno" -a "x$force_deps" = "xyes"; then
1638         AC_MSG_ERROR([
1639 Perl development headers not found.
1640 Use --disable-perl if you do not need Perl scripting support.
1644 dnl #######################################################################
1645 dnl # SSL support
1646 dnl #
1647 dnl # Thanks go to Evolution for the checks.
1648 dnl #######################################################################
1650 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])
1652 SSL_CERTIFICATES_DIR=""
1653 if ! test -z "$ssl_certificates_dir" ; then
1654         if ! test -d "$ssl_certificates_dir" ; then
1655                 AC_MSG_ERROR([$ssl_certificates_dir does not exist, if this is the correct location please make sure that it exists.])
1656         fi
1657         SSL_CERTIFICATES_DIR="$ssl_certificates_dir"
1659 AC_SUBST(SSL_CERTIFICATES_DIR)
1660 AM_CONDITIONAL(INSTALL_SSL_CERTIFICATES, test "x$SSL_CERTIFICATES_DIR" = "x")
1662 dnl These two are inverses of each other <-- stolen from evolution!
1664 AC_ARG_ENABLE(gnutls,
1665         [  --enable-gnutls=[yes,no]  attempt to use GnuTLS for SSL support [default=yes]],
1666         [enable_gnutls="$enableval"],
1667         [enable_gnutls="yes"])
1669 AC_ARG_ENABLE(nss,
1670         [  --enable-nss=[yes,no,static]    attempt to use Mozilla libnss for SSL support [default=yes]],
1671         [enable_nss="$enableval"],
1672         [enable_nss="yes"])
1674 msg_ssl="None. MSN, Yahoo!, Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!"
1675 looked_for_gnutls="no"
1676 dnl #
1677 dnl # Check for GnuTLS if it's specified.
1678 dnl #
1679 if test "x$enable_gnutls" != "xno"; then
1680         enable_gnutls="no"
1681         prefix=`eval echo $prefix`
1682         looked_for_gnutls="yes"
1684         AC_ARG_WITH(gnutls-includes,
1685                 [  --with-gnutls-includes=PREFIX   location of GnuTLS includes.],
1686                 [ with_gnutls_includes="$withval" ],
1687                 [ with_gnutls_includes="$prefix/include" ])
1689         have_gnutls_includes="no"
1691         if test "x$with_gnutls_includes" != "xno"; then
1692                 CPPFLAGS_save="$CPPFLAGS"
1694                 AC_MSG_CHECKING(for GnuTLS includes)
1695                 AC_MSG_RESULT("")
1697                 CPPFLAGS="$CPPFLAGS -I$with_gnutls_includes"
1698                 AC_CHECK_HEADERS(gnutls/gnutls.h, [ gnutls_includes="yes" ])
1699                 CPPFLAGS="$CPPFLAGS_save"
1701                 if test "x$gnutls_includes" != "xno" -a \
1702                         "x$gnutls_includes" != "x"; then
1703                         have_gnutls_includes="yes"
1705                         if test "x$with_gnutls_includes" != "xNONE/include"; then
1706                                 GNUTLS_CFLAGS="-I$with_gnutls_includes"
1707                         fi
1708                 else
1709                         GNUTLS_CFLAGS=""
1710                 fi
1711         else
1712                 AC_MSG_CHECKING(for GnuTLS includes)
1713                 AC_MSG_RESULT(no)
1714         fi
1716         AC_ARG_WITH(gnutls-libs,
1717                 [AC_HELP_STRING([--with-gnutls-libs=PREFIX], [location of GnuTLS libraries.])],
1718                 [ with_gnutls_libs="$withval" ])
1720         if test "x$with_gnutls_libs"     != "xno" -a \
1721                 "x$have_gnutls_includes" != "xno"; then
1723                 LIBS_save="$LIBS"
1725                 case $with_gnutls_libs in
1726                         ""|-L*) ;;
1727                         *) with_gnutls_libs="-L$with_gnutls_libs" ;;
1728                 esac
1730                 AC_CACHE_CHECK([for GnuTLS libraries], ac_cv_gnutls_libs,
1731                 [
1732                         LIBS="$LIBS $with_gnutls_libs -lgnutls -lgcrypt"
1733                         AC_TRY_LINK_FUNC(gnutls_init, ac_cv_gnutls_libs="yes", ac_cv_gnutls_libs="no")
1734                         LIBS="$LIBS_save"
1735                 ])
1737                 if test "x$ac_cv_gnutls_libs" != "xno"; then
1738                         AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GnuTLS])
1739                         AC_DEFINE(HAVE_SSL)
1740                         msg_gnutls="GnuTLS"
1741                         GNUTLS_LIBS="$with_gnutls_libs -lgnutls -lgcrypt"
1743                         enable_gnutls="yes"
1744                 else
1745                         GNUTLS_CFLAGS=""
1746                         GNUTLS_LIBS=""
1747                 fi
1748         else
1749                 AC_MSG_CHECKING(for GnuTLS libraries)
1750                 AC_MSG_RESULT(no)
1751         fi
1752 else
1753         GNUTLS_CFLAGS=""
1754         GNUTLS_LIBS=""
1757 AC_SUBST(GNUTLS_CFLAGS)
1758 AC_SUBST(GNUTLS_LIBS)
1760 if test "x$enable_gnutls" = "xyes"; then
1761         AC_MSG_CHECKING(for gnutls_priority_set_direct)
1762         LIBS_save="$LIBS"
1763         LIBS="$LIBS $GNUTLS_LIBS"
1764         CPPFLAGS_save="$CPPFLAGS"
1765         CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
1766         AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
1767                                         [[gnutls_session s; gnutls_priority_set_direct(s, NULL, NULL);]])],
1768                        [AC_DEFINE([HAVE_GNUTLS_PRIORITY_FUNCS], 1,
1769                                   [Define if your gnutls has gnutls_priority_set_direct and friends])
1770                         AC_MSG_RESULT(yes)],
1771                        [AC_MSG_RESULT(no)])
1772         CPPFLAGS="$CPPFLAGS_save"
1773         LIBS="$LIBS_save"
1776 if test "x$enable_gnutls" = "xyes"; then
1777         AC_MSG_CHECKING(for GNUTLS_CERT_INSECURE_ALGORITHM)
1778         LIBS_save="$LIBS"
1779         LIBS="$LIBS $GNUTLS_LIBS"
1780         CPPFLAGS_save="$CPPFLAGS"
1781         CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
1782         AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
1783                                         [[unsigned int verify = GNUTLS_CERT_INSECURE_ALGORITHM;]])],
1784                        [AC_DEFINE([HAVE_GNUTLS_CERT_INSECURE_ALGORITHM], 1,
1785                                   [Define if your gnutls has the GNUTLS_CERT_INSECURE_ALGORITHM flag])
1786                         AC_MSG_RESULT(yes)],
1787                        [AC_MSG_RESULT(no)])
1788         CPPFLAGS="$CPPFLAGS_save"
1789         LIBS="$LIBS_save"
1793 AM_CONDITIONAL(USE_GNUTLS, test "x$enable_gnutls" = "xyes")
1796 dnl #
1797 dnl # Check for NSS if it's specified, or if GnuTLS checks failed.
1798 dnl #
1799 looked_for_nss="no"
1800 if test "x$enable_nss" != "xno"; then
1801         looked_for_nss="yes"
1803         AC_ARG_WITH(nspr-includes,
1804                 [AC_HELP_STRING([--with-nspr-includes=PREFIX], [specify location of Mozilla nspr4 includes.])],
1805                 [with_nspr_includes="$withval"])
1807         AC_ARG_WITH(nspr-libs,
1808                 [AC_HELP_STRING([--with-nspr-libs=PREFIX], [specify location of Mozilla nspr4 libs.])],
1809                 [with_nspr_libs="$withval"])
1811         AC_ARG_WITH(nss-includes,
1812                 [AC_HELP_STRING([--with-nss-includes=PREFIX], [specify location of Mozilla nss3 includes.])],
1813                 [with_nss_includes="$withval"])
1815         AC_ARG_WITH(nss-libs,
1816                 [AC_HELP_STRING([--with-nss-libs=PREFIX], [specify location of Mozilla nss3 libs.])],
1817                 [with_nss_libs="$withval"])
1820         if test -n "$with_nspr_includes" || test -n "$with_nspr_libs" || \
1821            test -n "$with_nss_includes"  || test -n "$with_nss_libs"  ||
1822            test "x$enable_nss" = "xstatic"; then
1824                 nss_manual_check="yes"
1825         else
1826                 nss_manual_check="no"
1827         fi
1829         enable_nss="no"
1831         if test "x$nss_manual_check" = "xno"; then
1832                 if `$PKG_CONFIG --exists mozilla-nss`; then
1833                         PKG_CHECK_MODULES(NSS, mozilla-nss, [
1834                                 have_nss="yes"
1835                         ], [
1836                                 AC_MSG_RESULT(no)
1837                                 have_nss="no"
1838                         ])
1839                         mozilla_nspr="mozilla-nspr"
1840                         mozilla_nss="mozilla-nss"
1841                 elif `$PKG_CONFIG --exists nss`; then
1842                         PKG_CHECK_MODULES(NSS, nss, [
1843                                 have_nss="yes"
1844                         ], [
1845                                 AC_MSG_RESULT(no)
1846                                 have_nss="no"
1847                         ])
1848                         mozilla_nspr="nspr"
1849                         mozilla_nss="nss"
1850                 elif `$PKG_CONFIG --exists microb-engine-nss`; then
1851                         PKG_CHECK_MODULES(NSS, microb-engine-nss, [
1852                                 have_nss="yes"
1853                         ], [
1854                                 AC_MSG_RESULT(no)
1855                                 have_nss="no"
1856                         ])
1857                         mozilla_nspr="mozilla-nspr"
1858                         mozilla_nss="microb-engine-nss"
1859                 fi
1861                 if test "x$have_nss" = "xyes"; then
1863                         AC_DEFINE(HAVE_NSS, 1, [Define if you have Mozilla NSS])
1864                         AC_DEFINE(HAVE_SSL, 1, [Define if you have SSL])
1866                         msg_nss="Mozilla NSS"
1867                         enable_nss="yes"
1868                 else
1869                         nss_manual_check="yes"
1870                 fi
1871         fi
1873         if test "x$nss_manual_check" = "xyes"; then
1874                 mozilla_nss=""
1875                 have_nspr_includes="no"
1877                 if test "x$with_nspr_includes" != "xno"; then
1878                         CPPFLAGS_save=$CPPFLAGS
1880                         AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)
1881                         AC_MSG_RESULT("")
1883                         CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
1884                         AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ])
1885                         CPPFLAGS=$CPPFLAGS_save
1887                         if test "x$moz_nspr_includes" != "xno" -a \
1888                                 "x$moz_nspr_includes" != "x"; then
1890                                 have_nspr_includes="yes"
1891                                 NSPR_CFLAGS="-I$with_nspr_includes"
1892                         fi
1893                 else
1894                         AC_MSG_CHECKING(for Mozilla nspr4 includes)
1895                         AC_MSG_RESULT(no)
1897                         enable_nss="no"
1898                 fi
1900                 have_nspr_libs="no"
1902                 if test "x$with_nspr_libs"     != "xno" -a \
1903                         "x$have_nspr_includes" != "xno"; then
1905                         CFLAGS_save=$CFLAGS
1906                         LDFLAGS_save=$LDFLAGS
1908                         if test "$enable_nss" = "static"; then
1909                                 if test -z "$with_nspr_libs"; then
1910                                         AC_MSG_ERROR(
1911                                                 [Static linkage requested, but path to nspr libraries not set.]
1912                                                 [Please specify the path to libnspr4.a]
1913                                                 [Example: --with-nspr-libs=/usr/lib])
1915                                         enable_nss="no"
1916                                 else
1917                                         nsprlibs="$LIBDL $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB"
1918                                 fi
1919                         else
1920                                 nsprlibs="$LIBDL -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
1921                         fi
1923                         AC_CACHE_CHECK([for Mozilla nspr libraries], ac_cv_moz_nspr_libs,
1924                         [
1925                                 LIBS_save=$LIBS
1926                                 CFLAGS="$CFLAGS $NSPR_CFLAGS"
1928                                 LIBS="$nsprlibs"
1930                                 if test "x$with_nspr_libs" != "x"; then
1931                                         LDFLAGS="$LDFLAGS -L$with_nspr_libs"
1932                                 else
1933                                         LDFLAGS="$LDFLAGS"
1934                                 fi
1936                                 AC_TRY_LINK_FUNC(PR_Init,
1937                                         [ac_cv_moz_nspr_libs="yes"],
1938                                         [ac_cv_moz_nspr_libs="no"])
1940                                 CFLAGS=$CFLAGS_save
1941                                 LDFLAGS=$LDFLAGS_save
1942                                 LIBS=$LIBS_save
1943                         ])
1945                         if test "x$ac_cv_moz_nspr_libs" != "xno"; then
1946                                 have_nspr_libs="yes"
1947                                 NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
1948                         else
1949                                 NSPR_CFLAGS=""
1950                                 enable_nss="no"
1951                         fi
1952                 else
1953                         AC_MSG_CHECKING(for Mozilla nspr4 libraries)
1954                         AC_MSG_RESULT(no)
1955                 fi
1957                 have_nss_includes="no"
1959                 if test "x$with_nss_includes" != "xno" -a \
1960                                 "x$have_nspr_libs"    != "xno"; then
1962                         CPPFLAGS_save=$CPPFLAGS
1964                         AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)
1965                         AC_MSG_RESULT("")
1967                         if test "x$with_nspr_includes" != "x"; then
1968                                 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
1969                         else
1970                                 CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
1971                         fi
1973                         AC_CHECK_HEADERS(nss.h ssl.h smime.h,
1974                                 [moz_nss_includes="yes"],
1975                                 [moz_nss_includes="no"])
1977                         CPPFLAGS=$CPPFLAGS_save
1979                         if test "x$moz_nss_includes" = "xyes"; then
1980                                 have_nss_includes="yes"
1981                                 NSS_CFLAGS="-I$with_nss_includes"
1982                         else
1983                                 NSPR_CFLAGS=""
1984                                 NSPR_LIBS=""
1985                                 enable_nss="no"
1986                         fi
1987                 else
1988                         AC_MSG_CHECKING(for Mozilla nss3 includes)
1989                         AC_MSG_RESULT(no)
1990                         enable_nss="no"
1991                 fi
1993                 if test "x$with_nss_libs"     != "xno" -a \
1994                                 "x$have_nss_includes" != "xno"; then
1996                         LDFLAGS_save=$LDFLAGS
1998                         if test "$enable_nss" = "static"; then
1999                                 if test -z "$with_nss_libs"; then
2000                                         AC_MSG_ERROR(
2001                                                 [Static linkage requested, but path to nss libraries not set.]
2002                                                 [Please specify the path to libnss3.a]
2003                                                 [Example: --with-nspr-libs=/usr/lib/mozilla])
2004                                         enable_nss="no"
2005                                 else
2006                                         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"
2008                                         case "$host" in
2009                                                 *solaris*)
2010                                                         nsslibs="$nsslibs $with_nss_libs/libfreeb1.a"
2011                                                         ;;
2012                                         esac
2013                                 fi
2014                         else
2015                                 nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
2016                         fi
2018                         AC_CACHE_CHECK([for Mozilla nss libraries], ac_cv_moz_nss_libs,
2019                         [
2020                                 LIBS_save=$LIBS
2021                                 LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
2022                                 LIBS="$nsslibs $nsprlibs"
2024                                 AC_TRY_LINK_FUNC(NSS_Init,
2025                                         [ac_cv_moz_nss_libs="yes"],
2026                                         [ac_cv_moz_nss_libs="no"])
2028                                 if test "x$ac_cv_moz_nss_libs" = "xno"; then
2029                                         nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
2030                                         LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
2031                                         LIBS="$LIBS $nsslibs"
2032                                         AC_TRY_LINK_FUNC(NSS_Init,
2033                                                 [ac_cv_moz_nss_libs="yes"],
2034                                                 [ac_cv_moz_nss_libs="no"])
2035                                 fi
2037                                 LDFLAGS=$LDFLAGS_save
2038                                 LIBS=$LIBS_save
2039                         ])
2041                         if test "x$ac_cv_moz_nss_libs" != "xno"; then
2042                                 AC_DEFINE(HAVE_NSS)
2043                                 AC_DEFINE(HAVE_SSL)
2045                                 NSS_LIBS="-L$with_nss_libs $nsslibs"
2047                                 if test "$enable_nss" = "static"; then
2048                                         msg_nss="Mozilla NSS (static)"
2049                                 else
2050                                         msg_nss="Mozilla NSS"
2051                                 fi
2053                                 enable_nss="yes"
2054                         else
2055                                 NSS_CFLAGS=""
2056                                 NSPR_CFLAGS=""
2057                                 NSPR_LIBS=""
2058                                 enable_nss="no"
2059                         fi
2060                 else
2061                         AC_MSG_CHECKING(for Mozilla nss libraries)
2062                         AC_MSG_RESULT(no)
2063                 fi
2065                 NSS_CFLAGS="$NSPR_CFLAGS $NSS_CFLAGS"
2066                 NSS_LIBS="$NSPR_LIBS $NSS_LIBS"
2067         fi
2069         AC_SUBST(NSS_CFLAGS)
2070         AC_SUBST(NSS_LIBS)
2073 AM_CONDITIONAL(USE_NSS, test "x$enable_nss" = "xyes")
2075 if test "x$msg_nss" != "x" -a "x$msg_gnutls" != "x"; then
2076         msg_ssl="$msg_nss and $msg_gnutls"
2077 elif test "x$msg_nss" != "x"; then
2078         msg_ssl=$msg_nss
2079 elif test "x$msg_gnutls" != "x"; then
2080         msg_ssl=$msg_gnutls
2081 elif test "x$looked_for_gnutls" = "xyes" -a "x$looked_for_nss" = "xyes" -a "x$force_deps" = "xyes" ; then
2082         AC_MSG_ERROR([
2083 Neither GnuTLS or NSS SSL development headers found.
2084 Use --disable-nss --disable-gnutls if you do not need SSL support.
2085 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!
2087 elif test "x$looked_for_gnutls" = "xyes" -a "x$force_deps" = "xyes" ; then
2088         AC_MSG_ERROR([
2089 GnuTLS SSL development headers not found.
2090 Use --disable-gnutls if you do not need SSL support.
2091 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without SSL support.
2093 elif test "x$looked_for_nss" = "xyes" -a "x$force_deps" = "xyes" ; then
2094         AC_MSG_ERROR([
2095 NSS SSL development headers not found.
2096 Use --disable-nss if you do not need SSL support.
2097 MSN, Yahoo!, Novell Groupwise and Google Talk will not work without SSL support.
2101 dnl #######################################################################
2102 dnl # Check for Tcl
2103 dnl #######################################################################
2104 AC_ARG_ENABLE(tcl, [AC_HELP_STRING([--disable-tcl],
2105         [compile without Tcl scripting])], enable_tcl="$enableval", enable_tcl="yes")
2106 AC_ARG_WITH(tclconfig, [AC_HELP_STRING([--with-tclconfig=DIR],
2107         [directory containing tclConfig.sh])])
2109 if test "$enable_plugins" = no; then
2110         enable_tcl=no
2113 if test "$enable_tcl" = yes; then
2114         AC_MSG_CHECKING([for tclConfig.sh])
2115         TCLCONFIG=no
2116         TCLCONFIGDIRS="/usr/lib \
2117                         /usr/lib64 \
2118                         /usr/lib/tcl8.5 \
2119                         /usr/lib/tcl8.4 \
2120                         /usr/lib/tcl8.3 \
2121                         /usr/lib/tcl8.2 \
2122                         /usr/lib64/tcl8.5 \
2123                         /usr/lib64/tcl8.4 \
2124                         /System/Library/Tcl/8.3 \
2125                         /usr/local/lib"
2126         for dir in $with_tclconfig $TCLCONFIGDIRS; do
2127                 if test -f $dir/tclConfig.sh; then
2128                         TCLCONFIG=$dir/tclConfig.sh
2129                         AC_MSG_RESULT([yes ($TCLCONFIG)])
2130                 fi
2131         done
2132         if test "$TCLCONFIG" = "no"; then
2133                 AC_MSG_RESULT([no])
2134                 enable_tcl=no
2135                 if test "x$force_deps" = "xyes" ; then
2136                         AC_MSG_ERROR([
2137 Tcl development headers not found.
2138 Use --disable-tcl if you do not need Tcl scripting support.
2140                 fi
2141         else
2142                 . $TCLCONFIG
2143                 AC_MSG_CHECKING([Tcl version compatability])
2144                 if test "$TCL_MAJOR_VERSION" -ne 8 -o "$TCL_MINOR_VERSION" -lt 3; then
2145                         AC_MSG_RESULT([bad, $TCL_VERSION found but 8.3 or later required])
2146                         enable_tcl=no
2147                 else
2148                         AC_MSG_RESULT([ok, $TCL_VERSION])
2149                         eval "TCL_LIB_SPEC=\"$TCL_LIB_SPEC\""
2150                         AC_MSG_CHECKING([for Tcl linkability])
2151                         oldCPPFLAGS=$CPPFLAGS
2152                         CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
2153                         oldLIBS=$LIBS
2154                         LIBS="$LIBS $TCL_LIB_SPEC"
2155                         AC_TRY_LINK([#include <tcl.h>],
2156                                 [Tcl_Interp *interp=NULL; Tcl_Init(interp)],
2157                                 [AC_MSG_RESULT([yes]);enable_tcl=yes],
2158                                 [AC_MSG_RESULT([no]);enable_tcl=no])
2159                         CPPFLAGS="$oldCPPFLAGS"
2160                         LIBS="$oldLIBS"
2161                 fi
2162         fi
2165 if test "$enable_tcl" = yes; then
2166         AM_CONDITIONAL(USE_TCL, true)
2167         TCL_LIBS=$TCL_LIB_SPEC
2168         AC_DEFINE(HAVE_TCL, [1], [Compile with support for the Tcl toolkit])
2169         AC_SUBST(TCL_LIBS)
2170         TCL_CFLAGS="$TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
2171         if test "x$GCC" = "xyes"; then
2172                 TCL_CFLAGS="$TCL_CFLAGS -fno-strict-aliasing"
2173         fi
2174         AC_SUBST(TCL_CFLAGS)
2175 else
2176         AM_CONDITIONAL(USE_TCL, false)
2179 dnl #######################################################################
2180 dnl # Check for Tk
2181 dnl #######################################################################
2182 AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk],
2183         [compile without Tcl support for Tk])], enable_tk="$enableval", enable_tk="yes")
2184 AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR],
2185         [directory containing tkConfig.sh])])
2187 if test "$enable_tcl" = yes -a "$enable_tk" = yes; then
2188         AC_MSG_CHECKING([for tkConfig.sh])
2189         TKCONFIG=no
2190         TKCONFIGDIRS="/usr/lib \
2191                         /usr/lib64 \
2192                         /usr/lib/tk8.4 \
2193                         /usr/lib/tk8.3 \
2194                         /usr/lib/tk8.2 \
2195                         /usr/local/lib"
2196         for dir in $with_tkconfig $TKCONFIGDIRS; do
2197                 if test -f $dir/tkConfig.sh; then
2198                         TKCONFIG=$dir/tkConfig.sh
2199                         AC_MSG_RESULT([yes ($TKCONFIG)])
2200                 fi
2201         done
2202         if test "$TKCONFIG" = "no"; then
2203                 AC_MSG_RESULT([no])
2204                 enable_tk=no
2205                 if test "x$force_deps" = "xyes" ; then
2206                         AC_MSG_ERROR([
2207 Tk development headers not found.
2208 Use --disable-tk if you do not need Tk scripting support.
2210                 fi
2211         else
2212                 . $TKCONFIG
2213                 eval "TK_LIB_SPEC=\"$TK_LIB_SPEC\""
2214                 AC_MSG_CHECKING([for Tk linkability])
2215                 oldCPPFLAGS=$CPPFLAGS
2216                 CPPFLAGS="$CPPFLAGS $TCL_CFLAGS"
2217                 oldLIBS=$LIBS
2218                 LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC"
2219                 AC_TRY_LINK([#include <tk.h>],
2220                                 [Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);],
2221                                 [AC_MSG_RESULT([yes]);enable_tk=yes],
2222                                 [AC_MSG_RESULT([no]);enable_tk=no])
2223                 CPPFLAGS="$oldCPPFLAGS"
2224                 LIBS="$oldLIBS"
2225         fi
2226 else
2227         enable_tk=no
2230 if test "$enable_tk" = yes; then
2231         AM_CONDITIONAL(USE_TK, true)
2232         AC_DEFINE(HAVE_TK, [1], [Compile with support for the Tk toolkit])
2233         TK_LIBS=$TK_LIB_SPEC
2234         AC_SUBST(TK_LIBS)
2235 else
2236         AM_CONDITIONAL(USE_TK, false)
2239 if test "$ac_cv_cygwin" = yes ; then
2240         LDADD="$LDADD -static"
2241         AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2244 AC_SUBST(DEBUG_CFLAGS)
2245 AC_SUBST(LDADD)
2246 AC_SUBST(LIBS)
2248 if test "x$enable_plugins" = "xyes" ; then
2249         AC_DEFINE(PURPLE_PLUGINS, 1, [Define if plugins are enabled.])
2250         AM_CONDITIONAL(PLUGINS, true)
2251         PLUGINS_DEFINE="#define PURPLE_PLUGINS 1"
2252 else
2253         AM_CONDITIONAL(PLUGINS, false)
2254         PLUGINS_DEFINE="#undef PURPLE_PLUGINS"
2256 AC_SUBST(PLUGINS_DEFINE)
2258 dnl #######################################################################
2259 dnl # Check for Cyrus-SASL (for Jabber)
2260 dnl #######################################################################
2261 dnl AC_CHECK_SIZEOF(short)
2262 AC_CHECK_FUNCS(snprintf connect)
2263 AC_SUBST(SASL_LIBS)
2264 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)
2265 if test "x$enable_cyrus_sasl" = "xyes" ; then
2266         AC_CHECK_LIB(sasl2, sasl_client_init, [
2267                         AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present])
2268                         SASL_LIBS=-"lsasl2"
2269                 ], [
2270                         AC_ERROR(Cyrus SASL library not found)
2271                 ])
2274 dnl #######################################################################
2275 dnl # Check for Kerberos (for Zephyr)
2276 dnl #######################################################################
2277 AC_DEFINE(ZEPHYR_INT32, long, [Size of an int32.])
2278 AC_SUBST(KRB4_CFLAGS)
2279 AC_SUBST(KRB4_LDFLAGS)
2280 AC_SUBST(KRB4_LIBS)
2281 if test "$kerberos" != "no" ; then
2282         if test "$kerberos" != "yes" ; then
2283                 KRB4_CFLAGS="-I${kerberos}/include"
2284                 if test -d "$kerberos/include/kerberosIV" ; then
2285                         KRB4_CFLAGS="$KRB4_CFLAGS -I${kerberos}/include/kerberosIV"
2286                 fi
2287                 KRB4_LDFLAGS="-L${kerberos}/lib"
2288         elif test -d /usr/local/include/kerberosIV ; then
2289                 KRB4_CFLAGS="-I/usr/local/include/kerberosIV"
2290         elif test -d /usr/include/kerberosIV ; then
2291                 KRB4_CFLAGS="-I/usr/include/kerberosIV"
2292         fi
2293         AC_DEFINE(ZEPHYR_USES_KERBEROS, 1, [Define if kerberos should be used in Zephyr.])
2295         orig_LDFLAGS="$LDFLAGS"
2296         LDFLAGS="$LDFLAGS $KRB4_LDFLAGS"
2297         AC_CHECK_LIB(krb4, krb_rd_req,
2298                         [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
2299                         [AC_CHECK_LIB(krb, krb_rd_req,
2300                                 [KRB4_LIBS="-lkrb -ldes"],
2301                                 [AC_ERROR(Kerberos 4 libraries not found)],
2302                                 -ldes)],
2303                         -ldes425 -lkrb5 -lk5crypto -lcom_err)
2304         orig_LIBS="$LIBS"
2305         LIBS="$LIBS $KRB4_LIBS"
2306         AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm)
2307         AC_CHECK_FUNCS(krb_get_err_text krb_log)
2308         LIBS="$orig_LIBS"
2309         LDFLAGS="$orig_LDFLAGS"
2312 dnl #######################################################################
2313 dnl # Check for external libzephyr
2314 dnl #######################################################################
2315 AC_SUBST(ZEPHYR_CFLAGS)
2316 AC_SUBST(ZEPHYR_LDFLAGS)
2317 AC_SUBST(ZEPHYR_LIBS)
2318 if test "$zephyr" != "no" ; then
2319         if test "$zephyr" != "yes" ; then
2320                 ZEPHYR_CFLAGS="-I${zephyr}/include"
2321                 ZEPHYR_LDFLAGS="-L${zephyr}/lib"
2322         elif test -d /usr/athena/include/zephyr ; then
2323                 ZEPHYR_CFLAGS="-I/usr/athena/include"
2324         elif test -d /usr/include/zephyr ; then
2325                 ZEPHYR_CFLAGS="-I/usr/include"
2326         elif test -d /usr/local/include/zephyr ; then
2327                 ZEPHYR_CFLAGS="-I/usr/local/include"
2328         fi
2329         AC_DEFINE(LIBZEPHYR_EXT, 1 , [Define if external libzephyr should be used.])
2330         AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
2331         orig_LDFLAGS="$LDFLAGS"
2332         LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS"
2333         AC_CHECK_LIB(zephyr, ZInitialize,
2334                 [ZEPHYR_LIBS="-lzephyr"],
2335                 [AC_ERROR(Zephyr libraries not found)],
2336                 -lzephyr)
2337         orig_LIBS="$LIBS"
2338         LIBS="$orig_LIBS"
2339         LDFLAGS="$orig_LDFLAGS"
2342 AC_MSG_CHECKING(for me pot o' gold)
2343 AC_MSG_RESULT(no)
2344 AC_CHECK_FUNCS(gethostid lrand48)
2345 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
2346 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
2347 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
2348 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
2349 AC_CHECK_HEADERS(termios.h)
2351 # sys/sysctl.h on OpenBSD 4.2 requires sys/param.h
2352 # sys/sysctl.h on FreeBSD requires sys/types.h
2353 AC_CHECK_HEADERS(sys/param.h)
2354 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
2355         [[
2356                 #include <sys/types.h>
2357                 #ifdef HAVE_PARAM_H
2358                 # include <sys/param.h>
2359                 #endif
2360         ]])
2362 AC_CHECK_HEADERS(sys/socket.h)
2363 AC_VAR_TIMEZONE_EXTERNALS
2365 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
2366         AC_TRY_COMPILE([
2367                 #include <time.h>
2368         ], [
2369                 struct tm tm;
2370                 tm.tm_gmtoff = 1;
2371         ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
2372 if test $ac_cv_struct_tm_gmtoff = yes; then
2373         AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
2376 AC_CACHE_CHECK([whether va_lists can be copied by value], ac_cv_va_val_copy,[
2377         AC_TRY_RUN([#include <stdarg.h>
2378 #include <stdlib.h>
2379         void f (int i, ...) {
2380         va_list args1, args2;
2381         va_start (args1, i);
2382         args2 = args1;
2383         if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
2384           exit (1);
2385         va_end (args1); va_end (args2);
2386         }
2387         int main() {
2388           f (0, 42);
2389           return 0;
2390         }],
2391         [ac_cv_va_val_copy=yes],
2392         [ac_cv_va_val_copy=no],
2393         [ac_cv_va_val_copy=yes])
2396 if test "x$ac_cv_va_val_copy" = "xno"; then
2397         AC_DEFINE(VA_COPY_AS_ARRAY, 1, ['va_lists' cannot be copied as values])
2400 dnl #######################################################################
2401 dnl # Check for check
2402 dnl #######################################################################
2403 PKG_CHECK_MODULES(CHECK, [check >= 0.9.4], , [AC_MSG_RESULT([no, testing is disabled])])
2404 AM_CONDITIONAL(HAVE_CHECK, [test "x$CHECK_LIBS" != "x"])
2405 AC_SUBST(CHECK_CFLAGS)
2406 AC_SUBST(CHECK_LIBS)
2408 dnl #######################################################################
2409 dnl # Disable pixmap installation
2410 dnl #######################################################################
2411 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)
2413 AM_CONDITIONAL(INSTALL_PIXMAPS, test "x$enable_pixmaps" = "xyes")
2415 dnl #######################################################################
2416 dnl # Disable installation of translation files
2417 dnl #######################################################################
2418 AC_ARG_ENABLE(nls, AC_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes)
2420 AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes")
2422 dnl #######################################################################
2423 dnl # Check for Doxygen and dot (part of GraphViz)
2424 dnl #######################################################################
2425 AC_ARG_ENABLE(doxygen,
2426         [AC_HELP_STRING([--disable-doxygen],
2427                 [disable documentation with doxygen])],
2428         enable_doxygen="$enableval", enable_doxygen="yes")
2429 AC_ARG_ENABLE(dot,
2430         [AC_HELP_STRING([--disable-dot],
2431                 [disable graphs in doxygen via 'dot'])],
2432         enable_dot="$enableval", enable_dot="yes")
2433 AC_ARG_ENABLE(devhelp,
2434         [AC_HELP_STRING([--disable-devhelp],
2435                 [disable building index for devhelp documentation browser])],
2436         enable_devhelp="$enableval", enable_devhelp="yes")
2438 if test "x$enable_doxygen" = xyes; then
2439         AC_CHECK_PROG(DOXYGEN, doxygen, true, false)
2440         if test $DOXYGEN = false; then
2441                 AC_MSG_WARN([*** Doxygen not found, docs will not be available])
2442                 enable_doxygen="no"
2443         else
2444                 AC_DEFINE_UNQUOTED(HAVE_DOXYGEN, 1, [whether or not we have doxygen])
2446                 if test "x$enable_dot" = "xyes"; then
2447                         AC_CHECK_PROG(DOT, dot, true, false)
2449                         if test $DOT = false; then
2450                                 enable_dot="no";
2451                                 AC_MSG_WARN([*** GraphViz dot not found, docs will not have graphs])
2452                         else
2453                                 AC_DEFINE_UNQUOTED(HAVE_DOT, 1, [whether or not we have dot])
2454                         fi
2455                 fi
2457                 if test "x$enable_devhelp" = "xyes"; then
2458                         AC_CHECK_PROG(XSLTPROC, xsltproc, true, false)
2460                         if test $XSLTPROC = false; then
2461                                 enable_devhelp="no";
2462                                 AC_MSG_WARN([*** xsltproc not found; devhelp index will not be created])
2463                         else
2464                                 AC_DEFINE_UNQUOTED(HAVE_XSLTPROC, 1, [whether or not we have xsltproc for devhelp index])
2465                         fi
2466                 fi
2467         fi
2468 else
2469         enable_dot="no"
2470         enable_devhelp="no"
2473 AC_SUBST(enable_doxygen)
2474 AC_SUBST(enable_dot)
2475 AC_SUBST(enable_devhelp)
2476 AM_CONDITIONAL(HAVE_DOXYGEN, test "x$enable_doxygen" = "xyes")
2477 AM_CONDITIONAL(HAVE_XSLTPROC, test "x$enable_devhelp" = "xyes")
2479 AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],
2480         [compile with debugging support])], , enable_debug=no)
2482 if test "x$enable_debug" = "xyes" ; then
2483         AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2486 AM_CONDITIONAL(PURPLE_AVAILABLE, true)
2488 AC_OUTPUT([Makefile
2489                    Doxyfile
2490                    doc/Makefile
2491                    doc/pidgin.1
2492                    doc/finch.1
2493                    m4macros/Makefile
2494                    pidgin.apspec
2495                    pidgin/Makefile
2496                    pidgin/pidgin.pc
2497                    pidgin/pidgin-uninstalled.pc
2498                    pidgin/pixmaps/Makefile
2499                    pidgin/pixmaps/emotes/default/24/Makefile
2500                    pidgin/pixmaps/emotes/none/Makefile
2501                    pidgin/pixmaps/emotes/small/16/Makefile
2502                    pidgin/plugins/Makefile
2503                    pidgin/plugins/cap/Makefile
2504                    pidgin/plugins/disco/Makefile
2505                    pidgin/plugins/gestures/Makefile
2506                    pidgin/plugins/gevolution/Makefile
2507                    pidgin/plugins/musicmessaging/Makefile
2508                    pidgin/plugins/perl/Makefile
2509                    pidgin/plugins/perl/common/Makefile.PL
2510                    pidgin/plugins/ticker/Makefile
2511                    libpurple/example/Makefile
2512                    libpurple/gconf/Makefile
2513                    libpurple/purple.pc
2514                    libpurple/purple-uninstalled.pc
2515                    libpurple/plugins/Makefile
2516                    libpurple/plugins/mono/Makefile
2517                    libpurple/plugins/mono/api/Makefile
2518                    libpurple/plugins/mono/loader/Makefile
2519                    libpurple/plugins/perl/Makefile
2520                    libpurple/plugins/perl/common/Makefile.PL
2521                    libpurple/plugins/ssl/Makefile
2522                    libpurple/plugins/tcl/Makefile
2523                    libpurple/Makefile
2524                    libpurple/protocols/Makefile
2525                    libpurple/protocols/bonjour/Makefile
2526                    libpurple/protocols/gg/Makefile
2527                    libpurple/protocols/irc/Makefile
2528                    libpurple/protocols/jabber/Makefile
2529                    libpurple/protocols/msn/Makefile
2530                    libpurple/protocols/msnp9/Makefile
2531                    libpurple/protocols/myspace/Makefile
2532                    libpurple/protocols/novell/Makefile
2533                    libpurple/protocols/null/Makefile
2534                    libpurple/protocols/oscar/Makefile
2535                    libpurple/protocols/qq/Makefile
2536                    libpurple/protocols/sametime/Makefile
2537                    libpurple/protocols/silc/Makefile
2538                    libpurple/protocols/silc10/Makefile
2539                    libpurple/protocols/simple/Makefile
2540                    libpurple/protocols/yahoo/Makefile
2541                    libpurple/protocols/zephyr/Makefile
2542                    libpurple/tests/Makefile
2543                    libpurple/purple.h
2544                    libpurple/version.h
2545                    share/sounds/Makefile
2546                    share/ca-certs/Makefile
2547                    finch/finch.pc
2548                    finch/Makefile
2549                    finch/libgnt/Makefile
2550                    finch/libgnt/gnt.pc
2551                    finch/libgnt/wms/Makefile
2552                    finch/plugins/Makefile
2553                    po/Makefile.in
2554                    pidgin.spec
2555                   ])
2557 echo
2558 echo $PACKAGE $VERSION
2560 echo
2561 echo Build GTK+ 2.x UI............. : $enable_gtkui
2562 echo Build console UI.............. : $enable_consoleui
2563 echo Build for X11................. : $with_x
2564 echo
2565 echo Enable Gestures............... : $enable_gestures
2566 echo Protocols to build dynamically : $DYNAMIC_PRPLS
2567 echo Protocols to link statically.. : $STATIC_PRPLS
2568 echo
2569 echo Build with GStreamer support.. : $enable_gst
2570 echo Build with D-Bus support...... : $enable_dbus
2571 echo Build with voice and video.... : $enable_vv
2572 if test "x$enable_dbus" = "xyes" ; then
2573         eval eval echo D-Bus services directory...... : $DBUS_SERVICES_DIR
2575 echo Build with GNU Libidn......... : $enable_idn
2576 echo Build with NetworkManager..... : $enable_nm
2577 echo SSL Library/Libraries......... : $msg_ssl
2578 if test "x$SSL_CERTIFICATES_DIR" != "x" ; then
2579         eval eval echo SSL CA certificates directory. : $SSL_CERTIFICATES_DIR
2581 echo Build with Cyrus SASL support. : $enable_cyrus_sasl
2582 echo Use kerberos 4 with zephyr.... : $kerberos
2583 echo Use external libzephyr........ : $zephyr
2584 echo Install pixmaps............... : $enable_pixmaps
2585 echo Install translations.......... : $enable_i18n
2586 echo Has you....................... : yes
2587 echo
2588 echo Use XScreenSaver Extension.... : $enable_screensaver
2589 echo Use X Session Management...... : $enable_sm
2590 echo Use startup notification...... : $enable_startup_notification
2591 echo Build with GtkSpell support... : $enable_gtkspell
2592 echo
2593 echo Build with plugin support..... : $enable_plugins
2594 echo Build with Mono support....... : $enable_mono
2595 echo Build with Perl support....... : $enable_perl
2596 echo Build with Tcl support........ : $enable_tcl
2597 echo Build with Tk support......... : $enable_tk
2598 echo
2599 echo Print debugging messages...... : $enable_debug
2600 echo
2601 eval eval echo Pidgin will be installed in $bindir.
2602 if test "x$pidginpath" != "x" ; then
2603         echo Warning: You have an old copy of Pidgin at $pidginpath.
2605 if test "x$enable_pixmaps" = "xno" ; then
2606         echo
2607         echo Warning: You have disabled the installation of pixmap data, but Pidgin
2608         echo still requires installed pixmaps.  Be sure you know what you\'re doing.
2610 echo
2611 echo configure complete, now type \'make\'
2612 echo