]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix the EXPAT logic to the new meaning... Before, it was simply there to
authorJim Jagielski <jim@apache.org>
Mon, 8 Oct 2001 14:29:30 +0000 (14:29 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 8 Oct 2001 14:29:30 +0000 (14:29 +0000)
check that expat-lite existed, which was kind of bogus... Now, we
allow it to choose which Expat we want. We prefer the system's Expat
if available but will use expat-lite as a backup. We can also bypass
that as well.

PR:
Obtained from:
Submitted by:
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@91350 13f79535-47bb-0310-9956-ffa450edef68

src/CHANGES
src/Configuration.tmpl
src/Configure

index ff9263df9316f712ba5260bc2d13a71ed8c3534a..6124a13920712f7e77c6e842bcf95e6064578534 100644 (file)
@@ -1,5 +1,10 @@
 Changes with Apache 1.3.22
 
+  *) Change to the EXPAT rule logic. We can now use the system's expat
+     library if we want, use our own expat-lite or have Configure
+     pick one for us (prefer system, but use expat-lite as a backup).
+     [Jim Jagielski, Greg Stein]
+
   *) The manual directory is still configurable (as enabled by
      the 1.3.21 change), but its default setting was reverted to
      the pre-1.3.21 default as a subdirectory of the DocumentRoot.
index 68cc2dfaf91314d31d9d3601564ec87cfd91bfe2..d7bdd210f43b26a6758ea069dc8aef6df2bab816 100644 (file)
@@ -161,10 +161,12 @@ Rule SHARED_CHAIN=default
 #  actually print-out the code that the modules execute
 #
 # EXPAT:
-#  Include James Clark's Expat package into Apache, for use by the
-#  modules. The "default" is to include it if the lib/expat-lite/
-#  directory is present. This rule will always be interpreted as "no"
-#  if the directory is not present.
+#  Apache requires an Expat package and includes James Clark's Expat
+#  package (expat-lite) with the distribution. This determines
+#  whether you want to include the system's Expat library ('yes'),
+#  expat-lite ('no') or prefer the system Expat if available but choose
+#  expat-lite if not ('default'). Note that if set to 'yes' and
+#  libexpat.a cannot be found, the build will fail.
 #
 
 Rule SOCKS4=no
index 22df931f32243526d2071e94a0c479898c3163cd..b14fa9e2856ecc6da2fe2dbabb6ad540e851e804 100755 (executable)
@@ -1847,33 +1847,27 @@ if [ "x$RULE_WANTHSREGEX" = "xyes" ]; then
 fi
 
 ####################################################################
-## Add in the Expat library if needed/wanted.
+## Add in the Expat library. Choose whether we want the system's
+## version ('yes'), our version (expat-lite) ('no') or for Configure
+## to choose for us ('default' - system is prefered if available).
 ##
 
-# 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
-    else
-        RULE_EXPAT=no
-    fi
-fi
-
-if [ "x$RULE_EXPAT" = "xyes" ]; then
-    if ./helpers/TestCompile lib expat; then
+if ./helpers/TestCompile lib expat && [ "x$RULE_EXPAT" != "xno" ]; then
         echo " + using system Expat"
-        LIBS="$LIBS -lexpat"
-    else
-        if [ ! -d ./lib/expat-lite/ ]; 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"
+       LIBS="$LIBS -lexpat"
+else
+    if [ "x$RULE_EXPAT" = "xyes" ]; then
+        echo "ERROR: RULE_EXPAT set to \"yes\" but is not available."
+        exit 1
+    fi
+    if [ ! -d ./lib/expat-lite/ ]; then
+        echo "Bundled expat-lite package 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
 
 ####################################################################