]> Pileus Git - ~andy/fetchmail/blobdiff - configure.ac
Work around screwed Solaris /bin/sh and go for XPG shells.
[~andy/fetchmail] / configure.ac
index 75543406bf836f50fb3f1340493c1cfbc2ddc307..9017f218d471196c0ea191945db752bcd5eb424b 100644 (file)
@@ -3,12 +3,13 @@ dnl Autoconfigure input file for fetchmail
 # Fetchmail automatic configuration support
 #
 # Eric S. Raymond <esr@thyrsus.com>
-# 2004 - 2008 Matthias Andree <matthias.andree@gmx.de>
+# 2004 - 2009 Matthias Andree <matthias.andree@gmx.de>
 #
 dnl Process this file with autoconf to produce a configure script.
 dnl
 
-AC_INIT([fetchmail],[6.3.9],[fetchmail-users@lists.berlios.de])
+dnl XXX - if bumping version here, check fetchmail.man, too!
+AC_INIT([fetchmail],[6.3.11],[fetchmail-users@lists.berlios.de])
 AC_CONFIG_SRCDIR([fetchmail.h])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_LIBOBJ_DIR([.])
@@ -45,6 +46,24 @@ dnl INTERACTIVE Systems Corporation Unix on 2006-07-23.  New programs
 dnl need not use this macro.  It is implemented as
 dnl `AC_SEARCH_LIBS([strerror], [cposix])'
 
+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
+    $i -c 'if ! false ; then echo $(echo ok) ; fi' >config.$$ 2>/dev/null
+    j=`cat config.$$`
+    rm -f config.$$
+    if test "x$j" = "xok" ; then
+        SHELL=$i
+        AC_SUBST(SHELL)
+        break
+    fi
+done
+AC_MSG_RESULT($SHELL)
+if test "x$SHELL" = "x" ; then
+    AC_MSG_ERROR(no SUS compliant shell found - on Solaris, install SUNWxcu4)
+fi
+
+
 AC_HEADER_STDC
 AC_HEADER_TIME
 AC_TYPE_SIZE_T
@@ -107,6 +126,8 @@ rhapsody*)
     ;;
 esac
 
+AC_CACHE_SAVE
+
 dnl i18n
 AM_GNU_GETTEXT([external], [need-ngettext])
 AM_GNU_GETTEXT_VERSION([0.14.6])
@@ -432,6 +453,8 @@ if test "$with_POP3" != yes && test "$with_POP2" != yes \
     AC_MSG_ERROR([You must enable at least one of POP2, POP3 and IMAP.])
 fi
 
+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],
@@ -568,7 +591,7 @@ else
            AC_CHECK_LIB(db2, db_open, ac_krblibs="$ac_krblibs -ldb2", [],
                 ${LDFLAGS})
            AC_CHECK_LIB(des, des_string_to_key, libk5crypto=-ldes,
-              AC_CHECK_LIB(ssl, MD5_Init, [],
+              AC_CHECK_LIB(crypto, MD5_Init, [],
                 AC_MSG_ERROR([DES libraries not found. Try adding --with-ssl to enable OpenSSL support]),
                 ${LDFLAGS} ${ac_krblibs}),
            ${LDFLAGS} ${ac_krblibs})