Add geolocation plugin
[claws.git] / configure.ac
1
2 AC_PREREQ(2.59)
3 AC_INIT(src/main.c)
4 AC_CONFIG_AUX_DIR(config)
5 AC_CONFIG_MACRO_DIR([m4])
6
7 PACKAGE=claws-mail
8
9 dnl version number
10 INTERFACE_AGE=0
11 BINARY_AGE=0
12 EXTRA_RELEASE=
13 EXTRA_GTK2_VERSION=
14
15 if test \( -d .git \); then
16     GIT_VERSION=`git describe --abbrev=6 --dirty --always`
17 else
18     GIT_VERSION=`sh -c '. ./version'`
19 fi
20 MAJOR_VERSION=${GIT_VERSION%%.*}
21 MINOR_VERSION=${GIT_VERSION#*.}
22 MINOR_VERSION=${MINOR_VERSION%%.*}
23 MICRO_VERSION=${GIT_VERSION##*.}
24 MICRO_VERSION=${MICRO_VERSION%%-*}
25 EXTRA_VERSION=${GIT_VERSION#*-}
26 EXTRA_VERSION=${EXTRA_VERSION%%-*}
27
28 if test \( "x$EXTRA_VERSION" != "x" -a `echo -n $EXTRA_VERSION | wc -c` -lt 5 \); then
29     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}git${EXTRA_VERSION}
30 else
31     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
32     EXTRA_VERSION=0
33 fi
34
35 if test \( "x$EXTRA_RELEASE" != "x" \); then
36     VERSION=${VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
37 fi
38
39 dnl set $target
40 AC_CANONICAL_SYSTEM
41
42 dnl
43 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
44 dnl AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
45 dnl AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
46 AC_SUBST(PACKAGE)
47 AC_SUBST(VERSION)
48 AC_SUBST(MAJOR_VERSION)
49 AC_SUBST(MINOR_VERSION)
50 AC_SUBST(MICRO_VERSION)
51 AC_SUBST(EXTRA_VERSION)
52 AC_SUBST(GIT_VERSION)
53
54 AC_CHECK_PROG(HAVE_GTK_ICON_CACHE, gtk-update-icon-cache, yes, no)
55 AM_CONDITIONAL(UPDATE_GTK_ICON_CACHE, test x"$HAVE_GTK_ICON_CACHE" = xyes)
56
57 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
58 if test x$PKG_CONFIG = xno ; then
59   AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
60 fi
61
62 dnl GNOME 2.x installed?
63 PKG_CHECK_MODULES(GNOME2, libgnome-2.0 >= 2.0, ac_enable_gnome2=yes, ac_enable_gnome2=no)
64 AM_CONDITIONAL(CLAWS_GNOME2, test x"$ac_enable_gnome2" = x"yes")
65
66 dnl libtool versioning
67 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
68 LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
69 LT_REVISION=$INTERFACE_AGE
70 LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
71 AC_SUBST(LT_RELEASE)
72 AC_SUBST(LT_CURRENT)
73 AC_SUBST(LT_REVISION)
74 AC_SUBST(LT_AGE)
75
76 dnl Specify a header configuration file
77 AC_CONFIG_HEADERS(config.h)
78 AC_CONFIG_HEADERS(claws-features.h)
79
80 AM_MAINTAINER_MODE
81
82 dnl Checks for programs.
83 dnl AC_ARG_PROGRAM
84 AC_PROG_CC
85 AC_ISC_POSIX
86 AC_PROG_INSTALL
87 AC_PROG_LN_S
88 AC_PROG_MAKE_SET
89 AC_PROG_CPP
90 dnl AC_PROG_RANLIB
91 AM_PROG_LEX
92 AC_PROG_YACC
93 AC_LIB_PREFIX
94 AC_LIBTOOL_WIN32_DLL
95 LT_INIT
96 LT_AC_PROG_RC
97 AC_LIBTOOL_RC
98 AC_PROG_LIBTOOL
99
100 AC_SYS_LARGEFILE
101
102 dnl ******************************
103 dnl Checks for host
104 dnl Not needed anymore because we 
105 dnl do AC_CANONICAL_SYSTEM above
106 dnl ******************************
107 dnl AC_CANONICAL_HOST
108
109 dnl Copied from the official gtk+-2 configure.in
110 AC_MSG_CHECKING([for some Win32 platform])
111 case "$host" in
112   *-*-mingw*|*-*-cygwin*)
113     platform_win32=yes
114     LDFLAGS="$LDFLAGS -mwindows"
115     ;;
116   *)
117     platform_win32=no
118     ;;
119 esac
120 AC_MSG_RESULT([$platform_win32])
121 AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = x"yes")
122
123 AC_MSG_CHECKING([for native Win32])
124 case "$host" in
125   *-*-mingw*)
126     os_win32=yes
127     ;;
128   *)
129     os_win32=no
130     ;;
131 esac
132 AC_MSG_RESULT([$os_win32])
133 AM_CONDITIONAL(OS_WIN32, test x"$os_win32" = x"yes")
134
135 AC_MSG_CHECKING([for Cygwin])
136 case "$host" in
137   *-*-cygwin*)
138     env_cygwin=yes
139     ;;
140   *)
141     env_cygwin=no
142     ;;
143 esac
144 AC_MSG_RESULT([$env_cygwin])
145 AM_CONDITIONAL(CYGWIN, test x"$env_cygwin" = x"yes")
146
147 if test "$GCC" = "yes"
148 then
149         CFLAGS="$CFLAGS -Wno-unused-function"
150         #CFLAGS="-g -Wall -Wno-unused-function"
151 fi
152
153 AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
154 _gcc_cflags_save=$CFLAGS
155 CFLAGS="-Wno-pointer-sign"
156 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],_gcc_psign=yes,_gcc_psign=no)
157 AC_MSG_RESULT($_gcc_psign)
158 CFLAGS=$_gcc_cflags_save;
159 if test x"$_gcc_psign" = xyes ; then
160         CFLAGS="$CFLAGS -Wno-pointer-sign"
161 fi
162
163 CFLAGS="$CFLAGS -Wall"
164
165 if test $USE_MAINTAINER_MODE = yes; then
166         CFLAGS="-g -Wall -Wno-pointer-sign -DUSE_MAINTAINER_MODE"
167 fi
168
169 pthread_name=
170 case "$target" in
171 *-darwin*)
172         CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
173         ;;
174 *-*-mingw*)
175         # Note that we need to link to pthreadGC2 in all cases. This
176         # is because some locking is used even when pthread support is
177         # disabled.
178         pthread_name=pthreadGC2
179         CFLAGS="$CFLAGS -mms-bitfields"
180         LIBS="$LIBS -l${pthread_name} -lws2_32 -lregex"
181         ;;
182 *-*-solaris*)
183         CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
184         CFLAGS="$CFLAGS -std=gnu99 -DSOLARIS"
185         ;;
186 esac
187   
188 dnl Checks for iconv
189 AM_ICONV
190
191 dnl floor and ceil are  in -lm
192 LIBS="$LIBS -lm"
193
194 dnl
195 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
196 dnl
197 syl_save_LIBS=$LIBS
198 LIBS="$LIBS $GTK_LIBS"
199 AC_CHECK_FUNCS(bind_textdomain_codeset)
200 LIBS=$syl_save_LIBS
201
202 dnl for gettext
203 ALL_LINGUAS="bg ca cs de en_GB es fi fr he hu id_ID it ja lt nl pl pt_BR pt_PT ru sk sv uk zh_CN zh_TW"
204 GETTEXT_PACKAGE=claws-mail
205 AC_SUBST(GETTEXT_PACKAGE)
206 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
207
208 AM_GNU_GETTEXT_VERSION([0.15])
209 AM_GNU_GETTEXT([external])
210
211 AC_ARG_ENABLE(manual,
212                 [  --disable-manual                Do not build user manual],
213                 [enable_manual=$enableval], [enable_manual=yes])
214
215 AC_ARG_ENABLE(libsm,
216                 [  --disable-libsm                 Do not build libSM support for session management],
217                 [enable_libsm=$enableval], [enable_libsm=yes])
218
219 AC_ARG_ENABLE(ipv6,
220                 [  --disable-ipv6                  Do not build IPv6 support],
221                 [enable_ipv6=$enableval], [enable_ipv6=yes])
222
223 AC_ARG_ENABLE(gnutls,
224                 [  --disable-gnutls                Do not build GnuTLS support for SSL/TLS],
225                     [enable_gnutls=$enableval], [enable_gnutls=yes])
226
227 AC_ARG_ENABLE(enchant,
228                 [  --disable-enchant               Do not build Enchant support for spell-checking],
229                 [enable_enchant=$enableval], [enable_enchant=yes])
230
231 AC_ARG_ENABLE(crash-dialog,
232                 [  --enable-crash-dialog           Build crash dialog],
233                 [enable_crash_dialog=$enableval], [enable_crash_dialog=no])
234
235 AC_ARG_ENABLE(generic-umpc,
236                 [  --enable-generic-umpc           Build generic UMPC code],
237                 [enable_generic_umpc=$enableval], [enable_generic_umpc=no])
238
239 AC_ARG_ENABLE(maemo,
240                 [  --enable-maemo                  Build for the Maemo platform],
241                 [enable_maemo=$enableval], [enable_maemo=no])
242
243 AC_ARG_ENABLE(compface,
244                 [  --disable-compface              Do not build compface support for X-Face],
245                 [enable_compface=$enableval], [enable_compface=yes])
246
247 AC_ARG_ENABLE(pthread,
248                 [  --disable-pthread               Do not build pthread support],
249                 [enable_pthread=$enableval], [enable_pthread=yes])
250
251 AC_ARG_ENABLE(startup-notification,
252                 [  --disable-startup-notification  Do not startup notification support],
253                 [enable_startup_notification=$enableval], [enable_startup_notification=yes])
254
255 AC_ARG_ENABLE(dbus,
256                 [  --disable-dbus                  Do not build DBUS support],
257                 [enable_dbus=$enableval], [enable_dbus=yes])
258
259 AC_ARG_ENABLE(ldap,
260                 [  --disable-ldap                  Do not build LDAP support],
261                 [enable_ldap=$enableval], [enable_ldap=yes])
262
263 AC_ARG_ENABLE(jpilot,
264                 [  --disable-jpilot                Do not build JPilot support],
265                 [enable_jpilot=$enableval], [enable_jpilot=yes])
266
267 AC_ARG_ENABLE(networkmanager,
268                 [  --disable-networkmanager        Do not build NetworkManager support],
269                 [enable_networkmanager=$enableval], [enable_networkmanager=yes])
270
271 AC_ARG_ENABLE(libetpan,
272                 [  --disable-libetpan              Do not build libetpan support for IMAP4/NNTP],
273                 [enable_libetpan=$enableval], [enable_libetpan=yes])
274
275 AC_ARG_ENABLE(valgrind,
276                 [  --disable-valgrind              Do not build valgrind support for debugging],
277                 [enable_valgrind=$enableval], [enable_valgrind=yes])
278
279 AC_ARG_ENABLE(new-addrbook,
280                 [  --enable-new-addrbook           Build new external address book support],
281                 [enable_new_addrbook=$enableval], [enable_new_addrbook=no])
282
283 AC_ARG_ENABLE(gtk3,
284                 [  --enable-gtk3                   Build GTK3 support],
285                 [enable_gtk3=$enableval], [enable_gtk3=no])
286
287 AC_ARG_ENABLE(deprecated,
288                 [  --disable-deprecated            Disable deprecated GTK functions],
289                 [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
290
291 manualdir='${docdir}/manual'
292 AC_ARG_WITH(manualdir,
293         [  --with-manualdir=DIR    Manual directory],
294         [manualdir="$withval"])
295 AC_SUBST(manualdir)
296
297 dnl ******************************
298 dnl ** Check for required tools **
299 dnl ** to build manuals         **
300 dnl ******************************
301
302 AC_PATH_PROG(DOCBOOK2HTML, docbook2html)
303 AC_PATH_PROG(DOCBOOK2TXT, docbook2txt)
304 AC_PATH_PROG(DOCBOOK2PS, docbook2ps)
305 AC_PATH_PROG(DOCBOOK2PDF, docbook2pdf)
306
307 AM_CONDITIONAL(MANUAL_HTML, test -n "$DOCBOOK2HTML")
308 AM_CONDITIONAL(MANUAL_TXT, test -n "$DOCBOOK2TXT")
309 AM_CONDITIONAL(MANUAL_PDF, test -n "$DOCBOOK2PDF")
310 AM_CONDITIONAL(MANUAL_PS, test -n "$DOCBOOK2PS")
311
312 if test x"$enable_manual" = x"yes"; then
313     if test -n "$DOCBOOK2TXT" -o -n "$DOCBOOK2HTML" \
314         -o -n "$DOCBOOK2PS" -o -n "$DOCBOOK2PDF"; then
315             enable_manual=yes
316         else
317             enable_manual=no
318     fi
319 fi
320
321 AM_CONDITIONAL(BUILD_MANUAL, test x"$enable_manual" = xyes)
322
323 dnl Set PACKAGE_DATA_DIR in config.h.
324 if test "x${datarootdir}" = 'x${prefix}/share'; then
325         if test "x${prefix}" = "xNONE"; then
326                 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
327         else
328                 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
329         fi
330 else
331         AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datarootdir}/${PACKAGE}",[PACKAGE_DATA_DIR])
332 fi
333
334 AC_CHECK_LIB(xpg4, setlocale)
335
336 SM_LIBS=""
337 dnl Check for LibSM
338 AC_MSG_CHECKING([whether to use LibSM])
339 if test x"$enable_libsm" = xyes; then
340         AC_MSG_RESULT(yes)
341         AC_CHECK_LIB(SM, SmcSaveYourselfDone,
342                 [SM_LIBS="$X_LIBS -lSM -lICE"],enable_libsm=no,
343                 $X_LIBS -lICE)
344         AC_CHECK_HEADERS(X11/SM/SMlib.h,,enable_libsm=no)
345         if test x"$enable_libsm" = xyes; then
346                 AC_DEFINE(HAVE_LIBSM, 1, [Define to 1 if you have libSM installed])
347         else
348                 AC_MSG_RESULT(not found)
349                 AC_MSG_WARN([*** LibSM will not be supported ***])
350         fi
351 else
352         AC_MSG_RESULT(no)
353 fi
354 AC_SUBST(SM_LIBS)
355
356 dnl Check for d_type member in struct dirent
357 AC_MSG_CHECKING([whether struct dirent has d_type member])
358 AC_CACHE_VAL(ac_cv_dirent_d_type,[
359         AC_TRY_COMPILE([#include <dirent.h>],
360                        [struct dirent d; d.d_type = DT_REG;],
361                        ac_cv_dirent_d_type=yes, ac_cv_dirent_d_type=no)
362 ])
363 AC_MSG_RESULT($ac_cv_dirent_d_type)
364 if test $ac_cv_dirent_d_type = yes; then
365         AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
366                   Define if `struct dirent' has `d_type' member.)
367 fi
368
369 # Check whether mkdir does not take the permission argument.
370 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
371
372 dnl Checks for header files.
373 AC_HEADER_DIRENT
374 AC_HEADER_STDC
375 AC_HEADER_SYS_WAIT
376 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
377                  sys/param.h sys/utsname.h sys/select.h \
378                  wchar.h wctype.h locale.h netdb.h)
379 AC_CHECK_HEADER([execinfo.h], [AC_DEFINE(HAVE_BACKTRACE,1,[Has backtrace*() needed for retrieving stack traces])])
380 AC_SEARCH_LIBS(backtrace_symbols, [execinfo])
381
382 dnl alf - Check for apache installation f*ck up. apache may also install an 
383 dnl fnmatch, which includes their own regex stuff if USE_HSREGEX is defined
384 AC_TRY_COMPILE([#include <stdlib.h>
385                 #include <fnmatch.h>],
386         [int x = USE_HSREGEX;],
387         ac_cv_have_apache_fnmatch=yes, ac_cv_have_apache_fnmatch=no)
388 if test $ac_cv_have_apache_fnmatch = yes; then
389         AC_DEFINE(HAVE_APACHE_FNMATCH, 1, Define if you need to work around apache regex/fnmatch !KLUDGE!)
390 fi
391 AC_MSG_CHECKING([whether to use Apache regex header kludge])
392 AC_MSG_RESULT($ac_cv_have_apache_fnmatch)
393
394 dnl Checks for typedefs, structures, and compiler characteristics.
395 AC_C_CONST
396 AC_TYPE_OFF_T
397 AC_TYPE_PID_T
398 AC_TYPE_SIZE_T
399 AC_STRUCT_TM
400
401 dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
402 dnl may be defined only in wchar.h (this happens with gcc-2.96).
403 dnl So we need to use this extended macro.
404 CLAWS_CHECK_TYPE(wint_t, unsigned int,
405 [
406 #if HAVE_WCHAR_H
407 #include <wchar.h>
408 #endif
409 ], Define to `unsigned int' if <stddef.h> or <wchar.h> doesn't define.)
410
411 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
412 AC_CHECK_SIZEOF(unsigned short, 2)
413 AC_CHECK_SIZEOF(unsigned int, 4)
414 AC_CHECK_SIZEOF(unsigned long, 4)
415
416 dnl Checks for library functions.
417 AC_FUNC_ALLOCA
418 AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
419                uname flock lockf inet_aton inet_addr \
420                fchmod mkstemp truncate getuid regcomp)
421
422 AC_CHECK_FUNCS(fgets_unlocked fwrite_unlocked)
423
424 dnl *****************
425 dnl ** common code **
426 dnl *****************
427
428 dnl check for glib
429 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6 gmodule-2.0 >= 2.6 gobject-2.0 >= 2.6 gthread-2.0 >= 2.6)
430       
431 GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
432 AC_SUBST(GLIB_GENMARSHAL)
433
434 AC_SUBST(GLIB_CFLAGS)
435 AC_SUBST(GLIB_LIBS)
436
437 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
438 syl_save_LIBS=$LIBS
439 LIBS="$LIBS $GTK_LIBS"
440 AC_CHECK_FUNCS(bind_textdomain_codeset)
441 LIBS=$syl_save_LIBS
442
443 dnl check for IPv6 option
444 dnl automated checks for IPv6 support.
445 AC_MSG_CHECKING([whether to use IPv6])
446 if test x"$enable_ipv6" = xyes; then
447         AC_MSG_RESULT(yes)
448         AC_MSG_CHECKING([for IPv6 support])
449         AC_CACHE_VAL(ac_cv_ipv6,[
450                 AC_TRY_COMPILE([#define INET6
451                                 #include <sys/types.h>
452                                 #include <netinet/in.h>],
453                         [int x = IPPROTO_IPV6; struct in6_addr a;],
454                         ac_cv_ipv6=yes, ac_cv_ipv6=no)
455         ])
456         AC_MSG_RESULT($ac_cv_ipv6)
457         if test $ac_cv_ipv6 = yes; then
458                 AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
459         else
460                 AC_MSG_WARN(*** IPv6 will not be supported ***)
461                 enable_ipv6=no
462         fi
463 else
464         AC_MSG_RESULT(no)
465 fi
466
467 dnl GNUTLS
468 AC_MSG_CHECKING([whether to use GnuTLS])
469 AC_MSG_RESULT($enable_gnutls)
470 if test "x$enable_gnutls" != "xno"; then
471         PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.2,
472         [
473                 AC_DEFINE(USE_GNUTLS, 1, gnutls)
474                 echo "Building with GnuTLS"
475         ],
476         [
477                 echo "Building without gnutls"
478         ])
479         PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.11,
480         [
481                 dnl No linking against libgcrypt needed
482         ],
483         [
484                 dnl linking against libgcrypt *is* needed
485                 GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt"
486         ])
487         AC_SUBST(GNUTLS_LIBS)
488         AC_SUBST(GNUTLS_CFLAGS)
489 fi
490
491 dnl password encryption
492 OLDLIBS=$LIBS
493 LIBS=
494 case $host_os in
495         *dragonfly*)
496                 AC_SEARCH_LIBS(encrypt, cipher, [], AC_MSG_ERROR(['encrypt'-function not found.]))
497         ;;
498         *)
499                 AC_SEARCH_LIBS(encrypt, crypt, [], AC_MSG_ERROR(['encrypt'-function not found.]))
500         ;;
501 esac
502 CRYPT_LIBS=$LIBS
503 AC_SUBST(CRYPT_LIBS)
504 LIBS=$OLDLIBS
505
506 AC_ARG_WITH(passcrypt-key, [  --with-passcrypt-key=KEY     Key used to encode passwords (8 byte string)],
507             with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
508 AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
509
510 dnl RC dir (will be default at a certain point in time)
511 AC_ARG_WITH(config-dir,    [  --with-config-dir=RCDIR      Local configuration dir (default: .claws-mail)],
512               ac_cv_with_config_dir="$withval", ac_cv_with_config_dir=".claws-mail")
513 if test x"$ac_cv_with_config_dir" = x""; then
514         ac_cv_with_config_dir=".claws-mail"
515 fi 
516 AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
517
518 dnl ************************
519 dnl ** GTK user interface **
520 dnl ************************
521
522 dnl Checks for GTK
523 AM_CONDITIONAL(GTK3, false)
524 AM_CONDITIONAL(GTK2, true)
525 if test x"$enable_gtk3" = x"yes"; then
526         PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.0 cairo)
527         AM_CONDITIONAL(GTK3, true)
528         AM_CONDITIONAL(GTK2, false)
529 else
530         PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.16)
531 fi
532 AC_SUBST(GTK_CFLAGS)
533 AC_SUBST(GTK_LIBS)
534
535 dnl enchant is used for spell checking
536 AC_MSG_CHECKING([whether to use enchant])
537 AC_MSG_RESULT($enable_enchant)
538 if test $enable_enchant = yes; then
539         PKG_CHECK_MODULES(ENCHANT, enchant >= 1.0.0,
540         [
541                 AC_DEFINE(USE_ENCHANT, 1, enchant)
542                 echo "Building with enchant"
543                 enable_enchant=yes
544                 CFLAGS="$CFLAGS `$PKG_CONFIG --cflags enchant`"
545         ],
546         [
547                 echo "Building without enchant-notification"
548                 enable_enchant=no
549         ])
550         AC_SUBST(ENCHANT_CFLAGS)
551         AC_SUBST(ENCHANT_LIBS)
552 fi
553
554 dnl want crash dialog
555 if test $enable_crash_dialog = yes; then
556 dnl check if GDB is somewhere
557         AC_CHECK_PROG(enable_crash_dialog, gdb, yes, no)
558         AC_MSG_CHECKING([whether to use crash dialog])
559         if test $enable_crash_dialog = yes; then
560                 AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
561         fi
562         AC_MSG_RESULT($enable_crash_dialog)
563 fi
564
565 dnl generic umpc
566 if test $enable_generic_umpc = yes; then
567         AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
568         AC_MSG_RESULT($enable_generic_umpc)
569 fi
570
571 dnl Maemo platform
572 if test $enable_maemo = yes; then
573         PKG_CHECK_MODULES(MAEMO, libosso hildon-libs hildon-fm gnome-vfs-2.0, enable_maemo=yes,
574                   enable_maemo=no)
575         AC_SUBST(MAEMO_CFLAGS)
576         AC_SUBST(MAEMO_LIBS)
577         if test $enable_maemo = no; then
578                 #test for chinook
579                 PKG_CHECK_MODULES(MAEMO, libosso hildon-1 hildon-fm-2 gnome-vfs-2.0 hal, enable_maemo=yes,
580                           enable_maemo=no)
581                 AC_SUBST(MAEMO_CFLAGS)
582                 AC_SUBST(MAEMO_LIBS)
583                 if test $enable_maemo = no; then
584                         AC_MSG_ERROR(one of libosso hildon-libs hildon-fm hildon-1 hildon-fm-2 not found)
585                 else
586                         AC_DEFINE(MAEMO, 1, Build for maemo)
587                         AC_DEFINE(CHINOOK, 1, Maemo chinook)
588                         AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
589                         enable_generic_umpc=yes
590                 fi
591         else
592                 AC_DEFINE(MAEMO, 1, Build for maemo)
593                 AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
594                 enable_generic_umpc=yes
595         fi
596 fi
597
598 PKG_CHECK_MODULES(CONIC, conic, enable_conic=yes,
599           enable_conic=no)
600 AC_SUBST(CONIC_CFLAGS)
601 AC_SUBST(CONIC_LIBS)
602 if test $enable_conic = yes; then
603         AC_DEFINE(CONIC, 1, Have conic lib)
604 fi
605
606 dnl Check for X-Face support
607 AC_MSG_CHECKING([whether to use compface])
608 if test x"$enable_compface" = xyes; then
609         AC_MSG_RESULT(yes)
610         AC_CHECK_LIB(compface, uncompface, 
611                 [AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)],
612                 [enable_compface=no])
613         if test x"$enable_compface" = xyes; then
614                 COMPFACE_LIBS="-lcompface"
615         else
616                 COMPFACE_LIBS=""
617         fi
618         AC_SUBST(COMPFACE_LIBS)
619 else
620         AC_MSG_RESULT(no)
621 fi
622
623 dnl check for pthread support
624 AC_MSG_CHECKING([whether to use pthread])
625 if test x$enable_pthread = xno; then
626         AC_MSG_RESULT(no)
627 else
628         AC_MSG_RESULT(yes)
629
630         # For W32 we need to use a special ptrhead lib. In this case we can't
631         # use AC_CHECK_LIB because it has no means of checking for a
632         # library installed under a different name.  Checking for the
633         # header is okay.
634         if test -n "${pthread_name}" ; then
635            enable_pthread=yes
636         else
637         AC_CHECK_LIB(pthread, pthread_create, :, enable_pthread=no)
638         fi
639         AC_CHECK_HEADERS(pthread.h, :, enable_pthread=no)
640
641         if test x$enable_pthread = xyes; then
642                 AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
643                 if test -z "${pthread_name}" ; then
644                 PTHREAD_LIBS="-lpthread"
645         fi
646         fi
647
648 fi
649 AC_SUBST(PTHREAD_LIBS)
650
651 dnl
652 dnl Check whether we need to pass -lresolv
653 dnl We know that we don't need it for W32.
654 dnl
655 if test x$os_win32 = xno; then
656   t_oldLibs="$LIBS"
657   LIBS="$LIBS"
658   ac_cv_var__res_options=no
659   AC_TRY_LINK([#include <sys/types.h>
660              #include <sys/socket.h>
661              #include <netinet/in.h>
662              #include <arpa/nameser.h>
663              #include <resolv.h>],
664                 [_res.options = RES_INIT;],
665                 ac_cv_var__res_options=yes);
666   if test "$ac_cv_var__res_options" != "yes"; then
667         LIBRESOLV="-lresolv"
668   fi
669   LIBS="$t_oldLibs"
670
671   if test "x$LIBRESOLV" = "x"; then
672         AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
673         LIBS="$t_oldLibs"
674   fi
675 fi
676 AC_SUBST(LIBRESOLV)
677
678 LIBS="$LIBS $LIBRESOLV"
679
680 dnl #######################################################################
681 dnl # Check for startup notification
682 dnl #######################################################################
683 if test "x$enable_startup_notification" = "xyes"; then
684         PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
685         [
686                 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
687                 echo "Building with libstartup-notification"
688                 enable_startup_notification=yes
689         ],
690         [
691                 echo "Building without libstartup-notification"
692                 enable_startup_notification=no
693         ])
694
695         AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
696         AC_SUBST(STARTUP_NOTIFICATION_LIBS)
697 fi
698
699 dnl #######################################################################
700 dnl # Check for D-Bus support
701 dnl #######################################################################
702 if test "x$enable_dbus" = "xyes"; then
703         PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60, dbus-glib-1 >= 0.60],
704         [
705                 AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if glib bindings of D-Bus are available])
706                 enable_dbus_glib=yes
707         ],
708         [
709                 echo "D-Bus requirements not met. D-Bus support not activated."
710                 enable_dbus_glib=no
711         ])
712         AC_SUBST(DBUS_CFLAGS)
713         AC_SUBST(DBUS_LIBS)
714 fi
715
716 dnl #######################################################################
717 dnl # Configure address book support
718 dnl #######################################################################
719
720 dnl #######################################################################
721 dnl # Check for new address book support
722 dnl #######################################################################
723 AC_MSG_CHECKING([whether DBUS support for new address book is present])
724 if test x"$enable_dbus_glib" = xyes; then
725         AC_MSG_RESULT([yes])
726         AC_MSG_CHECKING([whether to enable new address book])
727         if test x"$enable_new_addrbook" = xyes; then
728                 AC_MSG_RESULT([yes])
729                 PKG_CHECK_MODULES(CONTACTS, [claws-contacts],
730                 [
731                         AC_DEFINE(USE_NEW_ADDRBOOK, 1, [Define if new address book is to be activated.])
732                         enable_new_addrbook=yes
733                         AC_SUBST(CONTACTS_CFLAGS)
734                         AC_SUBST(CONTACTS_LIBS)
735                 ],
736                 [
737                         enable_new_addrbook=no
738                 ])
739         else
740                 AC_MSG_RESULT([no])
741                 enable_new_addrbook=no
742         fi
743 else
744         AC_MSG_RESULT([no])
745         enable_new_addrbook=no
746 fi
747
748 dnl #######################################################################
749 dnl # Check for old address book support
750 dnl #######################################################################
751 if test x"$enable_new_addrbook" = xno; then
752         dnl for LDAP support in addressbook
753         dnl no check for libraries; dynamically loaded
754         AC_MSG_CHECKING([whether to use LDAP])
755         if test x"$enable_ldap" = xno; then
756                 AC_MSG_RESULT(no)
757         elif test x"$enable_ldap" = xyes -a x"$enable_pthread" = xno; then
758                 AC_MSG_RESULT(no - LDAP support needs pthread support)
759
760                 enable_ldap=no
761         elif test x"$platform_win32" = xyes; then
762                 AC_MSG_RESULT(yes)
763                 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
764                 LDAP_LIBS="-lwldap32"
765                 AC_SUBST(LDAP_LIBS)
766         else
767                 AC_MSG_RESULT(yes)
768
769                 dnl check for available libraries, and pull them in
770                 AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
771                 AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
772                 AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
773                 AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
774                                  $LDAP_LIBS)
775
776                 AC_CHECK_HEADERS(ldap.h lber.h,
777                                  [ enable_ldap=yes ],
778                                  [ enable_ldap=no ])
779
780                 if test "$enable_ldap" = yes; then
781                         AC_CHECK_LIB(ldap, ldap_open,
782                                          [ enable_ldap=yes ],
783                                          [ enable_ldap=no ],
784                                          $LDAP_LIBS)
785
786                         AC_CHECK_LIB(ldap, ldap_start_tls_s,
787                                              [ ac_cv_have_tls=yes ],
788                                              [ ac_cv_have_tls=no ])
789
790                 fi
791
792                 AC_MSG_CHECKING([whether ldap library is available])
793                 AC_MSG_RESULT($enable_ldap)
794
795                 AC_MSG_CHECKING([whether TLS library is available])
796                 AC_MSG_RESULT($ac_cv_have_tls)
797
798                 if test "$enable_ldap" = yes; then
799                         AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
800                         LDAP_LIBS="$LDAP_LIBS -lldap"
801                         AC_SUBST(LDAP_LIBS)
802                         if test "$ac_cv_have_tls" = yes; then
803                                 AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
804                         fi
805                         dnl As of OpenLDAP API version 3000 a number of functions has
806                         dnl been deprecated. As Claws-mail compiles and runs on many
807                         dnl platforms and many versions of OpenLDAP we need to be able
808                         dnl to switch between the old and new API because new API has
809                         dnl added new functions replacing old ones and at the same time
810                         dnl old functions has been changed.
811                         dnl If cross-compiling defaults to enable deprecated features
812                         dnl for maximum portability
813                         AC_MSG_CHECKING([The API version of OpenLDAP])
814                         AC_RUN_IFELSE(
815                                 [AC_LANG_PROGRAM(
816                                  [#include <ldap.h>],
817                                  [if (LDAP_API_VERSION >= 3000)
818                                                 return 1
819                                 ])],
820                                 [AC_MSG_RESULT([version < 3000])
821                                  AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 0, Define if OpenLDAP API is at least version 3000.)],
822                                 [AC_MSG_RESULT([version >= 3000])
823                                  AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 1, Define if OpenLDAP API is at least version 3000.)],
824                                 [AC_MSG_RESULT([Enabling deprecated features in OpenLDAP])
825                                  AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 0, Define if OpenLDAP API is at least version 3000.)
826                                  AC_DEFINE(LDAP_DEPRECATED, 1, Define to activate deprecated features in OpenLDAP)]
827                         )
828                 fi
829         fi
830
831         dnl for JPilot support in addressbook
832         dnl no check for libraries; these are dynamically loaded
833         AC_MSG_CHECKING([whether to use JPilot])
834         if test "$enable_jpilot" = yes; then
835                 AC_MSG_RESULT(yes)
836                 AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h pi-version.h,
837                                  [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
838                                  [ enable_jpilot=no ])
839                 if test "$enable_jpilot" = no; then
840                         AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h libpisock/pi-version.h,
841                                          [ enable_jpilot=yes
842                                            AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
843                 fi
844
845                 AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" enable_jpilot="no"])
846                 if test x"$enable_jpilot" = xyes; then
847                         AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
848                 else
849                         AC_MSG_NOTICE([JPilot support not available])
850                 fi
851                 AC_SUBST(JPILOT_LIBS)
852         else
853                 AC_MSG_RESULT(no)
854         fi
855 fi
856
857 AM_CONDITIONAL(BUILD_NEWADDRBOOK, test x"$enable_new_addrbook" = x"yes")
858
859 dnl #######################################################################
860 dnl # Check for NetworkManager support
861 dnl #######################################################################
862 if test x"$enable_dbus_glib" = xyes; then
863         if test x"$enable_networkmanager" = xyes; then
864                 PKG_CHECK_MODULES(NETWORKMANAGER_SUPPORT, NetworkManager >= 0.6.2,
865                 [
866                         AC_DEFINE(HAVE_NETWORKMANAGER_SUPPORT, 1, [Define if NetworkManager support is to be included.])
867                         echo "Building with NetworkManager support"
868                         enable_networkmanager=yes
869                 ],
870                 [
871                         echo "NetworkManager not found."
872                         enable_networkmanager=no
873                 ])
874                 AC_SUBST(NETWORKMANAGER_SUPPORT_CFLAGS)
875         fi
876 else
877         echo "NetworkManager support deactivated as D-Bus requirements were not met."
878         enable_networkmanager=no
879 fi
880
881 dnl Libetpan
882 AC_MSG_CHECKING([whether to use libetpan])
883 if test x"$enable_libetpan" = xyes; then
884         AC_MSG_RESULT(yes)
885         libetpan_result=no
886         AC_PATH_PROG(libetpanconfig, [libetpan-config])
887         if test "x$libetpanconfig" != "x"; then
888           CPPFLAGS="$CPPFLAGS `$libetpanconfig --cflags 2>/dev/null`"
889           AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
890           if test "x$libetpan_result" = "xyes"; then
891             AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
892             LIBS="$LIBS `$libetpanconfig --libs 2>/dev/null`"
893             AC_TRY_LINK([#include <libetpan/dbstorage.h>], [db_mailstorage_init(NULL, NULL);], [libetpan_result=yes], [libetpan_result=no])
894             AC_MSG_RESULT([$libetpan_result])
895           fi
896         fi
897         if test "x$libetpan_result" = "xyes"; then
898            LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
899            LIBETPAN_LIBS="`$libetpanconfig --libs`"
900            LIBETPAN_STABLE=`$libetpanconfig --version | grep -v ^0`
901            LIBETPAN_VERSION=`$libetpanconfig --version | sed "s/\.//g" | sed "s/-.*$//"`
902            if test x"$LIBETPAN_STABLE" != "x"; then
903                 LIBETPAN_VERSION="100"
904            fi
905            if test "$LIBETPAN_VERSION" -lt "057"; then
906                 AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/])
907                 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
908                 AC_MSG_ERROR([libetpan 0.57 not found])
909            fi
910            AC_SUBST(LIBETPAN_FLAGS)
911            AC_SUBST(LIBETPAN_LIBS)
912            AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP and/or NNTP support.)
913         else
914            AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/ ])
915            AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
916            AC_MSG_ERROR([libetpan 0.57 not found])
917         fi
918 else
919         AC_MSG_RESULT(no)
920 fi
921 AM_CONDITIONAL(CLAWS_LIBETPAN, test "x$libetpan_result" = "xyes")
922
923 AC_MSG_CHECKING([whether to use valgrind])
924 if test x$enable_valgrind = xyes; then
925         AC_MSG_RESULT(yes)
926         PKG_CHECK_MODULES(VALGRIND, valgrind >= 2.4.0,
927                           enable_valgrind=yes, enable_valgrind=no)
928         if test x"$enable_valgrind" = xyes; then
929                 AC_DEFINE(HAVE_VALGRIND, 1, Define if you want valgrind support)
930         else
931                 AC_MSG_RESULT(not found)
932         fi
933 else
934         AC_MSG_RESULT(no)
935 fi
936 AM_CONDITIONAL(CLAWS_VALGRIND, test x"$enable_valgrind" = x"yes")
937
938 dnl *************************
939 dnl ** section for plugins **
940 dnl *************************
941
942 PLUGINS=""
943 DISABLED_PLUGINS=""
944 MISSING_DEPS_PLUGINS=""
945
946 dnl First we set the enabled status - either enabled (yes), auto-enabled (auto)
947 dnl or (auto-)disabled (no for both)
948 dnl
949 dnl All plugins are auto-enabled except for Demo which is just there to help
950 dnl potential plugins writers.
951
952 AC_ARG_ENABLE(acpi_notifier-plugin,
953                 [  --disable-acpi_notifier-plugin  Do not build acpi_notifier plugin],
954                 [enable_acpi_notifier_plugin=$enableval], [enable_acpi_notifier_plugin=auto])
955
956 AC_ARG_ENABLE(address_keeper-plugin,
957                 [  --disable-address_keeper-plugin Do not build address_keeper plugin],
958                 [enable_address_keeper_plugin=$enableval], [enable_address_keeper_plugin=auto])
959
960 AC_ARG_ENABLE(archive-plugin,
961                 [  --disable-archive-plugin        Do not build archive plugin],
962                 [enable_archive_plugin=$enableval], [enable_archive_plugin=auto])
963
964 AC_ARG_ENABLE(att_remover-plugin,
965                 [  --disable-att_remover-plugin    Do not build att_remover plugin],
966                 [enable_att_remover_plugin=$enableval], [enable_att_remover_plugin=auto])
967
968 AC_ARG_ENABLE(attachwarner-plugin,
969                 [  --disable-attachwarner-plugin   Do not build attachwarner plugin],
970                 [enable_attachwarner_plugin=$enableval], [enable_attachwarner_plugin=auto])
971
972 AC_ARG_ENABLE(bogofilter-plugin,
973                 [  --disable-bogofilter-plugin     Do not build bogofilter plugin],
974                 [enable_bogofilter_plugin=$enableval], [enable_bogofilter_plugin=auto])
975
976 AC_ARG_ENABLE(bsfilter-plugin,
977                 [  --disable-bsfilter-plugin       Do not build bsfilter plugin],
978                 [enable_bsfilter_plugin=$enableval], [enable_bsfilter_plugin=auto])
979
980 AC_ARG_ENABLE(clamd-plugin,
981                 [  --disable-clamd-plugin          Do not build clamd plugin],
982                 [enable_clamd_plugin=$enableval], [enable_clamd_plugin=auto])
983
984 AC_ARG_ENABLE(fancy-plugin,
985                 [  --disable-fancy-plugin          Do not build fancy plugin],
986                 [enable_fancy_plugin=$enableval], [enable_fancy_plugin=auto])
987
988 AC_ARG_ENABLE(fetchinfo-plugin,
989                 [  --disable-fetchinfo-plugin      Do not build fetchinfo plugin],
990                 [enable_fetchinfo_plugin=$enableval], [enable_fetchinfo_plugin=auto])
991
992 AC_ARG_ENABLE(gdata-plugin,
993                 [  --disable-gdata-plugin          Do not build gdata plugin],
994                 [enable_gdata_plugin=$enableval], [enable_gdata_plugin=auto])
995
996 AC_ARG_ENABLE(geolocation-plugin,
997                 [  --disable-geolocation-plugin    Do not build geolocation plugin],
998                 [enable_geolocation_plugin=$enableval], [enable_geolocation_plugin=auto])
999
1000 AC_ARG_ENABLE(mailmbox-plugin,
1001                 [  --disable-mailmbox-plugin       Do not build mailmbox plugin],
1002                 [enable_mailmbox_plugin=$enableval], [enable_mailmbox_plugin=auto])
1003
1004 AC_ARG_ENABLE(newmail-plugin,
1005                 [  --disable-newmail-plugin        Do not build newmail plugin],
1006                 [enable_newmail_plugin=$enableval], [enable_newmail_plugin=auto])
1007
1008 AC_ARG_ENABLE(notification-plugin,
1009                 [  --disable-notification-plugin   Do not build notification plugin],
1010                 [enable_notification_plugin=$enableval], [enable_notification_plugin=auto])
1011
1012 AC_ARG_ENABLE(pdf_viewer-plugin,
1013                 [  --disable-pdf_viewer-plugin     Do not build pdf_viewer plugin],
1014                 [enable_pdf_viewer_plugin=$enableval], [enable_pdf_viewer_plugin=auto])
1015
1016 AC_ARG_ENABLE(perl-plugin,
1017                 [  --disable-perl-plugin           Do not build perl plugin],
1018                 [enable_perl_plugin=$enableval], [enable_perl_plugin=auto])
1019
1020 AC_ARG_ENABLE(python-plugin,
1021                 [  --disable-python-plugin         Do not build python plugin],
1022                 [enable_python_plugin=$enableval], [enable_python_plugin=auto])
1023
1024 AC_ARG_ENABLE(pgpcore-plugin,
1025                 [  --disable-pgpcore-plugin        Do not build pgpcore plugin],
1026                 [enable_pgpcore_plugin=$enableval], [enable_pgpcore_plugin=auto])
1027
1028 AC_ARG_ENABLE(pgpmime-plugin,
1029                 [  --disable-pgpmime-plugin        Do not build pgpmime plugin],
1030                 [enable_pgpmime_plugin=$enableval], [enable_pgpmime_plugin=auto])
1031
1032 AC_ARG_ENABLE(pgpinline-plugin,
1033                 [  --disable-pgpinline-plugin      Do not build pgpinline plugin],
1034                 [enable_pgpinline_plugin=$enableval], [enable_pgpinline_plugin=auto])
1035
1036 AC_ARG_ENABLE(rssyl-plugin,
1037                 [  --disable-rssyl-plugin          Do not build rssyl plugin],
1038                 [enable_rssyl_plugin=$enableval], [enable_rssyl_plugin=auto])
1039
1040 AC_ARG_ENABLE(smime-plugin,
1041                 [  --disable-smime-plugin          Do not build smime plugin],
1042                 [enable_smime_plugin=$enableval], [enable_smime_plugin=auto])
1043
1044 AC_ARG_ENABLE(spamassassin-plugin,
1045                 [  --disable-spamassassin-plugin   Do not build spamassassin plugin],
1046                 [enable_spamassassin_plugin=$enableval], [enable_spamassassin_plugin=auto])
1047
1048 AC_ARG_ENABLE(spam_report-plugin,
1049                 [  --disable-spam_report-plugin    Do not build spam_report plugin],
1050                 [enable_spam_report_plugin=$enableval], [enable_spam_report_plugin=auto])
1051
1052 AC_ARG_ENABLE(tnef_parse-plugin,
1053                 [  --disable-tnef_parse-plugin     Do not build tnef_parse plugin],
1054                 [enable_tnef_parse_plugin=$enableval], [enable_tnef_parse_plugin=auto])
1055
1056 AC_ARG_ENABLE(vcalendar-plugin,
1057                 [  --disable-vcalendar-plugin      Do not build vcalendar plugin],
1058                 [enable_vcalendar_plugin=$enableval], [enable_vcalendar_plugin=auto])
1059
1060 dnl disabled by default
1061 AC_ARG_ENABLE(demo-plugin,
1062                 [  --enable-demo-plugin         Build demo plugin],
1063                 [enable_demo_plugin=$enableval], [enable_demo_plugin=no])
1064
1065
1066 dnl Then we check (unconditionnaly) for plugins dependencies
1067 dnl Some dependencies are optional, some mandatories. This is taken care of
1068 dnl later.
1069 dnl
1070 dnl During this dependancy check we do the checks themselves, define HAVE_X to
1071 dnl either yes or no, and do the AC_SUBST calls.
1072
1073 dnl Archive:            libarchive
1074 dnl Fancy:              Webkit, curl, optionally libsoup-gnome
1075 dnl Gdata:              libgdata
1076 dnl Geolocation         libchamplain, libsoup
1077 dnl Notification:       optionally libnotify libindicate libcanberra_gtk hotkey
1078 dnl Pdf-Viewer:         libpoppler
1079 dnl Perl:               sed perl
1080 dnl PGP/Core:           libgpgme
1081 dnl PGP/Mime:           pgpcore libgpgme
1082 dnl PGP/Inline:         pgpcore libgpgme
1083 dnl S/Mime:             pgpcore libgpgme
1084 dnl Python:             Python
1085 dnl RSSyl:              libxml2 libcurl
1086 dnl SpamReport:         libcurl
1087 dnl vCalendar:          libcurl
1088
1089 dnl libcurl ********************************************************************
1090 PKG_CHECK_MODULES(CURL, libcurl, HAVE_CURL=yes, HAVE_CURL=no)
1091 AC_SUBST(CURL_LIBS)
1092 AC_SUBST(CURL_CFLAGS)
1093
1094 dnl libxml2 ********************************************************************
1095 PKG_CHECK_MODULES(LIBXML, libxml-2.0, HAVE_LIBXML=yes, HAVE_LIBXML=no)
1096 AC_SUBST(LIBXML_LIBS)
1097 AC_SUBST(LIBXML_CFLAGS)
1098
1099 dnl webkit *********************************************************************
1100 PKG_CHECK_MODULES(WEBKIT, webkit-1.0 >= 1.1.14, HAVE_WEBKIT=yes, HAVE_WEBKIT=no)
1101 AC_SUBST(WEBKIT_LIBS)
1102 AC_SUBST(WEBKIT_CFLAGS)
1103
1104 dnl libsoup ********************************************************************
1105 PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4)
1106 AC_SUBST(LIBSOUP_CFLAGS)
1107 AC_SUBST(LIBSOUP_LIBS)
1108
1109 dnl libsoup-gnome **************************************************************
1110 PKG_CHECK_MODULES(LIBSOUP_GNOME, libsoup-gnome-2.4 >= 2.26, HAVE_LIBSOUP_GNOME=yes, HAVE_LIBSOUP_GNOME=no)
1111 if test x"$HAVE_LIBSOUP_GNOME" = xyes; then
1112         AC_DEFINE(HAVE_LIBSOUP_GNOME, 1, [Define if libsoup is available])
1113 fi
1114 AC_SUBST(LIBSOUP_GNOME_CFLAGS)
1115 AC_SUBST(LIBSOUP_GNOME_LIBS)
1116
1117 dnl libarchive *****************************************************************
1118 AC_SEARCH_LIBS([archive_read_new], [archive],
1119                        ARCHIVE_LIBS=-larchive
1120                        HAVE_ARCHIVE=yes
1121                        AC_SUBST(ARCHIVE_LIBS),
1122                        HAVE_ARCHIVE=no
1123                        )
1124
1125 dnl libgdata *******************************************************************
1126 dnl Plugin handles compatibility back to 0.6.4 so there are multiple checks.
1127 PKG_CHECK_MODULES(GDATA, libgdata >= 0.9.1, HAVE_GDATA=yes, HAVE_GDATA=no)
1128 if test x"$HAVE_GDATA" = xyes; then
1129         AC_DEFINE(HAVE_GDATA_VERSION_0_9_1, 1, [at least version 0.9.1 of libgdata is available])
1130         AC_DEFINE(HAVE_GDATA_VERSION_0_9, 1, [at least version 0.9 of libgdata is available])
1131 else
1132         PKG_CHECK_MODULES(GDATA, libgdata >= 0.9, HAVE_GDATA=yes, HAVE_GDATA=no)
1133 fi
1134 if test x"$HAVE_GDATA" = xyes; then
1135         AC_DEFINE(HAVE_GDATA_VERSION_0_9, 1, [at least version 0.9 of libgdata is available])
1136 else
1137         PKG_CHECK_MODULES(GDATA, libgdata >= 0.6.4, HAVE_GDATA=yes, HAVE_GDATA=no)
1138 fi
1139 if test x"$HAVE_GDATA" = xyes; then
1140         AC_DEFINE(CM_GDATA_CLIENT_ID, ["Claws Mail GData plugin"], [client id])
1141 fi
1142 AC_SUBST(GDATA_CFLAGS)
1143 AC_SUBST(GDATA_LIBS)
1144
1145 dnl Poppler ********************************************************************
1146 PKG_CHECK_MODULES(POPPLER, poppler-glib >= 0.4.2, HAVE_POPPLER=yes, HAVE_POPPLER=no)
1147 AC_SUBST(POPPLER_LIBS)
1148 AC_SUBST(POPPLER_CFLAGS)
1149
1150 dnl check for Poppler extra features that we conditionally support
1151 if test x"$HAVE_POPPLER" = xyes; then
1152         OLD_CFLAGS=$CFLAGS
1153         CFLAGS="$POPPLER_CFLAGS $GTK_CFLAGS $GLIB_CFLAGS"
1154         AC_CHECK_DECL(POPPLER_DEST_NAMED,
1155                 [AC_DEFINE([HAVE_POPPLER_DEST_NAMED], [], [Description])],
1156                 ,[#include <poppler-action.h>])
1157         AC_CHECK_DECL(POPPLER_DEST_XYZ,
1158                 [AC_DEFINE([HAVE_POPPLER_DEST_XYZ], [], [Description])],
1159                 ,[#include <poppler-action.h>])
1160         CFLAGS=$OLD_CFLAGS
1161 fi
1162
1163 dnl sed ************************************************************************
1164 AC_CHECK_PROG(HAVE_SED, sed, yes, no)
1165
1166 dnl perl ***********************************************************************
1167 AC_CHECK_PROG(HAVE_PERL, perl, yes, no)
1168 if test x"$HAVE_PERL" = xyes; then
1169         AC_MSG_CHECKING(for perl >= 5.8.0)
1170         PERL_VER=`perl -e 'print $] > 5.0079999?"yes":"no"'`
1171         if test "$PERL_VER" = "yes"; then
1172                 AC_MSG_RESULT(yes)
1173         else
1174                 AC_MSG_RESULT(no)
1175                 HAVE_PERL=no
1176         fi
1177 fi
1178 if test x"$HAVE_PERL" = xyes; then
1179         AC_MSG_CHECKING(for Perl compile flags)
1180         if test x"$HAVE_SED" = xno; then
1181                 AC_MSG_RESULT(no - missing sed)
1182                 HAVE_PERL=no
1183         else
1184                 PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
1185                 PERL_CFLAGS=`echo $PERL_CFLAGS | sed 's/-D_FILE_OFFSET_BITS=[[0-9]]*//'`
1186                 PERL_LDFLAGS=`perl -MExtUtils::Embed -e ldopts |sed 's/-lgdbm//'`
1187                 PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-ldb//'`
1188                 PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-lndbm//'`
1189                 PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-lc//'`
1190                 AC_MSG_RESULT(ok)
1191         fi
1192         PERL="perl"
1193         AC_SUBST(PERL)
1194         AC_SUBST(PERL_CFLAGS)
1195         AC_SUBST(PERL_LDFLAGS)
1196 fi
1197
1198 dnl Gpgme **********************************************************************
1199 AM_PATH_GPGME(1.0.0, HAVE_GPGME=yes, HAVE_GPGME=no)
1200 if test x"$HAVE_GPGME" = xyes; then
1201         AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.)
1202         AM_PATH_GPGME(1.1.1, AC_DEFINE(HAVE_GPGME_PKA_TRUST, 1, [Define if GPGME supports PKA.]))
1203 fi
1204
1205 dnl Python *********************************************************************
1206 AM_PATH_PYTHON([2.5], [
1207         AC_PATH_PROG(PYTHON_CONFIG, python$PYTHON_VERSION-config)
1208         if test x"$PYTHON_CONFIG" = x"" ; then
1209                 AC_PATH_PROG(PYTHON_CONFIG, python-config)
1210         fi
1211         if test x"$PYTHON_CONFIG" != x""; then
1212                 PYTHON_CFLAGS=`$PYTHON_CONFIG --includes`
1213                 PYTHON_LIBS=`$PYTHON_CONFIG --libs`
1214                 PYTHON_PREFIX=`$PYTHON_CONFIG --prefix`
1215                 HAVE_PYTHON=yes
1216         else
1217                 AC_MSG_WARN(python-config not found. Maybe you need to install development packages for Python.)
1218                 HAVE_PYTHON=no
1219         fi
1220
1221         if test x"$HAVE_PYTHON" = xyes; then
1222                 # libpython.so
1223                 PYTHON_SO_FILE="libpython${PYTHON_VERSION}.so"
1224                 found_libpython_so="no"
1225                 if test -f "$PYTHON_PREFIX/lib/$PYTHON_SO_FILE"; then
1226                         found_libpython_so="yes"
1227                         PYTHON_SHARED_LIB=`python -c "import os,sys; print os.path.basename(os.path.realpath(\"$PYTHON_PREFIX/lib/$PYTHON_SO_FILE\"))"`
1228                 fi
1229                 if test -f "$PYTHON_PREFIX/lib64/$PYTHON_SO_FILE"; then
1230                         found_libpython_so="yes"
1231                         PYTHON_SHARED_LIB=`python -c "import os,sys; print os.path.basename(os.path.realpath(\"$PYTHON_PREFIX/lib64/$PYTHON_SO_FILE\"))"`
1232                 fi
1233                 if test x"$found_libpython_so" != x"yes"; then
1234                         AC_MSG_WARN(Could not find Python shared libary: $PYTHON_SO_FILE does not exist. Maybe you need to install development packages for Python.)
1235                         HAVE_PYTHON=no
1236                 fi
1237         fi
1238         if test x"$HAVE_PYTHON" = xyes; then
1239                 PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 2.10.3, [AC_DEFINE(ENABLE_PYTHON, [1], [Enable Python support])], HAVE_PYTHON=no)
1240         fi
1241 ])
1242 AC_SUBST(PYTHON_SHARED_LIB)
1243 AC_SUBST(PYTHON_CFLAGS)
1244 AC_SUBST(PYTHON_LIBS)
1245 AC_SUBST(PYGTK_CFLAGS)
1246 AC_SUBST(PYGTK_LIBS)
1247
1248 dnl libnotify ******************************************************************
1249 PKG_CHECK_MODULES(libnotify, libnotify >= 0.4.3, HAVE_LIBNOTIFY=yes, HAVE_LIBNOTIFY=no)
1250 if test x"$HAVE_LIBNOTIFY" = xyes; then
1251         AC_DEFINE(HAVE_LIBNOTIFY, 1, [Define if libnotify support is enabled])
1252 fi
1253 AC_SUBST(libnotify_CFLAGS)
1254 AC_SUBST(libnotify_LIBS)
1255
1256 dnl libcanberra-gtk ************************************************************
1257 PKG_CHECK_MODULES(libcanberra_gtk, libcanberra-gtk >= 0.6, HAVE_LIBCANBERRA_GTK=yes, HAVE_LIBCANBERRA_GTK=no)
1258 if test x"$HAVE_LIBCANBERRA_GTK" = xyes; then
1259         AC_DEFINE(HAVE_LIBCANBERRA_GTK, 1, [Define if libcanberra-gtk support is enabled])
1260 fi
1261 AC_SUBST(libcanberra_gtk_CFLAGS)
1262 AC_SUBST(libcanberra_gtk_LIBS)
1263
1264 dnl libindicate ****************************************************************
1265 dnl We support either 0.3+ or 0.5+
1266 LIBINDICATE_MODULE=indicate
1267 LIBINDICATE_REQUIRED=0.3.0
1268
1269 PKG_CHECK_EXISTS(indicate-0.5 >= 0.5.0, LIBINDICATE_MODULE=indicate-0.5)
1270 PKG_CHECK_MODULES(libindicate, $LIBINDICATE_MODULE >= $LIBINDICATE_REQUIRED, HAVE_LIBINDICATE=yes, HAVE_LIBINDICATE=no)
1271 if test x"$HAVE_LIBINDICATE" = xyes; then
1272         AC_DEFINE(NOTIFICATION_INDICATOR, 1, [Activate support for indicators])
1273 fi
1274 AC_SUBST(libindicate_CFLAGS)
1275 AC_SUBST(libindicate_LIBS)
1276
1277 dnl hotkeys ********************************************************************
1278 PKG_CHECK_MODULES(CM_NP_HOTKEY, [gio-2.0 >= 2.15.6 gio-unix-2.0 >= 2.15.6], HAVE_HOTKEYS=yes, HAVE_HOTKEYS=no)
1279 if test x"$HAVE_HOTKEYS" = xyes; then
1280         AC_DEFINE(NOTIFICATION_HOTKEYS, 1, Activate support for global hotkeys)
1281 fi
1282 AC_SUBST(CM_NP_HOTKEY_CFLAGS)
1283 AC_SUBST(CM_NP_HOTKEY_LIBS)
1284
1285 dnl libchamplain ***************************************************************
1286 CHAMPLAIN_MODULE=champlain-gtk-0.4
1287 CHAMPLAIN_VERSION=0.4.0
1288 PKG_CHECK_EXISTS(champlain-gtk-0.6 > 0.6.0,[CHAMPLAIN_MODULE=champlain-gtk-0.6
1289         CHAMPLAIN_VERSION=0.6.0], [])
1290 PKG_CHECK_EXISTS(champlain-gtk-0.8 > 0.8.0,[CHAMPLAIN_MODULE=champlain-gtk-0.8
1291         CHAMPLAIN_VERSION=0.8.0], [])
1292 PKG_CHECK_MODULES(CHAMPLAIN, [$CHAMPLAIN_MODULE >= $CHAMPLAIN_VERSION clutter-gtk-0.10], HAVE_CHAMPLAIN=yes, HAVE_CHAMPLAIN=no)
1293 AC_SUBST(CHAMPLAIN_CFLAGS)
1294 AC_SUBST(CHAMPLAIN_LIBS)
1295
1296 dnl Third, we now cross the requested plugins and the available dependencies
1297 dnl If some dependencies are missing and the plugin was explicitely enabled,
1298 dnl we error out, else we only inform.
1299
1300 AC_MSG_CHECKING([whether to build acpi_notifier plugin])
1301 if test x"$enable_acpi_notifier_plugin" != xno; then
1302         PLUGINS="$PLUGINS acpi_notifier"
1303         AC_MSG_RESULT(yes)
1304 else
1305         DISABLED_PLUGINS="$DISABLED_PLUGINS acpi_notifier"
1306         AC_MSG_RESULT(no)
1307 fi
1308
1309 AC_MSG_CHECKING([whether to build address_keeper plugin])
1310 if test x"$enable_address_keeper_plugin" != xno; then
1311         PLUGINS="$PLUGINS address_keeper"
1312         AC_MSG_RESULT(yes)
1313 else
1314         DISABLED_PLUGINS="$DISABLED_PLUGINS address_keeper"
1315         AC_MSG_RESULT(no)
1316 fi
1317
1318 AC_MSG_CHECKING([whether to build archive plugin])
1319 if test x"$enable_archive_plugin" != xno; then
1320         dependencies_missing=""
1321
1322         if test x"$HAVE_ARCHIVE" = xno; then
1323                 dependencies_missing="libarchive $dependencies_missing"
1324         fi
1325
1326         if test x"$dependencies_missing" = x; then
1327                 PLUGINS="$PLUGINS archive"
1328                 AC_MSG_RESULT(yes)
1329         elif test x"$enable_archive_plugin" = xauto; then
1330                 AC_MSG_RESULT(no)
1331                 AC_MSG_WARN("Plugin archive will not be built; missing $dependencies_missing")
1332                 enable_archive_plugin=no
1333                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS archive"
1334         else
1335                 AC_MSG_RESULT(no)
1336                 AC_MSG_ERROR("Plugin archive cannot be built; missing $dependencies_missing")
1337         fi
1338 else
1339         DISABLED_PLUGINS="$DISABLED_PLUGINS archive"
1340         AC_MSG_RESULT(no)
1341 fi
1342
1343 AC_MSG_CHECKING([whether to build att_remover plugin])
1344 if test x"$enable_att_remover_plugin" != xno; then
1345         PLUGINS="$PLUGINS att_remover"
1346         AC_MSG_RESULT(yes)
1347 else
1348         DISABLED_PLUGINS="$DISABLED_PLUGINS att_remover"
1349         AC_MSG_RESULT(no)
1350 fi
1351
1352 AC_MSG_CHECKING([whether to build attachwarner plugin])
1353 if test x"$enable_attachwarner_plugin" != xno; then
1354         PLUGINS="$PLUGINS attachwarner"
1355         AC_MSG_RESULT(yes)
1356 else
1357         DISABLED_PLUGINS="$DISABLED_PLUGINS attachwarner"
1358         AC_MSG_RESULT(no)
1359 fi
1360
1361 AC_MSG_CHECKING([whether to build bogofilter plugin])
1362 if test x"$enable_bogofilter_plugin" != xno; then
1363         PLUGINS="$PLUGINS bogofilter"
1364         AC_MSG_RESULT(yes)
1365 else
1366         DISABLED_PLUGINS="$DISABLED_PLUGINS bogofilter"
1367         AC_MSG_RESULT(no)
1368 fi
1369
1370 AC_MSG_CHECKING([whether to build bsfilter plugin])
1371 if test x"$enable_bsfilter_plugin" != xno; then
1372         PLUGINS="$PLUGINS bsfilter"
1373         AC_MSG_RESULT(yes)
1374 else
1375         DISABLED_PLUGINS="$DISABLED_PLUGINS bsfilter"
1376         AC_MSG_RESULT(no)
1377 fi
1378
1379 AC_MSG_CHECKING([whether to build clamd plugin])
1380 if test x"$enable_clamd_plugin" != xno; then
1381         PLUGINS="$PLUGINS clamd"
1382         AC_MSG_RESULT(yes)
1383 else
1384         DISABLED_PLUGINS="$DISABLED_PLUGINS clamd"
1385         AC_MSG_RESULT(no)
1386 fi
1387
1388 AC_MSG_CHECKING([whether to build demo plugin])
1389 if test x"$enable_demo_plugin" != xno; then
1390         PLUGINS="$PLUGINS demo"
1391         AC_MSG_RESULT(yes)
1392 else
1393         DISABLED_PLUGINS="$DISABLED_PLUGINS demo"
1394         AC_MSG_RESULT(no)
1395 fi
1396
1397 AC_MSG_CHECKING([whether to build fancy plugin])
1398 if test x"$enable_fancy_plugin" != xno; then
1399         dependencies_missing=""
1400
1401         if test x"$HAVE_WEBKIT" = xno; then
1402                 dependencies_missing="libwebkit-1.0 $dependencies_missing"
1403         fi
1404         if test x"$HAVE_CURL" = xno; then
1405                 dependencies_missing="libcurl $dependencies_missing"
1406         fi
1407
1408         if test x"$dependencies_missing" = x; then
1409                 PLUGINS="$PLUGINS fancy"
1410                 AC_MSG_RESULT(yes)
1411         elif test x"$enable_fancy_plugin" = xauto; then
1412                 AC_MSG_RESULT(no)
1413                 AC_MSG_WARN("Plugin fancy will not be built; missing $dependencies_missing")
1414                 enable_fancy_plugin=no
1415                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS fancy"
1416         else
1417                 AC_MSG_RESULT(no)
1418                 AC_MSG_ERROR("Plugin fancy cannot be built; missing $dependencies_missing")
1419         fi
1420 else
1421         DISABLED_PLUGINS="$DISABLED_PLUGINS fancy"
1422         AC_MSG_RESULT(no)
1423 fi
1424
1425 AC_MSG_CHECKING([whether to build fetchinfo plugin])
1426 if test x"$enable_fetchinfo_plugin" != xno; then
1427         PLUGINS="$PLUGINS fetchinfo"
1428         AC_MSG_RESULT(yes)
1429 else
1430         DISABLED_PLUGINS="$DISABLED_PLUGINS fetchinfo"
1431         AC_MSG_RESULT(no)
1432 fi
1433
1434 AC_MSG_CHECKING([whether to build gdata plugin])
1435 if test x"$enable_gdata_plugin" != xno; then
1436         dependencies_missing=""
1437
1438         if test x"$HAVE_GDATA" = xno; then
1439                 dependencies_missing="libgdata $dependencies_missing"
1440         fi
1441
1442         if test x"$dependencies_missing" = x; then
1443                 PLUGINS="$PLUGINS gdata"
1444                 AC_MSG_RESULT(yes)
1445         elif test x"$enable_gdata_plugin" = xauto; then
1446                 AC_MSG_RESULT(no)
1447                 AC_MSG_WARN("Plugin gdata will not be built; missing $dependencies_missing")
1448                 enable_gdata_plugin=no
1449                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS gdata"
1450         else
1451                 AC_MSG_RESULT(no)
1452                 AC_MSG_ERROR("Plugin gdata cannot be built; missing $dependencies_missing")
1453         fi
1454 else
1455         DISABLED_PLUGINS="$DISABLED_PLUGINS gdata"
1456         AC_MSG_RESULT(no)
1457 fi
1458
1459 if test x"$enable_geolocation_plugin" != xno; then
1460         dependencies_missing=""
1461
1462         if test x"$HAVE_CHAMPLAIN" = xno; then
1463                 dependencies_missing="libchamplain $dependencies_missing"
1464         fi
1465
1466         if test x"$dependencies_missing" = x; then
1467                 PLUGINS="$PLUGINS geolocation"
1468                 AC_MSG_RESULT(yes)
1469         elif test x"$enable_geolocation_plugin" = xauto; then
1470                 AC_MSG_RESULT(no)
1471                 AC_MSG_WARN("Plugin geolocation will not be built; missing $dependencies_missing")
1472                 enable_geolocation_plugin=no
1473                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS geolocation"
1474         else
1475                 AC_MSG_RESULT(no)
1476                 AC_MSG_ERROR("Plugin geolocation cannot be built; missing $dependencies_missing")
1477         fi
1478 else
1479         DISABLED_PLUGINS="$DISABLED_PLUGINS geolocation"
1480         AC_MSG_RESULT(no)
1481 fi
1482
1483 AC_MSG_CHECKING([whether to build mailmbox plugin])
1484 if test x"$enable_mailmbox_plugin" != xno; then
1485         PLUGINS="$PLUGINS mailmbox"
1486         AC_MSG_RESULT(yes)
1487 else
1488         DISABLED_PLUGINS="$DISABLED_PLUGINS mailmbox"
1489         AC_MSG_RESULT(no)
1490 fi
1491
1492 AC_MSG_CHECKING([whether to build newmail plugin])
1493 if test x"$enable_newmail_plugin" != xno; then
1494         PLUGINS="$PLUGINS newmail"
1495         AC_MSG_RESULT(yes)
1496 else
1497         DISABLED_PLUGINS="$DISABLED_PLUGINS newmail"
1498         AC_MSG_RESULT(no)
1499 fi
1500
1501 AC_MSG_CHECKING([whether to build notification plugin])
1502 if test x"$enable_notification_plugin" != xno; then
1503         PLUGINS="$PLUGINS notification"
1504         AC_MSG_RESULT(yes)
1505
1506         AC_DEFINE(NOTIFICATION_POPUP, 1, Activate notification popup)
1507         AC_DEFINE(NOTIFICATION_BANNER, 1, Activate notification banner)
1508         AC_DEFINE(NOTIFICATION_COMMAND, 1, Activate notification shell command)
1509         AC_DEFINE(NOTIFICATION_TRAYICON, 1, Activate notification trayicon)
1510         if test x"$platform_win32" = xno; then
1511                 AC_DEFINE(NOTIFICATION_LCDPROC, 1, Activate lcdproc support)
1512         fi
1513
1514         notification_features="banner command"
1515         notification_missing_dependencies=""
1516         if test x"$HAVE_HOTKEYS" = xyes; then
1517                 notification_features="$notification_features hotkeys"
1518         else
1519                 notification_missing_dependencies="$notification_missing_dependencies hotkeys"
1520         fi
1521         notification_features="$notification_features lcdproc"
1522         if test x"$HAVE_LIBINDICATE" = xyes; then
1523                 notification_features="$notification_features libindicate"
1524         else
1525                 notification_missing_dependencies="$notification_missing_dependencies libindicate"
1526         fi
1527         if test x"$HAVE_LIBNOTIFY" = xyes; then
1528                 notification_features="$notification_features libnotify"
1529         else
1530                 notification_missing_dependencies="$notification_missing_dependencies libnotify"
1531         fi
1532         if test x"$HAVE_LIBCANBERRA_GTK" = xyes; then
1533                 notification_features="$notification_features libcanberra-gtk"
1534         else
1535                 notification_missing_dependencies="$notification_missing_dependencies libcanberra-gtk"
1536         fi
1537         notification_features="$notification_features popup trayicon"
1538 else
1539         DISABLED_PLUGINS="$DISABLED_PLUGINS notification"
1540         AC_MSG_RESULT(no)
1541 fi
1542
1543 AC_MSG_CHECKING([whether to build pdf_viewer plugin])
1544 if test x"$enable_pdf_viewer_plugin" != xno; then
1545         dependencies_missing=""
1546
1547         if test x"$HAVE_POPPLER" = xno; then
1548                 dependencies_missing="libpoppler-glib $dependencies_missing"
1549         fi
1550
1551         if test x"$dependencies_missing" = x; then
1552                 PLUGINS="$PLUGINS pdf_viewer"
1553                 AC_MSG_RESULT(yes)
1554         elif test x"$enable_pdf_viewer_plugin" = xauto; then
1555                 AC_MSG_RESULT(no)
1556                 AC_MSG_WARN("Plugin pdf_viewer will not be built; missing $dependencies_missing")
1557                 enable_pdf_viewer_plugin=no
1558                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pdf_viewer"
1559         else
1560                 AC_MSG_RESULT(no)
1561                 AC_MSG_ERROR("Plugin pdf_viewer cannot be built; missing $dependencies_missing")
1562         fi
1563 else
1564         DISABLED_PLUGINS="$DISABLED_PLUGINS pdf_viewer"
1565         AC_MSG_RESULT(no)
1566 fi
1567
1568 AC_MSG_CHECKING([whether to build perl plugin])
1569 if test x"$enable_perl_plugin" != xno; then
1570         dependencies_missing=""
1571
1572         if test x"$HAVE_PERL" = xno; then
1573                 dependencies_missing="perl $dependencies_missing"
1574         fi
1575
1576         if test x"$dependencies_missing" = x; then
1577                 PLUGINS="$PLUGINS perl"
1578                 AC_MSG_RESULT(yes)
1579         elif test x"$enable_perl_plugin" = xauto; then
1580                 AC_MSG_RESULT(no)
1581                 AC_MSG_WARN("Plugin perl will not be built; missing $dependencies_missing")
1582                 enable_perl_plugin=no
1583                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS perl"
1584         else
1585                 AC_MSG_RESULT(no)
1586                 AC_MSG_ERROR("Plugin perl cannot be built; missing $dependencies_missing")
1587         fi
1588 else
1589         DISABLED_PLUGINS="$DISABLED_PLUGINS perl"
1590         AC_MSG_RESULT(no)
1591 fi
1592
1593 AC_MSG_CHECKING([whether to build python plugin])
1594 if test x"$enable_python_plugin" != xno; then
1595         dependencies_missing=""
1596
1597         if test x"$HAVE_PYTHON" = xno; then
1598                 dependencies_missing="python $dependencies_missing"
1599         fi
1600
1601         if test x"$dependencies_missing" = x; then
1602                 PLUGINS="$PLUGINS python"
1603                 AC_MSG_RESULT(yes)
1604         elif test x"$enable_python_plugin" = xauto; then
1605                 AC_MSG_RESULT(no)
1606                 AC_MSG_WARN("Plugin python will not be built; missing $dependencies_missing")
1607                 enable_python_plugin=no
1608                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS python"
1609         else
1610                 AC_MSG_RESULT(no)
1611                 AC_MSG_ERROR("Plugin python cannot be built; missing $dependencies_missing")
1612         fi
1613 else
1614         DISABLED_PLUGINS="$DISABLED_PLUGINS python"
1615         AC_MSG_RESULT(no)
1616 fi
1617
1618 AC_MSG_CHECKING([whether to build pgpcore plugin])
1619 if test x"$enable_pgpcore_plugin" != xno; then
1620         dependencies_missing=""
1621
1622         if test x"$HAVE_GPGME" = xno; then
1623                 dependencies_missing="libgpgme $dependencies_missing"
1624         fi
1625
1626         if test x"$dependencies_missing" = x; then
1627                 PLUGINS="$PLUGINS pgpcore"
1628                 AC_MSG_RESULT(yes)
1629         elif test x"$enable_pgpcore_plugin" = xauto; then
1630                 AC_MSG_RESULT(no)
1631                 AC_MSG_WARN("Plugin pgpcore will not be built; missing $dependencies_missing")
1632                 enable_pgpcore_plugin=no
1633                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpcore"
1634         else
1635                 AC_MSG_RESULT(no)
1636                 AC_MSG_ERROR("Plugin pgpcore cannot be built; missing $dependencies_missing")
1637         fi
1638 else
1639         DISABLED_PLUGINS="$DISABLED_PLUGINS pgpcore"
1640         AC_MSG_RESULT(no)
1641 fi
1642
1643 AC_MSG_CHECKING([whether to build pgpmime plugin])
1644 if test x"$enable_pgpmime_plugin" != xno; then
1645         dependencies_missing=""
1646
1647         if test x"$HAVE_GPGME" = xno; then
1648                 dependencies_missing="libgpgme $dependencies_missing"
1649         fi
1650         if test x"$enable_pgpcore_plugin" = xno; then
1651                 dependencies_missing="pgpcore plugin $dependencies_missing"
1652         fi
1653
1654         if test x"$dependencies_missing" = x; then
1655                 PLUGINS="$PLUGINS pgpmime"
1656                 AC_MSG_RESULT(yes)
1657         elif test x"$enable_pgpmime_plugin" = xauto; then
1658                 AC_MSG_RESULT(no)
1659                 AC_MSG_WARN("Plugin pgpmime will not be built; missing $dependencies_missing")
1660                 enable_pgpmime_plugin=no
1661                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpmime"
1662         else
1663                 AC_MSG_RESULT(no)
1664                 AC_MSG_ERROR("Plugin pgpmime cannot be built; missing $dependencies_missing")
1665         fi
1666 else
1667         DISABLED_PLUGINS="$DISABLED_PLUGINS pgpmime"
1668         AC_MSG_RESULT(no)
1669 fi
1670
1671 AC_MSG_CHECKING([whether to build pgpinline plugin])
1672 if test x"$enable_pgpinline_plugin" != xno; then
1673         dependencies_missing=""
1674
1675         if test x"$HAVE_GPGME" = xno; then
1676                 dependencies_missing="libgpgme $dependencies_missing"
1677         fi
1678         if test x"$enable_pgpcore_plugin" = xno; then
1679                 dependencies_missing="pgpcore plugin $dependencies_missing"
1680         fi
1681
1682         if test x"$dependencies_missing" = x; then
1683                 PLUGINS="$PLUGINS pgpinline"
1684                 AC_MSG_RESULT(yes)
1685         elif test x"$enable_pgpinline_plugin" = xauto; then
1686                 AC_MSG_RESULT(no)
1687                 AC_MSG_WARN("Plugin pgpinline will not be built; missing $dependencies_missing")
1688                 enable_pgpinline_plugin=no
1689                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpinline"
1690         else
1691                 AC_MSG_RESULT(no)
1692                 AC_MSG_ERROR("Plugin pgpinline cannot be built; missing $dependencies_missing")
1693         fi
1694 else
1695         DISABLED_PLUGINS="$DISABLED_PLUGINS pgpinline"
1696         AC_MSG_RESULT(no)
1697 fi
1698
1699 AC_MSG_CHECKING([whether to build rssyl plugin])
1700 if test x"$enable_rssyl_plugin" != xno; then
1701         dependencies_missing=""
1702
1703         if test x"$HAVE_LIBXML" = xno; then
1704                 dependencies_missing="libxml2 $dependencies_missing"
1705         fi
1706         if test x"$HAVE_CURL" = xno; then
1707                 dependencies_missing="libcurl $dependencies_missing"
1708         fi
1709
1710         if test x"$dependencies_missing" = x; then
1711                 PLUGINS="$PLUGINS rssyl"
1712                 AC_MSG_RESULT(yes)
1713         elif test x"$enable_rssyl_plugin" = xauto; then
1714                 AC_MSG_RESULT(no)
1715                 AC_MSG_WARN("Plugin rssyl will not be built; missing $dependencies_missing")
1716                 enable_rssyl_plugin=no
1717                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS rssyl"
1718         else
1719                 AC_MSG_RESULT(no)
1720                 AC_MSG_ERROR("Plugin rssyl cannot be built; missing $dependencies_missing")
1721         fi
1722 else
1723         DISABLED_PLUGINS="$DISABLED_PLUGINS rssyl"
1724         AC_MSG_RESULT(no)
1725 fi
1726
1727 AC_MSG_CHECKING([whether to build spamassassin plugin])
1728 if test x"$enable_spamassassin_plugin" != xno; then
1729         PLUGINS="$PLUGINS spamassassin"
1730         AC_MSG_RESULT(yes)
1731         AC_SPAMASSASSIN
1732 else
1733         DISABLED_PLUGINS="$DISABLED_PLUGINS spamassassin"
1734         AC_MSG_RESULT(no)
1735 fi
1736
1737 AC_MSG_CHECKING([whether to build smime plugin])
1738 if test x"$enable_smime_plugin" != xno; then
1739         dependencies_missing=""
1740
1741         if test x"$HAVE_GPGME" = xno; then
1742                 dependencies_missing="libgpgme $dependencies_missing"
1743         fi
1744         if test x"$enable_pgpcore_plugin" = xno; then
1745                 dependencies_missing="pgpcore plugin $dependencies_missing"
1746         fi
1747
1748         if test x"$dependencies_missing" = x; then
1749                 PLUGINS="$PLUGINS smime"
1750                 AC_MSG_RESULT(yes)
1751         elif test x"$enable_smime_plugin" = xauto; then
1752                 AC_MSG_RESULT(no)
1753                 AC_MSG_WARN("Plugin smime will not be built; missing $dependencies_missing")
1754                 enable_smime_plugin=no
1755                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS smime"
1756         else
1757                 AC_MSG_RESULT(no)
1758                 AC_MSG_ERROR("Plugin smime cannot be built; missing $dependencies_missing")
1759         fi
1760 else
1761         DISABLED_PLUGINS="$DISABLED_PLUGINS smime"
1762         AC_MSG_RESULT(no)
1763 fi
1764
1765 AC_MSG_CHECKING([whether to build spam_report plugin])
1766 if test x"$enable_spam_report_plugin" != xno; then
1767         dependencies_missing=""
1768
1769         if test x"$HAVE_CURL" = xno; then
1770                 dependencies_missing="libcurl $dependencies_missing"
1771         fi
1772
1773         if test x"$dependencies_missing" = x; then
1774                 PLUGINS="$PLUGINS spam_report"
1775                 AC_MSG_RESULT(yes)
1776         elif test x"$enable_spam_report_plugin" = xauto; then
1777                 AC_MSG_RESULT(no)
1778                 AC_MSG_WARN("Plugin spam_report will not be built; missing $dependencies_missing")
1779                 enable_spam_report_plugin=no
1780                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS spam_report"
1781         else
1782                 AC_MSG_RESULT(no)
1783                 AC_MSG_ERROR("Plugin spam_report cannot be built; missing $dependencies_missing")
1784         fi
1785 else
1786         DISABLED_PLUGINS="$DISABLED_PLUGINS spam_report"
1787         AC_MSG_RESULT(no)
1788 fi
1789
1790 AC_MSG_CHECKING([whether to build tnef_parse plugin])
1791 if test x"$enable_tnef_parse_plugin" != xno; then
1792         PLUGINS="$PLUGINS tnef_parse"
1793         AC_MSG_RESULT(yes)
1794 else
1795         DISABLED_PLUGINS="$DISABLED_PLUGINS tnef_parse"
1796         AC_MSG_RESULT(no)
1797 fi
1798
1799 AC_MSG_CHECKING([whether to build vcalendar plugin])
1800 if test x"$enable_vcalendar_plugin" != xno; then
1801         dependencies_missing=""
1802
1803         if test x"$HAVE_CURL" = xno; then
1804                 dependencies_missing="libcurl $dependencies_missing"
1805         fi
1806
1807         if test x"$HAVE_PERL" = xno; then
1808                 dependencies_missing="perl $dependencies_missing"
1809         fi
1810
1811         if test x"$dependencies_missing" = x; then
1812                 PLUGINS="$PLUGINS vcalendar"
1813                 AC_MSG_RESULT(yes)
1814         elif test x"$enable_vcalendar_plugin" = xauto; then
1815                 AC_MSG_RESULT(no)
1816                 AC_MSG_WARN("Plugin vcalendar will not be built; missing $dependencies_missing")
1817                 enable_vcalendar_plugin=no
1818                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS vcalendar"
1819         else
1820                 AC_MSG_RESULT(no)
1821                 AC_MSG_ERROR("Plugin vcalendar cannot be built; missing $dependencies_missing")
1822         fi
1823 else
1824         DISABLED_PLUGINS="$DISABLED_PLUGINS vcalendar"
1825         AC_MSG_RESULT(no)
1826 fi
1827
1828 dnl And finally the automake conditionals.
1829
1830 AM_CONDITIONAL(BUILD_ACPI_NOTIFIER_PLUGIN,      test x"$enable_acpi_notifier_plugin" != xno)
1831 AM_CONDITIONAL(BUILD_ADDRESS_KEEPER_PLUGIN,     test x"$enable_address_keeper_plugin" != xno)
1832 AM_CONDITIONAL(BUILD_ARCHIVE_PLUGIN,            test x"$enable_archive_plugin" != xno)
1833 AM_CONDITIONAL(BUILD_ATT_REMOVER_PLUGIN,        test x"$enable_att_remover_plugin" != xno)
1834 AM_CONDITIONAL(BUILD_ATTACHWARNER_PLUGIN,       test x"$enable_attachwarner_plugin" != xno)
1835 AM_CONDITIONAL(BUILD_BOGOFILTER_PLUGIN,         test x"$enable_bogofilter_plugin" != xno)
1836 AM_CONDITIONAL(BUILD_BSFILTER_PLUGIN,           test x"$enable_bsfilter_plugin" != xno)
1837 AM_CONDITIONAL(BUILD_CLAMD_PLUGIN,              test x"$enable_clamd_plugin" != xno)
1838 AM_CONDITIONAL(BUILD_DEMO_PLUGIN,               test x"$enable_demo_plugin" != xno)
1839 AM_CONDITIONAL(BUILD_FANCY_PLUGIN,              test x"$enable_fancy_plugin" != xno)
1840 AM_CONDITIONAL(BUILD_FETCHINFO_PLUGIN,          test x"$enable_fetchinfo_plugin" != xno)
1841 AM_CONDITIONAL(BUILD_GDATA_PLUGIN,              test x"$enable_gdata_plugin" != xno)
1842 AM_CONDITIONAL(BUILD_GEOLOCATION_PLUGIN,        test x"$enable_geolocation_plugin" != xno)
1843 AM_CONDITIONAL(BUILD_MAILMBOX_PLUGIN,           test x"$enable_mailmbox_plugin" != xno)
1844 AM_CONDITIONAL(BUILD_NEWMAIL_PLUGIN,            test x"$enable_newmail_plugin" != xno)
1845 AM_CONDITIONAL(BUILD_NOTIFICATION_PLUGIN,       test x"$enable_notification_plugin" != xno)
1846 AM_CONDITIONAL(BUILD_HOTKEYS,                   test x"$enable_notification_plugin" != xno -a x"$HAVE_HOTKEYS" = xyes)
1847 AM_CONDITIONAL(BUILD_PDF_VIEWER_PLUGIN,         test x"$enable_pdf_viewer_plugin" != xno)
1848 AM_CONDITIONAL(BUILD_PERL_PLUGIN,               test x"$enable_perl_plugin" != xno)
1849 AM_CONDITIONAL(BUILD_PYTHON_PLUGIN,             test x"$enable_python_plugin" != xno)
1850 AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN,            test x"$enable_pgpcore_plugin" != xno)
1851 AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN,            test x"$enable_pgpmime_plugin" != xno)
1852 AM_CONDITIONAL(BUILD_PGPINLINE_PLUGIN,          test x"$enable_pgpinline_plugin" != xno)
1853 AM_CONDITIONAL(BUILD_RSSYL_PLUGIN,              test x"$enable_rssyl_plugin" != xno)
1854 AM_CONDITIONAL(BUILD_SMIME_PLUGIN,              test x"$enable_smime_plugin" != xno)
1855 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN,       test x"$enable_spamassassin_plugin" != xno)
1856 AM_CONDITIONAL(BUILD_SPAM_REPORT_PLUGIN,        test x"$enable_spam_report_plugin" != xno)
1857 AM_CONDITIONAL(BUILD_TNEF_PARSE_PLUGIN,         test x"$enable_tnef_parse_plugin" != xno)
1858 AM_CONDITIONAL(BUILD_VCALENDAR_PLUGIN,          test x"$enable_vcalendar_plugin" != xno)
1859
1860
1861 dnl ****************************
1862 dnl ** Final configure output **
1863 dnl ****************************
1864
1865 AC_OUTPUT([
1866 Makefile
1867 m4/Makefile
1868 po/Makefile.in
1869 src/common/version.h
1870 src/Makefile
1871 src/common/Makefile
1872 src/common/passcrypt.h
1873 src/gtk/Makefile
1874 src/etpan/Makefile
1875 src/plugins/Makefile
1876 src/plugins/acpi_notifier/Makefile
1877 src/plugins/address_keeper/Makefile
1878 src/plugins/archive/Makefile
1879 src/plugins/att_remover/Makefile
1880 src/plugins/attachwarner/Makefile
1881 src/plugins/bogofilter/Makefile
1882 src/plugins/bsfilter/Makefile
1883 src/plugins/clamd/Makefile
1884 src/plugins/clamd/libclamd/Makefile
1885 src/plugins/demo/Makefile
1886 src/plugins/fancy/Makefile
1887 src/plugins/fetchinfo/Makefile
1888 src/plugins/gdata/Makefile
1889 src/plugins/geolocation/Makefile
1890 src/plugins/mailmbox/Makefile
1891 src/plugins/newmail/Makefile
1892 src/plugins/notification/Makefile
1893 src/plugins/notification/gtkhotkey/Makefile
1894 src/plugins/pdf_viewer/Makefile
1895 src/plugins/perl/Makefile
1896 src/plugins/perl/tools/Makefile
1897 src/plugins/python/Makefile
1898 src/plugins/pgpcore/Makefile
1899 src/plugins/pgpmime/Makefile
1900 src/plugins/pgpinline/Makefile
1901 src/plugins/rssyl/Makefile
1902 src/plugins/smime/Makefile
1903 src/plugins/spamassassin/Makefile
1904 src/plugins/spam_report/Makefile
1905 src/plugins/tnef_parse/Makefile
1906 src/plugins/vcalendar/Makefile
1907 src/plugins/vcalendar/libical/Makefile
1908 src/plugins/vcalendar/libical/libical/icalversion.h
1909 src/plugins/vcalendar/libical/libical/Makefile
1910 src/plugins/vcalendar/libical/design-data/Makefile
1911 src/plugins/vcalendar/libical/scripts/Makefile
1912 doc/Makefile
1913 doc/man/Makefile
1914 tools/Makefile
1915 config/Makefile
1916 manual/Makefile
1917 manual/dtd/Makefile
1918 manual/dist/Makefile
1919 manual/dist/pdf/Makefile
1920 manual/dist/ps/Makefile
1921 manual/dist/html/Makefile
1922 manual/dist/txt/Makefile
1923 manual/fr/Makefile
1924 manual/fr/dist/Makefile
1925 manual/fr/dist/pdf/Makefile
1926 manual/fr/dist/ps/Makefile
1927 manual/fr/dist/html/Makefile
1928 manual/fr/dist/txt/Makefile
1929 manual/pl/Makefile
1930 manual/pl/dist/Makefile
1931 manual/pl/dist/pdf/Makefile
1932 manual/pl/dist/ps/Makefile
1933 manual/pl/dist/html/Makefile
1934 manual/pl/dist/txt/Makefile
1935 manual/es/Makefile
1936 manual/es/dist/Makefile
1937 manual/es/dist/pdf/Makefile
1938 manual/es/dist/ps/Makefile
1939 manual/es/dist/html/Makefile
1940 manual/es/dist/txt/Makefile
1941 manual/de/Makefile
1942 manual/de/dist/Makefile
1943 manual/de/dist/pdf/Makefile
1944 manual/de/dist/ps/Makefile
1945 manual/de/dist/html/Makefile
1946 manual/de/dist/txt/Makefile
1947 claws-mail.pc
1948 version
1949 ])
1950
1951 dnl Output the configuration summary
1952 echo ""
1953 echo "$PACKAGE $VERSION"
1954 echo ""
1955 if test x"$enable_new_addrbook" = xyes; then
1956         echo "Using Address Book : New experimental interface"
1957 else
1958         echo "Using Address Book : Old stable interface"
1959         echo "JPilot             : $enable_jpilot"
1960         echo "LDAP               : $enable_ldap"
1961 fi
1962 echo "gnuTLS             : $enable_gnutls"
1963 echo "iconv              : $am_cv_func_iconv"
1964 echo "compface           : $enable_compface"
1965 echo "IPv6               : $enable_ipv6"
1966 echo "enchant            : $enable_enchant"
1967 echo "IMAP4              : $enable_libetpan"
1968 echo "NNTP               : $enable_libetpan"
1969 echo "Crash dialog       : $enable_crash_dialog"
1970 echo "LibSM              : $enable_libsm"
1971 echo "DBUS               : $enable_dbus"
1972 echo "NetworkManager     : $enable_networkmanager"
1973 echo "Manual             : $enable_manual"
1974 echo "Generic UMPC code  : $enable_generic_umpc"
1975 echo "Maemo build        : $enable_maemo"
1976 echo "Config dir         : $ac_cv_with_config_dir"
1977
1978 echo "Plugins"
1979 echo "   Built:"
1980 for plugin in $PLUGINS; do
1981 echo "            - $plugin"
1982 if test x"$plugin" = xnotification; then
1983         echo "                Features:"
1984         for notif_feature in $notification_features; do
1985                 echo "                    $notif_feature"
1986         done;
1987         if test "x$notification_missing_dependencies" != x; then
1988                 echo "                Disabled due to missing dependencies:"
1989                 for notif_miss_dep in $notification_missing_dependencies; do
1990                         echo "                    $notif_miss_dep"
1991                 done;
1992         fi
1993 fi
1994 done;
1995 if test "x$DISABLED_PLUGINS" != x; then
1996 echo "   Disabled:"
1997 for plugin in $DISABLED_PLUGINS; do
1998 echo "            - $plugin"
1999 done;
2000 fi
2001
2002 if test "x$MISSING_DEPS_PLUGINS" != x; then
2003 echo "   Disabled due to missing dependencies:"
2004 for plugin in $MISSING_DEPS_PLUGINS; do
2005 echo "            - $plugin"
2006 done;
2007 fi
2008 echo ""
2009 echo "The binary will be installed in $prefix/bin"
2010 echo ""
2011 echo "Configure finished, type 'make' to build."