2 AC_REVISION($Revision$)
3 AC_DEFUN(modname,[rlm_perl])
5 if test x$with_[]modname != xno; then
10 dnl put configuration checks here.
11 dnl set $fail to what's missing, on fatal errors.
12 dnl use AC_MSG_WARN() on important messages.
14 AC_CHECK_PROG(PERL, perl, yes, no)
15 if test "$PERL" = "no"; then
19 CFLAGS="$CFLAGS `perl -MExtUtils::Embed -e ccopts; perl -MConfig -e 'print $Config{cppflags}'`"
22 AC_SMART_CHECK_INCLUDE(EXTERN.h)
23 if test "x$ac_cv_header_EXTERN_h" = "xyes"; then
24 perl_cflags="`perl -MExtUtils::Embed -e ccopts; perl -MConfig -e 'print $Config{cppflags}'`"
30 AC_SMART_CHECK_INCLUDE(perl.h, [#include <EXTERN.h>])
31 if test "x$ac_cv_header_perl_h" = "xyes"; then
32 perl_cflags="`perl -MExtUtils::Embed -e ccopts; perl -MConfig -e 'print $Config{cppflags}'`"
38 perl_ldflags='`perl -MExtUtils::Embed -e ldopts`'
46 echo \*\*\* module modname is disabled. # keep this! Don't change!
49 dnl Don't change this section.
50 if test x"$fail" != x""; then
51 if test x"${enable_strict_dependencies}" = x"yes"; then
52 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
54 AC_MSG_WARN([silently not building ]modname[.])
55 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]);
64 AC_SUBST(perl_ldflags)
66 AC_CONFIG_HEADER(config.h)