]> sourceware.org Git - automake.git/commitdiff
Don't rely on which, use an Autoconf-like test instead.
authorPavel Roskin <proski@gnu.org>
Sun, 20 Oct 2002 06:59:38 +0000 (06:59 +0000)
committerPavel Roskin <proski@gnu.org>
Sun, 20 Oct 2002 06:59:38 +0000 (06:59 +0000)
Reported by Frédéric L. W. Meunier" <0@pervalidus.net>

bootstrap

index 3c2f517b6940e2f26ee90f8ab6051ea8b0a51089..28d8d3deb54bc7530b4555beed3bbd38be97dc20 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
 # Don't ignore failures
 set -e
 
-# Find perl.  Not as good as autoconf would do, but good enough.
+# Find perl.  Code based on Autoconf, but without non-POSIX support.
 if test -z "$PERL"; then
-       PERL="`which perl 2>/dev/null`"
+       save_IFS=$IFS
+       IFS=:
+       for dir in $PATH; do
+               IFS=$save_IFS
+               test -z "$dir" && dir=.
+               if test -x "$dir/perl"; then
+                       PERL="$dir/perl"
+                       break
+               fi
+       done
 fi
 
-if test -z $PERL; then
+if test -z "$PERL"; then
        echo "Cannot find perl" 2>&1
        exit 1
 fi
This page took 0.027817 seconds and 5 git commands to generate.