From 6a0e55e69858bac414fcc22f0cade0e80cf3a86f Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Sun, 30 Apr 2000 18:27:18 +0000 Subject: Add VPATH support to Apache: os/$(OS_DIR) is now equivalent to the old $(OS_DIR) Necessary include paths are added only in VPATH mode. Dependencies are stored in the build directory now. They contain paths which depend on the current build, and therefore they are not general. Fixed two dependencies in main/Makefile.in. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85113 13f79535-47bb-0310-9956-ffa450edef68 --- configure.in | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 10c49f52a1..0d3ae683f8 100644 --- a/configure.in +++ b/configure.in @@ -16,8 +16,16 @@ APACHE_SUBST(APACHE_VERSION) test "$exec_prefix" = "NONE" && exec_prefix='${prefix}' test "$prefix" = "NONE" && prefix='/usr/local' -dnl Needed for APACHE_MODULE() to work -cwd=`pwd` +dnl Absolute source/build directory +abs_srcdir=`(cd $srcdir && pwd)` +abs_builddir=`pwd` + +dnl If the source dir is not equal to the build dir, +dnl then we are running in VPATH mode. + +if test "$abs_builddir" != "$abs_srcdir"; then + USE_VPATH=1 +fi dnl ## Run configure for packages Apache uses AC_CONFIG_SUBDIRS(lib/apr) @@ -133,12 +141,14 @@ APACHE_ENABLE_MODULES APACHE_ENABLE_SHARED INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/lib/apr/include" -APACHE_SUBST(INCLUDES) +if test -n "$USE_VPATH"; then + INCLUDES="$INCLUDES -I\$(top_builddir)/include -I\$(top_builddir)/lib/apr/include" +fi dnl reading config stubs esyscmd(./helpers/config-stubs .) -INCLUDES="$INCLUDES -I\$(top_srcdir)/\$(OS_DIR)" +INCLUDES="$INCLUDES -I\$(top_srcdir)/os/\$(OS_DIR)" EXTRA_LIBS="$EXTRA_LIBS $LIBS" EXTRA_LDFLAGS="$LDFLAGS" LIBS="" @@ -147,6 +157,7 @@ APACHE_SUBST(progname) APACHE_SUBST(EXTRA_CFLAGS) APACHE_SUBST(EXTRA_LDFLAGS) APACHE_SUBST(EXTRA_LIBS) +APACHE_SUBST(INCLUDES) APACHE_SUBST(REGEX_DIR) APACHE_SUBST(REGEX_LIB) APACHE_SUBST(MPM_LIB) @@ -172,7 +183,12 @@ APACHE_FAST_OUTPUT(Makefile ap/Makefile lib/Makefile main/Makefile modules/Makefile os/Makefile support/Makefile) APACHE_FAST_GENERATE - + +dnl There needs to be a .deps file in the top build directory. +dnl All others are created dynamically by rules.mk. + +touch .deps + dnl ## Build modules.c rm -f $srcdir/modules.c echo $MODLIST | $AWK -f $srcdir/helpers/build-modules-c.awk > $srcdir/modules.c -- cgit v1.2.3