]> Pileus Git - ~andy/fetchmail/blobdiff - configure.ac
Add Esperanto-language translation.
[~andy/fetchmail] / configure.ac
index f83b4169ed454ddc1bb3100c0d366c8affc914c1..83e75ef4182f8df38520324685dd525dfb77e9a8 100644 (file)
@@ -3,23 +3,27 @@ dnl Autoconfigure input file for fetchmail
 # Fetchmail automatic configuration support
 #
 # Eric S. Raymond <esr@thyrsus.com>
-# 2004 - 2010 Matthias Andree <matthias.andree@gmx.de>
+# 2004 - 2012 Matthias Andree <matthias.andree@gmx.de>
 #
 dnl Process this file with autoconf to produce a configure script.
 dnl
 
 dnl XXX - if bumping version here, check fetchmail.man, too!
-AC_INIT([fetchmail],[6.4.0-alpha1],[fetchmail-devel@lists.berlios.de])
+AC_INIT([fetchmail],[7.0.0-alpha5],[fetchmail-devel@lists.berlios.de])
 AC_CONFIG_SRCDIR([fetchmail.h])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_LIBOBJ_DIR([.])
 
 AC_CANONICAL_HOST
 
+dnl keep this before stuff that runs the compiler!
+AC_USE_SYSTEM_EXTENSIONS
+
 dnl automake options are in Makefile.am
-AC_PREREQ(2.60)
+AC_PREREQ(2.64)
 dnl 2.60 required for AC_USE_SYSTEM_EXTENSIONS
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([silent-rules -Wall])
+AM_SILENT_RULES
 
 dnl python is optional
 #
