]> granicus.if.org Git - apache/commitdiff
Added exp_foo and rel_foo variables to config_vars.mk for all Apache and
authorAaron Bannert <aaron@apache.org>
Thu, 21 Mar 2002 19:40:06 +0000 (19:40 +0000)
committerAaron Bannert <aaron@apache.org>
Thu, 21 Mar 2002 19:40:06 +0000 (19:40 +0000)
Autoconf path variables (like --sysconfdir, --sbindir, etc). exp_foo is
the "expanded" version, which means that all internal variable references
have been interpolated.  rel_foo is the same as $exp_foo, only relative
to $prefix if they share a common path.

This will be used in apxs.in and apachectl.in to allow Apache installs
to be relocated as long as the same relative directory structure remains.
Currently this is only possible if you use the Apache layout, but not
with other layouts or any overridden --foodir paths.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94108 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
acinclude.m4
configure.in

diff --git a/CHANGES b/CHANGES
index 625881c9cbc21f6f7164111ebdcd99f85058eef0..e77eb439b41007cd192ec693872c2803bbe3f7c1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,12 @@
 Changes with Apache 2.0.34-dev
 
+  *) Added exp_foo and rel_foo variables to config_vars.mk for
+     all Apache and Autoconf path variables (like --sysconfdir,
+     --sbindir, etc). exp_foo is the "expanded" version, which means
+     that all internal variable references have been interpolated.
+     rel_foo is the same as $exp_foo, only relative to $prefix if they
+     share a common path.  [Aaron Bannert]
+
   *) Fix some restart/terminate problems in the worker MPM.  Don't
      drop connections during graceful restart.  [Jeff Trawick]
 
index ec4e9146abbae893f7a46458a3891cfd1e41d59f..a9ef84e40f9b6b03249f84b01c28bafeb873ac31 100644 (file)
@@ -637,3 +637,38 @@ do
 done
 
 ])dnl
+
+dnl
+dnl APACHE_EXPORT_ARGUMENTS
+dnl Export (via APACHE_SUBST) the various path-related variables that
+dnl apache will use while generating scripts like autoconf and apxs and
+dnl the default config file.
+
+AC_DEFUN(APACHE_SUBST_EXPANDED_ARG,[
+  APR_EXPAND_VAR(exp_$1, [$]$1)
+  APACHE_SUBST(exp_$1)
+  APR_PATH_RELATIVE(rel_$1, [$]exp_$1, ${prefix})
+  APACHE_SUBST(rel_$1)
+])
+
+AC_DEFUN(APACHE_EXPORT_ARGUMENTS,[
+  APACHE_SUBST_EXPANDED_ARG(exec_prefix)
+  APACHE_SUBST_EXPANDED_ARG(bindir)
+  APACHE_SUBST_EXPANDED_ARG(sbindir)
+  APACHE_SUBST_EXPANDED_ARG(libexecdir)
+  APACHE_SUBST_EXPANDED_ARG(mandir)
+  APACHE_SUBST_EXPANDED_ARG(sysconfdir)
+  APACHE_SUBST_EXPANDED_ARG(datadir)
+  APACHE_SUBST_EXPANDED_ARG(installbuilddir)
+  APACHE_SUBST_EXPANDED_ARG(errordir)
+  APACHE_SUBST_EXPANDED_ARG(iconsdir)
+  APACHE_SUBST_EXPANDED_ARG(htdocsdir)
+  APACHE_SUBST_EXPANDED_ARG(manualdir)
+  APACHE_SUBST_EXPANDED_ARG(cgidir)
+  APACHE_SUBST_EXPANDED_ARG(includedir)
+  APACHE_SUBST_EXPANDED_ARG(localstatedir)
+  APACHE_SUBST_EXPANDED_ARG(runtimedir)
+  APACHE_SUBST_EXPANDED_ARG(logfiledir)
+  APACHE_SUBST_EXPANDED_ARG(proxycachedir)
+])
+
index a8e74c72f08915ec2e2bcef18f2af2845e4a6072..f9d3b0fb30ec7b8ed1fd10eaf484eec7c4a6f700 100644 (file)
@@ -29,6 +29,9 @@ APACHE_ENABLE_LAYOUT
 dnl reparse the configure arguments.
 APACHE_PARSE_ARGUMENTS
 
+dnl export expanded and relative configure argument variables
+APACHE_EXPORT_ARGUMENTS
+
 dnl Save user-defined environment settings for later restoration
 dnl
 APR_SAVE_THE_ENVIRONMENT(CPPFLAGS)
@@ -452,8 +455,6 @@ echo $MODLIST | $AWK -f $srcdir/build/build-modules-c.awk > modules.c
 APR_EXPAND_VAR(ap_prefix, $prefix)
 AC_DEFINE_UNQUOTED(HTTPD_ROOT, "${ap_prefix}",
        [Root directory of the Apache install area])
-APR_EXPAND_VAR(ap_sysconfdir, $sysconfdir)
-APR_PATH_RELATIVE(rel_sysconfdir, $ap_sysconfdir, $prefix)
 AC_DEFINE_UNQUOTED(SERVER_CONFIG_FILE, "${rel_sysconfdir}/${progname}.conf",
        [Location of the config file, relative to the Apache root directory])
 AC_DEFINE_UNQUOTED(APACHE_MPM_DIR, "$MPM_DIR",