dnl Process this file with autoconf to produce a configure script.
dnl
-AC_INIT([fetchmail],[6.2.9-rc3])
+AC_INIT([fetchmail],[6.3.2-rc2+SVN],[fetchmail-users@lists.berlios.de])
AC_CONFIG_SRCDIR([fetchmail.h])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_LIBOBJ_DIR([.])
+AC_CANONICAL_TARGET
+
dnl we may need a newer automake version - the oldest tested is 1.7
AC_PREREQ(2.59)
AM_INIT_AUTOMAKE(1.5 foreign no-installinfo)
-dnl the : states that python is optional
-AM_PATH_PYTHON(2.0,,:)
+dnl autobuild support, see <http://josefsson.org/autobuild/>
+(
+ TZ=
+ export TZ
+ AB_INIT
+)
+
+dnl python is optional
+AM_PATH_PYTHON(2.0,,AC_MSG_WARN([Disabling fetchmailconf: python 2.0 or greater not found]))
+AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
AC_PROG_AWK
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_YACC
+# Check for OS special cases
+case $target_os in
+darwin*)
+ AC_MSG_NOTICE(found Darwin - Adding -DBIND_8_COMPAT to CFLAGS)
+ CPFLAGS="-DBIND_8_COMPAT"
+ ;;
+# Check for FreeBSD special case: more libs needed
+freebsd*)
+ AC_MSG_NOTICE(found FreeBSD - Adding -lmd -lkvm -lcom_err to standard libraries)
+ LIBS="$LIBS -lmd -lkvm -lcom_err"
+ ;;
# Check for LynxOS special case: -lbsd needed (at least on 2.3.0) and -s
# not working.
-if test `uname` = "LynxOS"
-then
- echo "Adding -lbsd to standard libraries"
- LIBS="$LIBS -lbsd"
- LDFLAGS=""
- echo "Prepending standard include path to gcc flags"
- CPFLAGS="-I/usr/include"
-fi
-
-# Check for FreeBSD special case: more libs needed
-if test `uname` = "FreeBSD"
-then
- echo "Adding -lmd -lkvm -lcom_err to standard libraries"
- LIBS="$LIBS -lmd -lkvm -lcom_err"
-fi
-
+lynxos*)
+ AC_MSG_NOTICE(found LynxOS - Adding -lbsd to standard libraries)
+ LIBS="$LIBS -lbsd"
+ LDFLAGS=`echo $LDFLAGS | sed "s/-s //"`
+ AC_MSG_NOTICE(found LynxOS - Prepending standard include path to gcc flags)
+ CPFLAGS="-I/usr/include"
+ ;;
# Check for Rhapsody special case: it doesn't like -s
-if test `uname` = "Rhapsody"
-then
- echo "Removing -s load flag"
- LDFLAGS=`echo $LDFLAGS | sed "s/-s //"`
-fi
-
+rhapsody*)
+ AC_MSG_NOTICE(found Rhapsody - Removing -s load flag)
+ LDFLAGS=`echo $LDFLAGS | sed "s/-s //"`
+ ;;
+esac
+
dnl i18n
AM_GNU_GETTEXT([external], [need-ngettext])
-AM_GNU_GETTEXT_VERSION(0.14.1)
+AM_GNU_GETTEXT_VERSION(0.14.3)
dnl end i18n
# Under sysV68, socket and friends are provided by the C library.
LIBS="$LIBS -lcposix"])
dnl Port hack for Sparc/NetBSD-1.5
-AC_CHECK_LIB(intl, gettext,
- [LIBS="$LIBS -lintl"])
+dnl
+dnl NB: this has been disabled as it causes the unconditional
+dnl addition of libintl to the build, which is both undesired
+dnl and breaks on Solaris/Blastwave.org machines.
+dnl
+dnl AC_CHECK_LIB(intl, gettext,
+dnl [LIBS="$LIBS -lintl"])
AC_REPLACE_FUNCS([strstr strcasecmp memmove stpcpy strlcpy strlcat])
### use option --with-kerberos5=DIR to point at a Kerberos 5 directory
### make sure --with-ssl is run before --with-kerberos* !
AC_ARG_WITH(kerberos5,
- [ --with-kerberos5=DIR point fetchmail compilation at a Kerberos 5
-directory],
+ [ --with-kerberos5=DIR point fetchmail compilation at a Kerberos 5 directory],
[
if test "$with_kerberos5" != "no"
then
### use option --with-kerberos=DIR to point at a Kerberos 4 directory
AC_ARG_WITH(kerberos,
- [ --with-kerberos=DIR point fetchmail compilation at a Kerberos 4
-directory],
+ [ --with-kerberos=DIR point fetchmail compilation at a Kerberos 4 directory],
[
if test "$with_kerberos" != "no"
then
AC_CHECK_LIB(45, krb_mk_req)
fi
LDFLAGS="-L$dir/lib $ac_saveLDFLAGS"
- AC_SEARCH_LIBS(des_string_to_key, [des425 des crypto], [], continue)
+ if test `uname` = "FreeBSD"; then
+ AC_SEARCH_LIBS(_ossl_old_des_string_to_key, [des425 des crypto], [], continue)
+ else
+ AC_SEARCH_LIBS(des_string_to_key, [crypto], [], continue)
+ fi
AC_SEARCH_LIBS(krb_realmofhost, [krb4 krb], [], continue)
with_kerberos="$dir"
if test -f "$dir/include/kerberosIV/krb.h" ; then
fi
LDEFLAGS="$LDEFLAGS -L$with_ssl/lib"
LIBS="$LIBS -lssl -lcrypto"
+ dnl check if -ldl is needed
+ AC_MSG_CHECKING([for additional library dependencies of SSL])
+ found=0
+ save_LIBS="$LIBS"
+ for i in "" "-ldl" ; do
+ LIBS="$LDEFLAGS $save_LIBS $i"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM(,[SSL_library_init()])],[found=1; break])
+ done
+ if test $found = 0 ; then
+ AC_MSG_RESULT([error])
+ AC_MSG_ERROR([cannot link with SSL - check config.log])
+ fi
+ LIBS="$save_LIBS $i"
+ if test "$i" = "" ; then i="(none)" ; fi
+ AC_MSG_RESULT($i)
+ dnl XXX FIXME: use pkg-config if available!
AC_DEFINE(SSL_ENABLE)
else
echo 'Disabling SSL support...'
fi
dnl ----------------------------------------------------------------'
-AC_CONFIG_FILES([Makefile m4/Makefile po/Makefile.in])
+AC_CONFIG_FILES([Makefile m4/Makefile po/Makefile.in genlsm.sh])
AC_OUTPUT
dnl Local Variables: