aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2009-10-05 19:17:15 +0000
committerMatthias Andree <matthias.andree@gmx.de>2009-10-05 19:17:15 +0000
commit3b5f5706bda144591957f8b8457c279691affa8b (patch)
tree8fa3e547150b8e761e900260cc5641c2394d9fed /configure.ac
parentd826bbf1b896e5622e0335fb8689b5516ff31871 (diff)
downloadfetchmail-3b5f5706bda144591957f8b8457c279691affa8b.tar.gz
fetchmail-3b5f5706bda144591957f8b8457c279691affa8b.tar.bz2
fetchmail-3b5f5706bda144591957f8b8457c279691affa8b.zip
Work around screwed Solaris /bin/sh and go for XPG shells.
svn path=/branches/BRANCH_6-3/; revision=5436
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 40fa405e..9017f218 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,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