remove text about modifying keyboard shortcuts
[claws.git] / configure.ac
blobc32c79a694deccb2b4ad12a20c5d6940b248d532
2 AC_PREREQ([2.69])
4 m4_define([claws_VERSION],
5     m4_esyscmd([./get-git-version]))
7 AC_INIT([claws-mail],
8     m4_defn([claws_VERSION]))
9 AC_CONFIG_SRCDIR([src/main.c])
10 AC_CONFIG_AUX_DIR([config])
11 AC_CONFIG_MACRO_DIR([m4])
12 AC_CANONICAL_TARGET
13 AM_INIT_AUTOMAKE([no-define])
15 PACKAGE=claws-mail
17 dnl version number
18 INTERFACE_AGE=0
19 BINARY_AGE=0
20 EXTRA_RELEASE=
21 EXTRA_GTK3_VERSION=
23 GIT_VERSION=m4_defn([claws_VERSION])
25 if test \( -z "$GIT_VERSION" \); then
26         AC_MSG_ERROR([*** could not determine program version])
29 MAJOR_VERSION=${GIT_VERSION%%.*}
30 MINOR_VERSION=${GIT_VERSION#*.}
31 MINOR_VERSION=${MINOR_VERSION%%.*}
32 MICRO_VERSION=${GIT_VERSION##*.}
33 MICRO_VERSION=${MICRO_VERSION%%-*}
34 EXTRA_VERSION=${GIT_VERSION#*-}
35 EXTRA_VERSION=${EXTRA_VERSION%%-*}
37 if test \( "x$EXTRA_VERSION" != "x" -a `echo -n $EXTRA_VERSION | wc -c` -lt 5 \); then
38     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}git${EXTRA_VERSION}
39 else
40     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
41     EXTRA_VERSION=0
44 if test \( "x$EXTRA_RELEASE" != "x" \); then
45     VERSION=${VERSION}${EXTRA_RELEASE}${EXTRA_GTK3_VERSION}
48 dnl AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
49 dnl AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
50 AC_SUBST(PACKAGE)
51 AC_SUBST(VERSION)
52 AC_SUBST(MAJOR_VERSION)
53 AC_SUBST(MINOR_VERSION)
54 AC_SUBST(MICRO_VERSION)
55 AC_SUBST(EXTRA_VERSION)
56 AC_SUBST(GIT_VERSION)
58 AC_CHECK_PROG(HAVE_GTK_ICON_CACHE, gtk-update-icon-cache, yes, no)
59 AM_CONDITIONAL(UPDATE_GTK_ICON_CACHE, test x"$HAVE_GTK_ICON_CACHE" = xyes)
61 dnl Require pkg-config
62 m4_ifndef([PKG_PROG_PKG_CONFIG],
63     [m4_fatal([Could not locate the pkg-config autoconf macros. These
64 are usually located in /usr/share/aclocal/pkg.m4. If your macros
65 are in a different location, try setting the environment variable
66 ACLOCAL_FLAGS before running ./autogen.sh or autoreconf again. E.g.:
67 export ACLOCAL_FLAGS="-I/other/macro/dir"])
69 PKG_PROG_PKG_CONFIG
71 dnl libtool versioning
72 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
73 LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
74 LT_REVISION=$INTERFACE_AGE
75 LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
76 AC_SUBST(LT_RELEASE)
77 AC_SUBST(LT_CURRENT)
78 AC_SUBST(LT_REVISION)
79 AC_SUBST(LT_AGE)
81 dnl Specify a header configuration file
82 AC_CONFIG_HEADERS(config.h)
83 AC_CONFIG_HEADERS(claws-features.h)
85 AM_MAINTAINER_MODE
86 AC_USE_SYSTEM_EXTENSIONS
88 dnl Checks for programs.
89 dnl AC_ARG_PROGRAM
90 AC_PROG_CC
91 AC_SEARCH_LIBS([strerror],[cposix])
92 AC_PROG_INSTALL
93 AC_PROG_LN_S
94 AC_PROG_MAKE_SET
95 AC_PROG_CPP
96 dnl AC_PROG_RANLIB
97 AC_PROG_LEX(noyywrap)
98 AC_PROG_YACC
99 AC_LIB_PREFIX
100 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
101 [AC_REQUIRE(AC_CANONICAL_HOST)_LT_SET_OPTION([LT_INIT],[win32-dll])
102 m4_warn([obsolete],[AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
103 put the 'win32-dll' option into LT_INIT's first parameter.])
106 LT_INIT
107 LT_PROG_RC
108 LT_LANG([Windows Resource])
109 LT_INIT
110 AC_PROG_AWK
112 dnl AC_PROG_CXX will set CXX=g++ even if it finds no useable C++
113 dnl compiler, so we have to check whether the program named by
114 dnl CXX exists.
115 AC_PROG_CXX
116 AC_PATH_PROG(REAL_CXX, $CXX)
117 HAVE_CXX=no
118 if test -n "$REAL_CXX"; then
119         HAVE_CXX=yes
122 AC_SYS_LARGEFILE
124 dnl ******************************
125 dnl Checks for host
126 dnl Not needed anymore because we
127 dnl do AC_CANONICAL_TARGET above
128 dnl ******************************
129 dnl AC_CANONICAL_HOST
131 dnl Copied from the official gtk+-2 configure.in
132 AC_MSG_CHECKING([for host platform])
133 case "$host" in
134   *-*-mingw*|*-*-cygwin*)
135     platform_win32=yes
136     LDFLAGS="$LDFLAGS -mwindows -Wl,--export-all-symbols"
137     ;;
138         *-apple-*)
139                 platform_osx=yes
140                 LDFLAGS="$LDFLAGS -Wl,-export_dynamic"
141                 ;;
142   *)
143     platform_win32=no
144                 platform_osx=no
145                 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
146     ;;
147 esac
148 AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = x"yes")
149 AM_CONDITIONAL(PLATFORM_OSX, test x"$platform_osx" = x"yes")
150 AC_MSG_RESULT([$host])
152 AC_MSG_CHECKING([for native Win32])
153 case "$host" in
154   *-*-mingw*)
155     os_win32=yes
156     ;;
157   *)
158     os_win32=no
159     ;;
160 esac
161 AC_MSG_RESULT([$os_win32])
162 AM_CONDITIONAL(OS_WIN32, test x"$os_win32" = x"yes")
164 AC_MSG_CHECKING([for Cygwin])
165 case "$host" in
166   *-*-cygwin*)
167     env_cygwin=yes
168     ;;
169   *)
170     env_cygwin=no
171     ;;
172 esac
173 AC_MSG_RESULT([$env_cygwin])
174 AM_CONDITIONAL(CYGWIN, test x"$env_cygwin" = x"yes")
176 AC_MSG_CHECKING([for time_t format specifier])
177 _gcc_cflags_save=$CFLAGS
178 CFLAGS="-Wformat -Werror"
179 AC_COMPILE_IFELSE([
180         AC_LANG_PROGRAM([[
181                 #include <stdio.h>
182                 #include <time.h>
183                 ]],[[printf("%lld", time(NULL));]])],
184         [time_t_long_long=yes],
185         [time_t_long_long=no])
186 CFLAGS=$_gcc_cflags_save
188 if test x"$time_t_long_long" = xyes; then
189         time_t_fmt=lld
190 else
191         time_t_fmt=ld
193 AC_MSG_RESULT([$time_t_fmt])
194 AC_DEFINE_UNQUOTED([CM_TIME_FORMAT], ["$time_t_fmt"],
195         [Define printf format specifier for time_t])
197 AM_CFLAGS="-Wall"
198 if test $USE_MAINTAINER_MODE = yes; then
199         AM_CFLAGS="$AM_CFLAGS -g"
202 AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
203 _gcc_cflags_save=$CFLAGS
204 CFLAGS="-Wno-pointer-sign"
205 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],_gcc_psign=yes,_gcc_psign=no)
206 AC_MSG_RESULT($_gcc_psign)
207 CFLAGS=$_gcc_cflags_save;
208 if test x"$_gcc_psign" = xyes ; then
209         AM_CFLAGS="$AM_CFLAGS -Wno-pointer-sign"
212 pthread_name=
213 case "$target" in
214 *-darwin*)
215         AM_CFLAGS="$AM_CFLAGS -no-cpp-precomp -fno-common"
216         ;;
217 *-*-mingw*)
218         # Note that we need to link to pthread in all cases. This
219         # is because some locking is used even when pthread support is
220         # disabled.
221         pthread_name=pthread
222         AM_CFLAGS="$AM_CFLAGS -mms-bitfields"
223         LIBS="$LIBS -l${pthread_name} -lws2_32 -lregex"
224         ;;
225 *-*-solaris*)
226         AM_CFLAGS="$AM_CFLAGS -std=gnu99"
227         AC_DEFINE([SOLARIS], [], [Target is Solaris])
228         ;;
229 esac
231 AC_SUBST(AM_CFLAGS)
233 dnl Checks for iconv
234 AM_ICONV
236 dnl floor and ceil are  in -lm
237 LIBS="$LIBS -lm"
240 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
242 syl_save_LIBS=$LIBS
243 LIBS="$LIBS $GTK_LIBS"
244 AC_CHECK_FUNCS(bind_textdomain_codeset)
245 LIBS=$syl_save_LIBS
247 dnl for gettext
248 ALL_LINGUAS="ca cs da de el_GR en_GB es fi fr hu id_ID it ja nb nl pl pt_BR ro ru sk sv tr zh_TW"
249 GETTEXT_PACKAGE=claws-mail
250 AC_SUBST(GETTEXT_PACKAGE)
251 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
253 AM_GNU_GETTEXT_VERSION([0.18])
254 AM_GNU_GETTEXT([external])
256 AC_ARG_ENABLE(manual,
257                 [  --disable-manual                Do not build user manual],
258                 [enable_manual=$enableval], [enable_manual=yes])
260 AC_ARG_ENABLE(libsm,
261                 [  --disable-libsm                 Do not build libSM support for session management],
262                 [enable_libsm=$enableval], [enable_libsm=yes])
264 AC_ARG_ENABLE(ipv6,
265                 [  --disable-ipv6                  Do not build IPv6 support],
266                 [enable_ipv6=$enableval], [enable_ipv6=yes])
268 AC_ARG_ENABLE(gnutls,
269                 [  --disable-gnutls                Do not build GnuTLS support for TLS],
270                     [enable_gnutls=$enableval], [enable_gnutls=yes])
272 AC_ARG_ENABLE(oauth2,
273                 [  --disable-oauth2                Do not build OAuth2 support],
274                     [enable_oauth2=$enableval], [enable_oauth2=yes])
276 AC_ARG_ENABLE(enchant,
277                 [  --disable-enchant               Do not build Enchant support for spell-checking],
278                 [enable_enchant=$enableval], [enable_enchant=yes])
280 AC_ARG_ENABLE(crash-dialog,
281                 [  --enable-crash-dialog           Build crash dialog],
282                 [enable_crash_dialog=$enableval], [enable_crash_dialog=no])
284 AC_ARG_ENABLE(generic-umpc,
285                 [  --enable-generic-umpc           Build generic UMPC code],
286                 [enable_generic_umpc=$enableval], [enable_generic_umpc=no])
288 AC_ARG_ENABLE(compface,
289                 [  --disable-compface              Do not build compface support for X-Face],
290                 [enable_compface=$enableval], [enable_compface=yes])
292 AC_ARG_ENABLE(pthread,
293                 [  --disable-pthread               Do not build pthread support],
294                 [enable_pthread=$enableval], [enable_pthread=yes])
296 AC_ARG_ENABLE(startup-notification,
297                 [  --disable-startup-notification  Do not startup notification support],
298                 [enable_startup_notification=$enableval], [enable_startup_notification=yes])
300 AC_ARG_ENABLE(dbus,
301                 [  --disable-dbus                  Do not build DBUS support],
302                 [enable_dbus=$enableval], [enable_dbus=yes])
304 AC_ARG_ENABLE(ldap,
305                 [  --disable-ldap                  Do not build LDAP support],
306                 [enable_ldap=$enableval], [enable_ldap=yes])
308 AC_ARG_ENABLE(jpilot,
309                 [  --disable-jpilot                Do not build JPilot support],
310                 [enable_jpilot=$enableval], [enable_jpilot=yes])
312 AC_ARG_ENABLE(networkmanager,
313                 [  --disable-networkmanager        Do not build NetworkManager support],
314                 [enable_networkmanager=$enableval], [enable_networkmanager=yes])
316 AC_ARG_ENABLE(libetpan,
317                 [  --disable-libetpan              Do not build libetpan support for IMAP4/NNTP],
318                 [enable_libetpan=$enableval], [enable_libetpan=yes])
320 AC_ARG_ENABLE(valgrind,
321                 [  --disable-valgrind              Do not build valgrind support for debugging],
322                 [enable_valgrind=$enableval], [enable_valgrind=yes])
324 AC_ARG_ENABLE(alternate-addressbook,
325                 [  --enable-alternate-addressbook  Build alternate external address book support],
326                 [enable_alternate_addressbook=$enableval], [enable_alternate_addressbook=no])
328 AC_ARG_ENABLE(svg,
329         [  --disable-svg                   Do not build SVG support],
330         [enable_svg=$enableval], [enable_svg=yes])
332 AC_ARG_ENABLE(tests,
333                                 [  --enable-tests                   Build unit tests],
334                                 [enable_tests=$enableval], [enable_tests=no])
336 manualdir='${docdir}/manual'
337 AC_ARG_WITH(manualdir,
338         [  --with-manualdir=DIR    Manual directory],
339         [manualdir="$withval"])
340 AC_SUBST(manualdir)
342 dnl ******************************
343 dnl ** Check for required tools **
344 dnl ** to build manuals         **
345 dnl ******************************
347 AC_PATH_PROG(DOCBOOK2HTML, docbook2html)
348 AC_PATH_PROG(DOCBOOK2TXT, docbook2txt)
349 AC_PATH_PROG(DOCBOOK2PS, docbook2ps)
350 AC_PATH_PROG(DOCBOOK2PDF, docbook2pdf)
352 AM_CONDITIONAL(MANUAL_HTML, test -n "$DOCBOOK2HTML")
353 AM_CONDITIONAL(MANUAL_TXT, test -n "$DOCBOOK2TXT")
354 AM_CONDITIONAL(MANUAL_PDF, test -n "$DOCBOOK2PDF")
355 AM_CONDITIONAL(MANUAL_PS, test -n "$DOCBOOK2PS")
357 if test x"$enable_manual" = x"yes"; then
358     if test -n "$DOCBOOK2TXT" -o -n "$DOCBOOK2HTML" \
359         -o -n "$DOCBOOK2PS" -o -n "$DOCBOOK2PDF"; then
360             enable_manual=yes
361         else
362             enable_manual=no
363     fi
366 AM_CONDITIONAL(BUILD_MANUAL, test x"$enable_manual" = xyes)
368 dnl Set PACKAGE_DATA_DIR in config.h.
369 if test "x${datarootdir}" = 'x${prefix}/share'; then
370         if test "x${prefix}" = "xNONE"; then
371                 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
372         else
373                 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
374         fi
375 else
376         AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datarootdir}/${PACKAGE}",[PACKAGE_DATA_DIR])
379 AC_CHECK_LIB(xpg4, setlocale)
381 SM_LIBS=""
382 dnl Check for LibSM
383 AC_MSG_CHECKING([whether to use LibSM])
384 if test x"$enable_libsm" = xyes; then
385         AC_MSG_RESULT(yes)
386         AC_CHECK_LIB(SM, SmcSaveYourselfDone,
387                 [SM_LIBS="$X_LIBS -lSM -lICE"],enable_libsm=no,
388                 $X_LIBS -lICE)
389         AC_CHECK_HEADERS(X11/SM/SMlib.h,,enable_libsm=no)
390         if test x"$enable_libsm" = xyes; then
391                 AC_DEFINE(HAVE_LIBSM, 1, [Define to 1 if you have libSM installed])
392         else
393                 AC_MSG_RESULT(not found)
394                 AC_MSG_WARN([*** LibSM will not be supported ***])
395         fi
396 else
397         AC_MSG_RESULT(no)
399 AC_SUBST(SM_LIBS)
401 dnl Check for __VA_OPT__ macro
402 AC_CACHE_CHECK([for __VA_OPT__],
403         [ac_cv_va_opt],
404         [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[#define va_opt_printf(format, ...) fprintf(stderr, format __VA_OPT__(,) __VA_ARGS__)
405                 va_opt_printf("success\n");]])],[ac_cv_va_opt=yes],[ac_cv_va_opt=no])]
407 if test "$ac_cv_va_opt" = yes; then
408         AC_DEFINE([HAVE_VA_OPT], [1], [Define if __VA_OPT__ macro works])
411 dnl Check for d_type member in struct dirent
412 AC_MSG_CHECKING([whether struct dirent has d_type member])
413 AC_CACHE_VAL(ac_cv_dirent_d_type,[
414         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dirent.h>]], [[struct dirent d; d.d_type = DT_REG;]])],[ac_cv_dirent_d_type=yes],[ac_cv_dirent_d_type=no])
416 AC_MSG_RESULT($ac_cv_dirent_d_type)
417 if test $ac_cv_dirent_d_type = yes; then
418         AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
419                   Define if `struct dirent' has `d_type' member.)
422 # Check whether mkdir does not take the permission argument.
423 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
425 dnl Checks for header files.
426 AC_HEADER_DIRENT
428 AC_HEADER_SYS_WAIT
429 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
430                  sys/param.h sys/utsname.h sys/select.h \
431                  wchar.h wctype.h locale.h netdb.h)
432 AC_CHECK_HEADER([execinfo.h], [AC_DEFINE(HAVE_BACKTRACE,1,[Has backtrace*() needed for retrieving stack traces])])
433 AC_SEARCH_LIBS(backtrace_symbols, [execinfo])
435 dnl Checks for typedefs, structures, and compiler characteristics.
436 AC_C_CONST
437 AC_TYPE_OFF_T
438 AC_TYPE_PID_T
439 AC_TYPE_SIZE_T
440 AC_STRUCT_TM
442 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
443 AC_CHECK_SIZEOF(unsigned short, 2)
444 AC_CHECK_SIZEOF(unsigned int, 4)
445 AC_CHECK_SIZEOF(unsigned long, 4)
447 dnl Checks for library functions.
448 AC_FUNC_ALLOCA
449 AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr strcasestr \
450                uname flock lockf inet_aton inet_addr \
451                fchmod mkstemp truncate getuid regcomp)
453 AC_CHECK_FUNCS(fgets_unlocked fgetc_unlocked fputs_unlocked fputc_unlocked fread_unlocked fwrite_unlocked feof_unlocked ferror_unlocked fmemopen)
455 dnl *****************
456 dnl ** common code **
457 dnl *****************
459 dnl check for glib
460 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.36 gmodule-2.0 >= 2.36 gobject-2.0 >= 2.36 gthread-2.0 >= 2.36])
462 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
463 AC_SUBST(GLIB_GENMARSHAL)
465 AC_SUBST(GLIB_CFLAGS)
466 AC_SUBST(GLIB_LIBS)
468 PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0 >= 2.26])
470 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
471 syl_save_LIBS=$LIBS
472 LIBS="$LIBS $GTK_LIBS"
473 AC_CHECK_FUNCS(bind_textdomain_codeset)
474 LIBS=$syl_save_LIBS
476 dnl check for IPv6 option
477 dnl automated checks for IPv6 support.
478 AC_MSG_CHECKING([whether to use IPv6])
479 if test x"$enable_ipv6" = xyes; then
480         AC_MSG_RESULT(yes)
481         AC_MSG_CHECKING([for IPv6 support])
482         if test x"$platform_win32" = xyes; then
483                 AC_CACHE_VAL(ac_cv_ipv6,[
484                         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
485                                         #include <ws2tcpip.h>
486                                 ]], [[struct in6_addr a;]])],[ac_cv_ipv6=yes],[ac_cv_ipv6=no])
487                 ])
488         else
489                 AC_CACHE_VAL(ac_cv_ipv6,[
490                         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
491                                         #define INET6
492                                         #include <sys/types.h>
493                                         #include <netinet/in.h>
494                                 ]], [[int x = IPPROTO_IPV6; struct in6_addr a;]])],[ac_cv_ipv6=yes],[ac_cv_ipv6=no])
495                 ])
496         fi
497         AC_MSG_RESULT($ac_cv_ipv6)
498         if test $ac_cv_ipv6 = yes; then
499                 AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
500         else
501                 AC_MSG_WARN(*** IPv6 will not be supported ***)
502                 enable_ipv6=no
503         fi
504 else
505         AC_MSG_RESULT(no)
508 dnl GNUTLS
509 AC_MSG_CHECKING([whether to use GnuTLS])
510 AC_MSG_RESULT($enable_gnutls)
511 if test "x$enable_gnutls" != "xno"; then
512         PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.2,
513         [
514                 AC_DEFINE(USE_GNUTLS, 1, gnutls)
515                 echo "Building with GnuTLS"
516                 PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.11,
517                 [
518                         dnl No linking against libgcrypt needed
519                 ],
520                 [
521                         dnl linking against libgcrypt *is* needed
522                         GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt"
523                 ])
524         ],
525         [
526                 echo "Building without GnuTLS"
527                 AC_MSG_RESULT([*** GnuTLS support is recommended ])
528                 AC_MSG_RESULT([*** You can use --disable-gnutls if you don't need it.])
529                 AC_MSG_ERROR([GnuTLS not found])
530         ])
531         AC_SUBST(GNUTLS_LIBS)
532         AC_SUBST(GNUTLS_CFLAGS)
535 PKG_CHECK_MODULES(NETTLE, nettle)
536 AC_SUBST(NETTLE_LIBS)
538 AC_ARG_WITH(passcrypt-key, [  --with-passcrypt-key=KEY     Key used to encode passwords (8 byte string)],
539             with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
540 AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
542 dnl RC dir (will be default at a certain point in time)
543 AC_ARG_WITH(config-dir,    [  --with-config-dir=RCDIR      Local configuration dir (default: .claws-mail)],
544               ac_cv_with_config_dir="$withval", ac_cv_with_config_dir="")
546 dnl Set correct default value based on platform
547 if test x"$ac_cv_with_config_dir" = x""; then
548         if test x"$platform_win32" = xyes; then
549                 ac_cv_with_config_dir="Claws-mail"
550         else
551                 ac_cv_with_config_dir=".claws-mail"
552         fi
554 AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
556 AC_ARG_WITH(password-encryption, [  --with-password-encryption=PROVIDER    Which cryptographic library to use for encrypting stored passwords (gnutls, old, default)],
557                                                 pwd_crypto="$withval", pwd_crypto="default")
559 if test x"$pwd_crypto" = xdefault; then
560         if test x"$enable_gnutls" = xyes; then
561                 if `$PKG_CONFIG --atleast-version=3.0 gnutls`; then
562                         pwd_crypto="gnutls"
563                 fi
564         fi
566 if test x"$pwd_crypto" = xdefault; then
567         pwd_crypto="old"
570 case $pwd_crypto in
571         gnutls)
572                 if test x"$enable_gnutls" = xno; then
573                         AC_MSG_ERROR([GnuTLS password encryption requested but GnuTLS is not available.])
574                 fi
575                 if ! `$PKG_CONFIG --atleast-version=3.0 gnutls`; then
576                         AC_MSG_ERROR([GnuTLS version at least 3.0 is required for password encryption.])
577                 fi
578                 AC_DEFINE(PASSWORD_CRYPTO_GNUTLS, 1, Use GnuTLS for stored password encryption)
579                 ;;
580         old)
581                 AC_DEFINE(PASSWORD_CRYPTO_OLD, 1, Use old insecure method for stored password encryption)
582                 ;;
583         *)
584                 AC_MSG_ERROR([Unknown password encryption provider requested.])
585                 ;;
586 esac
588 AC_MSG_CHECKING([whether GnuTLS support is present for OAuth2])
589 if test x"$enable_gnutls" = xyes; then
590         AC_MSG_RESULT([yes])
591         AC_MSG_CHECKING([whether to build OAuth2 support])
592         if test x"$enable_oauth2" = xyes; then
593                 AC_MSG_RESULT([yes])
594                 AC_DEFINE(USE_OAUTH2, 1, [Define if OAuth2 is to be activated.])
595         else
596                 AC_MSG_RESULT([no])
597                 enable_oauth2=no
598         fi
599 else
600         AC_MSG_RESULT([no])
601         enable_oauth2=no
604 dnl ************************
605 dnl ** GTK user interface **
606 dnl ************************
608 dnl Checks for GTK
609 PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.20 cairo)
611 AC_ARG_ENABLE(deprecated,
612                 [  --disable-deprecated            Disable deprecated GTK functions],
613                 gtkdeprecated=$enableval)
614 AC_MSG_CHECKING([whether to use deprecated GTK functions])
615 if test x"$gtkdeprecated" != xno; then
616         AC_MSG_RESULT(yes)
617 else
618         GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
619         AC_MSG_RESULT(no)
622 dnl Make sure the code does not regress to using deprecated GTK stuff...
623 GTK_CFLAGS="$GTK_CFLAGS -DGTK_DISABLE_SINGLE_INCLUDES -DGSEAL_ENABLE"
625 AC_SUBST(GTK_CFLAGS)
626 AC_SUBST(GTK_LIBS)
628 dnl enchant is used for spell checking
629 AC_MSG_CHECKING([whether to use enchant])
630 AC_MSG_RESULT($enable_enchant)
631 if test $enable_enchant = yes; then
632         PKG_CHECK_MODULES(ENCHANT, enchant >= 1.4.0,
633         [
634                 AC_DEFINE(USE_ENCHANT, 1, enchant)
635                 echo "Building with enchant"
636                 enable_enchant=yes
637         ],
638         [
639                 PKG_CHECK_MODULES(ENCHANT, enchant-2 >= 2.0.0,
640                 [
641                         AC_DEFINE(USE_ENCHANT, 1, enchant-2)
642                         echo "Building with enchant-2"
643                         enable_enchant=yes
644                 ],
645                 [
646                         echo "Building without enchant-notification"
647                         enable_enchant=no
648                 ])
649         ])
650         AC_SUBST(ENCHANT_CFLAGS)
651         AC_SUBST(ENCHANT_LIBS)
654 dnl want crash dialog
655 if test $enable_crash_dialog = yes; then
656 dnl check if GDB is somewhere
657         AC_CHECK_PROG(enable_crash_dialog, gdb, yes, no)
658         AC_MSG_CHECKING([whether to use crash dialog])
659         if test $enable_crash_dialog = yes; then
660                 AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
661         fi
662         AC_MSG_RESULT($enable_crash_dialog)
665 dnl generic umpc
666 if test $enable_generic_umpc = yes; then
667         AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
668         AC_MSG_RESULT($enable_generic_umpc)
671 dnl Check for X-Face support
672 AC_MSG_CHECKING([whether to use compface])
673 if test x"$enable_compface" = xyes; then
674         AC_MSG_RESULT(yes)
675         AC_CHECK_LIB(compface, uncompface,
676                 [AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)],
677                 [enable_compface=no])
678         if test x"$enable_compface" = xyes; then
679                 COMPFACE_LIBS="-lcompface"
680         else
681                 COMPFACE_LIBS=""
682         fi
683         AC_SUBST(COMPFACE_LIBS)
684 else
685         AC_MSG_RESULT(no)
688 dnl check for pthread support
689 AC_MSG_CHECKING([whether to use pthread])
690 if test x$enable_pthread = xno; then
691         AC_MSG_RESULT(no)
692 else
693         AC_MSG_RESULT(yes)
695         # For W32 we need to use a special ptrhead lib. In this case we can't
696         # use AC_CHECK_LIB because it has no means of checking for a
697         # library installed under a different name.  Checking for the
698         # header is okay.
699         if test -n "${pthread_name}" ; then
700            enable_pthread=yes
701         else
702         AC_CHECK_LIB(pthread, pthread_create, :, enable_pthread=no)
703         fi
704         AC_CHECK_HEADERS(pthread.h, :, enable_pthread=no)
706         if test x$enable_pthread = xyes; then
707                 AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
708                 if test -z "${pthread_name}" ; then
709                 PTHREAD_LIBS="-lpthread"
710         fi
711         fi
714 AC_SUBST(PTHREAD_LIBS)
717 dnl Check whether we need to pass -lresolv
718 dnl We know that we don't need it for W32.
720 if test x$os_win32 = xno; then
721   t_oldLibs="$LIBS"
722   LIBS="$LIBS"
723   ac_cv_var__res_options=no
724   AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
725              #include <sys/socket.h>
726              #include <netinet/in.h>
727              #include <arpa/nameser.h>
728              #include <resolv.h>]], [[_res.options = RES_INIT;]])],[ac_cv_var__res_options=yes],[]);
729   if test "$ac_cv_var__res_options" != "yes"; then
730         LIBRESOLV="-lresolv"
731   fi
732   LIBS="$t_oldLibs"
734   if test "x$LIBRESOLV" = "x"; then
735         AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
736         LIBS="$t_oldLibs"
737   fi
739 AC_SUBST(LIBRESOLV)
741 LIBS="$LIBS $LIBRESOLV"
743 dnl #######################################################################
744 dnl # Check for startup notification
745 dnl #######################################################################
746 if test "x$enable_startup_notification" = "xyes"; then
747         PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
748         [
749                 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
750                 echo "Building with libstartup-notification"
751                 enable_startup_notification=yes
752         ],
753         [
754                 echo "Building without libstartup-notification"
755                 enable_startup_notification=no
756         ])
758         AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
759         AC_SUBST(STARTUP_NOTIFICATION_LIBS)
762 dnl #######################################################################
763 dnl # Check for D-Bus support
764 dnl #######################################################################
765 if test "x$enable_dbus" = "xyes"; then
766         PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60, dbus-glib-1 >= 0.60],
767         [
768                 AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if glib bindings of D-Bus are available])
769                 enable_dbus=yes
770         ],
771         [
772                 echo "D-Bus requirements not met. D-Bus support not activated."
773                 enable_dbus=no
774         ])
775         AC_SUBST(DBUS_CFLAGS)
776         AC_SUBST(DBUS_LIBS)
779 dnl #######################################################################
780 dnl # Configure address book support
781 dnl #######################################################################
783 dnl #######################################################################
784 dnl # Check for alternate address book support
785 dnl #######################################################################
786 AC_MSG_CHECKING([whether DBUS support for alternate address book is present])
787 if test x"$enable_dbus" = xyes; then
788         AC_MSG_RESULT([yes])
789         AC_MSG_CHECKING([whether to enable alternate address book])
790         if test x"$enable_alternate_addressbook" = xyes; then
791                 AC_MSG_RESULT([yes])
792                 PKG_CHECK_MODULES(CONTACTS, [claws-contacts],
793                 [
794                         AC_DEFINE(USE_ALT_ADDRBOOK, 1, [Define if alternate address book is to be activated.])
795                         enable_alternate_addressbook=yes
796                         AC_SUBST(CONTACTS_CFLAGS)
797                         AC_SUBST(CONTACTS_LIBS)
798                 ],
799                 [
800                         enable_alternate_addressbook=no
801                 ])
802         else
803                 AC_MSG_RESULT([no])
804                 enable_alternate_addressbook=no
805         fi
806 else
807         AC_MSG_RESULT([no])
808         enable_alternate_addressbook=no
811 dnl #######################################################################
812 dnl # Check for old address book support
813 dnl #######################################################################
814 if test x"$enable_alternate_addressbook" = xno; then
815         dnl for LDAP support in addressbook
816         dnl no check for libraries; dynamically loaded
817         AC_MSG_CHECKING([whether to use LDAP])
818         if test x"$enable_ldap" = xno; then
819                 AC_MSG_RESULT(no)
820         elif test x"$enable_ldap" = xyes -a x"$enable_pthread" = xno; then
821                 AC_MSG_RESULT(no - LDAP support needs pthread support)
823                 enable_ldap=no
824         elif test x"$platform_win32" = xyes; then
825                 AC_MSG_RESULT(yes)
826                 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
827                 LDAP_LIBS="-lwldap32"
828                 AC_SUBST(LDAP_LIBS)
829         else
830                 AC_MSG_RESULT(yes)
832                 dnl check for available libraries, and pull them in
833                 AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
834                 AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
835                 AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
836                 AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
837                                  $LDAP_LIBS)
839                 AC_CHECK_HEADERS(ldap.h lber.h,
840                                  [ enable_ldap=yes ],
841                                  [ enable_ldap=no ])
843                 if test "$enable_ldap" = yes; then
844                         AC_CHECK_LIB(ldap, ldap_open,
845                                          [ enable_ldap=yes ],
846                                          [ enable_ldap=no ],
847                                          $LDAP_LIBS)
849                         AC_CHECK_LIB(ldap, ldap_start_tls_s,
850                                              [ ac_cv_have_tls=yes ],
851                                              [ ac_cv_have_tls=no ])
853                 fi
855                 AC_MSG_CHECKING([whether ldap library is available])
856                 AC_MSG_RESULT($enable_ldap)
858                 AC_MSG_CHECKING([whether TLS library is available])
859                 AC_MSG_RESULT($ac_cv_have_tls)
861                 if test "$enable_ldap" = yes; then
862                         AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
863                         LDAP_LIBS="$LDAP_LIBS -lldap"
864                         AC_SUBST(LDAP_LIBS)
865                         if test "$ac_cv_have_tls" = yes; then
866                                 AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
867                         fi
868                         dnl As of OpenLDAP API version 3000 a number of functions has
869                         dnl been deprecated. As Claws-mail compiles and runs on many
870                         dnl platforms and many versions of OpenLDAP we need to be able
871                         dnl to switch between the old and new API because new API has
872                         dnl added new functions replacing old ones and at the same time
873                         dnl old functions has been changed.
874                         dnl If cross-compiling defaults to enable deprecated features
875                         dnl for maximum portability
876                         AC_MSG_CHECKING([The API version of OpenLDAP])
877                         AC_RUN_IFELSE(
878                                 [AC_LANG_PROGRAM(
879                                  [#include <ldap.h>],
880                                  [if (LDAP_API_VERSION >= 3000)
881                                                 return 1
882                                 ])],
883                                 [AC_MSG_RESULT([version < 3000])
884                                  AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 0, Define if OpenLDAP API is at least version 3000.)],
885                                 [AC_MSG_RESULT([version >= 3000])
886                                  AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 1, Define if OpenLDAP API is at least version 3000.)],
887                                 [AC_MSG_RESULT([Enabling deprecated features in OpenLDAP])
888                                  AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 0, Define if OpenLDAP API is at least version 3000.)
889                                  AC_DEFINE(LDAP_DEPRECATED, 1, Define to activate deprecated features in OpenLDAP)]
890                         )
891                 fi
892         fi
894         dnl for JPilot support in addressbook
895         dnl no check for libraries; these are dynamically loaded
896         AC_MSG_CHECKING([whether to use JPilot])
897         if test "$enable_jpilot" = yes; then
898                 AC_MSG_RESULT(yes)
899                 AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h pi-version.h,
900                                  [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
901                                  [ enable_jpilot=no ])
902                 if test "$enable_jpilot" = no; then
903                         AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h libpisock/pi-version.h,
904                                          [ enable_jpilot=yes
905                                            AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
906                 fi
908                 AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" enable_jpilot="no"])
909                 if test x"$enable_jpilot" = xyes; then
910                         AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
911                 else
912                         AC_MSG_NOTICE([JPilot support not available])
913                 fi
914                 AC_SUBST(JPILOT_LIBS)
915         else
916                 AC_MSG_RESULT(no)
917         fi
920 AM_CONDITIONAL(BUILD_ALTADDRBOOK, test x"$enable_alternate_addressbook" = x"yes")
922 dnl #######################################################################
923 dnl # Check for NetworkManager support
924 dnl #######################################################################
925 if test x"$enable_dbus" = xyes; then
926         if test x"$enable_networkmanager" = xyes; then
927                 PKG_CHECK_MODULES(NETWORKMANAGER_SUPPORT, libnm,
928                 [
929                         AC_DEFINE(HAVE_NETWORKMANAGER_SUPPORT, 1, [Define if NetworkManager support is to be included.])
930                         echo "Building with NetworkManager support"
931                         enable_networkmanager=yes
932                 ],
933                 [
934                         echo "NetworkManager not found."
935                         enable_networkmanager=no
936                 ])
937                 AC_SUBST(NETWORKMANAGER_SUPPORT_CFLAGS)
938         fi
939 else
940         echo "NetworkManager support deactivated as D-Bus requirements were not met."
941         enable_networkmanager=no
944 dnl Libetpan
945 AC_MSG_CHECKING([whether to use libetpan])
946 if test x"$enable_libetpan" = xyes; then
947     AC_MSG_RESULT(yes)
949     libetpan_config=no
950     libetpan_result=no
951     libetpan_versiontype=0
953     # since 1.9.4, libetpan uses pkg-config
954     PKG_CHECK_MODULES([LIBETPAN], [libetpan >= 1.9.4],
955     [
956         LIBETPAN_VERSION=`pkg-config --modversion libetpan | $AWK -F. '{printf "%d", ($1 * 10000) + ($2 * 100) + $3}'`
957         libetpan_config=yes
958     ],
959     [
960         # before 1.9.4, libetpan uses its own libetpan-config script
961         AC_PATH_PROG(libetpanconfig, [libetpan-config])
962         if test "x$libetpanconfig" != "x"; then
963             LIBETPAN_CFLAGS="`$libetpanconfig --cflags`"
964             LIBETPAN_LIBS="`$libetpanconfig --libs`"
965             # support libetpan version like x.x and x.x.x
966             libetpan_versiontype=`$libetpanconfig --version | tr -dc . | wc -c`
967             if test $libetpan_versiontype -eq 1; then
968                 LIBETPAN_VERSION=`$libetpanconfig --version | $AWK -F. '{printf "%d", ($1 * 100) + $2}'`
969             else
970                 LIBETPAN_VERSION=`$libetpanconfig --version | $AWK -F. '{printf "%d", ($1 * 10000) + ($2 * 100) + $3}'`
971             fi
972             libetpan_config=yes
973         fi
974     ])
975     if test "x$libetpan_config" = "xyes"; then
976         AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
977         if test "x$libetpan_result" = "xyes"; then
978             AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
979             LIBS="$LIBS $LIBETPAN_LIBS"
980             AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <libetpan/dbstorage.h>]], [[db_mailstorage_init(NULL, NULL);]])],[libetpan_result=yes],[libetpan_result=no])
981             AC_MSG_RESULT([$libetpan_result])
982         fi
983     fi
984     if test "x$libetpan_result" = "xyes"; then
985         if test $libetpan_versiontype -eq 1; then
986             if test "$LIBETPAN_VERSION" -lt "57"; then
987                 AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/])
988                 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
989                 AC_MSG_ERROR([libetpan 0.57 not found])
990             fi
991         fi
992         AC_SUBST(LIBETPAN_CFLAGS)
993         AC_SUBST(LIBETPAN_LIBS)
994         AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP and/or NNTP support.)
995     else
996         AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/ ])
997         AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
998         AC_MSG_ERROR([libetpan 0.57 not found])
999     fi
1000 else
1001     AC_MSG_RESULT(no)
1003 AM_CONDITIONAL(CLAWS_LIBETPAN, test "x$libetpan_result" = "xyes")
1005 dnl librsvg
1006 AC_MSG_CHECKING([whether to use librsvg])
1007 if test x"$enable_svg" = xyes; then
1008         AC_MSG_RESULT(yes)
1009     PKG_CHECK_MODULES([SVG], [librsvg-2.0 >= 2.39.0 cairo >= 1.0.0],
1010     [
1011         AC_SUBST(SVG_CFLAGS)
1012         AC_SUBST(SVG_LIBS)
1013                 AC_DEFINE(HAVE_SVG, 1, [Define if librsvg2 is available for SVG support])
1014                 enable_svg=yes
1015         ],
1016         [
1017                 AC_MSG_NOTICE([SVG support deactivated as librsvg2 >= 2.39.0 was not found])
1018                 enable_svg=no
1019         ])
1020 else
1021         AC_MSG_RESULT(no)
1024 AC_MSG_CHECKING([whether to use valgrind])
1025 if test x$enable_valgrind = xyes; then
1026         AC_MSG_RESULT(yes)
1027         PKG_CHECK_MODULES(VALGRIND, valgrind >= 2.4.0,
1028                           enable_valgrind=yes, enable_valgrind=no)
1029         if test x"$enable_valgrind" = xyes; then
1030                 AC_DEFINE(HAVE_VALGRIND, 1, Define if you want valgrind support)
1031         else
1032                 AC_MSG_RESULT(not found)
1033         fi
1034 else
1035         AC_MSG_RESULT(no)
1037 AM_CONDITIONAL(CLAWS_VALGRIND, test x"$enable_valgrind" = x"yes")
1039 AC_MSG_CHECKING([whether to build unit tests])
1040 if test x$enable_tests = xyes; then
1041         AC_MSG_RESULT(yes)
1042 else
1043         AC_MSG_RESULT(no)
1045 AM_CONDITIONAL(BUILD_TESTS, test "x$enable_tests" = "xyes")
1047 dnl *************************
1048 dnl ** section for plugins **
1049 dnl *************************
1051 PLUGINS=""
1052 DISABLED_PLUGINS=""
1053 MISSING_DEPS_PLUGINS=""
1055 dnl First we set the enabled status - either enabled (yes), auto-enabled (auto)
1056 dnl or (auto-)disabled (no for both)
1058 dnl All plugins are auto-enabled except for Demo which is just there to help
1059 dnl potential plugins writers.
1061 AC_ARG_ENABLE(acpi_notifier-plugin,
1062                 [  --disable-acpi_notifier-plugin  Do not build acpi_notifier plugin],
1063                 [enable_acpi_notifier_plugin=$enableval], [enable_acpi_notifier_plugin=auto])
1065 AC_ARG_ENABLE(address_keeper-plugin,
1066                 [  --disable-address_keeper-plugin Do not build address_keeper plugin],
1067                 [enable_address_keeper_plugin=$enableval], [enable_address_keeper_plugin=auto])
1069 AC_ARG_ENABLE(archive-plugin,
1070                 [  --disable-archive-plugin        Do not build archive plugin],
1071                 [enable_archive_plugin=$enableval], [enable_archive_plugin=auto])
1073 AC_ARG_ENABLE(att_remover-plugin,
1074                 [  --disable-att_remover-plugin    Do not build att_remover plugin],
1075                 [enable_att_remover_plugin=$enableval], [enable_att_remover_plugin=auto])
1077 AC_ARG_ENABLE(attachwarner-plugin,
1078                 [  --disable-attachwarner-plugin   Do not build attachwarner plugin],
1079                 [enable_attachwarner_plugin=$enableval], [enable_attachwarner_plugin=auto])
1081 AC_ARG_ENABLE(bogofilter-plugin,
1082                 [  --disable-bogofilter-plugin     Do not build bogofilter plugin],
1083                 [enable_bogofilter_plugin=$enableval], [enable_bogofilter_plugin=auto])
1085 AC_ARG_ENABLE(bsfilter-plugin,
1086                 [  --disable-bsfilter-plugin       Do not build bsfilter plugin],
1087                 [enable_bsfilter_plugin=$enableval], [enable_bsfilter_plugin=auto])
1089 AC_ARG_ENABLE(clamd-plugin,
1090                 [  --disable-clamd-plugin          Do not build clamd plugin],
1091                 [enable_clamd_plugin=$enableval], [enable_clamd_plugin=auto])
1093 AC_ARG_ENABLE(dillo-plugin,
1094                 [  --disable-dillo-plugin          Do not build dillo plugin],
1095                 [enable_dillo_plugin=$enableval], [enable_dillo_plugin=auto])
1097 AC_ARG_ENABLE(fancy-plugin,
1098                 [  --disable-fancy-plugin          Do not build fancy plugin],
1099                 [enable_fancy_plugin=$enableval], [enable_fancy_plugin=auto])
1101 AC_ARG_ENABLE(fetchinfo-plugin,
1102                 [  --disable-fetchinfo-plugin      Do not build fetchinfo plugin],
1103                 [enable_fetchinfo_plugin=$enableval], [enable_fetchinfo_plugin=auto])
1105 AC_ARG_ENABLE(gdata-plugin,
1106                 [  --disable-gdata-plugin          Do not build gdata plugin],
1107                 [enable_gdata_plugin=$enableval], [enable_gdata_plugin=auto])
1109 AC_ARG_ENABLE(keyword_warner-plugin,
1110                 [  --disable-keyword_warner-plugin   Do not build keyword_warner plugin],
1111                 [enable_keyword_warner_plugin=$enableval], [enable_keyword_warner_plugin=auto])
1113 AC_ARG_ENABLE(libravatar-plugin,
1114                 [  --disable-libravatar-plugin     Do not build libravatar  plugin],
1115                 [enable_libravatar_plugin=$enableval], [enable_libravatar_plugin=auto])
1117 AC_ARG_ENABLE(litehtml_viewer-plugin,
1118                 [  --disable-litehtml_viewer-plugin       Do not build litehtml_viewer plugin],
1119                 [enable_litehtml_viewer_plugin=$enableval], [enable_litehtml_viewer_plugin=auto])
1121 AC_ARG_ENABLE(mailmbox-plugin,
1122                 [  --disable-mailmbox-plugin       Do not build mailmbox plugin],
1123                 [enable_mailmbox_plugin=$enableval], [enable_mailmbox_plugin=auto])
1125 AC_ARG_ENABLE(managesieve-plugin,
1126                 [  --disable-managesieve-plugin    Do not build managesieve plugin],
1127                 [enable_managesieve_plugin=$enableval], [enable_managesieve_plugin=auto])
1129 AC_ARG_ENABLE(newmail-plugin,
1130                 [  --disable-newmail-plugin        Do not build newmail plugin],
1131                 [enable_newmail_plugin=$enableval], [enable_newmail_plugin=auto])
1133 AC_ARG_ENABLE(notification-plugin,
1134                 [  --disable-notification-plugin   Do not build notification plugin],
1135                 [enable_notification_plugin=$enableval], [enable_notification_plugin=auto])
1137 AC_ARG_ENABLE(pdf_viewer-plugin,
1138                 [  --disable-pdf_viewer-plugin     Do not build pdf_viewer plugin],
1139                 [enable_pdf_viewer_plugin=$enableval], [enable_pdf_viewer_plugin=auto])
1141 AC_ARG_ENABLE(perl-plugin,
1142                 [  --disable-perl-plugin           Do not build perl plugin],
1143                 [enable_perl_plugin=$enableval], [enable_perl_plugin=auto])
1145 AC_ARG_ENABLE(python-plugin,
1146                 [  --disable-python-plugin         Do not build python plugin],
1147                 [enable_python_plugin=$enableval], [enable_python_plugin=auto])
1149 AC_ARG_ENABLE(pgpcore-plugin,
1150                 [  --disable-pgpcore-plugin        Do not build pgpcore plugin],
1151                 [enable_pgpcore_plugin=$enableval], [enable_pgpcore_plugin=auto])
1153 AC_ARG_ENABLE(pgpmime-plugin,
1154                 [  --disable-pgpmime-plugin        Do not build pgpmime plugin],
1155                 [enable_pgpmime_plugin=$enableval], [enable_pgpmime_plugin=auto])
1157 AC_ARG_ENABLE(pgpinline-plugin,
1158                 [  --disable-pgpinline-plugin      Do not build pgpinline plugin],
1159                 [enable_pgpinline_plugin=$enableval], [enable_pgpinline_plugin=auto])
1161 AC_ARG_ENABLE(rssyl-plugin,
1162                 [  --disable-rssyl-plugin          Do not build rssyl plugin],
1163                 [enable_rssyl_plugin=$enableval], [enable_rssyl_plugin=auto])
1165 AC_ARG_ENABLE(smime-plugin,
1166                 [  --disable-smime-plugin          Do not build smime plugin],
1167                 [enable_smime_plugin=$enableval], [enable_smime_plugin=auto])
1169 AC_ARG_ENABLE(spamassassin-plugin,
1170                 [  --disable-spamassassin-plugin   Do not build spamassassin plugin],
1171                 [enable_spamassassin_plugin=$enableval], [enable_spamassassin_plugin=auto])
1173 AC_ARG_ENABLE(spam_report-plugin,
1174                 [  --disable-spam_report-plugin    Do not build spam_report plugin],
1175                 [enable_spam_report_plugin=$enableval], [enable_spam_report_plugin=auto])
1177 AC_ARG_ENABLE(tnef_parse-plugin,
1178                 [  --disable-tnef_parse-plugin     Do not build tnef_parse plugin],
1179                 [enable_tnef_parse_plugin=$enableval], [enable_tnef_parse_plugin=auto])
1181 AC_ARG_ENABLE(vcalendar-plugin,
1182                 [  --disable-vcalendar-plugin      Do not build vcalendar plugin],
1183                 [enable_vcalendar_plugin=$enableval], [enable_vcalendar_plugin=auto])
1185 dnl disabled by default
1186 AC_ARG_ENABLE(demo-plugin,
1187                 [  --enable-demo-plugin            Build demo plugin],
1188                 [enable_demo_plugin=$enableval], [enable_demo_plugin=no])
1191 dnl Then we check (unconditionnaly) for plugins dependencies
1192 dnl Some dependencies are optional, some mandatory. This is taken care of
1193 dnl later.
1195 dnl During this dependancy check we do the checks themselves, define HAVE_X to
1196 dnl either yes or no, and do the AC_SUBST calls.
1198 dnl Archive:            libarchive
1199 dnl Fancy:              Webkit, curl, optionally libsoup-gnome
1200 dnl Gdata:              libgdata
1201 dnl Litehtml            a C++ compiler, >=glib-2.36, cairo, fontconfig, gumbo, curl
1202 dnl Libravatar:         libcurl
1203 dnl Notification:       optionally libnotify  unity/messaging-menu
1204 dnl                                libcanberra_gtk3 hotkey
1205 dnl Pdf-Viewer:         libpoppler
1206 dnl Perl:               sed perl
1207 dnl PGP/Core:           libgpgme
1208 dnl PGP/Mime:           pgpcore libgpgme
1209 dnl PGP/Inline:         pgpcore libgpgme
1210 dnl S/Mime:             pgpcore libgpgme
1211 dnl Python:             Python
1212 dnl RSSyl:              expat libcurl
1213 dnl SpamReport:         libcurl
1214 dnl vCalendar:          libcurl, libical
1215 dnl tnef_parse:         libytnef
1217 dnl libcurl ********************************************************************
1218 PKG_CHECK_MODULES(CURL, libcurl, HAVE_CURL=yes, HAVE_CURL=no)
1219 AC_SUBST(CURL_LIBS)
1220 AC_SUBST(CURL_CFLAGS)
1222 dnl expat **********************************************************************
1223 PKG_CHECK_MODULES(EXPAT, expat, HAVE_EXPAT=yes, HAVE_EXPAT=no)
1225 if test x"$HAVE_EXPAT" = xno; then
1226         AC_CHECK_HEADER(expat.h, [expat_header=yes], [expat_header=no])
1227         AC_CHECK_LIB(expat, XML_ParserCreate, [expat_lib=yes], [expat_lib=no])
1228         if test x"$expat_header" = xyes -a x"$expat_lib"=xyes; then
1229                 HAVE_EXPAT=yes
1230                 EXPAT_CFLAGS=""
1231                 EXPAT_LIBS="-lexpat"
1232         fi
1235 AC_SUBST(EXPAT_CFLAGS)
1236 AC_SUBST(EXPAT_LIBS)
1238 dnl webkit *********************************************************************
1239 PKG_CHECK_MODULES(WEBKIT, webkit2gtk-4.0 >= 2.18.0, HAVE_WEBKIT=yes, HAVE_WEBKIT=no)
1240 AC_SUBST(WEBKIT_LIBS)
1241 AC_SUBST(WEBKIT_CFLAGS)
1243 dnl libsoup ********************************************************************
1244 PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4, HAVE_LIBSOUP=yes, HAVE_LIBSOUP=no)
1245 if test x"$HAVE_LIBSOUP" = xyes; then
1246         AC_DEFINE(HAVE_LIBSOUP, 1, [Define if libsoup is available])
1248 AC_SUBST(LIBSOUP_CFLAGS)
1249 AC_SUBST(LIBSOUP_LIBS)
1251 dnl libsoup-gnome **************************************************************
1252 PKG_CHECK_MODULES(LIBSOUP_GNOME, libsoup-gnome-2.4 >= 2.26, HAVE_LIBSOUP_GNOME=yes, HAVE_LIBSOUP_GNOME=no)
1253 if test x"$HAVE_LIBSOUP_GNOME" = xyes; then
1254         AC_DEFINE(HAVE_LIBSOUP_GNOME, 1, [Define if libsoup_gnome is available])
1256 AC_SUBST(LIBSOUP_GNOME_CFLAGS)
1257 AC_SUBST(LIBSOUP_GNOME_LIBS)
1259 dnl libarchive *****************************************************************
1260 PKG_CHECK_MODULES(LIBARCHIVE, libarchive, HAVE_ARCHIVE=yes, HAVE_ARCHIVE=no)
1261 AC_SUBST(ARCHIVE_LIBS)
1262 AC_SUBST(ARCHIVE_CFLAGS)
1263 AC_CHECK_LIB([archive], [archive_read_new],
1264                        ARCHIVE_LIBS=-larchive
1265                        HAVE_ARCHIVE=yes
1266                        AC_SUBST(ARCHIVE_LIBS,$ARCHIVE_CFLAGS),
1267                        HAVE_ARCHIVE=no
1268                        )
1270 dnl libgdata *******************************************************************
1271 PKG_CHECK_MODULES(GDATA, libgdata >= 0.17.2, HAVE_GDATA=yes, HAVE_GDATA=no)
1272 AC_SUBST(GDATA_CFLAGS)
1273 AC_SUBST(GDATA_LIBS)
1275 dnl cairo **********************************************************************
1276 PKG_CHECK_MODULES(CAIRO, cairo >= 1.12.0, HAVE_CAIRO=yes, HAVE_CAIRO=no)
1277 AC_SUBST(CAIRO_CFLAGS)
1278 AC_SUBST(CAIRO_LIBS)
1280 dnl fontconfig *****************************************************************
1281 PKG_CHECK_MODULES(FONTCONFIG, fontconfig, HAVE_FONTCONFIG=yes, HAVE_FONTCONFIG=no)
1282 AC_SUBST(FONTCONFIG_CFLAGS)
1283 AC_SUBST(FONTCONFIG_LIBS)
1285 dnl gumbo **********************************************************************
1286 PKG_CHECK_MODULES(LIBGUMBO, gumbo >= 0.10, HAVE_LIBGUMBO=yes, HAVE_LIBGUMBO=no)
1287 AC_SUBST(LIBGUMBO_CFLAGS)
1288 AC_SUBST(LIBGUMBO_LIBS)
1290 dnl libical ********************************************************************
1291 PKG_CHECK_MODULES(LIBICAL, libical >= 2.0, HAVE_LIBICAL=yes, HAVE_LIBICAL=no)
1292 AC_SUBST(LIBICAL_CFLAGS)
1293 AC_SUBST(LIBICAL_LIBS)
1295 dnl Poppler ********************************************************************
1296 PKG_CHECK_MODULES(POPPLER, poppler-glib >= 0.12.0, HAVE_POPPLER=yes, HAVE_POPPLER=no)
1297 AC_SUBST(POPPLER_LIBS)
1298 AC_SUBST(POPPLER_CFLAGS)
1300 dnl check for Poppler extra features that we conditionally support
1301 if test x"$HAVE_POPPLER" = xyes; then
1302         OLD_CFLAGS=$CFLAGS
1303         CFLAGS="$POPPLER_CFLAGS $GTK_CFLAGS $GLIB_CFLAGS"
1304         AC_CHECK_DECL(POPPLER_DEST_NAMED,
1305                 [AC_DEFINE([HAVE_POPPLER_DEST_NAMED], [], [Description])],
1306                 ,[#include <poppler-action.h>])
1307         AC_CHECK_DECL(POPPLER_DEST_XYZ,
1308                 [AC_DEFINE([HAVE_POPPLER_DEST_XYZ], [], [Description])],
1309                 ,[#include <poppler-action.h>])
1310         CFLAGS=$OLD_CFLAGS
1313 dnl perl ***********************************************************************
1314 AC_CHECK_PROG(HAVE_PERL, perl, yes, no)
1315 if test x"$HAVE_PERL" = xyes; then
1316         AC_MSG_CHECKING(for perl >= 5.8.0)
1317         PERL_VER=`perl -e 'print $] > 5.0079999?"yes":"no"'`
1318         if test "$PERL_VER" = "yes"; then
1319                 AC_MSG_RESULT(yes)
1320         else
1321                 AC_MSG_RESULT(no)
1322                 HAVE_PERL=no
1323         fi
1325 if test x"$HAVE_PERL" = xyes; then
1326         AC_MSG_CHECKING(for Perl compile flags)
1327         PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
1328         PERL_CFLAGS=`echo $PERL_CFLAGS | sed 's/-D_FILE_OFFSET_BITS=[[0-9]]*//'`
1329         PERL_LDFLAGS=`perl -MExtUtils::Embed -e ldopts |sed 's/-lgdbm\>//'`
1330         PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-ldb\>//'`
1331         PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-lndbm\>//'`
1332         PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-lc\>//'`
1333         AC_MSG_RESULT(ok)
1334         AC_MSG_NOTICE([Adding perl LIBS ${PERL_CFLAGS}])
1335         
1336         if test x"$HAVE_PERL" = xyes; then
1337                 AC_CHECK_LIB(perl,perl_alloc,[AC_DEFINE(HAVE_LIBPERL, 1, Check for libperl.)], 
1338                                              [ HAVE_LIBPERL=no ])
1339         fi
1340         if test x"$HAVE_LIBPERL" = xno; then
1341                 LIBPERL_PREFIX=`perl -MExtUtils::Embed -e perl_inc`
1342                 LIBPERL_PREFIX=`echo $LIBPERL_PREFIX |sed 's/-I//'`
1343                 AC_MSG_CHECKING([for libperl.so])
1344                 if test -f "$LIBPERL_PREFIX/libperl.so"; then
1345                         AC_MSG_RESULT(yes)
1346                         HAVE_LIBPERL=yes
1347                 else
1348                         AC_MSG_RESULT(no)
1349                 fi      
1350         fi
1351         PERL="perl"
1352         AC_SUBST(PERL)
1353         AC_SUBST(PERL_CFLAGS)
1354         AC_SUBST(PERL_LDFLAGS)
1357 dnl Gpgme **********************************************************************
1358 AM_PATH_GPGME(1.0.0, HAVE_GPGME=yes, HAVE_GPGME=no)
1359 if test x"$HAVE_GPGME" = xyes; then
1360         AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.)
1361         AM_PATH_GPGME(1.1.1, AC_DEFINE(HAVE_GPGME_PKA_TRUST, 1, [Define if GPGME supports PKA.]))
1364 dnl Python *********************************************************************
1365 PKG_CHECK_MODULES(PYTHON, python3, HAVE_PYTHON=yes, HAVE_PYTHON=no)
1366 PKG_CHECK_MODULES(PYTHONEMBED, python3-embed, HAVE_PYTHONEMBED=yes, HAVE_PYTHONEMBED=no)
1367 PKG_CHECK_MODULES(PYGOBJECT, pygobject-3.0, HAVE_PYGOBJ=yes, HAVE_PYGOBJ=no)
1369 AC_SUBST(PYTHON_SHARED_LIB)
1370 AC_SUBST(PYTHON_CFLAGS)
1371 AC_SUBST(PYTHON_LIBS)
1372 AC_SUBST(PYTHONEMBED_SHARED_LIB)
1373 AC_SUBST(PYTHONEMBED_CFLAGS)
1374 AC_SUBST(PYTHONEMBED_LIBS)
1375 AC_SUBST(PYGOBJECT_CFLAGS)
1376 AC_SUBST(PYGOBJECT_LIBS)
1378 dnl libnotify ******************************************************************
1379 PKG_CHECK_MODULES(libnotify, libnotify >= 0.4.3, HAVE_LIBNOTIFY=yes, HAVE_LIBNOTIFY=no)
1380 if test x"$HAVE_LIBNOTIFY" = xyes; then
1381         AC_DEFINE(HAVE_LIBNOTIFY, 1, [Define if libnotify support is enabled])
1383 AC_SUBST(libnotify_CFLAGS)
1384 AC_SUBST(libnotify_LIBS)
1386 dnl libcanberra-gtk3 ************************************************************
1387 PKG_CHECK_MODULES(libcanberra_gtk3, libcanberra-gtk3, HAVE_LIBCANBERRA_GTK=yes, HAVE_LIBCANBERRA_GTK=no)
1388 if test x"$HAVE_LIBCANBERRA_GTK" = xyes; then
1389         AC_DEFINE(HAVE_LIBCANBERRA_GTK, 1, [Define if libcanberra-gtk3 support is enabled])
1391 AC_SUBST(libcanberra_gtk3_CFLAGS)
1392 AC_SUBST(libcanberra_gtk3_LIBS)
1394 dnl unity/messaging-menu *******************************************************
1395 PKG_CHECK_MODULES(unity, unity messaging-menu, HAVE_UNITY=yes, HAVE_UNITY=no)
1396 if test x"$HAVE_UNITY" = xyes; then
1397         AC_DEFINE(NOTIFICATION_INDICATOR, 1, [Activate support for unity and messaging-menu])
1399 AC_SUBST(unity_CFLAGS)
1400 AC_SUBST(unity_LIBS)
1402 dnl hotkeys ********************************************************************
1403 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)
1404 if test x"$HAVE_HOTKEYS" = xyes; then
1405         AC_DEFINE(NOTIFICATION_HOTKEYS, 1, Activate support for global hotkeys)
1407 AC_SUBST(CM_NP_HOTKEY_CFLAGS)
1408 AC_SUBST(CM_NP_HOTKEY_LIBS)
1410 dnl libytnef *******************************************************************
1411 YTNEF_CFLAGS=""
1412 YTNEF_LIBS=""
1413 have_ytnef=0
1414 # Check both ytnef.h and libytnef/ytnef.h, and adjust YTNEF_CFLAGS
1415 # accordingly
1416 AC_CHECK_HEADER(ytnef.h, [have_ytnef=1], [have_ytnef=0])
1417 if test $have_ytnef -eq 0; then
1418         AC_CHECK_HEADER(libytnef/ytnef.h,
1419                                                                         [have_ytnef=1;
1420                                                                          YTNEF_CFLAGS="${YTNEF_CFLAGS} -DYTNEF_H_SUBDIR"],
1421                                                                         [have_ytnef=0])
1423 if test $have_ytnef -eq 1; then
1424         AC_MSG_CHECKING([how libytnef's SwapDDWord() should be called])
1425         # Now we have to figure out which libytnef version we're using,
1426         # based on whether SwapDDWord takes one argument or two.
1427         if test "x${YTNEF_CFLAGS}" = "x"; then
1428                 ytnef_include="#include <ytnef.h>"
1429         else
1430                 ytnef_include="#include <libytnef/ytnef.h>"
1431         fi
1432         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
1433                                                                         ${ytnef_include}]], [[SwapDDWord(0, 0);]])],[have_ytnef=1],[have_ytnef=0])
1434         if test $have_ytnef -eq 0; then
1435                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
1436                                                                                 ${ytnef_include}]], [[SwapDDWord(0);]])],[have_ytnef=1;
1437                                                                                  YTNEF_CFLAGS="${YTNEF_CFLAGS} -DYTNEF_OLD_SWAPDDWORD"],[have_ytnef=0])
1438         fi
1439         if test $have_ytnef -eq 1; then
1440                 YTNEF_LIBS="-lytnef"
1441                 AC_MSG_RESULT(ok)
1442         else
1443                 AC_MSG_RESULT(no idea, unsupported libytnef version?)
1444         fi
1446 AC_SUBST(YTNEF_CFLAGS)
1447 AC_SUBST(YTNEF_LIBS)
1449 dnl Third, we now cross the requested plugins and the available dependencies
1450 dnl If some dependencies are missing and the plugin was explicitely enabled,
1451 dnl we error out, else we only inform.
1453 AC_MSG_CHECKING([whether to build acpi_notifier plugin])
1454 if test x"$enable_acpi_notifier_plugin" != xno; then
1455         PLUGINS="$PLUGINS acpi_notifier"
1456         AC_MSG_RESULT(yes)
1457 else
1458         DISABLED_PLUGINS="$DISABLED_PLUGINS acpi_notifier"
1459         AC_MSG_RESULT(no)
1462 AC_MSG_CHECKING([whether to build address_keeper plugin])
1463 if test x"$enable_address_keeper_plugin" != xno; then
1464         PLUGINS="$PLUGINS address_keeper"
1465         AC_MSG_RESULT(yes)
1466 else
1467         DISABLED_PLUGINS="$DISABLED_PLUGINS address_keeper"
1468         AC_MSG_RESULT(no)
1471 AC_MSG_CHECKING([whether to build archive plugin])
1472 if test x"$enable_archive_plugin" != xno; then
1473         dependencies_missing=""
1475         if test x"$HAVE_ARCHIVE" = xno; then
1476                 dependencies_missing="libarchive $dependencies_missing"
1477         fi
1479         if test x"$dependencies_missing" = x; then
1480                 PLUGINS="$PLUGINS archive"
1481                 AC_MSG_RESULT(yes)
1482         elif test x"$enable_archive_plugin" = xauto; then
1483                 AC_MSG_RESULT(no)
1484                 AC_MSG_WARN("Plugin archive will not be built; missing $dependencies_missing")
1485                 enable_archive_plugin=no
1486                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS archive"
1487         else
1488                 AC_MSG_RESULT(no)
1489                 AC_MSG_ERROR("Plugin archive cannot be built; missing $dependencies_missing")
1490         fi
1491 else
1492         DISABLED_PLUGINS="$DISABLED_PLUGINS archive"
1493         AC_MSG_RESULT(no)
1496 AC_MSG_CHECKING([whether to build att_remover plugin])
1497 if test x"$enable_att_remover_plugin" != xno; then
1498         PLUGINS="$PLUGINS att_remover"
1499         AC_MSG_RESULT(yes)
1500 else
1501         DISABLED_PLUGINS="$DISABLED_PLUGINS att_remover"
1502         AC_MSG_RESULT(no)
1505 AC_MSG_CHECKING([whether to build attachwarner plugin])
1506 if test x"$enable_attachwarner_plugin" != xno; then
1507         PLUGINS="$PLUGINS attachwarner"
1508         AC_MSG_RESULT(yes)
1509 else
1510         DISABLED_PLUGINS="$DISABLED_PLUGINS attachwarner"
1511         AC_MSG_RESULT(no)
1514 AC_MSG_CHECKING([whether to build bogofilter plugin])
1515 if test x"$enable_bogofilter_plugin" != xno; then
1516         PLUGINS="$PLUGINS bogofilter"
1517         AC_MSG_RESULT(yes)
1518 else
1519         DISABLED_PLUGINS="$DISABLED_PLUGINS bogofilter"
1520         AC_MSG_RESULT(no)
1523 AC_MSG_CHECKING([whether to build bsfilter plugin])
1524 if test x"$enable_bsfilter_plugin" != xno; then
1525         PLUGINS="$PLUGINS bsfilter"
1526         AC_MSG_RESULT(yes)
1527 else
1528         DISABLED_PLUGINS="$DISABLED_PLUGINS bsfilter"
1529         AC_MSG_RESULT(no)
1532 AC_MSG_CHECKING([whether to build clamd plugin])
1533 if test x"$enable_clamd_plugin" != xno; then
1534         PLUGINS="$PLUGINS clamd"
1535         AC_MSG_RESULT(yes)
1536 else
1537         DISABLED_PLUGINS="$DISABLED_PLUGINS clamd"
1538         AC_MSG_RESULT(no)
1541 AC_MSG_CHECKING([whether to build demo plugin])
1542 if test x"$enable_demo_plugin" != xno; then
1543         PLUGINS="$PLUGINS demo"
1544         AC_MSG_RESULT(yes)
1545 else
1546         DISABLED_PLUGINS="$DISABLED_PLUGINS demo"
1547         AC_MSG_RESULT(no)
1550 AC_MSG_CHECKING([whether to build Dillo plugin])
1551 if test x"$enable_dillo_plugin" != xno; then
1552         PLUGINS="$PLUGINS dillo"
1553         AC_MSG_RESULT(yes)
1554 else
1555         DISABLED_PLUGINS="$DISABLED_PLUGINS dillo"
1556         AC_MSG_RESULT(no)
1559 AC_MSG_CHECKING([whether to build fancy plugin])
1560 if test x"$enable_fancy_plugin" != xno; then
1561         dependencies_missing=""
1563         if test x"$HAVE_WEBKIT" = xno; then
1564                 dependencies_missing="libwebkit2gtk-4.0 $dependencies_missing"
1565         fi
1566         if test x"$HAVE_CURL" = xno; then
1567                 dependencies_missing="libcurl $dependencies_missing"
1568         fi
1570         if test x"$dependencies_missing" = x; then
1571                 PLUGINS="$PLUGINS fancy"
1572                 AC_MSG_RESULT(yes)
1573         elif test x"$enable_fancy_plugin" = xauto; then
1574                 AC_MSG_RESULT(no)
1575                 AC_MSG_WARN("Plugin fancy will not be built; missing $dependencies_missing")
1576                 enable_fancy_plugin=no
1577                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS fancy"
1578         else
1579                 AC_MSG_RESULT(no)
1580                 AC_MSG_ERROR("Plugin fancy cannot be built; missing $dependencies_missing")
1581         fi
1582 else
1583         DISABLED_PLUGINS="$DISABLED_PLUGINS fancy"
1584         AC_MSG_RESULT(no)
1587 AC_MSG_CHECKING([whether to build fetchinfo plugin])
1588 if test x"$enable_fetchinfo_plugin" != xno; then
1589         PLUGINS="$PLUGINS fetchinfo"
1590         AC_MSG_RESULT(yes)
1591 else
1592         DISABLED_PLUGINS="$DISABLED_PLUGINS fetchinfo"
1593         AC_MSG_RESULT(no)
1596 AC_MSG_CHECKING([whether to build gdata plugin])
1597 if test x"$enable_gdata_plugin" != xno; then
1598         dependencies_missing=""
1600         if test x"$HAVE_GDATA" = xno; then
1601                 dependencies_missing="libgdata $dependencies_missing"
1602         fi
1604         if test x"$dependencies_missing" = x; then
1605                 PLUGINS="$PLUGINS gdata"
1606                 AC_MSG_RESULT(yes)
1607         elif test x"$enable_gdata_plugin" = xauto; then
1608                 AC_MSG_RESULT(no)
1609                 AC_MSG_WARN("Plugin gdata will not be built; missing $dependencies_missing")
1610                 enable_gdata_plugin=no
1611                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS gdata"
1612         else
1613                 AC_MSG_RESULT(no)
1614                 AC_MSG_ERROR("Plugin gdata cannot be built; missing $dependencies_missing")
1615         fi
1616 else
1617         DISABLED_PLUGINS="$DISABLED_PLUGINS gdata"
1618         AC_MSG_RESULT(no)
1621 AC_MSG_CHECKING([whether to build keyword_warner plugin])
1622 if test x"$enable_keyword_warner_plugin" != xno; then
1623         PLUGINS="$PLUGINS keyword_warner"
1624         AC_MSG_RESULT(yes)
1625 else
1626         DISABLED_PLUGINS="$DISABLED_PLUGINS keyword_warner"
1627         AC_MSG_RESULT(no)
1630 AC_MSG_CHECKING([whether to build libravatar plugin])
1631 if test x"$enable_libravatar_plugin" != xno; then
1632         dependencies_missing=""
1634         if test x"$HAVE_CURL" = xno; then
1635                 dependencies_missing="libcurl $dependencies_missing"
1636         fi
1638         if test x"$dependencies_missing" = x; then
1639                 PLUGINS="$PLUGINS libravatar"
1640                 AC_MSG_RESULT(yes)
1641         elif test x"$enable_libravatar_plugin" = xauto; then
1642                 AC_MSG_RESULT(no)
1643                 AC_MSG_WARN("Plugin libravatar will not be built; missing $dependencies_missing")
1644                 enable_libravatar_plugin=no
1645                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS libravatar"
1646         else
1647                 AC_MSG_RESULT(no)
1648                 AC_MSG_ERROR("Plugin libravatar cannot be built; missing $dependencies_missing")
1649         fi
1650 else
1651         DISABLED_PLUGINS="$DISABLED_PLUGINS libravatar"
1652         AC_MSG_RESULT(no)
1655 AC_MSG_CHECKING([whether to build litehtml_viewer plugin])
1656 if test x"$enable_litehtml_viewer_plugin" != xno; then
1657         dependencies_missing=""
1659         if test x"$HAVE_CXX" = xno; then
1660                 dependencies_missing="C++ compiler $dependencies_missing"
1661         fi
1662         PKG_CHECK_EXISTS([glib-2.0 >= 2.36], [],
1663                 [dependencies_missing="glib-2.0 >= 2.36 $dependencies_missing"])
1664         if test x"$HAVE_CAIRO" = xno; then
1665                 dependencies_missing="cairo $dependencies_missing"
1666         fi
1667         if test x"$HAVE_FONTCONFIG" = xno; then
1668                 dependencies_missing="fontconfig $dependencies_missing"
1669         fi
1670         if test x"$HAVE_LIBGUMBO" = xno; then
1671                 dependencies_missing="libgumbo $dependencies_missing"
1672         fi
1673         if test x"$HAVE_CURL" = xno; then
1674                 dependencies_missing="libcurl $dependencies_missing"
1675         fi
1678         if test x"$dependencies_missing" = x; then
1679                 PLUGINS="$PLUGINS litehtml_viewer"
1680                 AC_MSG_RESULT(yes)
1681         elif test x"$enable_litehtml_viewer_plugin" = xauto; then
1682                 AC_MSG_RESULT(no)
1683                 AC_MSG_WARN("Plugin litehtml_viewer will not be built; missing $dependencies_missing")
1684                 enable_litehtml_viewer_plugin=no
1685                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS litehtml_viewer"
1686         else
1687                 AC_MSG_RESULT(no)
1688                 AC_MSG_ERROR("Plugin litehtml_viewer cannot be built; missing $dependencies_missing")
1689         fi
1690 else
1691         DISABLED_PLUGINS="$DISABLED_PLUGINS litehtml_viewer"
1692         AC_MSG_RESULT(no)
1695 AC_MSG_CHECKING([whether to build mailmbox plugin])
1696 if test x"$enable_mailmbox_plugin" != xno; then
1697         PLUGINS="$PLUGINS mailmbox"
1698         AC_MSG_RESULT(yes)
1699 else
1700         DISABLED_PLUGINS="$DISABLED_PLUGINS mailmbox"
1701         AC_MSG_RESULT(no)
1704 AC_MSG_CHECKING([whether to build managesieve plugin])
1705 if test x"$enable_managesieve_plugin" != xno; then
1706         PLUGINS="$PLUGINS managesieve"
1707         AC_MSG_RESULT(yes)
1708 else
1709         DISABLED_PLUGINS="$DISABLED_PLUGINS managesieve"
1710         AC_MSG_RESULT(no)
1713 AC_MSG_CHECKING([whether to build newmail plugin])
1714 if test x"$enable_newmail_plugin" != xno; then
1715         PLUGINS="$PLUGINS newmail"
1716         AC_MSG_RESULT(yes)
1717 else
1718         DISABLED_PLUGINS="$DISABLED_PLUGINS newmail"
1719         AC_MSG_RESULT(no)
1722 AC_MSG_CHECKING([whether to build notification plugin])
1723 if test x"$enable_notification_plugin" != xno; then
1724         PLUGINS="$PLUGINS notification"
1725         AC_MSG_RESULT(yes)
1727         AC_DEFINE(NOTIFICATION_POPUP, 1, Activate notification popup)
1728         AC_DEFINE(NOTIFICATION_BANNER, 1, Activate notification banner)
1729         AC_DEFINE(NOTIFICATION_COMMAND, 1, Activate notification shell command)
1730         AC_DEFINE(NOTIFICATION_TRAYICON, 1, Activate notification trayicon)
1731         if test x"$platform_win32" = xno; then
1732                 AC_DEFINE(NOTIFICATION_LCDPROC, 1, Activate lcdproc support)
1733         fi
1735         notification_features="banner command"
1736         notification_missing_dependencies=""
1737         if test x"$HAVE_HOTKEYS" = xyes; then
1738                 notification_features="$notification_features hotkeys"
1739         else
1740                 notification_missing_dependencies="$notification_missing_dependencies hotkeys"
1741         fi
1742         notification_features="$notification_features lcdproc"
1743         if test x"$HAVE_UNITY" = xyes; then
1744                 notification_features="$notification_features unity/messaging-menu"
1745         else
1746                 notification_missing_dependencies="$notification_missing_dependencies unity/messaging-menu"
1747         fi
1748         if test x"$HAVE_LIBNOTIFY" = xyes; then
1749                 notification_features="$notification_features libnotify"
1750         else
1751                 notification_missing_dependencies="$notification_missing_dependencies libnotify"
1752         fi
1753         if test x"$HAVE_LIBCANBERRA_GTK" = xyes; then
1754                 notification_features="$notification_features libcanberra-gtk3"
1755         else
1756                 notification_missing_dependencies="$notification_missing_dependencies libcanberra-gtk3"
1757         fi
1758         notification_features="$notification_features popup trayicon"
1759 else
1760         DISABLED_PLUGINS="$DISABLED_PLUGINS notification"
1761         AC_MSG_RESULT(no)
1764 AC_MSG_CHECKING([whether to build pdf_viewer plugin])
1765 if test x"$enable_pdf_viewer_plugin" != xno; then
1766         dependencies_missing=""
1768         if test x"$HAVE_POPPLER" = xno; then
1769                 dependencies_missing="libpoppler-glib $dependencies_missing"
1770         fi
1772         if test x"$dependencies_missing" = x; then
1773                 PLUGINS="$PLUGINS pdf_viewer"
1774                 AC_MSG_RESULT(yes)
1775         elif test x"$enable_pdf_viewer_plugin" = xauto; then
1776                 AC_MSG_RESULT(no)
1777                 AC_MSG_WARN("Plugin pdf_viewer will not be built; missing $dependencies_missing")
1778                 enable_pdf_viewer_plugin=no
1779                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pdf_viewer"
1780         else
1781                 AC_MSG_RESULT(no)
1782                 AC_MSG_ERROR("Plugin pdf_viewer cannot be built; missing $dependencies_missing")
1783         fi
1784 else
1785         DISABLED_PLUGINS="$DISABLED_PLUGINS pdf_viewer"
1786         AC_MSG_RESULT(no)
1789 AC_MSG_CHECKING([whether to build perl plugin])
1790 if test x"$enable_perl_plugin" != xno; then
1791         dependencies_missing=""
1793         if test x"$HAVE_LIBPERL" = xno; then
1794                 dependencies_missing="libperl $dependencies_missing"
1795         fi
1797         if test x"$dependencies_missing" = x; then
1798                 PLUGINS="$PLUGINS perl"
1799                 AC_MSG_RESULT(yes)
1800         elif test x"$enable_perl_plugin" = xauto; then
1801                 AC_MSG_RESULT(no)
1802                 AC_MSG_WARN("Plugin perl will not be built; missing $dependencies_missing")
1803                 enable_perl_plugin=no
1804                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS perl"
1805         else
1806                 AC_MSG_RESULT(no)
1807                 AC_MSG_ERROR("Plugin perl cannot be built; missing $dependencies_missing")
1808         fi
1809 else
1810         DISABLED_PLUGINS="$DISABLED_PLUGINS perl"
1811         AC_MSG_RESULT(no)
1814 AC_MSG_CHECKING([whether to build python plugin])
1815 if test x"$enable_python_plugin" != xno; then
1816         dependencies_missing=""
1818         if test x"$HAVE_PYTHON" = xno; then
1819                 dependencies_missing="python3 $dependencies_missing"
1820         fi
1821         if test x"$HAVE_PYGOBJ" = xno; then
1822                 dependencies_missing="pygobject-3.0 $dependencies_missing"
1823         fi
1825         if test x"$dependencies_missing" = x; then
1826                 PLUGINS="$PLUGINS python"
1827                 AC_MSG_RESULT(yes)
1828         elif test x"$enable_python_plugin" = xauto; then
1829                 AC_MSG_RESULT(no)
1830                 AC_MSG_WARN("Plugin python will not be built; missing $dependencies_missing")
1831                 enable_python_plugin=no
1832                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS python"
1833         else
1834                 AC_MSG_RESULT(no)
1835                 AC_MSG_ERROR("Plugin python cannot be built; missing $dependencies_missing")
1836         fi
1837 else
1838         DISABLED_PLUGINS="$DISABLED_PLUGINS python"
1839         AC_MSG_RESULT(no)
1842 AC_MSG_CHECKING([whether to build pgpcore plugin])
1843 if test x"$enable_pgpcore_plugin" != xno; then
1844         dependencies_missing=""
1846         if test x"$HAVE_GPGME" = xno; then
1847                 dependencies_missing="libgpgme $dependencies_missing"
1848         fi
1850         if test x"$dependencies_missing" = x; then
1851                 PLUGINS="$PLUGINS pgpcore"
1852                 AC_MSG_RESULT(yes)
1853         elif test x"$enable_pgpcore_plugin" = xauto; then
1854                 AC_MSG_RESULT(no)
1855                 AC_MSG_WARN("Plugin pgpcore will not be built; missing $dependencies_missing")
1856                 enable_pgpcore_plugin=no
1857                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpcore"
1858         else
1859                 AC_MSG_RESULT(no)
1860                 AC_MSG_ERROR("Plugin pgpcore cannot be built; missing $dependencies_missing")
1861         fi
1862 else
1863         DISABLED_PLUGINS="$DISABLED_PLUGINS pgpcore"
1864         AC_MSG_RESULT(no)
1867 AC_MSG_CHECKING([whether to build pgpmime plugin])
1868 if test x"$enable_pgpmime_plugin" != xno; then
1869         dependencies_missing=""
1871         if test x"$HAVE_GPGME" = xno; then
1872                 dependencies_missing="libgpgme $dependencies_missing"
1873         fi
1874         if test x"$enable_pgpcore_plugin" = xno; then
1875                 dependencies_missing="pgpcore plugin $dependencies_missing"
1876         fi
1878         if test x"$dependencies_missing" = x; then
1879                 PLUGINS="$PLUGINS pgpmime"
1880                 AC_MSG_RESULT(yes)
1881         elif test x"$enable_pgpmime_plugin" = xauto; then
1882                 AC_MSG_RESULT(no)
1883                 AC_MSG_WARN("Plugin pgpmime will not be built; missing $dependencies_missing")
1884                 enable_pgpmime_plugin=no
1885                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpmime"
1886         else
1887                 AC_MSG_RESULT(no)
1888                 AC_MSG_ERROR("Plugin pgpmime cannot be built; missing $dependencies_missing")
1889         fi
1890 else
1891         DISABLED_PLUGINS="$DISABLED_PLUGINS pgpmime"
1892         AC_MSG_RESULT(no)
1895 AC_MSG_CHECKING([whether to build pgpinline plugin])
1896 if test x"$enable_pgpinline_plugin" != xno; then
1897         dependencies_missing=""
1899         if test x"$HAVE_GPGME" = xno; then
1900                 dependencies_missing="libgpgme $dependencies_missing"
1901         fi
1902         if test x"$enable_pgpcore_plugin" = xno; then
1903                 dependencies_missing="pgpcore plugin $dependencies_missing"
1904         fi
1906         if test x"$dependencies_missing" = x; then
1907                 PLUGINS="$PLUGINS pgpinline"
1908                 AC_MSG_RESULT(yes)
1909         elif test x"$enable_pgpinline_plugin" = xauto; then
1910                 AC_MSG_RESULT(no)
1911                 AC_MSG_WARN("Plugin pgpinline will not be built; missing $dependencies_missing")
1912                 enable_pgpinline_plugin=no
1913                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpinline"
1914         else
1915                 AC_MSG_RESULT(no)
1916                 AC_MSG_ERROR("Plugin pgpinline cannot be built; missing $dependencies_missing")
1917         fi
1918 else
1919         DISABLED_PLUGINS="$DISABLED_PLUGINS pgpinline"
1920         AC_MSG_RESULT(no)
1923 AC_MSG_CHECKING([whether to build rssyl plugin])
1924 if test x"$enable_rssyl_plugin" != xno; then
1925         dependencies_missing=""
1927         if test x"$HAVE_EXPAT" = xno; then
1928                 dependencies_missing="expat $dependencies_missing"
1929         fi
1930         if test x"$HAVE_CURL" = xno; then
1931                 dependencies_missing="libcurl $dependencies_missing"
1932         fi
1934         if test x"$dependencies_missing" = x; then
1935                 PLUGINS="$PLUGINS rssyl"
1936                 AC_MSG_RESULT(yes)
1937         elif test x"$enable_rssyl_plugin" = xauto; then
1938                 AC_MSG_RESULT(no)
1939                 AC_MSG_WARN("Plugin rssyl will not be built; missing $dependencies_missing")
1940                 enable_rssyl_plugin=no
1941                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS rssyl"
1942         else
1943                 AC_MSG_RESULT(no)
1944                 AC_MSG_ERROR("Plugin rssyl cannot be built; missing $dependencies_missing")
1945         fi
1946 else
1947         DISABLED_PLUGINS="$DISABLED_PLUGINS rssyl"
1948         AC_MSG_RESULT(no)
1951 AC_MSG_CHECKING([whether to build spamassassin plugin])
1952 if test x"$enable_spamassassin_plugin" != xno; then
1953         PLUGINS="$PLUGINS spamassassin"
1954         AC_MSG_RESULT(yes)
1955         AC_SPAMASSASSIN
1957         dnl check for zlib (optional)
1958         spamassassin_zlib=0
1959         SPAMASSASSIN_CFLAGS=""
1960         SPAMASSASSIN_LIBS=""
1961         AC_CHECK_HEADER([zlib.h],
1962                         [AC_DEFINE(HAVE_ZLIB_H,1,[optional zlib support for spamassassin plugin])]
1963                         [spamassassin_zlib=1],
1964                         [spamassassin_zlib=0])
1965         if test $spamassassin_zlib -eq 1; then
1966                 AC_CHECK_LIB(z, deflate, [spamassassin_zlib=1], [spamassassin_zlib=0])
1967                 AC_MSG_CHECKING([whether to build spamassassin plugin with zlib support])
1968                 if test $spamassassin_zlib -eq 1; then
1969                         AC_MSG_RESULT(yes)
1970                         SPAMASSASSIN_CFLAGS="-DHAVE_LIBZ"
1971                         SPAMASSASSIN_LIBS="-lz"
1972                 else
1973                         AC_MSG_RESULT(no)
1974                 fi
1975         fi
1976         AC_SUBST(SPAMASSASSIN_CFLAGS)
1977         AC_SUBST(SPAMASSASSIN_LIBS)
1978 else
1979         DISABLED_PLUGINS="$DISABLED_PLUGINS spamassassin"
1980         AC_MSG_RESULT(no)
1983 AC_MSG_CHECKING([whether to build smime plugin])
1984 if test x"$enable_smime_plugin" != xno; then
1985         dependencies_missing=""
1987         if test x"$HAVE_GPGME" = xno; then
1988                 dependencies_missing="libgpgme $dependencies_missing"
1989         fi
1990         if test x"$enable_pgpcore_plugin" = xno; then
1991                 dependencies_missing="pgpcore plugin $dependencies_missing"
1992         fi
1994         if test x"$dependencies_missing" = x; then
1995                 PLUGINS="$PLUGINS smime"
1996                 AC_MSG_RESULT(yes)
1997         elif test x"$enable_smime_plugin" = xauto; then
1998                 AC_MSG_RESULT(no)
1999                 AC_MSG_WARN("Plugin smime will not be built; missing $dependencies_missing")
2000                 enable_smime_plugin=no
2001                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS smime"
2002         else
2003                 AC_MSG_RESULT(no)
2004                 AC_MSG_ERROR("Plugin smime cannot be built; missing $dependencies_missing")
2005         fi
2006 else
2007         DISABLED_PLUGINS="$DISABLED_PLUGINS smime"
2008         AC_MSG_RESULT(no)
2011 AC_MSG_CHECKING([whether to build spam_report plugin])
2012 if test x"$enable_spam_report_plugin" != xno; then
2013         dependencies_missing=""
2015         if test x"$HAVE_CURL" = xno; then
2016                 dependencies_missing="libcurl $dependencies_missing"
2017         fi
2019         if test x"$dependencies_missing" = x; then
2020                 PLUGINS="$PLUGINS spam_report"
2021                 AC_MSG_RESULT(yes)
2022         elif test x"$enable_spam_report_plugin" = xauto; then
2023                 AC_MSG_RESULT(no)
2024                 AC_MSG_WARN("Plugin spam_report will not be built; missing $dependencies_missing")
2025                 enable_spam_report_plugin=no
2026                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS spam_report"
2027         else
2028                 AC_MSG_RESULT(no)
2029                 AC_MSG_ERROR("Plugin spam_report cannot be built; missing $dependencies_missing")
2030         fi
2031 else
2032         DISABLED_PLUGINS="$DISABLED_PLUGINS spam_report"
2033         AC_MSG_RESULT(no)
2036 AC_MSG_CHECKING([whether to build tnef_parse plugin])
2037 if test x"$enable_tnef_parse_plugin" != xno; then
2038         dependencies_missing=""
2040         if test $have_ytnef -eq 0; then
2041                 dependencies_missing="libytnef"
2042         fi
2044         if test x"$dependencies_missing" = x; then
2045                 PLUGINS="$PLUGINS tnef_parse"
2046                 AC_MSG_RESULT(yes)
2047         elif test x"$enable_tnef_parse_plugin" = xauto; then
2048                 AC_MSG_RESULT(no)
2049                 AC_MSG_WARN(Plugin tnef_parse will not be built; missing $dependencies_missing")
2050                 enable_tnef_parse_plugin=no
2051                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS tnef_parse"
2052         else
2053                 AC_MSG_RESULT(no)
2054                 AC_MSG_ERROR(Plugin tnef_parse will not be built; missing $dependencies_missing")
2055         fi
2056 else
2057         DISABLED_PLUGINS="$DISABLED_PLUGINS tnef_parse"
2058         AC_MSG_RESULT(no)
2062 AC_MSG_CHECKING([whether to build vcalendar plugin])
2063 if test x"$enable_vcalendar_plugin" != xno; then
2064         dependencies_missing=""
2066         if test x"$HAVE_CURL" = xno; then
2067                 dependencies_missing="libcurl $dependencies_missing"
2068         fi
2070   if test x"$HAVE_LIBICAL" = xno; then
2071     dependencies_missing="libical $dependencies_missing"
2072   fi
2074         if test x"$HAVE_PERL" = xno; then
2075                 dependencies_missing="perl $dependencies_missing"
2076         fi
2078         if test x"$dependencies_missing" = x; then
2079                 PLUGINS="$PLUGINS vcalendar"
2080                 AC_MSG_RESULT(yes)
2081         elif test x"$enable_vcalendar_plugin" = xauto; then
2082                 AC_MSG_RESULT(no)
2083                 AC_MSG_WARN("Plugin vcalendar will not be built; missing $dependencies_missing")
2084                 enable_vcalendar_plugin=no
2085                 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS vcalendar"
2086         else
2087                 AC_MSG_RESULT(no)
2088                 AC_MSG_ERROR("Plugin vcalendar cannot be built; missing $dependencies_missing")
2089         fi
2090 else
2091         DISABLED_PLUGINS="$DISABLED_PLUGINS vcalendar"
2092         AC_MSG_RESULT(no)
2095 dnl And finally the automake conditionals.
2097 AM_CONDITIONAL(BUILD_ACPI_NOTIFIER_PLUGIN,      test x"$enable_acpi_notifier_plugin" != xno)
2098 AM_CONDITIONAL(BUILD_ADDRESS_KEEPER_PLUGIN,     test x"$enable_address_keeper_plugin" != xno)
2099 AM_CONDITIONAL(BUILD_ARCHIVE_PLUGIN,            test x"$enable_archive_plugin" != xno)
2100 AM_CONDITIONAL(BUILD_ATT_REMOVER_PLUGIN,        test x"$enable_att_remover_plugin" != xno)
2101 AM_CONDITIONAL(BUILD_ATTACHWARNER_PLUGIN,       test x"$enable_attachwarner_plugin" != xno)
2102 AM_CONDITIONAL(BUILD_BOGOFILTER_PLUGIN,         test x"$enable_bogofilter_plugin" != xno)
2103 AM_CONDITIONAL(BUILD_BSFILTER_PLUGIN,           test x"$enable_bsfilter_plugin" != xno)
2104 AM_CONDITIONAL(BUILD_CLAMD_PLUGIN,              test x"$enable_clamd_plugin" != xno)
2105 AM_CONDITIONAL(BUILD_DEMO_PLUGIN,               test x"$enable_demo_plugin" != xno)
2106 AM_CONDITIONAL(BUILD_DILLO_PLUGIN,              test x"$enable_dillo_plugin" != xno)
2107 AM_CONDITIONAL(BUILD_FANCY_PLUGIN,              test x"$enable_fancy_plugin" != xno)
2108 AM_CONDITIONAL(BUILD_FETCHINFO_PLUGIN,          test x"$enable_fetchinfo_plugin" != xno)
2109 AM_CONDITIONAL(BUILD_GDATA_PLUGIN,              test x"$enable_gdata_plugin" != xno)
2110 AM_CONDITIONAL(BUILD_KEYWORD_WARNER_PLUGIN,     test x"$enable_keyword_warner_plugin" != xno)
2111 AM_CONDITIONAL(BUILD_LIBRAVATAR_PLUGIN,         test x"$enable_libravatar_plugin" != xno)
2112 AM_CONDITIONAL(BUILD_LITEHTML_VIEWER_PLUGIN,    test x"$enable_litehtml_viewer_plugin" != xno)
2113 AM_CONDITIONAL(BUILD_MAILMBOX_PLUGIN,           test x"$enable_mailmbox_plugin" != xno)
2114 AM_CONDITIONAL(BUILD_MANAGESIEVE_PLUGIN,        test x"$enable_managesieve_plugin" != xno)
2115 AM_CONDITIONAL(BUILD_NEWMAIL_PLUGIN,            test x"$enable_newmail_plugin" != xno)
2116 AM_CONDITIONAL(BUILD_NOTIFICATION_PLUGIN,       test x"$enable_notification_plugin" != xno)
2117 AM_CONDITIONAL(BUILD_HOTKEYS,                   test x"$enable_notification_plugin" != xno -a x"$HAVE_HOTKEYS" = xyes)
2118 AM_CONDITIONAL(BUILD_PDF_VIEWER_PLUGIN,         test x"$enable_pdf_viewer_plugin" != xno)
2119 AM_CONDITIONAL(BUILD_PERL_PLUGIN,               test x"$enable_perl_plugin" != xno)
2120 AM_CONDITIONAL(BUILD_PYTHON_PLUGIN,             test x"$enable_python_plugin" != xno)
2121 AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN,            test x"$enable_pgpcore_plugin" != xno)
2122 AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN,            test x"$enable_pgpmime_plugin" != xno)
2123 AM_CONDITIONAL(BUILD_PGPINLINE_PLUGIN,          test x"$enable_pgpinline_plugin" != xno)
2124 AM_CONDITIONAL(BUILD_RSSYL_PLUGIN,              test x"$enable_rssyl_plugin" != xno)
2125 AM_CONDITIONAL(BUILD_SMIME_PLUGIN,              test x"$enable_smime_plugin" != xno)
2126 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN,       test x"$enable_spamassassin_plugin" != xno)
2127 AM_CONDITIONAL(BUILD_SPAM_REPORT_PLUGIN,        test x"$enable_spam_report_plugin" != xno)
2128 AM_CONDITIONAL(BUILD_TNEF_PARSE_PLUGIN,         test x"$enable_tnef_parse_plugin" != xno)
2129 AM_CONDITIONAL(BUILD_VCALENDAR_PLUGIN,          test x"$enable_vcalendar_plugin" != xno)
2132 dnl ****************************
2133 dnl ** Final configure output **
2134 dnl ****************************
2136 AC_CONFIG_FILES([
2137 Makefile
2138 m4/Makefile
2139 po/Makefile.in
2140 src/common/version.h
2141 src/Makefile
2142 src/w32-resource.rc
2143 src/common/Makefile
2144 src/common/passcrypt.h
2145 src/common/tests/Makefile
2146 src/gtk/Makefile
2147 src/etpan/Makefile
2148 src/plugins/Makefile
2149 src/plugins/acpi_notifier/Makefile
2150 src/plugins/address_keeper/Makefile
2151 src/plugins/address_keeper/version.rc
2152 src/plugins/archive/Makefile
2153 src/plugins/att_remover/Makefile
2154 src/plugins/att_remover/version.rc
2155 src/plugins/attachwarner/Makefile
2156 src/plugins/attachwarner/version.rc
2157 src/plugins/bogofilter/Makefile
2158 src/plugins/bsfilter/Makefile
2159 src/plugins/bsfilter/version.rc
2160 src/plugins/clamd/Makefile
2161 src/plugins/clamd/libclamd/Makefile
2162 src/plugins/demo/Makefile
2163 src/plugins/dillo/Makefile
2164 src/plugins/fancy/Makefile
2165 src/plugins/fancy/version.rc
2166 src/plugins/fetchinfo/Makefile
2167 src/plugins/fetchinfo/version.rc
2168 src/plugins/gdata/Makefile
2169 src/plugins/keyword_warner/Makefile
2170 src/plugins/keyword_warner/version.rc
2171 src/plugins/litehtml_viewer/Makefile
2172 src/plugins/litehtml_viewer/version.rc
2173 src/plugins/litehtml_viewer/litehtml/Makefile
2174 src/plugins/libravatar/Makefile
2175 src/plugins/libravatar/version.rc
2176 src/plugins/mailmbox/Makefile
2177 src/plugins/mailmbox/version.rc
2178 src/plugins/managesieve/Makefile
2179 src/plugins/managesieve/version.rc
2180 src/plugins/newmail/Makefile
2181 src/plugins/notification/Makefile
2182 src/plugins/notification/version.rc
2183 src/plugins/notification/gtkhotkey/Makefile
2184 src/plugins/pdf_viewer/Makefile
2185 src/plugins/pdf_viewer/version.rc
2186 src/plugins/perl/Makefile
2187 src/plugins/perl/tools/Makefile
2188 src/plugins/python/Makefile
2189 src/plugins/python/examples/Makefile
2190 src/plugins/pgpcore/Makefile
2191 src/plugins/pgpcore/version.rc
2192 src/plugins/pgpmime/Makefile
2193 src/plugins/pgpmime/version.rc
2194 src/plugins/pgpinline/Makefile
2195 src/plugins/pgpinline/version.rc
2196 src/plugins/rssyl/Makefile
2197 src/plugins/rssyl/version.rc
2198 src/plugins/rssyl/tests/Makefile
2199 src/plugins/rssyl/libfeed/Makefile
2200 src/plugins/rssyl/libfeed/tests/Makefile
2201 src/plugins/smime/Makefile
2202 src/plugins/smime/version.rc
2203 src/plugins/spamassassin/Makefile
2204 src/plugins/spam_report/Makefile
2205 src/plugins/spam_report/version.rc
2206 src/plugins/tnef_parse/Makefile
2207 src/plugins/tnef_parse/version.rc
2208 src/plugins/vcalendar/Makefile
2209 src/plugins/vcalendar/version.rc
2210 src/tests/Makefile
2211 doc/Makefile
2212 doc/man/Makefile
2213 tools/Makefile
2214 config/Makefile
2215 manual/Makefile
2216 claws-mail.pc
2218 AC_OUTPUT
2220 dnl Output the configuration summary
2221 echo ""
2222 echo "$PACKAGE $VERSION"
2223 echo ""
2224 if test x"$enable_alternate_addressbook" = xyes; then
2225         echo "Using Address Book : Alternate experimental interface"
2226 else
2227         echo "Using Address Book : Original stable interface"
2228         echo "JPilot             : $enable_jpilot"
2229         echo "LDAP               : $enable_ldap"
2231 echo "gnuTLS             : $enable_gnutls"
2232 echo "OAuth2             : $enable_oauth2"
2233 echo "iconv              : $am_cv_func_iconv"
2234 echo "compface           : $enable_compface"
2235 echo "IPv6               : $enable_ipv6"
2236 echo "enchant            : $enable_enchant"
2237 echo "IMAP4              : $enable_libetpan"
2238 echo "NNTP               : $enable_libetpan"
2239 echo "Crash dialog       : $enable_crash_dialog"
2240 echo "LibSM              : $enable_libsm"
2241 echo "DBUS               : $enable_dbus"
2242 echo "NetworkManager     : $enable_networkmanager"
2243 echo "Manual             : $enable_manual"
2244 echo "Generic UMPC code  : $enable_generic_umpc"
2245 echo "SVG support        : $enable_svg"
2246 echo "Config dir         : $ac_cv_with_config_dir"
2247 echo "Password crypto    : $pwd_crypto"
2248 echo "Unit tests         : $enable_tests"
2250 echo "Plugins"
2251 echo "   Built:"
2252 for plugin in $PLUGINS; do
2253 echo "            - $plugin"
2254 if test x"$plugin" = xnotification; then
2255         echo "                Features:"
2256         for notif_feature in $notification_features; do
2257                 echo "                    $notif_feature"
2258         done;
2259         if test "x$notification_missing_dependencies" != x; then
2260                 echo "                Disabled due to missing dependencies:"
2261                 for notif_miss_dep in $notification_missing_dependencies; do
2262                         echo "                    $notif_miss_dep"
2263                 done;
2264         fi
2266 done;
2267 if test "x$DISABLED_PLUGINS" != x; then
2268 echo "   Disabled:"
2269 for plugin in $DISABLED_PLUGINS; do
2270 echo "            - $plugin"
2271 done;
2274 if test "x$MISSING_DEPS_PLUGINS" != x; then
2275 echo "   Disabled due to missing dependencies:"
2276 for plugin in $MISSING_DEPS_PLUGINS; do
2277 echo "            - $plugin"
2278 done;
2280 echo ""
2281 echo "The binary will be installed in $prefix/bin"
2282 echo ""
2283 echo "Configure finished, type 'make' to build."