summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-14 22:27:07 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-14 22:27:07 +0200
commit4468279ca27b25a6e562b5c367487294a016c7e3 (patch)
tree8c28cc28b7cda8aac3881f049597b9aeb063be53
parented6d3fd7ab827f48c8e5949805644bb34b1ad5f2 (diff)
downloadsamba-4468279ca27b25a6e562b5c367487294a016c7e3.tar.gz
samba-4468279ca27b25a6e562b5c367487294a016c7e3.tar.bz2
samba-4468279ca27b25a6e562b5c367487294a016c7e3.zip
Move checks for perl inside function.
-rw-r--r--source4/build/m4/check_perl.m417
1 files changed, 12 insertions, 5 deletions
diff --git a/source4/build/m4/check_perl.m4 b/source4/build/m4/check_perl.m4
index 82ca242499..601798be47 100644
--- a/source4/build/m4/check_perl.m4
+++ b/source4/build/m4/check_perl.m4
@@ -5,6 +5,8 @@ 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
@@ -18,11 +20,16 @@ esac
if test x"$PERL" = x""; then
AC_MSG_WARN([No version of perl was found!])
- AC_MSG_ERROR([Please install perl from http://www.perl.com/])
+ $2
+else
+ if test x"$debug" = x"yes";then
+ PERL="$PERL -W"
+ fi
+ export PERL
+ $1
fi
-if test x"$debug" = x"yes";then
- PERL="$PERL -W"
-fi
-export PERL
+])
+
+AC_SAMBA_PERL([], [AC_MSG_ERROR([Please install perl from http://www.perl.com/])])
AC_PATH_PROG(YAPP, yapp, false)