Author: jfrederic.clere(a)jboss.com
Date: 2007-12-17 12:16:25 -0500 (Mon, 17 Dec 2007)
New Revision: 1227
Modified:
trunk/build/unix/buildbin.asf-jk.sh
Log:
Trick environment to build mod_jk.
Modified: trunk/build/unix/buildbin.asf-jk.sh
===================================================================
--- trunk/build/unix/buildbin.asf-jk.sh 2007-12-17 14:19:28 UTC (rev 1226)
+++ trunk/build/unix/buildbin.asf-jk.sh 2007-12-17 17:16:25 UTC (rev 1227)
@@ -49,7 +49,45 @@
cd $native_sources
apxs=`find $output_loc -name apxs`
-echo "$native_sources; ./configure --with-apxs=${apxs}"
-./configure --with-apxs=${apxs}
+config=`find $output_loc -name config_vars.mk`
+configdir=`dirname $config`
+#
+# Arrange apxs/config_vars.mk so that we can use it with the httpd we are building.
+sed "/^my \$installbuilddir = / c\
+my \$installbuilddir = \"${configdir}\";" ${apxs} | sed
's:config_vars.mk:config_vars.mk.jk:' > ${apxs}.jk
+chmod a+x ${apxs}.jk
+
+sbindir=`find $output_loc -type d -name sbin`
+bindir=`find $output_loc -type d -name bin`
+APR_CONFIG=`find $output_loc -type f -name apr-1-config`
+APU_CONFIG=`find $output_loc -type f -name apu-1-config`
+LIBTOOL=`find $output_loc -type f -name libtool`
+APR_INCLUDE=`find $output_loc -type f -name apr_lib.h`
+APR_INCLUDEDIR=`dirname $APR_INCLUDE`
+APU_INCLUDE=`find $output_loc -type f -name apu.h`
+APU_INCLUDEDIR=`dirname $APU_INCLUDE`
+exp_installbuild=`find $output_loc -type f -name config_vars.mk`
+exp_installbuilddir=`dirname $exp_installbuild`
+modules_dir=`find $output_loc -type d -name modules`
+sed "/^sbindir = / c\
+sbindir = ${sbindir}" $configdir/config_vars.mk > $$.mk
+sed "/^bindir = / c\
+bindir = ${bindir}" $$.mk > $$.mk2
+sed "/^APR_CONFIG = / c\
+APR_CONFIG = ${APR_CONFIG}" $$.mk2 > $$.mk
+sed "/^APU_CONFIG = / c\
+APU_CONFIG = ${APU_CONFIG}" $$.mk > $$.mk2
+sed "/^LIBTOOL = / c\
+LIBTOOL = ${LIBTOOL}" $$.mk2 > $$.mk
+sed "/^APR_INCLUDEDIR = / c\
+APR_INCLUDEDIR = ${APR_INCLUDEDIR}" $$.mk > $$.mk2
+sed "/^APU_INCLUDEDIR = / c\
+APU_INCLUDEDIR = ${APU_INCLUDEDIR}" $$.mk2 > $$.mk
+
+echo "$native_sources; ./configure --with-apxs=${apxs}.jk"
+./configure --with-apxs=${apxs}.jk
make
-make DESTDIR=$output_loc install
+(cd apache-2.0
+ ../scripts/build/instdso.sh SH_LIBTOOL=${LIBTOOL} mod_jk.la `pwd`
+ cp mod_jk.${so_extension} ${modules_dir}
+)