2005-12-28 [wwp] 1.9.100cvs111
[claws.git] / configure.ac
index 4e4a69a..b8b57f9 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=29
+EXTRA_VERSION=111
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
@@ -82,14 +82,19 @@ AC_PROG_CPP
 dnl AC_PROG_RANLIB
 AM_PROG_LEX
 AC_PROG_YACC
+AC_LIB_PREFIX
+AC_LIBTOOL_WIN32_DLL
+AC_LIBTOOL_RC
 AC_PROG_LIBTOOL
 
 SYLPHEED_ACLOCAL_INCLUDE(m4)
   
 dnl ******************************
 dnl Checks for host
+dnl Not needed anymore because we 
+dnl do AC_CANONICAL_SYSTEM above
 dnl ******************************
-AC_CANONICAL_HOST
+dnl AC_CANONICAL_HOST
 
 dnl Copied from the official gtk+-2 configure.in
 AC_MSG_CHECKING([for some Win32 platform])
@@ -105,11 +110,6 @@ esac
 AC_MSG_RESULT([$platform_win32])
 AM_CONDITIONAL(PLATFORM_WIN32, test x"$platform_win32" = x"yes")
 
-if test x"$platform_win32" = x"yes"; then
-    WINDRES=windres
-    AC_SUBST(WINDRES)
-fi
-
 AC_MSG_CHECKING([for native Win32])
 case "$host" in
   *-*-mingw*)
@@ -124,13 +124,18 @@ AM_CONDITIONAL(OS_WIN32, test x"$os_win32" = x"yes")
 
 CFLAGS="$CFLAGS -Wall"
 
+pthread_name=
 case "$target" in
 *-darwin*)
        CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
        ;;
 *-*-mingw*)
+        # Note that we need to link to pthreadGC2 in all cases. This
+        # is because some locking is used even when pthread support is
+        # disabled.
+        pthread_name=pthreadGC2
        CFLAGS="$CFLAGS -mms-bitfields"
-       LIBS="$LIBS -lws2_32"
+       LIBS="$LIBS -l${pthread_name} -lws2_32 -lregex"
        ;;
 esac
   
@@ -151,26 +156,26 @@ GETTEXT_PACKAGE=sylpheed-claws
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.])
 
-AM_GLIB_GNU_GETTEXT
-dnl AM_GNU_GETTEXT
-dnl AC_CHECK_FUNC(gettext, AC_CHECK_LIB(intl, gettext))
+AM_GNU_GETTEXT_VERSION([0.14.5])
+AM_GNU_GETTEXT([external])
+
+if test "x${DATADIRNAME}" = "x"; then
+  DATADIRNAME="share"
+  AC_SUBST(DATADIRNAME)
+fi
+
 localedir='${prefix}/${DATADIRNAME}/locale'
 AC_ARG_WITH(localedir,
        [  --with-localedir=DIR    Locale directory],
        [localedir="$withval"])
 AC_SUBST(localedir)
 
-manualdir='${prefix}/${DATADIRNAME}/${PACKAGE}/manual'
-AC_ARG_WITH(manualdir,
-       [  --with-manualdir=DIR    Manual directory],
-       [manualdir="$withval"])
-AC_SUBST(manualdir)
-
-faqdir='${prefix}/${DATADIRNAME}/${PACKAGE}/faq'
-AC_ARG_WITH(faqdir,
-       [  --with-faqdir=DIR       FAQ directory],
-       [faqdir="$withval"])
-AC_SUBST(faqdir)
+dnl waiting for the new manual to be finished
+dnl manualdir='${prefix}/${DATADIRNAME}/${PACKAGE}/manual'
+dnl AC_ARG_WITH(manualdir,
+dnl    [  --with-manualdir=DIR    Manual directory],
+dnl    [manualdir="$withval"])
+dnl AC_SUBST(manualdir)
 
 dnl Set PACKAGE_DATA_DIR in config.h.
 if test "x${datadir}" = 'x${prefix}/share'; then
@@ -217,6 +222,9 @@ if test $ac_cv_dirent_d_type = yes; then
                  Define if `struct dirent' has `d_type' member.)
 fi
 
