Merged pidgin/main into default
[pidgin-git.git] / configure.ac
blob8c0f643f2862d3737a034915adf20bd42f8aa8d1
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ([2.63])
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], [20])
47 m4_define([purple_major_version], [3])
48 m4_define([purple_minor_version], [0])
49 m4_define([purple_micro_version], [0])
50 m4_define([purple_version_suffix], [devel])
51 m4_define([purple_version],
52           [purple_major_version.purple_minor_version.purple_micro_version])
53 m4_define([purple_display_version], purple_version[]m4_ifdef([purple_version_suffix],[purple_version_suffix]))
55 # the last version for Finch 2 was 2.8.10,
56 # the first version for Finch 3 was 2.9.0
57 m4_define([gnt_lt_current], [9])
58 m4_define([gnt_major_version], [2])
59 m4_define([gnt_minor_version], [9])
60 m4_define([gnt_micro_version], [0])
61 m4_define([gnt_version_suffix], [devel])
62 m4_define([gnt_version],
63           [gnt_major_version.gnt_minor_version.gnt_micro_version])
64 m4_define([gnt_display_version], gnt_version[]m4_ifdef([gnt_version_suffix],[gnt_version_suffix]))
67 AC_INIT([pidgin], [purple_display_version], [devel@pidgin.im])
69 if test `pwd | wc -w` -ne 1; then
70         AC_MSG_ERROR([
71 You are attempting to build in a path that contains spaces.  This
72 will fail.  Relocate this source tree to a path that does not contain
73 spaces and run configure again.
77 AC_CANONICAL_HOST
78 AC_CONFIG_HEADERS([config.h])
79 AC_CONFIG_MACRO_DIR([m4macros])
80 AM_INIT_AUTOMAKE([1.11 -Wno-portability dist-bzip2 subdir-objects])
81 AM_SILENT_RULES([yes])
83 PURPLE_MAJOR_VERSION=purple_major_version
84 PURPLE_MINOR_VERSION=purple_minor_version
85 PURPLE_MICRO_VERSION=purple_micro_version
86 PURPLE_VERSION=purple_display_version
87 PURPLE_API_VERSION=$((purple_lt_current - purple_minor_version))
88 AC_SUBST(PURPLE_MAJOR_VERSION)
89 AC_SUBST(PURPLE_MINOR_VERSION)
90 AC_SUBST(PURPLE_MICRO_VERSION)
91 AC_SUBST(PURPLE_VERSION)
92 AC_SUBST(PURPLE_API_VERSION)
94 PURPLE_LT_VERSION_INFO="purple_lt_current:purple_micro_version:purple_minor_version"
95 AC_SUBST(PURPLE_LT_VERSION_INFO)
97 GNT_MAJOR_VERSION=gnt_major_version
98 GNT_MINOR_VERSION=gnt_minor_version
99 GNT_MICRO_VERSION=gnt_micro_version
100 GNT_VERSION=gnt_display_version
101 GNT_API_VERSION=$((gnt_lt_current - gnt_minor_version))
102 AC_SUBST(GNT_MAJOR_VERSION)
103 AC_SUBST(GNT_MINOR_VERSION)
104 AC_SUBST(GNT_MICRO_VERSION)
105 AC_SUBST(GNT_VERSION)
106 AC_SUBST(GNT_API_VERSION)
108 GNT_LT_VERSION_INFO="gnt_lt_current:gnt_micro_version:gnt_minor_version"
109 AC_SUBST(GNT_LT_VERSION_INFO)
111 AC_PATH_PROG(sedpath, sed)
113 dnl Storing configure arguments
114 AC_DEFINE_UNQUOTED(CONFIG_ARGS, "$ac_configure_args", [configure arguments])
116 dnl Checks for programs.
117 AC_PROG_CC
118 AM_PROG_CC_C_O
119 AC_PROG_CXX
120 LT_PREREQ([2.2.6])
121 LT_INIT([disable-static])
122 AC_PROG_INSTALL
123 PKG_PROG_PKG_CONFIG
124 AC_FUNC_ALLOCA
126 dnl Check for Sun compiler
127 AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
129 dnl Check for Win32
130 case "$host" in
131         *-*-mingw* | *-*-cygwin*)
132                 is_win32="yes"
133                 is_not_win32="no"
134                 LIBS="$LIBS -lws2_32"
135                 DNSAPI_LIBS="-ldnsapi"
136                 PLUGIN_LDFLAGS="-avoid-version -no-undefined"
137                 AC_SUBST(DNSAPI_LIBS)
138                 AC_CHECK_TOOL(WINDRES, windres)
139                 AC_DEFINE(IS_WIN32_CROSS_COMPILED, 1,
140                         [Define to 1, when building with autotools (not necessarily
141                         cross-compiling) for windows. It's a temporary hack to remain
142                         non-autotools win32 build working. Drop it when we fully
143                         switch our win32 build to autotools.])
144                 AC_DEFINE(WIN32_LEAN_AND_MEAN, 1,
145                         [Define to 1, to build faster for win32.])
146                 ;;
147         *)
148                 is_win32="no"
149                 is_not_win32="yes"
150                 PLUGIN_LDFLAGS="-avoid-version"
151                 ;;
152 esac
153 AM_CONDITIONAL(IS_WIN32, test "x$is_win32" = "xyes")
154 AC_SUBST([PLUGIN_LDFLAGS])
156 dnl Define *_LIBS
157 PURPLE_LIBS="\$(top_builddir)/libpurple/libpurple.la \$(GLIB_LIBS) \$(GPLUGIN_LIBS)"
158 PIDGIN_LIBS="\$(top_builddir)/pidgin/libpidgin.la \$(GTK_LIBS) \$(PURPLE_LIBS) \$(WEBKIT_LIBS)"
159 FINCH_LIBS="\$(top_builddir)/finch/libfinch.la \$(top_builddir)/finch/libgnt/libgnt.la \$(PURPLE_LIBS)"
160 AC_SUBST(PURPLE_LIBS)
161 AC_SUBST(PIDGIN_LIBS)
162 AC_SUBST(FINCH_LIBS)
164 dnl Checks for header files.
165 AC_HEADER_SYS_WAIT
166 AC_CHECK_HEADERS(fcntl.h unistd.h stdint.h)
168 dnl Checks for typedefs, structures, and compiler characteristics.
169 AC_CHECK_SIZEOF(time_t, ,[
170 #include <stdio.h>
171 #include <time.h>])
173 AC_C_BIGENDIAN
175 AC_ARG_WITH(win32-dirs, [AS_HELP_STRING([--with-win32-dirs=<classic|fhs>],
176         [use win32 classic (Program Files-like) or FHS (unix-like) directory structure (default: classic)])], [
177                 if test "x$withval" != "xclassic" -a "x$withval" != "xfhs" ; then
178                         AC_MSG_ERROR([Unsupported win32-dirs option. Please choose "classic" or "fhs".])
179                 fi
180                 with_win32_dirs="$withval"
181         ], with_win32_dirs="classic")
182 if test "x$is_win32" = "xyes" -a "x$with_win32_dirs" = "xfhs" ; then
183         AC_DEFINE(USE_WIN32_FHS, 1, [Define to 1, to use FHS on win32.])
186 dnl Check for directories
187 if test "x$is_win32" = "xyes" ; then
188         if test "x$with_win32_dirs" = "xfhs" ; then
189                 AS_AC_EXPAND(win32_fhs_bindir, "$bindir")
190                 AC_DEFINE_UNQUOTED([WIN32_FHS_BINDIR], ["$win32_fhs_bindir"],
191                         [bindir, as defined by configure])
192                 AS_AC_EXPAND(win32_fhs_libdir, "$libdir")
193                 AC_DEFINE_UNQUOTED([WIN32_FHS_LIBDIR], ["$win32_fhs_libdir"],
194                         [libdir, as defined by configure])
195                 AS_AC_EXPAND(win32_fhs_datadir, "$datadir")
196                 AC_DEFINE_UNQUOTED([WIN32_FHS_DATADIR], ["$win32_fhs_datadir"],
197                         [datadir, as defined by configure])
198                 AS_AC_EXPAND(win32_fhs_sysconfdir, "$sysconfdir")
199                 AC_DEFINE_UNQUOTED([WIN32_FHS_SYSCONFDIR], ["$win32_fhs_sysconfdir"],
200                         [sysconfdir, as defined by configure])
201                 AS_AC_EXPAND(win32_fhs_localedir, "$localedir")
202                 AC_DEFINE_UNQUOTED([WIN32_FHS_LOCALEDIR], ["$win32_fhs_localedir"],
203                         [localedir, as defined by configure])
205                 purple_libdir="wpurple_lib_dir(\"purple-$PURPLE_MAJOR_VERSION\")"
206                 pidgin_libdir="wpurple_lib_dir(\"pidgin-$PURPLE_MAJOR_VERSION\")"
207                 finch_libdir="wpurple_lib_dir(\"finch-$PURPLE_MAJOR_VERSION\")"
208         else
209                 purple_libdir="wpurple_lib_dir(NULL)"
210                 pidgin_libdir="wpurple_lib_dir(NULL)"
211                 finch_libdir="wpurple_lib_dir(NULL)"
212         fi
214         purple_datadir="wpurple_data_dir()"
215         purple_sysconfdir="wpurple_sysconf_dir()"
216         purple_localedir="wpurple_locale_dir()"
217 else
218         AS_AC_EXPAND(purple_datadir, "$datadir")
219         purple_datadir="\"$purple_datadir\""
220         AS_AC_EXPAND(purple_sysconfdir, "$sysconfdir")
221         purple_sysconfdir="\"$purple_sysconfdir\""
222         AS_AC_EXPAND(purple_localedir, "$localedir")
223         purple_localedir="\"$purple_localedir\""
225         AS_AC_EXPAND(common_libdir, "$libdir")
226         purple_libdir="\"$common_libdir/purple-$PURPLE_MAJOR_VERSION\""
227         pidgin_libdir="\"$common_libdir/pidgin-$PURPLE_MAJOR_VERSION\""
228         finch_libdir="\"$common_libdir/finch-$PURPLE_MAJOR_VERSION\""
230 AC_DEFINE_UNQUOTED([PURPLE_DATADIR], [$purple_datadir],
231         [datadir to use, may expand into a function call that returns const char *])
232 AC_DEFINE_UNQUOTED([PURPLE_LIBDIR], [$purple_libdir],
233         [libdir to use for libpurple, may expand into a function call that returns const char *])
234 AC_DEFINE_UNQUOTED([PIDGIN_LIBDIR], [$pidgin_libdir],
235         [libdir to use for Pidgin, may expand into a function call that returns const char *])
236 AC_DEFINE_UNQUOTED([FINCH_LIBDIR], [$finch_libdir],
237         [libdir to use for Finch, may expand into a function call that returns const char *])
238 AC_DEFINE_UNQUOTED([PURPLE_SYSCONFDIR], [$purple_sysconfdir],
239         [sysconfdir to use, may expand into a function call that returns const char *])
240 AC_DEFINE_UNQUOTED([PURPLE_LOCALEDIR], [$purple_localedir],
241         [localedir to use, may expand into a function call that returns const char *])
243 PURPLE_PLUGINDIR="\$(libdir)/purple-$PURPLE_MAJOR_VERSION"
244 AC_SUBST([PURPLE_PLUGINDIR])
245 PIDGIN_PLUGINDIR="\$(libdir)/pidgin-$PURPLE_MAJOR_VERSION"
246 AC_SUBST([PIDGIN_PLUGINDIR])
247 FINCH_PLUGINDIR="\$(libdir)/finch-$PURPLE_MAJOR_VERSION"
248 AC_SUBST([FINCH_PLUGINDIR])
250 dnl Checks for library functions.
251 AC_CHECK_FUNCS(strdup)
252 dnl Checks for getopt in standard library
253 AC_CHECK_FUNCS(getopt_long,,
255         AC_LIBOBJ(getopt)
256         AC_LIBOBJ(getopt1)
259 dnl Check for inet_aton
260 if test "x$is_win32" != "xyes" ; then
261         AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
262                 [AC_MSG_ERROR([inet_aton not found])])])
264 AC_CHECK_LIB(resolv, __res_query)
265 AC_CHECK_LIB(nsl, gethostent)
266 if test "x$is_win32" = "xyes" ; then
267         AC_DEFINE(HAVE_GETADDRINFO, 1, [Define to 1 if you have the getaddrinfo function.])
268         AC_DEFINE(HAVE_INET_NTOP, 1, [Define to 1 if you have the `inet_ntop' function.])
269 else
270         AC_CHECK_FUNC(socket, , [AC_CHECK_LIB(socket, socket, ,
271                 [AC_MSG_ERROR([socket not found])])])
272         dnl If all goes well, by this point the previous two checks will have
273         dnl pulled in -lsocket and -lnsl if we need them.
274         AC_CHECK_FUNC(getaddrinfo,
275                 [AC_DEFINE([HAVE_GETADDRINFO], [1],
276                         [Define to 1 if you have the getaddrinfo function.])],
277                 [AC_CHECK_LIB(socket, getaddrinfo,
278                         [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lnsl $LIBS"], , -lnsl)])
279         AC_CHECK_FUNCS(inet_ntop)
281 AC_CHECK_FUNCS(getifaddrs)
282 dnl Check for socklen_t (in Unix98)
283 AC_MSG_CHECKING(for socklen_t)
284 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
285         #include <sys/types.h>
286         #ifdef _WIN32
287         #  include <ws2tcpip.h>
288         #else
289         #  include <sys/socket.h>
290         #endif
291         socklen_t x;
292 ]], [[]])], [
293         AC_MSG_RESULT(yes)
294 ], [
295         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
296                 #include <sys/types.h>
297                 #ifdef _WIN32
298                 #  include <ws2tcpip.h>
299                 #else
300                 #  include <sys/socket.h>
301                 #endif
302                 int accept(int, struct sockaddr *, size_t *);
303         ]], [[]])], [
304                 AC_MSG_RESULT(size_t)
305                 AC_DEFINE(socklen_t, size_t, [socklen_t size])
306         ], [
307                 AC_MSG_RESULT(int)
308                 AC_DEFINE(socklen_t, int, [socklen_t size])
309         ])
312 dnl Some systems do not have sa_len field for struct sockaddr.
313 AC_CHECK_MEMBER([struct sockaddr.sa_len],
314         [AC_DEFINE([HAVE_STRUCT_SOCKADDR_SA_LEN],[1],
315         [Define if struct sockaddr has an sa_len member])],[:],
316         [
317                 #ifdef _WIN32
318                 #  include <ws2tcpip.h>
319                 #else
320                 #  include <sys/socket.h>
321                 #endif
322         ])
324 dnl Check for v6-only sockets
325 AC_CHECK_DECL([IPV6_V6ONLY],
326         [AC_DEFINE([HAVE_IPV6_V6ONLY],[1],
327         [Define if the IPV6_V6ONLY setsockopt option exists])],
328         [], [
329                 #ifdef _WIN32
330                 #  include <ws2tcpip.h>
331                 #else
332                 #  include <netinet/in.h>
333                 #endif
334         ])
336 dnl to prevent the g_stat()/g_unlink() crash,
337 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
338 AC_SYS_LARGEFILE
340 dnl FreeBSD doesn't have libdl, dlopen is provided by libc
341 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
343 dnl Windows and Haiku do not use libm for the math functions, they are part
344 dnl of the C library
345 AC_SEARCH_LIBS([ceil], [m], [], [
346   AC_MSG_ERROR([unable to find the ceil() function])
349 AC_MSG_CHECKING([for fileno()])
350 AC_RUN_IFELSE([AC_LANG_SOURCE([[
351 #include <stdio.h>
353 int main(int argc, char *argv[])
355         int fd;
357         fd = fileno(stdout);
359         return !(fd > 0);
361 ]])], [
362         AC_MSG_RESULT(yes)
363         AC_DEFINE([HAVE_FILENO], [1],
364                   [Define to 1 if your stdio has int fileno(FILE *).])
365 ], [
366         AC_MSG_RESULT(no)
367 ], [
368         # Fallback for Cross Compiling...
369         # This will enable the compatibility code.
370         AC_MSG_RESULT(no)
373 AC_MSG_CHECKING([for the %z format string in strftime()])
374 AC_RUN_IFELSE([AC_LANG_SOURCE([[
375 #include <time.h>
376 #include <stdio.h>
378 int main()
380         char buf[64];
381         time_t t = time(NULL);
383         if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5)
384                 return 1;
386         fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf);
388         return !((buf[0] == '-' || buf[0] == '+') &&
389                  (buf[1] >= '0' && buf[1] <= '9') &&
390                  (buf[2] >= '0' && buf[2] <= '9') &&
391                  (buf[3] >= '0' && buf[3] <= '9') &&
392                  (buf[4] >= '0' && buf[4] <= '9')
393                 );
395 ]])], [
396         AC_MSG_RESULT(yes)
397         AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
398                 [Define to 1 if you have a strftime() that supports the %z format string.])
399 ], [
400         AC_MSG_RESULT(no)
401 ], [
402         # Fallback for Cross Compiling...
403         # This will enable the compatibility code.
404         AC_MSG_RESULT(no)
407 # before gettexting, in case iconv matters
408 case "$host_os" in
409 darwin*)
410         AC_CHECK_LIB(resolv, res_query)
412         AC_CHECK_HEADER(CoreFoundation/CoreFoundation.h, [
413                 AC_CHECK_HEADER(IOKit/IOKitLib.h, [
414                         AC_DEFINE(HAVE_IOKIT, 1, [Define if we have IOKit])
415                         LIBS="$LIBS -framework IOKit -framework CoreFoundation"
416                 ], [])
417         ], [])
419         AC_MSG_CHECKING([for fink])
420         if test -d /sw; then
421                 AC_MSG_RESULT([found, adding /sw to search paths])
422                 CPPFLAGS="$CPPFLAGS -I/sw/include"
423                 LDFLAGS="$LDFLAGS -L/sw/lib"
424         else
425                 AC_MSG_RESULT([not found])
426         fi
427         ;;
429         ;;
430 esac
432 dnl #######################################################################
433 dnl # Disable creation and installation of translation files
434 dnl #######################################################################
435 AC_ARG_ENABLE(nls, AS_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes)
437 if test x$enable_i18n = xyes; then
438         IT_PROG_INTLTOOL
439         GETTEXT_PACKAGE=pidgin
440         AC_SUBST(GETTEXT_PACKAGE)
442         ALL_LINGUAS="af am ar as ast az be@latin bg bn_IN bn br brx bs ca ca@valencia cs da de dz el en_AU en_CA en_GB eo es_AR es et eu fa fi fr ga gl gu he hi hr hu id it ja ka kk km kn ko ks ku_IQ ku lt lv mai mhr mk ml mn mr ms_MY my_MM nb ne nl nn oc or pa pl ps pt_BR pt ro ru sd si sk sl sq sr@latin sr sv sw ta te th tr tt uk ur uz vi xh zh_CN zh_HK zh_TW"
443         AM_GLIB_GNU_GETTEXT
445         dnl If we don't have msgfmt, then po/ is going to fail -- ensure that
446         dnl AM_GLIB_GNU_GETTEXT found it.
448         if test x$MSGFMT = xno -o x$MSGFMT$GMSGFMT$INTLTOOL_MSGFMT = x
449         then
450                 AC_MSG_ERROR([
452 The msgfmt command is required to build libpurple.  If it is installed
453 on your system, ensure that it is in your path.  If it is not, install
454 GNU gettext to continue.
456 If you have msgfmt installed, but for some reason this error message
457 is still displayed, you have encountered what appears to be a bug in
458 third-party configure macros.  Try setting the MSGFMT environment
459 variable to the absolute path to your msgfmt binary and trying
460 configure again, like this:
462 MSGFMT=/path/to/msgfmt ./configure ...
463         ])
464         fi
465 fi #enable_i18n
467 AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes")
469 dnl #######################################################################
470 dnl # Check for GLib 2.36 (required)
471 dnl #######################################################################
472 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.36.0 gio-2.0 gobject-2.0 gthread-2.0], , [
473         AC_MSG_RESULT(no)
474         AC_MSG_ERROR([
476 You must have GLib 2.36.0 or newer development headers installed to build.
478 If you have these installed already you may need to install pkg-config so
479 I can find them.
480 ])])
481 AC_SUBST(GLIB_CFLAGS)
482 AC_SUBST(GLIB_LIBS)
484 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
485 AC_SUBST(GLIB_GENMARSHAL)
487 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
488 AC_SUBST(GLIB_MKENUMS)
490 AC_PATH_PROG(GLIB_COMPILE_RESOURCES, [glib-compile-resources])
492 AC_PATH_PROG(GTESTER, gtester)
493 GLIB_TESTS
495 AC_ARG_WITH([extraversion],
496                         AS_HELP_STRING([--with-extraversion=STRING],
497                                                    [extra version number to be displayed in Help->About and --help (for packagers)]),
498                                                    EXTRA_VERSION=$withval)
500 if test x"$EXTRA_VERSION" != "x" ; then
501         AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION-$EXTRA_VERSION", [display version info])
502 else
503         AC_DEFINE_UNQUOTED(DISPLAY_VERSION, "$VERSION", [display version info])
506 AC_ARG_ENABLE(missing-dependencies, [AS_HELP_STRING([--disable-missing-dependencies],
507                 [skip missing dependencies instead of aborting configure])],
508         force_deps="$enableval", force_deps="yes")
510 AC_ARG_WITH(x, [],
511         with_x="$withval", with_x="$is_not_win32")
512 AC_ARG_ENABLE(gtkui, [AS_HELP_STRING([--disable-gtkui],
513                 [compile without GTK+ user interface])],
514         enable_gtkui="$enableval", enable_gtkui="yes")
515 AC_ARG_ENABLE(consoleui, [AS_HELP_STRING([--disable-consoleui],
516                 [compile without console user interface])],
517         [enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no])
519 dnl #######################################################################
520 dnl # Check for GTK+ 2.18 and other things used by the GTK UI
521 dnl #######################################################################
522 AC_ARG_ENABLE(screensaver,
523         [AS_HELP_STRING([--disable-screensaver],
524                 [compile without X screensaver extension (used to detect idleness)])],
525         enable_screensaver="$enableval", enable_screensaver="yes")
526 AC_ARG_ENABLE(startup-notification,
527         [AS_HELP_STRING([--disable-startup-notification],
528                 [compile without startup notification support])],
529         enable_startup_notification="$enableval", enable_startup_notification="yes")
530 AC_ARG_ENABLE(enchant,
531         [AS_HELP_STRING([--disable-enchant],
532                 [compile without Enchant spell checking support])],
533         enable_enchant="$enableval", enable_enchant="yes")
534 AC_ARG_ENABLE(gevolution,
535         [AS_HELP_STRING([--enable-gevolution],
536                 [compile with the Evolution plugin])],
537         enable_gevolution="$enableval", enable_gevolution="no")
538 AC_ARG_ENABLE(cap,
539         [AS_HELP_STRING([--enable-cap],
540                 [compile with Contact Availability Prediction plugin])],
541         enable_cap="$enableval", enable_cap="no")
542 AC_ARG_ENABLE(gestures,
543         [AS_HELP_STRING([--disable-gestures],
544                 [compile without the gestures plugin])],
545         enable_gestures="$enableval", enable_gestures="yes")
546 AC_ARG_ENABLE(gcr,
547         [AS_HELP_STRING([--enable-gcr],
548                 [compile with GCR certificate widgets])],
549         enable_gcr="$enableval", enable_gcr="no")
551 AC_PATH_XTRA
552 # We can't assume that $x_libraries will be set, because autoconf does not
553 # set it in the case when the X libraries are in a standard place.
554 # Ditto for $x_includes
555 if test X"$x_libraries" = X"" || test X"$x_libraries" = XNONE; then
556     x_libpath_add=
557 else
558     x_libpath_add="-L$x_libraries"
560 if test X"$x_includes" = X"" || test X"$x_includes" = XNONE; then
561     x_incpath_add=
562 else
563     x_incpath_add="-I$x_includes"
566 dnl #######################################################################
567 dnl Check Pidgin dependencies
568 dnl #######################################################################
569 if test "x$enable_gtkui" = "xyes" ; then
570         PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.4.2], , [
571                 AC_MSG_RESULT(no)
572                 AC_MSG_ERROR([
573 You must have GTK+ 3.4.2 or newer development headers installed to compile
574 Pidgin.  If you want to build only Finch then specify --disable-gtkui when
575 running configure.
576 ])])
577         AC_SUBST(GTK_CFLAGS)
578         AC_SUBST(GTK_LIBS)
580         dnl We only really need Pango >= 1.4 for decent RTL support
581         PKG_CHECK_MODULES(PANGO, [pango >= 1.4.0],
582                         AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:)
584         WEBKIT_VERSION=1.3.7
585         PKG_CHECK_MODULES(WEBKIT, ["webkitgtk-3.0" >= $WEBKIT_VERSION], , [
586                 AC_MSG_RESULT(no)
587                 AC_MSG_ERROR([
588 You must have WebKit for GTK+3 $WEBKIT_VERSION or newer development headers
589 installed to compile Pidgin.  If you want to build only Finch then specify
590 --disable-gtkui when running configure.
591 ])])
592         AC_SUBST(WEBKIT_CFLAGS)
593         AC_SUBST(WEBKIT_LIBS)
595         dnl #######################################################################
596         dnl # Check if we should compile with enchant support
597         dnl #######################################################################
598         dnl We need enchant for spell checking dictionary enumeration,
599         dnl because webkit1 doesn't have this.
600         use_enchant=no
601         if test "x$enable_enchant" = "xyes" ; then
602                 use_enchant=yes
603                 PKG_CHECK_MODULES(ENCHANT, enchant, , [
604                         AC_MSG_RESULT(no)
605                         use_enchant=no
606                 ])
607                 if test "x$force_deps" = "xyes" -a "x$use_enchant" = "xno"; then
608                         AC_MSG_ERROR([
609 Enchant development headers not found.
610 Use --disable-enchant if you do not need it.
612                 fi
613                 if test "x$use_enchant" = "xyes" ; then
614                         AC_DEFINE(USE_ENCHANT, 1, [Define if we're using enchant])
615                         AC_SUBST(ENCHANT_CFLAGS)
616                         AC_SUBST(ENCHANT_LIBS)
617                 fi
618         fi
620         dnl #######################################################################
621         dnl # Check if we should compile with X support
622         dnl #######################################################################
623         if test "x$with_x" = "xyes" ; then
624                 PKG_CHECK_MODULES(X11, x11,
625                         [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])],
626                         [AC_MSG_RESULT(no)
627                                 if test "x$x_incpath_add" != "x" -a "x$x_libpath_add" != "x"; then
628                                         X11_LIBS="$x_libpath_add"
629                                         X11_CFLAGS="$x_incpath_add"
630                                 else
631                                         with_x="no"
632                                         if test "x$force_deps" = "xyes" ; then
633                                                 AC_MSG_ERROR([
634 X11 development headers not found.
635 Use --without-x if you do not need X11 support.
637                                         fi
638                                 fi
639                         ])
640                 AC_SUBST(X11_LIBS)
641                 AC_SUBST(X11_CFLAGS)
642         else
643                 enable_screensaver=no
644                 enable_gestures=no
645         fi
647         dnl #######################################################################
648         dnl # Check for XScreenSaver
649         dnl #######################################################################
650         if test "x$enable_screensaver" = "xyes" ; then
651                 if test "x$with_x" = "xyes" ; then
652                         old_LIBS="$LIBS"
653                         LIBS="$LIBS $GTK_LIBS $x_libpath_add"
654                         XSS_LIBS=""
655                         XSS_HEADERS=""
656                         AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm])
657                         AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm])
658                         if test "x$XSS_LIBS" != "x"; then
659                                 oldCPPFLAGS="$CPPFLAGS"
660                                 CPPFLAGS="$CPPFLAGS $x_incpath_add"
661                                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
662                                         #include <X11/Xlib.h>
663                                         #include <X11/extensions/scrnsaver.h>
664                                         ]], [[]])], [], [enable_screensaver=no])
665                                 CPPFLAGS="$oldCPPFLAGS"
666                         else
667                                 enable_screensaver=no
668                         fi
669                         LIBS="$old_LIBS"
671                         if test "x$enable_screensaver" = "xyes" ; then
672                                 AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])
673                                 AC_SUBST(XSS_LIBS)
674                         else
675                                 if test "x$force_deps" = "xyes" ; then
676                                         AC_MSG_ERROR([
677 XScreenSaver extension development headers (libXScrnSaver-devel or libxss-dev) not found.
678 Use --disable-screensaver if you do not need XScreenSaver extension support,
679 this is required for detecting idle time by mouse and keyboard usage.
681                                 fi
682                         fi
683                 else
684                         AC_MSG_ERROR([X support is required to build with XScreenSaver extensions])
685                 fi
686         fi
688         dnl #######################################################################
689         dnl # Check for X11 to allow the gestures plugin
690         dnl #######################################################################
691         if test "x$enable_gestures" = "xyes"; then
692                 if test "x$with_x" = "xno" ; then
693                         enable_gestures=no
694                 fi
695         fi
697         dnl #######################################################################
698         dnl # Check for stuff needed by the Evolution integration plugin.
699         dnl #######################################################################
700         if test "x$enable_gevolution" = "xyes"; then
701                 evo_deps="libebook-1.2 libedata-book-1.2 evolution-data-server-1.2 >= 3.6"
702                 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, , [
703                         enable_gevolution="no"
704                 ])
705                 if test "x$enable_gevolution" = "xyes"; then
706                         AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.])
707                         AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
708                         AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
709                 else
710                         if test "x$force_deps" = "xyes" ; then
711                                 AC_MSG_ERROR([
712 Evolution development headers not found (libebook, libedata-book, evolution-data-server >= 3.6).
713 Use --disable-gevolution if you do not need it.
715                         fi
716                 fi
717         fi
719         dnl #######################################################################
720         dnl # Check for libsqlite3 (for the Contact Availability Prediction plugin)
721         dnl #######################################################################
722         if test "x$enable_cap" = "xyes"; then
723                 PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[
724                         AC_MSG_RESULT(no)
725                         enable_cap="no"
726                         if test "x$force_deps" = "xyes" ; then
727                                 AC_MSG_ERROR([
728 sqlite3 development headers not found.
729 Use --disable-cap if you do not need the Contact Availability Prediction plugin.
731                         fi])
732         fi
734         dnl #######################################################################
735         dnl # Check for GCR for its certificate widgets
736         dnl #######################################################################
737         if test "x$enable_gcr" = "xyes"; then
738                 PKG_CHECK_MODULES(GCR, gcr-3, [
739                         AC_DEFINE(ENABLE_GCR, 1, [Define to 1 if GCR is found.])], [
740                         AC_MSG_RESULT(no)
741                         enable_gcr="no"
742                         if test "x$force_deps" = "xyes" ; then
743                                 AC_MSG_ERROR([
744 GCR for GTK+3 development headers not found.
745 Use --disable-gcr if you do not need GCR certificate widgets.
747                         fi])
748         fi
751 else # GTK
752         enable_gcr=no
753         enable_cap=no
754         enable_gevolution=no
755         enable_screensaver=no
756         enable_startup_notification=no
757 fi      # GTK
759 AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtkui" = "xyes")
760 AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$enable_gevolution" = "xyes")
761 AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes")
762 AM_CONDITIONAL(ENABLE_GESTURES, test "x$enable_gestures" = "xyes")
763 AM_CONDITIONAL(ENABLE_GCR, test "x$enable_gcr" = "xyes")
766 dnl #######################################################################
767 dnl # Check for ncurses and other things used by the console UI
768 dnl #######################################################################
769 GNT_LIBS=""
770 GNT_CFLAGS=""
771 AC_ARG_WITH(ncurses-headers, [AS_HELP_STRING([--with-ncurses-headers=DIR],
772                 [compile finch against the ncurses includes in DIR])],
773                 [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""])
774 if test "x$enable_consoleui" = "xyes"; then
775         AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no])
776         AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"],
777             [enable_consoleui=no], [$GNT_LIBS])
779         if test "x$is_win32" = "xyes" ; then
780                 ncurses_sys_prefix="/usr/$host/sys-root/mingw"
781         else
782                 ncurses_sys_prefix="/usr"
783         fi
785         ncurses_sys_dirs="$ncurses_sys_prefix/include/ncursesw $ncurses_sys_prefix/include"
787         if test "x$enable_consoleui" = "xyes"; then
788                 dnl # Some distros put the headers in ncursesw/, some don't
789                 found_ncurses_h=no
790                 for location in $ac_ncurses_includes $NCURSES_HEADERS $ncurses_sys_dirs
791                 do
792                         f="$location/ncurses.h"
793                         orig_CFLAGS="$CFLAGS"
794                         orig_CPPFLAGS="$CPPFLAGS"
795                         CFLAGS="$CFLAGS -I$location"
796                         CPPFLAGS="$CPPFLAGS -I$location"
797                         AC_CHECK_HEADER($f,[
798                                 AC_MSG_CHECKING([if $f supports wide characters])
799                                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
800                                         #define _XOPEN_SOURCE_EXTENDED
801                                         #include <$f>
802                                 ]], [[
803                                         #ifndef get_wch
804                                         # error get_wch not found!
805                                         #endif
806                                 ]])], [
807                                         dir=$location
808                                         if test x"$dir" != x"." ; then
809                                                 GNT_CFLAGS="-I$dir/"
810                                         else
811                                                 GNT_CFLAGS=""
812                                         fi
814                                         found_ncurses_h=yes
815                                         CFLAGS="$orig_CFLAGS"
816                                         CPPFLAGS="$orig_CPPFLAGS"
817                                         AC_MSG_RESULT([yes])
818                                         break
819                                 ], [
820                                         CFLAGS="$orig_CFLAGS"
821                                         CPPFLAGS="$orig_CPPFLAGS"
822                                         AC_MSG_RESULT([no])
823                                 ])
824                         ])
825                 done
827                 if test x"$found_ncurses_h" = x"no" ; then
828                         GNT_LIBS=""
829                         GNT_CFLAGS=""
830                         enable_consoleui=no
831                 fi
832         else
833                 # ncursesw was not found. Look for plain old ncurses
834                 enable_consoleui=yes
835                 AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no])
836                 AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"],
837                     [enable_consoleui=no], [$GNT_LIBS])
838                 AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.])
839                 if test x"$ac_ncurses_includes" != "x"; then
840                         GNT_CFLAGS="-I$ac_ncurses_includes"
841                 else
842                         if test x"$NCURSES_HEADERS" != "x"; then
843                                 GNT_CFLAGS="-I$NCURSES_HEADERS"
844                         fi
845                 fi
846         fi
849 if test "x$force_finch" = "xyes" -a "x$enable_consoleui" != "xyes"; then
850         AC_MSG_ERROR([
852 Finch will not be built. You need to install ncursesw (or ncurses) and its development headers.
857 AC_SUBST(GNT_LIBS)
858 AC_SUBST(GNT_CFLAGS)
859 AM_CONDITIONAL(ENABLE_GNT, test "x$enable_consoleui" = "xyes")
861 #AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])])
863 dnl #######################################################################
864 dnl # Check for LibXML2 (required)
865 dnl #######################################################################
866 PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= 2.6.0], , [
867         AC_MSG_RESULT(no)
868         AC_MSG_ERROR([
869 You must have libxml2 >= 2.6.0 development headers installed to build.
870 ])])
871 PKG_CHECK_EXISTS([libxml-2.0 >= 2.6.18], , [
872         AC_MSG_WARN([
873 Versions of libxml2 < 2.6.18 may contain bugs that could cause XMPP messages to be discarded.
874 ])])
876 AC_SUBST(LIBXML_CFLAGS)
877 AC_SUBST(LIBXML_LIBS)
879 dnl #######################################################################
880 dnl # Check for JSON-GLib (required)
881 dnl #######################################################################
883 PKG_CHECK_MODULES([JSON], [json-glib-1.0 >= 0.14.0], , [
884         AC_MSG_RESULT(no)
885         AC_MSG_ERROR([
886 You must have JSON-GLib >= 0.14.0 development headers installed to build.
887 ])])
889 AC_SUBST(JSON_CFLAGS)
890 AC_SUBST(JSON_LIBS)
892 dnl #######################################################################
893 dnl # Check for zlib (required)
894 dnl #######################################################################
896 PKG_CHECK_MODULES(ZLIB, [zlib >= 1.2.0], , [
897         AC_SEARCH_LIBS([deflate], [z], [], AC_MSG_ERROR([You must have zlib >= 1.2.0 development headers installed to build.]), [])
900 AC_SUBST(ZLIB_CFLAGS)
901 AC_SUBST(ZLIB_LIBS)
903 dnl #######################################################################
904 dnl # Check for GStreamer
905 dnl #######################################################################
906 AC_ARG_ENABLE(gstreamer,
907         [AS_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
908         enable_gst="$enableval", enable_gst="yes")
910 if test x"$enable_gst" != "xno"; then
911         PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0], [
912            AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
913            AC_SUBST(GSTREAMER_CFLAGS)
914            AC_SUBST(GSTREAMER_LIBS)
915    ], [
916            AC_MSG_RESULT(no)
917            enable_gst="no"
918            if test "x$force_deps" = "xyes" ; then
919                    AC_MSG_ERROR([
920  GStreamer development headers not found.
921  Use --disable-gstreamer if you do not need GStreamer (sound) support.
922                                          ])
923            fi
924    ])
927 dnl #######################################################################
928 dnl # Check for GStreamer Video
929 dnl #######################################################################
930 if test "x$enable_gst" != "xno"; then
931         AC_ARG_ENABLE(gstreamer-video,
932                 [AS_HELP_STRING([--disable-gstreamer-video], [compile without GStreamer 1.0 Video Overlay support])],
933                         enable_gstvideo="$enableval", enable_gstvideo="yes")
934         if test "x$enable_gstvideo" != "xno"; then
935                 PKG_CHECK_MODULES(GSTVIDEO, [gstreamer-video-1.0], [
936                         AC_DEFINE(USE_GSTVIDEO, 1, [Use GStreamer Video Overlay support])
937                         AC_SUBST(GSTVIDEO_CFLAGS)
938                         AC_SUBST(GSTVIDEO_LIBS)
939                 ], [
940                         enable_gstvideo="no"
941                 ])
942         fi
943 else
944         enable_gstvideo="no"
947 dnl #######################################################################
948 dnl # Check for Farstream
949 dnl #######################################################################
950 AC_ARG_ENABLE(farstream,
951         [AS_HELP_STRING([--disable-farstream], [compile without farstream support])],
952         enable_farstream="$enableval", enable_farstream="yes")
953 if test "x$enable_farstream" != "xno"; then
954         PKG_CHECK_MODULES(FARSTREAM, [farstream-0.2 >= 0.2.7], [
955                 AC_SUBST(FARSTREAM_CFLAGS)
956                 AC_SUBST(FARSTREAM_LIBS)
957         ], [
958                         enable_farstream="no"
959         ])
962 dnl #######################################################################
963 dnl # Check for Voice and Video support
964 dnl #######################################################################
965 AC_ARG_ENABLE(vv,
966         [AS_HELP_STRING([--disable-vv], [compile without voice and video support])],
967         enable_vv="$enableval", enable_vv="yes")
968 if test "x$enable_vv" != "xno"; then
969         if test "x$enable_gst" != "xno" -a "x$enable_gstvideo" != "xno" -a "x$enable_farstream" != "xno"; then
970                 AC_DEFINE(USE_VV, 1, [Use voice and video])
971         else
972                 enable_vv="no"
973                 if test "x$force_deps" = "xyes"; then
974                         AC_MSG_ERROR([
975 Dependencies for voice/video were not met.
976 Install the necessary gstreamer and farstream packages first.
977 Or use --disable-vv if you do not need voice/video support.
978                         ])
979                 fi
980         fi
982 AM_CONDITIONAL(USE_VV, test "x$enable_vv" != "xno")
984 dnl #######################################################################
985 dnl # Check for Raw data streams support in Farstream 
986 dnl #######################################################################
987 if test "x$enable_vv" != "xno"; then
988         PKG_CHECK_MODULES(GSTAPP, [gstreamer-app-1.0], [
989                 AC_DEFINE(USE_GSTAPP, 1, [Use GStreamer Video Overlay support])
990                 AC_SUBST(GSTAPP_CFLAGS)
991                 AC_SUBST(GSTAPP_LIBS)
992                 AC_DEFINE(HAVE_MEDIA_APPLICATION, 1, [Define if we have support for application media type.])
993                 ] , )
996 dnl #######################################################################
997 dnl # Check for Internationalized Domain Name support
998 dnl #######################################################################
1000 AC_ARG_ENABLE(idn,
1001         [AS_HELP_STRING([--disable-idn], [compile without IDN support])],
1002         [enable_idn="$enableval" force_idn=$enableval], [enable_idn="yes" force_idn=no])
1003 if test "x$enable_idn" != "xno"; then
1004         PKG_CHECK_MODULES(IDN, libidn >= 0.0.0, [
1005                 AC_DEFINE(USE_IDN, 1, [Use GNU Libidn for stringprep and IDN])
1006                 AC_SUBST(IDN_CFLAGS)
1007                 AC_SUBST(IDN_LIBS)
1008         ], [
1009                 AC_MSG_RESULT(no)
1010                 enable_idn="no"
1011                 if test "x$force_deps" = "xyes" ; then
1012                         AC_MSG_ERROR([
1013 GNU Libidn development headers not found.
1014 Use --disable-idn if you do not need it.
1016                 fi
1017         ])
1020 dnl #######################################################################
1021 dnl # Check for Meanwhile headers (for Sametime)
1022 dnl #######################################################################
1023 AC_ARG_ENABLE(meanwhile,
1024         [AS_HELP_STRING([--disable-meanwhile],
1025                 [compile without meanwhile (required for Sametime support)])],
1026         enable_meanwhile="$enableval", enable_meanwhile="yes")
1027 if test "x$enable_meanwhile" = "xyes"; then
1028         PKG_CHECK_MODULES(MEANWHILE, [meanwhile >= 1.0.0 meanwhile < 2.0.0], [
1029                 have_meanwhile="yes"
1030         ], [
1031                 have_meanwhile="no"
1032                 if test "x$force_deps" = "xyes" ; then
1033                         AC_MSG_ERROR([
1034 Meanwhile development headers not found.
1035 Use --disable-meanwhile if you do not need meanwhile (Sametime) support.
1037                 fi])
1039 AC_SUBST(MEANWHILE_CFLAGS)
1040 AC_SUBST(MEANWHILE_LIBS)
1042 dnl #######################################################################
1043 dnl # Check for Native Avahi headers (for Bonjour)
1044 dnl #######################################################################
1045 AC_ARG_ENABLE(avahi,
1046         [AS_HELP_STRING([--disable-avahi],
1047                 [compile without avahi (required for Bonjour support)])],
1048         enable_avahi="$enableval", enable_avahi="yes")
1050 if test "x$enable_avahi" = "xyes" -a "x$is_win32" = "xyes" ; then
1051         avahiincludes="yes"
1052         avahilibs="yes"
1053 elif test "x$enable_avahi" = "xyes"; then
1054         AC_ARG_WITH(avahi-client-includes, [AS_HELP_STRING([--with-avahi-client-includes=DIR], [compile the Bonjour plugin against the Avahi Client includes in DIR])], [ac_avahi_client_includes="$withval"], [ac_avahi_client_includes="no"])
1055         AC_ARG_WITH(avahi-client-libs, [AS_HELP_STRING([--with-avahi-client-libs=DIR], [compile the Bonjour plugin against the Avahi Client libs in DIR])], [ac_avahi_client_libs="$withval"], [ac_avahi_client_libs="no"])
1056         AVAHI_CFLAGS=""
1057         AVAHI_LIBS=""
1059         dnl Attempt to autodetect Avahi
1060         PKG_CHECK_MODULES(AVAHI, [avahi-client avahi-glib], [
1061                 avahiincludes="yes"
1062                 avahilibs="yes"
1063         ], [
1064                 avahiincludes="no"
1065                 avahilibs="no"
1066         ])
1068         dnl Override AVAHI_CFLAGS if the user specified an include dir
1069         if test "$ac_avahi_client_includes" != "no"; then
1070                 AVAHI_CFLAGS="-I$ac_avahi_client_includes"
1071         fi
1072         CPPFLAGS_save="$CPPFLAGS"
1073         CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS"
1074         AC_CHECK_HEADER(avahi-client/client.h, [avahiincludes=yes], [avahiincludes=no])
1075         CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS $GLIB_CFLAGS"
1076         AC_CHECK_HEADER(avahi-glib/glib-malloc.h, [avahiincludes=yes], [avahiincludes=no])
1077         CPPFLAGS="$CPPFLAGS_save"
1079         dnl Override AVAHI_LIBS if the user specified a libs dir
1080         if test "$ac_avahi_client_libs" != "no"; then
1081                 AVAHI_LIBS="-L$ac_avahi_client_libs -lavahi-common -lavahi-client -lavahi-glib "
1082         fi
1083         AC_CHECK_LIB(avahi-client, avahi_client_new, [avahilibs=yes], [avahilibs=no], $AVAHI_LIBS)
1086 if test "x$enable_avahi" = "xyes" -a \( "x$avahiincludes" = "xno" -o "x$avahilibs" = "xno" \); then
1087         enable_avahi="no"
1088         if test "x$force_deps" = "xyes"; then
1089                 AC_MSG_ERROR([
1090 avahi development headers not found.
1091 Use --disable-avahi if you do not need avahi (Bonjour) support.
1093         fi
1095 AC_SUBST(AVAHI_CFLAGS)
1096 AC_SUBST(AVAHI_LIBS)
1099 dnl #######################################################################
1100 dnl # Check for SILC client includes and libraries
1101 dnl #######################################################################
1102 AC_ARG_WITH(silc-includes, [AS_HELP_STRING([--with-silc-includes=DIR], [compile the SILC plugin against includes in DIR])], [ac_silc_includes="$withval"], [ac_silc_includes="no"])
1103 AC_ARG_WITH(silc-libs, [AS_HELP_STRING([--with-silc-libs=DIR], [compile the SILC plugin against the SILC libs in DIR])], [ac_silc_libs="$withval"], [ac_silc_libs="no"])
1104 SILC_CFLAGS=""
1105 SILC_LIBS=""
1106 have_silc="no"
1107 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
1108         silc_manual_check="yes"
1109 else
1110         silc_manual_check="no"
1112 if test "x$silc_manual_check" = "xno"; then
1113         PKG_CHECK_MODULES(SILC, [silcclient >= 1.1], [
1114                 have_silc="yes"
1115                 silcincludes="yes"
1116                 silcclient="yes"
1117         ], [
1118                 have_silc="no"
1119         ])
1120 else
1121         if test "$ac_silc_includes" != "no"; then
1122                 SILC_CFLAGS="-I$ac_silc_includes"
1123         fi
1124         CPPFLAGS_save="$CPPFLAGS"
1125         CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
1126         AC_CHECK_HEADER(silc.h, [silcincludes=yes])
1127         CPPFLAGS="$CPPFLAGS_save"
1129         if test "$ac_silc_libs" != "no"; then
1130                 SILC_LIBS="-L$ac_silc_libs"
1131         fi
1132         SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
1133         AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS)
1135         if test "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes"; then
1136                 have_silc="yes"
1137         fi
1139 AC_SUBST(SILC_LIBS)
1140 AC_SUBST(SILC_CFLAGS)
1141 dnl SILC Toolkit >= 1.0.1 has a new MIME API
1142 if test "x$silcclient" = "xyes"; then
1143         AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
1146 dnl #######################################################################
1147 dnl # Check for Gadu-Gadu protocol library (libgadu)
1148 dnl #######################################################################
1149 AC_ARG_ENABLE(libgadu,
1150         [AS_HELP_STRING([--disable-libgadu],
1151                 [compile without libgadu (required for GaduGadu support)])],
1152         enable_libgadu="$enableval", enable_libgadu="yes")
1154 if test "x$enable_libgadu" = "xyes"; then
1155         PKG_CHECK_MODULES(LIBGADU, [libgadu >= 1.12.0], [
1156                 have_libgadu=yes
1157                 AC_CHECK_LIB(gadu, gg_is_gpl_compliant, [ ], [
1158                         LIBGADU_LIBS=""
1159                         LIBGADU_CFLAGS=""
1160                         have_libgadu=no
1161                         if test "x$force_deps" = "xyes" ; then
1162                                 AC_MSG_WARN([
1163 libgadu is not compatible with the GPL when compiled with OpenSSL support.
1165 To link against libgadu, please recompile it using:
1166 ./configure --with-openssl=no
1167 Then rerun this ./configure
1168                                 ])
1169                         fi
1170                 ], [$LIBGADU_LIBS])
1171         ], [
1172                 have_libgadu=no
1173         ])
1175         if test "x$have_libgadu" != "xyes" -a "x$force_deps" = "xyes" ; then
1176                 AC_MSG_ERROR([
1177 Libgadu development headers not found.
1178 Use --disable-libgadu if you do not need GG (GaduGadu) support.
1180         fi
1183 AC_SUBST(LIBGADU_LIBS)
1184 AC_SUBST(LIBGADU_CFLAGS)
1187 AC_ARG_ENABLE(distrib,,,enable_distrib=no)
1188 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
1189 DYNAMIC_PRPLS=all
1190 AC_ARG_WITH(static-prpls, [AS_HELP_STRING([--with-static-prpls], [Link to certain protocols statically])], [STATIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`], [STATIC_PRPLS=""])
1191 if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then
1192         DYNAMIC_PRPLS=""
1195 if test "x$STATIC_PRPLS" = "xall" ; then
1196         STATIC_PRPLS="bonjour facebook gg irc jabber novell oscar sametime silc simple zephyr"
1198 if test "x$have_meanwhile" != "xyes" ; then
1199         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/sametime//'`
1201 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1202         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'`
1204 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1205         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc//'`
1207 if test "x$have_libgadu" != "xyes" ; then
1208         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/gg//'`
1210 if test "x$is_win32" = "xyes" ; then
1211         STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/zephyr//'`
1213 AC_SUBST(STATIC_PRPLS)
1214 STATIC_LINK_LIBS=
1215 extern_load=
1216 load_proto=
1217 extern_unload=
1218 unload_proto=
1219 for i in $STATIC_PRPLS ; do
1220         dnl Ugly special case for "libsilcpurple.la":
1221         if test "x$i" = "xsilc"; then
1222                 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.la"
1223         else
1224                 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.la"
1225         fi
1226         extern_load="$extern_load extern gboolean ${i}_plugin_load();"
1227         load_proto="$load_proto ${i}_plugin_load();"
1228         extern_unload="$extern_unload extern gboolean ${i}_plugin_unload();"
1229         unload_proto="$unload_proto ${i}_plugin_unload();"
1231         case $i in
1232                 bonjour)        static_bonjour=yes ;;
1233                 facebook)       static_facebook=yes ;;
1234                 gg)                     static_gg=yes ;;
1235                 irc)            static_irc=yes ;;
1236                 jabber)         static_jabber=yes ;;
1237                 novell)         static_novell=yes ;;
1238                 oscar)          static_oscar=yes ;;
1239                 aim)            static_oscar=yes ;;
1240                 icq)            static_oscar=yes ;;
1241                 sametime)       static_sametime=yes ;;
1242                 silc)           static_silc=yes ;;
1243                 simple)         static_simple=yes ;;
1244                 zephyr)         static_zephyr=yes ;;
1245                 *)                      echo "Invalid static protocol $i!!" ; exit 1 ;;
1246         esac
1247 done
1248 AM_CONDITIONAL(STATIC_BONJOUR, test "x$static_bonjour" = "xyes")
1249 AM_CONDITIONAL(STATIC_FACEBOOK, test "x$static_facebook" = "xyes")
1250 AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes")
1251 AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes")
1252 AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes")
1253 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes")
1254 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes")
1255 AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_meanwhile" = "xyes")
1256 AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$have_silc" = "xyes")
1257 AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes")
1258 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes")
1259 AC_SUBST(STATIC_LINK_LIBS)
1260 AC_DEFINE_UNQUOTED(STATIC_PROTO_LOAD, $extern_load static void static_proto_load(void) { $load_proto },
1261         [Loads protocols from static protocol plugin modules.])
1262 AC_DEFINE_UNQUOTED(STATIC_PROTO_UNLOAD, $extern_unload static void static_proto_unload(void) { $unload_proto },
1263         [Unloads protocols from static protocol plugin modules.])
1265 AC_ARG_WITH(dynamic_prpls, [AS_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`])
1266 if test "x$DYNAMIC_PRPLS" = "xall" ; then
1267         DYNAMIC_PRPLS="bonjour facebook gg irc jabber novell oscar sametime silc simple zephyr"
1269 if test "x$have_meanwhile" != "xyes"; then
1270         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'`
1272 if test "x$avahiincludes" != "xyes" -o "x$avahilibs" != "xyes"; then
1273         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
1275 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
1276         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc//'`
1278 if test "x$have_libgadu" != "xyes"; then
1279         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/gg//'`
1281 if test "x$is_win32" = "xyes" ; then
1282         DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/zephyr//'`
1284 AC_SUBST(DYNAMIC_PRPLS)
1285 for i in $DYNAMIC_PRPLS ; do
1286         case $i in
1287                 bonjour)        dynamic_bonjour=yes ;;
1288                 facebook)       dynamic_facebook=yes ;;
1289                 gg)                     dynamic_gg=yes ;;
1290                 irc)            dynamic_irc=yes ;;
1291                 jabber)         dynamic_jabber=yes ;;
1292                 novell)         dynamic_novell=yes ;;
1293                 null)           dynamic_null=yes ;;
1294                 oscar)          dynamic_oscar=yes ;;
1295                 aim)            dynamic_oscar=yes ;;
1296                 icq)            dynamic_oscar=yes ;;
1297                 sametime)       dynamic_sametime=yes ;;
1298                 silc)           dynamic_silc=yes ;;
1299                 simple)         dynamic_simple=yes ;;
1300                 zephyr)         dynamic_zephyr=yes ;;
1301                 *)                      echo "Invalid dynamic protocol $i!!" ; exit 1 ;;
1302         esac
1303 done
1305 AC_ARG_ENABLE(plugins, [AS_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes)
1306 AC_ARG_WITH(krb4, [AS_HELP_STRING([--with-krb4=PREFIX], [compile Zephyr plugin with Kerberos 4 support])], kerberos="$withval", kerberos="no")
1307 AC_ARG_WITH(zephyr, [AS_HELP_STRING([--with-zephyr=PREFIX], [compile Zephyr plugin against external libzephyr])], zephyr="$withval", zephyr="no")
1308 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
1310 AC_CHECK_HEADERS(sys/utsname.h)
1311 AC_CHECK_FUNC(uname)
1313 AC_ARG_ENABLE(fortify, [AS_HELP_STRING([--disable-fortify], [compile without FORTIFY_SOURCE support])], , enable_fortify=yes)
1315 DEBUG_CFLAGS="$DEBUG_CFLAGS -DPURPLE_DISABLE_DEPRECATED -DPIDGIN_DISABLE_DEPRECATED -DFINCH_DISABLE_DEPRECATED -DGNT_DISABLE_DEPRECATED"
1316 if test "x$GCC" = "xyes"; then
1317         dnl We enable -Wall later.
1318         dnl If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
1319         dnl This leads to warnings we don't want.
1320         CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
1322         dnl ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE
1323         dnl
1324         dnl Future Possibilities
1325         dnl
1326         dnl Consider adding -Wbad-function-cast.
1327         dnl     This leads to spurious warnings using GPOINTER_TO_INT(), et al. directly on a function call.
1328         dnl             We'd need an intermediate variable.
1329         dnl
1330         for newflag in \
1331                         "-Waggregate-return" \
1332                         "-Wcast-align" \
1333                         "-Wdeclaration-after-statement" \
1334                         "-Wendif-labels" \
1335                         "-Werror-implicit-function-declaration" \
1336                         "-Wextra -Wno-unused-parameter" \
1337                         "-Wformat-security" \
1338                                 "-Werror=format-security" \
1339                         "-Winit-self" \
1340                         "-Wmissing-declarations" \
1341                         "-Wmissing-noreturn" \
1342                         "-Wmissing-prototypes" \
1343                         "-Wpointer-arith" \
1344                         "-Wfloat-equal" \
1345                         "-Wundef" \
1346         ; do
1347                 orig_CFLAGS="$CFLAGS"
1348                 CFLAGS="$CFLAGS $newflag"
1349                 AC_MSG_CHECKING(for $newflag option to gcc)
1350                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [
1351                         AC_MSG_RESULT(yes)
1352                         CFLAGS="$orig_CFLAGS"
1353                         DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
1354                 ], [
1355                         AC_MSG_RESULT(no)
1356                         CFLAGS="$orig_CFLAGS"
1357                 ])
1358         done
1360         if test "x$enable_fortify" = "xyes"; then
1361                 AC_MSG_CHECKING(for FORTIFY_SOURCE support)
1362                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <features.h>]], [[
1363                         #if !(__GNUC_PREREQ (4, 1) \
1364                                 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
1365                                 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
1366                                         && __GNUC_MINOR__ == 4 \
1367                                         && (__GNUC_PATCHLEVEL__ > 2 \
1368                                                 || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
1369                         #error No FORTIFY_SOURCE support
1370                         #endif
1371                                 return 0;
1372                 ]])], [
1373                         AC_MSG_RESULT(yes)
1374                         DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2"
1375                 ], [
1376                         AC_MSG_RESULT(no)
1377                 ])
1378         fi
1380         DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
1381         CFLAGS="-g $CFLAGS"
1383 DEBUG_CPPFLAGS=`echo "$DEBUG_CFLAGS" | $sedpath 's/-Wdeclaration-after-statement//' | $sedpath 's/-Wmissing-prototypes//' | $sedpath 's/-Waggregate-return//'`
1385 if test "x$SUNCC" = "xyes"; then
1386         CFLAGS="$CFLAGS -features=extensions"
1388 AC_SUBST(CFLAGS)
1390 AC_PATH_PROG(pidginpath, pidgin)
1392 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
1393         #if !defined(__clang__)
1394         #error
1395         #endif
1396 ])], have_clang=yes, have_clang=no)
1398 AC_ARG_ENABLE(clang-address-sanitizer,
1399         [AS_HELP_STRING([--enable-clang-address-sanitizer],
1400                 [compile with the Clang's address sanitizer enabled])],
1401         enable_clang_address_sanitizer="$enableval", enable_clang_address_sanitizer="no")
1403 if test "x$enable_clang_address_sanitizer" = "xyes" -a "x$have_clang" = "xno"; then
1404                 AC_MSG_ERROR([
1405 Clang address sanitizer requested, but we don't compile with Clang.
1406 Disable the sanitizer or run configure script with CC and CCX set to clang binaries.
1410 if test "x$have_clang" = "xyes"; then
1411         GLIB_LIBS=`echo $GLIB_LIBS | $sedpath 's/-pthread/-lpthread/'`
1414 if test "x$enable_clang_address_sanitizer" = "xyes"; then
1415         CFLAGS="$CFLAGS -faddress-sanitizer -g -fno-omit-frame-pointer -fno-inline -fno-optimize-sibling-calls"
1419 AC_ARG_ENABLE(glib-errors-trace, [AS_HELP_STRING([--enable-glib-errors-trace], [print backtraces for glib errors])], enable_glibtrace="$enableval", enable_glibtrace="no")
1420 if test "x$enable_glibtrace" = "xyes"; then
1421         if test "x$have_clang" = "xyes"; then
1422                 AC_MSG_ERROR([--enable-glib-errors-trace doesn't work with clang])
1423         fi
1424         AC_DEFINE(ENABLE_GLIBTRACE, 1, [Define if backtraces should be printed for glib errors.])
1425         dnl CFLAGS="$CFLAGS -rdynamic"
1426         CFLAGS="$CFLAGS -rdynamic"
1429 dnl #######################################################################
1430 dnl # Check for D-Bus libraries
1431 dnl #######################################################################
1433 # dbus doesn't compile for win32 at the moment
1434 AC_ARG_ENABLE(dbus,
1435         [AS_HELP_STRING([--disable-dbus], [disable D-Bus support])], ,
1436         enable_dbus="$is_not_win32")
1438 if test "x$enable_dbus" = "xyes" ; then
1439         AC_CHECK_PROG(enable_dbus, dbus-binding-tool, yes, no)
1442 if test "x$enable_dbus" = "xyes" ; then
1443         PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60 dbus-glib-1 >= 0.60], [
1444                 AC_SUBST(DBUS_CFLAGS)
1445                 AC_SUBST(DBUS_LIBS)
1446                 enable_dbus=yes
1447         ], [
1448         enable_dbus=no
1449         if test "x$force_deps" = "xyes" ; then
1450                 AC_MSG_ERROR([
1451 D-Bus development headers not found.
1452 Use --disable-dbus if you do not need D-Bus support.
1454         fi])
1457 dnl #######################################################################
1458 dnl # Check for Unity and Messaging Menu
1459 dnl #######################################################################
1460 AC_ARG_ENABLE(unity, [AC_HELP_STRING([--enable-unity],
1461         [compile with support for unity integration plugin])], enable_unity="$enableval", enable_unity="no")
1462 if test "$enable_unity" = yes; then
1463         PKG_CHECK_MODULES(UNITY, [unity >= 6.8 messaging-menu >= 12.10], , [
1464                 AC_MSG_RESULT(no)
1465                 AC_MSG_ERROR([
1466 You must have libunity9 >= 6.8 and libmessaging-menu >= 12.10 to build the unity integration plugin.
1467         ])])
1468         USES_MM_CHAT_SECTION="X-MessagingMenu-UsesChatSection=true"
1469         AC_SUBST(UNITY_CFLAGS)
1470         AC_SUBST(UNITY_LIBS)
1471         AC_SUBST(USES_MM_CHAT_SECTION)
1472 else
1473         enable_unity=no
1475 AM_CONDITIONAL(ENABLE_UNITY, [test "x$enable_unity" = "xyes"])
1477 dnl #######################################################################
1478 dnl # Check for Secret Service headers
1479 dnl #######################################################################
1481 AC_ARG_ENABLE(libsecret,
1482         [AC_HELP_STRING([--disable-libsecret], [enable Secret Service support])],
1483         enable_secret_service="$enableval", enable_secret_service="$is_not_win32")
1485 if test "x$enable_secret_service" = "xyes" ; then
1486         PKG_CHECK_MODULES(SECRETSERVICE, [libsecret-1], [
1487                 AC_SUBST(SECRETSERVICE_CFLAGS)
1488                 AC_SUBST(SECRETSERVICE_LIBS)
1489                 AC_DEFINE(HAVE_SECRETSERVICE, 1, [Define if we have Secret Service.])
1490         ], [
1491                 AC_MSG_RESULT(no)
1492                 enable_secret_service="no"
1493                 if test "x$force_deps" = "xyes" ; then
1494                         AC_MSG_ERROR([
1495 Libsecret development headers not found
1496 Use --disable-libsecret if you do not need it.
1498                 fi
1499         ])
1503 AM_CONDITIONAL(ENABLE_SECRETSERVICE, test "x$enable_secret_service" = "xyes")
1505 dnl #######################################################################
1506 dnl # Check for GNOME Keyring headers
1507 dnl #######################################################################
1509 AC_ARG_ENABLE(gnome-keyring,
1510         [AC_HELP_STRING([--disable-gnome-keyring], [disable GNOME Keyring support])],
1511         enable_gnome_keyring="$enableval", enable_gnome_keyring="$is_not_win32")
1513 if test "x$enable_gnome_keyring" = "xyes" ; then
1514         PKG_CHECK_MODULES(GNOMEKEYRING, [gnome-keyring-1], [
1515                 AC_SUBST(GNOMEKEYRING_CFLAGS)
1516                 AC_SUBST(GNOMEKEYRING_LIBS)
1517                 AC_DEFINE(HAVE_GNOMEKEYRING, 1, [Define if we have GNOME Keyring.])
1518         ], [
1519                 AC_MSG_RESULT(no)
1520                 enable_gnome_keyring="no"
1521                 if test "x$force_deps" = "xyes" ; then
1522                         AC_MSG_ERROR([
1523 GNOME Keyring development headers not found
1524 Use --disable-gnome-keyring if you do not need it.
1526                 fi
1527         ])
1530 AM_CONDITIONAL(ENABLE_GNOMEKEYRING, test "x$enable_gnome_keyring" = "xyes")
1532 dnl #######################################################################
1533 dnl # Check for KWallet headers
1534 dnl #######################################################################
1536 AC_ARG_ENABLE(kwallet,
1537         [AC_HELP_STRING([--disable-kwallet], [disable KWallet support])],
1538         enable_kwallet="$enableval", enable_kwallet="$is_not_win32")
1539 AC_ARG_WITH(kwallet-includes, [AC_HELP_STRING([--with-kwallet-includes=DIR], [compile the KWallet plugin against includes in DIR])], [ac_kwallet_includes="$withval"], [ac_kwallet_includes="no"])
1540 AC_ARG_WITH(kwallet-libs, [AC_HELP_STRING([--with-kwallet-libs=DIR], [compile the KWallet plugin against the KWallet libs in DIR])], [ac_kwallet_libs="$withval"], [ac_kwallet_libs="no"])
1542 if test "x$enable_kwallet" = "xyes"; then
1543         dnl Ensure C++ compiler works
1544         AC_CHECK_PROG(CXXTEST, [$CXX], [$CXX])
1545         if test "x$CXXTEST" = "x"; then
1546                 enable_kwallet=no
1547                 if test "x$force_deps" = "xyes"; then
1548                         AC_MSG_ERROR([
1549 A C++ compiler was not found.
1550 Use --disable-kwallet if you do not need KWallet support.
1552                 fi
1553         fi
1556 AC_LANG_PUSH([C++])
1557 CPPFLAGS_save="$CPPFLAGS"
1558 LIBS_save="$LIBS"
1560 if test "x$enable_kwallet" = "xyes"; then
1561         PKG_CHECK_MODULES(QT4, [QtCore], [
1562                 AC_SUBST(QT4_CFLAGS)
1563                 AC_SUBST(QT4_LIBS)
1564         ], [
1565                 AC_MSG_RESULT(no)
1566                 enable_kwallet=no
1567                 if test "x$force_deps" = "xyes"; then
1568                         AC_MSG_ERROR([
1569 Qt4 development headers not found.
1570 Use --disable-kwallet if you do not need KWallet support.
1572                 fi
1573         ])
1576 if test "x$enable_kwallet" = "xyes"; then
1577         AC_MSG_CHECKING([for metaobject compiler])
1578         MOC=`$PKG_CONFIG --variable=moc_location QtCore`
1579         AC_SUBST(MOC)
1580         AC_MSG_RESULT([$MOC])
1582         KWALLET_CXXFLAGS=""
1583         KWALLET_LIBS=""
1584         if test -z "$with_kwallet_includes" || test -z "$with_kwallet_libs"; then
1585                 AC_CHECK_PROG(KDE4_CONFIG, kde4-config, kde4-config, no)
1586                 if test "x$KDE4_CONFIG" = "xno"; then
1587                         enable_kwallet=no
1588                         if test "x$force_deps" = "xyes"; then
1589                                 AC_MSG_ERROR([
1590 kde4-config not found. $KDE4_CONFIG
1591 Use --disable-kwallet if you do not need KWallet support.
1592 Use --with-kwallet-includes and --with-kwallet-libs to set up includes manually.
1594                         fi
1595                 fi
1596         fi
1599 if test "x$enable_kwallet" = "xyes"; then
1600         if test "$ac_kwallet_includes" != "no"; then
1601                 KWALLET_CXXFLAGS="-I$ac_kwallet_includes"
1602         elif test "x$KDE4_CONFIG" != "xno"; then
1603                 KWALLET_CXXFLAGS="$QT4_CFLAGS -I`$KDE4_CONFIG --path include`"
1604         fi
1605         CPPFLAGS="$CPPFLAGS $KWALLET_CXXFLAGS"
1606         AC_CHECK_HEADER([kwallet.h], , [
1607                 enable_kwallet=no
1608                 if test "x$force_deps" = "xyes"; then
1609                         AC_MSG_ERROR([
1610 KWallet development headers not found.
1611 Use --disable-kwallet if you do not need KWallet support.
1613                 fi
1617 if test "x$enable_kwallet" = "xyes"; then
1618         AC_MSG_CHECKING([for KWallet libraries])
1619         if test "$ac_kwallet_libs" != "no"; then
1620                 KWALLET_LIBS="-L$ac_kwallet_libs -lkdeui"
1621         elif test "x$KDE4_CONFIG" != "xno"; then
1622                 KWALLET_LIBS="-L`$KDE4_CONFIG --install lib`/kde4/devel -lkdeui"
1623         else
1624                 KWALLET_LIBS="-lkdeui"
1625         fi
1626         KWALLET_LIBS="$KWALLET_LIBS"
1627         LIBS="$LIBS $KWALLET_LIBS $QT4_LIBS"
1628         AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <kwallet.h>],
1629                 [KWallet::Wallet::LocalWallet();])], [AC_MSG_RESULT([yes])],
1630                 [
1631                         AC_MSG_RESULT(no)
1632                         enable_kwallet=no
1633                         if test "x$force_deps" = "xyes"; then
1634                                 AC_MSG_ERROR([
1635 KWallet development libraries not found.
1636 Use --disable-kwallet if you do not need KWallet support.
1638                         fi
1639                 ])
1642 CPPFLAGS="$CPPFLAGS_save"
1643 LIBS="$LIBS_save"
1644 AC_LANG_POP
1646 AC_SUBST(KWALLET_CXXFLAGS)
1647 AC_SUBST(KWALLET_LIBS)
1649 AM_CONDITIONAL(ENABLE_KWALLET, test "x$enable_kwallet" = "xyes")
1651 dnl #######################################################################
1652 dnl # Check for GPlugin 0.0.17
1653 dnl #######################################################################
1654 if test "x$enable_plugins" = "xyes" ; then
1655         PKG_CHECK_MODULES(GPLUGIN, [gplugin >= 0.0.17 gmodule-2.0], [
1656                 dnl # GPLUGIN_REQ sets pkg-config requirements in the .pc file
1657                 GPLUGIN_REQ=[", gplugin"]
1658         ], [
1659                 AC_MSG_RESULT(no)
1660                 AC_MSG_ERROR([
1661         GPlugin 0.0.17 development headers not found, which are required if you wish to
1662         enable plugins.
1663         Use --disable-plugins if you want to disable plugins.
1664         ])])
1665         AC_SUBST(GPLUGIN_REQ)
1666         AC_SUBST(GPLUGIN_CFLAGS)
1667         AC_SUBST(GPLUGIN_LIBS)
1668 else
1669         enable_introspection=no
1672 dnl # Check for gobject introspection
1673 GOBJECT_INTROSPECTION_CHECK([1.30.0])
1675 if test "x$enable_introspection" = "xyes" ; then
1676         AC_DEFINE(ENABLE_INTROSPECTION, 1, [Define if GObject introspection is enabled.])
1679 dnl #######################################################################
1680 dnl # Check for Python
1681 dnl #######################################################################
1683 dnl Python scripts are used to auto-generate about 3000 lines of C
1684 dnl and XML code that wraps (part of) the existing API so that
1685 dnl it is now accessible through D-Bus.
1687 dnl Python is only required if --enable-dbus is used, and only for
1688 dnl the build process to generate the code, not for running pidgin.
1689 dnl This autogenerated code is system-independent, so in principle we
1690 dnl can generate all of it before shipping.  But I thought adding
1691 dnl auto-generated stuff to the repository is inelegant.
1692 dnl Alternatively, these python scripts could be rewritten
1693 dnl in C (brrrr ...).
1695 AC_ARG_WITH([python],
1696                         AS_HELP_STRING([--with-python=PATH],
1697                                                    [which python interpreter to use for dbus code generation]),
1698                         PYTHON=$withval)
1700 if test "x$enable_dbus" = "xyes" || test "x$enable_consoleui" = "xyes" ; then
1701         if test -z "$PYTHON" -a "x$is_win32" = "xyes" ; then
1702                 dnl there are problems with include files when cross compiling
1703                 dnl feel free to fix it, if you want
1704                 PYTHON=no
1705         elif test -z "$PYTHON" -o "x$PYTHON" = "xyes"; then
1706                 AC_PATH_PROG([PYTHON], [python], [no])
1707         fi
1709         if test x"$PYTHON" = x"no" -a "x$is_win32" != "xyes" ; then
1710                 AC_MSG_WARN([python interpreter not found in your path])
1711                 enable_dbus=no
1712         fi
1714         if test "x$PYTHON" != "xno" ; then
1715         if $PYTHON -c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then
1716                 AC_MSG_WARN([python version >= 2.4 required])
1717                 enable_dbus=no
1718         fi
1719         fi
1722 dnl ###########################################################################
1723 dnl # Find the D-Bus services dir.
1724 dnl #
1725 dnl # This is a 3 step process that
1726 dnl #
1727 dnl # 1. checks if --with-dbus-services was set, if so use that.
1728 dnl # 2. checks if --prefix was given, if so use that.
1729 dnl # 3. fallbacks to installing into what should be the correct system
1730 dnl #    directories.
1731 dnl #
1732 dnl # This is still prone to error if one of the legacy directories exist
1733 dnl # although a newer dbus is installed.  But I have tried to order the
1734 dnl # directory searching to keep this situation at a minimum.
1735 dnl ###########################################################################
1736 AC_ARG_WITH(dbus-services, [AS_HELP_STRING([--with-dbus-services=<dir>], [where the D-Bus services directory is located.])])
1738 DBUS_SERVICES_DIR=""
1740 if test x"$enable_dbus" = "xyes" ; then
1741         AC_MSG_CHECKING([location of the D-Bus services directory])
1742         if ! test -z "$with_dbus_services" ; then
1743                 if ! test -d "$with_dbus_services" ; then
1744                         AC_MSG_ERROR([$with_dbus_services does not exist, if this is the correct location please make sure that it exists.])
1745                 fi
1747                 DBUS_SERVICES_DIR="$with_dbus_services"
1748         else
1749                 if test x"$prefix" = x"NONE" ; then
1750                         dnl # no prefix given, so we look for the correct dbus system paths.
1751                         dnl # if a prefix is given, we use it.
1753                         serviceprefixes="$prefix/share $prefix/lib /usr/share /usr/local/share"
1754                         DBUS_SERVICES_DIR=""
1756                         for d in $serviceprefixes ; do
1757                                 dir="$d/dbus-1/services"
1758                                 if test -d $dir ; then
1759                                         DBUS_SERVICES_DIR="$dir"
1760                                         break
1761                                 fi
1762                         done
1764                         if test -z $DBUS_SERVICES_DIR ; then
1765                                 AC_MSG_ERROR([D-Bus services directory was not found!  Please use --with-dbus-services and specify its location.])
1766                         fi
1767                 else
1768                         DBUS_SERVICES_DIR="$datadir/dbus-1/services"
1769                 fi
1770         fi
1771         AC_MSG_RESULT([$DBUS_SERVICES_DIR])
1772         AC_DEFINE(HAVE_DBUS, 1, [Define if we are using D-Bus.])
1774 AC_SUBST(DBUS_SERVICES_DIR)
1776 if test "x$enable_dbus" = "xyes" ; then
1777         echo "Building with D-Bus support"
1778 else
1779         echo "Building without D-Bus support"
1782 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
1784 dnl Check for Python headers (currently useful only for libgnt)
1785 dnl (Thanks to XChat)
1786 if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ; then
1787         AC_MSG_CHECKING(for Python compile flags)
1788         if test -f ${PYTHON}-config; then
1789                 PY_CFLAGS=`${PYTHON}-config --includes`
1790                 PY_LIBS=`${PYTHON}-config --libs`
1791                 AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.])
1792                 AC_MSG_RESULT(ok)
1793         else
1794                 AC_MSG_RESULT([Cannot find ${PYTHON}-config])
1795                 PY_CFLAGS=""
1796                 PY_LIBS=""
1797         fi
1799 AC_SUBST(PY_CFLAGS)
1800 AC_SUBST(PY_LIBS)
1802 dnl #######################################################################
1803 dnl # SSL support
1804 dnl #
1805 dnl # Thanks go to Evolution for the checks.
1806 dnl #######################################################################
1808 AC_ARG_WITH(system-ssl-certs, [AS_HELP_STRING([--with-system-ssl-certs=<dir>], [directory containing system-wide SSL CA certificates])], [ssl_certificates_dir=$withval])
1810 SSL_CERTIFICATES_DIR=""
1811 if ! test -z "$ssl_certificates_dir" ; then
1812         if test "x$ssl_certificates_dir" = "xyes" ; then
1813                 AC_MSG_ERROR([--with-system-ssl-certs requires that a location is specified, eg. --with-system-ssl-certs=/etc/pki/tls/certs])
1814         fi
1815         if ! test -d "$ssl_certificates_dir" ; then
1816                 if test "x$is_win32" = "xyes" ; then
1817                         AC_MSG_WARN([$ssl_certificates_dir does not exist. \
1818 It may be OK when cross-compiling, but please make sure about it.])
1819                 else
1820                         AC_MSG_ERROR([$ssl_certificates_dir does not exist, \
1821 if this is the correct location please make sure that it exists.])
1822                 fi
1823         fi
1824         SSL_CERTIFICATES_DIR="$ssl_certificates_dir"
1826 AC_SUBST(SSL_CERTIFICATES_DIR)
1827 if test "x$SSL_CERTIFICATES_DIR" != "x" ; then
1828         AC_DEFINE_UNQUOTED([SSL_CERTIFICATES_DIR], ["$SSL_CERTIFICATES_DIR"],
1829                 [Directory where SSL certificates can be found])
1831 AM_CONDITIONAL(INSTALL_SSL_CERTIFICATES, test "x$SSL_CERTIFICATES_DIR" = "x")
1833 if test "$ac_cv_cygwin" = yes ; then
1834         LDADD="$LDADD -static"
1835         AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
1838 AC_SUBST(DEBUG_CPPFLAGS)
1839 AC_SUBST(DEBUG_CFLAGS)
1840 AC_SUBST(LDADD)
1841 AC_SUBST(LIBS)
1843 if test "x$enable_plugins" = "xyes" ; then
1844         AC_DEFINE(PURPLE_PLUGINS, 1, [Define if plugins are enabled.])
1845         AM_CONDITIONAL(PLUGINS, true)
1846         PLUGINS_DEFINE="#define PURPLE_PLUGINS 1"
1847 else
1848         AM_CONDITIONAL(PLUGINS, false)
1849         PLUGINS_DEFINE="#undef PURPLE_PLUGINS"
1851 AC_SUBST(PLUGINS_DEFINE)
1853 dnl #######################################################################
1854 dnl # Check for Nettle (Crypto Library)
1855 dnl #######################################################################
1856 AC_ARG_ENABLE(nettle,
1857         [AC_HELP_STRING([--disable-nettle], [disable Nettle support])],
1858         enable_nettle="$enableval", enable_nettle="yes")
1860 if test "x$enable_nettle" = "xyes" ; then
1861         PKG_CHECK_MODULES(NETTLE, [nettle >= 3.0], [
1862                 enable_nettle="yes"
1863                 AC_SUBST(NETTLE_CFLAGS)
1864                 AC_SUBST(NETTLE_LIBS)
1865                 AC_DEFINE(HAVE_NETTLE, 1, [Define if we have Nettle.])
1866         ], [
1867                 enable_nettle="no"
1868         ])
1870         if test "x$enable_nettle" != "xyes" -a "x$force_deps" = "xyes" ; then
1871                 AC_MSG_ERROR([
1872 Nettle development headers not found
1873 Use --disable-nettle if you do not need it.
1875         fi
1878 AM_CONDITIONAL(ENABLE_NETTLE, test "x$enable_nettle" = "xyes")
1880 dnl #######################################################################
1881 dnl # Check for Cyrus-SASL (for xmpp/irc)
1882 dnl #######################################################################
1883 dnl AC_CHECK_SIZEOF(short)
1884 AC_CHECK_FUNCS(snprintf connect)
1885 AC_SUBST(SASL_LIBS)
1886 AC_ARG_ENABLE(cyrus-sasl, AS_HELP_STRING([--enable-cyrus-sasl], [enable Cyrus SASL support for xmpp/irc]), enable_cyrus_sasl=$enableval, enable_cyrus_sasl=no)
1887 if test "x$enable_cyrus_sasl" = "xyes" ; then
1888         AC_CHECK_LIB(sasl2, sasl_client_init, [
1889                         AM_CONDITIONAL(USE_CYRUS_SASL, true)
1890                         AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present])
1891                         SASL_LIBS=-"lsasl2"
1892                 ], [
1893                         AM_CONDITIONAL(USE_CYRUS_SASL, false)
1894                         AC_MSG_ERROR([Cyrus SASL library not found])
1895                 ])
1896 else
1897         AM_CONDITIONAL(USE_CYRUS_SASL, false)
1900 dnl #######################################################################
1901 dnl # Check for Kerberos (for Zephyr)
1902 dnl #######################################################################
1903 AC_DEFINE(ZEPHYR_INT32, long, [Size of an int32.])
1904 AC_SUBST(KRB4_CFLAGS)
1905 AC_SUBST(KRB4_LDFLAGS)
1906 AC_SUBST(KRB4_LIBS)
1907 if test "$kerberos" != "no" ; then
1908         if test "$kerberos" != "yes" ; then
1909                 KRB4_CFLAGS="-I${kerberos}/include"
1910                 if test -d "$kerberos/include/kerberosIV" ; then
1911                         KRB4_CFLAGS="$KRB4_CFLAGS -I${kerberos}/include/kerberosIV"
1912                 fi
1913                 KRB4_LDFLAGS="-L${kerberos}/lib"
1914         elif test -d /usr/local/include/kerberosIV ; then
1915                 KRB4_CFLAGS="-I/usr/local/include/kerberosIV"
1916         elif test -d /usr/include/kerberosIV ; then
1917                 KRB4_CFLAGS="-I/usr/include/kerberosIV"
1918         fi
1919         AC_DEFINE(ZEPHYR_USES_KERBEROS, 1, [Define if kerberos should be used in Zephyr.])
1921         orig_LDFLAGS="$LDFLAGS"
1922         LDFLAGS="$LDFLAGS $KRB4_LDFLAGS"
1923         AC_CHECK_LIB(krb4, krb_rd_req,
1924                         [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"],
1925                         [AC_CHECK_LIB(krb, krb_rd_req,
1926                                 [KRB4_LIBS="-lkrb -ldes"],
1927                                 [AC_MSG_ERROR([Kerberos 4 libraries not found])],
1928                                 -ldes)],
1929                         -ldes425 -lkrb5 -lk5crypto -lcom_err)
1930         orig_LIBS="$LIBS"
1931         LIBS="$LIBS $KRB4_LIBS"
1932         AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm)
1933         AC_CHECK_FUNCS(krb_get_err_text krb_log)
1934         LIBS="$orig_LIBS"
1935         LDFLAGS="$orig_LDFLAGS"
1938 dnl #######################################################################
1939 dnl # Check for external libzephyr
1940 dnl #######################################################################
1941 AC_SUBST(ZEPHYR_CFLAGS)
1942 AC_SUBST(ZEPHYR_LDFLAGS)
1943 AC_SUBST(ZEPHYR_LIBS)
1944 if test "$zephyr" != "no" ; then
1945         if test "$zephyr" != "yes" ; then
1946                 ZEPHYR_CFLAGS="-I${zephyr}/include"
1947                 ZEPHYR_LDFLAGS="-L${zephyr}/lib"
1948         elif test -d /usr/athena/include/zephyr ; then
1949                 ZEPHYR_CFLAGS="-I/usr/athena/include"
1950         elif test -d /usr/include/zephyr ; then
1951                 ZEPHYR_CFLAGS="-I/usr/include"
1952         elif test -d /usr/local/include/zephyr ; then
1953                 ZEPHYR_CFLAGS="-I/usr/local/include"
1954         fi
1955         AC_DEFINE(LIBZEPHYR_EXT, 1 , [Define if external libzephyr should be used.])
1956         AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
1957         orig_LDFLAGS="$LDFLAGS"
1958         LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS"
1959         AC_CHECK_LIB(zephyr, ZInitialize,
1960                 [ZEPHYR_LIBS="-lzephyr"],
1961                 [AC_MSG_ERROR([Zephyr libraries not found])],
1962                 -lzephyr)
1963         orig_LIBS="$LIBS"
1964         LIBS="$orig_LIBS"
1965         LDFLAGS="$orig_LDFLAGS"
1968 AC_MSG_CHECKING(for me pot o' gold)
1969 AC_MSG_RESULT(no)
1970 AC_CHECK_FUNCS(gethostid timegm)
1971 AC_CHECK_HEADERS(paths.h sgtty.h sys/cdefs.h)
1972 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
1973 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/wait.h)
1974 AC_CHECK_HEADERS(termios.h)
1976 # sys/sysctl.h on OpenBSD 4.2 requires sys/param.h
1977 # sys/sysctl.h on FreeBSD requires sys/types.h
1978 AC_CHECK_HEADERS(sys/param.h)
1979 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
1980         [[
1981                 #include <sys/types.h>
1982                 #ifdef HAVE_PARAM_H
1983                 # include <sys/param.h>
1984                 #endif
1985         ]])
1987 AC_CHECK_HEADERS(sys/socket.h)
1988 AC_VAR_TIMEZONE_EXTERNALS
1990 AC_CHECK_MEMBER([struct tm.tm_gmtoff],
1991         [AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])],
1992         [],
1993         [[#include <time.h>]])
1995 dnl #######################################################################
1996 dnl # Disable pixmap installation
1997 dnl #######################################################################
1998 AC_ARG_ENABLE(pixmaps-install, AS_HELP_STRING([--disable-pixmaps-install], [disable installation of pixmap files - Pidgin still needs them!]), enable_pixmaps="$enableval", enable_pixmaps=yes)
2000 AM_CONDITIONAL(INSTALL_PIXMAPS, test "x$enable_pixmaps" = "xyes")
2002 dnl #######################################################################
2003 dnl # Tweak status tray icon installation directory
2004 dnl #######################################################################
2005 AC_ARG_ENABLE(trayicon-compat, AS_HELP_STRING([--enable-trayicon-compat], [install tray icons in location compatible with older releases of hicolor-icon-theme]), enable_traycompat="$enableval", enable_traycompat=no)
2007 AM_CONDITIONAL(ENABLE_TRAYCOMPAT, test "x$enable_traycompat" = "xyes")
2009 # check for gtk-doc
2010 m4_ifdef([GTK_DOC_CHECK], [
2011 GTK_DOC_CHECK([1.16],[--flavour no-tmpl])
2013         if test "x$force_deps" = "xyes" -a "x$enable_gtk_doc" = "xyes"; then
2014                 AC_MSG_ERROR([
2015 You have requested to generate documentation, but gtk-doc was not found.
2016                 ])
2017         fi
2019         AM_CONDITIONAL([ENABLE_GTK_DOC], false)
2020         enable_gtk_doc=no
2023 AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],
2024         [compile with debugging support])], , enable_debug=no)
2026 if test "x$enable_debug" = "xyes" ; then
2027         AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
2030 AM_CONDITIONAL(PURPLE_AVAILABLE, true)
2032 AC_CONFIG_FILES([Makefile
2033                    doc/Makefile
2034                    doc/pidgin.1
2035                    doc/finch.1
2036                    doc/reference/Makefile
2037                    doc/reference/finch/Makefile
2038                    doc/reference/finch/version.xml
2039                    doc/reference/libpurple/Makefile
2040                    doc/reference/libpurple/version.xml
2041                    doc/reference/protocols/Makefile
2042                    doc/reference/protocols/facebook/Makefile
2043                    doc/reference/protocols/version.xml
2044                    doc/reference/pidgin/Makefile
2045                    doc/reference/pidgin/version.xml
2046                    m4macros/Makefile
2047                    pidgin/Makefile
2048                    pidgin/data/pidgin.desktop.in
2049                    pidgin/data/pidgin-3.pc
2050                    pidgin/data/pidgin-3-uninstalled.pc
2051                    pidgin/pixmaps/Makefile
2052                    pidgin/pixmaps/emotes/default/24/Makefile
2053                    pidgin/pixmaps/emotes/small/16/Makefile
2054                    pidgin/plugins/Makefile
2055                    pidgin/plugins/cap/Makefile
2056                    pidgin/plugins/disco/Makefile
2057                    pidgin/plugins/gestures/Makefile
2058                    pidgin/plugins/gevolution/Makefile
2059                    pidgin/plugins/musicmessaging/Makefile
2060                    pidgin/plugins/ticker/Makefile
2061                    pidgin/plugins/win32/transparency/Makefile
2062                    pidgin/plugins/win32/winprefs/Makefile
2063                    pidgin/themes/Makefile
2064                    pidgin/win32/pidgin_dll_rc.rc
2065                    pidgin/win32/pidgin_exe_rc.rc
2066                    libpurple/data/purple-url-handler.desktop.in
2067                    libpurple/data/purple-3.pc
2068                    libpurple/data/purple-3-uninstalled.pc
2069                    libpurple/example/Makefile
2070                    libpurple/plugins/Makefile
2071                    libpurple/plugins/keyrings/Makefile
2072                    libpurple/Makefile
2073                    libpurple/protocols/Makefile
2074                    libpurple/protocols/bonjour/Makefile
2075                    libpurple/protocols/facebook/Makefile
2076                    libpurple/protocols/gg/Makefile
2077                    libpurple/protocols/irc/Makefile
2078                    libpurple/protocols/jabber/Makefile
2079                    libpurple/protocols/jabber/tests/Makefile
2080                    libpurple/protocols/novell/Makefile
2081                    libpurple/protocols/null/Makefile
2082                    libpurple/protocols/oscar/Makefile
2083                    libpurple/protocols/oscar/tests/Makefile
2084                    libpurple/protocols/sametime/Makefile
2085                    libpurple/protocols/silc/Makefile
2086                    libpurple/protocols/simple/Makefile
2087                    libpurple/protocols/zephyr/Makefile
2088                    libpurple/tests/Makefile
2089                    libpurple/purple.h
2090                    libpurple/version.h
2091                    libpurple/win32/libpurplerc.rc
2092                    share/sounds/Makefile
2093                    share/ca-certs/Makefile
2094                    finch/finch.pc
2095                    finch/finch_winres.rc
2096                    finch/libfinch_winres.rc
2097                    finch/Makefile
2098                    finch/libgnt/Makefile
2099                    finch/libgnt/gnt.pc
2100                    finch/libgnt/libgnt_winres.rc
2101                    finch/libgnt/wms/Makefile
2102                    finch/plugins/Makefile
2103                    po/Makefile.in
2104                   ])
2105 AC_OUTPUT
2107 echo
2108 echo $PACKAGE $VERSION
2110 echo
2111 echo Build GTK+ UI................. : $enable_gtkui
2112 echo Build console UI.............. : $enable_consoleui
2113 echo Build for X11................. : $with_x
2114 echo
2115 echo Enable Gestures............... : $enable_gestures
2116 echo Protocols to build dynamically : $DYNAMIC_PRPLS
2117 echo Protocols to link statically.. : $STATIC_PRPLS
2118 echo
2119 echo Build with GStreamer support.. : $enable_gst
2120 echo Build with D-Bus support...... : $enable_dbus
2121 echo Build with voice and video.... : $enable_vv
2122 if test "x$enable_dbus" = "xyes" ; then
2123         eval eval echo D-Bus services directory...... : $DBUS_SERVICES_DIR
2125 echo Build with GNU Libidn......... : $enable_idn
2126 if test "x$SSL_CERTIFICATES_DIR" != "x" ; then
2127         eval eval echo SSL CA certificates directory. : $SSL_CERTIFICATES_DIR
2129 echo Build with Nettle support..... : $enable_nettle
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 Install pixmaps............... : $enable_pixmaps
2134 echo Old tray icon compatibility... : $enable_traycompat
2135 echo Install translations.......... : $enable_i18n
2136 echo Has you....................... : yes
2137 echo
2138 echo Use XScreenSaver Extension.... : $enable_screensaver
2139 echo Use startup notification...... : $enable_startup_notification
2140 echo Build with Enchant support.... : $use_enchant
2141 echo Build with GCR widgets........ : $enable_gcr
2142 echo Build Unity integration plugin.: $enable_unity
2143 echo
2144 echo Build with GNOME Keyring...... : $enable_gnome_keyring
2145 echo Build with KWallet............ : $enable_kwallet
2146 echo Build with Secret Service..... : $enable_secret_service
2147 echo
2148 echo Build with plugin support..... : $enable_plugins
2149 echo Enable Introspection...........: $enable_introspection
2151 if test "x$is_win32" = "xyes" ; then
2152         echo
2153         echo Win32 directory structure..... : $with_win32_dirs
2156 echo
2157 echo Print debugging messages...... : $enable_debug
2158 echo Generate documentation........ : $enable_gtk_doc
2159 echo
2160 eval eval echo Pidgin will be installed in $bindir.
2161 if test "x$pidginpath" != "x" ; then
2162         echo Warning: You have an old copy of Pidgin at $pidginpath.
2164 if test "x$enable_pixmaps" = "xno" ; then
2165         echo
2166         echo Warning: You have disabled the installation of pixmap data, but Pidgin
2167         echo still requires installed pixmaps.  Be sure you know what you are doing.
2169 if test "x$enable_i18n" = "xno" ; then
2170         echo
2171         echo Warning: You have disabled the building and installation of translation
2172         echo data.  This will prevent building pidgin.desktop and the GConf schemas.
2173         echo Be sure you know what you are doing.
2175 echo
2176 echo configure complete, now type \'make\'
2177 echo