4 AC_CONFIG_SRCDIR([src/main.c])
5 AC_CONFIG_AUX_DIR(config)
6 AC_CONFIG_MACRO_DIR([m4])
16 if test \( -d .git \); then
17 AC_CHECK_PROG([GIT], [git], [yes], [no], [$PATH])
18 if test \( "$GIT" = "no" \); then
19 AC_MSG_ERROR([*** git not found. See http://git-scm.com/])
21 GIT_VERSION=`git describe --abbrev=6 --dirty --always`
22 echo "echo ${GIT_VERSION}" > ./version
25 GIT_VERSION=`sh -c ". $srcdir/version"`
28 if test \( -z "$GIT_VERSION" \); then
29 AC_MSG_ERROR([*** could not determine program version])
32 MAJOR_VERSION=${GIT_VERSION%%.*}
33 MINOR_VERSION=${GIT_VERSION#*.}
34 MINOR_VERSION=${MINOR_VERSION%%.*}
35 MICRO_VERSION=${GIT_VERSION##*.}
36 MICRO_VERSION=${MICRO_VERSION%%-*}
37 EXTRA_VERSION=${GIT_VERSION#*-}
38 EXTRA_VERSION=${EXTRA_VERSION%%-*}
40 if test \( "x$EXTRA_VERSION" != "x" -a `echo -n $EXTRA_VERSION | wc -c` -lt 5 \); then
41 VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}git${EXTRA_VERSION}
43 VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
47 if test \( "x$EXTRA_RELEASE" != "x" \); then
48 VERSION=${VERSION}${EXTRA_RELEASE}${EXTRA_GTK3_VERSION}
55 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
56 dnl AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
57 dnl AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
60 AC_SUBST(MAJOR_VERSION)
61 AC_SUBST(MINOR_VERSION)
62 AC_SUBST(MICRO_VERSION)
63 AC_SUBST(EXTRA_VERSION)
66 AC_CHECK_PROG(HAVE_GTK_ICON_CACHE, gtk-update-icon-cache, yes, no)
67 AM_CONDITIONAL(UPDATE_GTK_ICON_CACHE, test x"$HAVE_GTK_ICON_CACHE" = xyes)
69 dnl Require pkg-config
70 m4_ifndef([PKG_PROG_PKG_CONFIG],
71 [m4_fatal([Could not locate the pkg-config autoconf macros. These
72 are usually located in /usr/share/aclocal/pkg.m4. If your macros
73 are in a different location, try setting the environment variable
74 ACLOCAL_FLAGS before running ./autogen.sh or autoreconf again. E.g.:
75 export ACLOCAL_FLAGS="-I/other/macro/dir"])
79 dnl libtool versioning
80 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
81 LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
82 LT_REVISION=$INTERFACE_AGE
83 LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
89 dnl Specify a header configuration file
90 AC_CONFIG_HEADERS(config.h)
91 AC_CONFIG_HEADERS(claws-features.h)
94 AC_USE_SYSTEM_EXTENSIONS
96 dnl Checks for programs.
99 AC_SEARCH_LIBS([strerror],[cposix])
105 AC_PROG_LEX(noyywrap)
108 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
109 [AC_REQUIRE(AC_CANONICAL_HOST)_LT_SET_OPTION([LT_INIT],[win32-dll])
110 m4_warn([obsolete],[AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
111 put the 'win32-dll' option into LT_INIT's first parameter.])
116 LT_LANG([Windows Resource])
120 dnl AC_PROG_CXX will set CXX=g++ even if it finds no useable C++
121 dnl compiler, so we have to check whether the program named by
124 AC_PATH_PROG(REAL_CXX, $CXX)
126 if test -n "$REAL_CXX"; then
132 dnl ******************************
134 dnl Not needed anymore because we
135 dnl do AC_CANONICAL_TARGET above
136 dnl ******************************
137 dnl AC_CANONICAL_HOST
139 dnl Copied from the official gtk+-2 configure.in
140 AC_MSG_CHECKING([for host platform])
142 *-*-mingw*|*-*-cygwin*)
144 LDFLAGS="$LDFLAGS -mwindows -Wl,--export-all-symbols"
148 LDFLAGS="$LDFLAGS -Wl,-export_dynamic"
153 LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
156 AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = x"yes")
157 AM_CONDITIONAL(PLATFORM_OSX, test x"$platform_osx" = x"yes")
158 AC_MSG_RESULT([$host])
160 AC_MSG_CHECKING([for native Win32])
169 AC_MSG_RESULT([$os_win32])
170 AM_CONDITIONAL(OS_WIN32, test x"$os_win32" = x"yes")
172 AC_MSG_CHECKING([for Cygwin])
181 AC_MSG_RESULT([$env_cygwin])
182 AM_CONDITIONAL(CYGWIN, test x"$env_cygwin" = x"yes")
184 AC_MSG_CHECKING([for time_t format specifier])
185 _gcc_cflags_save=$CFLAGS
186 CFLAGS="-Wformat -Werror"
191 ]],[[printf("%lld", time(NULL));]])],
192 [time_t_long_long=yes],
193 [time_t_long_long=no])
194 CFLAGS=$_gcc_cflags_save
196 if test x"$time_t_long_long" = xyes; then
201 AC_MSG_RESULT([$time_t_fmt])
202 AC_DEFINE_UNQUOTED([CM_TIME_FORMAT], ["$time_t_fmt"],
203 [Define printf format specifier for time_t])
206 if test $USE_MAINTAINER_MODE = yes; then
207 AM_CFLAGS="$AM_CFLAGS -g"
210 AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
211 _gcc_cflags_save=$CFLAGS
212 CFLAGS="-Wno-pointer-sign"
213 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],_gcc_psign=yes,_gcc_psign=no)
214 AC_MSG_RESULT($_gcc_psign)
215 CFLAGS=$_gcc_cflags_save;
216 if test x"$_gcc_psign" = xyes ; then
217 AM_CFLAGS="$AM_CFLAGS -Wno-pointer-sign"
223 AM_CFLAGS="$AM_CFLAGS -no-cpp-precomp -fno-common"
226 # Note that we need to link to pthread in all cases. This
227 # is because some locking is used even when pthread support is
230 AM_CFLAGS="$AM_CFLAGS -mms-bitfields"
231 LIBS="$LIBS -l${pthread_name} -lws2_32 -lregex"
234 AM_CFLAGS="$AM_CFLAGS -std=gnu99"
235 AC_DEFINE([SOLARIS], [], [Target is Solaris])
244 dnl floor and ceil are in -lm
248 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
251 LIBS="$LIBS $GTK_LIBS"
252 AC_CHECK_FUNCS(bind_textdomain_codeset)
256 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"
257 GETTEXT_PACKAGE=claws-mail
258 AC_SUBST(GETTEXT_PACKAGE)
259 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
261 AM_GNU_GETTEXT_VERSION([0.18])
262 AM_GNU_GETTEXT([external])
264 AC_ARG_ENABLE(manual,
265 [ --disable-manual Do not build user manual],
266 [enable_manual=$enableval], [enable_manual=yes])
269 [ --disable-libsm Do not build libSM support for session management],
270 [enable_libsm=$enableval], [enable_libsm=yes])
273 [ --disable-ipv6 Do not build IPv6 support],
274 [enable_ipv6=$enableval], [enable_ipv6=yes])
276 AC_ARG_ENABLE(gnutls,
277 [ --disable-gnutls Do not build GnuTLS support for TLS],
278 [enable_gnutls=$enableval], [enable_gnutls=yes])
280 AC_ARG_ENABLE(enchant,
281 [ --disable-enchant Do not build Enchant support for spell-checking],
282 [enable_enchant=$enableval], [enable_enchant=yes])
284 AC_ARG_ENABLE(crash-dialog,
285 [ --enable-crash-dialog Build crash dialog],
286 [enable_crash_dialog=$enableval], [enable_crash_dialog=no])
288 AC_ARG_ENABLE(generic-umpc,
289 [ --enable-generic-umpc Build generic UMPC code],
290 [enable_generic_umpc=$enableval], [enable_generic_umpc=no])
292 AC_ARG_ENABLE(compface,
293 [ --disable-compface Do not build compface support for X-Face],
294 [enable_compface=$enableval], [enable_compface=yes])
296 AC_ARG_ENABLE(pthread,
297 [ --disable-pthread Do not build pthread support],
298 [enable_pthread=$enableval], [enable_pthread=yes])
300 AC_ARG_ENABLE(startup-notification,
301 [ --disable-startup-notification Do not startup notification support],
302 [enable_startup_notification=$enableval], [enable_startup_notification=yes])
305 [ --disable-dbus Do not build DBUS support],
306 [enable_dbus=$enableval], [enable_dbus=yes])
309 [ --disable-ldap Do not build LDAP support],
310 [enable_ldap=$enableval], [enable_ldap=yes])
312 AC_ARG_ENABLE(jpilot,
313 [ --disable-jpilot Do not build JPilot support],
314 [enable_jpilot=$enableval], [enable_jpilot=yes])
316 AC_ARG_ENABLE(networkmanager,
317 [ --disable-networkmanager Do not build NetworkManager support],
318 [enable_networkmanager=$enableval], [enable_networkmanager=yes])
320 AC_ARG_ENABLE(libetpan,
321 [ --disable-libetpan Do not build libetpan support for IMAP4/NNTP],
322 [enable_libetpan=$enableval], [enable_libetpan=yes])
324 AC_ARG_ENABLE(valgrind,
325 [ --disable-valgrind Do not build valgrind support for debugging],
326 [enable_valgrind=$enableval], [enable_valgrind=yes])
328 AC_ARG_ENABLE(alternate-addressbook,
329 [ --enable-alternate-addressbook Build alternate external address book support],
330 [enable_alternate_addressbook=$enableval], [enable_alternate_addressbook=no])
333 [ --disable-svg Do not build SVG support],
334 [enable_svg=$enableval], [enable_svg=yes])
337 [ --enable-tests Build unit tests],
338 [enable_tests=$enableval], [enable_tests=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 Check for d_type member in struct dirent
416 AC_MSG_CHECKING([whether struct dirent has d_type member])
417 AC_CACHE_VAL(ac_cv_dirent_d_type,[
418 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])
420 AC_MSG_RESULT($ac_cv_dirent_d_type)
421 if test $ac_cv_dirent_d_type = yes; then
422 AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
423 Define if `struct dirent' has `d_type' member.)
426 # Check whether mkdir does not take the permission argument.
427 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
429 dnl Checks for header files.
433 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
434 sys/param.h sys/utsname.h sys/select.h \
435 wchar.h wctype.h locale.h netdb.h)
436 AC_CHECK_HEADER([execinfo.h], [AC_DEFINE(HAVE_BACKTRACE,1,[Has backtrace*() needed for retrieving stack traces])])
437 AC_SEARCH_LIBS(backtrace_symbols, [execinfo])
439 dnl Checks for typedefs, structures, and compiler characteristics.
446 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
447 AC_CHECK_SIZEOF(unsigned short, 2)
448 AC_CHECK_SIZEOF(unsigned int, 4)
449 AC_CHECK_SIZEOF(unsigned long, 4)
451 dnl Checks for library functions.
453 AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr strcasestr \
454 uname flock lockf inet_aton inet_addr \
455 fchmod mkstemp truncate getuid regcomp)
457 AC_CHECK_FUNCS(fgets_unlocked fgetc_unlocked fputs_unlocked fputc_unlocked fread_unlocked fwrite_unlocked feof_unlocked ferror_unlocked fmemopen)
459 dnl *****************
460 dnl ** common code **
461 dnl *****************
464 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.36 gmodule-2.0 >= 2.36 gobject-2.0 >= 2.36 gthread-2.0 >= 2.36])
466 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
467 AC_SUBST(GLIB_GENMARSHAL)
469 AC_SUBST(GLIB_CFLAGS)
472 PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0 >= 2.26])
474 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
476 LIBS="$LIBS $GTK_LIBS"
477 AC_CHECK_FUNCS(bind_textdomain_codeset)
480 dnl check for IPv6 option
481 dnl automated checks for IPv6 support.
482 AC_MSG_CHECKING([whether to use IPv6])
483 if test x"$enable_ipv6" = xyes; then
485 AC_MSG_CHECKING([for IPv6 support])
486 if test x"$platform_win32" = xyes; then
487 AC_CACHE_VAL(ac_cv_ipv6,[
488 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
489 #include <ws2tcpip.h>
490 ]], [[struct in6_addr a;]])],[ac_cv_ipv6=yes],[ac_cv_ipv6=no])
493 AC_CACHE_VAL(ac_cv_ipv6,[
494 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
496 #include <sys/types.h>
497 #include <netinet/in.h>
498 ]], [[int x = IPPROTO_IPV6; struct in6_addr a;]])],[ac_cv_ipv6=yes],[ac_cv_ipv6=no])
501 AC_MSG_RESULT($ac_cv_ipv6)
502 if test $ac_cv_ipv6 = yes; then
503 AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
505 AC_MSG_WARN(*** IPv6 will not be supported ***)
513 AC_MSG_CHECKING([whether to use GnuTLS])
514 AC_MSG_RESULT($enable_gnutls)
515 if test "x$enable_gnutls" != "xno"; then
516 PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.2,
518 AC_DEFINE(USE_GNUTLS, 1, gnutls)
519 echo "Building with GnuTLS"
520 PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.11,
522 dnl No linking against libgcrypt needed
525 dnl linking against libgcrypt *is* needed
526 GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt"
530 echo "Building without GnuTLS"
531 AC_MSG_RESULT([*** GnuTLS support is recommended ])
532 AC_MSG_RESULT([*** You can use --disable-gnutls if you don't need it.])
533 AC_MSG_ERROR([GnuTLS not found])
535 AC_SUBST(GNUTLS_LIBS)
536 AC_SUBST(GNUTLS_CFLAGS)
539 PKG_CHECK_MODULES(NETTLE, nettle)
540 AC_SUBST(NETTLE_LIBS)
542 AC_ARG_WITH(passcrypt-key, [ --with-passcrypt-key=KEY Key used to encode passwords (8 byte string)],
543 with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
544 AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
546 dnl RC dir (will be default at a certain point in time)
547 AC_ARG_WITH(config-dir, [ --with-config-dir=RCDIR Local configuration dir (default: .claws-mail)],
548 ac_cv_with_config_dir="$withval", ac_cv_with_config_dir="")
550 dnl Set correct default value based on platform
551 if test x"$ac_cv_with_config_dir" = x""; then
552 if test x"$platform_win32" = xyes; then
553 ac_cv_with_config_dir="Claws-mail"
555 ac_cv_with_config_dir=".claws-mail"
558 AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
560 AC_ARG_WITH(password-encryption, [ --with-password-encryption=PROVIDER Which cryptographic library to use for encrypting stored passwords (gnutls, old, default)],
561 pwd_crypto="$withval", pwd_crypto="default")
563 if test x"$pwd_crypto" = xdefault; then
564 if test x"$enable_gnutls" = xyes; then
565 if `$PKG_CONFIG --atleast-version=3.0 gnutls`; then
570 if test x"$pwd_crypto" = xdefault; then
576 if test x"$enable_gnutls" = xno; then
577 AC_MSG_ERROR([GnuTLS password encryption requested but GnuTLS is not available.])
579 if ! `$PKG_CONFIG --atleast-version=3.0 gnutls`; then
580 AC_MSG_ERROR([GnuTLS version at least 3.0 is required for password encryption.])
582 AC_DEFINE(PASSWORD_CRYPTO_GNUTLS, 1, Use GnuTLS for stored password encryption)
585 AC_DEFINE(PASSWORD_CRYPTO_OLD, 1, Use old insecure method for stored password encryption)
588 AC_MSG_ERROR([Unknown password encryption provider requested.])
593 dnl ************************
594 dnl ** GTK user interface **
595 dnl ************************
598 PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.20 cairo)
600 AC_ARG_ENABLE(deprecated,
601 [ --disable-deprecated Disable deprecated GTK functions],
602 gtkdeprecated=$enableval)
603 AC_MSG_CHECKING([whether to use deprecated GTK functions])
604 if test x"$gtkdeprecated" != xno; then
607 GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
611 dnl Make sure the code does not regress to using deprecated GTK stuff...
612 GTK_CFLAGS="$GTK_CFLAGS -DGTK_DISABLE_SINGLE_INCLUDES -DGSEAL_ENABLE"
617 dnl enchant is used for spell checking
618 AC_MSG_CHECKING([whether to use enchant])
619 AC_MSG_RESULT($enable_enchant)
620 if test $enable_enchant = yes; then
621 PKG_CHECK_MODULES(ENCHANT, enchant >= 1.4.0,
623 AC_DEFINE(USE_ENCHANT, 1, enchant)
624 echo "Building with enchant"
628 PKG_CHECK_MODULES(ENCHANT, enchant-2 >= 2.0.0,
630 AC_DEFINE(USE_ENCHANT, 1, enchant-2)
631 echo "Building with enchant-2"
635 echo "Building without enchant-notification"
639 AC_SUBST(ENCHANT_CFLAGS)
640 AC_SUBST(ENCHANT_LIBS)
643 dnl want crash dialog
644 if test $enable_crash_dialog = yes; then
645 dnl check if GDB is somewhere
646 AC_CHECK_PROG(enable_crash_dialog, gdb, yes, no)
647 AC_MSG_CHECKING([whether to use crash dialog])
648 if test $enable_crash_dialog = yes; then
649 AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
651 AC_MSG_RESULT($enable_crash_dialog)
655 if test $enable_generic_umpc = yes; then
656 AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
657 AC_MSG_RESULT($enable_generic_umpc)
660 dnl Check for X-Face support
661 AC_MSG_CHECKING([whether to use compface])
662 if test x"$enable_compface" = xyes; then
664 AC_CHECK_LIB(compface, uncompface,
665 [AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)],
666 [enable_compface=no])
667 if test x"$enable_compface" = xyes; then
668 COMPFACE_LIBS="-lcompface"
672 AC_SUBST(COMPFACE_LIBS)
677 dnl check for pthread support
678 AC_MSG_CHECKING([whether to use pthread])
679 if test x$enable_pthread = xno; then
684 # For W32 we need to use a special ptrhead lib. In this case we can't
685 # use AC_CHECK_LIB because it has no means of checking for a
686 # library installed under a different name. Checking for the
688 if test -n "${pthread_name}" ; then
691 AC_CHECK_LIB(pthread, pthread_create, :, enable_pthread=no)
693 AC_CHECK_HEADERS(pthread.h, :, enable_pthread=no)
695 if test x$enable_pthread = xyes; then
696 AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
697 if test -z "${pthread_name}" ; then
698 PTHREAD_LIBS="-lpthread"
703 AC_SUBST(PTHREAD_LIBS)
706 dnl Check whether we need to pass -lresolv
707 dnl We know that we don't need it for W32.
709 if test x$os_win32 = xno; then
712 ac_cv_var__res_options=no
713 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
714 #include <sys/socket.h>
715 #include <netinet/in.h>
716 #include <arpa/nameser.h>
717 #include <resolv.h>]], [[_res.options = RES_INIT;]])],[ac_cv_var__res_options=yes],[]);
718 if test "$ac_cv_var__res_options" != "yes"; then
723 if test "x$LIBRESOLV" = "x"; then
724 AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
730 LIBS="$LIBS $LIBRESOLV"
732 dnl #######################################################################
733 dnl # Check for startup notification
734 dnl #######################################################################
735 if test "x$enable_startup_notification" = "xyes"; then
736 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
738 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
739 echo "Building with libstartup-notification"
740 enable_startup_notification=yes
743 echo "Building without libstartup-notification"
744 enable_startup_notification=no
747 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
748 AC_SUBST(STARTUP_NOTIFICATION_LIBS)
751 dnl #######################################################################
752 dnl # Check for D-Bus support
753 dnl #######################################################################
754 if test "x$enable_dbus" = "xyes"; then
755 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60, dbus-glib-1 >= 0.60],
757 AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if glib bindings of D-Bus are available])
761 echo "D-Bus requirements not met. D-Bus support not activated."
764 AC_SUBST(DBUS_CFLAGS)
768 dnl #######################################################################
769 dnl # Configure address book support
770 dnl #######################################################################
772 dnl #######################################################################
773 dnl # Check for alternate address book support
774 dnl #######################################################################
775 AC_MSG_CHECKING([whether DBUS support for alternate address book is present])
776 if test x"$enable_dbus" = xyes; then
778 AC_MSG_CHECKING([whether to enable alternate address book])
779 if test x"$enable_alternate_addressbook" = xyes; then
781 PKG_CHECK_MODULES(CONTACTS, [claws-contacts],
783 AC_DEFINE(USE_ALT_ADDRBOOK, 1, [Define if alternate address book is to be activated.])
784 enable_alternate_addressbook=yes
785 AC_SUBST(CONTACTS_CFLAGS)
786 AC_SUBST(CONTACTS_LIBS)
789 enable_alternate_addressbook=no
793 enable_alternate_addressbook=no
797 enable_alternate_addressbook=no
800 dnl #######################################################################
801 dnl # Check for old address book support
802 dnl #######################################################################
803 if test x"$enable_alternate_addressbook" = xno; then
804 dnl for LDAP support in addressbook
805 dnl no check for libraries; dynamically loaded
806 AC_MSG_CHECKING([whether to use LDAP])
807 if test x"$enable_ldap" = xno; then
809 elif test x"$enable_ldap" = xyes -a x"$enable_pthread" = xno; then
810 AC_MSG_RESULT(no - LDAP support needs pthread support)
813 elif test x"$platform_win32" = xyes; then
815 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
816 LDAP_LIBS="-lwldap32"
821 dnl check for available libraries, and pull them in
822 AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
823 AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
824 AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
825 AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
828 AC_CHECK_HEADERS(ldap.h lber.h,
832 if test "$enable_ldap" = yes; then
833 AC_CHECK_LIB(ldap, ldap_open,
838 AC_CHECK_LIB(ldap, ldap_start_tls_s,
839 [ ac_cv_have_tls=yes ],
840 [ ac_cv_have_tls=no ])
844 AC_MSG_CHECKING([whether ldap library is available])
845 AC_MSG_RESULT($enable_ldap)
847 AC_MSG_CHECKING([whether TLS library is available])
848 AC_MSG_RESULT($ac_cv_have_tls)
850 if test "$enable_ldap" = yes; then
851 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
852 LDAP_LIBS="$LDAP_LIBS -lldap"
854 if test "$ac_cv_have_tls" = yes; then
855 AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
857 dnl As of OpenLDAP API version 3000 a number of functions has
858 dnl been deprecated. As Claws-mail compiles and runs on many
859 dnl platforms and many versions of OpenLDAP we need to be able
860 dnl to switch between the old and new API because new API has
861 dnl added new functions replacing old ones and at the same time
862 dnl old functions has been changed.
863 dnl If cross-compiling defaults to enable deprecated features
864 dnl for maximum portability
865 AC_MSG_CHECKING([The API version of OpenLDAP])
869 [if (LDAP_API_VERSION >= 3000)
872 [AC_MSG_RESULT([version < 3000])
873 AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 0, Define if OpenLDAP API is at least version 3000.)],
874 [AC_MSG_RESULT([version >= 3000])
875 AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 1, Define if OpenLDAP API is at least version 3000.)],
876 [AC_MSG_RESULT([Enabling deprecated features in OpenLDAP])
877 AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 0, Define if OpenLDAP API is at least version 3000.)
878 AC_DEFINE(LDAP_DEPRECATED, 1, Define to activate deprecated features in OpenLDAP)]
883 dnl for JPilot support in addressbook
884 dnl no check for libraries; these are dynamically loaded
885 AC_MSG_CHECKING([whether to use JPilot])
886 if test "$enable_jpilot" = yes; then
888 AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h pi-version.h,
889 [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
890 [ enable_jpilot=no ])
891 if test "$enable_jpilot" = no; then
892 AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h libpisock/pi-version.h,
894 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
897 AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" enable_jpilot="no"])
898 if test x"$enable_jpilot" = xyes; then
899 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
901 AC_MSG_NOTICE([JPilot support not available])
903 AC_SUBST(JPILOT_LIBS)
909 AM_CONDITIONAL(BUILD_ALTADDRBOOK, test x"$enable_alternate_addressbook" = x"yes")
911 dnl #######################################################################
912 dnl # Check for NetworkManager support
913 dnl #######################################################################
914 if test x"$enable_dbus" = xyes; then
915 if test x"$enable_networkmanager" = xyes; then
916 PKG_CHECK_MODULES(NETWORKMANAGER_SUPPORT, libnm,
918 AC_DEFINE(HAVE_NETWORKMANAGER_SUPPORT, 1, [Define if NetworkManager support is to be included.])
919 echo "Building with NetworkManager support"
920 enable_networkmanager=yes
923 echo "NetworkManager not found."
924 enable_networkmanager=no
926 AC_SUBST(NETWORKMANAGER_SUPPORT_CFLAGS)
929 echo "NetworkManager support deactivated as D-Bus requirements were not met."
930 enable_networkmanager=no
934 AC_MSG_CHECKING([whether to use libetpan])
935 if test x"$enable_libetpan" = xyes; then
940 libetpan_versiontype=0
942 # since 1.9.4, libetpan uses pkg-config
943 PKG_CHECK_MODULES([LIBETPAN], [libetpan >= 1.9.4],
945 LIBETPAN_VERSION=`pkg-config --modversion libetpan | $AWK -F. '{printf "%d", ($1 * 10000) + ($2 * 100) + $3}'`
949 # before 1.9.4, libetpan uses its own libetpan-config script
950 AC_PATH_PROG(libetpanconfig, [libetpan-config])
951 if test "x$libetpanconfig" != "x"; then
952 LIBETPAN_CFLAGS="`$libetpanconfig --cflags`"
953 LIBETPAN_LIBS="`$libetpanconfig --libs`"
954 # support libetpan version like x.x and x.x.x
955 libetpan_versiontype=`$libetpanconfig --version | tr -dc . | wc -c`
956 if test $libetpan_versiontype -eq 1; then
957 LIBETPAN_VERSION=`$libetpanconfig --version | $AWK -F. '{printf "%d", ($1 * 100) + $2}'`
959 LIBETPAN_VERSION=`$libetpanconfig --version | $AWK -F. '{printf "%d", ($1 * 10000) + ($2 * 100) + $3}'`
964 if test "x$libetpan_config" = "xyes"; then
965 AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
966 if test "x$libetpan_result" = "xyes"; then
967 AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
968 LIBS="$LIBS $LIBETPAN_LIBS"
969 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <libetpan/dbstorage.h>]], [[db_mailstorage_init(NULL, NULL);]])],[libetpan_result=yes],[libetpan_result=no])
970 AC_MSG_RESULT([$libetpan_result])
973 if test "x$libetpan_result" = "xyes"; then
974 if test $libetpan_versiontype -eq 1; then
975 if test "$LIBETPAN_VERSION" -lt "57"; then
976 AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/])
977 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
978 AC_MSG_ERROR([libetpan 0.57 not found])
981 AC_SUBST(LIBETPAN_CFLAGS)
982 AC_SUBST(LIBETPAN_LIBS)
983 AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP and/or NNTP support.)
985 AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/ ])
986 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
987 AC_MSG_ERROR([libetpan 0.57 not found])
992 AM_CONDITIONAL(CLAWS_LIBETPAN, test "x$libetpan_result" = "xyes")
995 AC_MSG_CHECKING([whether to use librsvg])
996 if test x"$enable_svg" = xyes; then
998 PKG_CHECK_MODULES([SVG], [librsvg-2.0 >= 2.39.0 cairo >= 1.0.0],
1000 AC_SUBST(SVG_CFLAGS)
1002 AC_DEFINE(HAVE_SVG, 1, [Define if librsvg2 is available for SVG support])
1006 AC_MSG_NOTICE([SVG support deactivated as librsvg2 >= 2.39.0 was not found])
1013 AC_MSG_CHECKING([whether to use valgrind])
1014 if test x$enable_valgrind = xyes; then
1016 PKG_CHECK_MODULES(VALGRIND, valgrind >= 2.4.0,
1017 enable_valgrind=yes, enable_valgrind=no)
1018 if test x"$enable_valgrind" = xyes; then
1019 AC_DEFINE(HAVE_VALGRIND, 1, Define if you want valgrind support)
1021 AC_MSG_RESULT(not found)
1026 AM_CONDITIONAL(CLAWS_VALGRIND, test x"$enable_valgrind" = x"yes")
1028 AC_MSG_CHECKING([whether to build unit tests])
1029 if test x$enable_tests = xyes; then
1034 AM_CONDITIONAL(BUILD_TESTS, test "x$enable_tests" = "xyes")
1036 dnl *************************
1037 dnl ** section for plugins **
1038 dnl *************************
1042 MISSING_DEPS_PLUGINS=""
1044 dnl First we set the enabled status - either enabled (yes), auto-enabled (auto)
1045 dnl or (auto-)disabled (no for both)
1047 dnl All plugins are auto-enabled except for Demo which is just there to help
1048 dnl potential plugins writers.
1050 AC_ARG_ENABLE(acpi_notifier-plugin,
1051 [ --disable-acpi_notifier-plugin Do not build acpi_notifier plugin],
1052 [enable_acpi_notifier_plugin=$enableval], [enable_acpi_notifier_plugin=auto])
1054 AC_ARG_ENABLE(address_keeper-plugin,
1055 [ --disable-address_keeper-plugin Do not build address_keeper plugin],
1056 [enable_address_keeper_plugin=$enableval], [enable_address_keeper_plugin=auto])
1058 AC_ARG_ENABLE(archive-plugin,
1059 [ --disable-archive-plugin Do not build archive plugin],
1060 [enable_archive_plugin=$enableval], [enable_archive_plugin=auto])
1062 AC_ARG_ENABLE(att_remover-plugin,
1063 [ --disable-att_remover-plugin Do not build att_remover plugin],
1064 [enable_att_remover_plugin=$enableval], [enable_att_remover_plugin=auto])
1066 AC_ARG_ENABLE(attachwarner-plugin,
1067 [ --disable-attachwarner-plugin Do not build attachwarner plugin],
1068 [enable_attachwarner_plugin=$enableval], [enable_attachwarner_plugin=auto])
1070 AC_ARG_ENABLE(bogofilter-plugin,
1071 [ --disable-bogofilter-plugin Do not build bogofilter plugin],
1072 [enable_bogofilter_plugin=$enableval], [enable_bogofilter_plugin=auto])
1074 AC_ARG_ENABLE(bsfilter-plugin,
1075 [ --disable-bsfilter-plugin Do not build bsfilter plugin],
1076 [enable_bsfilter_plugin=$enableval], [enable_bsfilter_plugin=auto])
1078 AC_ARG_ENABLE(clamd-plugin,
1079 [ --disable-clamd-plugin Do not build clamd plugin],
1080 [enable_clamd_plugin=$enableval], [enable_clamd_plugin=auto])
1082 AC_ARG_ENABLE(dillo-plugin,
1083 [ --disable-dillo-plugin Do not build dillo plugin],
1084 [enable_dillo_plugin=$enableval], [enable_dillo_plugin=auto])
1086 AC_ARG_ENABLE(fancy-plugin,
1087 [ --disable-fancy-plugin Do not build fancy plugin],
1088 [enable_fancy_plugin=$enableval], [enable_fancy_plugin=auto])
1090 AC_ARG_ENABLE(fetchinfo-plugin,
1091 [ --disable-fetchinfo-plugin Do not build fetchinfo plugin],
1092 [enable_fetchinfo_plugin=$enableval], [enable_fetchinfo_plugin=auto])
1094 AC_ARG_ENABLE(gdata-plugin,
1095 [ --disable-gdata-plugin Do not build gdata plugin],
1096 [enable_gdata_plugin=$enableval], [enable_gdata_plugin=auto])
1098 AC_ARG_ENABLE(keyword_warner-plugin,
1099 [ --disable-keyword_warner-plugin Do not build keyword_warner plugin],
1100 [enable_keyword_warner_plugin=$enableval], [enable_keyword_warner_plugin=auto])
1102 AC_ARG_ENABLE(libravatar-plugin,
1103 [ --disable-libravatar-plugin Do not build libravatar plugin],
1104 [enable_libravatar_plugin=$enableval], [enable_libravatar_plugin=auto])
1106 AC_ARG_ENABLE(litehtml_viewer-plugin,
1107 [ --disable-litehtml_viewer-plugin Do not build litehtml_viewer plugin],
1108 [enable_litehtml_viewer_plugin=$enableval], [enable_litehtml_viewer_plugin=auto])
1110 AC_ARG_ENABLE(mailmbox-plugin,
1111 [ --disable-mailmbox-plugin Do not build mailmbox plugin],
1112 [enable_mailmbox_plugin=$enableval], [enable_mailmbox_plugin=auto])
1114 AC_ARG_ENABLE(managesieve-plugin,
1115 [ --disable-managesieve-plugin Do not build managesieve plugin],
1116 [enable_managesieve_plugin=$enableval], [enable_managesieve_plugin=auto])
1118 AC_ARG_ENABLE(newmail-plugin,
1119 [ --disable-newmail-plugin Do not build newmail plugin],
1120 [enable_newmail_plugin=$enableval], [enable_newmail_plugin=auto])
1122 AC_ARG_ENABLE(notification-plugin,
1123 [ --disable-notification-plugin Do not build notification plugin],
1124 [enable_notification_plugin=$enableval], [enable_notification_plugin=auto])
1126 AC_ARG_ENABLE(pdf_viewer-plugin,
1127 [ --disable-pdf_viewer-plugin Do not build pdf_viewer plugin],
1128 [enable_pdf_viewer_plugin=$enableval], [enable_pdf_viewer_plugin=auto])
1130 AC_ARG_ENABLE(perl-plugin,
1131 [ --disable-perl-plugin Do not build perl plugin],
1132 [enable_perl_plugin=$enableval], [enable_perl_plugin=auto])
1134 AC_ARG_ENABLE(python-plugin,
1135 [ --disable-python-plugin Do not build python plugin],
1136 [enable_python_plugin=$enableval], [enable_python_plugin=auto])
1138 AC_ARG_ENABLE(pgpcore-plugin,
1139 [ --disable-pgpcore-plugin Do not build pgpcore plugin],
1140 [enable_pgpcore_plugin=$enableval], [enable_pgpcore_plugin=auto])
1142 AC_ARG_ENABLE(pgpmime-plugin,
1143 [ --disable-pgpmime-plugin Do not build pgpmime plugin],
1144 [enable_pgpmime_plugin=$enableval], [enable_pgpmime_plugin=auto])
1146 AC_ARG_ENABLE(pgpinline-plugin,
1147 [ --disable-pgpinline-plugin Do not build pgpinline plugin],
1148 [enable_pgpinline_plugin=$enableval], [enable_pgpinline_plugin=auto])
1150 AC_ARG_ENABLE(rssyl-plugin,
1151 [ --disable-rssyl-plugin Do not build rssyl plugin],
1152 [enable_rssyl_plugin=$enableval], [enable_rssyl_plugin=auto])
1154 AC_ARG_ENABLE(smime-plugin,
1155 [ --disable-smime-plugin Do not build smime plugin],
1156 [enable_smime_plugin=$enableval], [enable_smime_plugin=auto])
1158 AC_ARG_ENABLE(spamassassin-plugin,
1159 [ --disable-spamassassin-plugin Do not build spamassassin plugin],
1160 [enable_spamassassin_plugin=$enableval], [enable_spamassassin_plugin=auto])
1162 AC_ARG_ENABLE(spam_report-plugin,
1163 [ --disable-spam_report-plugin Do not build spam_report plugin],
1164 [enable_spam_report_plugin=$enableval], [enable_spam_report_plugin=auto])
1166 AC_ARG_ENABLE(tnef_parse-plugin,
1167 [ --disable-tnef_parse-plugin Do not build tnef_parse plugin],
1168 [enable_tnef_parse_plugin=$enableval], [enable_tnef_parse_plugin=auto])
1170 AC_ARG_ENABLE(vcalendar-plugin,
1171 [ --disable-vcalendar-plugin Do not build vcalendar plugin],
1172 [enable_vcalendar_plugin=$enableval], [enable_vcalendar_plugin=auto])
1174 dnl disabled by default
1175 AC_ARG_ENABLE(demo-plugin,
1176 [ --enable-demo-plugin Build demo plugin],
1177 [enable_demo_plugin=$enableval], [enable_demo_plugin=no])
1180 dnl Then we check (unconditionnaly) for plugins dependencies
1181 dnl Some dependencies are optional, some mandatory. This is taken care of
1184 dnl During this dependancy check we do the checks themselves, define HAVE_X to
1185 dnl either yes or no, and do the AC_SUBST calls.
1187 dnl Archive: libarchive
1188 dnl Fancy: Webkit, curl, optionally libsoup-gnome
1190 dnl Litehtml a C++ compiler, >=glib-2.36, cairo, fontconfig, gumbo, curl
1191 dnl Libravatar: libcurl
1192 dnl Notification: optionally libnotify unity/messaging-menu
1193 dnl libcanberra_gtk3 hotkey
1194 dnl Pdf-Viewer: libpoppler
1196 dnl PGP/Core: libgpgme
1197 dnl PGP/Mime: pgpcore libgpgme
1198 dnl PGP/Inline: pgpcore libgpgme
1199 dnl S/Mime: pgpcore libgpgme
1201 dnl RSSyl: expat libcurl
1202 dnl SpamReport: libcurl
1203 dnl vCalendar: libcurl, libical
1204 dnl tnef_parse: libytnef
1206 dnl libcurl ********************************************************************
1207 PKG_CHECK_MODULES(CURL, libcurl, HAVE_CURL=yes, HAVE_CURL=no)
1209 AC_SUBST(CURL_CFLAGS)
1211 dnl expat **********************************************************************
1212 PKG_CHECK_MODULES(EXPAT, expat, HAVE_EXPAT=yes, HAVE_EXPAT=no)
1214 if test x"$HAVE_EXPAT" = xno; then
1215 AC_CHECK_HEADER(expat.h, [expat_header=yes], [expat_header=no])
1216 AC_CHECK_LIB(expat, XML_ParserCreate, [expat_lib=yes], [expat_lib=no])
1217 if test x"$expat_header" = xyes -a x"$expat_lib"=xyes; then
1220 EXPAT_LIBS="-lexpat"
1224 AC_SUBST(EXPAT_CFLAGS)
1225 AC_SUBST(EXPAT_LIBS)
1227 dnl webkit *********************************************************************
1228 PKG_CHECK_MODULES(WEBKIT, webkit2gtk-4.0 >= 2.18.0, HAVE_WEBKIT=yes, HAVE_WEBKIT=no)
1229 AC_SUBST(WEBKIT_LIBS)
1230 AC_SUBST(WEBKIT_CFLAGS)
1232 dnl libsoup ********************************************************************
1233 PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4, HAVE_LIBSOUP=yes, HAVE_LIBSOUP=no)
1234 if test x"$HAVE_LIBSOUP" = xyes; then
1235 AC_DEFINE(HAVE_LIBSOUP, 1, [Define if libsoup is available])
1237 AC_SUBST(LIBSOUP_CFLAGS)
1238 AC_SUBST(LIBSOUP_LIBS)
1240 dnl libsoup-gnome **************************************************************
1241 PKG_CHECK_MODULES(LIBSOUP_GNOME, libsoup-gnome-2.4 >= 2.26, HAVE_LIBSOUP_GNOME=yes, HAVE_LIBSOUP_GNOME=no)
1242 if test x"$HAVE_LIBSOUP_GNOME" = xyes; then
1243 AC_DEFINE(HAVE_LIBSOUP_GNOME, 1, [Define if libsoup_gnome is available])
1245 AC_SUBST(LIBSOUP_GNOME_CFLAGS)
1246 AC_SUBST(LIBSOUP_GNOME_LIBS)
1248 dnl libarchive *****************************************************************
1249 PKG_CHECK_MODULES(LIBARCHIVE, libarchive, HAVE_ARCHIVE=yes, HAVE_ARCHIVE=no)
1250 AC_SUBST(ARCHIVE_LIBS)
1251 AC_SUBST(ARCHIVE_CFLAGS)
1252 AC_CHECK_LIB([archive], [archive_read_new],
1253 ARCHIVE_LIBS=-larchive
1255 AC_SUBST(ARCHIVE_LIBS,$ARCHIVE_CFLAGS),
1259 dnl libgdata *******************************************************************
1260 PKG_CHECK_MODULES(GDATA, libgdata >= 0.17.2, HAVE_GDATA=yes, HAVE_GDATA=no)
1261 AC_SUBST(GDATA_CFLAGS)
1262 AC_SUBST(GDATA_LIBS)
1264 dnl cairo **********************************************************************
1265 PKG_CHECK_MODULES(CAIRO, cairo >= 1.12.0, HAVE_CAIRO=yes, HAVE_CAIRO=no)
1266 AC_SUBST(CAIRO_CFLAGS)
1267 AC_SUBST(CAIRO_LIBS)
1269 dnl fontconfig *****************************************************************
1270 PKG_CHECK_MODULES(FONTCONFIG, fontconfig, HAVE_FONTCONFIG=yes, HAVE_FONTCONFIG=no)
1271 AC_SUBST(FONTCONFIG_CFLAGS)
1272 AC_SUBST(FONTCONFIG_LIBS)
1274 dnl gumbo **********************************************************************
1275 PKG_CHECK_MODULES(LIBGUMBO, gumbo >= 0.10, HAVE_LIBGUMBO=yes, HAVE_LIBGUMBO=no)
1276 AC_SUBST(LIBGUMBO_CFLAGS)
1277 AC_SUBST(LIBGUMBO_LIBS)
1279 dnl libical ********************************************************************
1280 PKG_CHECK_MODULES(LIBICAL, libical >= 2.0, HAVE_LIBICAL=yes, HAVE_LIBICAL=no)
1281 AC_SUBST(LIBICAL_CFLAGS)
1282 AC_SUBST(LIBICAL_LIBS)
1284 dnl Poppler ********************************************************************
1285 PKG_CHECK_MODULES(POPPLER, poppler-glib >= 0.12.0, HAVE_POPPLER=yes, HAVE_POPPLER=no)
1286 AC_SUBST(POPPLER_LIBS)
1287 AC_SUBST(POPPLER_CFLAGS)
1289 dnl check for Poppler extra features that we conditionally support
1290 if test x"$HAVE_POPPLER" = xyes; then
1292 CFLAGS="$POPPLER_CFLAGS $GTK_CFLAGS $GLIB_CFLAGS"
1293 AC_CHECK_DECL(POPPLER_DEST_NAMED,
1294 [AC_DEFINE([HAVE_POPPLER_DEST_NAMED], [], [Description])],
1295 ,[#include <poppler-action.h>])
1296 AC_CHECK_DECL(POPPLER_DEST_XYZ,
1297 [AC_DEFINE([HAVE_POPPLER_DEST_XYZ], [], [Description])],
1298 ,[#include <poppler-action.h>])
1302 dnl perl ***********************************************************************
1303 AC_CHECK_PROG(HAVE_PERL, perl, yes, no)
1304 if test x"$HAVE_PERL" = xyes; then
1305 AC_MSG_CHECKING(for perl >= 5.8.0)
1306 PERL_VER=`perl -e 'print $] > 5.0079999?"yes":"no"'`
1307 if test "$PERL_VER" = "yes"; then
1314 if test x"$HAVE_PERL" = xyes; then
1315 AC_MSG_CHECKING(for Perl compile flags)
1316 PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
1317 PERL_CFLAGS=`echo $PERL_CFLAGS | sed 's/-D_FILE_OFFSET_BITS=[[0-9]]*//'`
1318 PERL_LDFLAGS=`perl -MExtUtils::Embed -e ldopts |sed 's/-lgdbm\>//'`
1319 PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-ldb\>//'`
1320 PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-lndbm\>//'`
1321 PERL_LDFLAGS=`echo $PERL_LDFLAGS |sed 's/-lc\>//'`
1323 AC_MSG_NOTICE([Adding perl LIBS ${PERL_CFLAGS}])
1325 if test x"$HAVE_PERL" = xyes; then
1326 AC_CHECK_LIB(perl,perl_alloc,[AC_DEFINE(HAVE_LIBPERL, 1, Check for libperl.)],
1327 [ HAVE_LIBPERL=no ])
1329 if test x"$HAVE_LIBPERL" = xno; then
1330 LIBPERL_PREFIX=`perl -MExtUtils::Embed -e perl_inc`
1331 LIBPERL_PREFIX=`echo $LIBPERL_PREFIX |sed 's/-I//'`
1332 AC_MSG_CHECKING([for libperl.so])
1333 if test -f "$LIBPERL_PREFIX/libperl.so"; then
1342 AC_SUBST(PERL_CFLAGS)
1343 AC_SUBST(PERL_LDFLAGS)
1346 dnl Gpgme **********************************************************************
1347 AM_PATH_GPGME(1.0.0, HAVE_GPGME=yes, HAVE_GPGME=no)
1348 if test x"$HAVE_GPGME" = xyes; then
1349 AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.)
1350 AM_PATH_GPGME(1.1.1, AC_DEFINE(HAVE_GPGME_PKA_TRUST, 1, [Define if GPGME supports PKA.]))
1353 dnl Python *********************************************************************
1354 PKG_CHECK_MODULES(PYTHON, python3, HAVE_PYTHON=yes, HAVE_PYTHON=no)
1355 PKG_CHECK_MODULES(PYTHONEMBED, python3-embed, HAVE_PYTHONEMBED=yes, HAVE_PYTHONEMBED=no)
1356 PKG_CHECK_MODULES(PYGOBJECT, pygobject-3.0, HAVE_PYGOBJ=yes, HAVE_PYGOBJ=no)
1358 AC_SUBST(PYTHON_SHARED_LIB)
1359 AC_SUBST(PYTHON_CFLAGS)
1360 AC_SUBST(PYTHON_LIBS)
1361 AC_SUBST(PYTHONEMBED_SHARED_LIB)
1362 AC_SUBST(PYTHONEMBED_CFLAGS)
1363 AC_SUBST(PYTHONEMBED_LIBS)
1364 AC_SUBST(PYGOBJECT_CFLAGS)
1365 AC_SUBST(PYGOBJECT_LIBS)
1367 dnl libnotify ******************************************************************
1368 PKG_CHECK_MODULES(libnotify, libnotify >= 0.4.3, HAVE_LIBNOTIFY=yes, HAVE_LIBNOTIFY=no)
1369 if test x"$HAVE_LIBNOTIFY" = xyes; then
1370 AC_DEFINE(HAVE_LIBNOTIFY, 1, [Define if libnotify support is enabled])
1372 AC_SUBST(libnotify_CFLAGS)
1373 AC_SUBST(libnotify_LIBS)
1375 dnl libcanberra-gtk3 ************************************************************
1376 PKG_CHECK_MODULES(libcanberra_gtk3, libcanberra-gtk3, HAVE_LIBCANBERRA_GTK=yes, HAVE_LIBCANBERRA_GTK=no)
1377 if test x"$HAVE_LIBCANBERRA_GTK" = xyes; then
1378 AC_DEFINE(HAVE_LIBCANBERRA_GTK, 1, [Define if libcanberra-gtk3 support is enabled])
1380 AC_SUBST(libcanberra_gtk3_CFLAGS)
1381 AC_SUBST(libcanberra_gtk3_LIBS)
1383 dnl unity/messaging-menu *******************************************************
1384 PKG_CHECK_MODULES(unity, unity messaging-menu, HAVE_UNITY=yes, HAVE_UNITY=no)
1385 if test x"$HAVE_UNITY" = xyes; then
1386 AC_DEFINE(NOTIFICATION_INDICATOR, 1, [Activate support for unity and messaging-menu])
1388 AC_SUBST(unity_CFLAGS)
1389 AC_SUBST(unity_LIBS)
1391 dnl hotkeys ********************************************************************
1392 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)
1393 if test x"$HAVE_HOTKEYS" = xyes; then
1394 AC_DEFINE(NOTIFICATION_HOTKEYS, 1, Activate support for global hotkeys)
1396 AC_SUBST(CM_NP_HOTKEY_CFLAGS)
1397 AC_SUBST(CM_NP_HOTKEY_LIBS)
1399 dnl libytnef *******************************************************************
1403 # Check both ytnef.h and libytnef/ytnef.h, and adjust YTNEF_CFLAGS
1405 AC_CHECK_HEADER(ytnef.h, [have_ytnef=1], [have_ytnef=0])
1406 if test $have_ytnef -eq 0; then
1407 AC_CHECK_HEADER(libytnef/ytnef.h,
1409 YTNEF_CFLAGS="${YTNEF_CFLAGS} -DYTNEF_H_SUBDIR"],
1412 if test $have_ytnef -eq 1; then
1413 AC_MSG_CHECKING([how libytnef's SwapDDWord() should be called])
1414 # Now we have to figure out which libytnef version we're using,
1415 # based on whether SwapDDWord takes one argument or two.
1416 if test "x${YTNEF_CFLAGS}" = "x"; then
1417 ytnef_include="#include <ytnef.h>"
1419 ytnef_include="#include <libytnef/ytnef.h>"
1421 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
1422 ${ytnef_include}]], [[SwapDDWord(0, 0);]])],[have_ytnef=1],[have_ytnef=0])
1423 if test $have_ytnef -eq 0; then
1424 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
1425 ${ytnef_include}]], [[SwapDDWord(0);]])],[have_ytnef=1;
1426 YTNEF_CFLAGS="${YTNEF_CFLAGS} -DYTNEF_OLD_SWAPDDWORD"],[have_ytnef=0])
1428 if test $have_ytnef -eq 1; then
1429 YTNEF_LIBS="-lytnef"
1432 AC_MSG_RESULT(no idea, unsupported libytnef version?)
1435 AC_SUBST(YTNEF_CFLAGS)
1436 AC_SUBST(YTNEF_LIBS)
1438 dnl Third, we now cross the requested plugins and the available dependencies
1439 dnl If some dependencies are missing and the plugin was explicitely enabled,
1440 dnl we error out, else we only inform.
1442 AC_MSG_CHECKING([whether to build acpi_notifier plugin])
1443 if test x"$enable_acpi_notifier_plugin" != xno; then
1444 PLUGINS="$PLUGINS acpi_notifier"
1447 DISABLED_PLUGINS="$DISABLED_PLUGINS acpi_notifier"
1451 AC_MSG_CHECKING([whether to build address_keeper plugin])
1452 if test x"$enable_address_keeper_plugin" != xno; then
1453 PLUGINS="$PLUGINS address_keeper"
1456 DISABLED_PLUGINS="$DISABLED_PLUGINS address_keeper"
1460 AC_MSG_CHECKING([whether to build archive plugin])
1461 if test x"$enable_archive_plugin" != xno; then
1462 dependencies_missing=""
1464 if test x"$HAVE_ARCHIVE" = xno; then
1465 dependencies_missing="libarchive $dependencies_missing"
1468 if test x"$dependencies_missing" = x; then
1469 PLUGINS="$PLUGINS archive"
1471 elif test x"$enable_archive_plugin" = xauto; then
1473 AC_MSG_WARN("Plugin archive will not be built; missing $dependencies_missing")
1474 enable_archive_plugin=no
1475 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS archive"
1478 AC_MSG_ERROR("Plugin archive cannot be built; missing $dependencies_missing")
1481 DISABLED_PLUGINS="$DISABLED_PLUGINS archive"
1485 AC_MSG_CHECKING([whether to build att_remover plugin])
1486 if test x"$enable_att_remover_plugin" != xno; then
1487 PLUGINS="$PLUGINS att_remover"
1490 DISABLED_PLUGINS="$DISABLED_PLUGINS att_remover"
1494 AC_MSG_CHECKING([whether to build attachwarner plugin])
1495 if test x"$enable_attachwarner_plugin" != xno; then
1496 PLUGINS="$PLUGINS attachwarner"
1499 DISABLED_PLUGINS="$DISABLED_PLUGINS attachwarner"
1503 AC_MSG_CHECKING([whether to build bogofilter plugin])
1504 if test x"$enable_bogofilter_plugin" != xno; then
1505 PLUGINS="$PLUGINS bogofilter"
1508 DISABLED_PLUGINS="$DISABLED_PLUGINS bogofilter"
1512 AC_MSG_CHECKING([whether to build bsfilter plugin])
1513 if test x"$enable_bsfilter_plugin" != xno; then
1514 PLUGINS="$PLUGINS bsfilter"
1517 DISABLED_PLUGINS="$DISABLED_PLUGINS bsfilter"
1521 AC_MSG_CHECKING([whether to build clamd plugin])
1522 if test x"$enable_clamd_plugin" != xno; then
1523 PLUGINS="$PLUGINS clamd"
1526 DISABLED_PLUGINS="$DISABLED_PLUGINS clamd"
1530 AC_MSG_CHECKING([whether to build demo plugin])
1531 if test x"$enable_demo_plugin" != xno; then
1532 PLUGINS="$PLUGINS demo"
1535 DISABLED_PLUGINS="$DISABLED_PLUGINS demo"
1539 AC_MSG_CHECKING([whether to build Dillo plugin])
1540 if test x"$enable_dillo_plugin" != xno; then
1541 PLUGINS="$PLUGINS dillo"
1544 DISABLED_PLUGINS="$DISABLED_PLUGINS dillo"
1548 AC_MSG_CHECKING([whether to build fancy plugin])
1549 if test x"$enable_fancy_plugin" != xno; then
1550 dependencies_missing=""
1552 if test x"$HAVE_WEBKIT" = xno; then
1553 dependencies_missing="libwebkit2gtk-4.0 $dependencies_missing"
1555 if test x"$HAVE_CURL" = xno; then
1556 dependencies_missing="libcurl $dependencies_missing"
1559 if test x"$dependencies_missing" = x; then
1560 PLUGINS="$PLUGINS fancy"
1562 elif test x"$enable_fancy_plugin" = xauto; then
1564 AC_MSG_WARN("Plugin fancy will not be built; missing $dependencies_missing")
1565 enable_fancy_plugin=no
1566 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS fancy"
1569 AC_MSG_ERROR("Plugin fancy cannot be built; missing $dependencies_missing")
1572 DISABLED_PLUGINS="$DISABLED_PLUGINS fancy"
1576 AC_MSG_CHECKING([whether to build fetchinfo plugin])
1577 if test x"$enable_fetchinfo_plugin" != xno; then
1578 PLUGINS="$PLUGINS fetchinfo"
1581 DISABLED_PLUGINS="$DISABLED_PLUGINS fetchinfo"
1585 AC_MSG_CHECKING([whether to build gdata plugin])
1586 if test x"$enable_gdata_plugin" != xno; then
1587 dependencies_missing=""
1589 if test x"$HAVE_GDATA" = xno; then
1590 dependencies_missing="libgdata $dependencies_missing"
1593 if test x"$dependencies_missing" = x; then
1594 PLUGINS="$PLUGINS gdata"
1596 elif test x"$enable_gdata_plugin" = xauto; then
1598 AC_MSG_WARN("Plugin gdata will not be built; missing $dependencies_missing")
1599 enable_gdata_plugin=no
1600 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS gdata"
1603 AC_MSG_ERROR("Plugin gdata cannot be built; missing $dependencies_missing")
1606 DISABLED_PLUGINS="$DISABLED_PLUGINS gdata"
1610 AC_MSG_CHECKING([whether to build keyword_warner plugin])
1611 if test x"$enable_keyword_warner_plugin" != xno; then
1612 PLUGINS="$PLUGINS keyword_warner"
1615 DISABLED_PLUGINS="$DISABLED_PLUGINS keyword_warner"
1619 AC_MSG_CHECKING([whether to build libravatar plugin])
1620 if test x"$enable_libravatar_plugin" != xno; then
1621 dependencies_missing=""
1623 if test x"$HAVE_CURL" = xno; then
1624 dependencies_missing="libcurl $dependencies_missing"
1627 if test x"$dependencies_missing" = x; then
1628 PLUGINS="$PLUGINS libravatar"
1630 elif test x"$enable_libravatar_plugin" = xauto; then
1632 AC_MSG_WARN("Plugin libravatar will not be built; missing $dependencies_missing")
1633 enable_libravatar_plugin=no
1634 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS libravatar"
1637 AC_MSG_ERROR("Plugin libravatar cannot be built; missing $dependencies_missing")
1640 DISABLED_PLUGINS="$DISABLED_PLUGINS libravatar"
1644 AC_MSG_CHECKING([whether to build litehtml_viewer plugin])
1645 if test x"$enable_litehtml_viewer_plugin" != xno; then
1646 dependencies_missing=""
1648 if test x"$HAVE_CXX" = xno; then
1649 dependencies_missing="C++ compiler $dependencies_missing"
1651 PKG_CHECK_EXISTS([glib-2.0 >= 2.36], [],
1652 [dependencies_missing="glib-2.0 >= 2.36 $dependencies_missing"])
1653 if test x"$HAVE_CAIRO" = xno; then
1654 dependencies_missing="cairo $dependencies_missing"
1656 if test x"$HAVE_FONTCONFIG" = xno; then
1657 dependencies_missing="fontconfig $dependencies_missing"
1659 if test x"$HAVE_LIBGUMBO" = xno; then
1660 dependencies_missing="libgumbo $dependencies_missing"
1662 if test x"$HAVE_CURL" = xno; then
1663 dependencies_missing="libcurl $dependencies_missing"
1667 if test x"$dependencies_missing" = x; then
1668 PLUGINS="$PLUGINS litehtml_viewer"
1670 elif test x"$enable_litehtml_viewer_plugin" = xauto; then
1672 AC_MSG_WARN("Plugin litehtml_viewer will not be built; missing $dependencies_missing")
1673 enable_litehtml_viewer_plugin=no
1674 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS litehtml_viewer"
1677 AC_MSG_ERROR("Plugin litehtml_viewer cannot be built; missing $dependencies_missing")
1680 DISABLED_PLUGINS="$DISABLED_PLUGINS litehtml_viewer"
1684 AC_MSG_CHECKING([whether to build mailmbox plugin])
1685 if test x"$enable_mailmbox_plugin" != xno; then
1686 PLUGINS="$PLUGINS mailmbox"
1689 DISABLED_PLUGINS="$DISABLED_PLUGINS mailmbox"
1693 AC_MSG_CHECKING([whether to build managesieve plugin])
1694 if test x"$enable_managesieve_plugin" != xno; then
1695 PLUGINS="$PLUGINS managesieve"
1698 DISABLED_PLUGINS="$DISABLED_PLUGINS managesieve"
1702 AC_MSG_CHECKING([whether to build newmail plugin])
1703 if test x"$enable_newmail_plugin" != xno; then
1704 PLUGINS="$PLUGINS newmail"
1707 DISABLED_PLUGINS="$DISABLED_PLUGINS newmail"
1711 AC_MSG_CHECKING([whether to build notification plugin])
1712 if test x"$enable_notification_plugin" != xno; then
1713 PLUGINS="$PLUGINS notification"
1716 AC_DEFINE(NOTIFICATION_POPUP, 1, Activate notification popup)
1717 AC_DEFINE(NOTIFICATION_BANNER, 1, Activate notification banner)
1718 AC_DEFINE(NOTIFICATION_COMMAND, 1, Activate notification shell command)
1719 AC_DEFINE(NOTIFICATION_TRAYICON, 1, Activate notification trayicon)
1720 if test x"$platform_win32" = xno; then
1721 AC_DEFINE(NOTIFICATION_LCDPROC, 1, Activate lcdproc support)
1724 notification_features="banner command"
1725 notification_missing_dependencies=""
1726 if test x"$HAVE_HOTKEYS" = xyes; then
1727 notification_features="$notification_features hotkeys"
1729 notification_missing_dependencies="$notification_missing_dependencies hotkeys"
1731 notification_features="$notification_features lcdproc"
1732 if test x"$HAVE_UNITY" = xyes; then
1733 notification_features="$notification_features unity/messaging-menu"
1735 notification_missing_dependencies="$notification_missing_dependencies unity/messaging-menu"
1737 if test x"$HAVE_LIBNOTIFY" = xyes; then
1738 notification_features="$notification_features libnotify"
1740 notification_missing_dependencies="$notification_missing_dependencies libnotify"
1742 if test x"$HAVE_LIBCANBERRA_GTK" = xyes; then
1743 notification_features="$notification_features libcanberra-gtk3"
1745 notification_missing_dependencies="$notification_missing_dependencies libcanberra-gtk3"
1747 notification_features="$notification_features popup trayicon"
1749 DISABLED_PLUGINS="$DISABLED_PLUGINS notification"
1753 AC_MSG_CHECKING([whether to build pdf_viewer plugin])
1754 if test x"$enable_pdf_viewer_plugin" != xno; then
1755 dependencies_missing=""
1757 if test x"$HAVE_POPPLER" = xno; then
1758 dependencies_missing="libpoppler-glib $dependencies_missing"
1761 if test x"$dependencies_missing" = x; then
1762 PLUGINS="$PLUGINS pdf_viewer"
1764 elif test x"$enable_pdf_viewer_plugin" = xauto; then
1766 AC_MSG_WARN("Plugin pdf_viewer will not be built; missing $dependencies_missing")
1767 enable_pdf_viewer_plugin=no
1768 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pdf_viewer"
1771 AC_MSG_ERROR("Plugin pdf_viewer cannot be built; missing $dependencies_missing")
1774 DISABLED_PLUGINS="$DISABLED_PLUGINS pdf_viewer"
1778 AC_MSG_CHECKING([whether to build perl plugin])
1779 if test x"$enable_perl_plugin" != xno; then
1780 dependencies_missing=""
1782 if test x"$HAVE_LIBPERL" = xno; then
1783 dependencies_missing="libperl $dependencies_missing"
1786 if test x"$dependencies_missing" = x; then
1787 PLUGINS="$PLUGINS perl"
1789 elif test x"$enable_perl_plugin" = xauto; then
1791 AC_MSG_WARN("Plugin perl will not be built; missing $dependencies_missing")
1792 enable_perl_plugin=no
1793 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS perl"
1796 AC_MSG_ERROR("Plugin perl cannot be built; missing $dependencies_missing")
1799 DISABLED_PLUGINS="$DISABLED_PLUGINS perl"
1803 AC_MSG_CHECKING([whether to build python plugin])
1804 if test x"$enable_python_plugin" != xno; then
1805 dependencies_missing=""
1807 if test x"$HAVE_PYTHON" = xno; then
1808 dependencies_missing="python3 $dependencies_missing"
1810 if test x"$HAVE_PYGOBJ" = xno; then
1811 dependencies_missing="pygobject-3.0 $dependencies_missing"
1814 if test x"$dependencies_missing" = x; then
1815 PLUGINS="$PLUGINS python"
1817 elif test x"$enable_python_plugin" = xauto; then
1819 AC_MSG_WARN("Plugin python will not be built; missing $dependencies_missing")
1820 enable_python_plugin=no
1821 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS python"
1824 AC_MSG_ERROR("Plugin python cannot be built; missing $dependencies_missing")
1827 DISABLED_PLUGINS="$DISABLED_PLUGINS python"
1831 AC_MSG_CHECKING([whether to build pgpcore plugin])
1832 if test x"$enable_pgpcore_plugin" != xno; then
1833 dependencies_missing=""
1835 if test x"$HAVE_GPGME" = xno; then
1836 dependencies_missing="libgpgme $dependencies_missing"
1839 if test x"$dependencies_missing" = x; then
1840 PLUGINS="$PLUGINS pgpcore"
1842 elif test x"$enable_pgpcore_plugin" = xauto; then
1844 AC_MSG_WARN("Plugin pgpcore will not be built; missing $dependencies_missing")
1845 enable_pgpcore_plugin=no
1846 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpcore"
1849 AC_MSG_ERROR("Plugin pgpcore cannot be built; missing $dependencies_missing")
1852 DISABLED_PLUGINS="$DISABLED_PLUGINS pgpcore"
1856 AC_MSG_CHECKING([whether to build pgpmime plugin])
1857 if test x"$enable_pgpmime_plugin" != xno; then
1858 dependencies_missing=""
1860 if test x"$HAVE_GPGME" = xno; then
1861 dependencies_missing="libgpgme $dependencies_missing"
1863 if test x"$enable_pgpcore_plugin" = xno; then
1864 dependencies_missing="pgpcore plugin $dependencies_missing"
1867 if test x"$dependencies_missing" = x; then
1868 PLUGINS="$PLUGINS pgpmime"
1870 elif test x"$enable_pgpmime_plugin" = xauto; then
1872 AC_MSG_WARN("Plugin pgpmime will not be built; missing $dependencies_missing")
1873 enable_pgpmime_plugin=no
1874 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpmime"
1877 AC_MSG_ERROR("Plugin pgpmime cannot be built; missing $dependencies_missing")
1880 DISABLED_PLUGINS="$DISABLED_PLUGINS pgpmime"
1884 AC_MSG_CHECKING([whether to build pgpinline plugin])
1885 if test x"$enable_pgpinline_plugin" != xno; then
1886 dependencies_missing=""
1888 if test x"$HAVE_GPGME" = xno; then
1889 dependencies_missing="libgpgme $dependencies_missing"
1891 if test x"$enable_pgpcore_plugin" = xno; then
1892 dependencies_missing="pgpcore plugin $dependencies_missing"
1895 if test x"$dependencies_missing" = x; then
1896 PLUGINS="$PLUGINS pgpinline"
1898 elif test x"$enable_pgpinline_plugin" = xauto; then
1900 AC_MSG_WARN("Plugin pgpinline will not be built; missing $dependencies_missing")
1901 enable_pgpinline_plugin=no
1902 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS pgpinline"
1905 AC_MSG_ERROR("Plugin pgpinline cannot be built; missing $dependencies_missing")
1908 DISABLED_PLUGINS="$DISABLED_PLUGINS pgpinline"
1912 AC_MSG_CHECKING([whether to build rssyl plugin])
1913 if test x"$enable_rssyl_plugin" != xno; then
1914 dependencies_missing=""
1916 if test x"$HAVE_EXPAT" = xno; then
1917 dependencies_missing="expat $dependencies_missing"
1919 if test x"$HAVE_CURL" = xno; then
1920 dependencies_missing="libcurl $dependencies_missing"
1923 if test x"$dependencies_missing" = x; then
1924 PLUGINS="$PLUGINS rssyl"
1926 elif test x"$enable_rssyl_plugin" = xauto; then
1928 AC_MSG_WARN("Plugin rssyl will not be built; missing $dependencies_missing")
1929 enable_rssyl_plugin=no
1930 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS rssyl"
1933 AC_MSG_ERROR("Plugin rssyl cannot be built; missing $dependencies_missing")
1936 DISABLED_PLUGINS="$DISABLED_PLUGINS rssyl"
1940 AC_MSG_CHECKING([whether to build spamassassin plugin])
1941 if test x"$enable_spamassassin_plugin" != xno; then
1942 PLUGINS="$PLUGINS spamassassin"
1946 dnl check for zlib (optional)
1948 SPAMASSASSIN_CFLAGS=""
1949 SPAMASSASSIN_LIBS=""
1950 AC_CHECK_HEADER([zlib.h],
1951 [AC_DEFINE(HAVE_ZLIB_H,1,[optional zlib support for spamassassin plugin])]
1952 [spamassassin_zlib=1],
1953 [spamassassin_zlib=0])
1954 if test $spamassassin_zlib -eq 1; then
1955 AC_CHECK_LIB(z, deflate, [spamassassin_zlib=1], [spamassassin_zlib=0])
1956 AC_MSG_CHECKING([whether to build spamassassin plugin with zlib support])
1957 if test $spamassassin_zlib -eq 1; then
1959 SPAMASSASSIN_CFLAGS="-DHAVE_LIBZ"
1960 SPAMASSASSIN_LIBS="-lz"
1965 AC_SUBST(SPAMASSASSIN_CFLAGS)
1966 AC_SUBST(SPAMASSASSIN_LIBS)
1968 DISABLED_PLUGINS="$DISABLED_PLUGINS spamassassin"
1972 AC_MSG_CHECKING([whether to build smime plugin])
1973 if test x"$enable_smime_plugin" != xno; then
1974 dependencies_missing=""
1976 if test x"$HAVE_GPGME" = xno; then
1977 dependencies_missing="libgpgme $dependencies_missing"
1979 if test x"$enable_pgpcore_plugin" = xno; then
1980 dependencies_missing="pgpcore plugin $dependencies_missing"
1983 if test x"$dependencies_missing" = x; then
1984 PLUGINS="$PLUGINS smime"
1986 elif test x"$enable_smime_plugin" = xauto; then
1988 AC_MSG_WARN("Plugin smime will not be built; missing $dependencies_missing")
1989 enable_smime_plugin=no
1990 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS smime"
1993 AC_MSG_ERROR("Plugin smime cannot be built; missing $dependencies_missing")
1996 DISABLED_PLUGINS="$DISABLED_PLUGINS smime"
2000 AC_MSG_CHECKING([whether to build spam_report plugin])
2001 if test x"$enable_spam_report_plugin" != xno; then
2002 dependencies_missing=""
2004 if test x"$HAVE_CURL" = xno; then
2005 dependencies_missing="libcurl $dependencies_missing"
2008 if test x"$dependencies_missing" = x; then
2009 PLUGINS="$PLUGINS spam_report"
2011 elif test x"$enable_spam_report_plugin" = xauto; then
2013 AC_MSG_WARN("Plugin spam_report will not be built; missing $dependencies_missing")
2014 enable_spam_report_plugin=no
2015 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS spam_report"
2018 AC_MSG_ERROR("Plugin spam_report cannot be built; missing $dependencies_missing")
2021 DISABLED_PLUGINS="$DISABLED_PLUGINS spam_report"
2025 AC_MSG_CHECKING([whether to build tnef_parse plugin])
2026 if test x"$enable_tnef_parse_plugin" != xno; then
2027 dependencies_missing=""
2029 if test $have_ytnef -eq 0; then
2030 dependencies_missing="libytnef"
2033 if test x"$dependencies_missing" = x; then
2034 PLUGINS="$PLUGINS tnef_parse"
2036 elif test x"$enable_tnef_parse_plugin" = xauto; then
2038 AC_MSG_WARN(Plugin tnef_parse will not be built; missing $dependencies_missing")
2039 enable_tnef_parse_plugin=no
2040 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS tnef_parse"
2043 AC_MSG_ERROR(Plugin tnef_parse will not be built; missing $dependencies_missing")
2046 DISABLED_PLUGINS="$DISABLED_PLUGINS tnef_parse"
2051 AC_MSG_CHECKING([whether to build vcalendar plugin])
2052 if test x"$enable_vcalendar_plugin" != xno; then
2053 dependencies_missing=""
2055 if test x"$HAVE_CURL" = xno; then
2056 dependencies_missing="libcurl $dependencies_missing"
2059 if test x"$HAVE_LIBICAL" = xno; then
2060 dependencies_missing="libical $dependencies_missing"
2063 if test x"$HAVE_PERL" = xno; then
2064 dependencies_missing="perl $dependencies_missing"
2067 if test x"$dependencies_missing" = x; then
2068 PLUGINS="$PLUGINS vcalendar"
2070 elif test x"$enable_vcalendar_plugin" = xauto; then
2072 AC_MSG_WARN("Plugin vcalendar will not be built; missing $dependencies_missing")
2073 enable_vcalendar_plugin=no
2074 MISSING_DEPS_PLUGINS="$MISSING_DEPS_PLUGINS vcalendar"
2077 AC_MSG_ERROR("Plugin vcalendar cannot be built; missing $dependencies_missing")
2080 DISABLED_PLUGINS="$DISABLED_PLUGINS vcalendar"
2084 dnl And finally the automake conditionals.
2086 AM_CONDITIONAL(BUILD_ACPI_NOTIFIER_PLUGIN, test x"$enable_acpi_notifier_plugin" != xno)
2087 AM_CONDITIONAL(BUILD_ADDRESS_KEEPER_PLUGIN, test x"$enable_address_keeper_plugin" != xno)
2088 AM_CONDITIONAL(BUILD_ARCHIVE_PLUGIN, test x"$enable_archive_plugin" != xno)
2089 AM_CONDITIONAL(BUILD_ATT_REMOVER_PLUGIN, test x"$enable_att_remover_plugin" != xno)
2090 AM_CONDITIONAL(BUILD_ATTACHWARNER_PLUGIN, test x"$enable_attachwarner_plugin" != xno)
2091 AM_CONDITIONAL(BUILD_BOGOFILTER_PLUGIN, test x"$enable_bogofilter_plugin" != xno)
2092 AM_CONDITIONAL(BUILD_BSFILTER_PLUGIN, test x"$enable_bsfilter_plugin" != xno)
2093 AM_CONDITIONAL(BUILD_CLAMD_PLUGIN, test x"$enable_clamd_plugin" != xno)
2094 AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$enable_demo_plugin" != xno)
2095 AM_CONDITIONAL(BUILD_DILLO_PLUGIN, test x"$enable_dillo_plugin" != xno)
2096 AM_CONDITIONAL(BUILD_FANCY_PLUGIN, test x"$enable_fancy_plugin" != xno)
2097 AM_CONDITIONAL(BUILD_FETCHINFO_PLUGIN, test x"$enable_fetchinfo_plugin" != xno)
2098 AM_CONDITIONAL(BUILD_GDATA_PLUGIN, test x"$enable_gdata_plugin" != xno)
2099 AM_CONDITIONAL(BUILD_KEYWORD_WARNER_PLUGIN, test x"$enable_keyword_warner_plugin" != xno)
2100 AM_CONDITIONAL(BUILD_LIBRAVATAR_PLUGIN, test x"$enable_libravatar_plugin" != xno)
2101 AM_CONDITIONAL(BUILD_LITEHTML_VIEWER_PLUGIN, test x"$enable_litehtml_viewer_plugin" != xno)
2102 AM_CONDITIONAL(BUILD_MAILMBOX_PLUGIN, test x"$enable_mailmbox_plugin" != xno)
2103 AM_CONDITIONAL(BUILD_MANAGESIEVE_PLUGIN, test x"$enable_managesieve_plugin" != xno)
2104 AM_CONDITIONAL(BUILD_NEWMAIL_PLUGIN, test x"$enable_newmail_plugin" != xno)
2105 AM_CONDITIONAL(BUILD_NOTIFICATION_PLUGIN, test x"$enable_notification_plugin" != xno)
2106 AM_CONDITIONAL(BUILD_HOTKEYS, test x"$enable_notification_plugin" != xno -a x"$HAVE_HOTKEYS" = xyes)
2107 AM_CONDITIONAL(BUILD_PDF_VIEWER_PLUGIN, test x"$enable_pdf_viewer_plugin" != xno)
2108 AM_CONDITIONAL(BUILD_PERL_PLUGIN, test x"$enable_perl_plugin" != xno)
2109 AM_CONDITIONAL(BUILD_PYTHON_PLUGIN, test x"$enable_python_plugin" != xno)
2110 AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN, test x"$enable_pgpcore_plugin" != xno)
2111 AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN, test x"$enable_pgpmime_plugin" != xno)
2112 AM_CONDITIONAL(BUILD_PGPINLINE_PLUGIN, test x"$enable_pgpinline_plugin" != xno)
2113 AM_CONDITIONAL(BUILD_RSSYL_PLUGIN, test x"$enable_rssyl_plugin" != xno)
2114 AM_CONDITIONAL(BUILD_SMIME_PLUGIN, test x"$enable_smime_plugin" != xno)
2115 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$enable_spamassassin_plugin" != xno)
2116 AM_CONDITIONAL(BUILD_SPAM_REPORT_PLUGIN, test x"$enable_spam_report_plugin" != xno)
2117 AM_CONDITIONAL(BUILD_TNEF_PARSE_PLUGIN, test x"$enable_tnef_parse_plugin" != xno)
2118 AM_CONDITIONAL(BUILD_VCALENDAR_PLUGIN, test x"$enable_vcalendar_plugin" != xno)
2121 dnl ****************************
2122 dnl ** Final configure output **
2123 dnl ****************************
2129 src/common/version.h
2133 src/common/passcrypt.h
2134 src/common/tests/Makefile
2137 src/plugins/Makefile
2138 src/plugins/acpi_notifier/Makefile
2139 src/plugins/address_keeper/Makefile
2140 src/plugins/address_keeper/version.rc
2141 src/plugins/archive/Makefile
2142 src/plugins/att_remover/Makefile
2143 src/plugins/att_remover/version.rc
2144 src/plugins/attachwarner/Makefile
2145 src/plugins/attachwarner/version.rc
2146 src/plugins/bogofilter/Makefile
2147 src/plugins/bsfilter/Makefile
2148 src/plugins/bsfilter/version.rc
2149 src/plugins/clamd/Makefile
2150 src/plugins/clamd/libclamd/Makefile
2151 src/plugins/demo/Makefile
2152 src/plugins/dillo/Makefile
2153 src/plugins/fancy/Makefile
2154 src/plugins/fancy/version.rc
2155 src/plugins/fetchinfo/Makefile
2156 src/plugins/fetchinfo/version.rc
2157 src/plugins/gdata/Makefile
2158 src/plugins/keyword_warner/Makefile
2159 src/plugins/keyword_warner/version.rc
2160 src/plugins/litehtml_viewer/Makefile
2161 src/plugins/litehtml_viewer/version.rc
2162 src/plugins/litehtml_viewer/litehtml/Makefile
2163 src/plugins/libravatar/Makefile
2164 src/plugins/libravatar/version.rc
2165 src/plugins/mailmbox/Makefile
2166 src/plugins/mailmbox/version.rc
2167 src/plugins/managesieve/Makefile
2168 src/plugins/managesieve/version.rc
2169 src/plugins/newmail/Makefile
2170 src/plugins/notification/Makefile
2171 src/plugins/notification/version.rc
2172 src/plugins/notification/gtkhotkey/Makefile
2173 src/plugins/pdf_viewer/Makefile
2174 src/plugins/pdf_viewer/version.rc
2175 src/plugins/perl/Makefile
2176 src/plugins/perl/tools/Makefile
2177 src/plugins/python/Makefile
2178 src/plugins/python/examples/Makefile
2179 src/plugins/pgpcore/Makefile
2180 src/plugins/pgpcore/version.rc
2181 src/plugins/pgpmime/Makefile
2182 src/plugins/pgpmime/version.rc
2183 src/plugins/pgpinline/Makefile
2184 src/plugins/pgpinline/version.rc
2185 src/plugins/rssyl/Makefile
2186 src/plugins/rssyl/version.rc
2187 src/plugins/rssyl/tests/Makefile
2188 src/plugins/rssyl/libfeed/Makefile
2189 src/plugins/rssyl/libfeed/tests/Makefile
2190 src/plugins/smime/Makefile
2191 src/plugins/smime/version.rc
2192 src/plugins/spamassassin/Makefile
2193 src/plugins/spam_report/Makefile
2194 src/plugins/spam_report/version.rc
2195 src/plugins/tnef_parse/Makefile
2196 src/plugins/tnef_parse/version.rc
2197 src/plugins/vcalendar/Makefile
2198 src/plugins/vcalendar/version.rc
2209 dnl Output the configuration summary
2211 echo "$PACKAGE $VERSION"
2213 if test x"$enable_alternate_addressbook" = xyes; then
2214 echo "Using Address Book : Alternate experimental interface"
2216 echo "Using Address Book : Original stable interface"
2217 echo "JPilot : $enable_jpilot"
2218 echo "LDAP : $enable_ldap"
2220 echo "gnuTLS : $enable_gnutls"
2221 echo "iconv : $am_cv_func_iconv"
2222 echo "compface : $enable_compface"
2223 echo "IPv6 : $enable_ipv6"
2224 echo "enchant : $enable_enchant"
2225 echo "IMAP4 : $enable_libetpan"
2226 echo "NNTP : $enable_libetpan"
2227 echo "Crash dialog : $enable_crash_dialog"
2228 echo "LibSM : $enable_libsm"
2229 echo "DBUS : $enable_dbus"
2230 echo "NetworkManager : $enable_networkmanager"
2231 echo "Manual : $enable_manual"
2232 echo "Generic UMPC code : $enable_generic_umpc"
2233 echo "SVG support : $enable_svg"
2234 echo "Config dir : $ac_cv_with_config_dir"
2235 echo "Password crypto : $pwd_crypto"
2236 echo "Unit tests : $enable_tests"
2240 for plugin in $PLUGINS; do
2242 if test x"$plugin" = xnotification; then
2244 for notif_feature in $notification_features; do
2245 echo " $notif_feature"
2247 if test "x$notification_missing_dependencies" != x; then
2248 echo " Disabled due to missing dependencies:"
2249 for notif_miss_dep in $notification_missing_dependencies; do
2250 echo " $notif_miss_dep"
2255 if test "x$DISABLED_PLUGINS" != x; then
2257 for plugin in $DISABLED_PLUGINS; do
2262 if test "x$MISSING_DEPS_PLUGINS" != x; then
2263 echo " Disabled due to missing dependencies:"
2264 for plugin in $MISSING_DEPS_PLUGINS; do
2269 echo "The binary will be installed in $prefix/bin"
2271 echo "Configure finished, type 'make' to build."