You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@attglobal.net> on 2001/12/08 14:31:18 UTC

[PATCH] looking for zlib headers in all the wrong places

I was trying to use --with-z=/path but without this patch the check
for the library didn't add -I/path and so didn't compile.

Even with this patch, the check for zutil.h.  Clearly (from
config.log) my path is not being searched.

Perhaps there is a better change that makes both tests work?
(otherwise I'd just commit it)

Here is the part of config.log showing that -I/mypath is added for the
"zlib library" check but not for the "zutil.h" check.

configure:4740: checking for zlib library
configure:4749: xlc_r -o conftest  -qfullpath -DAPACHE_XLATE -qHALT=E -g -I/home/trawick/zlib/incl
ude -U__STR__ -D_USE_IRS -D_THREAD_SAFE -DAP_DEBUG
-L/home/trawick/zlib/lib conftest.c -lm -liconv
 -lnsl  -ldl -lz 1>&5
configure:4756: checking for zutil.h
configure:4766: xlc_r -E -U__STR__ -D_USE_IRS -D_THREAD_SAFE -DAP_DEBUG conftest.c >/dev/null 2>co
nftest.out
"configure", line 4762.10: 1506-296 (S) #include file <zutil.h> not
found.
configure: failed program was:
#line 4761 "configure"
#include "confdefs.h"
#include <zutil.h>

Index: config.m4
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/experimental/config.m4,v
retrieving revision 1.16
diff -u -r1.16 config.m4
--- config.m4	2001/11/26 22:50:13	1.16
+++ config.m4	2001/12/08 13:06:40
@@ -53,7 +53,7 @@
     ap_save_ldflags=$LDFLAGS
     ap_save_libs=$LIBS
     if test "$ap_zlib_base" != "/usr"; then
-      APR_ADDTO(INCLUDES, [-I${ap_zlib_base}/include])
+      APR_ADDTO(CFLAGS, [-I${ap_zlib_base}/include])
       APR_ADDTO(LDFLAGS, [-L${ap_zlib_base}/lib])
       if test "x$ap_platform_runtime_link_flag" != "x"; then
          APR_ADDTO(LDFLAGS, [$ap_platform_runtime_link_flag${ap_zlib_Base}/lib])

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: [PATCH] looking for zlib headers in all the wrong places

Posted by Jeff Trawick <tr...@attglobal.net>.
Justin Erenkrantz <je...@ebuilt.com> writes:

> On Sat, Dec 08, 2001 at 08:31:18AM -0500, Jeff Trawick wrote:
> > I was trying to use --with-z=/path but without this patch the check
> > for the library didn't add -I/path and so didn't compile.
> <snip, snip>
> 
> > @@ -53,7 +53,7 @@
> >      ap_save_ldflags=$LDFLAGS
> >      ap_save_libs=$LIBS
> >      if test "$ap_zlib_base" != "/usr"; then
> > -      APR_ADDTO(INCLUDES, [-I${ap_zlib_base}/include])
> > +      APR_ADDTO(CFLAGS, [-I${ap_zlib_base}/include])
> >        APR_ADDTO(LDFLAGS, [-L${ap_zlib_base}/lib])
> >        if test "x$ap_platform_runtime_link_flag" != "x"; then
> >           APR_ADDTO(LDFLAGS, [$ap_platform_runtime_link_flag${ap_zlib_Base}/lib])
> 
> Shouldn't that be CPPFLAGS?  -- justin

Oh yes, certainly!

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: [PATCH] looking for zlib headers in all the wrong places

Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Sat, Dec 08, 2001 at 08:31:18AM -0500, Jeff Trawick wrote:
> I was trying to use --with-z=/path but without this patch the check
> for the library didn't add -I/path and so didn't compile.
<snip, snip>

> @@ -53,7 +53,7 @@
>      ap_save_ldflags=$LDFLAGS
>      ap_save_libs=$LIBS
>      if test "$ap_zlib_base" != "/usr"; then
> -      APR_ADDTO(INCLUDES, [-I${ap_zlib_base}/include])
> +      APR_ADDTO(CFLAGS, [-I${ap_zlib_base}/include])
>        APR_ADDTO(LDFLAGS, [-L${ap_zlib_base}/lib])
>        if test "x$ap_platform_runtime_link_flag" != "x"; then
>           APR_ADDTO(LDFLAGS, [$ap_platform_runtime_link_flag${ap_zlib_Base}/lib])

Shouldn't that be CPPFLAGS?  -- justin