Commit df5499ae authored by cls%seawood.org's avatar cls%seawood.org
Browse files

Fix perl test to use $] for the version number.

Check for Config.pm as a separate test.
Bug #66443
parent bbf8e743
Loading
Loading
Loading
Loading
+385 −374

File changed.

Preview size limit exceeded, changes collapsed.

+12 −2
Original line number Diff line number Diff line
@@ -300,8 +300,8 @@ if test -z "$PERL" || test "$PERL" = ":"; then
    AC_MSG_ERROR([perl not found in \$PATH])
fi

AC_MSG_CHECKING([for minimum required perl version $PERL_VERSION])
_perl_version=`$PERL -e 'use Config; print "$Config{version}"; if ($Config{version} >= $PERL_VERSION) { exit(0); } else { exit(1); }' 2>&5`
AC_MSG_CHECKING([for minimum required perl version >= $PERL_VERSION])
_perl_version=`$PERL -e 'print "$]"; if ($] >= $PERL_VERSION) { exit(0); } else { exit(1); }' 2>&5`
_perl_res=$?
AC_MSG_RESULT([$_perl_version])

@@ -309,6 +309,16 @@ if test "$_perl_res" != 0; then
    AC_MSG_ERROR([Perl $PERL_VERSION or higher is required.])
fi

AC_MSG_CHECKING([for full perl installation])
_perl_archlib=`$PERL -e 'use Config; if ( -d $Config{archlib} ) { exit(0); } else { exit(1); }' 2>&5`
_perl_res=$?
if test "$_perl_res" != 0; then
    AC_MSG_RESULT([no])
    AC_MSG_ERROR([Cannot find Config.pm or \$Config{archlib}.  A full perl installation is required.])
else
    AC_MSG_RESULT([yes])    
fi

AC_PATH_PROG(WHOAMI, whoami, :)
AC_PATH_PROG(AUTOCONF, autoconf, :)
AC_PATH_PROG(UNZIP, unzip, :)