X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=m4%2Fshell.m4;h=a1cf55b9f7c00c20149497433ae883f4a52d15d7;hb=a2da5976f6dd19d936aff33a9d6ef68cadb88969;hp=abdd2ba4f6bb0c040ee236521647f510aa233fbc;hpb=800deb09b422a73c1212233a93839a223ff59678;p=debian%2Fgzip diff --git a/m4/shell.m4 b/m4/shell.m4 index abdd2ba..a1cf55b 100644 --- a/m4/shell.m4 +++ b/m4/shell.m4 @@ -1,9 +1,9 @@ # Check for a working shell. -# Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2007, 2009-2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) +# the Free Software Foundation; either version 3, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, @@ -25,52 +25,52 @@ AC_DEFUN([AC_PROG_SHELL], [AC_MSG_CHECKING([for a POSIX-compliant shell]) AC_CACHE_VAL(ac_cv_path_shell, [ac_command=' - # Test the noclobber option, using the portable POSIX.2 syntax. - set -C - rm -f conftest.c - >conftest.c || exit - >|conftest.c || exit - !>conftest.c || exit - # Test that $(...) works. - test "$(expr 3 + 4)" -eq 7 || exit + # Test the noclobber option, using the portable POSIX.2 syntax. + set -C + rm -f conftest.c + >conftest.c || exit + >|conftest.c || exit + !>conftest.c || exit + # Test that $(...) works. + test "$(expr 3 + 4)" -eq 7 || exit ' ac_cv_path_shell=no case $SHELL in - /*) - rm -f conftest.c - if ("$SHELL" -c "$ac_command") 2>/dev/null; then - ac_cv_path_shell=$SHELL - fi;; + (/*) + rm -f conftest.c + if ("$SHELL" -c "$ac_command") 2>/dev/null; then + ac_cv_path_shell=$SHELL + fi esac case $ac_cv_path_shell in - no) - # 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_save_IFS=$IFS; IFS=: - for as_dir in /bin /usr/bin $PATH - do - IFS=$as_save_IFS - case $as_dir in - /*) - for ac_base in sh bash ksh sh5; do - 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 - done - case $ac_cv_path_shell in - /*) break;; - esac;; - esac - done - rm -f conftest.c;; + (no) + # 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_save_IFS=$IFS; IFS=: + for as_dir in /bin /usr/bin $PATH + do + IFS=$as_save_IFS + case $as_dir in + (/*) + for ac_base in sh bash ksh sh5; do + 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 + done + case $ac_cv_path_shell in + (/*) break + esac + esac + done + rm -f conftest.c esac]) AC_MSG_RESULT($ac_cv_path_shell) SHELL=$ac_cv_path_shell