apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Gillespie, Jr." <...@pretzelnet.org>
Subject Patch for apr-util/xml expat detection
Date Sun, 13 Jan 2002 07:42:44 GMT
The logic in apr-util/build/apu-conf.m4 for finding expat in a
directory specified by the user with --with-expat is not quite
correct.  I'm not sure what all the cases it is looking for are, but
it leaves out at least one: a normal expat 1.95.2 installation under
$withval.

Furthermore, the expat include dir thus found never made it into
xml/Makefile because xml/Makefile.in references APR_INCLUDES but
apu-conf.m4 puts the expat include dir in INCLUDES.  I arbitrarily
changed this to put the include dir in APR_INCLUDES; i'm not sure if
this is the correct fix or if xml/Makefile.in should be corrected.

Index: build/apu-conf.m4
===================================================================
RCS file: /home/cvspublic/apr-util/build/apu-conf.m4,v
retrieving revision 1.24
diff -a -u -r1.24 apu-conf.m4
--- build/apu-conf.m4   2 Jan 2002 23:59:26 -0000       1.24
+++ build/apu-conf.m4   13 Jan 2002 07:33:10 -0000
@@ -399,6 +399,10 @@
     expat_include_dir="$1/xmlparse"
     expat_libs="-L$1 -lexpat"
     expat_old=yes
+  elif test -r "$1/include/expat.h"; then
+    dnl Expat 1.95.2 installation
+    expat_include_dir="$1/include"
+    expat_libs="$1/lib/libexpat.la"
   fi
   dnl ### test for installed Expat 1.95.* distros
 
@@ -469,7 +473,7 @@
 AC_SUBST(APR_XML_SUBDIRS)
 AC_SUBST(APR_XML_DIR)
 
-APR_ADDTO(INCLUDES, [-I$expat_include_dir])
+APR_ADDTO(APR_INCLUDES, [-I$expat_include_dir])
 APR_ADDTO(LIBS, [$expat_libs])
 APR_ADDTO(APRUTIL_EXPORT_LIBS, [$expat_libs])
 dnl ### export the Expat includes?

-- 
Eric Gillespie, Jr. <*> epg@pretzelnet.org

"When everyone has to reinvent the wheel, many people invent
 square wheels."


Mime
View raw message