]> Pileus Git - ~andy/fetchmail/blobdiff - configure.ac
Work around screwed Solaris /bin/sh and go for XPG shells.
[~andy/fetchmail] / configure.ac
index 04bb7910a03bb201e2f5d8007a0a07cdebd342ee..9017f218d471196c0ea191945db752bcd5eb424b 100644 (file)
@@ -8,6 +8,7 @@ dnl Autoconfigure input file for fetchmail
 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.3.11],[fetchmail-users@lists.berlios.de])
 AC_CONFIG_SRCDIR([fetchmail.h])
 AC_CONFIG_HEADERS([config.h])
@@ -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
@@ -572,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})