2 # ====================================================================
3 # The Apache Software License, Version 1.1
5 # Copyright (c) 2000-2003 The Apache Software Foundation. All rights
8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions
12 # 1. Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
15 # 2. Redistributions in binary form must reproduce the above copyright
16 # notice, this list of conditions and the following disclaimer in
17 # the documentation and/or other materials provided with the
20 # 3. The end-user documentation included with the redistribution,
21 # if any, must include the following acknowledgment:
22 # "This product includes software developed by the
23 # Apache Software Foundation (http://www.apache.org/)."
24 # Alternately, this acknowledgment may appear in the software itself,
25 # if and wherever such third-party acknowledgments normally appear.
27 # 4. The names "Apache" and "Apache Software Foundation" must
28 # not be used to endorse or promote products derived from this
29 # software without prior written permission. For written
30 # permission, please contact apache@apache.org.
32 # 5. Products derived from this software may not be called "Apache",
33 # nor may "Apache" appear in their name, without prior written
34 # permission of the Apache Software Foundation.
36 # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37 # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39 # DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
40 # ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43 # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46 # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
48 # ====================================================================
50 # This software consists of voluntary contributions made by many
51 # individuals on behalf of the Apache Software Foundation. For more
52 # information on the Apache Software Foundation, please see
53 # <http://www.apache.org/>.
56 # buildconf: Build the support scripts needed to compile from a
57 # checked-out version of the source code.
59 # set a couple of defaults for where we should be looking for our support libs.
60 # can be overridden with --with-apr=[dir] and --with-apr-util=[dir]
62 apr_src_dir=srclib/apr
63 apu_src_dir=srclib/apr-util
69 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
89 # Check to be sure that we have the srclib dependencies checked-out
92 if [ ! -d "$apr_src_dir" -o ! -f "$apr_src_dir/build/apr_common.m4" ]; then
94 echo "You don't have a copy of the apr source in $apr_src_dir. "
95 echo "Please get the source using the following instructions,"
96 echo "or specify the location of the source with "
97 echo "--with-apr=[path to apr] :"
100 echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login"
101 echo " (password 'anoncvs')"
102 echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr"
106 if [ ! -d "$apu_src_dir" -o ! -f "$apu_src_dir/Makefile.in" ]; then
108 echo "You don't have a copy of the apr-util source in $apu_src_dir. "
109 echo "Please get one the source using the following instructions, "
110 echo "or specify the location of the source with "
111 echo "--with-apr-util=[path to apr-util]:"
114 echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login"
115 echo " (password 'anoncvs')"
116 echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr-util"
121 # These are temporary until Roy finishes the other build changes
125 rm -f generated_lists
127 # Remove autoconf 2.5x's cache directory
128 rm -rf autom4te*.cache
132 ./build/bsd_makefile;;
135 # end temporary stuff
137 apr_configure="$apr_src_dir/configure"
138 aprutil_configure="$apu_src_dir/configure"
139 pcre_configure="srclib/pcre/configure"
140 config_h_in="include/ap_config_auto.h.in"
142 cross_compile_warning="warning: AC_TRY_RUN called without default to allow cross compiling"
144 if [ -d srclib/apr ]; then
145 echo rebuilding $apr_configure
146 (cd srclib/apr && ./buildconf) || {
147 echo "./buildconf failed for apr"
152 if [ -d srclib/apr-util ]; then
153 echo rebuilding $aprutil_configure
154 (cd srclib/apr-util && ./buildconf) || {
155 echo "./buildconf failed for apr-util"
160 echo copying build files
161 cp $apr_src_dir/build/config.guess $apr_src_dir/build/config.sub \
162 $apr_src_dir/build/PrintPath $apr_src_dir/build/apr_common.m4 \
163 $apr_src_dir/build/find_apr.m4 $apu_src_dir/build/find_apu.m4 build
165 # Remove any libtool files so one can switch between libtool 1.3
166 # and libtool 1.4 by simply rerunning the buildconf script.
167 (cd build ; rm -f ltconfig ltmain.sh)
169 # Optionally copy libtool-1.3.x files
170 if [ -f $apr_src_dir/build/ltconfig ]; then
171 cp $apr_src_dir/build/ltconfig build
173 if [ -f $apr_src_dir/build/ltmain.sh ]; then
174 cp $apr_src_dir/build/ltmain.sh build
177 echo rebuilding $pcre_configure
178 (cd srclib/pcre && ${AUTOCONF:-autoconf})
180 echo rebuilding $config_h_in
182 ${AUTOHEADER:-autoheader} 2>&1 | grep -v "$cross_compile_warning"
184 echo rebuilding configure
186 ${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning"
188 if [ -f `which cut` ]; then
189 echo rebuilding rpm spec file
190 ( VMMN=`build/get-version.sh mmn include/ap_mmn.h MODULE_MAGIC_NUMBER`
191 REVISION=`build/get-version.sh all include/ap_release.h AP_SERVER`
192 VERSION=`echo $REVISION | cut -d- -s -f1`
193 RELEASE=`echo $REVISION | cut -d- -s -f2`
194 if [ "x$VERSION" = "x" ]; then
198 cat ./build/rpm/httpd.spec.in | \
199 sed -e "s/APACHE_VERSION/$VERSION/" \
200 -e "s/APACHE_RELEASE/$RELEASE/" \
201 -e "s/APACHE_MMN/$VMMN/" \