3
# Copyright 1999-2005 The Apache Software Foundation or its licensors, as
6
# Licensed under the Apache License, Version 2.0 (the "License");
7
# you may not use this file except in compliance with the License.
8
# You may obtain a copy of the License at
10
# http://www.apache.org/licenses/LICENSE-2.0
12
# Unless required by applicable law or agreed to in writing, software
13
# distributed under the License is distributed on an "AS IS" BASIS,
14
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
# See the License for the specific language governing permissions and
16
# limitations under the License.
20
# Default place to look for apr source. Can be overridden with
21
# --with-apr=[directory]
28
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
41
if [ -f "$apr_src_dir/build/apr_common.m4" ]; then
42
apr_src_dir=`cd $apr_src_dir; pwd`
44
echo "Looking for apr source in $apr_src_dir"
47
echo "Problem finding apr source in $apr_src_dir."
49
echo " --with-apr=[directory]"
55
# Remove some files, then copy them from apr source tree
56
rm -f build/apr_common.m4 build/find_apr.m4 build/install.sh \
57
build/config.guess build/config.sub build/get-version.sh
58
cp -p $apr_src_dir/build/apr_common.m4 $apr_src_dir/build/find_apr.m4 \
59
$apr_src_dir/build/install.sh $apr_src_dir/build/config.guess \
60
$apr_src_dir/build/config.sub $apr_src_dir/build/get-version.sh \
63
# Remove aclocal.m4 as it'll break some builds...
64
rm -rf aclocal.m4 autom4te*.cache
67
# Generate the autoconf header (include/apu_config.h) and ./configure
69
echo "Creating include/private/apu_config.h ..."
70
${AUTOHEADER:-autoheader}
72
echo "Creating configure ..."
73
### do some work to toss config.cache?
74
if ${AUTOCONF:-autoconf}; then
77
echo "autoconf failed"
82
# Generate build-outputs.mk for the build systme
84
echo "Generating 'make' outputs ..."
85
$apr_src_dir/build/gen-build.py make
88
# If Expat has been bundled, then go and configure the thing
90
if [ -f xml/expat/buildconf.sh ]; then
91
echo "Invoking xml/expat/buildconf.sh ..."
92
(cd xml/expat; ./buildconf.sh)
95
# Remove autoconf cache again
96
rm -rf autom4te*.cache
98
# Create RPM Spec file
99
if [ -f `which cut` ]; then
100
echo rebuilding rpm spec file
101
REVISION=`build/get-version.sh all include/apu_version.h APU`
102
VERSION=`echo $REVISION | cut -d- -s -f1`
103
RELEASE=`echo $REVISION | cut -d- -s -f2`
104
if [ "x$VERSION" = "x" ]; then
108
sed -e "s/APU_VERSION/$VERSION/" -e "s/APU_RELEASE/$RELEASE/" \
109
./build/rpm/apr-util.spec.in > apr-util.spec