2005-07-15 [hoa] 1.9.12cvs59
[claws.git] / configure.ac
index 3fcd070c893faeba6fe50b9608cd258054e14c2b..3271a6bfd027f571a1627717983ae0d488f24881 100644 (file)
@@ -8,10 +8,10 @@ PACKAGE=sylpheed-claws
 dnl version number
 MAJOR_VERSION=1
 MINOR_VERSION=9
-MICRO_VERSION=11
+MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=93
+EXTRA_VERSION=59
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
@@ -53,6 +53,13 @@ dnl GNOME 2.x installed?
 PKG_CHECK_MODULES(GNOME2, libgnome-2.0 >= 2.0, ac_enable_gnome2=yes, ac_enable_gnome2=no)
 AM_CONDITIONAL(SYLPHEED_GNOME2, test x"$ac_enable_gnome2" = x"yes")
 
+dnl libgnomeprint installed?
+PKG_CHECK_MODULES(GNOMEPRINT, libgnomeprint-2.2 libgnomeprintui-2.2, ac_enable_gnomeprint=yes, ac_enable_gnomeprint=no)
+AM_CONDITIONAL(SYLPHEED_GNOMEPRINT, test x"$ac_enable_gnomeprint" = x"yes")
+if test x$ac_enable_gnomeprint = xyes; then
+       AC_DEFINE(USE_GNOMEPRINT, 1, Define if you want libgnomeprint support)
+fi
+
 dnl Claws version
 AC_DEFINE(CLAWS, 1, Compiling Claws branch of sylpheed)
 
@@ -541,12 +548,24 @@ if test x"$ac_cv_enable_spamassassin_plugin" = xyes; then
 fi
 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$ac_cv_enable_spamassassin_plugin" = xyes)
 
-dnl --- PGP/MIME ---
+dnl --- PGP/CORE ---
+AC_ARG_ENABLE(pgpcore-plugin,
+       [  --disable-pgpcore-plugin           Do not build PGP/Core plugin],
+       [ac_cv_enable_pgpcore_plugin=$enableval], [ac_cv_enable_pgpcore_plugin=yes])
+if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
+       AM_PATH_GPGME(0.4.5, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
+                     [ac_cv_enable_pgpcore_plugin=no])
+       if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
+               PLUGINS="pgpcore $PLUGINS"
+       fi
+fi
+AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN, test x"$ac_cv_enable_pgpcore_plugin" = xyes)
+
 AC_ARG_ENABLE(pgpmime-plugin,
        [  --disable-pgpmime-plugin           Do not build PGP/MIME plugin],
        [ac_cv_enable_pgpmime_plugin=$enableval], [ac_cv_enable_pgpmime_plugin=yes])
 if test x"$ac_cv_enable_pgpmime_plugin" = xyes; then
-       AM_PATH_GPGME(0.3.10, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
+       AM_PATH_GPGME(0.4.5, AC_DEFINE(USE_GPGME, 1, Define if you use GPGME to support OpenPGP.),
                      [ac_cv_enable_pgpmime_plugin=no])
        if test x"$ac_cv_enable_pgpmime_plugin" = xyes; then
                PLUGINS="pgpmime $PLUGINS"
@@ -606,6 +625,39 @@ fi
 AC_SUBST(CLAMAV_LIBS)
 AM_CONDITIONAL(BUILD_CLAMAV_PLUGIN, test x"$ac_cv_enable_clamav_plugin" = xyes)
 
+dnl Libetpan
+AC_ARG_ENABLE(libetpan,
+       [  --disable-libetpan           Do not compile IMAP4 support with libetpan],
+       [ac_cv_enable_libetpan=$enableval], [ac_cv_enable_libetpan=yes])
+if test x"$ac_cv_enable_libetpan" = xyes; then
+       libetpan_result=no
+       AC_PATH_PROG(libetpanconfig, [libetpan-config])
+       if test "x$libetpanconfig" != "x"; then
+         CPPFLAGS="$CPPFLAGS `$libetpanconfig --cflags 2>/dev/null`"
+         AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
+         if test "x$libetpan_result" = "xyes"; then
+           AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
+           LDFLAGS="$LDFLAGS `$libetpanconfig --libs 2>/dev/null`"
+           AC_TRY_LINK([], [db_mailstorage_init();], [libetpan_result=yes], [libetpan_result=no])
+           AC_MSG_RESULT([$libetpan_result])
+         fi
+       fi
+       if test "x$libetpan_result" = "xyes"; then
+          LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
+          LIBETPAN_LIBS="`$libetpanconfig --libs`"
+          LIBETPAN_VERSION=`$libetpanconfig --version | sed "s/\.//g" | sed "s/-.*$//"`
+          if test "$LIBETPAN_VERSION" -lt "037"; then
+               AC_MSG_ERROR([Sylpheed requires libetpan 0.37 or newer. See http://www.etpan.org/])
+               AC_MSG_ERROR([You can use --disable-libetpan if you don't need IMAP4 support.])
+          fi
+          AC_SUBST(LIBETPAN_FLAGS)
+          AC_SUBST(LIBETPAN_LIBS)
+          AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP support.)
+       else
+          AC_MSG_ERROR([Sylpheed requires libetpan 0.37 or newer. See http://www.etpan.org/ ])
+          AC_MSG_ERROR([You can use --disable-libetpan if you don't need IMAP4 support.])
+       fi
+fi
 dnl ****************************
 dnl ** Final configure output **
 dnl ****************************
@@ -620,6 +672,7 @@ src/Makefile
 src/common/Makefile
 src/common/passcrypt.h
 src/gtk/Makefile
+src/etpan/Makefile
 src/plugins/Makefile
 src/plugins/demo/Makefile
 src/plugins/spamassassin/Makefile
@@ -628,6 +681,7 @@ src/plugins/dillo_viewer/Makefile
 src/plugins/trayicon/Makefile
 src/plugins/trayicon/libeggtrayicon/Makefile
 src/plugins/clamav/Makefile
+src/plugins/pgpcore/Makefile
 src/plugins/pgpmime/Makefile
 doc/Makefile
 doc/faq/Makefile
@@ -659,6 +713,7 @@ echo "iconv         : $am_cv_func_iconv"
 echo "compface      : $ac_cv_enable_compface"
 echo "IPv6          : $ac_cv_enable_ipv6"
 echo "GNU/aspell    : $ac_cv_enable_aspell"
+echo "IMAP4         : $ac_cv_enable_libetpan"
 echo "Crash dialog  : $ac_cv_enable_crash_dialog"
 echo "Plugins       : $PLUGINS"
 echo "Config dir    : $ac_cv_with_config_dir"