2
# Licensed to the Apache Software Foundation (ASF) under one or more
3
# contributor license agreements. See the NOTICE file distributed with
4
# this work for additional information regarding copyright ownership.
5
# The ASF licenses this file to You under the Apache License, Version 2.0
6
# (the "License"); you may not use this file except in compliance with
7
# the License. You may obtain a copy of the License at
9
# http://www.apache.org/licenses/LICENSE-2.0
11
# Unless required by applicable law or agreed to in writing, software
12
# distributed under the License is distributed on an "AS IS" BASIS,
13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
# See the License for the specific language governing permissions and
15
# limitations under the License.
19
# buildconf: Build the support scripts needed to compile from a
20
# checked-out version of the source code.
22
# Verify that the builder has the right config tools installed
24
build/buildcheck.sh || exit 1
26
echo "Generating config header ..."
27
autoheader -Wall || exit 1
29
libtoolize=`build/PrintPath glibtoolize libtoolize15 libtoolize14 libtoolize`
30
if [ "x$libtoolize" = "x" ]; then
31
echo "libtoolize not found in path"
35
# Create the libtool helper files
37
# Note: we copy (rather than link) them to simplify distribution.
38
# Note: APR supplies its own config.guess and config.sub -- we do not
39
# rely on libtool's versions
41
echo "Copying libtool helper files ..."
43
# Remove any libtool files so one can switch between libtool 1.3
44
# and libtool 1.4 by simply rerunning the buildconf script.
45
(cd build ; rm -f ltconfig ltmain.sh libtool.m4)
47
$libtoolize --copy --automake
49
if [ -f libtool.m4 ]; then
50
ltfile=`pwd`/libtool.m4
52
ltfindcmd="`sed -n \"/=[^\\\`]/p;/libtool_m4=/{s/.*=/echo /p;q;}\" \
54
ltfile=${LIBTOOL_M4-`eval "$ltfindcmd"`}
55
# Expecting the code above to be very portable, but just in case...
56
if [ -z "$ltfile" -o ! -f "$ltfile" ]; then
57
ltpath=`dirname $libtoolize`
58
ltfile=`cd $ltpath/../share/aclocal ; pwd`/libtool.m4
62
if [ ! -f $ltfile ]; then
63
echo "$ltfile not found"
67
echo "buildconf: Using libtool.m4 at ${ltfile}."
69
cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4
71
# libtool.m4 from 1.6 requires ltsugar.m4
72
if [ -f ltsugar.m4 ]; then
73
rm -f build/ltsugar.m4
74
mv ltsugar.m4 build/ltsugar.m4
77
# Clean up any leftovers
78
rm -f aclocal.m4 libtool.m4
80
echo "Creating configure ..."
83
# Remove autoconf 2.5x's cache directory
84
rm -rf autom4te*.cache