+# Check whether mkdir does not take the permission argument.
+GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
+
 dnl Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC
@@ -422,35 +430,51 @@ if test x$ac_cv_enable_pthread = xno; then
 else
        AC_MSG_RESULT(yes)
 
+        # For W32 we need to use a special ptrhead lib. In this case we can't
+        # use AC_CHECK_LIB because it has no means of checking for a
+        # library installed under a different name.  Checking for the
+        # header is okay.
+        if test -n "${pthread_name}" ; then
+           ac_cv_enable_pthread=yes
+        else
        AC_CHECK_LIB(pthread, pthread_create, :, ac_cv_enable_pthread=no)
+        fi
        AC_CHECK_HEADERS(pthread.h, :, ac_cv_enable_pthread=no)
 
        if test x$ac_cv_enable_pthread = xyes; then
                AC_DEFINE(USE_PTHREAD, 1, Define if you have pthread)
+                if test -z "${pthread_name}" ; then
                PTHREAD_LIBS="-lpthread"
        fi
+       fi
 
 fi
 AC_SUBST(PTHREAD_LIBS)
 
-t_oldLibs="$LIBS"
-LIBS="$LIBS"
-ac_cv_var__res_options=no
-AC_TRY_LINK([#include <sys/types.h>
+dnl
+dnl Check whether we need to pass -lresolv
+dnl We know that we don't need it for W32.
+dnl
+if test x$os_win32 = xno; then
+  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
+  if test "$ac_cv_var__res_options" != "yes"; then
        LIBRESOLV="-lresolv"
-fi
-LIBS="$t_oldLibs"
+  fi
+  LIBS="$t_oldLibs"
 
-if test "x$LIBRESOLV" = "x"; then
+  if test "x$LIBRESOLV" = "x"; then
        AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
        LIBS="$t_oldLibs"
+  fi
 fi
 AC_SUBST(LIBRESOLV)
 
@@ -599,7 +623,7 @@ AC_ARG_ENABLE(pgpcore-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.),
+       AM_PATH_GPGME(1.0.0, 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"
@@ -645,29 +669,6 @@ else
 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,
@@ -734,22 +735,24 @@ 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 "040"; then
-               AC_MSG_RESULT([*** Sylpheed requires libetpan 0.40 or newer. See http://www.etpan.org/])
+          if test "$LIBETPAN_VERSION" -lt "041"; then
+               AC_MSG_RESULT([*** Sylpheed requires libetpan 0.41 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.40 not found])
+                AC_MSG_ERROR([libetpan 0.41 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.40 or newer. See http://www.etpan.org/ ])
+          AC_MSG_RESULT([*** Sylpheed requires libetpan 0.41 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.40 not found])
+           AC_MSG_ERROR([libetpan 0.41 not found])
        fi
 else
        AC_MSG_RESULT(no)
 fi
+AM_CONDITIONAL(SYLPHEED_LIBETPAN, test "x$libetpan_result" = "xyes")
+
 
 dnl Libgnomeprint
 AC_MSG_CHECKING([whether to use libgnomeprint])
@@ -789,7 +792,6 @@ src/etpan/Makefile
 src/plugins/Makefile
 src/plugins/demo/Makefile
 src/plugins/spamassassin/Makefile
-src/plugins/mathml_viewer/Makefile
 src/plugins/dillo_viewer/Makefile
 src/plugins/trayicon/Makefile
 src/plugins/trayicon/libeggtrayicon/Makefile
@@ -798,19 +800,7 @@ src/plugins/pgpcore/Makefile
 src/plugins/pgpmime/Makefile
 src/plugins/pgpinline/Makefile
 doc/Makefile
-doc/faq/Makefile
-doc/faq/de/Makefile
-doc/faq/en/Makefile
-doc/faq/es/Makefile
-doc/faq/fr/Makefile
-doc/faq/it/Makefile
 doc/man/Makefile
-doc/manual/Makefile
-doc/manual/de/Makefile
-doc/manual/en/Makefile
-doc/manual/es/Makefile
-doc/manual/fr/Makefile
-doc/manual/ja/Makefile
 tools/Makefile
 config/Makefile
 sylpheed-claws.pc