root / ImageMagick / trunk / m4 / ac_prog_perl_version.m4

Revision 7647, 0.7 kB (checked in by cristy, 12 months ago)
Line 
1dnl Available from the GNU Autoconf Macro Archive at:
2dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_prog_perl_version.html
3dnl
4AC_DEFUN([AC_PROG_PERL_VERSION],[dnl
5# Make sure we have perl
6if test -z "$PERL"; then
7AC_CHECK_PROG(PERL,perl,perl)
8fi
9
10# Check if version of Perl is sufficient
11ac_perl_version="$1"
12
13if test "x$PERL" != "x"; then
14  AC_MSG_CHECKING(for perl version greater than or equal to $ac_perl_version)
15  # NB: It would be nice to log the error if there is one, but we cannot rely
16  # on autoconf internals
17  $PERL -e "use $ac_perl_version;" > /dev/null 2>&1
18  if test $? -ne 0; then
19    AC_MSG_RESULT(no);
20    $3
21  else
22    AC_MSG_RESULT(ok);
23    $2
24  fi
25else
26  AC_MSG_WARN(could not find perl)
27fi
28])dnl # AC_PROG_PERL_VERSION
Note: See TracBrowser for help on using the browser.