httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: [PATCH] Broken APR_CHECK_APR_DEFINE() macro in test for APR_HAVE_IPV6 and APR_HAS_RANDOM
Date Fri, 04 Nov 2005 17:25:07 GMT
On Wed, Nov 02, 2005 at 02:10:19PM +0100, Martin Kraemer wrote:
> On Wed, Nov 02, 2005 at 12:43:42PM +0000, Joe Orton wrote:
> > Converting all use of $() when adding to INCLUDES in configure to ${} so 
> > the paths get expanded immediately would seem like the best fix unless 
> > there's some reason why that won't work (I can't think of any).
> 
> As I said, you need a 2nd eval. Unless you mean that $top_builddir
> should be expanded *everywhere* immediately. But IMO it is much
> nicer to preserve the special property for $top_builddir
> of being the "top_builddir" as long as possible.

Well, you can't move your builddir after running configure so I can't 
see why expanding the variable early really makes much difference.

> > config_vars.sh might need updating to strip the expanded paths properly 
> > during installation. 
> 
> Here too it helps to know '$top_builddir' (and not just have the
> expanded path)...

>From a quick hack this doesn't not too complicated, the rest of the 
*/config*.m4 files need munging like this too for a complete solution.

Index: configure.in
===================================================================
--- configure.in	(revision 330354)
+++ configure.in	(working copy)
@@ -136,6 +136,12 @@
 abs_srcdir=`(cd $srcdir && pwd)`
 abs_builddir=`pwd`
 
+dnl Export exact copies of these for use in build/config_vars.sh
+ap_abs_srcdir="$abs_srcdir"
+ap_abs_builddir="$abs_builddir"
+AC_SUBST(ap_abs_srcdir)
+AC_SUBST(ap_abs_builddir)
+
 AC_ARG_WITH(pcre,
 APACHE_HELP_STRING(--with-pcre=PATH,Use external PCRE library))
 
@@ -166,7 +172,7 @@
                   [--prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir
--bindir=$bindir])
 
   APR_ADDTO(AP_LIBS, [$abs_builddir/srclib/pcre/libpcre.la])
-  APR_ADDTO(INCLUDES, [-I\$(top_builddir)/srclib/pcre])
+  APR_ADDTO(INCLUDES, [-I${abs_builddir}/srclib/pcre])
 
   AP_BUILD_SRCLIB_DIRS="$AP_BUILD_SRCLIB_DIRS pcre"
   AP_CLEAN_SRCLIB_DIRS="$AP_CLEAN_SRCLIB_DIRS pcre" 
@@ -180,10 +186,10 @@
 APR_ADDTO(INCLUDES, [-I.])
 
 if test "$abs_builddir" != "$abs_srcdir"; then
-  APR_ADDTO(INCLUDES, [-I\$(top_builddir)/include])
+  APR_ADDTO(INCLUDES, [-I${top_builddir}/include])
 fi
 
-APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/os/\$(OS_DIR) -I\$(top_srcdir)/server/mpm/\$(MPM_SUBDIR_NAME)
-I\$(top_srcdir)/modules/http -I\$(top_srcdir)/modules/filters -I\$(top_srcdir)/modules/proxy
-I\$(top_srcdir)/include -I\$(top_srcdir)/modules/generators -I\$(top_srcdir)/modules/mappers
-I\$(top_srcdir)/modules/database])
+APR_ADDTO(INCLUDES, [-I${abs_srcdir}/os/${OS_DIR} -I${abs_srcdir}/server/mpm/${MPM_SUBDIR_NAME}
-I${abs_srcdir}/modules/http -I${abs_srcdir}/modules/filters -I${abs_srcdir}/modules/proxy
-I${abs_srcdir}/include -I${abs_srcdir}/modules/generators -I${abs_srcdir}/modules/mappers
-I${abs_srcdir}/modules/database])
 
 # apr/apr-util --includes may pick up system paths for dependent
 # libraries, so ensure these are later in INCLUDES than local source
Index: build/config_vars.sh.in
===================================================================
--- build/config_vars.sh.in	(revision 330354)
+++ build/config_vars.sh.in	(working copy)
@@ -39,6 +39,9 @@
 APR_INCLUDEDIR="`${APR_CONFIG} --includedir`"
 APU_INCLUDEDIR="`${APU_CONFIG} --includedir`"
 
+abs_srcdir="@ap_abs_srcdir@"
+abs_builddir="@ap_abs_builddir@"
+
 installbuilddir="@exp_installbuilddir@"
 
 exec sed "
@@ -62,6 +65,7 @@
 /^MPM_SUBDIR_NAME/d
 /^EXTRA_INCLUDES/{ 
   s, = , = -I\$(includedir) ,
+  s, -I${abs_srcdir}/[^ ]*,,g
   s, -I\$(top_srcdir)/[^ ]*,,g
   s, -I\$(top_builddir)/[^ ]*,,g
 }


Mime
View raw message