3 # Default place to look for apr source. Can be overridden with
4 # --with-apr=[directory]
11 -*=*) optarg
=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
24 if test -d "$apr_src_dir"
27 echo "Looking for apr source in $apr_src_dir"
30 echo "Problem finding apr source in $apr_src_dir."
32 echo " --with-apr=[directory]"
36 # Remove some files, then copy them from apr source tree
37 rm -f build
/apr_common.
m4 build
/find_apr.
m4 build
/install.sh \
38 build
/config.guess build
/config.sub
39 cp $apr_src_dir/build
/apr_common.
m4 $apr_src_dir/build
/find_apr.
m4 \
40 $apr_src_dir/build
/install.sh
$apr_src_dir/build
/config.guess \
41 $apr_src_dir/build
/config.sub build
43 # Remove aclocal.m4 as it'll break some builds...
44 rm -rf aclocal.
m4 autom4te
*.cache
47 # Generate the autoconf header (include/apu_config.h) and ./configure
49 echo "Creating include/private/apu_config.h ..."
50 ${AUTOHEADER:-autoheader}
52 echo "Creating configure ..."
53 ### do some work to toss config.cache?
54 if ${AUTOCONF:-autoconf}; then
57 echo "autoconf failed"
62 # Generate build-outputs.mk for the build systme
64 echo "Generating 'make' outputs ..."
65 $apr_src_dir/build
/gen-build.py
make
68 # If Expat has been bundled, then go and configure the thing
70 if test -d xml
/expat
; then
71 echo "Invoking xml/expat/buildconf.sh ..."
72 (cd xml
/expat
; .
/buildconf.sh
)
75 # Remove autoconf cache again
76 rm -rf autom4te
*.cache
78 # Create RPM Spec file
79 if [ -f `which cut` ]; then
80 echo rebuilding rpm spec
file
81 ( REVISION
=`build/get-version.sh all include/apu_version.h APU`
82 VERSION
=`echo $REVISION | cut -d- -s -f1`
83 RELEASE
=`echo $REVISION | cut -d- -s -f2`
84 if [ "x$VERSION" = "x" ]; then
88 cat .
/build
/rpm
/apr-util.spec.
in | \
89 sed -e "s/APU_VERSION/$VERSION/" \
90 -e "s/APU_RELEASE/$RELEASE/" \