summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68>2002-03-09 19:26:13 +0000
committerjerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68>2002-03-09 19:26:13 +0000
commit7cc77834c798f69bc811ee5998415ffba2fe4981 (patch)
treefda982abdf00e79ee07e18ade93c87ec6c1da156
parentebd287a6bcc24493077934f24be9ef937ef3b854 (diff)
downloadlibapr-7cc77834c798f69bc811ee5998415ffba2fe4981.tar.gz
Allow APR to install its own libtool into an installbuilddir.
Add --with-installbuilddir to configure. Add --apr-libtool option to apr-config so that third-parties can figure out where this generated libtool is. (Previously, httpd-2.0 would copy libtool for APR which isn't very nice.) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63098 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES5
-rw-r--r--Makefile.in20
-rw-r--r--apr-config.in11
-rw-r--r--configure.in4
4 files changed, 35 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index 06609c11c..5aacb27a7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,9 @@
Changes with APR b1
+
+ *) Allow APR to install its generated libtool(s) via the
+ --with-installbuilddir option (defaults to ${datadir}/build).
+ [Justin Erenkrantz]
+
*) renames: apr_ansi_time_to_apr_time becomes apr_time_ansi_put
ap_exploded_time_t becomes apr_time_exp_t
[Thom May <thom@planetarytramp.net>]
diff --git a/Makefile.in b/Makefile.in
index 0df0faf37..25209241b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -40,6 +40,7 @@ exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
includedir=@includedir@
+installbuilddir=@installbuilddir@
srcdir=@srcdir@
top_srcdir=@top_srcdir@
top_blddir=@top_builddir@
@@ -59,15 +60,24 @@ delete-lib:
install: $(TARGET_LIB)
if [ ! -d $(includedir) ]; then \
$(top_srcdir)/build/mkdir.sh $(includedir); \
- fi; \
- cp $(top_srcdir)/include/*.h $(includedir); \
- cp $(top_blddir)/include/*.h $(includedir); \
+ fi;
+ cp $(top_srcdir)/include/*.h $(includedir);
+ cp $(top_blddir)/include/*.h $(includedir);
if [ ! -d $(libdir) ]; then \
$(top_srcdir)/build/mkdir.sh $(libdir); \
- fi; \
+ fi;
$(LIBTOOL) --mode=install cp $(TARGET_LIB) $(libdir)
$(LIBTOOL) --mode=install cp APRVARS $(libdir)
$(LIBTOOL) --mode=install cp apr.exp $(libdir)
+ if [ ! -d $(installbuilddir) ]; then \
+ $(top_srcdir)/build/mkdir.sh $(installbuilddir); \
+ fi;
+ if [ -f libtool ]; then \
+ $(LIBTOOL) --mode=install cp libtool $(installbuilddir); \
+ fi;
+ if [ -f shlibtool ]; then \
+ $(LIBTOOL) --mode=install cp shlibtool $(installbuilddir); \
+ fi;
if [ ! -d $(bindir) ]; then \
$(top_srcdir)/build/mkdir.sh $(bindir); \
fi;
@@ -77,7 +87,7 @@ install: $(TARGET_LIB)
for i in $(INSTALL_SUBDIRS); do \
( cd $$i ; $(MAKE) install ); \
done \
- fi
+ fi
$(TARGET_LIB):
@for i in $(SUBDIRS); do objects="$$objects $$i/*.@so_ext@"; done ; \
diff --git a/apr-config.in b/apr-config.in
index 0f87a414a..6d829cdc5 100644
--- a/apr-config.in
+++ b/apr-config.in
@@ -59,6 +59,8 @@ prefix="@prefix@"
exec_prefix="@exec_prefix@"
bindir="@bindir@"
libdir="@libdir@"
+datadir="@datadir@"
+installbuilddir="@installbuilddir@"
includedir="@includedir@"
CC="@CC@"
@@ -92,6 +94,7 @@ Known values for OPTION are:
--apr-la-file print the path to the .la file, if available
--apr-so-ext print the extensions of shared objects on this platform
--apr-lib-target print the libtool target information
+ --apr-libtool print the path to APR's libtool
--help print this help
When linking with libtool, an application should do something like:
@@ -199,6 +202,14 @@ while test $# -gt 0; do
echo "$APR_LIB_TARGET"
exit 0
;;
+ --apr-libtool)
+ if test "$location" = "installed"; then
+ echo "${SHELL} ${installbuilddir}/libtool"
+ else
+ echo "${SHELL} $thisdir/libtool"
+ fi
+ exit 0
+ ;;
--help)
show_usage
exit 0
diff --git a/configure.in b/configure.in
index 08be02903..4f454d532 100644
--- a/configure.in
+++ b/configure.in
@@ -121,6 +121,10 @@ AC_PROG_LIBTOOL
;;
esac
+AC_ARG_WITH(installbuilddir, [ --with-installbuilddir=<path> location to store APR build files (defaults to '${datadir}/build')],
+ [ installbuilddir=$withval ], [ installbuilddir="${datadir}/build" ] )
+AC_SUBST(installbuilddir)
+
AC_ARG_WITH(libtool, [ --without-libtool avoid using libtool to link the library],
[ use_libtool=$withval ], [ use_libtool="yes" ] )