9497de
9497de
This is a fugly hack to make apr-1-config libdir-agnostic, by using
9497de
pkg-config to determine the libdir setting.  pkg-config will
9497de
magically determine the appropriate libdir setting.
9497de
9497de
This allows apr-devel.i386 and apr-devel.x86_64 to be 
9497de
installed in parallel.
9497de
9497de
--- apr-1.2.7/Makefile.in.pkgconf
9497de
+++ apr-1.2.7/Makefile.in
9497de
@@ -60,7 +60,7 @@
9497de
 
9497de
 # Create apr-config script suitable for the install tree
9497de
 apr-config.out: $(APR_CONFIG)
9497de
-	sed 's,^\(location=\).*$$,\1installed,' < $(APR_CONFIG) > $@
9497de
+	sed 's,^\(location=\).*$$,\1installed,;s,^\(APR_.*_DIR\)=.*,\1="$${libdir}/build",' < $(APR_CONFIG) > $@
9497de
 
9497de
 # Create apr_rules.mk suitable for the install tree
9497de
 build/apr_rules.out: build/apr_rules.mk
9497de
--- apr-1.2.7/apr.pc.in.pkgconf
9497de
+++ apr-1.2.7/apr.pc.in
9497de
@@ -3,9 +3,10 @@
9497de
 libdir=@libdir@
9497de
 APR_MAJOR_VERSION=@APR_MAJOR_VERSION@
9497de
 includedir=@includedir@
9497de
+CPPFLAGS=@EXTRA_CPPFLAGS@
9497de
 
9497de
 Name: APR
9497de
 Description: The Apache Portable Runtime library
9497de
 Version: @APR_DOTTED_VERSION@
9497de
 Libs: -L${libdir} -l@APR_LIBNAME@ @EXTRA_LIBS@
9497de
-Cflags: @EXTRA_CPPFLAGS@ @EXTRA_CFLAGS@ -I${includedir}
9497de
+Cflags: ${CPPFLAGS} @EXTRA_CFLAGS@ -I${includedir}
9497de
--- apr-1.2.7/apr-config.in.pkgconf
9497de
+++ apr-1.2.7/apr-config.in
9497de
@@ -24,16 +24,17 @@
9497de
 prefix="@prefix@"
9497de
 exec_prefix="@exec_prefix@"
9497de
 bindir="@bindir@"
9497de
-libdir="@libdir@"
9497de
 datarootdir="@datadir@"
9497de
 datadir="@datadir@"
9497de
-installbuilddir="@installbuilddir@"
9497de
 includedir="@includedir@"
9497de
 
9497de
+libdir=`pkg-config --variable=libdir apr-@APR_MAJOR_VERSION@`
9497de
+installbuilddir="${libdir}/apr-@APR_MAJOR_VERSION@/build"
9497de
+
9497de
 CC="@CC@"
9497de
 CPP="@CPP@"
9497de
 SHELL="@SHELL@"
9497de
-CPPFLAGS="@EXTRA_CPPFLAGS@"
9497de
+CPPFLAGS=`pkg-config --variable=CPPFLAGS apr-@APR_MAJOR_VERSION@`
9497de
 CFLAGS="@EXTRA_CFLAGS@"
9497de
 LDFLAGS="@EXTRA_LDFLAGS@"
9497de
 LIBS="@EXTRA_LIBS@"