From: Paul Eggert Date: Sun, 4 Nov 2001 00:42:34 +0000 (+0000) Subject: Upgrade to latest version submitted to Autoconf-patches. X-Git-Tag: v1.3.12~93 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=ec1ac86dbba2f74451e2505043287f8ab0544c27;p=debian%2Fgzip Upgrade to latest version submitted to Autoconf-patches. --- diff --git a/m4/shell.m4 b/m4/shell.m4 index 8ef21e0..9c2ce6e 100644 --- a/m4/shell.m4 +++ b/m4/shell.m4 @@ -1,4 +1,4 @@ -#serial 2 +#serial 3 # AC_PROG_SHELL # ------------- @@ -28,26 +28,28 @@ AC_DEFUN([AC_PROG_SHELL], case $ac_cv_path_shell in no) - ac_dummy=/bin:/usr/bin:/usr/bin/posix:/usr/xpg4/bin:$PATH - ac_save_IFS=$IFS; IFS=: - for ac_dir in $ac_dummy; do - for ac_base in sh bash ksh sh5; do - case $ac_dir in - /*) - rm -f conftest.c - if ("$ac_dir/$ac_base" -c "$ac_command") 2>/dev/null; then - ac_cv_path_shell="$ac_dir/$ac_base" - break - fi;; - esac - done - case $ac_cv_path_shell in - no) ;; - *) break;; - esac - done - rm -f conftest.c - IFS=$ac_save_IFS;; + # Prefer shells that are more likely to be installed in the + # same place on all hosts of this platform. Therefore, prefer + # shells in /bin and /usr/bin to shells in the installer's + # PATH. Also, loop through PATH first and then through + # shells, since less-"nice" shells in /bin and /usr/bin are + # more likely to be installed than "nicer" shells elsewhere. + _AS_PATH_WALK([/bin:/usr/bin:$PATH], + [for ac_base in sh bash ksh sh5; do + case $as_dir in + /*) + rm -f conftest.c + if ("$as_dir/$ac_base" -c "$ac_command") 2>/dev/null; then + ac_cv_path_shell="$as_dir/$ac_base" + break + fi;; + esac + done + case $ac_cv_path_shell in + no) ;; + *) break;; + esac]) + rm -f conftest.c;; esac]) AC_MSG_RESULT($ac_cv_path_shell) SHELL=$ac_cv_path_shell