2005-08-06 [paul] 1.9.13cvs18
[claws.git] / configure.ac
index 3fa4218ca2b607b717ecbd6bc74fdb0b992ea0d5..735ff73b53caaa9773f620dd26dd92d50565aafa 100644 (file)
@@ -8,10 +8,10 @@ PACKAGE=sylpheed-claws
 dnl version number
 MAJOR_VERSION=1
 MINOR_VERSION=9
-MICRO_VERSION=12
+MICRO_VERSION=13
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=55
+EXTRA_VERSION=18
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
@@ -53,13 +53,6 @@ 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)
 
@@ -149,7 +142,7 @@ AC_CHECK_FUNCS(bind_textdomain_codeset)
 LIBS=$syl_save_LIBS
 
 dnl for gettext
-ALL_LINGUAS="bg ca cs de el en_GB es fi fr hr hu it ja ko nl pl pt_BR ru sk sr sv zh_CN zh_TW.Big5"
+ALL_LINGUAS="bg ca cs de el en_GB es fi fr hr hu it ja ko nb nl pl pt_BR ru sk sr sv zh_CN zh_TW.Big5"
 GETTEXT_PACKAGE=sylpheed-claws
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
@@ -305,13 +298,20 @@ fi
 
 dnl Check for OpenSSL
 AC_ARG_ENABLE(openssl,
-       [  --enable-openssl    Attempt to use OpenSSL for SSL support.],
+       [  --disable-openssl    Do not use OpenSSL for SSL support.],
        [ac_cv_enable_openssl=$enableval], [ac_cv_enable_openssl=yes])
+AC_MSG_CHECKING([whether to use OpenSSL])
 if test x"$ac_cv_enable_openssl" = xyes; then
+       AC_MSG_RESULT(yes)
        PKG_CHECK_MODULES(OPENSSL, openssl >= 0.9.7, :, ac_cv_enable_openssl=no)
        if test x$ac_cv_enable_openssl = xyes; then
                AC_DEFINE(USE_OPENSSL, 1, Define if you want OpenSSL support)
+       else
+               AC_MSG_RESULT(not found)
+               AC_MSG_WARN([*** OpenSSL will not be supported ***])
        fi
+else
+       AC_MSG_RESULT(no)
 fi
 AC_SUBST(OPENSSL_CFLAGS)
 AC_SUBST(OPENSSL_LIBS)
@@ -419,6 +419,29 @@ else
 fi
 AC_SUBST(PTHREAD_LIBS)
 
