1 ##### http://autoconf-archive.cryp.to/ac_prog_perl_version.html
5 # AC_PROG_PERL_VERSION(VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
9 # Makes sure that perl supports the version indicated. If true the
10 # shell commands in ACTION-IF-TRUE are executed. If not the shell
11 # commands in ACTION-IF-FALSE are run. Note if $PERL is not set (for
12 # example by running AC_CHECK_PROG or AC_PATH_PROG),
13 # AC_CHECK_PROG(PERL, perl, perl) will be run.
17 # AC_PROG_PERL_VERSION(5.6.0)
19 # This will check to make sure that the perl you have supports at
20 # least version 5.6.0.
28 # Copyright (c) 2002 Dean Povey <povey@wedgetail.com>
30 # Copying and distribution of this file, with or without
31 # modification, are permitted in any medium without royalty provided
32 # the copyright notice and this notice are preserved.
34 AC_DEFUN([AC_PROG_PERL_VERSION],[dnl
35 # Make sure we have perl
36 if test -z "$PERL"; then
37 AC_CHECK_PROG(PERL,perl,perl)
40 # Check if version of Perl is sufficient
43 if test "x$PERL" != "x"; then
44 AC_MSG_CHECKING(for perl version greater than or equal to $ac_perl_version)
45 # NB: It would be nice to log the error if there is one, but we cannot rely
46 # on autoconf internals
47 $PERL -e "use $ac_perl_version;" > /dev/null 2>&1
48 if test $? -ne 0; then
56 AC_MSG_WARN(could not find perl)