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 [ -f "$apr_src_dir/build/apr_common.m4" ]; then
26 echo "Looking for apr source in $apr_src_dir"
29 echo "Problem finding apr source in $apr_src_dir."
31 echo " --with-apr=[directory]"
35 # Remove some files, then copy them from apr source tree
36 rm -f build/apr_common.m4 build/find_apr.m4 build/install.sh \
37 build/config.guess build/config.sub build/get-version.sh
38 cp -p $apr_src_dir/build/apr_common.m4 $apr_src_dir/build/find_apr.m4 \
39 $apr_src_dir/build/install.sh $apr_src_dir/build/config.guess \
40 $apr_src_dir/build/config.sub $apr_src_dir/build/get-version.sh \
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"
61 # Post autoconf cleanup...
62 rm -rf autom4te*.cache
65 # If Expat has been bundled, then go and configure the thing
66 # and then remove autoconf cache
68 if [ -f xml/expat/buildconf.sh ]; then
69 echo "Invoking xml/expat/buildconf.sh ..."
70 (cd xml/expat; ./buildconf.sh; rm -rf autom4te*.cache)
73 # Create RPM Spec file
74 if [ -f `which cut` ]; then
75 echo rebuilding rpm spec file
76 REVISION=`build/get-version.sh all include/apu_version.h APU`
77 VERSION=`echo $REVISION | cut -d- -s -f1`
78 RELEASE=`echo $REVISION | cut -d- -s -f2`
79 if [ "x$VERSION" = "x" ]; then
83 sed -e "s/APU_VERSION/$VERSION/" -e "s/APU_RELEASE/$RELEASE/" \
84 ./build/rpm/apr-util.spec.in > apr-util.spec