summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES3
-rw-r--r--apr-config.in4
-rw-r--r--build/apr_common.m42
-rw-r--r--build/rules.mk.in4
-rw-r--r--config.layout17
-rw-r--r--configure.in62
6 files changed, 60 insertions, 32 deletions
diff --git a/CHANGES b/CHANGES
index 574e7875b..448439491 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
Changes with APR b1
+ *) Add parallel-apr layout which utilizes the major version number in
+ directories and library names. [Justin Erenkrantz]
+
*) Add a version number to the library name (e.g. libapr-1.so) so
that apps can do things like: -lapr-1 or -lapr-2, depending on
which version they want to use and link against.
diff --git a/apr-config.in b/apr-config.in
index 56ef86594..fd916f43e 100644
--- a/apr-config.in
+++ b/apr-config.in
@@ -55,6 +55,9 @@
# APR script designed to allow easy command line access to APR configuration
# parameters.
+APR_MAJOR_VERSION="@APR_MAJOR_VERSION@"
+APR_DOTTED_VERSION="@APR_DOTTED_VERSION@"
+
prefix="@prefix@"
exec_prefix="@exec_prefix@"
bindir="@bindir@"
@@ -75,7 +78,6 @@ SHLIBPATH_VAR="@shlibpath_var@"
APR_SOURCE_DIR="@apr_srcdir@"
APR_SO_EXT="@so_ext@"
APR_LIB_TARGET="@export_lib_target@"
-APR_DOTTED_VERSION="@APR_DOTTED_VERSION@"
APR_LIBNAME="@APR_LIBNAME@"
show_usage()
diff --git a/build/apr_common.m4 b/build/apr_common.m4
index 244837347..a37ade4ff 100644
--- a/build/apr_common.m4
+++ b/build/apr_common.m4
@@ -677,7 +677,7 @@ AC_DEFUN(APR_LAYOUT,[
for var in prefix exec_prefix bindir sbindir libexecdir mandir \
sysconfdir datadir \
includedir localstatedir runtimedir logfiledir libdir \
- installbuilddir; do
+ installbuilddir libsuffix; do
eval "val=\"\$$var\""
case $val in
*+)
diff --git a/build/rules.mk.in b/build/rules.mk.in
index 7a670160e..98a16f8bb 100644
--- a/build/rules.mk.in
+++ b/build/rules.mk.in
@@ -64,6 +64,10 @@
apr_builddir=@apr_builddir@
apr_builders=@apr_builders@
+# Some layouts require knowing what version we are at.
+APR_MAJOR_VERSION=@APR_MAJOR_VERSION@
+APR_DOTTED_VERSION=@APR_DOTTED_VERSION@
+
CC=@CC@
RM=@RM@
AWK=@AWK@
diff --git a/config.layout b/config.layout
index 245da94eb..4e26e2227 100644
--- a/config.layout
+++ b/config.layout
@@ -25,6 +25,23 @@
localstatedir: ${prefix}
</Layout>
+# Classical apr path layout designed for parallel installs.
+<Layout parallel-apr>
+ prefix: /usr/local/apr
+ exec_prefix: ${prefix}
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/bin
+ libdir: ${exec_prefix}/lib/apr-${APR_MAJOR_VERSION}
+ libexecdir: ${exec_prefix}/modules
+ mandir: ${prefix}/man
+ sysconfdir: ${prefix}/conf
+ datadir: ${prefix}
+ installbuilddir: ${datadir}/build
+ includedir: ${prefix}/include/apr-${APR_MAJOR_VERSION}
+ localstatedir: ${prefix}
+ libsuffix: -${APR_MAJOR_VERSION}
+</Layout>
+
# GNU standards conforming path layout.
# See FSF's GNU project `make-stds' document for details.
<Layout GNU>
diff --git a/configure.in b/configure.in
index ecd039541..9be9ebc9e 100644
--- a/configure.in
+++ b/configure.in
@@ -36,24 +36,7 @@ echo "Platform: $host"
dnl # Some initial steps for configuration. We setup the default directory
dnl # and which files are to be configured.
-dnl # First, we need to enable the layout handling code, then reparse the
-dnl # prefix-style arguments due to autoconf being a PITA.
-APR_ENABLE_LAYOUT
-APR_PARSE_ARGUMENTS
-
-dnl Set optional CC hints here in case autoconf makes an inappropriate choice.
-dnl This allows us to suggest what the compiler should be, but still
-dnl allows the user to override CC externally.
-APR_CC_HINTS
-
-dnl Do the various CC checks *before* preloading values. The preload code
-dnl may need to use compiler characteristics to make decisions. This macro
-dnl can only be used once within a configure script, so this prevents a
-dnl preload section from invoking the macro to get compiler info.
-AC_PROG_CC
-
-dnl Preload
-APR_PRELOAD
+dnl Setup the directory macros now
dnl Absolute source/build directory
apr_srcdir=`(cd $srcdir && pwd)`
@@ -83,6 +66,36 @@ MKDIR=$apr_builders/mkdir.sh
dnl Initialize mkdir -p functionality.
APR_MKDIR_P_CHECK($apr_builders/mkdir.sh)
+dnl get our version information
+get_version="$apr_builders/get-version.sh"
+version_hdr="$apr_srcdir/include/apr_version.h"
+APR_MAJOR_VERSION="`$get_version major $version_hdr`"
+APR_DOTTED_VERSION="`$get_version all $version_hdr`"
+
+AC_SUBST(APR_DOTTED_VERSION)
+AC_SUBST(APR_MAJOR_VERSION)
+
+echo "APR Version: ${APR_DOTTED_VERSION}"
+
+dnl # Enable the layout handling code, then reparse the prefix-style
+dnl # arguments due to autoconf being a PITA.
+APR_ENABLE_LAYOUT
+APR_PARSE_ARGUMENTS
+
+dnl Set optional CC hints here in case autoconf makes an inappropriate choice.
+dnl This allows us to suggest what the compiler should be, but still
+dnl allows the user to override CC externally.
+APR_CC_HINTS
+
+dnl Do the various CC checks *before* preloading values. The preload code
+dnl may need to use compiler characteristics to make decisions. This macro
+dnl can only be used once within a configure script, so this prevents a
+dnl preload section from invoking the macro to get compiler info.
+AC_PROG_CC
+
+dnl Preload
+APR_PRELOAD
+
dnl These added to allow default directories to be used...
DEFAULT_OSDIR="unix"
echo "(Default will be ${DEFAULT_OSDIR})"
@@ -108,19 +121,8 @@ AC_MINIX
APR_EBCDIC
-dnl get our version information
-get_version="$apr_builders/get-version.sh"
-version_hdr="$apr_srcdir/include/apr_version.h"
-APR_MAJOR_VERSION="`$get_version major $version_hdr`"
-APR_DOTTED_VERSION="`$get_version all $version_hdr`"
-
-dnl this one will go into apr-config.in
-AC_SUBST(APR_DOTTED_VERSION)
-
-echo "APR Version: ${APR_DOTTED_VERSION}"
-
dnl this is our library name
-APR_LIBNAME="libapr-${APR_MAJOR_VERSION}"
+APR_LIBNAME="libapr${libsuffix}"
AC_SUBST(APR_LIBNAME)
dnl prep libtool