summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorSascha Schumann <sascha@apache.org>2000-04-30 20:27:18 +0200
committerSascha Schumann <sascha@apache.org>2000-04-30 20:27:18 +0200
commit6a0e55e69858bac414fcc22f0cade0e80cf3a86f (patch)
treeeecc40e80b4bfc4e1f5247e38ff3f08531785387 /configure.in
parentMost of the support programs are created during the build, so we can expect (diff)
downloadapache2-6a0e55e69858bac414fcc22f0cade0e80cf3a86f.tar.xz
apache2-6a0e55e69858bac414fcc22f0cade0e80cf3a86f.zip
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
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in26
1 files changed, 21 insertions, 5 deletions
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