From 6b89dd07063876c9a64614ee997b582d3944172b Mon Sep 17 00:00:00 2001 From: Aaron Bannert Date: Thu, 21 Mar 2002 19:40:06 +0000 Subject: [PATCH] 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. 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 | 7 +++++++ acinclude.m4 | 35 +++++++++++++++++++++++++++++++++++ configure.in | 5 +++-- 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 625881c9cb..e77eb439b4 100644 --- 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] diff --git a/acinclude.m4 b/acinclude.m4 index ec4e9146ab..a9ef84e40f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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) +]) + diff --git a/configure.in b/configure.in index a8e74c72f0..f9d3b0fb30 100644 --- a/configure.in +++ b/configure.in @@ -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", -- 2.40.0