1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
AC_DEFUN([ACX_PATH_PERL],[
AC_MSG_CHECKING([for a working version of perl])
if test x"$PERL" != x; then
# 'PERL' is specified by user
if ( $PERL -e 'use IO::File; use Getopt::Std;' ) > /dev/null 2>&1; then
found=yes
else
$as_unset PERL
found=no
fi
else
found=no
fi
if test $found = no; then
candidate_perl_names='perl perl5'
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH; do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for perl in $candidate_perl_names; do
if ( $as_dir/$perl -e 'use IO::File; use Getopt::Std;' ) > /dev/null 2>&1; then
ac_cv_path_PERL=$as_dir/$perl
found=yes
break 2
fi
done
done
PERL=$ac_cv_path_PERL
fi
if test -n "$PERL"; then
AC_MSG_RESULT($PERL)
else
AC_MSG_RESULT([not found])
perl_warning=yes
fi
AC_SUBST(PERL)
])
|