merge of '082cb6577e6dede908826bc73a512645071673fe'
[pidgin-git.git] / configure.ac
blob672f4d755f275299807337e08a31c58073826449
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], [0])
47 m4_define([purple_major_version], [2])
48 m4_define([purple_minor_version], [0])
49 m4_define([purple_micro_version], [0])
50 m4_define([purple_version_suffix], [beta7])
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], [0])
56 m4_define([gnt_major_version], [1])
57 m4_define([gnt_minor_version], [0])
58 m4_define([gnt_micro_version], [0])
59 m4_define([gnt_version_suffix], [beta7])
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 AC_CANONICAL_SYSTEM
68 AM_CONFIG_HEADER(config.h)
69 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
70 #AM_INIT_AUTOMAKE([foreign dist-bzip2])
72 PURPLE_MAJOR_VERSION=purple_major_version
73 PURPLE_MINOR_VERSION=purple_minor_version
74 PURPLE_MICRO_VERSION=purple_micro_version
75 PURPLE_VERSION=[purple_display_version]
76 AC_SUBST(PURPLE_MAJOR_VERSION)
77 AC_SUBST(PURPLE_MINOR_VERSION)
78 AC_SUBST(PURPLE_MICRO_VERSION)
79 AC_SUBST(PURPLE_VERSION)
81 PURPLE_LT_VERSION_INFO="purple_lt_current:purple_micro_version:purple_minor_version"
82 AC_SUBST(PURPLE_LT_VERSION_INFO)
84 GNT_MAJOR_VERSION=gnt_major_version
85 GNT_MINOR_VERSION=gnt_minor_version
86 GNT_MICRO_VERSION=gnt_micro_version
87 GNT_VERSION=[gnt_display_version]
88 AC_SUBST(GNT_MAJOR_VERSION)
89 AC_SUBST(GNT_MINOR_VERSION)
90 AC_SUBST(GNT_MICRO_VERSION)
91 AC_SUBST(GNT_VERSION)
93 GNT_LT_VERSION_INFO="gnt_lt_current:gnt_micro_version:gnt_minor_version"
94 AC_SUBST(GNT_LT_VERSION_INFO)
96 AC_DEFINE(PIDGIN_NAME, "Pidgin", [The user-visible application name])
98 AC_PATH_PROG(sedpath, sed)
100 dnl Storing configure arguments
101 AC_DEFINE_UNQUOTED(CONFIG_ARGS, "$ac_configure_args", [configure arguments])
103 dnl Checks for programs.
104 AC_PROG_CC
105 AC_DISABLE_STATIC
106 AM_PROG_LIBTOOL
107 LIBTOOL="$LIBTOOL --silent"
108 AC_PROG_INSTALL
109 AC_PROG_INTLTOOL
110 PKG_PROG_PKG_CONFIG
112 GETTEXT_PACKAGE=pidgin
113 AC_SUBST(GETTEXT_PACKAGE)
116 # before gettexting, in case iconv matters
117 case "$host_os" in
118 darwin*)
119         AC_CHECK_LIB(resolv, res_query)
121         AC_CHECK_HEADER(CoreFoundation/CoreFoundation.h, [
122                 AC_CHECK_HEADER(IOKit/IOKitLib.h, [
123                         AC_DEFINE(HAVE_IOKIT, 1, [Define if we have IOKit])
124                         LIBS="$LIBS -framework IOKit -framework CoreFoundation"
125                 ], [])
126         ], [])
128         AC_MSG_CHECKING([for fink])
129         if test -d /sw; then
130                 AC_MSG_RESULT([found, adding /sw to search paths])
131                 CPPFLAGS="$CPPFLAGS -I/sw/include"
132                 LDFLAGS="$LDFLAGS -L/sw/lib"
133         else
134                 AC_MSG_RESULT([not found])
135         fi
136         ;;
138         ;;
139 esac
141 ALL_LINGUAS="af am ar az bg bn bs ca ca@valencia cs da de dz el en_AU en_CA en_GB eo es et eu fa fi fr gl gu he hi hu id it ja ka kn ko ku lt mk my_MM nb ne nl nn pa pl pt_BR pt ps ro ru sk sl sq sr sr@Latn sv ta te th tr uk vi xh zh_CN zh_HK zh_TW"
142 AM_GLIB_GNU_GETTEXT
144 dnl we don't use autobreak on cygwin!!
145 dnl AC_CYGWIN
147 dnl Checks for header files.
148 AC_HEADER_STDC
149 AC_HEADER_SYS_WAIT
150 AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h)
152 dnl Checks for typedefs, structures, and compiler characteristics.
153 AC_C_CONST
154 AC_STRUCT_TM
155 AC_CHECK_SIZEOF(time_t, ,[
156 #include <stdio.h>
157 #include <time.h>])
159 AC_C_BIGENDIAN
161 dnl Checks for library functions.
162 AC_TYPE_SIGNAL
163 AC_FUNC_STRFTIME
164 AC_CHECK_FUNCS(strdup strstr atexit setlocale)
165 dnl Checks for getopt in standard library
166 AC_CHECK_FUNCS(getopt_long,,
168         AC_LIBOBJ(getopt)
169         AC_LIBOBJ(getopt1)
172 dnl Check for inet_aton
173 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
174                                          [AC_ERROR(inet_aton not found)])])
175 AC_CHECK_LIB(resolv, __res_query)
176 AC_CHECK_LIB(nsl, gethostent)
177 AC_CHECK_FUNC(socket, ,
178         [AC_CHECK_LIB(socket, socket, , [AC_ERROR([socket not found])])])
179 dnl If all goes well, by this point the previous two checks will have
180 dnl pulled in -lsocket and -lnsl if we need them.
181 AC_CHECK_FUNC(getaddrinfo,
182         [AC_DEFINE([HAVE_GETADDRINFO], [1],
183                 [Define to 1 if you have the getaddrinfo function.])],
184         [AC_CHECK_LIB(socket, getaddrinfo,
185                 [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)])
187 dnl Check for socklen_t (in Unix98)
188 AC_MSG_CHECKING(for socklen_t)
189 AC_TRY_COMPILE([
190         #include <sys/types.h>
191         #include <sys/socket.h>
192         socklen_t x;
193 ], [],
195         AC_MSG_RESULT(yes)
196 ], [
197         AC_TRY_COMPILE([
198                 #include <sys/types.h>
199                 #include <sys/socket.h>
200                 int accept(int, struct sockaddr *, size_t *);
201         ], [], [
202                 AC_MSG_RESULT(size_t)
203                 AC_DEFINE(socklen_t, size_t, [socklen_t size])
204         ], [
205                 AC_MSG_RESULT(int)
206                 AC_DEFINE(socklen_t, int, [socklen_t size])
207         ])
210 dnl to prevent the g_stat()/g_unlink() crash,
211 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
212 AC_SYS_LARGEFILE
214 dnl FreeBSD doesn't have libdl, dlopen is provided by libc
215 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
217 AC_MSG_CHECKING(for the %z format string in strftime())
218 AC_TRY_RUN([
219 #ifdef HAVE_SYS_TIME_H
220 #include <sys/time.h>
221 #endif
222 #include <time.h>
223 #include <stdio.h>
225 int main()
227         char buf[6];
228         time_t t = time(NULL);
230         if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5)
231                 return 1;
233         fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf);
235         return !((buf[0] == '-' || buf[0] == '+') &&
236                  (buf[1] >= '0' && buf[1] <= '9') &&
237                  (buf[2] >= '0' && buf[2] <= '9') &&
238                  (buf[3] >= '0' && buf[3] <= '9') &&
239                  (buf[4] >= '0' && buf[4] <= '9')
240                 );
242 ], [
243         AC_MSG_RESULT(yes)
244         AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
245                 [Define to 1 if you have a strftime() that supports the %z format string.])
246 ], [
247         AC_MSG_RESULT(no)
248 ], [
249         # Fallback for Cross Compiling...
250         # This will enable the compatibility code.
251         AC_MSG_RESULT(no)
255 dnl #######################################################################
256 dnl # Check for GLib 2.0 (required)
257 dnl #######################################################################
258 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.0 gobject-2.0 gmodule-2.0 gthread-2.0], , [
259         AC_MSG_RESULT(no)
260         AC_MSG_ERROR([
262 You must have the GLib 2.0 development headers installed to build.
263 ])])
264 AC_SUBST(GLIB_CFLAGS)
265 AC_SUBST(GLIB_LIBS)
267 AC_ARG_ENABLE(gtkui, [AC_HELP_STRING([--disable-gtkui],
268                 [compile without GTK+ user interface])],
269         enable_gtkui="$enableval", enable_gtkui="yes")
270 AC_ARG_ENABLE(consoleui, [AC_HELP_STRING([--disable-consoleui],
271                 [compile without console user interface])],
272         enable_consoleui=$enableval, enable_consoleui=yes)
274 dnl #######################################################################
275 dnl # Check for GTK+ 2.0 and other things used by the GTK UI
276 dnl #######################################################################
277 AC_ARG_ENABLE(screensaver,
278         [AC_HELP_STRING([--disable-screensaver],
279                 [compile without X screensaver extension (used to detect idleness)])],
280         enable_screensaver="$enableval", enable_screensaver="yes")
281 AC_ARG_ENABLE(sm,
282         [AC_HELP_STRING([--disable-sm],
283                 [compile without X session management support])],
284         enable_sm="$enableval", enable_sm="yes")
285 AC_ARG_ENABLE(startup-notification,
286         [AC_HELP_STRING([--disable-startup-notification],
287                 [compile without startup notification support])],
288         enable_startup_notification="$enableval", enable_startup_notification="yes")
289 AC_ARG_ENABLE(gtkspell,
290         [AC_HELP_STRING([--disable-gtkspell],
291                 [compile without GtkSpell automatic spell checking])],
292         enable_gtkspell="$enableval", enable_gtkspell="yes")
293 AC_ARG_ENABLE(gevolution,
294         [AC_HELP_STRING([--disable-gevolution],
295                 [compile without the Evolution plugin])],
296         enable_gevolution="$enableval", enable_gevolution="yes")
297 AC_ARG_ENABLE(cap,
298         [AC_HELP_STRING([--disable-cap],
299                 [compile without Contact Availability Prediction plugin])],
300         enable_cap="$enableval", enable_cap="yes")
303 AC_PATH_XTRA
304 # We can't assume that $x_libraries will be set, because autoconf does not
305 # set it in the case when the X libraries are in a standard place.
306 # Ditto for $x_includes
307 if test X"$x_libraries" = X"" || test X"$x_libraries" = XNONE; then
308     x_libpath_add=
309 else
310     x_libpath_add="-L$x_libraries"
312 if test X"$x_includes" = X"" || test X"$x_includes" = XNONE; then
313     x_incpath_add=
314 else
315     x_incpath_add="-I$x_includes"
318 if test "x$enable_gtkui" = "xyes" ; then
319         PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.0.0], , [
320                 AC_MSG_RESULT(no)
321                 AC_MSG_ERROR([
323 You must have the GTK+ 2.0 development headers installed to compile Pidgin.
324 If you only want to build Finch then specify --disable-gtkui when running configure.
325 ])])
327         AC_SUBST(GTK_CFLAGS)
328         AC_SUBST(GTK_LIBS)
330         dnl We only really need Pango >= 1.4 for decent RTL support
331         PKG_CHECK_MODULES(pango, [pango >= 1.4.0],
332                         AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:)
334         dnl #######################################################################
335         dnl # Check for XScreenSaver
336         dnl #######################################################################
337         if test "x$enable_screensaver" = "xyes" ; then
338                 old_LIBS="$LIBS"
339                 LIBS="$LIBS $GTK_LIBS $x_libpath_add"
340                 XSS_LIBS=""
341                 XSS_HEADERS=""
342                 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm])
343                 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm])
344                 if test "x$XSS_LIBS" != "x"; then
345                         oldCPPFLAGS="$CPPFLAGS"
346                         CPPFLAGS="$CPPFLAGS $x_incpath_add"
347                         AC_TRY_COMPILE([
348                                         #include <X11/Xlib.h>
349                                         #include <X11/extensions/scrnsaver.h>
350                                 ], [], [], [enable_screensaver=no])
351                         CPPFLAGS="$oldCPPFLAGS"
352                 else
353                         enable_screensaver=no
354                 fi
355                 LIBS="$old_LIBS"
357                 if test "x$enable_screensaver" = "xyes" ; then
358                         AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])
359                         AC_SUBST(XSS_LIBS)
360                 fi
361         fi
363         dnl #######################################################################
364         dnl # Check for X session management libs
365         dnl #######################################################################
366         if test "x$enable_sm" = "xyes"; then
367                 enable_sm=no
368                 AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE])
369                 if test "x$found_sm_lib" = "xtrue"; then
370                         oldCPPFLAGS="$CPPFLAGS"
371                         CPPFLAGS="$CPPFLAGS $x_incpath_add"
372                         AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes)
373                         CPPFLAGS="$oldCPPFLAGS"
374                 fi
376                 if test "x$enable_sm" = "xyes"; then
377                         AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.])
378                         AC_SUBST(SM_LIBS)
379                 fi
380         fi
382         dnl #######################################################################
383         dnl # Check for startup notification
384         dnl #######################################################################
385         if test "x$enable_startup_notification" = "xyes"; then
386                 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, [libstartup-notification-1.0 >= 0.5], , [
387                         AC_MSG_RESULT(no)
388                         enable_startup_notification=no
389                 ])
391                 if test "x$enable_startup_notification" = "xyes"; then
392                         AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
393                         AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
394                         AC_SUBST(STARTUP_NOTIFICATION_LIBS)
395                 fi
396         fi
398         dnl #######################################################################
399         dnl # Check for GtkSpell
400         dnl #######################################################################
401         if test "x$enable_gtkspell" = "xyes" ; then
402                 PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , [
403                         AC_MSG_RESULT(no)
404                         enable_gtkspell=no
405                 ])
406                 if test "x$enable_gtkspell" = "xyes" ; then
407                         AC_DEFINE(USE_GTKSPELL, 1, [Define if we're using GtkSpell])
408                         AC_SUBST(GTKSPELL_CFLAGS)
409                         AC_SUBST(GTKSPELL_LIBS)
410                 fi
411         fi
413         dnl #######################################################################
414         dnl # Check for stuff needed by the Evolution integration plugin.
415         dnl #######################################################################
416         if test "x$enable_gevolution" = "xyes"; then
417                 evo_deps="libebook-1.2 libedata-book-1.2"
418                 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, , [
419                         AC_MSG_RESULT(yes)
420                         enable_gevolution="no"
421                 ])
422                 if test "x$enable_gevolution" = "xno"; then
423                         evo_deps="libebook-1.0 libedata-book-1.0"
424                         PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [
425                                 enable_gevolution="yes"
426                         ], [
427                                 AC_MSG_RESULT(yes)
428                         ])
429                 fi
430                 if test "x$enable_gevolution" = "xyes"; then
431                         AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.])
432                         AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
433                         AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
434                 fi
435         fi
437         dnl #######################################################################
438         dnl # Check for libsqlite3 (for the Contact Availability Prediction plugin)
439         dnl #######################################################################
440         if test "x$enable_cap" = "xyes"; then
441                 PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[
442                                                                                                         AC_MSG_RESULT(no)
443                                                                                                         enable_cap="no"
444                                                                                                         ])
445         fi
447 else # GTK
448         enable_cap=no
449         enable_gevolution=no
450         enable_gtkspell=no
451         enable_screensaver=no
452         enable_sm=no
453         enable_startup_notification=no
454 fi      # GTK
456 AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtkui" = "xyes")
457 AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$enable_gevolution" = "xyes")
458 AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes")
460 dnl #######################################################################
461 dnl # Check for ncurses and other things used by the console UI
462 dnl #######################################################################
463 GNT_LIBS=""
464 GNT_CFLAGS=""
465 AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR],
466                 [compile finch against the ncurses includes in DIR])],
467                 [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""])
468 if test "x$enable_consoleui" = "xyes"; then
469         AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no])
470         AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_consoleui=no])
472         if test "x$enable_consoleui" = "xyes"; then
473                 dnl # Some distros put the headers in ncursesw/, some don't
474                 found_ncurses_h=no
475                 for location in $ac_ncurses_includes $NCURSES_HEADERS /usr/include/ncursesw /usr/include
476                 do
477                         f="$location/ncurses.h"
478                         AC_CHECK_HEADER($f,[
479                                 AC_MSG_CHECKING([if $f supports wide characters])
480                                 AC_TRY_COMPILE([
481                                         #define _XOPEN_SOURCE_EXTENDED
482                                         #include <$f>
483                                 ], [
484                                         #ifndef get_wch
485                                         # error get_wch not found!
486                                         #endif
487                                 ], [
488                                         dir=$location
489                                         if test x"$dir" != x"." ; then
490                                                 GNT_CFLAGS="-I$dir/"
491                                         else
492                                                 GNT_CFLAGS=""
493                                         fi
495                                         found_ncurses_h=yes
496                                         AC_MSG_RESULT([yes])
497                                         break
498                                 ], [
499                                         AC_MSG_RESULT([no])
500                                 ])
501                         ])
502                 done
504                 if test x"$found_ncurses_h" = x"no" ; then
505                         GNT_LIBS=""
506                         GNT_CFLAGS=""
507                         enable_consoleui=no
508                 fi
509         else
510                 # ncursesw was not found. Look for plain old ncurses
511                 enable_consoleui=yes
512                 AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no])
513                 AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"], [enable_consoleui=no])
514                 AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.])
515                 if test x"$ac_ncurses_includes" != "x"; then
516                         GNT_CFLAGS="-I$ac_ncurses_includes"
517                 else
518                         if test x"$NCURSES_HEADERS" != "x"; then
519                                 GNT_CFLAGS="-I$NCURSES_HEADERS"
520                         fi
521                 fi
522         fi
524         PKG_CHECK_MODULES(X11, x11,
525                 [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])], [AC_MSG_RESULT(no)])
526         AC_SUBST(X11_LIBS)
527         AC_SUBST(X11_CFLAGS)
530 AC_SUBST(GNT_LIBS)
531 AC_SUBST(GNT_CFLAGS)
532 AM_CONDITIONAL(ENABLE_GNT, test "x$enable_consoleui" = "xyes")
534 #AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])])
536 dnl #######################################################################
537 dnl # Check for LibXML2 (required)
538 dnl #######################################################################
539 PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= 2.6.0], , [
540         AC_MSG_RESULT(no)
541         AC_MSG_ERROR([
543 You must have libxml2 >= 2.6.0 development headers installed to build.
544 ])])
545 AC_SUBST(LIBXML_CFLAGS)
546 AC_SUBST(LIBXML_LIBS)
548 dnl #######################################################################
549 dnl # GConf schemas
550 dnl #######################################################################
551 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
552 AM_CONDITIONAL(USE_GCONFTOOL, test "x$GCONFTOOL" != "xno")
553 AM_GCONF_SOURCE_2
555 dnl #######################################################################
556 dnl # Check for GStreamer
557 dnl #######################################################################
558 AC_ARG_ENABLE(gstreamer,
559         [AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
560         enable_gst="$enableval", enable_gst="yes")
561 PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], , [
562         AC_MSG_RESULT(no)
563         enable_gst="no"
565 if test "x$enable_gst" != "xno"; then
566         AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
567         AC_SUBST(GSTREAMER_CFLAGS)
568         AC_SUBST(GSTREAMER_LIBS)
571 dnl #######################################################################
572 dnl # Check for Meanwhile headers (for Sametime)
573 dnl #######################################################################
574 PKG_CHECK_MODULES(MEANWHILE, [meanwhile >= 1.0.0 meanwhile < 2.0.0], [
575         have_meanwhile="yes"
576 ], [
577         AC_MSG_RESULT(no)
578         have_meanwhile="no"
580 AC_SUBST(MEANWHILE_CFLAGS)
581 AC_SUBST(MEANWHILE_LIBS)
583 dnl #######################################################################
584 dnl # Check for Howl headers (for Bonjour)
585 dnl #######################################################################
586 AC_ARG_WITH(howl-includes, [AC_HELP_STRING([--with-howl-includes=DIR], [compile the Bonjour plugin against the Howl includes in DIR])], [ac_howl_includes="$withval"], [ac_howl_includes="no"])
587 AC_ARG_WITH(howl-libs, [AC_HELP_STRING([--with-howl-libs=DIR], [compile the Bonjour plugin against the Howl libs in DIR])], [ac_howl_libs="$withval"], [ac_howl_libs="no"])
588 HOWL_CFLAGS=""
589 HOWL_LIBS=""
591 dnl Attempt to autodetect avahi-compat-howl
592 PKG_CHECK_MODULES(HOWL, avahi-compat-howl, [
593         howlincludes="yes"
594         howllibs="yes"
595 ], [
596         AC_MSG_RESULT(no)
597         howlincludes="no"
598         howllibs="no"
601 dnl Attempt to autodetect Howl
602 if test "x$howlincludes" = "xno"; then
603         PKG_CHECK_MODULES(HOWL, howl, [
604                 howlincludes="yes"
605                 howllibs="yes"
606         ], [
607                 AC_MSG_RESULT(no)
608                 howlincludes="no"
609                 howllibs="no"
610         ])
613 dnl Override HOWL_CFLAGS if the user specified an include dir
614 if test "$ac_howl_includes" != "no"; then
615         HOWL_CFLAGS="-I$ac_howl_includes"
617 CPPFLAGS_save="$CPPFLAGS"
618 CPPFLAGS="$CPPFLAGS $HOWL_CFLAGS"
619 AC_CHECK_HEADER(howl.h, [howlincludes=yes], [howlincludes=no])
620 CPPFLAGS="$CPPFLAGS_save"
622 dnl Override HOWL_LIBS if the user specified a libs dir
623 if test "$ac_howl_libs" != "no"; then
624         HOWL_LIBS="-L$ac_howl_libs -lhowl"
626 AC_CHECK_LIB(howl, sw_discovery_init, [howllibs=yes], [howllibs=no], $HOWL_LIBS)
628 AC_SUBST(HOWL_CFLAGS)
629 AC_SUBST(HOWL_LIBS)
631 dnl #######################################################################
632 dnl # Check for SILC client includes and libraries
633 dnl #######################################################################
634 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"])
635 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"])
636 SILC_CFLAGS=""
637 SILC_LIBS=""
638 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
639         silc_manual_check="yes"
640 else
641         silc_manual_check="no"
643 if test "x$silc_manual_check" = "xno"; then
644         PKG_CHECK_MODULES(SILC, silcclient, [
645                 have_silc="yes"
646                 silcincludes="yes"
647                 silcclient="yes"
648         ], [
649                 AC_MSG_RESULT(no)
650                 have_silc="no"
651         ])
652         dnl If silcclient.pc wasn't found, check for just silc.pc
653         if test "x$have_silc" = "xno"; then
654                 PKG_CHECK_MODULES(SILC, silc, [
655                         have_silc="yes"
656                         silcincludes="yes"
657                         silcclient="yes"
658                 ], [
659                         AC_MSG_RESULT(no)
660                         have_silc="no"
661                 ])
662         fi
663 else
664         if test "$ac_silc_includes" != "no"; then
665                 SILC_CFLAGS="-I$ac_silc_includes"
666         fi
667         CPPFLAGS_save="$CPPFLAGS"
668         CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
669         AC_CHECK_HEADER(silcincludes.h, [silcincludes=yes])
670         CPPFLAGS="$CPPFLAGS_save"
672         if test "$ac_silc_libs" != "no"; then
673                 SILC_LIBS="-L$ac_silc_libs"
674         fi
675         SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
676         AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS)
678 AC_SUBST(SILC_LIBS)
679 AC_SUBST(SILC_CFLAGS)
680 dnl SILC Toolkit >= 1.0.1 has a new MIME API
681 if test "x$silcclient" = "xyes"; then
682         CPPFLAGS_save="$CPPFLAGS"
683         CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
684                 AC_MSG_CHECKING(for silcmime.h)
685                 AC_TRY_COMPILE([
686 #include <silcincludes.h>
687 #include <silcmime.h>
688                 ], [], [
689                 AC_MSG_RESULT(yes)
690                 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
691                 ], [
692                 AC_MSG_RESULT(no)
693                 ])
694         CPPFLAGS="$CPPFLAGS_save"
697 dnl #######################################################################
698 dnl # Check for Gadu-Gadu client includes and libraries
699 dnl #######################################################################
700 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"])
701 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"])
702 GADU_CFLAGS=""
703 GADU_LIBS=""
704 if test -n "$with_gadu_includes" || test -n "$with_gadu_libs"; then
705         gadu_manual_check="yes"
706 else
707         gadu_manual_check="no"
709 if test "x$gadu_manual_check" = "xno"; then
710         PKG_CHECK_MODULES(GADU, libgadu, [
711                 gadu_includes="yes"
712                 gadu_libs="yes"
713         ], [
714                 AC_MSG_RESULT(no)
715         ])
716 else
717         if test "$ac_gadu_includes" != "no"; then
718                 GADU_CFLAGS="-I$ac_gadu_includes"
719         fi
720         CPPFLAGS_save="$CPPFLAGS"
721         CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
722         AC_CHECK_HEADER(libgadu.h, [gadu_includes=yes])
723         CPPFLAGS="$CPPFLAGS_save"
725         if test "$ac_gadu_libs" != "no"; then
726                 GADU_LIBS="-L$ac_gadu_libs"
727         fi
728         GADU_LIBS="$GADU_LIBS -lgadu"
729         AC_CHECK_LIB(gadu, gg_libgadu_version, [gadu_libs=yes], , $GADU_LIBS)
731 GADU_CFLAGS=`echo $GADU_CFLAGS |$sedpath 's/-Wall//'`
733 if test "x$gadu_libs" = "xyes"; then
734         AC_MSG_CHECKING(for libgadu GPL compatibility)
735         CPPFLAGS_save="$CPPFLAGS"
736         CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
737         AC_TRY_COMPILE([#include <libgadu.h>], [
738 #ifdef __GG_LIBGADU_HAVE_OPENSSL
739 #error "libgadu is not compatible with the GPL when compiled with OpenSSL support."
740 #endif
741         ], [
742                 AC_MSG_RESULT(yes)
743                 AC_DEFINE([HAVE_LIBGADU], [1],
744                         [Define to 1 if you have libgadu.])
745         ], [
746                 AC_MSG_RESULT(no)
747                 echo
748                 echo
749                 echo "libgadu is not compatible with the GPL when compiled with OpenSSL support."
750                 echo "Please recompile libgadu using:"
751                 echo "./autogen.sh --disable-libgadu-openssl --disable-static --enable-shared"
752                 echo "Then rerun this ./configure"
753                 echo
754                 echo
755                 GADU_LIBS=""
756                 GADU_CFLAGS=""
757                 gadu_libs=no
758         ])
759         CPPFLAGS="$CPPFLAGS_save"
762 AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes")
764 AC_SUBST(GADU_LIBS)
765 AC_SUBST(GADU_CFLAGS)
768 AC_ARG_ENABLE(distrib,,,enable_distrib=no)
769 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
770 DYNAMIC_PRPLS=all
771 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=""])
772 if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then
773         DYNAMIC_PRPLS=""
776 if test "x$STATIC_PRPLS" = "xall" ; then
777         STATIC_PRPLS="bonjour gg irc jabber msn novell oscar qq sametime silc simple yahoo zephyr"
779 if test "x$have_meanwhile" != "xyes" ; then
780         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'`
782 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then
783         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'`
785 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
786         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc//'`
788 AC_SUBST(STATIC_PRPLS)
789 STATIC_LINK_LIBS=
790 extern_init=
791 load_proto=
792 for i in $STATIC_PRPLS ; do
793         dnl Ugly special case for "libsilcpurple.a":
794         if test "x$i" = "xsilc"; then
795                 STATIC_LINK_LIBS="$STATIC_LINK_LIBS protocols/$i/lib${i}purple.a"
796         else
797                 STATIC_LINK_LIBS="$STATIC_LINK_LIBS protocols/$i/lib$i.a"
798         fi
799         extern_init="$extern_init extern gboolean purple_init_${i}_plugin();"
800         load_proto="$load_proto purple_init_${i}_plugin();"
801         case $i in
802                 bonjour)        static_bonjour=yes ;;
803                 gg)                     static_gg=yes ;;
804                 irc)            static_irc=yes ;;
805                 jabber)         static_jabber=yes ;;
806                 msn)            static_msn=yes ;;
807                 novell)         static_novell=yes ;;
808                 oscar)          static_oscar=yes ;;
809                 aim)            static_oscar=yes ;;
810                 icq)            static_oscar=yes ;;
811                 qq)                     static_qq=yes ;;
812                 sametime)       static_sametime=yes ;;
813                 silc)           static_silc=yes ;;
814                 simple)         static_simple=yes ;;
815                 toc)            static_toc=yes ;;
816                 yahoo)          static_yahoo=yes ;;
817                 zephyr)         static_zephyr=yes ;;
818                 *)                      echo "Invalid static protocol $i!!" ; exit ;;
819         esac
820 done
821 AM_CONDITIONAL(STATIC_BONJOUR, test "x$static_bonjour" = "xyes" -a "x$howlincludes" = "xyes" -a "x$howllibs" = "xyes")
822 AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes")
823 AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes")
824 AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes")
825 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes")
826 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes")
827 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes")
828 AM_CONDITIONAL(STATIC_QQ, test "x$static_qq" = "xyes")
829 AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_meanwhile" = "xyes")
830 AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes")
831 AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes")
832 AM_CONDITIONAL(STATIC_TOC, test "x$static_toc" = "xyes")
833 AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes")
834 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes")
835 AC_SUBST(STATIC_LINK_LIBS)
836 AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init static void static_proto_init() { $load_proto },
837         [Loads static protocol plugin module initialization functions.])
839 AC_ARG_WITH(dynamic_prpls, [AC_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`])
840 if test "x$DYNAMIC_PRPLS" = "xall" ; then
841         DYNAMIC_PRPLS="bonjour gg irc jabber msn novell oscar qq sametime silc simple yahoo zephyr"
843 if test "x$have_meanwhile" != "xyes"; then
844         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'`
846 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then
847         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
849 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
850         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc//'`
852 AC_SUBST(DYNAMIC_PRPLS)
853 for i in $DYNAMIC_PRPLS ; do
854         case $i in
855                 bonjour)        dynamic_bonjour=yes ;;
856                 gg)                     dynamic_gg=yes ;;
857                 irc)            dynamic_irc=yes ;;
858                 jabber)         dynamic_jabber=yes ;;
859                 msn)            dynamic_msn=yes ;;
860                 novell)         dynamic_novell=yes ;;
861                 oscar)          dynamic_oscar=yes ;;
862                 aim)            dynamic_oscar=yes ;;
863                 icq)            dynamic_oscar=yes ;;
864                 qq)                     dynamic_qq=yes ;;
865                 sametime)       dynamic_sametime=yes ;;
866                 silc)           dynamic_silc=yes ;;
867                 simple)         dynamic_simple=yes ;;
868                 toc)            dynamic_toc=yes ;;
869                 yahoo)          dynamic_yahoo=yes ;;
870                 zephyr)         dynamic_zephyr=yes ;;
871                 *)                      echo "Invalid dynamic protocol $i!!" ; exit ;;
872         esac
873 done
874 AM_CONDITIONAL(DYNAMIC_BONJOUR, test "x$dynamic_bonjour" = "xyes" -a "x$bonjourincludes" = "xyes" -a "x$bonjourclient" = "xyes")
875 AM_CONDITIONAL(DYNAMIC_GG, test "x$dynamic_gg" = "xyes")
876 AM_CONDITIONAL(DYNAMIC_IRC, test "x$dynamic_irc" = "xyes")
877 AM_CONDITIONAL(DYNAMIC_JABBER, test "x$dynamic_jabber" = "xyes")
878 AM_CONDITIONAL(DYNAMIC_MSN, test "x$dynamic_msn" = "xyes")
879 AM_CONDITIONAL(DYNAMIC_NOVELL, test "x$dynamic_novell" = "xyes")
880 AM_CONDITIONAL(DYNAMIC_OSCAR, test "x$dynamic_oscar" = "xyes")
881 AM_CONDITIONAL(DYNAMIC_QQ, test "x$dynamic_qq" = "xyes")
882 AM_CONDITIONAL(DYNAMIC_SAMETIME, test "x$dynamic_sametime" = "xyes" -a "x$have_meanwhile" = "xyes")
883 AM_CONDITIONAL(DYNAMIC_SILC, test "x$dynamic_silc" = "xyes" -a "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes")
884 AM_CONDITIONAL(DYNAMIC_SIMPLE, test "x$dynamic_simple" = "xyes")
885 AM_CONDITIONAL(DYNAMIC_TOC, test "x$dynamic_toc" = "xyes")
886 AM_CONDITIONAL(DYNAMIC_YAHOO, test "x$dynamic_yahoo" = "xyes")
887 AM_CONDITIONAL(DYNAMIC_ZEPHYR, test "x$dynamic_zephyr" = "xyes")
889 AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes)
890 AC_ARG_WITH(krb4, [AC_HELP_STRING([--with-krb4=PREFIX], [compile Zephyr plugin with Kerberos 4 support])], kerberos="$withval", kerberos="no")
891 AC_ARG_WITH(zephyr, [AC_HELP_STRING([--with-zephyr=PREFIX], [compile Zephyr plugin against external libzephyr])], zephyr="$withval", zephyr="no")
892 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
894 AC_CHECK_HEADER(sys/utsname.h)
895 AC_CHECK_FUNC(uname)
897 AC_ARG_ENABLE(fortify, [AC_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], enable_fortify="$enableval", enable_fortify=yes)
899 AC_ARG_ENABLE(mcheck, [AC_HELP_STRING([--enable-mcheck], [compile with mcheck (malloc debugging) support])], enable_mcheck="$enableval", enable_mcheck="$enable_debug")
900 if test "x$enable_mcheck" = "xyes" ; then
901         orig_LIBS="$LIBS"
902         LIBS="$LIBS -lmcheck"
903         AC_MSG_CHECKING(for mcheck support)
904         AC_TRY_COMPILE([], [
905                 int main() {return 0;}
906         ], [
907                 AC_MSG_RESULT(yes)
908         ], [
909                 AC_MSG_RESULT(no)
910                 LIBS="$orig_LIBS"
911         ])
914 if test "x$GCC" = "xyes"; then
915         dnl We enable -Wall later.
916         dnl If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
917         dnl This leads to warnings we don't want.
918         CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
920         dnl ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE
921         dnl
922         dnl Future Possibilities
923         dnl
924         dnl Consider adding -Wbad-function-cast.
925         dnl     This leads to spurious warnings using GPOINTER_TO_INT(), et al. directly on a function call.
926         dnl             We'd need an intermediate variable.
927         dnl
928         dnl Consider adding -Wfloat-equal.
929         dnl     This leads to warnings with Perl.
930         dnl             Perhaps we could write ugly configure magic and pass -Wno-float-equal down to that subdirectory.
931         dnl             On the other hand, it's probably actually broken, so maybe the Perl folks should fix that?
932         dnl
933         dnl Consider removing -Wno-sign-compare (from the -Wextra set) and fixing all those cases.
934         dnl     This is likely non-trivial.
935         dnl
936         for newflag in \
937                         "-Waggregate-return" \
938                         "-Wcast-align" \
939                         "-Wdeclaration-after-statement" \
940                         "-Wendif-labels" \
941                         "-Werror-implicit-function-declaration" \
942                         "-Wextra -Wno-sign-compare -Wno-unused-parameter" \
943                         "-Winit-self" \
944                         "-Wmissing-declarations" \
945                         "-Wmissing-noreturn" \
946                         "-Wmissing-prototypes" \
947                         "-Wnested-externs" \
948                         "-Wpointer-arith" \
949                         "-Wundef" \
950         ; do
951                 orig_CFLAGS="$CFLAGS"
952                 CFLAGS="$CFLAGS $newflag"
953                 AC_MSG_CHECKING(for $newflag option to gcc)
954                 AC_TRY_COMPILE([], [
955                         int main() {return 0;}
956                 ], [
957                         AC_MSG_RESULT(yes)
958                         CFLAGS="$orig_CFLAGS"
959                         DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
960                 ], [
961                         AC_MSG_RESULT(no)
962                         CFLAGS="$orig_CFLAGS"
963                 ])
964         done
966         if test "x$enable_fortify" = "xyes"; then
967                 AC_MSG_CHECKING(for FORTIFY_SOURCE support)
968                 AC_TRY_COMPILE([#include <features.h>], [
969                         int main() {
970                         #if !(__GNUC_PREREQ (4, 1) \
971                                 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
972                                 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
973                                         && __GNUC_MINOR__ == 4 \
974                                         && (__GNUC_PATCHLEVEL__ > 2 \
975                                                 || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
976                         #error No FORTIFY_SOURCE support
977                         #endif
978                                 return 0;
979                         }
980                 ], [
981                         AC_MSG_RESULT(yes)
982                         DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2"
983                 ], [
984                         AC_MSG_RESULT(no)
985                 ])
986         fi
988         DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
989         CFLAGS="-g $CFLAGS"
991 AC_SUBST(CFLAGS)
993 AC_PATH_PROG(pidginpath, pidgin)
995 dnl #######################################################################
996 dnl # Check for D-Bus libraries
997 dnl #######################################################################
999 AC_ARG_ENABLE(dbus, [AC_HELP_STRING([--enable-dbus], [enable D-Bus support])], , enable_dbus=yes)
1000 AC_ARG_ENABLE(nm, [AC_HELP_STRING([--enable-nm], [enable NetworkManager support (buggy) (requires D-Bus)])], enable_libnm=yes, enable_libnm=no)
1002 if test "x$enable_dbus" = "xyes" ; then
1003         AC_CHECK_PROG(enable_dbus, dbus-binding-tool, yes, no)
1006 if test "x$enable_dbus" = "xyes" ; then
1007         PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.35 dbus-glib-1 >= 0.35], [
1008                 AC_SUBST(DBUS_CFLAGS)
1009                 AC_SUBST(DBUS_LIBS)
1010                 enable_dbus=yes
1011         ], [
1012                 AC_MSG_RESULT(no)
1013                 enable_dbus=no
1014         ])
1016 dnl Check for libnm_glib; if we don't have it, oh well
1017         if test "x$enable_libnm" = "xyes" ; then
1018                 LIBNM_CFLAGS=""
1019                 LIBNM_LIBS=""
1020                 PKG_CHECK_MODULES(LIBNM, libnm_glib,
1021                 [
1022                         AC_DEFINE(HAVE_LIBNM, 1, [Define if you have NetworkManager])
1023                         enable_libnm=yes
1024                 ],
1025                 [
1026                         AC_MSG_RESULT(no)
1027                         enable_libnm=no
1028                 ])
1029                 AC_SUBST(LIBNM_CFLAGS)
1030                 AC_SUBST(LIBNM_LIBS)
1031         fi
1032 else
1033         enable_libnm=no
1036 dnl #######################################################################
1037 dnl # Check for Python
1038 dnl #######################################################################
1040 dnl Python scripts are used to auto-generate about 3000 lines of C
1041 dnl and XML code that wraps (part of) the existing API so that
1042 dnl it is now accessible through D-Bus.
1044 dnl Python is only required if --enable-dbus is used, and only for
1045 dnl the build process to generate the code, not for running pidgin.
1046 dnl This autogenerated code is system-independent, so in principle we
1047 dnl can generate all of it before shipping.  But I thought adding
1048 dnl auto-generated stuff to the repository is inelegant.
1049 dnl Alternatively, these python scripts could be rewritten
1050 dnl in C (brrrr ...).
1052 AC_ARG_WITH([python],
1053                         AC_HELP_STRING([--with-python=PATH],
1054                                                    [which python interpreter to use for dbus code generation]),
1055                         PYTHON=$withval)
1057 if test "x$enable_dbus" = "xyes" ; then
1058         if test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then
1059                 AC_PATH_PROG([PYTHON], [python], [no])
1060         fi
1062         if test x"$python" = x"no" ; then
1063                 AC_MSG_WARN([python interpreter not found in your path])
1064                 enable_dbus=no
1065         fi
1068 if test "x$enable_dbus" = "xyes" ; then
1069         if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then
1070                 AC_MSG_WARN([python version >= 2.4 required])
1071                 enable_dbus=no
1072         fi
1075 dnl ###########################################################################
1076 dnl # Find the D-Bus services dir.
1077 dnl #
1078 dnl # This is a 3 step process that
1079 dnl #
1080 dnl # 1. checks if --with-dbus-services was set, if so use that.
1081 dnl # 2. checks if --prefix was given, if so use that.
1082 dnl # 3. fallbacks to installing into what should be the correct system
1083 dnl #    directories.
1084 dnl #
1085 dnl # This is still prone to error if one of the legacy directories exist
1086 dnl # although a newer dbus is installed.  But I have tried to order the
1087 dnl # directory searching to keep this situation at a minimum.
1088 dnl ###########################################################################
1089 AC_ARG_WITH(dbus-services, [AC_HELP_STRING([--with-dbus-services=<dir>], [where the D-Bus services directory is located.])])
1091 DBUS_SERVICES_DIR=""
1093 if test x"$enable_dbus" = "xyes" ; then
1094         AC_MSG_CHECKING([location of the D-Bus services directory])
1095         if ! test -z "$with_dbus_services" ; then
1096                 if ! test -d "$with_dbus_services" ; then
1097                         AC_MSG_ERROR([$with_dbus_services does not exist, if this is the correct location please make sure that it exists.])
1098                 fi
1100                 DBUS_SERVICES_DIR="$with_dbus_services"
1101         else
1102                 if test x"$prefix" = x"NONE" ; then
1103                         dnl # no prefix given, so we look for the correct dbus system paths.
1104                         dnl # if a prefix is given, we use it.
1106                         serviceprefixes="$datadir $libdir /usr/share /usr/local/share"
1107                         DBUS_SERVICES_DIR=""
1109                         for d in $serviceprefixes ; do
1110                                 dir="$d/dbus-1/services"
1111                                 if test -d $dir ; then
1112                                         DBUS_SERVICES_DIR="$dir"
1113                                         break
1114                                 fi
1115                         done
1117                         if test -z $DBUS_SERVICES_DIR ; then
1118                                 AC_MSG_ERROR([D-Bus services directory was not found!  Please use --with-dbus-services and specify it's location.])
1119                         fi
1120                 else
1121                         DBUS_SERVICES_DIR="$datadir/dbus-1/services"
1122                 fi
1123         fi
1124         AC_MSG_RESULT([$DBUS_SERVICES_DIR])
1125         AC_DEFINE(HAVE_DBUS, 1, [Define if we are using D-Bus.])
1127 AC_SUBST(DBUS_SERVICES_DIR)
1129 if test "x$enable_dbus" = "xyes" ; then
1130         echo "Building with D-Bus support"
1131 else
1132         echo "Building without D-Bus support"
1135 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
1137 dnl #######################################################################
1138 dnl # Check for Mono support
1139 dnl #######################################################################
1140 AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support (experimental)])], , enable_mono=no)
1141 if test x"$enable_mono" = x"yes" ; then
1142         PKG_CHECK_MODULES(MONO, mono, [
1143                 AC_SUBST(MONO_CFLAGS)
1144                 AC_SUBST(MONO_LIBS)
1145                 enable_mono=yes
1146         ], [
1147                 AC_MSG_RESULT(no)
1148                 enable_mono=no
1149         ])
1150         if test x"$enable_mono" = x"yes"; then
1151                 oldLIBS="$LIBS"
1152                 LIBS="$LIBS $MONO_LIBS"
1153                 AC_MSG_CHECKING(for libmono)
1154                 AC_CHECK_FUNCS(mono_jit_init, [], enable_mono=no)
1155                 LIBS="$oldLIBS"
1157                 oldCPPFLAGS="$CPPFLAGS"
1158                 CPPFLAGS="$CPPFLAGS $MONO_CFLAGS"
1159                 AC_CHECK_HEADERS(mono/jit/jit.h, [], enable_mono=no)
1160                 AC_CHECK_HEADERS(mono/metadata/object.h, [], enable_mono=no)
1161                 CPPFLAGS="$oldCPPFLAGS"
1163                 AC_DEFINE(ENABLE_MONO, 1, [Define if mono enabled.])
1164         fi
1165 else
1166         MONO_CFLAGS=
1167         MONO_LIBS=
1168         enable_mono=no
1171 AC_SUBST(MONO_CFLAGS)
1172 AC_SUBST(MONO_LIBS)
1173 AM_CONDITIONAL(USE_MONO, test x"$enable_mono" = x"yes")
1175 dnl #######################################################################
1176 dnl # Check for Perl support
1177 dnl #######################################################################
1178 AC_ARG_ENABLE(perl, [AC_HELP_STRING([--disable-perl], [compile without perl scripting])], , enable_perl=yes)
1180 if test "$enable_plugins" = no ; then
1181         enable_perl=no
1184 if test "$enable_perl" = yes ; then
1185         AC_PATH_PROG(perlpath, perl)
1186         AC_MSG_CHECKING(for Perl compile flags)
1187         PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
1188         if test "_$PERL_CFLAGS" = _ ; then
1189                 AC_MSG_RESULT([not found, building without perl.])
1190                 enable_perl = no
1191         else
1192                 PERL_LIBS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null |$sedpath 's/-lgdbm //'`
1193                 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-ldb //'`
1194                 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lndbm //'`
1195                 if test "$system" = "Linux"; then
1196                         PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lnsl //'`
1197                         PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lposix //'`
1198                 fi
1199                 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lc //'`
1200                 AC_MSG_RESULT(ok)
1202                 oldLIBS="$LIBS"
1203                 LIBS="$LIBS $PERL_LIBS"
1204                 AC_MSG_CHECKING(for libperl)
1205                 AC_CHECK_FUNCS(perl_run, [], enable_perl=no)
1206                 LIBS="$oldLIBS"
1208                 oldCPPFLAGS="$CPPFLAGS"
1209                 CPPFLAGS="$CPPFLAGS $PERL_CFLAGS"
1210                 AC_CHECK_HEADERS(EXTERN.h)
1211                 AC_CHECK_HEADERS(perl.h, [], enable_perl=no,
1212                 [#if HAVE_EXTERN_H
1213                  # include <EXTERN.h>
1214                  #endif])
1215                 CPPFLAGS="$oldCPPFLAGS"
1216         fi
1219 if test "$enable_perl" = yes ; then
1220         AC_PROG_PERL_MODULES(ExtUtils::MakeMaker, , have_makemaker=no)
1222         if test "x$have_makemaker" = "xno"; then
1223                 enable_perl=no
1224                 PERL_CFLAGS=
1225                 PERL_LIBS=
1226                 AM_CONDITIONAL(USE_PERL, false)
1227                 AC_MSG_WARN(Compiling perl requires ExtUtils::MakeMaker)
1228         else
1229                 AC_DEFINE(HAVE_PERL, [1], [Compile with support for perl])
1230                 AC_SUBST(PERL_CFLAGS)
1231                 AC_SUBST(PERL_LIBS)
1232                 AM_CONDITIONAL(USE_PERL, true)
1234                 dnl This is almost definitely wrong, but in case there's
1235                 dnl something I'm missing, I'll leave it in.
1236                 AC_CHECK_FUNCS(Perl_eval_pv)
1238                 AC_MSG_CHECKING(for old perl)
1239                 PERL_OLD=`$perlpath -e 'if($]<5.006){printf"yes\n";}else{printf"no\n";}'`
1241                 if test "x$PERL_OLD" = "xyes"; then
1242                         AC_DEFINE(OLD_PERL, 1, [Define if old perl is installed.])
1243                         AC_MSG_RESULT(yes)
1244                 else
1245                         AC_MSG_RESULT(no)
1246                 fi
1248                 if test "x$prefix" != "xNONE"; then
1249                         prefix=`eval echo $prefix`
1250                         PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=$prefix"
1251                 fi
1253                 AC_ARG_WITH(perl-lib,
1254                 [AC_HELP_STRING([--with-perl-lib=[site|vendor|DIR]],
1255                         [specify where to install the Perl libraries for pidgin. Default is site.])],
1256                 [
1257                         if test "x$withval" = xsite; then
1258                                 PERL_MM_PARAMS=""
1259                         elif test "x$withval" = xvendor; then
1260                                 if test -z "`$perlpath -v | grep '5\.0'`"; then
1261                                         PERL_MM_PARAMS="INSTALLDIRS=vendor"
1262                                 else
1263                                         PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=`perl -e 'use Config; print $Config{prefix}'`"
1264                                 fi
1265                         else
1266                                 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=$withval"
1267                         fi
1268                 ])
1270                 AC_SUBST(PERL_MM_PARAMS)
1272                 AC_MSG_CHECKING(for DynaLoader.a)
1273                 DYNALOADER_A=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*([[^ ]]*DynaLoader\.a).*/\2/'`
1275                 dnl Don't check libperl.a if dynaloader.a wasn't found.
1276                 if test -n "$DYNALOADER_A"; then
1277                         AC_MSG_RESULT(yes)
1279                         dnl Find either libperl.a or libperl.so
1280                         AC_MSG_CHECKING(for libperl.a or libperl.so)
1281                         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 } } };'`
1282                         if test -z "$LIBPERL_A"; then
1283                                 AC_MSG_RESULT(no)
1284                                 DYNALOADER_A=
1285                         else
1286                                 AC_MSG_RESULT(yes)
1288                                 if test "$LIBPERL_A" = "-lperl"; then
1289                                         LIBPERL_A=
1290                                 fi
1291                         fi
1293                         PERL_LIBS=`echo $PERL_LIBS | $perlpath -pe 's/^(.* )*[[^ ]]*DynaLoader\.a/\1libperl_dynaloader.la/'`
1295                         if test -n "$LIBPERL_A"; then
1296                                 PERL_LIBS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lperl /libperl_orig.la /' -e 's/-lperl$/libperl_orig.la$/'`
1297                         fi
1299                         AC_SUBST(DYNALOADER_A)
1300                         AC_SUBST(LIBPERL_A)
1301                 else
1302                         AC_MSG_RESULT(no)
1303                 fi
1304         fi
1305 else
1306         PERL_CFLAGS=
1307         PERL_LIBS=
1308         AM_CONDITIONAL(USE_PERL, false)
1311 dnl #######################################################################
1312 dnl # SSL support
1313 dnl #
1314 dnl # Thanks go to Evolution for the checks.
1315 dnl #######################################################################
1317 dnl These two are inverses of each other <-- stolen from evolution!
1319 AC_ARG_ENABLE(gnutls,
1320         [  --enable-gnutls=[yes,no]  attempt to use GnuTLS for SSL support (preferred) [default=yes]],
1321         [enable_gnutls="$enableval"],
1322         [enable_gnutls="yes"])
1324 AC_ARG_ENABLE(nss,
1325         [  --enable-nss=[yes,no,static]    attempt to use Mozilla libnss for SSL support [default=yes]],
1326         [enable_nss="$enableval"],
1327         [enable_nss="yes"])
1329 msg_ssl="None (MSN and Google Talk will not work without SSL!)"
1331 dnl #
1332 dnl # Check for GnuTLS if it's specified.
1333 dnl #
1334 if test "x$enable_gnutls" != "xno"; then
1335         enable_gnutls="no"
1336         prefix=`eval echo $prefix`
1338         AC_ARG_WITH(gnutls-includes,
1339                 [  --with-gnutls-includes=PREFIX   location of GnuTLS includes.],
1340                 [ with_gnutls_includes="$withval" ],
1341                 [ with_gnutls_includes="$prefix/include" ])
1343         have_gnutls_includes="no"
1345         if test "x$with_gnutls_includes" != "xno"; then
1346                 CPPFLAGS_save="$CPPFLAGS"
1348                 AC_MSG_CHECKING(for GnuTLS includes)
1349                 AC_MSG_RESULT("")
1351                 CPPFLAGS="$CPPFLAGS -I$with_gnutls_includes"
1352                 AC_CHECK_HEADERS(gnutls/gnutls.h, [ gnutls_includes="yes" ])
1353                 CPPFLAGS="$CPPFLAGS_save"
1355                 if test "x$gnutls_includes" != "xno" -a \
1356                         "x$gnutls_includes" != "x"; then
1357                         have_gnutls_includes="yes"
1359                         if test "x$with_gnutls_includes" != "xNONE/include"; then
1360                                 GNUTLS_CFLAGS="-I$with_gnutls_includes"
1361                         fi
1362                 else
1363                         GNUTLS_CFLAGS=""
1364                 fi
1365         else
1366                 AC_MSG_CHECKING(for GnuTLS includes)
1367                 AC_MSG_RESULT(no)
1368         fi
1370         AC_ARG_WITH(gnutls-libs,
1371                 [AC_HELP_STRING([--with-gnutls-libs=PREFIX], [location of GnuTLS libraries.])],
1372                 [ with_gnutls_libs="$withval" ])
1374         if test "x$with_gnutls_libs"     != "xno" -a \
1375                 "x$have_gnutls_includes" != "xno"; then
1377                 LIBS_save="$LIBS"
1379                 case $with_gnutls_libs in
1380                         ""|-L*) ;;
1381                         *) with_gnutls_libs="-L$with_gnutls_libs" ;;
1382                 esac
1384                 AC_CACHE_CHECK([for GnuTLS libraries], gnutls_libs,
1385                 [
1386                         LIBS="$LIBS $with_gnutls_libs -lgnutls -lgcrypt"
1387                         AC_TRY_LINK_FUNC(gnutls_init, gnutls_libs="yes", gnutls_libs="no")
1388                         LIBS="$LIBS_save"
1389                 ])
1391                 if test "x$gnutls_libs" != "xno"; then
1392                         AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GnuTLS])
1393                         AC_DEFINE(HAVE_SSL)
1394                         msg_gnutls="GnuTLS"
1395                         GNUTLS_LIBS="$with_gnutls_libs -lgnutls -lgcrypt"
1397                         enable_gnutls="yes"
1398                 else
1399                         GNUTLS_CFLAGS=""
1400                         GNUTLS_LIBS=""
1401                 fi
1402         else
1403                 AC_MSG_CHECKING(for GnuTLS libraries)
1404                 AC_MSG_RESULT(no)
1405         fi
1406 else
1407         GNUTLS_CFLAGS=""
1408         GNUTLS_LIBS=""
1411 AC_SUBST(GNUTLS_CFLAGS)
1412 AC_SUBST(GNUTLS_LIBS)
1414 AM_CONDITIONAL(USE_GNUTLS, test "x$enable_gnutls" = "xyes")
1417 dnl #
1418 dnl # Check for NSS if it's specified, or if GnuTLS checks failed.
1419 dnl #
1420 if test "x$enable_nss" != "xno"; then
1422         AC_ARG_WITH(nspr-includes,
1423                 [AC_HELP_STRING([--with-nspr-includes=PREFIX], [specify location of Mozilla nspr4 includes.])],
1424                 [with_nspr_includes="$withval"])
1426         AC_ARG_WITH(nspr-libs,
1427                 [AC_HELP_STRING([--with-nspr-libs=PREFIX], [specify location of Mozilla nspr4 libs.])],
1428                 [with_nspr_libs="$withval"])
1430         AC_ARG_WITH(nss-includes,
1431                 [AC_HELP_STRING([--with-nss-includes=PREFIX], [specify location of Mozilla nss3 includes.])],
1432                 [with_nss_includes="$withval"])
1434         AC_ARG_WITH(nss-libs,
1435                 [AC_HELP_STRING([--with-nss-libs=PREFIX], [specify location of Mozilla nss3 libs.])],
1436                 [with_nss_libs="$withval"])
1439         if test -n "$with_nspr_includes" || test -n "$with_nspr_libs" || \
1440            test -n "$with_nss_includes"  || test -n "$with_nss_libs"  ||
1441            test "x$enable_nss" = "xstatic"; then
1443                 nss_manual_check="yes"
1444         else
1445                 nss_manual_check="no"
1446         fi
1448         enable_nss="no"
1450         if test "x$nss_manual_check" = "xno"; then
1451                 if `$PKG_CONFIG --exists mozilla-nss`; then
1452                         PKG_CHECK_MODULES(NSS, mozilla-nss, [
1453                                 have_nss="yes"
1454                         ], [
1455                                 AC_MSG_RESULT(no)
1456                                 have_nss="no"
1457                         ])
1458                         mozilla_nspr="mozilla-nspr"
1459                         mozilla_nss="mozilla-nss"
1460                 else
1461                         if `$PKG_CONFIG --exists nss`; then
1462                                 PKG_CHECK_MODULES(NSS, nss, [
1463                                         have_nss="yes"
1464                                 ], [
1465                                         AC_MSG_RESULT(no)
1466                                 ])
1467                                 mozilla_nspr="nspr"
1468                                 mozilla_nss="nss"
1469                         fi
1470                 fi
1472                 if test "x$have_nss" = "xyes"; then
1474                         AC_DEFINE(HAVE_NSS, 1, [Define if you have Mozilla NSS])
1475                         AC_DEFINE(HAVE_SSL, 1, [Define if you have SSL])
1477                         msg_nss="Mozilla NSS"
1478                         enable_nss="yes"
1479                 else
1480                         nss_manual_check="yes"
1481                 fi
1482         fi
1484         if test "x$nss_manual_check" = "xyes"; then
1485                 mozilla_nss=""
1486                 have_nspr_includes="no"
1488                 if test "x$with_nspr_includes" != "xno"; then
1489                         CPPFLAGS_save=$CPPFLAGS
1491                         AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)
1492                         AC_MSG_RESULT("")
1494                         CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
1495                         AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ])
1496                         CPPFLAGS=$CPPFLAGS_save
1498                         if test "x$moz_nspr_includes" != "xno" -a \
1499                                 "x$moz_nspr_includes" != "x"; then
1501                                 have_nspr_includes="yes"
1502                                 NSPR_CFLAGS="-I$with_nspr_includes"
1503                         fi
1504                 else
1505                         AC_MSG_CHECKING(for Mozilla nspr4 includes)
1506                         AC_MSG_RESULT(no)
1508                         enable_nss="no"
1509                 fi
1511                 have_nspr_libs="no"
1513                 if test "x$with_nspr_libs"     != "xno" -a \
1514                         "x$have_nspr_includes" != "xno"; then
1516                         CFLAGS_save=$CFLAGS
1517                         LDFLAGS_save=$LDFLAGS
1519                         if test "$enable_nss" = "static"; then
1520                                 if test -z "$with_nspr_libs"; then
1521                                         AC_MSG_ERROR(
1522                                                 [Static linkage requested, but path to nspr libraries not set.]
1523                                                 [Please specify the path to libnspr4.a]
1524                                                 [Example: --with-nspr-libs=/usr/lib])
1526                                         enable_nss="no"
1527                                 else
1528                                         nsprlibs="$LIBDL $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB"
1529                                 fi
1530                         else
1531                                 nsprlibs="$LIBDL -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
1532                         fi
1534                         AC_CACHE_CHECK([for Mozilla nspr libraries], moz_nspr_libs,
1535                         [
1536                                 LIBS_save=$LIBS
1537                                 CFLAGS="$CFLAGS $NSPR_CFLAGS"
1539                                 LIBS="$nsprlibs"
1541                                 if test "x$with_nspr_libs" != "x"; then
1542                                         LDFLAGS="$LDFLAGS -L$with_nspr_libs"
1543                                 else
1544                                         LDFLAGS="$LDFLAGS"
1545                                 fi
1547                                 AC_TRY_LINK_FUNC(PR_Init,
1548                                         [moz_nspr_libs="yes"],
1549                                         [moz_nspr_libs="no"])
1551                                 CFLAGS=$CFLAGS_save
1552                                 LDFLAGS=$LDFLAGS_save
1553                                 LIBS=$LIBS_save
1554                         ])
1556                         if test "x$moz_nspr_libs" != "xno"; then
1557                                 have_nspr_libs="yes"
1558                                 NSPR_LIBS="-L$with_nspr_libs $nsprlibs"
1559                         else
1560                                 NSPR_CFLAGS=""
1561                                 enable_nss="no"
1562                         fi
1563                 else
1564                         AC_MSG_CHECKING(for Mozilla nspr4 libraries)
1565                         AC_MSG_RESULT(no)
1566                 fi
1568                 have_nss_includes="no"
1570                 if test "x$with_nss_includes" != "xno" -a \
1571                                 "x$have_nspr_libs"    != "xno"; then
1573                         CPPFLAGS_save=$CPPFLAGS
1575                         AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)
1576                         AC_MSG_RESULT("")
1578                         if test "x$with_nspr_includes" != "x"; then
1579                                 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
1580                         else
1581                                 CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
1582                         fi
1584                         AC_CHECK_HEADERS(nss.h ssl.h smime.h,
1585                                 [moz_nss_includes="yes"],
1586                                 [moz_nss_includes="no"])
1588                         CPPFLAGS=$CPPFLAGS_save
1590                         if test "x$moz_nss_includes" = "xyes"; then
1591                                 have_nss_includes="yes"
1592                                 NSS_CFLAGS="-I$with_nss_includes"
1593                         else
1594                                 NSPR_CFLAGS=""
1595                                 NSPR_LIBS=""
1596                                 enable_nss="no"
1597                         fi
1598                 else
1599                         AC_MSG_CHECKING(for Mozilla nss3 includes)
1600                         AC_MSG_RESULT(no)
1601                         enable_nss="no"
1602                 fi
1604                 if test "x$with_nss_libs"     != "xno" -a \
1605                                 "x$have_nss_includes" != "xno"; then
1607                         LDFLAGS_save=$LDFLAGS
1609                         if test "$enable_nss" = "static"; then
1610                                 if test -z "$with_nss_libs"; then
1611                                         AC_MSG_ERROR(
1612                                                 [Static linkage requested, but path to nss libraries not set.]
1613                                                 [Please specify the path to libnss3.a]
1614                                                 [Example: --with-nspr-libs=/usr/lib/mozilla])
1615                                         enable_nss="no"
1616                                 else
1617                                         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"
1619                                         case "$host" in
1620                                                 *solaris*)
1621                                                         nsslibs="$nsslibs $with_nss_libs/libfreeb1.a"
1622                                                         ;;
1623                                         esac
1624                                 fi
1625                         else
1626                                 nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
1627                         fi
1629                         AC_CACHE_CHECK([for Mozilla nss libraries], moz_nss_libs,
1630                         [
1631                                 LIBS_save=$LIBS
1632                                 LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs"
1633                                 LIBS="$nsslibs $nsprlibs"
1635                                 AC_TRY_LINK_FUNC(NSS_Init,
1636                                         [moz_nss_libs="yes"],
1637                                         [moz_nss_libs="no"])
1639                                 if test "x$moz_nss_libs" = "xno"; then
1640                                         nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3"
1641                                         LDFLAGS="$LDFLAGS -L$with_nspr_libs -L$with_nss_libs" 
1642                                         LIBS="$LIBS $nsslibs"
1643                                         AC_TRY_LINK_FUNC(NSS_Init,
1644                                                 [moz_nss_libs="yes"],
1645                                                 [moz_nss_libs="no"])
1646                                 fi
1648                                 LDFLAGS=$LDFLAGS_save
1649                                 LIBS=$LIBS_save
1650                         ])
1652                         if test "x$moz_nss_libs" != "xno"; then
1653                                 AC_DEFINE(HAVE_NSS)
1654                                 AC_DEFINE(HAVE_SSL)
1656                                 NSS_LIBS="-L$with_nss_libs $nsslibs"
1658                                 if test "$enable_nss" = "static"; then
1659                                         msg_nss="Mozilla NSS (static)"
1660                                 else
1661                                         msg_nss="Mozilla NSS"
1662                                 fi
1664                                 enable_nss="yes"
1665                         else
1666                                 NSS_CFLAGS=""
1667                                 NSPR_CFLAGS=""
1668                                 NSPR_LIBS=""
1669                                 enable_nss="no"
1670                         fi
1671                 else
1672                         AC_MSG_CHECKING(for Mozilla nss libraries)
1673                         AC_MSG_RESULT(no)
1674                 fi
1676                 NSS_CFLAGS="$NSPR_CFLAGS $NSS_CFLAGS"
1677                 NSS_LIBS="$NSPR_LIBS $NSS_LIBS"
1678         fi
1680         AC_SUBST(NSS_CFLAGS)
1681         AC_SUBST(NSS_LIBS)
1684 AM_CONDITIONAL(USE_NSS, test "x$enable_nss" = "xyes")
1686 if test "x$msg_nss" != "x" -a "x$msg_gnutls" != "x"; then
1687         msg_ssl="$msg_nss and $msg_gnutls"
1688 elif test "x$msg_nss" != "x"; then
1689         msg_ssl=$msg_nss
1690 elif test "x$msg_gnutls" != "x"; then
1691         msg_ssl=$msg_gnutls
1694 dnl #######################################################################
1695 dnl # Check for Tcl
1696 dnl #######################################################################
1697 AC_ARG_ENABLE(tcl, [AC_HELP_STRING([--disable-tcl],
1698         [compile without Tcl scripting])], enable_tcl="$enableval", enable_tcl="yes")
1699 AC_ARG_WITH(tclconfig, [AC_HELP_STRING([--with-tclconfig=DIR],
1700         [directory containing tclConfig.sh])])
1702 if test "$enable_plugins" = no; then
1703         enable_tcl=no
1706 if test "$enable_tcl" = yes; then
1707         AC_MSG_CHECKING([for tclConfig.sh])
1708         TCLCONFIG=no
1709         TCLCONFIGDIRS="/usr/lib \
1710                         /usr/lib64 \
1711                         /usr/lib/tcl8.4 \
1712                         /usr/lib/tcl8.3 \
1713                         /usr/lib/tcl8.2 \
1714                         /System/Library/Tcl/8.3 \
1715                         /usr/local/lib"
1716         for dir in $with_tclconfig $TCLCONFIGDIRS; do
1717                 if test -f $dir/tclConfig.sh; then
1718                         TCLCONFIG=$dir/tclConfig.sh
1719                         AC_MSG_RESULT([yes ($TCLCONFIG)])
1720                 fi
1721         done
1722         if test "$TCLCONFIG" = "no"; then
1723                 AC_MSG_RESULT([no])
1724                 enable_tcl=no
1725         else
1726                 . $TCLCONFIG
1727                 AC_MSG_CHECKING([Tcl version compatability])
1728                 if test "$TCL_MAJOR_VERSION" -ne 8 -o "$TCL_MINOR_VERSION" -lt 3; then
1729                         AC_MSG_RESULT([bad, $TCL_VERSION found but 8.3 or later required])
1730                         enable_tcl=no
1731                 else
1732                         AC_MSG_RESULT([ok, $TCL_VERSION])
1733                         eval "TCL_LIB_SPEC=\"$TCL_LIB_SPEC\""
1734                         AC_MSG_CHECKING([for Tcl linkability])
1735                         oldCPPFLAGS=$CPPFLAGS
1736                         CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
1737                         oldLIBS=$LIBS
1738                         LIBS="$LIBS $TCL_LIB_SPEC"
1739                         AC_TRY_LINK([#include <tcl.h>],
1740                                 [Tcl_Interp *interp=NULL; Tcl_Init(interp)],
1741                                 [AC_MSG_RESULT([yes]);enable_tcl=yes],
1742                                 [AC_MSG_RESULT([no]);enable_tcl=no])
1743                         CPPFLAGS="$oldCPPFLAGS"
1744                         LIBS="$oldLIBS"
1745                 fi
1746         fi
1749 if test "$enable_tcl" = yes; then
1750         AM_CONDITIONAL(USE_TCL, true)
1751         TCL_LIBS=$TCL_LIB_SPEC
1752         AC_DEFINE(HAVE_TCL, [1], [Compile with support for the Tcl toolkit])
1753         AC_SUBST(TCL_LIBS)
1754         TCL_CFLAGS="$TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
1755         if test "x$GCC" = "xyes"; then
1756                 TCL_CFLAGS="$TCL_CFLAGS -fno-strict-aliasing"
1757         fi
1758         AC_SUBST(TCL_CFLAGS)
1759 else
1760         AM_CONDITIONAL(USE_TCL, false)
1763 dnl #######################################################################
1764 dnl # Check for Tk
1765 dnl #######################################################################
1766 AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk],
1767         [compile without Tcl support for Tk])], enable_tk="$enableval", enable_tk="yes")
1768 AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR],
1769         [directory containing tkConfig.sh])])
1771 if test "$enable_tcl" = yes -a "$enable_tk" = yes; then
1772         AC_MSG_CHECKING([for tkConfig.sh])
1773         TKCONFIG=no
1774         TKCONFIGDIRS="/usr/lib \
1775                         /usr/lib64 \
1776                         /usr/lib/tk8.4 \
1777                         /usr/lib/tk8.3 \
1778                         /usr/lib/tk8.2 \
1779                         /usr/local/lib"
1780         for dir in $with_tkconfig $TKCONFIGDIRS; do
1781                 if test -f $dir/tkConfig.sh; then
1782                         TKCONFIG=$dir/tkConfig.sh
1783                         AC_MSG_RESULT([yes ($TKCONFIG)])
1784                 fi
1785         done
1786         if test "$TKCONFIG" = "no"; then
1787                 AC_MSG_RESULT([no])
1788                 enable_tk=no
1789         else
1790                 . $TKCONFIG
1791                 eval "TK_LIB_SPEC=\"$TK_LIB_SPEC\""
1792                 AC_MSG_CHECKING([for Tk linkability])
1793                 oldCPPFLAGS=$CPPFLAGS
1794                 CPPFLAGS="$CPPFLAGS $TCL_CFLAGS"
1795                 oldLIBS=$LIBS
1796                 LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC"
1797                 AC_TRY_LINK([#include <tk.h>],
1798                                 [Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);],
1799                                 [AC_MSG_RESULT([yes]);enable_tk=yes],
1800                                 [AC_MSG_RESULT([no]);enable_tk=no])
1801                 CPPFLAGS="$oldCPPFLAGS"
1802                 LIBS="$oldLIBS"
1803         fi
1804 else
1805         enable_tk=no
1808 if test "$enable_tk" = yes; then
1809         AM_CONDITIONAL(USE_TK, true)
1810         AC_DEFINE(HAVE_TK, [1], [Compile with support for the Tk toolkit])
1811         TK_LIBS=$TK_LIB_SPEC
1812         AC_SUBST(TK_LIBS)
1813 else
1814         AM_CONDITIONAL(USE_TK, false)
1817 if test "$ac_cv_cygwin" = yes ; then
1818         LDADD="$LDADD -static"
1819         AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
1822 AC_SUBST(DEBUG_CFLAGS)
1823 AC_SUBST(LDADD)
1824 AC_SUBST(LIBS)
1826 if test "x$enable_plugins" = "xyes" ; then
1827         AC_DEFINE(PURPLE_PLUGINS, 1, [Define if plugins are enabled.])
1828         AM_CONDITIONAL(PLUGINS, true)
1829 else
1830         AM_CONDITIONAL(PLUGINS, false)
1833 dnl #######################################################################
1834 dnl # Check for Cyrus-SASL (for Jabber)
1835 dnl #######################################################################
1836 dnl AC_CHECK_SIZEOF(short)
1837 AC_CHECK_FUNCS(snprintf connect)
1838 AC_SUBST(SASL_LIBS)
1839 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)
1840 if test "x$enable_cyrus_sasl" = "xyes" ; then
1841         AC_CHECK_LIB(sasl2, sasl_client_init, [
1842                         AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present])
1843                         SASL_LIBS=-"lsasl2"
1844                 ], [
1845                         AC_ERROR(Cyrus SASL library not found)
1846                 ])
1849 dnl #######################################################################
1850 dnl # Check for Kerberos (for Zephyr)
1851 dnl #######################################################################
1852 AC_DEFINE(ZEPHYR_INT32, long, [Size of an int32.])
1853 AC_SUBST(KRB4_CFLAGS)
1854 AC_SUBST(KRB4_LDFLAGS)
1855 AC_SUBST(KRB4_LIBS)
1856 if test "$kerberos" != "no" ; then
1857         if test "$kerberos" != "yes" ; then
1858                 KRB4_CFLAGS="-I${kerberos}/include"
1859                 if test -d "$kerberos/include/kerberosIV" ; then
1860                         KRB4_CFLAGS="$KRB4_CFLAGS -I${kerberos}/include/kerberosIV"
1861                 fi
1862                 KRB4_LDFLAGS="-L${kerberos}/lib"
1863         elif test -d /usr/local/include/kerberosIV ; then
1864                 KRB4_CFLAGS="-I/usr/local/include/kerberosIV"
1865         elif test -d /usr/include/kerberosIV ; then
1866                 KRB4_CFLAGS="-I/usr/include/kerberosIV"
1867         fi
1868         AC_DEFINE(ZEPHYR_USES_KERBEROS, 1, [Define if kerberos should be used in Zephyr.])
1870         orig_LDFLAGS="$LDFLAGS"
1871         LDFLAGS="$LDFLAGS $KRB4_LDFLAGS"
1872         AC_CHECK_LIB(krb4, krb_rd_req,
1873                         [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
1874                         [AC_CHECK_LIB(krb, krb_rd_req,
1875                                 [KRB4_LIBS="-lkrb -ldes"],
1876                                 [AC_ERROR(Kerberos 4 libraries not found)],
1877                                 -ldes)],
1878                         -ldes425 -lkrb5 -lk5crypto -lcom_err)
1879         orig_LIBS="$LIBS"
1880         LIBS="$LIBS $KRB4_LIBS"
1881         AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm)
1882         AC_CHECK_FUNCS(krb_get_err_text krb_log)
1883         LIBS="$orig_LIBS"
1884         LDFLAGS="$orig_LDFLAGS"
1887 dnl #######################################################################
1888 dnl # Check for external libzephyr
1889 dnl #######################################################################
1890 AC_SUBST(ZEPHYR_CFLAGS)
1891 AC_SUBST(ZEPHYR_LDFLAGS)
1892 AC_SUBST(ZEPHYR_LIBS)
1893 if test "$zephyr" != "no" ; then
1894         if test "$zephyr" != "yes" ; then
1895                 ZEPHYR_CFLAGS="-I${zephyr}/include"
1896                 ZEPHYR_LDFLAGS="-L${zephyr}/lib"
1897         elif test -d /usr/athena/include/zephyr ; then
1898                 ZEPHYR_CFLAGS="-I/usr/athena/include"
1899         elif test -d /usr/include/zephyr ; then
1900                 ZEPHYR_CFLAGS="-I/usr/include"
1901         elif test -d /usr/local/include/zephyr ; then
1902                 ZEPHYR_CFLAGS="-I/usr/local/include"
1903         fi
1904         AC_DEFINE(LIBZEPHYR_EXT, 1 , [Define if external libzephyr should be used.])
1905         AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
1906         orig_LDFLAGS="$LDFLAGS"
1907         LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS"
1908         AC_CHECK_LIB(zephyr, ZInitialize,
1909                 [ZEPHYR_LIBS="-lzephyr"],
1910                 [AC_ERROR(Zephyr libraries not found)],
1911                 -lzephyr)
1912         orig_LIBS="$LIBS"
1913         LIBS="$orig_LIBS"
1914         LDFLAGS="$orig_LDFLAGS"
1917 AC_MSG_CHECKING(for me pot o' gold)
1918 AC_MSG_RESULT(no)
1919 AC_CHECK_FUNCS(gethostid lrand48)
1920 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
1921 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
1922 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
1923 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
1924 AC_CHECK_HEADERS(termios.h)
1925 AC_VAR_TIMEZONE_EXTERNALS
1927 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
1928         AC_TRY_COMPILE([
1929                 #include <time.h>
1930         ], [
1931                 struct tm tm;
1932                 tm.tm_gmtoff = 1;
1933         ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
1934 if test $ac_cv_struct_tm_gmtoff = yes; then
1935         AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
1938 dnl #######################################################################
1939 dnl # Check for check
1940 dnl #######################################################################
1941 PKG_CHECK_MODULES(CHECK,[check >= 0.9.4],:,[
1942                                         ifdef([AM_PATH_CHECK],
1943                                         [AM_PATH_CHECK(0.8.2,:,:)],
1944                                         [AC_MSG_RESULT([no, testing is disabled])])
1945                                   ])
1946 AM_CONDITIONAL(HAVE_CHECK, [test "x$CHECK_LIBS" != "x"])
1947 AC_SUBST(CHECK_CFLAGS)
1948 AC_SUBST(CHECK_LIBS)
1950 dnl #######################################################################
1951 dnl # Check for Doxygen and dot (part of GraphViz)
1952 dnl #######################################################################
1953 AC_ARG_ENABLE(doxygen,
1954         [AC_HELP_STRING([--disable-doxygen],
1955                 [enable documentation with doxygen])],
1956         enable_doxygen="$enableval", enable_doxygen="yes")
1957 AC_ARG_ENABLE(dot,
1958         [AC_HELP_STRING([--enable-dot],
1959                 [enable graphs in doxygen via 'dot'])],
1960         enable_dot="$enableval", enable_dot="yes")
1962 if test "x$enable_doxygen" = xyes; then
1963         AC_CHECK_PROG(DOXYGEN, doxygen, true, false)
1964         if test $DOXYGEN = false; then
1965                 AC_MSG_WARN([*** Doxygen not found, docs will not be available])
1966                 enable_doxygen="no"
1967         else
1968                 AC_DEFINE_UNQUOTED(HAVE_DOXYGEN, 1, [whether or not we have doxygen])
1970                 if test "x$enable_dot" = "xyes"; then
1971                         AC_CHECK_PROG(DOT, dot, true, false)
1973                         if test $DOT = false; then
1974                                 enable_dot="no";
1975                                 AC_MSG_WARN([*** GraphViz dot not found, docs will not have graphs])
1976                         else
1977                                 AC_DEFINE_UNQUOTED(HAVE_DOT, 1, [whether or not we have dot])
1978                         fi
1979                 fi
1980         fi
1981 else
1982         enable_dot="no"
1985 AC_SUBST(enable_doxygen)
1986 AC_SUBST(enable_dot)
1987 AM_CONDITIONAL(HAVE_DOXYGEN, test "x$enable_doxygen" = "xyes")
1989 AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug],
1990         [compile with debugging support])], , enable_debug=no)
1991 if test "x$enable_debug" = "xyes" ; then
1992         AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
1995 AC_ARG_ENABLE(fatal-asserts, [AC_HELP_STRING([--enable-fatal-asserts],
1996         [make assertions fatal (useful for debugging)])], , enable_fatal_asserts=no)
1997 if test "x$enable_fatal_asserts" = "xyes" ; then
1998         AC_DEFINE(PURPLE_FATAL_ASSERTS, 1, [Define to make assertions fatal (useful for debugging).])
2001 AC_OUTPUT([Makefile
2002                    Doxyfile
2003                    doc/Makefile
2004                    doc/pidgin.1
2005                    doc/finch.1
2006                    m4macros/Makefile
2007                    pidgin.apspec
2008                    pidgin/Makefile
2009                    pidgin/pidgin.pc
2010                    pidgin/pidgin-uninstalled.pc
2011                    pidgin/pixmaps/Makefile
2012                    pidgin/pixmaps/animations/Makefile
2013                    pidgin/pixmaps/animations/16/Makefile
2014                    pidgin/pixmaps/buddy_icons/Makefile
2015                    pidgin/pixmaps/buddy_icons/qq/Makefile
2016                    pidgin/pixmaps/dialogs/Makefile
2017                    pidgin/pixmaps/dialogs/16/Makefile
2018                    pidgin/pixmaps/dialogs/16/scalable/Makefile
2019                    pidgin/pixmaps/dialogs/64/Makefile
2020                    pidgin/pixmaps/dialogs/64/scalable/Makefile
2021                    pidgin/pixmaps/emblems/Makefile
2022                    pidgin/pixmaps/emblems/16/Makefile
2023                    pidgin/pixmaps/emblems/16/scalable/Makefile
2024                    pidgin/pixmaps/emotes/Makefile
2025                    pidgin/pixmaps/emotes/default/Makefile
2026                    pidgin/pixmaps/emotes/default/22/Makefile
2027                    pidgin/pixmaps/emotes/default/22/scalable/Makefile
2028                    pidgin/pixmaps/emotes/none/Makefile
2029                    pidgin/pixmaps/icons/Makefile
2030                    pidgin/pixmaps/icons/16/Makefile
2031                    pidgin/pixmaps/icons/16/scalable/Makefile
2032                    pidgin/pixmaps/icons/24/Makefile
2033                    pidgin/pixmaps/icons/24/scalable/Makefile
2034                    pidgin/pixmaps/icons/32/Makefile
2035                    pidgin/pixmaps/icons/32/scalable/Makefile
2036                    pidgin/pixmaps/icons/48/Makefile
2037                    pidgin/pixmaps/icons/48/scalable/Makefile
2038                    pidgin/pixmaps/protocols/Makefile
2039                    pidgin/pixmaps/protocols/16/Makefile
2040                    pidgin/pixmaps/protocols/16/scalable/Makefile
2041                    pidgin/pixmaps/protocols/22/Makefile
2042                    pidgin/pixmaps/protocols/22/scalable/Makefile
2043                    pidgin/pixmaps/protocols/48/Makefile
2044                    pidgin/pixmaps/protocols/48/scalable/Makefile
2045                    pidgin/pixmaps/status/Makefile
2046                    pidgin/pixmaps/status/16/Makefile
2047                    pidgin/pixmaps/status/16/rtl/Makefile
2048                    pidgin/pixmaps/status/16/scalable/Makefile
2049                    pidgin/pixmaps/status/22/Makefile
2050                    pidgin/pixmaps/status/22/rtl/Makefile
2051                    pidgin/pixmaps/status/22/scalable/Makefile
2052                    pidgin/pixmaps/status/32/Makefile
2053                    pidgin/pixmaps/status/32/rtl/Makefile
2054                    pidgin/pixmaps/status/32/scalable/Makefile
2055                    pidgin/pixmaps/status/48/Makefile
2056                    pidgin/pixmaps/status/48/rtl/Makefile
2057                    pidgin/pixmaps/toolbar/Makefile
2058                    pidgin/pixmaps/toolbar/16/Makefile
2059                    pidgin/pixmaps/toolbar/16/scalable/Makefile
2060                    pidgin/pixmaps/toolbar/22/Makefile
2061                    pidgin/pixmaps/toolbar/22/scalable/Makefile
2062                    pidgin/pixmaps/tray/Makefile
2063                    pidgin/pixmaps/tray/16/Makefile
2064                    pidgin/pixmaps/tray/22/Makefile
2065                    pidgin/plugins/Makefile
2066                    pidgin/plugins/cap/Makefile
2067                    pidgin/plugins/gestures/Makefile
2068                    pidgin/plugins/gevolution/Makefile
2069                    pidgin/plugins/musicmessaging/Makefile
2070                    pidgin/plugins/perl/Makefile
2071                    pidgin/plugins/perl/common/Makefile.PL
2072                    pidgin/plugins/ticker/Makefile
2073                    pidgin/sounds/Makefile
2074                    libpurple/example/Makefile
2075                    libpurple/gconf/Makefile
2076                    libpurple/purple.pc
2077                    libpurple/purple-uninstalled.pc
2078                    libpurple/plugins/Makefile
2079                    libpurple/plugins/mono/Makefile
2080                    libpurple/plugins/mono/api/Makefile
2081                    libpurple/plugins/mono/loader/Makefile
2082                    libpurple/plugins/perl/Makefile
2083                    libpurple/plugins/perl/common/Makefile.PL
2084                    libpurple/plugins/ssl/Makefile
2085                    libpurple/plugins/tcl/Makefile
2086                    libpurple/Makefile
2087                    libpurple/protocols/Makefile
2088                    libpurple/protocols/bonjour/Makefile
2089                    libpurple/protocols/gg/Makefile
2090                    libpurple/protocols/irc/Makefile
2091                    libpurple/protocols/jabber/Makefile
2092                    libpurple/protocols/msn/Makefile
2093                    libpurple/protocols/novell/Makefile
2094                    libpurple/protocols/oscar/Makefile
2095                    libpurple/protocols/qq/Makefile
2096                    libpurple/protocols/sametime/Makefile
2097                    libpurple/protocols/silc/Makefile
2098                    libpurple/protocols/simple/Makefile
2099                    libpurple/protocols/toc/Makefile
2100                    libpurple/protocols/yahoo/Makefile
2101                    libpurple/protocols/zephyr/Makefile
2102                    libpurple/tests/Makefile
2103                    libpurple/version.h
2104                    finch/Makefile
2105                    finch/libgnt/Makefile
2106                    finch/libgnt/gnt.pc
2107                    finch/libgnt/wms/Makefile
2108                    finch/plugins/Makefile
2109                    po/Makefile.in
2110                    pidgin.spec
2111                   ])
2113 echo
2114 echo $PACKAGE $VERSION
2116 echo
2117 echo Build GTK+ 2.x UI............. : $enable_gtkui
2118 echo Build console UI.............. : $enable_consoleui
2119 echo
2120 echo Protocols to build dynamically : $DYNAMIC_PRPLS
2121 echo Protocols to link statically.. : $STATIC_PRPLS
2122 echo
2123 echo Build with GStreamer support.. : $enable_gst
2124 echo Build with D-Bus support...... : $enable_dbus
2125 if test "x$enable_dbus" = "xyes" ; then
2126         eval eval echo D-Bus services directory...... : $DBUS_SERVICES_DIR
2128 echo Build with NetworkManager..... : $enable_libnm
2129 echo SSL Library/Libraries......... : $msg_ssl
2130 echo Build with Cyrus SASL support. : $enable_cyrus_sasl
2131 echo Use kerberos 4 with zephyr.... : $kerberos
2132 echo Use external libzephyr........ : $zephyr
2133 echo Has you....................... : yes
2134 echo
2135 echo Use XScreenSaver Extension.... : $enable_screensaver
2136 echo Use X Session Management...... : $enable_sm
2137 echo Use startup notification...... : $enable_startup_notification
2138 echo Build with GtkSpell support... : $enable_gtkspell
2139 echo
2140 echo Build with plugin support..... : $enable_plugins
2141 echo Build with Mono support....... : $enable_mono
2142 echo Build with Perl support....... : $enable_perl
2143 echo Build with Tcl support........ : $enable_tcl
2144 echo Build with Tk support......... : $enable_tk
2145 echo
2146 echo Print debugging messages...... : $enable_debug
2147 echo Assertions are fatal.......... : $enable_fatal_asserts
2148 echo
2149 eval eval echo Pidgin will be installed in $bindir.
2150 if test "x$pidginpath" != "x" ; then
2151         echo Warning: You have an old copy of Pidgin at $pidginpath.
2153 echo
2154 echo configure complete, now type \'make\'
2155 echo