summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-01-21 16:49:36 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-01-21 16:49:36 +0100
commit3a4e61ecd809ceccced6e863a27b53264eee3efe (patch)
tree0a99903e0600a76f5a58e4c766cfecb18dc95ab8 /m4
parent4967f6948f479b0b2a3b7a3c05b5709e42207604 (diff)
downloadsamba-3a4e61ecd809ceccced6e863a27b53264eee3efe.tar.gz
samba-3a4e61ecd809ceccced6e863a27b53264eee3efe.tar.bz2
samba-3a4e61ecd809ceccced6e863a27b53264eee3efe.zip
Only check for Perl once in Samba 3.
Diffstat (limited to 'm4')
-rw-r--r--m4/check_perl.m432
1 files changed, 32 insertions, 0 deletions
diff --git a/m4/check_perl.m4 b/m4/check_perl.m4
new file mode 100644
index 0000000000..aaec9cf950
--- /dev/null
+++ b/m4/check_perl.m4
@@ -0,0 +1,32 @@
+dnl SMB Build Environment Perl Checks
+dnl -------------------------------------------------------
+dnl Copyright (C) Stefan (metze) Metzmacher 2004
+dnl Released under the GNU GPL
+dnl -------------------------------------------------------
+dnl
+
+AC_DEFUN([AC_SAMBA_PERL],
+[
+case "$host_os" in
+ *irix*)
+ # On IRIX, we prefer Freeware or Nekoware Perl, because the
+ # system perl is so ancient.
+ AC_PATH_PROG(PERL, perl, "", "/usr/freeware/bin:/usr/nekoware/bin:$PATH")
+ ;;
+ *)
+ AC_PATH_PROG(PERL, perl)
+ ;;
+esac
+
+if test x"$PERL" = x""; then
+ AC_MSG_WARN([No version of perl was found!])
+ $2
+else
+ if test x"$debug" = x"yes";then
+ PERL="$PERL -W"
+ fi
+ export PERL
+ $1
+fi
+])
+