summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorChristian Hammond <chipx86@chipx86.com>2003-10-09 00:16:59 +0000
committerChristian Hammond <chipx86@chipx86.com>2003-10-09 00:16:59 +0000
commit7ac6f17a51df0571173408c73747cba6bc052336 (patch)
tree8f6dc9f8706300acdfd7912341049af01fe8fe84 /acinclude.m4
parent3a47c2ee59fbe2a71ad74c741054221294a825d6 (diff)
downloadpidgin-7ac6f17a51df0571173408c73747cba6bc052336.tar.gz
[gaim-migrate @ 7770]
Forgot this.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m437
1 files changed, 37 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 62c5445872..6923669300 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -749,3 +749,40 @@ AC_DEFUN([AC_VAR_TIMEZONE_EXTERNALS],
[Define if you have the external 'daylight' variable.])
fi
])
+
+dnl Available from the GNU Autoconf Macro Archive at:
+dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_prog_perl_modules.html
+dnl
+AC_DEFUN([AC_PROG_PERL_MODULES],[dnl
+ac_perl_modules="$1"
+# Make sure we have perl
+if test -z "$PERL"; then
+AC_CHECK_PROG(PERL,perl,perl)
+fi
+
+if test "x$PERL" != x; then
+ ac_perl_modules_failed=0
+ for ac_perl_module in $ac_perl_modules; do
+ AC_MSG_CHECKING(for perl module $ac_perl_module)
+
+ # Would be nice to log result here, but can't rely on autoconf internals
+ $PERL "-M$ac_perl_module" -e exit > /dev/null 2>&1
+ if test $? -ne 0; then
+ AC_MSG_RESULT(no);
+ ac_perl_modules_failed=1
+ else
+ AC_MSG_RESULT(ok);
+ fi
+ done
+
+ # Run optional shell commands
+ if test "$ac_perl_modules_failed" = 0; then
+ :
+ $2
+ else
+ :
+ $3
+ fi
+else
+ AC_MSG_WARN(could not find perl)
+fi])dnl