@@ -31,17 +35,13 @@ AM_PATH_PYTHON(2.0,,AC_MSG_WARN([Disabling fetchmailconf: python 2.0 or greater
 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
 
 AC_PROG_AWK
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_CPP                    dnl Later checks need this.
+AC_PROG_CC_C99
 AC_PROG_INSTALL
 AM_PROG_LEX
 AC_PROG_MAKE_SET
 AC_PROG_RANLIB
 AC_PROG_YACC
 
-AC_USE_SYSTEM_EXTENSIONS
-
 dnl check for b0rked Solaris (and other shells) and find one that works
 AC_MSG_CHECKING(for a working shell...)
 for i in /usr/xpg6/bin/sh /usr/xpg4/bin/sh /usr/ccs/bin/sh /bin/sh /usr/bin/sh /bin/ksh /bin/bash /usr/local/bin/bash ; do
@@ -59,8 +59,7 @@ if test "x$SHELL" = "x" ; then
     AC_MSG_ERROR(no SUS compliant shell found - on Solaris, install SUNWxcu4)
 fi
 
-
-AC_CHECK_HEADERS([arpa/nameser.h md5.h])
+AC_CHECK_HEADERS([arpa/nameser.h])
 
 AC_CHECK_HEADERS([resolv.h],,,[
 #include <sys/types.h>
@@ -75,8 +74,6 @@ AC_CHECK_DECLS([h_errno],,,[
        #include <netdb.h>
 ])
 
-AC_C_CONST                     dnl getopt needs this.
-
 # Check for OS special cases
 case $host_os in
 darwin*)
@@ -113,16 +110,6 @@ AC_CHECK_FUNC(inet_addr,
 
 AC_REPLACE_FUNCS([stpcpy strlcpy strlcat])
 
-have_md5=no
-if test "$ac_cv_header_md5_h" != no ; then
-    AC_SEARCH_LIBS(MD5Init, [md], [have_md5=yes])
-fi
-
-if test "$have_md5" != yes ; then
-    AC_LIBSOURCE(md5c.c)
-    EXTRAOBJ="$EXTRAOBJ md5c.\$(OBJEXT)"
-fi
-
 AC_CHECK_FUNC(getopt_long, [],
               [AC_LIBSOURCES([getopt.c, getopt1.c])
               EXTRAOBJ="$EXTRAOBJ getopt.\$(OBJEXT) getopt1.\$(OBJEXT)"])
@@ -181,9 +168,6 @@ done
 dnl Check for libcrypt -- it may live in libc or libcrypt, as on IRIX
 AC_CHECK_FUNC(crypt, , AC_CHECK_LIB(crypt,crypt))
 
-dnl Check for ANSI volatile
-AC_C_VOLATILE
-
 AC_MSG_CHECKING(sys_siglist declaration in signal.h or unistd.h)
 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>
 /* NetBSD declares sys_siglist in <unistd.h>.  */
@@ -192,6 +176,22 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>
 
 AC_DEFINE_UNQUOTED(PID_DIR, "/var/run", directory for PID lock files)
 
+AC_ARG_ENABLE(pwmd,
+       [  --enable-pwmd           enable Password Manager Daemon support],
+       , [enable_pwmd=no])
+
+if test "$enable_pwmd" = "yes"; then
+    PKG_CHECK_EXISTS([libpwmd], have_libpwmd=1,
+                    AC_MSG_ERROR([Could not find libpwmd pkg-config module.]))
+
+
+    PKG_CHECK_MODULES([libpwmd], [libpwmd >= 6.0.0])
+    AM_CONDITIONAL(HAVE_LIBPWMD, true)
+    AC_DEFINE(HAVE_LIBPWMD, 1, [Define if you have libPWMD installed.])
+else
+    AM_CONDITIONAL(HAVE_LIBPWMD, false)
+fi
+
 # We may have a fallback MDA available in case the socket open to the 
 # local SMTP listener fails.  Best to use procmail for this, as we know
 # it won't try delivering through local SMTP and cause a mail loop.
@@ -351,8 +351,8 @@ AC_CACHE_SAVE
 ###    use option --enable-opie to compile in the OPIE support
 AC_ARG_ENABLE(opie,
        [  --enable-opie           support OTP through the OPIE library],
-       [ AC_CHECK_HEADER(opie.h,, [AC_MSG_ERROR(cannot find <opie.h>, which is required for OPIE support.)])
-          AC_CHECK_LIB(opie,opiegenerator,, [AC_MSG_ERROR(cannot find libopie, which is required for OPIE support.)])
+       [ AC_CHECK_HEADER(opie.h,, [AC_MSG_ERROR([cannot find <opie.h>, which is required for OPIE support.])])
+          AC_CHECK_LIB(opie,opiegenerator,, [AC_MSG_ERROR([cannot find libopie, which is required for OPIE support.])])
           with_opie=$enableval],
        [with_opie=no])
 test "$with_opie" = "yes" && AC_DEFINE(OPIE_ENABLE,1,Define if you want OPIE support compiled in)
@@ -504,7 +504,7 @@ fi
 AC_ARG_WITH(ssl,
        [  --with-ssl=[DIR]        enable SSL support using libraries in DIR],
        [with_ssl=$withval],
-       [with_ssl=no])
+       [with_ssl=yes])
 test "$with_ssl" != "no" && AC_DEFINE(SSL_ENABLE,1,Define if you want SSL support compiled in)
 
 if test "$with_ssl" = "yes"
@@ -576,9 +576,15 @@ then
   dnl XXX FIXME: use pkg-config if available!
   AC_DEFINE(SSL_ENABLE)
 else
-  AC_MSG_NOTICE(Disabling SSL support.)
+  AC_MSG_WARN(Disabling SSL support.)
+  AC_MSG_WARN(Consider re-running configure --with-ssl.)
 fi
 
+case "$LIBS" in *-lssl*)
+       AC_CHECK_DECLS([SSLv2_client_method],,,[#include <openssl/ssl.h>])
+       ;;
+esac
+
 ###    use option --with-socks=DIR to point at SOCKS library
 AC_ARG_WITH(socks,
        [  --with-socks[=DIR]      add built-in SOCKS firewall access],
@@ -673,14 +679,23 @@ then
     CPPFLAGS="$CPPFLAGS -I$with_gssapi/include"
   fi
   AC_CHECK_HEADERS(gss.h gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h)
-  if test "$ac_cv_header_gssapi_h" = "yes"; then
-    AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi.h, AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,1,Define if you have MIT kerberos))
-  else
-    AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi/gssapi.h, AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE))
-  fi
+  AC_CHECK_DECLS(GSS_C_NT_HOSTBASED_SERVICE,,,[
+    AC_INCLUDES_DEFAULT
+    #if HAVE_GSS_H
+    #include <gss.h>
+    #endif
+    #if HAVE_GSSAPI_GSSAPI_H
+    #include <gssapi/gssapi.h>
+    #elif HAVE_GSSAPI_H
+    #include <gssapi.h>
+    #endif
+    #if HAVE_GSSAPI_GSSAPI_GENERIC_H
+    #include <gssapi/gssapi_generic.h>
+    #endif
+    ])
 fi])
 
-AC_CONFIG_FILES([Makefile po/Makefile.in genlsm.sh])
+AC_CONFIG_FILES([Makefile po/Makefile.in])
 AC_OUTPUT
 
 dnl Local Variables: