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 "APR-util not found. Assuming you are using APR 2.x."
99 if [ $should_exit -gt 0 ]; then
103 echo copying build files
104 cp $apr_src_dir/build/config.guess $apr_src_dir/build/config.sub \
105 $apr_src_dir/build/install.sh $apr_src_dir/build/apr_common.m4 \
106 $apr_src_dir/build/find_apr.m4 $apr_src_dir/build/get-version.sh build
108 if [ -n "$apu_src_dir" -a -d "$apu_src_dir" ] ; then
109 cp $apu_src_dir/build/find_apu.m4 build
112 echo generating configure
113 ${AUTOCONF:-autoconf}
115 # Remove autoconf 2.5x's cache directory
116 rm -rf autom4te*.cache
118 echo generating serf.def
119 ./build/gen_def.py serf.h serf_bucket_*.h > build/serf.def