From: Greg Stein Date: Wed, 3 Oct 2001 12:59:03 +0000 (+0000) Subject: Use an installed Expat when available, rather than the builtin one. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9922c2891779fb4bf70b76a1e3096c4503a6c0fc;p=thirdparty%2Fapache%2Fhttpd.git Use an installed Expat when available, rather than the builtin one. Presuming the installed one is a shared library, then this should resolve some of the longstanding issues with mod_perl / XML::Parser::Expat. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@91252 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/Configure b/src/Configure index e044b841377..3e3a0f2798e 100755 --- a/src/Configure +++ b/src/Configure @@ -1834,22 +1834,31 @@ fi #################################################################### ## Add in the Expat library if needed/wanted. ## -if [ -d ./lib/expat-lite/ ]; then - if [ "x$RULE_EXPAT" = "xdefault" ]; then + +# set the default, based on whether expat-lite is bundled. if it is present, +# then we can always include expat. +if [ "x$RULE_EXPAT" = "xdefault" ]; then + if [ -d ./lib/expat-lite/ ]; then RULE_EXPAT=yes - fi -else - if [ "$xRULE_EXPAT" = "xyes" ]; then - echo "ERROR: RULE_EXPAT set to \"yes\" but is not available." - exit 1 else RULE_EXPAT=no fi fi + if [ "x$RULE_EXPAT" = "xyes" ]; then - EXPATLIB="lib/expat-lite/libexpat.a" - APLIBDIRS="expat-lite $APLIBDIRS" - CFLAGS="$CFLAGS -DUSE_EXPAT -I\$(SRCDIR)/lib/expat-lite" + if ./helpers/TestCompile lib expat; then + echo " + using system Expat" + LIBS="$LIBS -lexpat" + else + if [ "$xRULE_EXPAT" = "xyes" ]; then + echo "ERROR: RULE_EXPAT set to \"yes\" but is not available." + exit 1 + fi + echo " + using builtin Expat" + EXPATLIB="lib/expat-lite/libexpat.a" + APLIBDIRS="expat-lite $APLIBDIRS" + CFLAGS="$CFLAGS -DUSE_EXPAT -I\$(SRCDIR)/lib/expat-lite" + fi fi ####################################################################