aboutsummaryrefslogtreecommitdiff
path: root/autoconf/m4/path_perl.m4
diff options
context:
space:
mode:
Diffstat (limited to 'autoconf/m4/path_perl.m4')
-rw-r--r--autoconf/m4/path_perl.m416
1 files changed, 16 insertions, 0 deletions
diff --git a/autoconf/m4/path_perl.m4 b/autoconf/m4/path_perl.m4
new file mode 100644
index 000000000000..406656cb0322
--- /dev/null
+++ b/autoconf/m4/path_perl.m4
@@ -0,0 +1,16 @@
+dnl Check for a reasonable version of Perl.
+dnl $1 - Minimum Perl version. Typically 5.006.
+dnl
+AC_DEFUN([LLVM_PROG_PERL], [
+AC_PATH_PROG(PERL, [perl], [none])
+if test "$PERL" != "none"; then
+ AC_MSG_CHECKING(for Perl $1 or newer)
+ if $PERL -e 'use $1;' 2>&1 > /dev/null; then
+ AC_MSG_RESULT(yes)
+ else
+ PERL=none
+ AC_MSG_RESULT(not found)
+ fi
+fi
+])
+