jorton 959d65
jorton 959d65
This is a fugly hack to make apr-1-config libdir-agnostic, by using
jorton 959d65
pkg-config to determine the libdir setting.  pkg-config will
jorton 959d65
magically determine the appropriate libdir setting.
jorton 959d65
jorton 959d65
This allows apr-devel.i386 and apr-devel.x86_64 to be 
jorton 959d65
installed in parallel.
jorton 959d65
jorton 959d65
--- apr-1.2.7/Makefile.in.pkgconf
jorton 959d65
+++ apr-1.2.7/Makefile.in
jorton 959d65
@@ -60,7 +60,7 @@
jorton 959d65
 
jorton 959d65
 # Create apr-config script suitable for the install tree
jorton 959d65
 apr-config.out: $(APR_CONFIG)
jorton 959d65
-	sed 's,^\(location=\).*$$,\1installed,' < $(APR_CONFIG) > $@
jorton 959d65
+	sed 's,^\(location=\).*$$,\1installed,;s,^\(APR_.*_DIR\)=.*,\1="$${libdir}/build",' < $(APR_CONFIG) > $@
jorton 959d65
 
jorton 959d65
 # Create apr_rules.mk suitable for the install tree
jorton 959d65
 build/apr_rules.out: build/apr_rules.mk
jorton 959d65
--- apr-1.2.7/apr-config.in.pkgconf
jorton 959d65
+++ apr-1.2.7/apr-config.in
jorton 959d65
@@ -24,11 +24,12 @@
jorton 959d65
 prefix="@prefix@"
jorton 959d65
 exec_prefix="@exec_prefix@"
jorton 959d65
 bindir="@bindir@"
jorton 959d65
-libdir="@libdir@"
jorton 959d65
 datadir="@datadir@"
jorton 959d65
-installbuilddir="@installbuilddir@"
jorton 959d65
 includedir="@includedir@"
jorton 959d65
 
jorton 959d65
+libdir=`pkg-config --variable=libdir apr-@APR_MAJOR_VERSION@`
jorton 45dafb
+installbuilddir="${libdir}/apr-@APR_MAJOR_VERSION@/build"
jorton 959d65
+
jorton 959d65
 CC="@CC@"
jorton 959d65
 CPP="@CPP@"
jorton 959d65
 SHELL="@SHELL@"