summaryrefslogtreecommitdiff
path: root/source4/build/m4/check_perl.m4
blob: 601798be471c4208834bd691a6dc94b41872b449 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
])

AC_SAMBA_PERL([], [AC_MSG_ERROR([Please install perl from http://www.perl.com/])])

AC_PATH_PROG(YAPP, yapp, false)