2006-09-04 [paul] 2.4.0cvs139
[claws.git] / configure.ac
index 769c709fafd48990df8dd7400c636a2d923a71f4..7cf73c39b6fb9b7c27f503e484f8cfc8fc566732 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.50)
+AC_PREREQ(2.60)
 AC_INIT(src/main.c)
 AC_CONFIG_AUX_DIR(config)
 
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=59
+EXTRA_VERSION=139
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
@@ -168,27 +168,10 @@ GETTEXT_PACKAGE=sylpheed-claws
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
 
-AM_GNU_GETTEXT_VERSION([0.14.5])
+AM_GNU_GETTEXT_VERSION([0.15])
 AM_GNU_GETTEXT([external])
 
-if test "x${DATADIRNAME}" = "x"; then
-  DATADIRNAME="share"
-  AC_SUBST(DATADIRNAME)
-fi
-
-mandir='${prefix}/${DATADIRNAME}/man'
-AC_ARG_WITH(mandir,
-       [  --with-mandir=DIR    man directory],
-       [mandir="$withval"])
-AC_SUBST(mandir)
-
-localedir='${prefix}/${DATADIRNAME}/locale'
-AC_ARG_WITH(localedir,
-       [  --with-localedir=DIR    Locale directory],
-       [localedir="$withval"])
-AC_SUBST(localedir)
-
-manualdir='${prefix}/${DATADIRNAME}/${PACKAGE}/manual'
+manualdir='${datarootdir}/${PACKAGE}/manual'
 AC_ARG_WITH(manualdir,
        [  --with-manualdir=DIR    Manual directory],
        [manualdir="$withval"])
@@ -201,10 +184,14 @@ AC_ARG_ENABLE(manual,
 AM_CONDITIONAL(BUILD_MANUAL, test x"$ac_cv_enable_manual" = xyes)
 
 dnl Set PACKAGE_DATA_DIR in config.h.
-if test "x${prefix}" = "xNONE"; then
-    AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/${DATADIRNAME}/${PACKAGE}", PACKAGE_DATA_DIR)
+if test "x${datarootdir}" = 'x${prefix}/share'; then
+       if test "x${prefix}" = "xNONE"; then
+               AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
+       else
+               AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}",[PACKAGE_DATA_DIR])
+       fi
 else
-    AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/${DATADIRNAME}/${PACKAGE}", PACKAGE_DATA_DIR)
+       AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datarootdir}/${PACKAGE}",[PACKAGE_DATA_DIR])
 fi
 
 AC_CHECK_LIB(xpg4, setlocale)
@@ -643,6 +630,20 @@ else
 fi
 AM_CONDITIONAL(BUILD_SPAMASSASSIN_PLUGIN, test x"$ac_cv_enable_spamassassin_plugin" = xyes)
 
+dnl --- Bogofilter ---
+AC_MSG_CHECKING([whether to build Bogofilter plugin])
+AC_ARG_ENABLE(bogofilter-plugin,
+       [  --disable-bogofilter-plugin      Build bogofilter plugin [default=yes]],
+       [ac_cv_enable_bogofilter_plugin=$enableval], [ac_cv_enable_bogofilter_plugin=yes])
+if test x"$ac_cv_enable_bogofilter_plugin" = xyes; then
+       AC_MSG_RESULT(yes)
+       PLUGINS="bogofilter $PLUGINS"
+       AC_DEFINE(USE_BOGOFILTER_PLUGIN, 1, Define if bogofilter plugin is being build.)
+else
+       AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(BUILD_BOGOFILTER_PLUGIN, test x"$ac_cv_enable_bogofilter_plugin" = xyes)
+
 dnl --- PGP/CORE ---
 AC_MSG_CHECKING([whether to build PGP/CORE plugin])
 AC_ARG_ENABLE(pgpcore-plugin,
@@ -768,18 +769,18 @@ 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 "045"; then
-               AC_MSG_RESULT([*** Sylpheed requires libetpan 0.45 or newer. See http://www.etpan.org/])
+          if test "$LIBETPAN_VERSION" -lt "046"; then
+               AC_MSG_RESULT([*** Sylpheed requires libetpan 0.46 or newer. See http://www.etpan.org/])
                AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 support.])
-                AC_MSG_ERROR([libetpan 0.45 not found])
+                AC_MSG_ERROR([libetpan 0.46 not found])
           fi
           AC_SUBST(LIBETPAN_FLAGS)
           AC_SUBST(LIBETPAN_LIBS)
           AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP support.)
        else
-          AC_MSG_RESULT([*** Sylpheed requires libetpan 0.45 or newer. See http://www.etpan.org/ ])
+          AC_MSG_RESULT([*** Sylpheed requires libetpan 0.46 or newer. See http://www.etpan.org/ ])
           AC_MSG_RESULT([*** You can use --disable-libetpan if you don't need IMAP4 support.])
-           AC_MSG_ERROR([libetpan 0.45 not found])
+           AC_MSG_ERROR([libetpan 0.46 not found])
        fi
 else
        AC_MSG_RESULT(no)
@@ -824,6 +825,7 @@ src/gtk/Makefile
 src/etpan/Makefile
 src/plugins/Makefile
 src/plugins/demo/Makefile
+src/plugins/bogofilter/Makefile
 src/plugins/spamassassin/Makefile
 src/plugins/dillo_viewer/Makefile
 src/plugins/trayicon/Makefile