From 64e2d146d21e70754e660e89ba5416d33f54dc3e Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 31 Jan 2011 22:17:04 +0000 Subject: QPID-3009: Improved configure support for perl bindings based on suggestion by Jose Pedro Oliveira git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1065832 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/configure.ac | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'cpp') diff --git a/cpp/configure.ac b/cpp/configure.ac index 1ed6ee1975..a0cf2fed76 100644 --- a/cpp/configure.ac +++ b/cpp/configure.ac @@ -232,11 +232,13 @@ AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test -f $PYTHON_INC/Python.h && test -n "$S # Perl bindings: AC_CHECK_PROG([H2XS], [h2xs], [h2xs]) -if test -n "$H2XS" ; then - AC_CHECK_FILE("$libdir/perl5/CORE/perl.h", [AC_SUBST([PERL_INC], "$libdir/perl5/CORE")]) -fi -AM_CONDITIONAL([HAVE_PERL_DEVEL], [test -n "$H2XS" && test -n "$SWIG" && test -n "$PERL_INC"]) - +AC_CHECK_PROG([PERL], [perl], [perl]) +if test -n "$PERL"; then + PERL_ARCHLIB=`perl -MConfig -e 'print "$Config{archlib}";'` + AC_CHECK_FILE( ["$PERL_ARCHLIB/CORE/perl.h"], + [AC_SUBST([PERL_INC], ["$PERL_ARCHLIB/CORE"])] ) +fi +AM_CONDITIONAL([HAVE_PERL_DEVEL], [test -n "$PERL" && test -n "$H2XS" && test -n "$SWIG" && test -n "$PERL_INC"]) specdir=`pwd`/$srcdir/../specs AMQP_FINAL_XML=$specdir/amqp.0-10-qpid-errata.xml -- cgit v1.2.1