4 m4_define([claws_VERSION],
5 m4_esyscmd([./get-git-version]))
8 m4_defn([claws_VERSION]))
9 AC_CONFIG_SRCDIR([src/main.c])
10 AC_CONFIG_AUX_DIR([config])
11 AC_CONFIG_MACRO_DIR([m4])
13 AM_INIT_AUTOMAKE([no-define])
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}
40 VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
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")
52 AC_SUBST(MAJOR_VERSION)
53 AC_SUBST(MINOR_VERSION)
54 AC_SUBST(MICRO_VERSION)
55 AC_SUBST(EXTRA_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"])
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`
81 dnl Specify a header configuration file
82 AC_CONFIG_HEADERS(config.h)
83 AC_CONFIG_HEADERS(claws-features.h)
86 AC_USE_SYSTEM_EXTENSIONS
88 dnl Checks for programs.
91 AC_SEARCH_LIBS([strerror],[cposix])
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.])
108 LT_LANG([Windows Resource])
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
116 AC_PATH_PROG(REAL_CXX, $CXX)
118 if test -n "$REAL_CXX"; then
124 dnl ******************************
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])
134 *-*-mingw*|*-*-cygwin*)
136 LDFLAGS="$LDFLAGS -mwindows -Wl,--export-all-symbols"
140 LDFLAGS="$LDFLAGS -Wl,-export_dynamic"
145 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
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])
161 AC_MSG_RESULT([$os_win32])
162 AM_CONDITIONAL(OS_WIN32, test x"$os_win32" = x"yes")
164 AC_MSG_CHECKING([for Cygwin])
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"
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
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])
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"
215 AM_CFLAGS="$AM_CFLAGS -no-cpp-precomp -fno-common"
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
222 AM_CFLAGS="$AM_CFLAGS -mms-bitfields"
223 LIBS="$LIBS -l${pthread_name} -lws2_32 -lregex"
226 AM_CFLAGS="$AM_CFLAGS -std=gnu99"
227 AC_DEFINE([SOLARIS], [], [Target is Solaris])
236 dnl floor and ceil are in -lm
240 ALL_LINGUAS="ca cs da de el_GR en_GB es fi fr hu id_ID it ja nb nl pl pt_BR pt_PT ro ru sk sv tr zh_TW"
241 GETTEXT_PACKAGE=claws-mail
242 AC_SUBST(GETTEXT_PACKAGE)
243 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
245 AM_GNU_GETTEXT_VERSION([0.18])
246 AM_GNU_GETTEXT([external])
248 AC_ARG_ENABLE(manual,
249 [ --disable-manual Do not build user manual],
250 [enable_manual=$enableval], [enable_manual=yes])
253 [ --disable-libsm Do not build libSM support for session management],
254 [enable_libsm=$enableval], [enable_libsm=yes])
257 [ --disable-ipv6 Do not build IPv6 support],
258 [enable_ipv6=$enableval], [enable_ipv6=yes])
260 AC_ARG_ENABLE(gnutls,
261 [ --disable-gnutls Do not build GnuTLS support for TLS],
262 [enable_gnutls=$enableval], [enable_gnutls=yes])
264 AC_ARG_ENABLE(oauth2,
265 [ --disable-oauth2 Do not build OAuth2 support],
266 [enable_oauth2=$enableval], [enable_oauth2=yes])
268 AC_ARG_ENABLE(enchant,
269 [ --disable-enchant Do not build Enchant support for spell-checking],
270 [enable_enchant=$enableval], [enable_enchant=yes])
272 AC_ARG_ENABLE(crash-dialog,
273 [ --enable-crash-dialog Build crash dialog],
274 [enable_crash_dialog=$enableval], [enable_crash_dialog=no])
276 AC_ARG_ENABLE(generic-umpc,
277 [ --enable-generic-umpc Build generic UMPC code],
278 [enable_generic_umpc=$enableval], [enable_generic_umpc=no])
280 AC_ARG_ENABLE(compface,
281 [ --disable-compface Do not build compface support for X-Face],
282 [enable_compface=$enableval], [enable_compface=yes])
284 AC_ARG_ENABLE(pthread,
285 [ --disable-pthread Do not build pthread support],
286 [enable_pthread=$enableval], [enable_pthread=yes])
288 AC_ARG_ENABLE(startup-notification,
289 [ --disable-startup-notification Do not startup notification support],
290 [enable_startup_notification=$enableval], [enable_startup_notification=yes])
293 [ --disable-dbus Do not build DBUS support],
294 [enable_dbus=$enableval], [enable_dbus=yes])
297 [ --disable-ldap Do not build LDAP support],
298 [enable_ldap=$enableval], [enable_ldap=yes])
300 AC_ARG_ENABLE(jpilot,
301 [ --disable-jpilot Do not build JPilot support],
302 [enable_jpilot=$enableval], [enable_jpilot=yes])
304 AC_ARG_ENABLE(networkmanager,
305 [ --disable-networkmanager Do not build NetworkManager support],
306 [enable_networkmanager=$enableval], [enable_networkmanager=yes])
308 AC_ARG_ENABLE(libetpan,
309 [ --disable-libetpan Do not build libetpan support for IMAP4/NNTP],
310 [enable_libetpan=$enableval], [enable_libetpan=yes])
312 AC_ARG_ENABLE(valgrind,
313 [ --disable-valgrind Do not build valgrind support for debugging],
314 [enable_valgrind=$enableval], [enable_valgrind=yes])
316 AC_ARG_ENABLE(alternate-addressbook,
317 [ --enable-alternate-addressbook Build alternate external address book support],
318 [enable_alternate_addressbook=$enableval], [enable_alternate_addressbook=no])
321 [ --disable-svg Do not build SVG support],
322 [enable_svg=$enableval], [enable_svg=yes])
325 [ --enable-tests Build unit tests],
326 [enable_tests=$enableval], [enable_tests=no])
328 AC_ARG_ENABLE(more-addressbook-debug,
329 [ --enable-more-addressbook-debug Build with additional addressbook debug calls],
330 [enable_more_addressbook_debug=$enableval], [enable_more_addressbook_debug=no])
332 AC_ARG_ENABLE(more-ldap-debug,
333 [ --enable-more-ldap-debug Build with additional LDAP debug calls],
334 [enable_more_ldap_debug=$enableval], [enable_more_ldap_debug=no])
336 AC_ARG_ENABLE(more-archive-debug,
337 [ --enable-more-archive-debug Build with additional debug calls in archive plugin],
338 [enable_more_archive_debug=$enableval], [enable_more_archive_debug=no])
340 manualdir='${docdir}/manual'
341 AC_ARG_WITH(manualdir,
342 [ --with-manualdir=DIR Manual directory],
343 [manualdir="$withval"])
346 dnl ******************************
347 dnl ** Check for required tools **
348 dnl ** to build manuals **
349 dnl ******************************
351 AC_PATH_PROG(DOCBOOK2HTML, docbook2html)
352 AC_PATH_PROG(DOCBOOK2TXT, docbook2txt)
353 AC_PATH_PROG(DOCBOOK2PS, docbook2ps)
354 AC_PATH_PROG(DOCBOOK2PDF, docbook2pdf)
356 AM_CONDITIONAL(MANUAL_HTML, test -n "$DOCBOOK2HTML")
357 AM_CONDITIONAL(MANUAL_TXT, test -n "$DOCBOOK2TXT")
358 AM_CONDITIONAL(MANUAL_PDF, test -n "$DOCBOOK2PDF")
359 AM_CONDITIONAL(MANUAL_PS, test -n "$DOCBOOK2PS")
361 if test x"$enable_manual" = x"yes"; then
362 if test -n "$DOCBOOK2TXT" -o -n "$DOCBOOK2HTML" \
363 -o -n "$DOCBOOK2PS" -o -n "$DOCBOOK2PDF"; then
370 AM_CONDITIONAL(BUILD_MANUAL, test x"$enable_manual" = xyes)
372 dnl Set PACKAGE_DATA_DIR in config.h.
373 if test "x${datarootdir}" = 'x${prefix}/share'; then
374 if test "x${prefix}" = "xNONE"; then
375 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
377 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
380 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datarootdir}/${PACKAGE}",[PACKAGE_DATA_DIR])
383 AC_CHECK_LIB(xpg4, setlocale)
387 AC_MSG_CHECKING([whether to use LibSM])
388 if test x"$enable_libsm" = xyes; then
390 AC_CHECK_LIB(SM, SmcSaveYourselfDone,
391 [SM_LIBS="$X_LIBS -lSM -lICE"],enable_libsm=no,
393 AC_CHECK_HEADERS(X11/SM/SMlib.h,,enable_libsm=no)
394 if test x"$enable_libsm" = xyes; then
395 AC_DEFINE(HAVE_LIBSM, 1, [Define to 1 if you have libSM installed])
397 AC_MSG_RESULT(not found)
398 AC_MSG_WARN([*** LibSM will not be supported ***])
405 dnl Check for __VA_OPT__ macro
406 AC_CACHE_CHECK([for __VA_OPT__],
408 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[#define va_opt_printf(format, ...) fprintf(stderr, format __VA_OPT__(,) __VA_ARGS__)
409 va_opt_printf("success\n");]])],[ac_cv_va_opt=yes],[ac_cv_va_opt=no])]
411 if test "$ac_cv_va_opt" = yes; then
412 AC_DEFINE([HAVE_VA_OPT], [1], [Define if __VA_OPT__ macro works])
415 dnl Checks for header files.
417 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
418 sys/param.h sys/utsname.h sys/select.h \
419 wchar.h wctype.h locale.h netdb.h)
420 AC_CHECK_HEADER([execinfo.h], [AC_DEFINE(HAVE_BACKTRACE,1,[Has backtrace*() needed for retrieving stack traces])])
421 AC_SEARCH_LIBS(backtrace_symbols, [execinfo])
423 dnl Checks for typedefs, structures, and compiler characteristics.
430 AC_CHECK_SIZEOF(unsigned short, 2)
431 AC_CHECK_SIZEOF(unsigned int, 4)
432 AC_CHECK_SIZEOF(unsigned long, 4)
434 dnl Checks for library functions.
436 AC_CHECK_FUNCS(fchmod fgets_unlocked flock lockf strcasestr)
438 dnl *****************
439 dnl ** common code **
440 dnl *****************
443 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.50 gmodule-2.0 >= 2.50 gobject-2.0 >= 2.50 gthread-2.0 >= 2.50])
445 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
446 AC_SUBST(GLIB_GENMARSHAL)
448 AC_SUBST(GLIB_CFLAGS)
451 PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0 >= 2.26])
453 dnl check for IPv6 option
454 dnl automated checks for IPv6 support.
455 AC_MSG_CHECKING([whether to use IPv6])
456 if test x"$enable_ipv6" = xyes; then
458 AC_MSG_CHECKING([for IPv6 support])
459 if test x"$platform_win32" = xyes; then
460 AC_CACHE_VAL(ac_cv_ipv6,[
461 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
462 #include <ws2tcpip.h>
463 ]], [[struct in6_addr a;]])],[ac_cv_ipv6=yes],[ac_cv_ipv6=no])
466 AC_CACHE_VAL(ac_cv_ipv6,[
467 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
469 #include <sys/types.h>
470 #include <netinet/in.h>
471 ]], [[int x = IPPROTO_IPV6; struct in6_addr a;]])],[ac_cv_ipv6=yes],[ac_cv_ipv6=no])
474 AC_MSG_RESULT($ac_cv_ipv6)
475 if test $ac_cv_ipv6 = yes; then
476 AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
478 AC_MSG_WARN(*** IPv6 will not be supported ***)
486 AC_MSG_CHECKING([whether to use GnuTLS])
487 AC_MSG_RESULT($enable_gnutls)
488 if test "x$enable_gnutls" != "xno"; then
489 PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.2,
491 AC_DEFINE(USE_GNUTLS, 1, gnutls)
492 echo "Building with GnuTLS"
493 PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.11,
495 dnl No linking against libgcrypt needed
498 dnl linking against libgcrypt *is* needed
499 GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt"
503 echo "Building without GnuTLS"
504 AC_MSG_RESULT([*** GnuTLS support is recommended ])
505 AC_MSG_RESULT([*** You can use --disable-gnutls if you don't need it.])
506 AC_MSG_ERROR([GnuTLS not found])
508 AC_SUBST(GNUTLS_LIBS)
509 AC_SUBST(GNUTLS_CFLAGS)
512 PKG_CHECK_MODULES(NETTLE, nettle)
513 AC_SUBST(NETTLE_LIBS)
514 AC_SUBST(NETTLE_CFLAGS)
516 AC_ARG_WITH(passcrypt-key, [ --with-passcrypt-key=KEY Key used to encode passwords (8 byte string)],
517 with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
518 AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
520 dnl RC dir (will be default at a certain point in time)
521 AC_ARG_WITH(config-dir, [ --with-config-dir=RCDIR Local configuration dir (default: .claws-mail)],
522 ac_cv_with_config_dir="$withval", ac_cv_with_config_dir="")
524 dnl Set correct default value based on platform
525 if test x"$ac_cv_with_config_dir" = x""; then
526 if test x"$platform_win32" = xyes; then
527 ac_cv_with_config_dir="Claws-mail"
529 ac_cv_with_config_dir=".claws-mail"
532 AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
534 AC_ARG_WITH(password-encryption, [ --with-password-encryption=PROVIDER Which cryptographic library to use for encrypting stored passwords (gnutls, old, default)],
535 pwd_crypto="$withval", pwd_crypto="default")
537 if test x"$pwd_crypto" = xdefault; then
538 if test x"$enable_gnutls" = xyes; then
539 if `$PKG_CONFIG --atleast-version=3.0 gnutls`; then
544 if test x"$pwd_crypto" = xdefault; then
550 if test x"$enable_gnutls" = xno; then
551 AC_MSG_ERROR([GnuTLS password encryption requested but GnuTLS is not available.])
553 if ! `$PKG_CONFIG --atleast-version=3.0 gnutls`; then
554 AC_MSG_ERROR([GnuTLS version at least 3.0 is required for password encryption.])
556 AC_DEFINE(PASSWORD_CRYPTO_GNUTLS, 1, Use GnuTLS for stored password encryption)
559 AC_DEFINE(PASSWORD_CRYPTO_OLD, 1, Use old insecure method for stored password encryption)
562 AC_MSG_ERROR([Unknown password encryption provider requested.])
566 AC_MSG_CHECKING([whether GnuTLS support is present for OAuth2])
567 if test x"$enable_gnutls" = xyes; then
569 AC_MSG_CHECKING([whether to build OAuth2 support])
570 if test x"$enable_oauth2" = xyes; then
572 AC_DEFINE(USE_OAUTH2, 1, [Define if OAuth2 is to be activated.])
582 dnl ************************
583 dnl ** GTK user interface **
584 dnl ************************
587 PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.20 cairo)
589 AC_ARG_ENABLE(deprecated,
590 [ --disable-deprecated Disable deprecated GTK functions],
591 gtkdeprecated=$enableval)
592 AC_MSG_CHECKING([whether to use deprecated GTK functions])
593 if test x"$gtkdeprecated" != xno; then
596 GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
600 dnl Make sure the code does not regress to using deprecated GTK stuff...
601 GTK_CFLAGS="$GTK_CFLAGS -DGTK_DISABLE_SINGLE_INCLUDES -DGSEAL_ENABLE"
606 dnl enchant is used for spell checking
607 AC_MSG_CHECKING([whether to use enchant])
608 AC_MSG_RESULT($enable_enchant)
609 if test $enable_enchant = yes; then
610 PKG_CHECK_MODULES(ENCHANT, enchant >= 1.4.0,
612 AC_DEFINE(USE_ENCHANT, 1, enchant)
613 echo "Building with enchant"
617 PKG_CHECK_MODULES(ENCHANT, enchant-2 >= 2.0.0,
619 AC_DEFINE(USE_ENCHANT, 1, enchant-2)
620 echo "Building with enchant-2"
624 echo "Building without enchant-notification"
628 AC_SUBST(ENCHANT_CFLAGS)
629 AC_SUBST(ENCHANT_LIBS)
632 dnl want crash dialog
633 if test $enable_crash_dialog = yes; then
634 dnl check if GDB is somewhere
635 AC_CHECK_PROG(enable_crash_dialog, gdb, yes, no)
636 AC_MSG_CHECKING([whether to use crash dialog])
637 if test $enable_crash_dialog = yes; then
638 AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
640 AC_MSG_RESULT($enable_crash_dialog)
644 if test $enable_generic_umpc = yes; then
645 AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
646 AC_MSG_RESULT($enable_generic_umpc)
649 dnl Check for X-Face support
650 AC_MSG_CHECKING([whether to use compface])
651 if test x"$enable_compface" = xyes; then
653 AC_CHECK_LIB(compface, uncompface,
654 [AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)],
655 [enable_compface=no])
656 if test x"$enable_compface" = xyes; then
657 COMPFACE_LIBS="-lcompface"
661 AC_SUBST(COMPFACE_LIBS)
666 dnl check for pthread support
667 AC_MSG_CHECKING([whether to use pthread])
668 if test x$enable_pthread = xno; then
673 # For W32 we need to use a special ptrhead lib. In this case we can't
674 # use AC_CHECK_LIB because it has no means of checking for a
675 # library installed under a different name. Checking for the
677 if test -n "${pthread_name}" ; then
680 AC_CHECK_LIB(pthread, pthread_create, :, enable_pthread=no)
682 AC_CHECK_HEADERS(pthread.h, :, enable_pthread=no)
684 if test x$enable_pthread = xyes; then
685 AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
686 if test -z "${pthread_name}" ; then
687 PTHREAD_LIBS="-lpthread"
692 AC_SUBST(PTHREAD_LIBS)
695 dnl Check whether we need to pass -lresolv
696 dnl We know that we don't need it for W32.
698 if test x$os_win32 = xno; then
701 ac_cv_var__res_options=no
702 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
703 #include <sys/socket.h>
704 #include <netinet/in.h>
705 #include <arpa/nameser.h>
706 #include <resolv.h>]], [[_res.options = RES_INIT;]])],[ac_cv_var__res_options=yes],[]);
707 if test "$ac_cv_var__res_options" != "yes"; then
712 if test "x$LIBRESOLV" = "x"; then
713 AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
719 LIBS="$LIBS $LIBRESOLV"
721 dnl #######################################################################
722 dnl # Check for startup notification
723 dnl #######################################################################
724 if test "x$enable_startup_notification" = "xyes"; then
725 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
727 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
728 echo "Building with libstartup-notification"
729 enable_startup_notification=yes
732 echo "Building without libstartup-notification"
733 enable_startup_notification=no
736 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
737 AC_SUBST(STARTUP_NOTIFICATION_LIBS)
740 dnl #######################################################################
741 dnl # Check for D-Bus support
742 dnl #######################################################################
743 if test "x$enable_dbus" = "xyes"; then
744 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60, dbus-glib-1 >= 0.60],
746 AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if glib bindings of D-Bus are available])
750 echo "D-Bus requirements not met. D-Bus support not activated."
753 AC_SUBST(DBUS_CFLAGS)
757 dnl #######################################################################
758 dnl # Configure address book support
759 dnl #######################################################################
761 dnl #######################################################################
762 dnl # Check for alternate address book support
763 dnl #######################################################################
764 AC_MSG_CHECKING([whether DBUS support for alternate address book is present])
765 if test x"$enable_dbus" = xyes; then
767 AC_MSG_CHECKING([whether to enable alternate address book])
768 if test x"$enable_alternate_addressbook" = xyes; then
770 PKG_CHECK_MODULES(CONTACTS, [claws-contacts],
772 AC_DEFINE(USE_ALT_ADDRBOOK, 1, [Define if alternate address book is to be activated.])
773 enable_alternate_addressbook=yes
774 AC_SUBST(CONTACTS_CFLAGS)
775 AC_SUBST(CONTACTS_LIBS)
778 enable_alternate_addressbook=no
782 enable_alternate_addressbook=no
786 enable_alternate_addressbook=no
789 dnl #######################################################################
790 dnl # Check for old address book support
791 dnl #######################################################################
792 if test x"$enable_alternate_addressbook" = xno; then
793 dnl for LDAP support in addressbook
794 dnl no check for libraries; dynamically loaded
795 AC_MSG_CHECKING([whether to use LDAP])
796 if test x"$enable_ldap" = xno; then
798 elif test x"$enable_ldap" = xyes -a x"$enable_pthread" = xno; then
799 AC_MSG_RESULT(no - LDAP support needs pthread support)
802 elif test x"$platform_win32" = xyes; then
804 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
805 LDAP_LIBS="-lwldap32"
810 dnl check for available libraries, and pull them in
811 AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
812 AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
813 AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
814 AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
817 AC_CHECK_HEADERS(ldap.h lber.h,
821 if test "$enable_ldap" = yes; then
822 AC_CHECK_LIB(ldap, ldap_open,
827 AC_CHECK_LIB(ldap, ldap_start_tls_s,
828 [ ac_cv_have_tls=yes ],
829 [ ac_cv_have_tls=no ])
833 AC_MSG_CHECKING([whether ldap library is available])
834 AC_MSG_RESULT($enable_ldap)
836 AC_MSG_CHECKING([whether TLS library is available])
837 AC_MSG_RESULT($ac_cv_have_tls)
839 if test "$enable_ldap" = yes; then
840 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
841 LDAP_LIBS="$LDAP_LIBS -lldap"
843 if test "$ac_cv_have_tls" = yes; then
844 AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
846 dnl As of OpenLDAP API version 3000 a number of functions has
847 dnl been deprecated. As Claws-mail compiles and runs on many
848 dnl platforms and many versions of OpenLDAP we need to be able
849 dnl to switch between the old and new API because new API has
850 dnl added new functions replacing old ones and at the same time
851 dnl old functions has been changed.
852 dnl If cross-compiling defaults to enable deprecated features
853 dnl for maximum portability
854 AC_MSG_CHECKING([The API version of OpenLDAP])
858 [if (LDAP_API_VERSION >= 3000)
861 [AC_MSG_RESULT([version < 3000])
862 AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 0, Define if OpenLDAP API is at least version 3000.)],
863 [AC_MSG_RESULT([version >= 3000])
864 AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 1, Define if OpenLDAP API is at least version 3000.)],
865 [AC_MSG_RESULT([Enabling deprecated features in OpenLDAP])
866 AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 0, Define if OpenLDAP API is at least version 3000.)
867 AC_DEFINE(LDAP_DEPRECATED, 1, Define to activate deprecated features in OpenLDAP)]
872 dnl for JPilot support in addressbook
873 dnl no check for libraries; these are dynamically loaded
874 AC_MSG_CHECKING([whether to use JPilot])
875 if test "$enable_jpilot" = yes; then
877 AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h pi-version.h,
878 [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
879 [ enable_jpilot=no ])
880 if test "$enable_jpilot" = no; then
881 AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h libpisock/pi-version.h,
883 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
886 AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" enable_jpilot="no"])
887 if test x"$enable_jpilot" = xyes; then
888 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
890 AC_MSG_NOTICE([JPilot support not available])
892 AC_SUBST(JPILOT_LIBS)
898 AM_CONDITIONAL(BUILD_ALTADDRBOOK, test x"$enable_alternate_addressbook" = x"yes")
900 dnl #######################################################################
901 dnl # Check for NetworkManager support
902 dnl #######################################################################
903 if test x"$enable_dbus" = xyes; then
904 if test x"$enable_networkmanager" = xyes; then
905 PKG_CHECK_MODULES(NETWORKMANAGER_SUPPORT, libnm,
907 AC_DEFINE(HAVE_NETWORKMANAGER_SUPPORT, 1, [Define if NetworkManager support is to be included.])
908 echo "Building with NetworkManager support"
909 enable_networkmanager=yes
912 echo "NetworkManager not found."
913 enable_networkmanager=no
915 AC_SUBST(NETWORKMANAGER_SUPPORT_CFLAGS)
918 echo "NetworkManager support deactivated as D-Bus requirements were not met."
919 enable_networkmanager=no
923 AC_MSG_CHECKING([whether to use libetpan])
924 if test x"$enable_libetpan" = xyes; then
929 libetpan_versiontype=0
931 # since 1.9.4, libetpan uses pkg-config
932 PKG_CHECK_MODULES([LIBETPAN], [libetpan >= 1.9.4],
934 LIBETPAN_VERSION=`pkg-config --modversion libetpan | $AWK -F. '{printf "%d", ($1 * 10000) + ($2 * 100) + $3}'`
938 # before 1.9.4, libetpan uses its own libetpan-config script
939 AC_PATH_PROG(libetpanconfig, [libetpan-config])
940 if test "x$libetpanconfig" != "x"; then
941 LIBETPAN_CFLAGS="`$libetpanconfig --cflags`"
942 LIBETPAN_LIBS="`$libetpanconfig --libs`"
943 # support libetpan version like x.x and x.x.x
944 libetpan_versiontype=`$libetpanconfig --version | tr -dc . | wc -c`
945 if test $libetpan_versiontype -eq 1; then
946 LIBETPAN_VERSION=`$libetpanconfig --version | $AWK -F. '{printf "%d", ($1 * 100) + $2}'`
948 LIBETPAN_VERSION=`$libetpanconfig --version | $AWK -F. '{printf "%d", ($1 * 10000) + ($2 * 100) + $3}'`
953 if test "x$libetpan_config" = "xyes"; then
954 libetpan_save_CPPFLAGS=$CPPFLAGS
955 CPPFLAGS="$CPPFLAGS $LIBETPAN_CFLAGS"
956 AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
957 if test "x$libetpan_result" = "xyes"; then
958 AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
959 libetpan_save_LIBS=$LIBS
960 LIBS="$LIBS $LIBETPAN_LIBS"
961 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <libetpan/dbstorage.h>]], [[db_mailstorage_init(NULL, NULL);]])],[libetpan_result=yes],[libetpan_result=no])
962 LIBS=$libetpan_save_LIBS
963 AC_MSG_RESULT([$libetpan_result])
965 CPPFLAGS=$libetpan_save_CPPFLAGS
967 if test "x$libetpan_result" = "xyes"; then
968 if test $libetpan_versiontype -eq 1; then
969 if test "$LIBETPAN_VERSION" -lt "57"; then
970 AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/])
971 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
972 AC_MSG_ERROR([libetpan 0.57 not found])
975 AC_SUBST(LIBETPAN_CFLAGS)
976 AC_SUBST(LIBETPAN_LIBS)
977 AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP and/or NNTP support.)
979 AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/ ])
980 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
981 AC_MSG_ERROR([libetpan 0.57 not found])
986 AM_CONDITIONAL(CLAWS_LIBETPAN, test "x$libetpan_result" = "xyes")
989 AC_MSG_CHECKING([whether to use librsvg])
990 if test x"$enable_svg" = xyes; then
992 PKG_CHECK_MODULES([SVG], [librsvg-2.0 >= 2.39.0 cairo >= 1.0.0],
996 AC_DEFINE(HAVE_SVG, 1, [Define if librsvg2 is available for SVG support])
1000 AC_MSG_NOTICE([SVG support deactivated as librsvg2 >= 2.39.0 was not found])
1007 AC_MSG_CHECKING([whether to use valgrind])
1008 if test x$enable_valgrind = xyes; then
1010 PKG_CHECK_MODULES([VALGRIND], [valgrind >= 2.4.0],
1012 AC_DEFINE(HAVE_VALGRIND, 1, Define if you want valgrind support)
1016 AC_MSG_NOTICE([valgrind support deactivated as valgrind >= 2.4.0 was not found])
1022 AM_CONDITIONAL(CLAWS_VALGRIND, test x"$enable_valgrind" = x"yes")
1024 AC_MSG_CHECKING([whether to build unit tests])
1025 if test x$enable_tests = xyes; then
1030 AM_CONDITIONAL(BUILD_TESTS, test "x$enable_tests" = "xyes")
1032 dnl ==================================
1033 dnl section for additional debug calls
1034 dnl ==================================
1036 more_debug_output_modules=""
1038 AC_MSG_CHECKING([whether to build addressbook with more debug calls])
1039 if test x$enable_more_addressbook_debug = xyes; then
1040 more_debug_output_modules="$more_debug_output_modules AddressBook"
1042 AC_DEFINE(DEBUG_ADDRBOOK, 1, [Define if you want additional addressbook debug calls])
1047 AC_MSG_CHECKING([whether to build LDAP with more debug calls])
1048 if test x$enable_more_ldap_debug = xyes; then
1049 more_debug_output_modules="$more_debug_output_modules LDAP"
1051 AC_DEFINE(DEBUG_LDAP, 1, [Define if you want additional LDAP debug calls])
1056 AC_MSG_CHECKING([whether to build archive plugin with more debug calls])
1057 if test x$enable_more_archive_debug = xyes; then
1058 more_debug_output_modules="$more_debug_output_modules ArchivePlugin"
1060 AC_DEFINE(DEBUG_ARCHIVE, 1, [Define if you want additional archive plugin debug calls])
1065 dnl *************************
1066 dnl ** section for plugins **
1067 dnl *************************
1071 MISSING_DEPS_PLUGINS=""
1073 dnl First we set the enabled status - either enabled (yes), auto-enabled (auto)
1074 dnl or (auto-)disabled (no for both)
1076 dnl All plugins are auto-enabled except for Demo which is just there to help
1077 dnl potential plugins writers.
1079 AC_ARG_ENABLE(acpi_notifier-plugin,
1080 [ --disable-acpi_notifier-plugin Do not build acpi_notifier plugin],
1081 [enable_acpi_notifier_plugin=$enableval], [enable_acpi_notifier_plugin=auto])
1083 AC_ARG_ENABLE(address_keeper-plugin,
1084 [ --disable-address_keeper-plugin Do not build address_keeper plugin],
1085 [enable_address_keeper_plugin=$enableval], [enable_address_keeper_plugin=auto])
1087 AC_ARG_ENABLE(archive-plugin,
1088 [ --disable-archive-plugin Do not build archive plugin],
1089 [enable_archive_plugin=$enableval], [enable_archive_plugin=auto])
1091 AC_ARG_ENABLE(att_remover-plugin,
1092 [ --disable-att_remover-plugin Do not build att_remover plugin],
1093 [enable_att_remover_plugin=$enableval], [enable_att_remover_plugin=auto])
1095 AC_ARG_ENABLE(attachwarner-plugin,
1096 [ --disable-attachwarner-plugin Do not build attachwarner plugin],
1097 [enable_attachwarner_plugin=$enableval], [enable_attachwarner_plugin=auto])
1099 AC_ARG_ENABLE(bogofilter-plugin,
1100 [ --disable-bogofilter-plugin Do not build bogofilter plugin],
1101 [enable_bogofilter_plugin=$enableval], [enable_bogofilter_plugin=auto])
1103 AC_ARG_ENABLE(bsfilter-plugin,
1104 [ --disable-bsfilter-plugin Do not build bsfilter plugin],
1105 [enable_bsfilter_plugin=$enableval], [enable_bsfilter_plugin=auto])
1107 AC_ARG_ENABLE(clamd-plugin,
1108 [ --disable-clamd-plugin Do not build clamd plugin],
1109 [enable_clamd_plugin=$enableval], [enable_clamd_plugin=auto])
1111 AC_ARG_ENABLE(dillo-plugin,
1112 [ --disable-dillo-plugin Do not build dillo plugin],
1113 [enable_dillo_plugin=$enableval], [enable_dillo_plugin=auto])
1115 AC_ARG_ENABLE(fancy-plugin,
1116 [ --disable-fancy-plugin Do not build fancy plugin],
1117 [enable_fancy_plugin=$enableval], [enable_fancy_plugin=auto])
1119 AC_ARG_ENABLE(fetchinfo-plugin,
1120 [ --disable-fetchinfo-plugin Do not build fetchinfo plugin],
1121 [enable_fetchinfo_plugin=$enableval], [enable_fetchinfo_plugin=auto])
1123 AC_ARG_ENABLE(keyword_warner-plugin,
1124 [ --disable-keyword_warner-plugin Do not build keyword_warner plugin],
1125 [enable_keyword_warner_plugin=$enableval], [enable_keyword_warner_plugin=auto])
1127 AC_ARG_ENABLE(libravatar-plugin,
1128 [ --disable-libravatar-plugin Do not build libravatar plugin],
1129 [enable_libravatar_plugin=$enableval], [enable_libravatar_plugin=auto])
1131 AC_ARG_ENABLE(litehtml_viewer-plugin,
1132 [ --disable-litehtml_viewer-plugin Do not build litehtml_viewer plugin],
1133 [enable_litehtml_viewer_plugin=$enableval], [enable_litehtml_viewer_plugin=auto])
1135 AC_ARG_ENABLE(mailmbox-plugin,
1136 [ --disable-mailmbox-plugin Do not build mailmbox plugin],
1137 [enable_mailmbox_plugin=$enableval], [enable_mailmbox_plugin=auto])
1139 AC_ARG_ENABLE(managesieve-plugin,
1140 [ --disable-managesieve-plugin Do not build managesieve plugin],
1141 [enable_managesieve_plugin=$enableval], [enable_managesieve_plugin=auto])
1143 AC_ARG_ENABLE(newmail-plugin,
1144 [ --disable-newmail-plugin Do not build newmail plugin],
1145 [enable_newmail_plugin=$enableval], [enable_newmail_plugin=auto])
1147 AC_ARG_ENABLE(notification-plugin,
1148 [ --disable-notification-plugin Do not build notification plugin],
1149 [enable_notification_plugin=$enableval], [enable_notification_plugin=auto])
1151 AC_ARG_ENABLE(pdf_viewer-plugin,
1152 [ --disable-pdf_viewer-plugin Do not build pdf_viewer plugin],
1153 [enable_pdf_viewer_plugin=$enableval], [enable_pdf_viewer_plugin=auto])
1155 AC_ARG_ENABLE(perl-plugin,
1156 [ --disable-perl-plugin Do not build perl plugin],
1157 [enable_perl_plugin=$enableval], [enable_perl_plugin=auto])
1159 AC_ARG_ENABLE(python-plugin,
1160 [ --disable-python-plugin Do not build python plugin],
1161 [enable_python_plugin=$enableval], [enable_python_plugin=auto])
1163 AC_ARG_ENABLE(pgpcore-plugin,
1164 [ --disable-pgpcore-plugin Do not build pgpcore plugin],
1165 [enable_pgpcore_plugin=$enableval], [enable_pgpcore_plugin=auto])
1167 AC_ARG_ENABLE(pgpmime-plugin,
1168 [ --disable-pgpmime-plugin Do not build pgpmime plugin],
1169 [enable_pgpmime_plugin=$enableval], [enable_pgpmime_plugin=auto])
1171 AC_ARG_ENABLE(pgpinline-plugin,
1172 [ --disable-pgpinline-plugin Do not build pgpinline plugin],
1173 [enable_pgpinline_plugin=$enableval], [enable_pgpinline_plugin=auto])
1175 AC_ARG_ENABLE(rssyl-plugin,
1176 [ --disable-rssyl-plugin Do not build rssyl plugin],
1177 [enable_rssyl_plugin=$enableval], [enable_rssyl_plugin=auto])
1179 AC_ARG_ENABLE(smime-plugin,
1180 [ --disable-smime-plugin Do not build smime plugin],
1181 [enable_smime_plugin=$enableval], [enable_smime_plugin=auto])
1183 AC_ARG_ENABLE(spamassassin-plugin,
1184 [ --disable-spamassassin-plugin Do not build spamassassin plugin],
1185 [enable_spamassassin_plugin=$enableval], [enable_spamassassin_plugin=auto])
1187 AC_ARG_ENABLE(spam_report-plugin,
1188 [ --disable-spam_report-plugin Do not build spam_report plugin],
1189 [enable_spam_report_plugin=$enableval], [enable_spam_report_plugin=auto])
1191 AC_ARG_ENABLE(tnef_parse-plugin,
1192 [ --disable-tnef_parse-plugin Do not build tnef_parse plugin],
1193 [enable_tnef_parse_plugin=$enableval], [enable_tnef_parse_plugin=auto])
1195 AC_ARG_ENABLE(vcalendar-plugin,
1196 [ --disable-vcalendar-plugin Do not build vcalendar plugin],
1197 [enable_vcalendar_plugin=$enableval], [enable_vcalendar_plugin=auto])
1199 dnl disabled by default
1200 AC_ARG_ENABLE(demo-plugin,
1201 [ --enable-demo-plugin Build demo plugin],
1202 [enable_demo_plugin=$enableval], [enable_demo_plugin=no])
1205 dnl Then we check (unconditionnaly) for plugins dependencies
1206 dnl Some dependencies are optional, some mandatory. This is taken care of
1209 dnl During this dependancy check we do the checks themselves, define HAVE_X to
1210 dnl either yes or no, and do the AC_SUBST calls.
1212 dnl Archive: libarchive
1213 dnl Fancy: Webkit, curl, optionally libsoup-gnome
1214 dnl Litehtml a C++ compiler, glib, cairo, fontconfig, gumbo, curl
1215 dnl Libravatar: libcurl
1216 dnl Notification: optionally libnotify unity/messaging-menu
1217 dnl libcanberra_gtk3 hotkey
1218 dnl Pdf-Viewer: libpoppler
1220 dnl PGP/Core: libgpgme
1221 dnl PGP/Mime: pgpcore libgpgme
1222 dnl PGP/Inline: pgpcore libgpgme
1223 dnl S/Mime: pgpcore libgpgme
1225 dnl RSSyl: expat libcurl
1226 dnl SpamReport: libcurl
1227 dnl vCalendar: libcurl, libical
1228 dnl tnef_parse: libytnef
1230 dnl libcurl ********************************************************************
1231 PKG_CHECK_MODULES(CURL, libcurl, HAVE_CURL=yes, HAVE_CURL=no)
1233 AC_SUBST(CURL_CFLAGS)
1235 dnl expat **********************************************************************
1236 PKG_CHECK_MODULES(EXPAT, expat, HAVE_EXPAT=yes, HAVE_EXPAT=no)
1238 if test x"$HAVE_EXPAT" = xno; then
1239 AC_CHECK_HEADER(expat.h, [expat_header=yes], [expat_header=no])
1240 AC_CHECK_LIB(expat, XML_ParserCreate, [expat_lib=yes], [expat_lib=no])
1241 if test x"$expat_header" = xyes -a x"$expat_lib"=xyes; then
1244 EXPAT_LIBS="-lexpat"
1248 AC_SUBST(EXPAT_CFLAGS)
1249 AC_SUBST(EXPAT_LIBS)
1251 dnl webkit *********************************************************************
1252 PKG_CHECK_MODULES(WEBKIT, webkit2gtk-4.1, HAVE_WEBKIT=yes, HAVE_WEBKIT=no)
1253 if test x"$HAVE_WEBKIT" = xno; then
1254 PKG_CHECK_MODULES(WEBKIT, webkit2gtk-4.0 >= 2.18.0, HAVE_WEBKIT=yes, HAVE_WEBKIT=no)
1256 AC_SUBST(WEBKIT_LIBS)
1257 AC_SUBST(WEBKIT_CFLAGS)
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
1266 AC_SUBST(ARCHIVE_LIBS,$ARCHIVE_CFLAGS),
1270 dnl cairo **********************************************************************
1271 PKG_CHECK_MODULES(CAIRO, cairo >= 1.12.0, HAVE_CAIRO=yes, HAVE_CAIRO=no)
1272 AC_SUBST(CAIRO_CFLAGS)
1273 AC_SUBST(CAIRO_LIBS)
1275 dnl fontconfig *****************************************************************
1276 PKG_CHECK_MODULES(FONTCONFIG, fontconfig, HAVE_FONTCONFIG=yes, HAVE_FONTCONFIG=no)
1277 AC_SUBST(FONTCONFIG_CFLAGS)
1278 AC_SUBST(FONTCONFIG_LIBS)
1280 dnl gumbo **********************************************************************
1281 PKG_CHECK_MODULES(LIBGUMBO, gumbo >= 0.12, HAVE_LIBGUMBO=yes, HAVE_LIBGUMBO=no)
1282 if test x"$HAVE_LIBGUMBO" = xno; then
1283 if test x"$enable_litehtml_viewer_plugin" = xyes; then
1284 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
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>])
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
1325 if test x"$HAVE_PERL" = xyes; then
1326 AC_MSG_CHECKING(for perl module ExtUtils::Embed)
1327 PERL_MOD_EXT_UTILS_EMBED=no
1328 if perl -MExtUtils::Embed; then
1330 PERL_MOD_EXT_UTILS_EMBED=yes
1335 if test x"$PERL_MOD_EXT_UTILS_EMBED" = xyes; then
1336 AC_MSG_CHECKING(for Perl compile flags)
1337 PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
1338 PERL_CFLAGS=`echo $PERL_CFLAGS | sed 's/-D_FILE_OFFSET_BITS=[[0-9]]*//'`
1339 PERL_LDFLAGS=`perl -MExtUtils::Embed -e ldopts |sed 's/-lgdbm\>//'`
1340 PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-ldb\>//'`
1341 PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-lndbm\>//'`
1342 PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-lc\>//'`
1344 AC_MSG_NOTICE([Adding perl LIBS ${PERL_CFLAGS}])
1347 if test x"$HAVE_PERL" = xyes; then
1348 AC_CHECK_LIB(perl,perl_alloc,[AC_DEFINE(HAVE_LIBPERL, 1, Check for libperl.)],
1349 [ HAVE_LIBPERL=no ])
1352 if test x"$HAVE_LIBPERL" = xno; then
1353 if test x"$PERL_MOD_EXT_UTILS_EMBED" = xyes; then
1354 LIBPERL_PREFIX=`perl -MExtUtils::Embed -e perl_inc`
1355 LIBPERL_PREFIX=`echo $LIBPERL_PREFIX |sed 's/-I//'`
1356 AC_MSG_CHECKING([for libperl.so])
1357 if test -f "$LIBPERL_PREFIX/libperl.so"; then
1367 AC_SUBST(PERL_CFLAGS)
1368 AC_SUBST(PERL_LDFLAGS)
1371 dnl Gpgme **********************************************************************
1372 PKG_CHECK_MODULES(GPGME, [gpgme >= 1.1.1], HAVE_GPGME_PKGCONFIG=yes, HAVE_GPGME_PKGCONFIG=no)
1373 if test x"$HAVE_GPGME_PKGCONFIG" = xyes; then
1374 PKG_CHECK_MODULES(LIBGPG_ERROR, [gpg-error])
1376 AM_PATH_GPGME(1.1.1, HAVE_GPGME_CONFIG=yes, HAVE_GPGME_CONFIG=no)
1379 if test x"$HAVE_GPGME_PKGCONFIG" = xyes -o x"$HAVE_GPGME_CONFIG" = xyes; then
1380 AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.)
1386 dnl Python *********************************************************************
1387 PKG_CHECK_MODULES(PYTHON, python3, HAVE_PYTHON=yes, HAVE_PYTHON=no)
1388 PKG_CHECK_MODULES(PYTHONEMBED, python3-embed, HAVE_PYTHONEMBED=yes, HAVE_PYTHONEMBED=no)
1389 PKG_CHECK_MODULES(PYGOBJECT, pygobject-3.0, HAVE_PYGOBJ=yes, HAVE_PYGOBJ=no)
1391 AC_SUBST(PYTHON_SHARED_LIB)
1392 AC_SUBST(PYTHON_CFLAGS)
1393 AC_SUBST(PYTHON_LIBS)
1394 AC_SUBST(PYTHONEMBED_SHARED_LIB)
1395 AC_SUBST(PYTHONEMBED_CFLAGS)
1396 AC_SUBST(PYTHONEMBED_LIBS)
1397 AC_SUBST(PYGOBJECT_CFLAGS)
1398 AC_SUBST(PYGOBJECT_LIBS)
1400 dnl libnotify ******************************************************************
1401 PKG_CHECK_MODULES(libnotify, libnotify >= 0.4.3, HAVE_LIBNOTIFY=yes, HAVE_LIBNOTIFY=no)
1402 if test x"$HAVE_LIBNOTIFY" = xyes; then
1403 AC_DEFINE(HAVE_LIBNOTIFY, 1, [Define if libnotify support is enabled])
1405 AC_SUBST(libnotify_CFLAGS)
1406 AC_SUBST(libnotify_LIBS)
1408 dnl libcanberra-gtk3 ************************************************************
1409 PKG_CHECK_MODULES(libcanberra_gtk3, libcanberra-gtk3, HAVE_LIBCANBERRA_GTK=yes, HAVE_LIBCANBERRA_GTK=no)
1410 if test x"$HAVE_LIBCANBERRA_GTK" = xyes; then
1411 AC_DEFINE(HAVE_LIBCANBERRA_GTK, 1, [Define if libcanberra-gtk3 support is enabled])
1413 AC_SUBST(libcanberra_gtk3_CFLAGS)
1414 AC_SUBST(libcanberra_gtk3_LIBS)
1416 dnl unity/messaging-menu *******************************************************
1417 PKG_CHECK_MODULES(unity, unity messaging-menu, HAVE_UNITY=yes, HAVE_UNITY=no)
1418 if test x"$HAVE_UNITY" = xyes; then
1419 AC_DEFINE(NOTIFICATION_INDICATOR, 1, [Activate support for unity and messaging-menu])
1421 AC_SUBST(unity_CFLAGS)
1422 AC_SUBST(unity_LIBS)
1424 dnl hotkeys ********************************************************************
1425 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)
1426 if test x"$HAVE_HOTKEYS" = xyes; then
1427 AC_DEFINE(NOTIFICATION_HOTKEYS, 1, Activate support for global hotkeys)
1429 AC_SUBST(CM_NP_HOTKEY_CFLAGS)
1430 AC_SUBST(CM_NP_HOTKEY_LIBS)
1432 dnl libytnef *******************************************************************
1436 # Check both ytnef.h and libytnef/ytnef.h, and adjust YTNEF_CFLAGS
1438 AC_CHECK_HEADER(ytnef.h, [have_ytnef=1], [have_ytnef=0])
1439 if test $have_ytnef -eq 0; then
1440 AC_CHECK_HEADER(libytnef/ytnef.h,
1442 YTNEF_CFLAGS="${YTNEF_CFLAGS} -DYTNEF_H_SUBDIR"],
1445 if test $have_ytnef -eq 1; then
1446 AC_MSG_CHECKING([how libytnef's SwapDDWord() should be called])
1447 # Now we have to figure out which libytnef version we're using,
1448 # based on whether SwapDDWord takes one argument or two.
1449 if test "x${YTNEF_CFLAGS}" = "x"; then
1450 ytnef_include="#include <ytnef.h>"
1452 ytnef_include="#include <libytnef/ytnef.h>"
1454 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
1455 ${ytnef_include}]], [[SwapDDWord(0, 0);]])],[have_ytnef=1],[have_ytnef=0])
1456 if test $have_ytnef -eq 0; then
1457 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
1458 ${ytnef_include}]], [[SwapDDWord(0);]])],[have_ytnef=1;
1459 YTNEF_CFLAGS="${YTNEF_CFLAGS} -DYTNEF_OLD_SWAPDDWORD"],[have_ytnef=0])
1461 if test $have_ytnef -eq 1; then
1462 YTNEF_LIBS="-lytnef"
1465 AC_MSG_RESULT(no idea, unsupported libytnef version?)
1468 AC_SUBST(YTNEF_CFLAGS)
1469 AC_SUBST(YTNEF_LIBS)
1471 dnl Third, we now cross the requested plugins and the available dependencies
1472 dnl If some dependencies are missing and the plugin was explicitely enabled,
1473 dnl we error out, else we only inform.
1475 AC_MSG_CHECKING([whether to build acpi_notifier plugin])
1476 if test x"$enable_acpi_notifier_plugin" != xno; then
1477 PLUGINS="$PLUGINS acpi_notifier"
1480 DISABLED_PLUGINS="$DISABLED_PLUGINS acpi_notifier"
1484 AC_MSG_CHECKING([whether to build address_keeper plugin])
1485 if test x"$enable_address_keeper_plugin" != xno; then
1486 PLUGINS="$PLUGINS address_keeper"
1489 DISABLED_PLUGINS="$DISABLED_PLUGINS address_keeper"
1493 AC_MSG_CHECKING([whether to build archive plugin])
1494 if test x"$enable_archive_plugin" != xno; then
1495 dependencies_missing=""
1497 if test x"$HAVE_ARCHIVE" = xno; then
1498 dependencies_missing="libarchive $dependencies_missing"
1501 if test x"$dependencies_missing" = x; then
1502 PLUGINS="$PLUGINS archive"
1504 elif test x"$enable_archive_plugin" = xauto; then
1506 AC_MSG_WARN("Plugin archive will not be built; missing $dependencies_missing")
1507 enable_archive_plugin=no
1508 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS archive"
1511 AC_MSG_ERROR("Plugin archive cannot be built; missing $dependencies_missing")
1514 DISABLED_PLUGINS="$DISABLED_PLUGINS archive"
1518 AC_MSG_CHECKING([whether to build att_remover plugin])
1519 if test x"$enable_att_remover_plugin" != xno; then
1520 PLUGINS="$PLUGINS att_remover"
1523 DISABLED_PLUGINS="$DISABLED_PLUGINS att_remover"
1527 AC_MSG_CHECKING([whether to build attachwarner plugin])
1528 if test x"$enable_attachwarner_plugin" != xno; then
1529 PLUGINS="$PLUGINS attachwarner"
1532 DISABLED_PLUGINS="$DISABLED_PLUGINS attachwarner"
1536 AC_MSG_CHECKING([whether to build bogofilter plugin])
1537 if test x"$enable_bogofilter_plugin" != xno; then
1538 PLUGINS="$PLUGINS bogofilter"
1541 DISABLED_PLUGINS="$DISABLED_PLUGINS bogofilter"
1545 AC_MSG_CHECKING([whether to build bsfilter plugin])
1546 if test x"$enable_bsfilter_plugin" != xno; then
1547 PLUGINS="$PLUGINS bsfilter"
1550 DISABLED_PLUGINS="$DISABLED_PLUGINS bsfilter"
1554 AC_MSG_CHECKING([whether to build clamd plugin])
1555 if test x"$enable_clamd_plugin" != xno; then
1556 PLUGINS="$PLUGINS clamd"
1559 DISABLED_PLUGINS="$DISABLED_PLUGINS clamd"
1563 AC_MSG_CHECKING([whether to build demo plugin])
1564 if test x"$enable_demo_plugin" != xno; then
1565 PLUGINS="$PLUGINS demo"
1568 DISABLED_PLUGINS="$DISABLED_PLUGINS demo"
1572 AC_MSG_CHECKING([whether to build Dillo plugin])
1573 if test x"$enable_dillo_plugin" != xno; then
1574 PLUGINS="$PLUGINS dillo"
1577 DISABLED_PLUGINS="$DISABLED_PLUGINS dillo"
1581 AC_MSG_CHECKING([whether to build fancy plugin])
1582 if test x"$enable_fancy_plugin" != xno; then
1583 dependencies_missing=""
1585 if test x"$HAVE_WEBKIT" = xno; then
1586 dependencies_missing="libwebkit2gtk-4.0 or greater $dependencies_missing"
1588 if test x"$HAVE_CURL" = xno; then
1589 dependencies_missing="libcurl $dependencies_missing"
1592 if test x"$dependencies_missing" = x; then
1593 PLUGINS="$PLUGINS fancy"
1595 elif test x"$enable_fancy_plugin" = xauto; then
1597 AC_MSG_WARN("Plugin fancy will not be built; missing $dependencies_missing")
1598 enable_fancy_plugin=no
1599 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS fancy"
1602 AC_MSG_ERROR("Plugin fancy cannot be built; missing $dependencies_missing")
1605 DISABLED_PLUGINS="$DISABLED_PLUGINS fancy"
1609 AC_MSG_CHECKING([whether to build fetchinfo plugin])
1610 if test x"$enable_fetchinfo_plugin" != xno; then
1611 PLUGINS="$PLUGINS fetchinfo"
1614 DISABLED_PLUGINS="$DISABLED_PLUGINS fetchinfo"
1618 AC_MSG_CHECKING([whether to build keyword_warner plugin])
1619 if test x"$enable_keyword_warner_plugin" != xno; then
1620 PLUGINS="$PLUGINS keyword_warner"
1623 DISABLED_PLUGINS="$DISABLED_PLUGINS keyword_warner"
1627 AC_MSG_CHECKING([whether to build libravatar plugin])
1628 if test x"$enable_libravatar_plugin" != xno; then
1629 dependencies_missing=""
1631 if test x"$HAVE_CURL" = xno; then
1632 dependencies_missing="libcurl $dependencies_missing"
1635 if test x"$dependencies_missing" = x; then
1636 PLUGINS="$PLUGINS libravatar"
1638 elif test x"$enable_libravatar_plugin" = xauto; then
1640 AC_MSG_WARN("Plugin libravatar will not be built; missing $dependencies_missing")
1641 enable_libravatar_plugin=no
1642 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS libravatar"
1645 AC_MSG_ERROR("Plugin libravatar cannot be built; missing $dependencies_missing")
1648 DISABLED_PLUGINS="$DISABLED_PLUGINS libravatar"
1652 AC_MSG_CHECKING([whether to build litehtml_viewer plugin])
1653 if test x"$enable_litehtml_viewer_plugin" != xno; then
1654 dependencies_missing=""
1656 if test x"$HAVE_CXX" = xno; then
1657 dependencies_missing="C++ compiler $dependencies_missing"
1659 if test x"$HAVE_CAIRO" = xno; then
1660 dependencies_missing="cairo $dependencies_missing"
1662 if test x"$HAVE_FONTCONFIG" = xno; then
1663 dependencies_missing="fontconfig $dependencies_missing"
1665 if test x"$HAVE_LIBGUMBO" = xno; then
1666 dependencies_missing="libgumbo $dependencies_missing"
1668 if test x"$HAVE_CURL" = xno; then
1669 dependencies_missing="libcurl $dependencies_missing"
1673 if test x"$dependencies_missing" = x; then
1674 PLUGINS="$PLUGINS litehtml_viewer"
1676 elif test x"$enable_litehtml_viewer_plugin" = xauto; then
1678 AC_MSG_WARN("Plugin litehtml_viewer will not be built; missing $dependencies_missing")
1679 enable_litehtml_viewer_plugin=no
1680 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS litehtml_viewer"
1683 AC_MSG_ERROR("Plugin litehtml_viewer cannot be built; missing $dependencies_missing")
1686 DISABLED_PLUGINS="$DISABLED_PLUGINS litehtml_viewer"
1690 AC_MSG_CHECKING([whether to build mailmbox plugin])
1691 if test x"$enable_mailmbox_plugin" != xno; then
1692 PLUGINS="$PLUGINS mailmbox"
1695 DISABLED_PLUGINS="$DISABLED_PLUGINS mailmbox"
1699 AC_MSG_CHECKING([whether to build managesieve plugin])
1700 if test x"$enable_managesieve_plugin" != xno; then
1701 PLUGINS="$PLUGINS managesieve"
1704 DISABLED_PLUGINS="$DISABLED_PLUGINS managesieve"
1708 AC_MSG_CHECKING([whether to build newmail plugin])
1709 if test x"$enable_newmail_plugin" != xno; then
1710 PLUGINS="$PLUGINS newmail"
1713 DISABLED_PLUGINS="$DISABLED_PLUGINS newmail"
1717 AC_MSG_CHECKING([whether to build notification plugin])
1718 if test x"$enable_notification_plugin" != xno; then
1719 PLUGINS="$PLUGINS notification"
1722 AC_DEFINE(NOTIFICATION_POPUP, 1, Activate notification popup)
1723 AC_DEFINE(NOTIFICATION_BANNER, 1, Activate notification banner)
1724 AC_DEFINE(NOTIFICATION_COMMAND, 1, Activate notification shell command)
1725 AC_DEFINE(NOTIFICATION_TRAYICON, 1, Activate notification trayicon)
1726 if test x"$platform_win32" = xno; then
1727 AC_DEFINE(NOTIFICATION_LCDPROC, 1, Activate lcdproc support)
1730 notification_features="banner command"
1731 notification_missing_dependencies=""
1732 if test x"$HAVE_HOTKEYS" = xyes; then
1733 notification_features="$notification_features hotkeys"
1735 notification_missing_dependencies="$notification_missing_dependencies hotkeys"
1737 notification_features="$notification_features lcdproc"
1738 if test x"$HAVE_UNITY" = xyes; then
1739 notification_features="$notification_features unity/messaging-menu"
1741 notification_missing_dependencies="$notification_missing_dependencies unity/messaging-menu"
1743 if test x"$HAVE_LIBNOTIFY" = xyes; then
1744 notification_features="$notification_features libnotify"
1746 notification_missing_dependencies="$notification_missing_dependencies libnotify"
1748 if test x"$HAVE_LIBCANBERRA_GTK" = xyes; then
1749 notification_features="$notification_features libcanberra-gtk3"
1751 notification_missing_dependencies="$notification_missing_dependencies libcanberra-gtk3"
1753 notification_features="$notification_features popup trayicon"
1755 DISABLED_PLUGINS="$DISABLED_PLUGINS notification"
1759 AC_MSG_CHECKING([whether to build pdf_viewer plugin])
1760 if test x"$enable_pdf_viewer_plugin" != xno; then
1761 dependencies_missing=""
1763 if test x"$HAVE_POPPLER" = xno; then
1764 dependencies_missing="libpoppler-glib $dependencies_missing"
1767 if test x"$dependencies_missing" = x; then
1768 PLUGINS="$PLUGINS pdf_viewer"
1770 elif test x"$enable_pdf_viewer_plugin" = xauto; then
1772 AC_MSG_WARN("Plugin pdf_viewer will not be built; missing $dependencies_missing")
1773 enable_pdf_viewer_plugin=no
1774 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pdf_viewer"
1777 AC_MSG_ERROR("Plugin pdf_viewer cannot be built; missing $dependencies_missing")
1780 DISABLED_PLUGINS="$DISABLED_PLUGINS pdf_viewer"
1784 AC_MSG_CHECKING([whether to build perl plugin])
1785 if test x"$enable_perl_plugin" != xno; then
1786 dependencies_missing=""
1788 if test x"$HAVE_LIBPERL" = xno; then
1789 dependencies_missing="libperl $dependencies_missing"
1791 if test x"$PERL_MOD_EXT_UTILS_EMBED" = xno; then
1792 dependencies_missing="ExtUtils::Embed $dependencies_missing"
1795 if test x"$dependencies_missing" = x; then
1796 PLUGINS="$PLUGINS perl"
1798 elif test x"$enable_perl_plugin" = xauto; then
1800 AC_MSG_WARN("Plugin perl will not be built; missing $dependencies_missing")
1801 enable_perl_plugin=no
1802 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS perl"
1805 AC_MSG_ERROR("Plugin perl cannot be built; missing $dependencies_missing")
1808 DISABLED_PLUGINS="$DISABLED_PLUGINS perl"
1812 AC_MSG_CHECKING([whether to build python plugin])
1813 if test x"$enable_python_plugin" != xno; then
1814 dependencies_missing=""
1816 if test x"$HAVE_PYTHON" = xno; then
1817 dependencies_missing="python3 $dependencies_missing"
1819 if test x"$HAVE_PYGOBJ" = xno; then
1820 dependencies_missing="pygobject-3.0 $dependencies_missing"
1823 if test x"$dependencies_missing" = x; then
1824 PLUGINS="$PLUGINS python"
1826 elif test x"$enable_python_plugin" = xauto; then
1828 AC_MSG_WARN("Plugin python will not be built; missing $dependencies_missing")
1829 enable_python_plugin=no
1830 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS python"
1833 AC_MSG_ERROR("Plugin python cannot be built; missing $dependencies_missing")
1836 DISABLED_PLUGINS="$DISABLED_PLUGINS python"
1840 AC_MSG_CHECKING([whether to build pgpcore plugin])
1841 if test x"$enable_pgpcore_plugin" != xno; then
1842 dependencies_missing=""
1844 if test x"$HAVE_GPGME" = xno; then
1845 dependencies_missing="libgpgme $dependencies_missing"
1848 if test x"$dependencies_missing" = x; then
1849 PLUGINS="$PLUGINS pgpcore"
1851 elif test x"$enable_pgpcore_plugin" = xauto; then
1853 AC_MSG_WARN("Plugin pgpcore will not be built; missing $dependencies_missing")
1854 enable_pgpcore_plugin=no
1855 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpcore"
1858 AC_MSG_ERROR("Plugin pgpcore cannot be built; missing $dependencies_missing")
1861 DISABLED_PLUGINS="$DISABLED_PLUGINS pgpcore"
1865 AC_MSG_CHECKING([whether to build pgpmime plugin])
1866 if test x"$enable_pgpmime_plugin" != xno; then
1867 dependencies_missing=""
1869 if test x"$HAVE_GPGME" = xno; then
1870 dependencies_missing="libgpgme $dependencies_missing"
1872 if test x"$enable_pgpcore_plugin" = xno; then
1873 dependencies_missing="pgpcore plugin $dependencies_missing"
1876 if test x"$dependencies_missing" = x; then
1877 PLUGINS="$PLUGINS pgpmime"
1879 elif test x"$enable_pgpmime_plugin" = xauto; then
1881 AC_MSG_WARN("Plugin pgpmime will not be built; missing $dependencies_missing")
1882 enable_pgpmime_plugin=no
1883 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpmime"
1886 AC_MSG_ERROR("Plugin pgpmime cannot be built; missing $dependencies_missing")
1889 DISABLED_PLUGINS="$DISABLED_PLUGINS pgpmime"
1893 AC_MSG_CHECKING([whether to build pgpinline plugin])
1894 if test x"$enable_pgpinline_plugin" != xno; then
1895 dependencies_missing=""
1897 if test x"$HAVE_GPGME" = xno; then
1898 dependencies_missing="libgpgme $dependencies_missing"
1900 if test x"$enable_pgpcore_plugin" = xno; then
1901 dependencies_missing="pgpcore plugin $dependencies_missing"
1904 if test x"$dependencies_missing" = x; then
1905 PLUGINS="$PLUGINS pgpinline"
1907 elif test x"$enable_pgpinline_plugin" = xauto; then
1909 AC_MSG_WARN("Plugin pgpinline will not be built; missing $dependencies_missing")
1910 enable_pgpinline_plugin=no
1911 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpinline"
1914 AC_MSG_ERROR("Plugin pgpinline cannot be built; missing $dependencies_missing")
1917 DISABLED_PLUGINS="$DISABLED_PLUGINS pgpinline"
1921 AC_MSG_CHECKING([whether to build rssyl plugin])
1922 if test x"$enable_rssyl_plugin" != xno; then
1923 dependencies_missing=""
1925 if test x"$HAVE_EXPAT" = xno; then
1926 dependencies_missing="expat $dependencies_missing"
1928 if test x"$HAVE_CURL" = xno; then
1929 dependencies_missing="libcurl $dependencies_missing"
1932 if test x"$dependencies_missing" = x; then
1933 PLUGINS="$PLUGINS rssyl"
1935 elif test x"$enable_rssyl_plugin" = xauto; then
1937 AC_MSG_WARN("Plugin rssyl will not be built; missing $dependencies_missing")
1938 enable_rssyl_plugin=no
1939 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS rssyl"
1942 AC_MSG_ERROR("Plugin rssyl cannot be built; missing $dependencies_missing")
1945 DISABLED_PLUGINS="$DISABLED_PLUGINS rssyl"
1949 AC_MSG_CHECKING([whether to build spamassassin plugin])
1950 if test x"$enable_spamassassin_plugin" != xno; then
1951 PLUGINS="$PLUGINS spamassassin"
1955 dnl check for zlib (optional)
1957 SPAMASSASSIN_CFLAGS=""
1958 SPAMASSASSIN_LIBS=""
1959 AC_CHECK_HEADER([zlib.h],
1960 [AC_DEFINE(HAVE_ZLIB_H,1,[optional zlib support for spamassassin plugin])]
1961 [spamassassin_zlib=1],
1962 [spamassassin_zlib=0])
1963 if test $spamassassin_zlib -eq 1; then
1964 AC_CHECK_LIB(z, deflate, [spamassassin_zlib=1], [spamassassin_zlib=0])
1965 AC_MSG_CHECKING([whether to build spamassassin plugin with zlib support])
1966 if test $spamassassin_zlib -eq 1; then
1968 SPAMASSASSIN_CFLAGS="-DHAVE_LIBZ"
1969 SPAMASSASSIN_LIBS="-lz"
1974 AC_SUBST(SPAMASSASSIN_CFLAGS)
1975 AC_SUBST(SPAMASSASSIN_LIBS)
1977 DISABLED_PLUGINS="$DISABLED_PLUGINS spamassassin"
1981 AC_MSG_CHECKING([whether to build smime plugin])
1982 if test x"$enable_smime_plugin" != xno; then
1983 dependencies_missing=""
1985 if test x"$HAVE_GPGME" = xno; then
1986 dependencies_missing="libgpgme $dependencies_missing"
1988 if test x"$enable_pgpcore_plugin" = xno; then
1989 dependencies_missing="pgpcore plugin $dependencies_missing"
1992 if test x"$dependencies_missing" = x; then
1993 PLUGINS="$PLUGINS smime"
1995 elif test x"$enable_smime_plugin" = xauto; then
1997 AC_MSG_WARN("Plugin smime will not be built; missing $dependencies_missing")
1998 enable_smime_plugin=no
1999 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS smime"
2002 AC_MSG_ERROR("Plugin smime cannot be built; missing $dependencies_missing")
2005 DISABLED_PLUGINS="$DISABLED_PLUGINS smime"
2009 AC_MSG_CHECKING([whether to build spam_report plugin])
2010 if test x"$enable_spam_report_plugin" != xno; then
2011 dependencies_missing=""
2013 if test x"$HAVE_CURL" = xno; then
2014 dependencies_missing="libcurl $dependencies_missing"
2017 if test x"$dependencies_missing" = x; then
2018 PLUGINS="$PLUGINS spam_report"
2020 elif test x"$enable_spam_report_plugin" = xauto; then
2022 AC_MSG_WARN("Plugin spam_report will not be built; missing $dependencies_missing")
2023 enable_spam_report_plugin=no
2024 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS spam_report"
2027 AC_MSG_ERROR("Plugin spam_report cannot be built; missing $dependencies_missing")
2030 DISABLED_PLUGINS="$DISABLED_PLUGINS spam_report"
2034 AC_MSG_CHECKING([whether to build tnef_parse plugin])
2035 if test x"$enable_tnef_parse_plugin" != xno; then
2036 dependencies_missing=""
2038 if test $have_ytnef -eq 0; then
2039 dependencies_missing="libytnef"
2042 if test x"$dependencies_missing" = x; then
2043 PLUGINS="$PLUGINS tnef_parse"
2045 elif test x"$enable_tnef_parse_plugin" = xauto; then
2047 AC_MSG_WARN(Plugin tnef_parse will not be built; missing $dependencies_missing")
2048 enable_tnef_parse_plugin=no
2049 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS tnef_parse"
2052 AC_MSG_ERROR(Plugin tnef_parse will not be built; missing $dependencies_missing")
2055 DISABLED_PLUGINS="$DISABLED_PLUGINS tnef_parse"
2060 AC_MSG_CHECKING([whether to build vcalendar plugin])
2061 if test x"$enable_vcalendar_plugin" != xno; then
2062 dependencies_missing=""
2064 if test x"$HAVE_CURL" = xno; then
2065 dependencies_missing="libcurl $dependencies_missing"
2068 if test x"$HAVE_LIBICAL" = xno; then
2069 dependencies_missing="libical $dependencies_missing"
2072 if test x"$HAVE_PERL" = xno; then
2073 dependencies_missing="perl $dependencies_missing"
2076 if test x"$dependencies_missing" = x; then
2077 PLUGINS="$PLUGINS vcalendar"
2079 elif test x"$enable_vcalendar_plugin" = xauto; then
2081 AC_MSG_WARN("Plugin vcalendar will not be built; missing $dependencies_missing")
2082 enable_vcalendar_plugin=no
2083 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS vcalendar"
2086 AC_MSG_ERROR("Plugin vcalendar cannot be built; missing $dependencies_missing")
2089 DISABLED_PLUGINS="$DISABLED_PLUGINS vcalendar"
2093 dnl And finally the automake conditionals.
2095 AM_CONDITIONAL(BUILD_ACPI_NOTIFIER_PLUGIN, test x"$enable_acpi_notifier_plugin" != xno)
2096 AM_CONDITIONAL(BUILD_ADDRESS_KEEPER_PLUGIN, test x"$enable_address_keeper_plugin" != xno)
2097 AM_CONDITIONAL(BUILD_ARCHIVE_PLUGIN, test x"$enable_archive_plugin" != xno)
2098 AM_CONDITIONAL(BUILD_ATT_REMOVER_PLUGIN, test x"$enable_att_remover_plugin" != xno)
2099 AM_CONDITIONAL(BUILD_ATTACHWARNER_PLUGIN, test x"$enable_attachwarner_plugin" != xno)
2100 AM_CONDITIONAL(BUILD_BOGOFILTER_PLUGIN, test x"$enable_bogofilter_plugin" != xno)
2101 AM_CONDITIONAL(BUILD_BSFILTER_PLUGIN, test x"$enable_bsfilter_plugin" != xno)
2102 AM_CONDITIONAL(BUILD_CLAMD_PLUGIN, test x"$enable_clamd_plugin" != xno)
2103 AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$enable_demo_plugin" != xno)
2104 AM_CONDITIONAL(BUILD_DILLO_PLUGIN, test x"$enable_dillo_plugin" != xno)
2105 AM_CONDITIONAL(BUILD_FANCY_PLUGIN, test x"$enable_fancy_plugin" != xno)
2106 AM_CONDITIONAL(BUILD_FETCHINFO_PLUGIN, test x"$enable_fetchinfo_plugin" != xno)
2107 AM_CONDITIONAL(BUILD_KEYWORD_WARNER_PLUGIN, test x"$enable_keyword_warner_plugin" != xno)
2108 AM_CONDITIONAL(BUILD_LIBRAVATAR_PLUGIN, test x"$enable_libravatar_plugin" != xno)
2109 AM_CONDITIONAL(BUILD_LITEHTML_VIEWER_PLUGIN, test x"$enable_litehtml_viewer_plugin" != xno)
2110 AM_CONDITIONAL(BUILD_MAILMBOX_PLUGIN, test x"$enable_mailmbox_plugin" != xno)
2111 AM_CONDITIONAL(BUILD_MANAGESIEVE_PLUGIN, test x"$enable_managesieve_plugin" != xno)
2112 AM_CONDITIONAL(BUILD_NEWMAIL_PLUGIN, test x"$enable_newmail_plugin" != xno)
2113 AM_CONDITIONAL(BUILD_NOTIFICATION_PLUGIN, test x"$enable_notification_plugin" != xno)
2114 AM_CONDITIONAL(BUILD_HOTKEYS, test x"$enable_notification_plugin" != xno -a x"$HAVE_HOTKEYS" = xyes)
2115 AM_CONDITIONAL(BUILD_PDF_VIEWER_PLUGIN, test x"$enable_pdf_viewer_plugin" != xno)
2116 AM_CONDITIONAL(BUILD_PERL_PLUGIN, test x"$enable_perl_plugin" != xno)
2117 AM_CONDITIONAL(BUILD_PYTHON_PLUGIN, test x"$enable_python_plugin" != xno)
2118 AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN, test x"$enable_pgpcore_plugin" != xno)
2119 AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN, test x"$enable_pgpmime_plugin" != xno)
2120 AM_CONDITIONAL(BUILD_PGPINLINE_PLUGIN, test x"$enable_pgpinline_plugin" != xno)
2121 AM_CONDITIONAL(BUILD_RSSYL_PLUGIN, test x"$enable_rssyl_plugin" != xno)
2122 AM_CONDITIONAL(BUILD_SMIME_PLUGIN, test x"$enable_smime_plugin" != xno)
2123 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$enable_spamassassin_plugin" != xno)
2124 AM_CONDITIONAL(BUILD_SPAM_REPORT_PLUGIN, test x"$enable_spam_report_plugin" != xno)
2125 AM_CONDITIONAL(BUILD_TNEF_PARSE_PLUGIN, test x"$enable_tnef_parse_plugin" != xno)
2126 AM_CONDITIONAL(BUILD_VCALENDAR_PLUGIN, test x"$enable_vcalendar_plugin" != xno)
2129 dnl ****************************
2130 dnl ** Final configure output **
2131 dnl ****************************
2136 src/common/version.h
2140 src/common/passcrypt.h
2141 src/common/tests/Makefile
2144 src/plugins/Makefile
2145 src/plugins/acpi_notifier/Makefile
2146 src/plugins/address_keeper/Makefile
2147 src/plugins/address_keeper/version.rc
2148 src/plugins/archive/Makefile
2149 src/plugins/att_remover/Makefile
2150 src/plugins/att_remover/version.rc
2151 src/plugins/attachwarner/Makefile
2152 src/plugins/attachwarner/version.rc
2153 src/plugins/bogofilter/Makefile
2154 src/plugins/bsfilter/Makefile
2155 src/plugins/bsfilter/version.rc
2156 src/plugins/clamd/Makefile
2157 src/plugins/clamd/libclamd/Makefile
2158 src/plugins/demo/Makefile
2159 src/plugins/dillo/Makefile
2160 src/plugins/fancy/Makefile
2161 src/plugins/fancy/version.rc
2162 src/plugins/fetchinfo/Makefile
2163 src/plugins/fetchinfo/version.rc
2164 src/plugins/keyword_warner/Makefile
2165 src/plugins/keyword_warner/version.rc
2166 src/plugins/litehtml_viewer/Makefile
2167 src/plugins/litehtml_viewer/version.rc
2168 src/plugins/litehtml_viewer/litehtml/Makefile
2169 src/plugins/libravatar/Makefile
2170 src/plugins/libravatar/version.rc
2171 src/plugins/mailmbox/Makefile
2172 src/plugins/mailmbox/version.rc
2173 src/plugins/managesieve/Makefile
2174 src/plugins/managesieve/version.rc
2175 src/plugins/newmail/Makefile
2176 src/plugins/notification/Makefile
2177 src/plugins/notification/version.rc
2178 src/plugins/notification/gtkhotkey/Makefile
2179 src/plugins/pdf_viewer/Makefile
2180 src/plugins/pdf_viewer/version.rc
2181 src/plugins/perl/Makefile
2182 src/plugins/perl/tools/Makefile
2183 src/plugins/python/Makefile
2184 src/plugins/python/examples/Makefile
2185 src/plugins/pgpcore/Makefile
2186 src/plugins/pgpcore/version.rc
2187 src/plugins/pgpmime/Makefile
2188 src/plugins/pgpmime/version.rc
2189 src/plugins/pgpinline/Makefile
2190 src/plugins/pgpinline/version.rc
2191 src/plugins/rssyl/Makefile
2192 src/plugins/rssyl/version.rc
2193 src/plugins/rssyl/tests/Makefile
2194 src/plugins/rssyl/libfeed/Makefile
2195 src/plugins/rssyl/libfeed/tests/Makefile
2196 src/plugins/smime/Makefile
2197 src/plugins/smime/version.rc
2198 src/plugins/spamassassin/Makefile
2199 src/plugins/spam_report/Makefile
2200 src/plugins/spam_report/version.rc
2201 src/plugins/tnef_parse/Makefile
2202 src/plugins/tnef_parse/version.rc
2203 src/plugins/vcalendar/Makefile
2204 src/plugins/vcalendar/version.rc
2215 dnl Output the configuration summary
2217 echo "$PACKAGE $VERSION"
2219 if test x"$enable_alternate_addressbook" = xyes; then
2220 echo "Using Address Book : Alternate experimental interface"
2222 echo "Using Address Book : Original stable interface"
2223 echo "JPilot : $enable_jpilot"
2224 echo "LDAP : $enable_ldap"
2226 echo "gnuTLS : $enable_gnutls"
2227 echo "OAuth2 : $enable_oauth2"
2228 echo "iconv : $am_cv_func_iconv"
2229 echo "compface : $enable_compface"
2230 echo "IPv6 : $enable_ipv6"
2231 echo "enchant : $enable_enchant"
2232 echo "IMAP4 : $enable_libetpan"
2233 echo "NNTP : $enable_libetpan"
2234 echo "Crash dialog : $enable_crash_dialog"
2235 echo "LibSM : $enable_libsm"
2236 echo "DBUS : $enable_dbus"
2237 echo "NetworkManager : $enable_networkmanager"
2238 echo "Manual : $enable_manual"
2239 echo "Generic UMPC code : $enable_generic_umpc"
2240 echo "SVG support : $enable_svg"
2241 echo "Config dir : $ac_cv_with_config_dir"
2242 echo "Password crypto : $pwd_crypto"
2243 echo "Unit tests : $enable_tests"
2245 if test -n "$more_debug_output_modules"; then
2246 echo "More debug output enabled for:"
2247 for module in $more_debug_output_modules; do
2254 for plugin in $PLUGINS; do
2256 if test x"$plugin" = xnotification; then
2258 for notif_feature in $notification_features; do
2259 echo " $notif_feature"
2261 if test "x$notification_missing_dependencies" != x; then
2262 echo " Disabled due to missing dependencies:"
2263 for notif_miss_dep in $notification_missing_dependencies; do
2264 echo " $notif_miss_dep"
2269 if test "x$DISABLED_PLUGINS" != x; then
2271 for plugin in $DISABLED_PLUGINS; do
2276 if test "x$MISSING_DEPS_PLUGINS" != x; then
2277 echo " Disabled due to missing dependencies:"
2278 for plugin in $MISSING_DEPS_PLUGINS; do
2283 echo "The binary will be installed in $prefix/bin"
2285 echo "Configure finished, type 'make' to build."