You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Joe Orton <jo...@manyfish.co.uk> on 2002/02/03 14:54:57 UTC

[PATCH] apr-util: don't add -I/usr/include to INCLUDES

The expat detection was adding -I/usr/include to INCLUDES when a
/usr/include/expat.h is found; this is redundant, can mess up include
path ordering, and bleeding edge gcc's even give warnings for it.

(it looks like the code will also do the same for -L/usr/lib in some
circumstances)

Index: build/apu-conf.m4
===================================================================
RCS file: /home/cvspublic/apr-util/build/apu-conf.m4,v
retrieving revision 1.29
diff -u -r1.29 apu-conf.m4
--- build/apu-conf.m4	19 Jan 2002 05:03:57 -0000	1.29
+++ build/apu-conf.m4	3 Feb 2002 13:46:26 -0000
@@ -546,7 +549,9 @@
 AC_SUBST(APR_XML_SUBDIRS)
 AC_SUBST(APR_XML_DIR)
 
-APR_ADDTO(APRUTIL_INCLUDES, [-I$expat_include_dir])
+if test "${expat_include_dir}" != "/usr/include"; then
+   APR_ADDTO(APRUTIL_INCLUDES, [-I$expat_include_dir])
+fi
 APR_ADDTO(APRUTIL_EXPORT_LIBS, [$expat_libs])
 ])
 


Re: [PATCH] apr-util: don't add -I/usr/include to INCLUDES

Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Sun, Feb 03, 2002 at 01:54:57PM +0000, Joe Orton wrote:
> The expat detection was adding -I/usr/include to INCLUDES when a
> /usr/include/expat.h is found; this is redundant, can mess up include
> path ordering, and bleeding edge gcc's even give warnings for it.
> 
> (it looks like the code will also do the same for -L/usr/lib in some
> circumstances)

Committed.  Thanks!  -- justin