From 3b5f5706bda144591957f8b8457c279691affa8b Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Mon, 5 Oct 2009 19:17:15 +0000 Subject: Work around screwed Solaris /bin/sh and go for XPG shells. svn path=/branches/BRANCH_6-3/; revision=5436 --- configure.ac | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'configure.ac') 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 -- cgit v1.2.3