From faff96d0f654a26161d9327acf8d31c0aa815a39 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Mon, 24 Mar 2008 03:04:29 +0000 Subject: [PATCH] Add a run check for Perl support. Originally committed to SVN as r2133. --- configure.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/configure.in b/configure.in index f10060c00..3200b7e1c 100644 --- a/configure.in +++ b/configure.in @@ -608,11 +608,27 @@ if test -z "$perl_disabled"; then AC_MSG_CHECKING([$PERL_BIN libs]) PERL_LDFLAGS=`$PERL_BIN -MExtUtils::Embed -eldopts` AC_MSG_RESULT([$PERL_LDFLAGS]) + + AC_AGI_COMPILE([Perl], [perl], [$PERL_CFLAGS], [$PERL_LDFLAGS],[ +#include +#include +int main(int argc, char **argv) { + static PerlInterpreter *my_perl; + PERL_SYS_INIT3(&argc,&argv,&env); + my_perl = perl_alloc(); + if (!my_perl) return 1; + return 0; +}]) fi fi fi +if test "$agi_with_perl" = "no" && test "$with_perl" = "yes"; then + AC_MSG_WARN([Perl detected, but it doesn't work..]) + with_perl="no" +fi + AC_SUBST(PERL_CFLAGS) AC_SUBST(PERL_LDFLAGS)