THRIFT-850. build: Perl runtime requires Bit::Vector which may not be installed by...
authorBryan Duxbury <bryanduxbury@apache.org>
Thu, 19 Aug 2010 05:23:59 +0000 (05:23 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Thu, 19 Aug 2010 05:23:59 +0000 (05:23 +0000)
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

configure.ac

index 412a223..ae6209d 100644 (file)
@@ -119,8 +119,12 @@ AM_CONDITIONAL(WITH_PYTHON, [test -n "$PYTHON" -a "$PYTHON" != ":"])
 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