root/ImageMagick/trunk/m4/ac_prog_perl_version.m4
| Revision 1, 0.7 KB (checked in by cristy, 3 months ago) |
|---|
| Line | |
|---|---|
| 1 | dnl Available from the GNU Autoconf Macro Archive at: |
| 2 | dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_prog_perl_version.html |
| 3 | dnl |
| 4 | AC_DEFUN([AC_PROG_PERL_VERSION],[dnl |
| 5 | # Make sure we have perl |
| 6 | if test -z "$PERL"; then |
| 7 | AC_CHECK_PROG(PERL,perl,perl) |
| 8 | fi |
| 9 | |
| 10 | # Check if version of Perl is sufficient |
| 11 | ac_perl_version="$1" |
| 12 | |
| 13 | if 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 |
| 25 | else |
| 26 | AC_MSG_WARN(could not find perl) |
| 27 | fi |
| 28 | ])dnl # AC_PROG_PERL_VERSION |
Note: See TracBrowser
for help on using the browser.
