3 # Copyright 2005 Justin Erenkrantz and Greg Stein
4 # Copyright 2005 The Apache Software Foundation or its licensors, as
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
20 # buildconf: Build the support scripts needed to compile from a
21 # checked-out version of the source code.
23 # set a couple of defaults for where we should be looking for our support libs.
24 # can be overridden with --with-apr=[dir] and --with-apr-util=[dir]
26 apr_src_dir="apr ../apr"
27 apu_src_dir="apr-util ../apr-util"
33 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
53 # Check to be sure that we have the srclib dependencies checked-out
60 for dir in $apr_src_dir
62 if [ -d "${dir}" -a -f "${dir}/build/apr_common.m4" ]; then
63 echo "found apr source: ${dir}"
70 if [ $apr_found -lt 1 ]; then
72 echo "You don't have a copy of the apr source in srclib/apr. "
73 echo "Please get the source using the following instructions,"
74 echo "or specify the location of the source with "
75 echo "--with-apr=[path to apr] :"
77 echo " svn co http://svn.apache.org/repos/asf/apr/apr/trunk srclib/apr"
82 for dir in $apu_src_dir
84 if [ -d "${dir}" -a -f "${dir}/Makefile.in" ]; then
85 echo "found apr-util source: ${dir}"
92 if [ $apu_found -lt 1 ]; then
94 echo "You don't have a copy of the apr-util source in srclib/apr-util. "
95 echo "Please get one the source using the following instructions, "
96 echo "or specify the location of the source with "
97 echo "--with-apr-util=[path to apr-util]:"
99 echo " svn co http://svn.apache.org/repos/asf/apr/apr-util/trunk srclib/apr-util"
104 if [ $should_exit -gt 0 ]; then
108 if [ ! -d build ]; then
109 $apr_src_dir/build/mkdir.sh build
112 echo copying build files
113 cp $apr_src_dir/build/config.guess $apr_src_dir/build/config.sub \
114 $apr_src_dir/build/install.sh $apr_src_dir/build/apr_common.m4 \
115 $apr_src_dir/build/find_apr.m4 $apu_src_dir/build/find_apu.m4 \
116 $apr_src_dir/build/get-version.sh build
118 echo generating configure
119 ${AUTOCONF:-autoconf}
121 # Remove autoconf 2.5x's cache directory
122 rm -rf autom4te*.cache