Use Perl 5 even if Perl 4 comes first in the search path.
authorUlf Möller <ulf@openssl.org>
Fri, 9 Apr 1999 16:25:25 +0000 (16:25 +0000)
committerUlf Möller <ulf@openssl.org>
Fri, 9 Apr 1999 16:25:25 +0000 (16:25 +0000)
Configure
config

index 5e78dd11a7cc541b186fae90ea230b804a06372b..c5867401e3daf775be667f5e1f7d1a5330917d2a 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -731,7 +731,8 @@ sub which
                {
                if (-x "$path/$name")
                        {
-                       return "$path/$name";
+                       return "$path/$name" unless ($name eq "perl" and
+                        system("$path/$name -e " . '\'exit($]<5.0);\''));
                        }
                }
        }
diff --git a/config b/config
index 2427c4a1aad7d573a9ca2c3ea0d5a56ea38b617a..2bc53c24249520b8c3f7773c2f9ca774a78743b8 100755 (executable)
--- a/config
+++ b/config
@@ -344,13 +344,15 @@ fi
 if [ ".$PERL" = . ] ; then
        for i in . `echo $PATH | sed 's/:/ /g'`; do
                if [ -f "$i/perl" ] ; then
-                       PERL="$i/perl"
-                       break;
+                       if "$i/perl" -e 'exit($]<5.0)'; then
+                               PERL="$i/perl"
+                               break;
+                       fi;
                fi;
        done
 fi
 
-if $PERL -e 'exit($]>=5.0);' ; then
+if [ ".$PERL" = . ] ; then
        echo "You need Perl 5."
        exit 1
 fi