THRIFT-850. build: Perl runtime requires Bit::Vector which may not be installed by default, but configure does not fail
Attached patch should do the following:
* check for the existence of the Perl Bit::Vector module
* warn the user that the Perl library won't be built if Bit::Vector doesn't exist
* have the WITH_PERL conditional also require Bit::Vector (e.g. don't built the perl libs if the module isn't there)
Patch: Michael Lum
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@987020 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configure.ac b/configure.ac
index 412a223..ae6209d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,8 +119,12 @@
AX_THRIFT_LIB(perl, [Perl], yes)
if test "$with_perl" = "yes"; then
AC_PATH_PROG([PERL], [perl])
+ if test -n "`$PERL -MBit::Vector -e exit 2>&1`"; then
+ AC_MSG_WARN([Perl Bit::Vector module not installed, skipping perl])
+ have_perl_bit_vector="no"
+ fi
fi
-AM_CONDITIONAL(WITH_PERL, [test -n "$PERL"])
+AM_CONDITIONAL(WITH_PERL, [test -n "$PERL" -a -z "$have_perl_bit_vector"])
AX_THRIFT_LIB(php, [PHP], yes)
if test "$with_php" = "yes"; then