4 AC_CONFIG_AUX_DIR(config)
5 AC_CONFIG_MACRO_DIR([m4])
19 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
20 VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
22 VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}cvs${EXTRA_VERSION}${EXTRA_GTK2_VERSION}
29 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
30 dnl AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
31 dnl AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
34 AC_SUBST(MAJOR_VERSION)
35 AC_SUBST(MINOR_VERSION)
36 AC_SUBST(MICRO_VERSION)
37 AC_SUBST(EXTRA_VERSION)
40 AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
41 if test "$GNOME_CONFIG" != no; then
42 gnomedatadir="`gnome-config --datadir`"
43 gnomeprefix="`gnome-config --prefix`"
44 if test "${prefix}" = "NONE"; then
45 gnomedatadir="${ac_default_prefix}/${gnomedatadir#${gnomeprefix}}"
47 gnomedatadir="${prefix}/${gnomedatadir#${gnomeprefix}}"
49 AC_SUBST(gnomedatadir)
51 AM_CONDITIONAL(CLAWS_GNOME, test -n "$gnomedatadir")
53 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
54 if test x$PKG_CONFIG = xno ; then
55 AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
58 dnl GNOME 2.x installed?
59 PKG_CHECK_MODULES(GNOME2, libgnome-2.0 >= 2.0, ac_enable_gnome2=yes, ac_enable_gnome2=no)
60 AM_CONDITIONAL(CLAWS_GNOME2, test x"$ac_enable_gnome2" = x"yes")
62 dnl libtool versioning
63 LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
64 LT_CURRENT=`expr $MICRO_VERSION - $INTERFACE_AGE`
65 LT_REVISION=$INTERFACE_AGE
66 LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
72 dnl Specify a header configuration file
73 AC_CONFIG_HEADERS(config.h)
74 AC_CONFIG_HEADERS(claws-features.h)
78 dnl Checks for programs.
98 dnl ******************************
100 dnl Not needed anymore because we
101 dnl do AC_CANONICAL_SYSTEM above
102 dnl ******************************
103 dnl AC_CANONICAL_HOST
105 dnl Copied from the official gtk+-2 configure.in
106 AC_MSG_CHECKING([for some Win32 platform])
108 *-*-mingw*|*-*-cygwin*)
110 LDFLAGS="$LDFLAGS -mwindows"
116 AC_MSG_RESULT([$platform_win32])
117 AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = x"yes")
119 AC_MSG_CHECKING([for native Win32])
128 AC_MSG_RESULT([$os_win32])
129 AM_CONDITIONAL(OS_WIN32, test x"$os_win32" = x"yes")
131 AC_MSG_CHECKING([for Cygwin])
140 AC_MSG_RESULT([$env_cygwin])
141 AM_CONDITIONAL(CYGWIN, test x"$env_cygwin" = x"yes")
143 if test "$GCC" = "yes"
145 CFLAGS="$CFLAGS -Wno-unused-function"
146 #CFLAGS="-g -Wall -Wno-unused-function"
149 AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
150 _gcc_cflags_save=$CFLAGS
151 CFLAGS="-Wno-pointer-sign"
152 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],_gcc_psign=yes,_gcc_psign=no)
153 AC_MSG_RESULT($_gcc_psign)
154 CFLAGS=$_gcc_cflags_save;
155 if test x"$_gcc_psign" = xyes ; then
156 CFLAGS="$CFLAGS -Wno-pointer-sign"
159 CFLAGS="$CFLAGS -Wall"
161 if test $USE_MAINTAINER_MODE = yes; then
162 CFLAGS="-g -Wall -Wno-pointer-sign"
168 CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
171 # Note that we need to link to pthreadGC2 in all cases. This
172 # is because some locking is used even when pthread support is
174 pthread_name=pthreadGC2
175 CFLAGS="$CFLAGS -mms-bitfields"
176 LIBS="$LIBS -l${pthread_name} -lws2_32 -lregex"
179 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
180 CFLAGS="$CFLAGS -std=gnu99 -DSOLARIS"
187 dnl floor and ceil are in -lm
191 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
194 LIBS="$LIBS $GTK_LIBS"
195 AC_CHECK_FUNCS(bind_textdomain_codeset)
199 ALL_LINGUAS="bg ca cs de en_GB es fi fr hu id_ID it ja lt nl pl pt_BR pt_PT ru sk sv uk zh_CN zh_TW"
200 GETTEXT_PACKAGE=claws-mail
201 AC_SUBST(GETTEXT_PACKAGE)
202 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
204 AM_GNU_GETTEXT_VERSION([0.15])
205 AM_GNU_GETTEXT([external])
207 manualdir='${docdir}/manual'
208 AC_ARG_WITH(manualdir,
209 [ --with-manualdir=DIR Manual directory],
210 [manualdir="$withval"])
213 AC_ARG_ENABLE(manual,
214 [ --disable-manual do not build manual],
215 [ac_cv_enable_manual=$enableval], [ac_cv_enable_manual=yes])
217 dnl ******************************
218 dnl ** Check for required tools **
219 dnl ** to build manuals **
220 dnl ******************************
222 AC_PATH_PROG(DOCBOOK2HTML, docbook2html)
223 AC_PATH_PROG(DOCBOOK2TXT, docbook2txt)
224 AC_PATH_PROG(DOCBOOK2PS, docbook2ps)
225 AC_PATH_PROG(DOCBOOK2PDF, docbook2pdf)
227 AM_CONDITIONAL(MANUAL_HTML, test -n "$DOCBOOK2HTML")
228 AM_CONDITIONAL(MANUAL_TXT, test -n "$DOCBOOK2TXT")
229 AM_CONDITIONAL(MANUAL_PDF, test -n "$DOCBOOK2PDF")
230 AM_CONDITIONAL(MANUAL_PS, test -n "$DOCBOOK2PS")
232 if test x"$ac_cv_enable_manual" = x"yes"; then
233 if test -n "$DOCBOOK2TXT" -o -n "$DOCBOOK2HTML" \
234 -o -n "$DOCBOOK2PS" -o -n "$DOCBOOK2PDF"; then
235 ac_cv_enable_manual=yes
237 ac_cv_enable_manual=no
241 AM_CONDITIONAL(BUILD_MANUAL, test x"$ac_cv_enable_manual" = xyes)
243 dnl Set PACKAGE_DATA_DIR in config.h.
244 if test "x${datarootdir}" = 'x${prefix}/share'; then
245 if test "x${prefix}" = "xNONE"; then
246 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
248 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
251 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datarootdir}/${PACKAGE}",[PACKAGE_DATA_DIR])
254 AC_CHECK_LIB(xpg4, setlocale)
259 [ --disable-libsm disable libSM support for session management.],
260 [ac_cv_enable_libsm=$enableval], [ac_cv_enable_libsm=yes])
261 AC_MSG_CHECKING([whether to use LibSM])
262 if test x"$ac_cv_enable_libsm" = xyes; then
264 AC_CHECK_LIB(SM, SmcSaveYourselfDone,
265 [SM_LIBS="$X_LIBS -lSM -lICE"],ac_cv_enable_libsm=no,
267 AC_CHECK_HEADERS(X11/SM/SMlib.h,,ac_cv_enable_libsm=no)
268 if test x"$ac_cv_enable_libsm" = xyes; then
269 AC_DEFINE(HAVE_LIBSM, 1, [Define to 1 if you have libSM installed])
271 AC_MSG_RESULT(not found)
272 AC_MSG_WARN([*** LibSM will not be supported ***])
279 dnl Check for d_type member in struct dirent
280 AC_MSG_CHECKING([whether struct dirent has d_type member])
281 AC_CACHE_VAL(ac_cv_dirent_d_type,[
282 AC_TRY_COMPILE([#include <dirent.h>],
283 [struct dirent d; d.d_type = DT_REG;],
284 ac_cv_dirent_d_type=yes, ac_cv_dirent_d_type=no)
286 AC_MSG_RESULT($ac_cv_dirent_d_type)
287 if test $ac_cv_dirent_d_type = yes; then
288 AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
289 Define if `struct dirent' has `d_type' member.)
292 # Check whether mkdir does not take the permission argument.
293 GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
295 dnl Checks for header files.
299 AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \
300 sys/param.h sys/utsname.h sys/select.h \
301 wchar.h wctype.h locale.h netdb.h)
302 AC_CHECK_HEADER([execinfo.h], [AC_DEFINE(HAVE_BACKTRACE,1,[Has backtrace*() needed for retrieving stack traces])])
303 AC_SEARCH_LIBS(backtrace_symbols, [execinfo])
305 dnl alf - Check for apache installation f*ck up. apache may also install an
306 dnl fnmatch, which includes their own regex stuff if USE_HSREGEX is defined
307 AC_TRY_COMPILE([#include <stdlib.h>
308 #include <fnmatch.h>],
309 [int x = USE_HSREGEX;],
310 ac_cv_have_apache_fnmatch=yes, ac_cv_have_apache_fnmatch=no)
311 if test $ac_cv_have_apache_fnmatch = yes; then
312 AC_DEFINE(HAVE_APACHE_FNMATCH, 1, Define if you need to work around apache regex/fnmatch !KLUDGE!)
314 AC_MSG_CHECKING([whether to use Apache regex header kludge])
315 AC_MSG_RESULT($ac_cv_have_apache_fnmatch)
317 dnl Checks for typedefs, structures, and compiler characteristics.
324 dnl AC_CHECK_TYPE(wint_t, unsigned int) does not work because wint_t
325 dnl may be defined only in wchar.h (this happens with gcc-2.96).
326 dnl So we need to use this extended macro.
327 CLAWS_CHECK_TYPE(wint_t, unsigned int,
332 ], Define to `unsigned int' if <stddef.h> or <wchar.h> doesn't define.)
334 GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF, Used to test for a u32 typedef)
335 AC_CHECK_SIZEOF(unsigned short, 2)
336 AC_CHECK_SIZEOF(unsigned int, 4)
337 AC_CHECK_SIZEOF(unsigned long, 4)
339 dnl Checks for library functions.
341 AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
342 uname flock lockf inet_aton inet_addr \
343 fchmod mkstemp truncate getuid regcomp)
345 AC_CHECK_FUNCS(fgets_unlocked fwrite_unlocked)
347 dnl *****************
348 dnl ** common code **
349 dnl *****************
352 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6 gmodule-2.0 >= 2.6 gobject-2.0 >= 2.6 gthread-2.0 >= 2.6)
354 GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
355 AC_SUBST(GLIB_GENMARSHAL)
357 AC_SUBST(GLIB_CFLAGS)
360 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
362 LIBS="$LIBS $GTK_LIBS"
363 AC_CHECK_FUNCS(bind_textdomain_codeset)
366 dnl check for IPv6 option
368 [ --disable-ipv6 disable build IPv6 support],
369 [ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=yes])
371 dnl automated checks for IPv6 support.
372 AC_MSG_CHECKING([whether to use IPv6])
373 if test x"$ac_cv_enable_ipv6" = xyes; then
375 AC_MSG_CHECKING([for IPv6 support])
376 AC_CACHE_VAL(ac_cv_ipv6,[
377 AC_TRY_COMPILE([#define INET6
378 #include <sys/types.h>
379 #include <netinet/in.h>],
380 [int x = IPPROTO_IPV6; struct in6_addr a;],
381 ac_cv_ipv6=yes, ac_cv_ipv6=no)
383 AC_MSG_RESULT($ac_cv_ipv6)
384 if test $ac_cv_ipv6 = yes; then
385 AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
387 AC_MSG_WARN(*** IPv6 will not be supported ***)
395 AC_MSG_CHECKING([whether to use GnuTLS])
396 AC_ARG_ENABLE(gnutls, [ --enable-gnutls enable GnuTLS support],
397 [ac_cv_enable_gnutls=$enableval], [ac_cv_enable_gnutls=yes])
399 AC_MSG_RESULT($ac_cv_enable_gnutls)
400 if test "x$ac_cv_enable_gnutls" != "xno"; then
401 PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.2,
403 AC_DEFINE(USE_GNUTLS, 1, gnutls)
404 echo "Building with GnuTLS"
407 echo "Building without gnutls"
409 PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.11,
411 dnl No linking against libgcrypt needed
414 dnl linking against libgcrypt *is* needed
415 GNUTLS_LIBS="$GNUTLS_LIBS -lgcrypt"
417 AC_SUBST(GNUTLS_LIBS)
418 AC_SUBST(GNUTLS_CFLAGS)
421 dnl password encryption
426 AC_SEARCH_LIBS(encrypt, cipher, [], AC_MSG_ERROR(['encrypt'-function not found.]))
429 AC_SEARCH_LIBS(encrypt, crypt, [], AC_MSG_ERROR(['encrypt'-function not found.]))
436 AC_ARG_WITH(passcrypt-key, [ --with-passcrypt-key=KEY Key used to encode passwords (8 byte string)],
437 with_passcrypt_key="$withval", with_passcrypt_key="passkey0")
438 AC_SUBST(PASSCRYPT_KEY, $with_passcrypt_key)
440 dnl RC dir (will be default at a certain point in time)
441 AC_ARG_WITH(config-dir, [ --with-config-dir=RCDIR Local configuration dir (default: .claws-mail)],
442 ac_cv_with_config_dir="$withval", ac_cv_with_config_dir=".claws-mail")
443 if test x"$ac_cv_with_config_dir" = x""; then
444 ac_cv_with_config_dir=".claws-mail"
446 AC_DEFINE_UNQUOTED(CFG_RC_DIR, "$ac_cv_with_config_dir", Configuration directory)
448 dnl ************************
449 dnl ** GTK user interface **
450 dnl ************************
454 AS_HELP_STRING([--enable-gtk3],
455 [Determines whether to use Gtk+ 3.0.]),
456 [ac_cv_enable_gtk3=$enableval],[ac_cv_enable_gtk3=no])
457 AM_CONDITIONAL(GTK3, false)
458 AM_CONDITIONAL(GTK2, true)
459 if test x"$ac_cv_enable_gtk3" = x"yes"; then
460 PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.0 cairo)
461 AM_CONDITIONAL(GTK3, true)
462 AM_CONDITIONAL(GTK2, false)
464 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.16)
466 dnl --disable-deprecated switch for GTK2 purification
467 AC_ARG_ENABLE(deprecated, [ --disable-deprecated disable deprecated GTK functions. ],
468 [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
473 dnl enchant is used for spell checking
474 AC_MSG_CHECKING([whether to use enchant])
475 AC_ARG_ENABLE(enchant,
476 [ --disable-enchant disable enchant support],
477 [ac_cv_enable_enchant=$enableval], [ac_cv_enable_enchant=yes])
478 AC_MSG_RESULT($ac_cv_enable_enchant)
479 if test $ac_cv_enable_enchant = yes; then
480 PKG_CHECK_MODULES(ENCHANT, enchant >= 1.0.0,
482 AC_DEFINE(USE_ENCHANT, 1, enchant)
483 echo "Building with enchant"
484 ac_cv_enable_enchant=yes
485 CFLAGS="$CFLAGS `$PKG_CONFIG --cflags enchant`"
488 echo "Building without enchant-notification"
489 ac_cv_enable_enchant=no
491 AC_SUBST(ENCHANT_CFLAGS)
492 AC_SUBST(ENCHANT_LIBS)
495 dnl want crash dialog
496 AC_ARG_ENABLE(crash-dialog,
497 [ --enable-crash-dialog Enable crash dialog [default=no]],
498 [ac_cv_enable_crash_dialog=$enableval], [ac_cv_enable_crash_dialog=no])
499 if test $ac_cv_enable_crash_dialog = yes; then
500 dnl check if GDB is somewhere
501 AC_CHECK_PROG(ac_cv_enable_crash_dialog, gdb, yes, no)
502 AC_MSG_CHECKING([whether to use crash dialog])
503 if test $ac_cv_enable_crash_dialog = yes; then
504 AC_DEFINE(CRASH_DIALOG, 1, Pop up crash dialog)
506 AC_MSG_RESULT($ac_cv_enable_crash_dialog)
510 AC_ARG_ENABLE(generic-umpc,
511 [ --enable-generic-umpc Enable generic UMPC code [default=no]],
512 [ac_cv_enable_generic_umpc=$enableval], [ac_cv_enable_generic_umpc=no])
513 if test $ac_cv_enable_generic_umpc = yes; then
514 AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
515 AC_MSG_RESULT($ac_cv_enable_generic_umpc)
520 [ --enable-maemo build for the Maemo platform [default=no]],
521 [ac_cv_enable_maemo=$enableval], [ac_cv_enable_maemo=no])
522 if test $ac_cv_enable_maemo = yes; then
523 PKG_CHECK_MODULES(MAEMO, libosso hildon-libs hildon-fm gnome-vfs-2.0, ac_cv_enable_maemo=yes,
524 ac_cv_enable_maemo=no)
525 AC_SUBST(MAEMO_CFLAGS)
527 if test $ac_cv_enable_maemo = no; then
529 PKG_CHECK_MODULES(MAEMO, libosso hildon-1 hildon-fm-2 gnome-vfs-2.0 hal, ac_cv_enable_maemo=yes,
530 ac_cv_enable_maemo=no)
531 AC_SUBST(MAEMO_CFLAGS)
533 if test $ac_cv_enable_maemo = no; then
534 AC_MSG_ERROR(one of libosso hildon-libs hildon-fm hildon-1 hildon-fm-2 not found)
536 AC_DEFINE(MAEMO, 1, Build for maemo)
537 AC_DEFINE(CHINOOK, 1, Maemo chinook)
538 AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
539 ac_cv_enable_generic_umpc=yes
542 AC_DEFINE(MAEMO, 1, Build for maemo)
543 AC_DEFINE(GENERIC_UMPC, 1, Generic UMPC code)
544 ac_cv_enable_generic_umpc=yes
548 PKG_CHECK_MODULES(CONIC, conic, ac_cv_enable_conic=yes,
549 ac_cv_enable_conic=no)
550 AC_SUBST(CONIC_CFLAGS)
552 if test $ac_cv_enable_conic = yes; then
553 AC_DEFINE(CONIC, 1, Have conic lib)
556 dnl Check for X-Face support
557 AC_ARG_ENABLE(compface,
558 [ --disable-compface disable compface (X-Face) support],
559 [ac_cv_enable_compface=$enableval], [ac_cv_enable_compface=yes])
560 AC_MSG_CHECKING([whether to use compface])
561 if test x"$ac_cv_enable_compface" = xyes; then
563 AC_CHECK_LIB(compface, uncompface,
564 [AC_DEFINE(HAVE_LIBCOMPFACE, 1, Define if you want compface support.)],
565 [ac_cv_enable_compface=no])
566 if test x"$ac_cv_enable_compface" = xyes; then
567 COMPFACE_LIBS="-lcompface"
571 AC_SUBST(COMPFACE_LIBS)
576 dnl check for pthread support
577 AC_ARG_ENABLE(pthread,
578 [ --disable-pthread disable pthread support],
579 [ac_cv_enable_pthread=$enableval], [ac_cv_enable_pthread=yes])
580 AC_MSG_CHECKING([whether to use pthread])
581 if test x$ac_cv_enable_pthread = xno; then
586 # For W32 we need to use a special ptrhead lib. In this case we can't
587 # use AC_CHECK_LIB because it has no means of checking for a
588 # library installed under a different name. Checking for the
590 if test -n "${pthread_name}" ; then
591 ac_cv_enable_pthread=yes
593 AC_CHECK_LIB(pthread, pthread_create, :, ac_cv_enable_pthread=no)
595 AC_CHECK_HEADERS(pthread.h, :, ac_cv_enable_pthread=no)
597 if test x$ac_cv_enable_pthread = xyes; then
598 AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
599 if test -z "${pthread_name}" ; then
600 PTHREAD_LIBS="-lpthread"
605 AC_SUBST(PTHREAD_LIBS)
608 dnl Check whether we need to pass -lresolv
609 dnl We know that we don't need it for W32.
611 if test x$os_win32 = xno; then
614 ac_cv_var__res_options=no
615 AC_TRY_LINK([#include <sys/types.h>
616 #include <sys/socket.h>
617 #include <netinet/in.h>
618 #include <arpa/nameser.h>
619 #include <resolv.h>],
620 [_res.options = RES_INIT;],
621 ac_cv_var__res_options=yes);
622 if test "$ac_cv_var__res_options" != "yes"; then
627 if test "x$LIBRESOLV" = "x"; then
628 AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
634 LIBS="$LIBS $LIBRESOLV"
636 dnl #######################################################################
637 dnl # Check for startup notification
638 dnl #######################################################################
639 AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification disable startup notification support],,enable_startup_notification=yes)
641 if test "x$enable_startup_notification" = "xyes"; then
642 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
644 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
645 echo "Building with libstartup-notification"
646 enable_startup_notification=yes
649 echo "Building without libstartup-notification"
650 enable_startup_notification=no
653 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
654 AC_SUBST(STARTUP_NOTIFICATION_LIBS)
657 dnl #######################################################################
658 dnl # Check for D-Bus support
659 dnl #######################################################################
660 AC_ARG_ENABLE(dbus, [ --disable-dbus disable dbus support],,enable_dbus=yes)
662 if test "x$enable_dbus" = "xyes"; then
663 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60, dbus-glib-1 >= 0.60],
665 AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if glib bindings of D-Bus are available])
669 echo "D-Bus requirements not met. D-Bus support not activated."
672 AC_SUBST(DBUS_CFLAGS)
676 dnl #######################################################################
677 dnl # Configure address book support
678 dnl #######################################################################
680 dnl #######################################################################
681 dnl # Check for new address book support
682 dnl #######################################################################
683 AC_MSG_CHECKING([whether DBUS support for new address book is present])
684 if test x"$enable_dbus_glib" = xyes; then
686 AC_MSG_CHECKING([whether to enable new address book])
687 AC_ARG_ENABLE(new-addrbook, [ --enable-new-addrbook enable new address book],,enable_new_addrbook=no)
688 if test x"$enable_new_addrbook" = xyes; then
690 PKG_CHECK_MODULES(CONTACTS, [claws-contacts],
692 AC_DEFINE(USE_NEW_ADDRBOOK, 1, [Define if new address book is to be activated.])
693 enable_new_addrbook=yes
694 AC_SUBST(CONTACTS_CFLAGS)
695 AC_SUBST(CONTACTS_LIBS)
698 enable_new_addrbook=no
702 enable_new_addrbook=no
706 enable_new_addrbook=no
709 dnl #######################################################################
710 dnl # Check for old address book support
711 dnl #######################################################################
712 if test x"$enable_new_addrbook" = xno; then
713 dnl for LDAP support in addressbook
714 dnl no check for libraries; dynamically loaded
716 [ --disable-ldap disable LDAP support],
717 [ac_cv_enable_ldap=$enableval], [ac_cv_enable_ldap=yes])
718 AC_MSG_CHECKING([whether to use LDAP])
719 if test x"$ac_cv_enable_ldap" = xno; then
721 elif test x"$ac_cv_enable_ldap" = xyes -a x"$ac_cv_enable_pthread" = xno; then
722 AC_MSG_RESULT(no - LDAP support needs pthread support)
725 elif test x"$platform_win32" = xyes; then
727 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
728 LDAP_LIBS="-lwldap32"
733 dnl check for available libraries, and pull them in
734 AC_CHECK_LIB(resolv, res_query, LDAP_LIBS="$LDAP_LIBS -lresolv")
735 AC_CHECK_LIB(socket, bind, LDAP_LIBS="$LDAP_LIBS -lsocket")
736 AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
737 AC_CHECK_LIB(lber, ber_get_tag, LDAP_LIBS="$LDAP_LIBS -llber",,
740 AC_CHECK_HEADERS(ldap.h lber.h,
741 [ ac_cv_enable_ldap=yes ],
742 [ ac_cv_enable_ldap=no ])
744 if test "$ac_cv_enable_ldap" = yes; then
745 AC_CHECK_LIB(ldap, ldap_open,
746 [ ac_cv_enable_ldap=yes ],
747 [ ac_cv_enable_ldap=no ],
750 AC_CHECK_LIB(ldap, ldap_start_tls_s,
751 [ ac_cv_have_tls=yes ],
752 [ ac_cv_have_tls=no ])
756 AC_MSG_CHECKING([whether ldap library is available])
757 AC_MSG_RESULT($ac_cv_enable_ldap)
759 AC_MSG_CHECKING([whether TLS library is available])
760 AC_MSG_RESULT($ac_cv_have_tls)
762 if test "$ac_cv_enable_ldap" = yes; then
763 AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
764 LDAP_LIBS="$LDAP_LIBS -lldap"
766 if test "$ac_cv_have_tls" = yes; then
767 AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
769 dnl As of OpenLDAP API version 3000 a number of functions has
770 dnl been deprecated. As Claws-mail compiles and runs on many
771 dnl platforms and many versions of OpenLDAP we need to be able
772 dnl to switch between the old and new API because new API has
773 dnl added new functions replacing old ones and at the same time
774 dnl old functions has been changed.
775 dnl If cross-compiling defaults to enable deprecated features
776 dnl for maximum portability
777 AC_MSG_CHECKING([The API version of OpenLDAP])
781 [if (LDAP_API_VERSION >= 3000)
784 [AC_MSG_RESULT([version < 3000])
785 AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 0, Define if OpenLDAP API is at least version 3000.)],
786 [AC_MSG_RESULT([version >= 3000])
787 AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 1, Define if OpenLDAP API is at least version 3000.)],
788 [AC_MSG_RESULT([Enabling deprecated features in OpenLDAP])
789 AC_DEFINE(OPEN_LDAP_API_AT_LEAST_3000, 0, Define if OpenLDAP API is at least version 3000.)
790 AC_DEFINE(LDAP_DEPRECATED, 1, Define to activate deprecated features in OpenLDAP)]
795 dnl for JPilot support in addressbook
796 dnl no check for libraries; these are dynamically loaded
797 AC_ARG_ENABLE(jpilot,
798 [ --disable-jpilot disable JPilot support],
799 [ac_cv_enable_jpilot=$enableval], [ac_cv_enable_jpilot=yes])
800 AC_MSG_CHECKING([whether to use JPilot])
801 if test "$ac_cv_enable_jpilot" = yes; then
803 AC_CHECK_HEADERS(pi-args.h pi-appinfo.h pi-address.h pi-version.h,
804 [ AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ],
805 [ ac_cv_enable_jpilot=no ])
806 if test "$ac_cv_enable_jpilot" = no; then
807 AC_CHECK_HEADERS(libpisock/pi-args.h libpisock/pi-appinfo.h libpisock/pi-address.h libpisock/pi-version.h,
808 [ ac_cv_enable_jpilot=yes
809 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.) ])
812 AC_CHECK_LIB(pisock, unpack_Address, [JPILOT_LIBS="-lpisock"], [JPILOT_LIBS="" ac_cv_enable_jpilot="no"])
813 if test x"$ac_cv_enable_jpilot" = xyes; then
814 AC_DEFINE(USE_JPILOT, 1, Define if you want JPilot support in addressbook.)
816 AC_MSG_NOTICE([JPilot support not available])
818 AC_SUBST(JPILOT_LIBS)
824 AM_CONDITIONAL(BUILD_NEWADDRBOOK, test x"$enable_new_addrbook" = x"yes")
826 dnl #######################################################################
827 dnl # Check for NetworkManager support
828 dnl #######################################################################
829 if test x"$enable_dbus_glib" = xyes; then
830 AC_ARG_ENABLE(networkmanager-support, [ --disable-networkmanager-support disable NetworkManager support],,enable_networkmanager_support=yes)
831 if test x"$enable_networkmanager_support" = xyes; then
832 PKG_CHECK_MODULES(NETWORKMANAGER_SUPPORT, NetworkManager >= 0.6.2,
834 AC_DEFINE(HAVE_NETWORKMANAGER_SUPPORT, 1, [Define if NetworkManager support is to be included.])
835 echo "Building with NetworkManager support"
836 enable_networkmanager_support=yes
839 echo "NetworkManager not found."
840 enable_networkmanager_support=no
842 AC_SUBST(NETWORKMANAGER_SUPPORT_CFLAGS)
845 echo "NetworkManager support deactivated as D-Bus requirements were not met."
846 enable_networkmanager_support=no
849 dnl *************************
850 dnl ** section for plugins **
851 dnl *************************
855 dnl Find curl-config, used by fancy, vcalendar
856 PKG_CHECK_MODULES(CURL, libcurl, [have_curl=yes], [have_curl=no])
858 AC_SUBST(CURL_CFLAGS)
860 dnl --- acpi_notifier ---
861 AC_ARG_ENABLE(acpi_notifier-plugin,
862 [ --disable-acpi_notifier-plugin do not build acpi_notifier plugin],
863 [ac_cv_enable_acpi_notifier_plugin=$enableval], [ac_cv_enable_acpi_notifier_plugin=yes])
864 if test x"$ac_cv_enable_acpi_notifier_plugin" = xyes; then
865 PLUGINS="acpi_notifier $PLUGINS"
870 AM_CONDITIONAL(BUILD_ACPI_NOTIFIER_PLUGIN, test x"$ac_cv_enable_acpi_notifier_plugin" = xyes)
872 dnl --- address_keeper ---
873 AC_ARG_ENABLE(address_keeper-plugin,
874 [ --disable-address_keeper-plugin do not build address_keeper plugin],
875 [ac_cv_enable_address_keeper_plugin=$enableval], [ac_cv_enable_address_keeper_plugin=yes])
876 if test x"$ac_cv_enable_address_keeper_plugin" = xyes; then
877 PLUGINS="address_keeper $PLUGINS"
882 AM_CONDITIONAL(BUILD_ADDRESS_KEEPER_PLUGIN, test x"$ac_cv_enable_address_keeper_plugin" = xyes)
885 AC_ARG_ENABLE(archive-plugin,
886 [ --disable-archive-plugin do not build archive plugin],
887 [ac_cv_enable_archive_plugin=$enableval], [ac_cv_enable_archive_plugin=yes])
888 if test x"$ac_cv_enable_archive_plugin" = xyes; then
889 AC_SEARCH_LIBS([archive_read_new], [archive],
890 ARCHIVE_LIBS=-larchive
891 AC_SUBST(ARCHIVE_LIBS),
892 echo "You need to install libarchive"
895 PLUGINS="archive $PLUGINS"
900 AM_CONDITIONAL(BUILD_ARCHIVE_PLUGIN, test x"$ac_cv_enable_archive_plugin" = xyes)
902 dnl --- att_remover ---
903 AC_ARG_ENABLE(att_remover-plugin,
904 [ --disable-att_remover-plugin do not build att_remover plugin],
905 [ac_cv_enable_att_remover_plugin=$enableval], [ac_cv_enable_att_remover_plugin=yes])
906 if test x"$ac_cv_enable_att_remover_plugin" = xyes; then
907 PLUGINS="att_remover $PLUGINS"
912 AM_CONDITIONAL(BUILD_ATT_REMOVER_PLUGIN, test x"$ac_cv_enable_att_remover_plugin" = xyes)
914 dnl --- attachwarner ---
915 AC_ARG_ENABLE(attachwarner-plugin,
916 [ --disable-attachwarner-plugin do not build attachwarner plugin],
917 [ac_cv_enable_attachwarner_plugin=$enableval], [ac_cv_enable_attachwarner_plugin=yes])
918 if test x"$ac_cv_enable_attachwarner_plugin" = xyes; then
919 PLUGINS="attachwarner $PLUGINS"
924 AM_CONDITIONAL(BUILD_ATTACHWARNER_PLUGIN, test x"$ac_cv_enable_attachwarner_plugin" = xyes)
926 dnl --- Bogofilter ---
927 AC_MSG_CHECKING([whether to build Bogofilter plugin])
928 AC_ARG_ENABLE(bogofilter-plugin,
929 [ --disable-bogofilter-plugin do not build bogofilter plugin],
930 [ac_cv_enable_bogofilter_plugin=$enableval], [ac_cv_enable_bogofilter_plugin=yes])
931 if test x"$ac_cv_enable_bogofilter_plugin" = xyes; then
933 PLUGINS="bogofilter $PLUGINS"
934 AC_DEFINE(USE_BOGOFILTER_PLUGIN, 1, Define if bogofilter plugin is being built.)
938 AM_CONDITIONAL(BUILD_BOGOFILTER_PLUGIN, test x"$ac_cv_enable_bogofilter_plugin" = xyes)
941 AC_MSG_CHECKING([whether to build bsfilter plugin])
942 AC_ARG_ENABLE(bsfilter-plugin,
943 [ --disable-bsfilter-plugin do not build bsfilter plugin],
944 [ac_cv_enable_bsfilter_plugin=$enableval], [ac_cv_enable_bsfilter_plugin=yes])
945 if test x"$ac_cv_enable_bsfilter_plugin" = xyes; then
946 PLUGINS="bsfilter $PLUGINS"
951 AM_CONDITIONAL(BUILD_BSFILTER_PLUGIN, test x"$ac_cv_enable_bsfilter_plugin" = xyes)
954 AC_MSG_CHECKING([whether to build clamd plugin])
955 AC_ARG_ENABLE(clamd-plugin,
956 [ --disable-clamd-plugin do not build clamd plugin],
957 [ac_cv_enable_clamd_plugin=$enableval], [ac_cv_enable_clamd_plugin=yes])
958 if test x"$ac_cv_enable_clamd_plugin" = xyes; then
959 PLUGINS="clamd $PLUGINS"
964 AM_CONDITIONAL(BUILD_CLAMD_PLUGIN, test x"$ac_cv_enable_clamd_plugin" = xyes)
967 AC_ARG_ENABLE(demo-plugin,
968 [ --enable-demo-plugin build demo plugin],
969 [ac_cv_enable_demo_plugin=$enableval], [ac_cv_enable_demo_plugin=no])
970 if test x"$ac_cv_enable_demo_plugin" = xyes; then
971 PLUGINS="demo $PLUGINS"
976 AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$ac_cv_enable_demo_plugin" = xyes)
979 AC_MSG_CHECKING([whether to build Fancy plugin])
980 AC_ARG_ENABLE(fancy-plugin,
981 [ --disable-fancy-plugin do not build Fancy plugin for html mail rendering],
982 [ac_cv_enable_fancy_plugin=$enableval], [ac_cv_enable_fancy_plugin=yes])
983 if test x"$ac_cv_enable_fancy_plugin" = xyes; then
986 PKG_CHECK_MODULES(WEBKIT, webkit-1.0,
988 PLUGINS="fancy $PLUGINS"
991 echo "webkit-1.0 not found."
992 ac_cv_enable_fancy_plugin=no
994 AC_SUBST(WEBKIT_LIBS)
995 AC_SUBST(WEBKIT_CFLAGS)
997 if test x"$ac_cv_enable_fancy_plugin" = xyes; then
998 dnl Check for libsoup-gnome
999 PKG_CHECK_MODULES(LIBSOUP_GNOME, libsoup-gnome-2.4 >= 2.26, ac_cv_enable_soup_gnome=yes, ac_cv_enable_soup_gnome=no)
1000 if test x$ac_cv_enable_soup_gnome = xyes; then
1001 AC_DEFINE(HAVE_LIBSOUP_GNOME, 1, Define if you want soup gnome proxy support)
1003 AC_SUBST(LIBSOUP_GNOME_CFLAGS)
1004 AC_SUBST(LIBSOUP_GNOME_LIBS)
1006 PKG_CHECK_MODULES(GTKPRINTUNIX, gtk+-unix-print-2.0, ac_cv_enable_gtkprint=yes, ac_cv_enable_gtkprint=no)
1007 if test x$ac_cv_enable_gtkprint = xyes; then
1008 AC_DEFINE(USE_PRINTUNIX, 1, Define if you want gtk+-unix-print support)
1010 AC_MSG_RESULT(not found)
1012 AC_SUBST(GTKPRINTUNIX_CFLAGS)
1013 AC_SUBST(GTKPRINTUNIX_LIBS)
1015 AM_CONDITIONAL(BUILD_FANCY_PLUGIN, test x"$ac_cv_enable_fancy_plugin" = xyes)
1017 dnl --- fetchinfo ---
1018 AC_MSG_CHECKING([whether to build fetchinfo plugin])
1019 AC_ARG_ENABLE(fetchinfo-plugin,
1020 [ --disable-fetchinfo-plugin do not build fetchinfo plugin],
1021 [ac_cv_enable_fetchinfo_plugin=$enableval], [ac_cv_enable_fetchinfo_plugin=yes])
1022 if test x"$ac_cv_enable_fetchinfo_plugin" = xyes; then
1023 PLUGINS="fetchinfo $PLUGINS"
1028 AM_CONDITIONAL(BUILD_FETCHINFO_PLUGIN, test x"$ac_cv_enable_fetchinfo_plugin" = xyes)
1031 AC_MSG_CHECKING([whether to build gdata plugin])
1032 AC_ARG_ENABLE(gdata-plugin,
1033 [ --disable-gdata-plugin do not build gdata plugin],
1034 [ac_cv_enable_gdata_plugin=$enableval], [ac_cv_enable_gdata_plugin=yes])
1035 if test x"$ac_cv_enable_gdata_plugin" = xyes; then
1036 PKG_CHECK_MODULES(GDATA, libgdata >= 0.9.1, [ac_cv_enable_gdata_plugin=yes], [ac_cv_enable_gdata_plugin=no])
1037 if test x"$ac_cv_enable_gdata_plugin" = xyes; then
1038 AC_DEFINE(HAVE_GDATA_VERSION_0_9_1, 1, [at least version 0.9.1 of libgdata is available])
1039 AC_DEFINE(HAVE_GDATA_VERSION_0_9, 1, [at least version 0.9.0 of libgdata is available])
1041 PKG_CHECK_MODULES(GDATA, libgdata >= 0.6.4, [ac_cv_enable_gdata_plugin=yes], [ac_cv_enable_gdata_plugin=no])
1043 if test x"$ac_cv_enable_gdata_plugin" = xyes; then
1044 AC_SUBST(GDATA_CFLAGS)
1045 AC_SUBST(GDATA_LIBS)
1046 AC_DEFINE(CM_GDATA_CLIENT_ID, ["Claws Mail GData plugin"], [client id])
1048 PLUGINS="gdata $PLUGINS"
1051 AC_MSG_ERROR(libgdata is not available)
1056 AM_CONDITIONAL(BUILD_GDATA_PLUGIN, test x"$ac_cv_enable_gdata_plugin" = xyes)
1058 dnl --- mailmbox ---
1059 AC_MSG_CHECKING([whether to build mailmbox plugin])
1060 AC_ARG_ENABLE(mailmbox-plugin,
1061 [ --disable-mailmbox-plugin do not build mailmbox plugin],
1062 [ac_cv_enable_mailmbox_plugin=$enableval], [ac_cv_enable_mailmbox_plugin=yes])
1063 if test x"$ac_cv_enable_mailmbox_plugin" = xyes; then
1064 PLUGINS="mailmbox $PLUGINS"
1069 AM_CONDITIONAL(BUILD_MAILMBOX_PLUGIN, test x"$ac_cv_enable_mailmbox_plugin" = xyes)
1072 AC_MSG_CHECKING([whether to build newmail plugin])
1073 AC_ARG_ENABLE(newmail-plugin,
1074 [ --disable-newmail-plugin do not build newmail plugin],
1075 [ac_cv_enable_newmail_plugin=$enableval], [ac_cv_enable_newmail_plugin=yes])
1076 if test x"$ac_cv_enable_newmail_plugin" = xyes; then
1077 PLUGINS="newmail $PLUGINS"
1082 AM_CONDITIONAL(BUILD_NEWMAIL_PLUGIN, test x"$ac_cv_enable_newmail_plugin" = xyes)
1084 dnl --- notification - disabled - too many autofoo annoyances for today ---
1085 AC_MSG_CHECKING([whether to build notification plugin])
1086 AC_ARG_ENABLE(notification-plugin,
1087 [ --disable-notification-plugin do not build notification plugin],
1088 [ac_cv_enable_notification_plugin=$enableval], [ac_cv_enable_notification_plugin=yes])
1089 if test x"$ac_cv_enable_notification_plugin" = xyes; then
1090 LIBNOTIFY_REQUIRED=0.4.3
1091 PKG_CHECK_MODULES(libnotify, libnotify >= $LIBNOTIFY_REQUIRED,
1092 [AC_DEFINE(HAVE_LIBNOTIFY, 1, [Define if libnotify support is enabled])],
1093 [AC_MSG_ERROR([libnotify not found])])
1094 AC_SUBST(libnotify_CFLAGS)
1095 AC_SUBST(libnotify_LIBS)
1097 AC_DEFINE(NOTIFICATION_POPUP, 1, Activate notification popup)
1098 AC_DEFINE(NOTIFICATION_BANNER, 1, Activate notification banner)
1099 AC_DEFINE(NOTIFICATION_COMMAND, 1, Activate notification shell command)
1100 AC_DEFINE(NOTIFICATION_TRAYICON, 1, Activate notification trayicon)
1101 AC_DEFINE(NOTIFICATION_LCDPROC, 1, Activate lcdproc support)
1102 #AC_DEFINE(NOTIFICATION_INDICATOR, 1, [Activate support for indicators])
1104 PLUGINS="notification $PLUGINS"
1109 AM_CONDITIONAL(BUILD_NOTIFICATION_PLUGIN, test x"$ac_cv_enable_notification_plugin" = xyes)
1111 dnl --- pdf_viewer ---
1112 AC_MSG_CHECKING([whether to build pdf_viewer plugin])
1113 AC_ARG_ENABLE(pdf_viewer-plugin,
1114 [ --disable-pdf_viewer-plugin do not build pdf_viewer plugin],
1115 [ac_cv_enable_pdf_viewer_plugin=$enableval], [ac_cv_enable_pdf_viewer_plugin=yes])
1116 if test x"$ac_cv_enable_pdf_viewer_plugin" = xyes; then
1117 PKG_CHECK_MODULES(POPPLER, poppler-glib >= 0.4.2, ,
1118 AC_MSG_ERROR([Can't find Poppler >= 0.4.2 Glib wrapper]))
1119 AC_SUBST(POPPLER_LIBS)
1120 AC_SUBST(POPPLER_CFLAGS)
1123 CFLAGS="$POPPLER_CFLAGS $GTK_CFLAGS $GLIB_CFLAGS"
1124 AC_CHECK_DECL(POPPLER_DEST_NAMED,
1125 [AC_DEFINE([HAVE_POPPLER_DEST_NAMED], [], [Description])],
1126 ,[#include <poppler-action.h>])
1127 AC_CHECK_DECL(POPPLER_DEST_XYZ,
1128 [AC_DEFINE([HAVE_POPPLER_DEST_XYZ], [], [Description])],
1129 ,[#include <poppler-action.h>])
1131 PLUGINS="pdf_viewer $PLUGINS"
1136 AM_CONDITIONAL(BUILD_PDF_VIEWER_PLUGIN, test x"$ac_cv_enable_pdf_viewer_plugin" = xyes)
1139 AC_MSG_CHECKING([whether to build perl plugin])
1140 AC_ARG_ENABLE(perl-plugin,
1141 [ --disable-perl-plugin do not build perl plugin],
1142 [ac_cv_enable_perl_plugin=$enableval], [ac_cv_enable_perl_plugin=yes])
1143 if test x"$ac_cv_enable_perl_plugin" = xyes; then
1144 AC_PATH_PROG(sedpath, sed, no)
1145 if test x$sedpath = xno ; then
1146 AC_MSG_ERROR(Test for sed failed.)
1150 AC_PATH_PROG(PERL_PATH, perl, no)
1151 if test x$PERL_PATH = xno ; then
1152 AC_MSG_ERROR(Test for Perl failed)
1154 AC_MSG_CHECKING(for perl >= 5.8.0)
1155 PERL_VER=`$PERL_PATH -e 'print $] > 5.0079999?"yes":"no"'`
1156 if test "$PERL_VER" = "yes"; then
1160 AC_MSG_ERROR(Your Perl version is too old.)
1162 AC_MSG_CHECKING(for Perl compile flags)
1163 PERL_CFLAGS=`$PERL_PATH -MExtUtils::Embed -e ccopts`
1164 PERL_CFLAGS=`echo $PERL_CFLAGS | $sedpath 's/-D_FILE_OFFSET_BITS=[[0-9]]*//'`
1165 PERL_LDFLAGS=`$PERL_PATH -MExtUtils::Embed -e ldopts |$sedpath 's/-lgdbm//'`
1166 PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-ldb//'`
1167 PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lndbm//'`
1168 PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lc//'`
1170 AC_SUBST(PERL_CFLAGS)
1171 AC_SUBST(PERL_LDFLAGS)
1172 PLUGINS="perl $PLUGINS"
1177 AM_CONDITIONAL(BUILD_PERL_PLUGIN, test x"$ac_cv_enable_perl_plugin" = xyes)
1180 AC_MSG_CHECKING([whether to build python plugin])
1181 AC_ARG_ENABLE(python-plugin,
1182 [ --disable-python-plugin do not build python plugin],
1183 [ac_cv_enable_python_plugin=$enableval], [ac_cv_enable_python_plugin=yes])
1184 if test x"$ac_cv_enable_python_plugin" = xyes; then
1185 AM_PATH_PYTHON([2.5], [
1186 AC_PATH_PROG(PYTHON_CONFIG, python$PYTHON_VERSION-config)
1187 if test x"$PYTHON_CONFIG" = x"" ; then
1188 AC_PATH_PROG(PYTHON_CONFIG, python-config)
1190 if test x"$PYTHON_CONFIG" != x""; then
1191 PYTHON_CFLAGS=`$PYTHON_CONFIG --includes`
1192 PYTHON_LIBS=`$PYTHON_CONFIG --libs`
1193 PYTHON_PREFIX=`$PYTHON_CONFIG --prefix`
1195 AC_MSG_ERROR(python-config not found. Maybe you need to install development packages for Python.)
1199 PYTHON_SO_FILE="libpython${PYTHON_VERSION}.so"
1200 found_libpython_so="no"
1201 if test -f "$PYTHON_PREFIX/lib/$PYTHON_SO_FILE"; then
1202 found_libpython_so="yes"
1203 PYTHON_SHARED_LIB=`python -c "import os,sys; print os.path.basename(os.path.realpath(\"$PYTHON_PREFIX/lib/$PYTHON_SO_FILE\"))"`
1205 if test -f "$PYTHON_PREFIX/lib64/$PYTHON_SO_FILE"; then
1206 found_libpython_so="yes"
1207 PYTHON_SHARED_LIB=`python -c "import os,sys; print os.path.basename(os.path.realpath(\"$PYTHON_PREFIX/lib64/$PYTHON_SO_FILE\"))"`
1209 if test x"$found_libpython_so" != x"yes"; then
1210 AC_MSG_ERROR(Could not find Python shared libary: $PYTHON_SO_FILE does not exist. Maybe you need to install development packages for Python.)
1214 PKG_CHECK_MODULES(PYGTK,
1215 [pygtk-2.0 >= 2.10.3],
1217 AC_DEFINE(ENABLE_PYTHON, [1], [Enable Python support])
1221 AC_SUBST(PYTHON_SHARED_LIB)
1222 AC_SUBST(PYTHON_CFLAGS)
1223 AC_SUBST(PYTHON_LIBS)
1224 AC_SUBST(PYGTK_CFLAGS)
1225 AC_SUBST(PYGTK_LIBS)
1227 PLUGINS="python $PLUGINS"
1232 AM_CONDITIONAL(BUILD_PYTHON_PLUGIN, test x"$ac_cv_enable_python_plugin" = xyes)
1234 dnl --- PGP/CORE ---
1235 AC_MSG_CHECKING([whether to build PGP/CORE plugin])
1236 AC_ARG_ENABLE(pgpcore-plugin,
1237 [ --disable-pgpcore-plugin do not build PGP/Core plugin],
1238 [ac_cv_enable_pgpcore_plugin=$enableval], [ac_cv_enable_pgpcore_plugin=yes])
1239 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
1241 AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
1242 [ac_cv_enable_pgpcore_plugin=no])
1243 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
1244 PLUGINS="pgpcore $PLUGINS"
1245 AM_PATH_GPGME(1.1.1,
1246 AC_DEFINE(HAVE_GPGME_PKA_TRUST, 1,
1247 [Define if GPGME supports PKA.]))
1248 #needed to get GPGME_LIBS and al correctly
1249 AM_PATH_GPGME(1.0.0, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
1250 [ac_cv_enable_pgpcore_plugin=no])
1252 AC_MSG_WARN([*** PGP/CORE plugin will not be built ***])
1257 AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN, test x"$ac_cv_enable_pgpcore_plugin" = xyes)
1259 AC_MSG_CHECKING([whether to build PGP/MIME plugin])
1260 AC_ARG_ENABLE(pgpmime-plugin,
1261 [ --disable-pgpmime-plugin do not build PGP/MIME plugin],
1262 [ac_cv_enable_pgpmime_plugin=$enableval], [ac_cv_enable_pgpmime_plugin=yes])
1263 if test x"$ac_cv_enable_pgpmime_plugin" = xyes; then
1265 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
1266 PLUGINS="pgpmime $PLUGINS"
1268 AC_MSG_WARN([*** PGP/MIME plugin cannot be built ***])
1269 AC_MSG_WARN([*** without the PGP/CORE plugin ***])
1274 AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN, test x"$ac_cv_enable_pgpmime_plugin" = xyes)
1276 AC_MSG_CHECKING([whether to build PGP/Inline plugin])
1277 AC_ARG_ENABLE(pgpinline-plugin,
1278 [ --disable-pgpinline-plugin do not build PGP/Inline plugin],
1279 [ac_cv_enable_pgpinline_plugin=$enableval], [ac_cv_enable_pgpinline_plugin=yes])
1280 if test x"$ac_cv_enable_pgpinline_plugin" = xyes; then
1282 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
1283 PLUGINS="pgpinline $PLUGINS"
1285 AC_MSG_WARN([*** PGP/Inline plugin cannot be built ***])
1286 AC_MSG_WARN([*** without the PGP/CORE plugin ***])
1291 AM_CONDITIONAL(BUILD_PGPINLINE_PLUGIN, test x"$ac_cv_enable_pgpinline_plugin" = xyes)
1294 AC_MSG_CHECKING([whether to build RSSyl plugin])
1295 AC_ARG_ENABLE(rssyl-plugin,
1296 [ --disable-rssyl-plugin do not build rssyl plugin for RSS and Atom feeds],
1297 [ac_cv_enable_rssyl_plugin=$enableval], [ac_cv_enable_rssyl_plugin=yes])
1298 if test x"$ac_cv_enable_rssyl_plugin" = xyes; then
1300 PKG_CHECK_MODULES(LIBXML, "libxml-2.0",,
1301 [AC_MSG_ERROR(libxml library is missing)])
1302 PLUGINS="rssyl $PLUGINS"
1303 AC_SUBST(LIBXML_CFLAGS)
1304 AC_SUBST(LIBXML_LIBS)
1306 AM_CONDITIONAL(BUILD_RSSYL_PLUGIN, test x"$ac_cv_enable_rssyl_plugin" = xyes)
1308 AC_MSG_CHECKING([whether to build S/Mime plugin])
1309 AC_ARG_ENABLE(smime-plugin,
1310 [ --disable-smime-plugin do not build S/Mime plugin],
1311 [ac_cv_enable_smime_plugin=$enableval], [ac_cv_enable_smime_plugin=yes])
1312 if test x"$ac_cv_enable_smime_plugin" = xyes; then
1314 if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
1315 PLUGINS="smime $PLUGINS"
1317 AC_MSG_WARN([*** S/Mime plugin cannot be built ***])
1318 AC_MSG_WARN([*** without the PGP/CORE plugin ***])
1323 AM_CONDITIONAL(BUILD_SMIME_PLUGIN, test x"$ac_cv_enable_smime_plugin" = xyes)
1325 dnl --- SpamAssassin ---
1326 AC_MSG_CHECKING([whether to build SpamAssassin plugin])
1327 AC_ARG_ENABLE(spamassassin-plugin,
1328 [ --disable-spamassassin-plugin do not build SpamAssassin plugin],
1329 [ac_cv_enable_spamassassin_plugin=$enableval], [ac_cv_enable_spamassassin_plugin=yes])
1330 if test x"$ac_cv_enable_spamassassin_plugin" = xyes; then
1333 PLUGINS="spamassassin $PLUGINS"
1334 AC_DEFINE(USE_SPAMASSASSIN_PLUGIN, 1, Define if spamassassin plugin is being built.)
1338 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$ac_cv_enable_spamassassin_plugin" = xyes)
1340 dnl --- spam_report ---
1341 AC_MSG_CHECKING([whether to build spam_report plugin])
1342 AC_ARG_ENABLE(spam_report-plugin,
1343 [ --disable-spam_report-plugin do not build spam_report plugin],
1344 [ac_cv_enable_spam_report_plugin=$enableval], [ac_cv_enable_spam_report_plugin=yes])
1345 if test x"$ac_cv_enable_spam_report_plugin" = xyes; then
1346 if test x"$have_curl" = xyes; then
1348 PLUGINS="spam_report $PLUGINS"
1350 AC_MSG_ERROR(spam_report needs libcurl)
1355 AM_CONDITIONAL(BUILD_SPAM_REPORT_PLUGIN, test x"$ac_cv_enable_spam_report_plugin" = xyes)
1357 dnl --- tnef_parse ---
1358 AC_MSG_CHECKING([whether to build tnef_parse plugin])
1359 AC_ARG_ENABLE(tnef_parse-plugin,
1360 [ --disable-tnef_parse-plugin do not build tnef_parse plugin],
1361 [ac_cv_enable_tnef_parse_plugin=$enableval], [ac_cv_enable_tnef_parse_plugin=yes])
1362 if test x"$ac_cv_enable_tnef_parse_plugin" = xyes; then
1364 PLUGINS="tnef_parse $PLUGINS"
1368 AM_CONDITIONAL(BUILD_TNEF_PARSE_PLUGIN, test x"$ac_cv_enable_tnef_parse_plugin" = xyes)
1370 dnl --- vCalendar ---
1371 AC_MSG_CHECKING([whether to build vCalendar plugin])
1372 AC_ARG_ENABLE(vcalendar-plugin,
1373 [ --disable-vcalendar-plugin do not build vcalendar plugin for ical rendering],
1374 [ac_cv_enable_vcalendar_plugin=$enableval], [ac_cv_enable_vcalendar_plugin=yes])
1375 if test x"$ac_cv_enable_vcalendar_plugin" = xyes; then
1376 AC_CHECK_PROGS(PERL, perl5 perl)
1377 if test x"$PERL" != x; then
1379 PLUGINS="vcalendar $PLUGINS"
1382 ac_cv_enable_vcalendar_plugin=no
1385 AM_CONDITIONAL(BUILD_VCALENDAR_PLUGIN, test x"$ac_cv_enable_vcalendar_plugin" = xyes)
1389 AC_MSG_CHECKING([whether to use libetpan])
1390 AC_ARG_ENABLE(libetpan,
1391 [ --disable-libetpan disable IMAP4/NNTP (libetpan) support],
1392 [ac_cv_enable_libetpan=$enableval], [ac_cv_enable_libetpan=yes])
1393 if test x"$ac_cv_enable_libetpan" = xyes; then
1396 AC_PATH_PROG(libetpanconfig, [libetpan-config])
1397 if test "x$libetpanconfig" != "x"; then
1398 CPPFLAGS="$CPPFLAGS `$libetpanconfig --cflags 2>/dev/null`"
1399 AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
1400 if test "x$libetpan_result" = "xyes"; then
1401 AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
1402 LIBS="$LIBS `$libetpanconfig --libs 2>/dev/null`"
1403 AC_TRY_LINK([#include <libetpan/dbstorage.h>], [db_mailstorage_init(NULL, NULL);], [libetpan_result=yes], [libetpan_result=no])
1404 AC_MSG_RESULT([$libetpan_result])
1407 if test "x$libetpan_result" = "xyes"; then
1408 LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
1409 LIBETPAN_LIBS="`$libetpanconfig --libs`"
1410 LIBETPAN_STABLE=`$libetpanconfig --version | grep -v ^0`
1411 LIBETPAN_VERSION=`$libetpanconfig --version | sed "s/\.//g" | sed "s/-.*$//"`
1412 if test x"$LIBETPAN_STABLE" != "x"; then
1413 LIBETPAN_VERSION="100"
1415 if test "$LIBETPAN_VERSION" -lt "057"; then
1416 AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/])
1417 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
1418 AC_MSG_ERROR([libetpan 0.57 not found])
1420 AC_SUBST(LIBETPAN_FLAGS)
1421 AC_SUBST(LIBETPAN_LIBS)
1422 AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP and/or NNTP support.)
1424 AC_MSG_RESULT([*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/ ])
1425 AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.])
1426 AC_MSG_ERROR([libetpan 0.57 not found])
1431 AM_CONDITIONAL(CLAWS_LIBETPAN, test "x$libetpan_result" = "xyes")
1433 AC_MSG_CHECKING([whether to use valgrind])
1434 AC_ARG_ENABLE(valgrind,
1435 [ --disable-valgrind disable valgrind support for debugging],
1436 [ac_cv_enable_valgrind=$enableval], [ac_cv_enable_valgrind=yes])
1437 if test x$ac_cv_enable_valgrind = xyes; then
1439 PKG_CHECK_MODULES(VALGRIND, valgrind >= 2.4.0,
1440 ac_cv_enable_valgrind=yes, ac_cv_enable_valgrind=no)
1441 if test x"$ac_cv_enable_valgrind" = xyes; then
1442 AC_DEFINE(HAVE_VALGRIND, 1, Define if you want valgrind support)
1444 AC_MSG_RESULT(not found)
1449 AM_CONDITIONAL(CLAWS_VALGRIND, test x"$ac_cv_enable_valgrind" = x"yes")
1451 dnl ****************************
1452 dnl ** Final configure output **
1453 dnl ****************************
1459 src/common/version.h
1462 src/common/passcrypt.h
1465 src/plugins/Makefile
1466 src/plugins/acpi_notifier/Makefile
1467 src/plugins/address_keeper/Makefile
1468 src/plugins/archive/Makefile
1469 src/plugins/att_remover/Makefile
1470 src/plugins/attachwarner/Makefile
1471 src/plugins/bogofilter/Makefile
1472 src/plugins/bsfilter/Makefile
1473 src/plugins/clamd/Makefile
1474 src/plugins/clamd/libclamd/Makefile
1475 src/plugins/demo/Makefile
1476 src/plugins/fancy/Makefile
1477 src/plugins/fetchinfo/Makefile
1478 src/plugins/gdata/Makefile
1479 src/plugins/mailmbox/Makefile
1480 src/plugins/newmail/Makefile
1481 src/plugins/notification/Makefile
1482 src/plugins/pdf_viewer/Makefile
1483 src/plugins/perl/Makefile
1484 src/plugins/python/Makefile
1485 src/plugins/pgpcore/Makefile
1486 src/plugins/pgpmime/Makefile
1487 src/plugins/pgpinline/Makefile
1488 src/plugins/rssyl/Makefile
1489 src/plugins/smime/Makefile
1490 src/plugins/spamassassin/Makefile
1491 src/plugins/spam_report/Makefile
1492 src/plugins/tnef_parse/Makefile
1493 src/plugins/vcalendar/Makefile
1494 src/plugins/vcalendar/libical/Makefile
1495 src/plugins/vcalendar/libical/libical/icalversion.h
1496 src/plugins/vcalendar/libical/libical/Makefile
1497 src/plugins/vcalendar/libical/design-data/Makefile
1498 src/plugins/vcalendar/libical/scripts/Makefile
1505 manual/dist/Makefile
1506 manual/dist/pdf/Makefile
1507 manual/dist/ps/Makefile
1508 manual/dist/html/Makefile
1509 manual/dist/txt/Makefile
1511 manual/fr/dist/Makefile
1512 manual/fr/dist/pdf/Makefile
1513 manual/fr/dist/ps/Makefile
1514 manual/fr/dist/html/Makefile
1515 manual/fr/dist/txt/Makefile
1517 manual/pl/dist/Makefile
1518 manual/pl/dist/pdf/Makefile
1519 manual/pl/dist/ps/Makefile
1520 manual/pl/dist/html/Makefile
1521 manual/pl/dist/txt/Makefile
1523 manual/es/dist/Makefile
1524 manual/es/dist/pdf/Makefile
1525 manual/es/dist/ps/Makefile
1526 manual/es/dist/html/Makefile
1527 manual/es/dist/txt/Makefile
1529 manual/de/dist/Makefile
1530 manual/de/dist/pdf/Makefile
1531 manual/de/dist/ps/Makefile
1532 manual/de/dist/html/Makefile
1533 manual/de/dist/txt/Makefile
1537 dnl Output the configuration summary
1539 echo "$PACKAGE $VERSION"
1541 if test x"$enable_new_addrbook" = xyes; then
1542 echo "Using Address Book : New experimental interface"
1544 echo "Using Address Book : Old stable interface"
1545 echo "JPilot : $ac_cv_enable_jpilot"
1546 echo "LDAP : $ac_cv_enable_ldap"
1548 echo "gnuTLS : $ac_cv_enable_gnutls"
1549 echo "iconv : $am_cv_func_iconv"
1550 echo "compface : $ac_cv_enable_compface"
1551 echo "IPv6 : $ac_cv_enable_ipv6"
1552 echo "enchant : $ac_cv_enable_enchant"
1553 echo "IMAP4 : $ac_cv_enable_libetpan"
1554 echo "NNTP : $ac_cv_enable_libetpan"
1555 echo "Crash dialog : $ac_cv_enable_crash_dialog"
1556 echo "LibSM : $ac_cv_enable_libsm"
1557 echo "DBUS : $enable_dbus"
1558 echo "NetworkManager : $enable_networkmanager_support"
1559 echo "Manual : $ac_cv_enable_manual"
1560 echo "Plugins : $PLUGINS"
1561 echo "Generic UMPC code : $ac_cv_enable_generic_umpc"
1562 echo "Maemo build : $ac_cv_enable_maemo"
1563 echo "Config dir : $ac_cv_with_config_dir"
1565 echo "The binary will be installed in $prefix/bin"
1567 echo "Configure finished, type 'make' to build."