+t_oldLibs="$LIBS"
+LIBS="$LIBS"
+ac_cv_var__res_options=no
+AC_TRY_LINK([#include <sys/types.h>
+            #include <sys/socket.h>
+            #include <netinet/in.h>
+            #include <arpa/nameser.h>
+            #include <resolv.h>],
+               [_res.options = RES_INIT;],
+               ac_cv_var__res_options=yes);
+if test "$ac_cv_var__res_options" != "yes"; then
+       LIBRESOLV="-lresolv"
+fi
+LIBS="$t_oldLibs"
+
+if test "x$LIBRESOLV" = "x"; then
+       AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
+       LIBS="$t_oldLibs"
+fi
+AC_SUBST(LIBRESOLV)
+
+LIBS="$LIBS $LIBRESOLV"
+                
 dnl for LDAP support in addressbook
 dnl no check for libraries; dynamically loaded
 AC_ARG_ENABLE(ldap,
@@ -530,71 +553,118 @@ dnl *************************
 PLUGINS=""
 
 dnl --- Trayicon ---
+AC_MSG_CHECKING([whether to build Trayicon plugin])
 AC_ARG_ENABLE(trayicon-plugin,
        [  --disable-trayicon-plugin         Do not build System Tray Icon plugin],
        [ac_cv_enable_trayicon_plugin=$enableval], [ac_cv_enable_trayicon_plugin=yes])
 if test x"$ac_cv_enable_trayicon_plugin" = xyes; then
+       AC_MSG_RESULT(yes)
        PLUGINS="trayicon $PLUGINS"
+else
+       AC_MSG_RESULT(no)
 fi
 AM_CONDITIONAL(BUILD_TRAYICON_PLUGIN, test x"$ac_cv_enable_trayicon_plugin" = xyes)
 
 dnl --- SpamAssassin ---
+AC_MSG_CHECKING([whether to build SpamAssassin plugin])
 AC_ARG_ENABLE(spamassassin-plugin,
        [  --enable-spamassassin-plugin      Build SpamAssassin plugin [default=no]],
        [ac_cv_enable_spamassassin_plugin=$enableval], [ac_cv_enable_spamassassin_plugin=no])
 if test x"$ac_cv_enable_spamassassin_plugin" = xyes; then
+       AC_MSG_RESULT(yes)
        AC_SPAMASSASSIN
        PLUGINS="spamassassin $PLUGINS"
+else
+       AC_MSG_RESULT(no)
 fi
 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$ac_cv_enable_spamassassin_plugin" = xyes)
 
 dnl --- PGP/CORE ---
+AC_MSG_CHECKING([whether to build PGP/CORE plugin])
 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
+       AC_MSG_RESULT(yes)
        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"
+       else
+               AC_MSG_WARN([*** PGP/CORE plugin will not be built ***])
        fi
+else
+       AC_MSG_RESULT(no)
 fi
 AM_CONDITIONAL(BUILD_PGPCORE_PLUGIN, test x"$ac_cv_enable_pgpcore_plugin" = xyes)
 
+AC_MSG_CHECKING([whether to build PGP/MIME plugin])
 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.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
+       AC_MSG_RESULT(yes)
+       if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
                PLUGINS="pgpmime $PLUGINS"
+       else
+               AC_MSG_WARN([*** PGP/MIME plugin cannot be built ***])
+               AC_MSG_WARN([*** without the PGP/CORE plugin     ***])
        fi
+else
+       AC_MSG_RESULT(no)
 fi
 AM_CONDITIONAL(BUILD_PGPMIME_PLUGIN, test x"$ac_cv_enable_pgpmime_plugin" = xyes)
 
+AC_MSG_CHECKING([whether to build PGP/Inline plugin])
+AC_ARG_ENABLE(pgpinline-plugin,
+       [  --disable-pgpinline-plugin           Do not build PGP/Inline plugin],
+       [ac_cv_enable_pgpinline_plugin=$enableval], [ac_cv_enable_pgpinline_plugin=yes])
+if test x"$ac_cv_enable_pgpinline_plugin" = xyes; then
+       AC_MSG_RESULT(yes)
+       if test x"$ac_cv_enable_pgpcore_plugin" = xyes; then
+               PLUGINS="pgpinline $PLUGINS"
+       else
+               AC_MSG_WARN([*** PGP/Inline plugin cannot be built ***])
+               AC_MSG_WARN([*** without the PGP/CORE plugin     ***])
+       fi
+else
+       AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(BUILD_PGPINLINE_PLUGIN, test x"$ac_cv_enable_pgpinline_plugin" = xyes)
+
 dnl --- MathML Viewer ---
+AC_MSG_CHECKING([whether to build MathML-Viewer plugin])
 AC_ARG_ENABLE(mathml-viewer-plugin,
        [  --disable-mathml-viewer-plugin    Do not build MathML-Viewer plugin],
        [ac_cv_enable_mathml_viewer_plugin=$enableval], [ac_cv_enable_mathml_viewer_plugin=yes])
 if test x"$ac_cv_enable_mathml_viewer_plugin" = xyes; then
+       AC_MSG_RESULT(yes)
        PKG_CHECK_MODULES(GTK_MATH_VIEW, gtkmathview >= 0.5, :, ac_cv_enable_mathml_viewer_plugin=no)
 
        if test x"$ac_cv_enable_mathml_viewer_plugin" = xyes; then
 
                PLUGINS="mathml-viewer $PLUGINS"
+       else
+               AC_MSG_RESULT(not found)
+               AC_MSG_WARN([*** MathML-Viewer plugin will not be built ***])
        fi
+else
+       AC_MSG_RESULT(no)
 fi
 AC_SUBST(GTK_MATH_VIEW_CFLAGS)
 AC_SUBST(GTK_MATH_VIEW_LIBS)
 AM_CONDITIONAL(BUILD_MATHML_VIEWER_PLUGIN, test x"$ac_cv_enable_mathml_viewer_plugin" = xyes)
 
 dnl --- Dillo Viewer ---
+AC_MSG_CHECKING([whether to build Dillo plugin])
 AC_ARG_ENABLE(dillo-viewer-plugin,
        [  --disable-dillo-viewer-plugin     Do not build Dillo plugin for html mail rendering],
        [ac_cv_enable_dillo_viewer_plugin=$enableval], [ac_cv_enable_dillo_viewer_plugin=yes])
 if test x"$ac_cv_enable_dillo_viewer_plugin" = xyes; then
+       AC_MSG_RESULT(yes)
        PLUGINS="dillo-viewer $PLUGINS"
+else
+       AC_MSG_RESULT(no)
 fi
 AM_CONDITIONAL(BUILD_DILLO_VIEWER_PLUGIN, test x"$ac_cv_enable_dillo_viewer_plugin" = xyes)
 
@@ -608,28 +678,33 @@ fi
 AM_CONDITIONAL(BUILD_DEMO_PLUGIN, test x"$ac_cv_enable_demo_plugin" = xyes)
 
 dnl --- ClamAV ---
+AC_MSG_CHECKING([whether to build ClamAV plugin])
 AC_ARG_ENABLE(clamav-plugin,
        [  --disable-clamav-plugin           Do not build Clam AntiVirus plugin],
        [ac_cv_enable_clamav_plugin=$enableval], [ac_cv_enable_clamav_plugin=yes])
 if test x"$ac_cv_enable_clamav_plugin" = xyes; then
-       AC_CHECK_LIB(clamav, cl_scanfile, clamav_lib=-lclamav, ac_cv_enable_clamav_plugin=no)
-       AC_CHECK_HEADERS(clamav.h, :, ac_cv_enable_clamav_plugin=no)
+       AC_MSG_RESULT(yes)
+       PKG_CHECK_MODULES(CLAMAV, libclamav, ac_cv_enable_clamav_plugin=yes,
+                         ac_cv_enable_clamav_plugin=no)
        if test x"$ac_cv_enable_clamav_plugin" = xyes; then
-               CLAMAV_LIBS="${clamav_lib}"
-
                PLUGINS="clamav $PLUGINS"
        else
-               AC_MSG_NOTICE([clamav library not found, will not build clamav plugin])
+               AC_MSG_RESULT(not found)
+               AC_MSG_WARN([*** ClamAV plugin will not be built ***])
        fi
+else
+       AC_MSG_RESULT(no)
 fi
 AC_SUBST(CLAMAV_LIBS)
 AM_CONDITIONAL(BUILD_CLAMAV_PLUGIN, test x"$ac_cv_enable_clamav_plugin" = xyes)
 
 dnl Libetpan
+AC_MSG_CHECKING([whether to use 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
+       AC_MSG_RESULT(yes)
        libetpan_result=no
        AC_PATH_PROG(libetpanconfig, [libetpan-config])
        if test "x$libetpanconfig" != "x"; then
@@ -646,18 +721,42 @@ if test x"$ac_cv_enable_libetpan" = 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/])
+          if test "$LIBETPAN_VERSION" -lt "038"; then
+               AC_MSG_ERROR([Sylpheed requires libetpan 0.38 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([Sylpheed requires libetpan 0.38 or newer. See http://www.etpan.org/ ])
           AC_MSG_ERROR([You can use --disable-libetpan if you don't need IMAP4 support.])
        fi
+else
+       AC_MSG_RESULT(no)
+fi
+
+dnl Libgnomeprint
+AC_MSG_CHECKING([whether to use libgnomeprint])
+AC_ARG_ENABLE(gnomeprint,
+       [  --disable-gnomeprint         Do not use libgnomeprint for printing],
+       [ac_cv_enable_gnomeprint=$enableval], [ac_cv_enable_gnomeprint=yes])
+if test x$ac_cv_enable_gnomeprint = xyes; then
+       AC_MSG_RESULT(yes)
+       PKG_CHECK_MODULES(GNOMEPRINT, libgnomeprint-2.2 libgnomeprintui-2.2,
+                         ac_cv_enable_gnomeprint=yes, ac_cv_enable_gnomeprint=no)
+       if test x"$ac_cv_enable_gnomeprint" = xyes; then
+               AC_DEFINE(USE_GNOMEPRINT, 1, Define if you want libgnomeprint support)
+       else
+               AC_MSG_RESULT(not found)
+               AC_MSG_WARN([*** libgnomeprintui wasn't found    ***])
+               AC_MSG_WARN([*** using built-in printing support ***])
+       fi
+else
+       AC_MSG_RESULT(no)
 fi
+AM_CONDITIONAL(SYLPHEED_GNOMEPRINT, test x"$ac_cv_enable_gnomeprint" = x"yes")
+
 dnl ****************************
 dnl ** Final configure output **
 dnl ****************************
@@ -683,6 +782,7 @@ src/plugins/trayicon/libeggtrayicon/Makefile
 src/plugins/clamav/Makefile
 src/plugins/pgpcore/Makefile
 src/plugins/pgpmime/Makefile
+src/plugins/pgpinline/Makefile
 doc/Makefile
 doc/faq/Makefile
 doc/faq/de/Makefile
@@ -715,6 +815,7 @@ 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 "libgnomeprint : $ac_cv_enable_gnomeprint"
 echo "Plugins       : $PLUGINS"
 echo "Config dir    : $ac_cv_with_config_dir"
 echo ""