3 # Check for a working (i.e. POSIX-compatible) shell.
5 # Written by Paul Eggert <eggert@twinsun.com>,
6 # from an idea suggested by Albert Chin-A-Young <china@thewrittenword.com>.
8 AC_DEFUN(AC_PROG_SHELL,
9 [AC_MSG_CHECKING(for a POSIX-compliant shell)
10 AC_CACHE_VAL(ac_cv_path_shell,
12 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
13 ac_dummy=/bin:/usr/bin:/usr/bin/posix:/usr/xpg4/bin:$PATH
14 for ac_dir in $ac_dummy; do
15 for ac_base in sh bash ksh sh5; do
18 if ("$ac_dir/$ac_base" -c '
20 # Test the noclobber option,
21 # using the portable POSIX.2 syntax.
23 rm -f conftest.c || exit
29 ac_cv_path_shell="$ac_dir/$ac_base"
35 if test "$ac_cv_path_shell" != no; then
40 AC_MSG_RESULT($ac_cv_path_shell)
41 SHELL=$ac_cv_path_shell
42 if test "$SHELL" = no; then
44 AC_MSG_WARN(Using $SHELL, even though it is not POSIX-compliant)