You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by je...@apache.org on 2002/05/13 10:39:30 UTC
cvs commit: httpd-2.0/srclib Makefile.in
jerenkrantz 02/05/13 01:39:30
Modified: . configure.in
srclib Makefile.in
Log:
First pass at trying to standardize httpd-2.0's usage of APR and APR-util
so that they can be separated - use an installed APR and APR-util with
httpd-2.0. This is not expected to achieve full separation, but is
merely the first step in the process. The tree should still be buildable
in the source-only case.
This commit does the following things:
- Use the standard find_apr.m4 and find_apu.m4 m4 macro files that flood and
Subversion already use for locating APR and APR-util. This adds the
--with-apr and --with-apr-util configure options.
- Stop using APRVARS and export_vars.sh.
- Use apr-config and apu-config to determine dependencies.
- Add AP_BUILD_SRCLIB_DIRS and AP_CLEAN_SRCLIB_DIRS values (names stink)
to dynamically figure out what subdirs in srclib we will build.
(What we really want to do is set one value - go L->R on build and
R->L on clean. I can't think of a way to do this.)
- If we are using APR and APR-util that are already installed, don't
specify them in srclib. (This still needs some work I bet.)
Revision Changes Path
1.217 +37 -28 httpd-2.0/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/httpd-2.0/configure.in,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -r1.216 -r1.217
--- configure.in 18 Apr 2002 09:01:31 -0000 1.216
+++ configure.in 13 May 2002 08:39:30 -0000 1.217
@@ -16,6 +16,8 @@
sinclude(srclib/apr/build/apr_common.m4)
sinclude(srclib/apr/build/apr_network.m4)
sinclude(srclib/apr/build/apr_threads.m4)
+sinclude(srclib/apr/build/find_apr.m4)
+sinclude(srclib/apr-util/build/find_apu.m4)
sinclude(acinclude.m4)
dnl XXX we can't just use AC_PREFIX_DEFAULT because that isn't subbed in
@@ -61,11 +63,40 @@
echo $ac_n "${nl}Configuring Apache Portable Runtime library ...${nl}"
-APR_SUBDIR_CONFIG(srclib/apr, "$apache_apr_flags --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir --datadir=$datadir --with-installbuilddir=$installbuilddir")
+APR_FIND_APR("$srcdir/srclib/apr", "./srclib/apr")
+
+if test "$apr_found" = "no"; then
+ AC_MSG_ERROR([APR not found. Please read the documentation.])
+fi
+
+if test "$apr_found" = "reconfig"; then
+ APR_SUBDIR_CONFIG(srclib/apr, "$apache_apr_flags --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir --datadir=$datadir --with-installbuilddir=$installbuilddir")
+ dnl We must be the first to build and the last to be cleaned
+ AP_BUILD_SRCLIB_DIRS="apr $AP_BUILD_SRCLIB_DIRS"
+ AP_CLEAN_SRCLIB_DIRS="$AP_CLEAN_SRCLIB_DIRS apr"
+fi
+
+APR_ADDTO(CFLAGS, `$apr_config --cflags`)
+APR_ADDTO(CPPFLAGS, `$apr_config --cppflags`)
+APR_ADDTO(LDFLAGS, `$apr_config --ldflags`)
echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}"
-APR_SUBDIR_CONFIG(srclib/apr-util, "--with-apr=../apr --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir")
+APR_FIND_APU("$srcdir/srclib/apr-util", "./srclib/apr-util")
+
+if test "$apu_found" = "no"; then
+ AC_MSG_ERROR([APR-util not found. Please read the documentation.])
+fi
+
+if test "$apu_found" = "reconfig"; then
+ APR_SUBDIR_CONFIG(srclib/apr-util, "--with-apr=../apr --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir")
+ dnl We must be the last to build and the first to be cleaned
+ AP_BUILD_SRCLIB_DIRS="$AP_BUILD_SRCLIB_DIRS apr-util"
+ AP_CLEAN_SRCLIB_DIRS="apr-util $AP_CLEAN_SRCLIB_DIRS"
+fi
+
+APR_ADDTO(LDFLAGS, `$apu_config --ldflags`)
+APR_ADDTO(INCLUDES, `$apu_config --includes`)
echo $ac_n "${nl}Configuring PCRE regular expression library ...${nl}"
@@ -73,23 +104,6 @@
echo $ac_n "${nl}Configuring Apache httpd ...${nl}"
-echo $ac_n "obtaining flag settings from the sub-configures...${nl}"
-. ./srclib/apr/APRVARS
-
-dnl Now that we have APR's EXTRA_flags in our environment, move them over
-dnl to the normal variables to avoid duplications and use them for testing.
-dnl We ignore EXTRA_INCLUDES because our own includes will encompass them.
-dnl
-APR_ADDTO(CFLAGS, $EXTRA_CFLAGS)
-APR_ADDTO(CPPFLAGS, $EXTRA_CPPFLAGS)
-APR_ADDTO(LDFLAGS, $EXTRA_LDFLAGS)
-APR_ADDTO(LIBS, $EXTRA_LIBS)
-EXTRA_CFLAGS=
-EXTRA_CPPFLAGS=
-EXTRA_LDFLAGS=
-EXTRA_LIBS=
-EXTRA_INCLUDES=
-
dnl Absolute source/build directory
abs_srcdir=`(cd $srcdir && pwd)`
abs_builddir=`pwd`
@@ -389,11 +403,13 @@
AC_DEFINE_UNQUOTED(AP_SUEXEC_UMASK, 0$withval, [umask for suexec'd process] ) ] )
dnl AP_LIBS specifies the actual libraries. note we have some required libs.
-AP_LIBS="$abs_builddir/srclib/pcre/libpcre.la $abs_builddir/srclib/apr-util/libaprutil.la $AP_LIBS"
+AP_LIBS="$abs_builddir/srclib/pcre/libpcre.la $AP_LIBS"
dnl APR should go after the other libs, so the right symbols can be picked up
-AP_LIBS="$AP_LIBS $abs_builddir/srclib/apr/libapr.la"
+AP_LIBS="$AP_LIBS `$apu_config --link-libtool --libs` `$apr_config --link-libtool --libs`"
APACHE_SUBST(AP_LIBS)
+APACHE_SUBST(AP_BUILD_SRCLIB_DIRS)
+APACHE_SUBST(AP_CLEAN_SRCLIB_DIRS)
AC_DEFINE(AP_USING_AUTOCONF, 1,
[Using autoconf to configure Apache])
@@ -428,13 +444,6 @@
if test -d ./test; then
APACHE_FAST_OUTPUT(test/Makefile)
fi
-
-dnl get the exported vars from APRUTIL
-. ./srclib/apr-util/export_vars.sh
-APR_ADDTO(LIBS, $APRUTIL_EXPORT_LIBS)
-APR_ADDTO(INCLUDES, $APRUTIL_EXPORT_INCLUDES)
-APR_ADDTO(LDFLAGS, $APRUTIL_LDFLAGS)
-AP_LIBS="$AP_LIBS $LIBTOOL_LIBS"
dnl ## Finalize the variables
echo $ac_n "${nl}Restore user-defined environment settings...${nl}"
1.16 +2 -2 httpd-2.0/srclib/Makefile.in
Index: Makefile.in
===================================================================
RCS file: /home/cvs/httpd-2.0/srclib/Makefile.in,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Makefile.in 27 Dec 2001 02:28:38 -0000 1.15
+++ Makefile.in 13 May 2002 08:39:30 -0000 1.16
@@ -1,6 +1,6 @@
SUBDIRS = pcre
-BUILD_SUBDIRS = apr apr-util
-CLEAN_SUBDIRS = apr-util apr
+BUILD_SUBDIRS = $(AP_BUILD_SRCLIB_DIRS)
+CLEAN_SUBDIRS = $(AP_CLEAN_SRCLIB_DIRS)
include $(top_builddir)/build/rules.mk