3 AC_REVISION($Revision$)
4 AC_DEFUN(modname,[rlm_perl])
6 if test x$with_[]modname != xno; then
11 dnl put configuration checks here.
12 dnl set $fail to what's missing, on fatal errors.
13 dnl use AC_MSG_WARN() on important messages.
15 AC_CHECK_PROG(PERL, perl, yes, no)
16 if test "$PERL" = "no"; then
20 CFLAGS="$CFLAGS `perl -MExtUtils::Embed -e ccopts`"
23 FR_SMART_CHECK_INCLUDE(EXTERN.h)
24 if test "x$ac_cv_header_EXTERN_h" = "xyes"; then
25 perl_cflags='`perl -MExtUtils::Embed -e ccopts`'
31 FR_SMART_CHECK_INCLUDE(perl.h, [#include <EXTERN.h>])
32 if test "x$ac_cv_header_perl_h" = "xyes"; then
33 perl_cflags='`perl -MExtUtils::Embed -e ccopts`'
40 LIBS="$old_LIBS `perl -MExtUtils::Embed -e ldopts`"
41 AC_TRY_LINK([extern char boot_DynaLoader();],
46 if test "x$BROKEN" = "x"; then
47 perl_ldflags='`perl -MExtUtils::Embed -e ldopts`'
49 fail="$fail libperl.so"
53 AC_TRY_LINK([extern char Perl_hv_store();],
58 if test "x$BROKEN" != "x"; then
59 fail="$fail libperl.so"
69 echo \*\*\* module modname is disabled. # keep this! Don't change!
72 dnl Don't change this section.
73 if test x"$fail" != x""; then
74 if test x"${enable_strict_dependencies}" = x"yes"; then
75 AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
77 AC_MSG_WARN([silently not building ]modname[.])
78 AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]);
87 AC_SUBST(perl_ldflags)
89 AC_CONFIG_HEADER(config.h)