buildconf revision 1e5333ef1a0edb888d75c0cdd90b33fa7e89fc31
436aad11e01e916f75e68a2e9cb89ac217a990d3Tinderbox User#!/bin/sh
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# ====================================================================
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox User# The Apache Software License, Version 1.1
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox User#
a5636b773fa05a272b6876afd99309c0b3090e2fMark Andrews# Copyright (c) 2000-2002 The Apache Software Foundation. All rights
e9e4257668ff6c4e583b0c0db2508650b0b677b8Tinderbox User# reserved.
e9e4257668ff6c4e583b0c0db2508650b0b677b8Tinderbox User#
c57668a2fbbe558c1bd21652813616f2f517c469Tinderbox User# Redistribution and use in source and binary forms, with or without
5e047890ac9b745db060d95f7d1b4f876511240dTinderbox User# modification, are permitted provided that the following conditions
137fdbc214e99c4cbe57551e9e14f2015c2e42aeTinderbox User# are met:
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User#
bed0874e1a09e810575328c4bfc346a47514b69fMark Andrews# 1. Redistributions of source code must retain the above copyright
02b47c5d62e1e827743684c28a08e871da454a2dMark Andrews# notice, this list of conditions and the following disclaimer.
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User#
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# 2. Redistributions in binary form must reproduce the above copyright
e20309353e6246485c521278131d3fced73d7957Tinderbox User# notice, this list of conditions and the following disclaimer in
e20309353e6246485c521278131d3fced73d7957Tinderbox User# the documentation and/or other materials provided with the
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# distribution.
9a5217f827ac0e006016745e5305b31dc0c7767fTinderbox User#
3cc98b8ecedcbc8465f1cf2740b966b315662430Automatic Updater# 3. The end-user documentation included with the redistribution,
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# if any, must include the following acknowledgment:
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# "This product includes software developed by the
e20309353e6246485c521278131d3fced73d7957Tinderbox User# Apache Software Foundation (http://www.apache.org/)."
e20309353e6246485c521278131d3fced73d7957Tinderbox User# Alternately, this acknowledgment may appear in the software itself,
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# if and wherever such third-party acknowledgments normally appear.
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# 4. The names "Apache" and "Apache Software Foundation" must
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# not be used to endorse or promote products derived from this
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# software without prior written permission. For written
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# permission, please contact apache@apache.org.
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# 5. Products derived from this software may not be called "Apache",
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# nor may "Apache" appear in their name, without prior written
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# permission of the Apache Software Foundation.
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# SUCH DAMAGE.
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# ====================================================================
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
24934f08b9ff81c2be711e566e8002d145573031Tinderbox User# This software consists of voluntary contributions made by many
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# individuals on behalf of the Apache Software Foundation. For more
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# information on the Apache Software Foundation, please see
24934f08b9ff81c2be711e566e8002d145573031Tinderbox User# <http://www.apache.org/>.
e9e4257668ff6c4e583b0c0db2508650b0b677b8Tinderbox User#
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# buildconf: Build the support scripts needed to compile from a
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# checked-out version of the source code.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Check to be sure that we have the srclib dependencies checked-out
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsif [ ! -d srclib/apr -o ! -f srclib/apr/build/apr_common.m4 ]; then
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews echo ""
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews echo "You don't have a srclib/apr/ subdirectory. Please get one:"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews echo ""
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater echo " cd srclib"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews echo " (password 'anoncvs')"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews echo ""
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater exit 1
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsfi
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrewsif [ ! -d srclib/apr-util -o ! -f srclib/apr-util/Makefile.in ]; then
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews echo ""
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews echo "You don't have a srclib/apr-util/ subdirectory. Please get one:"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews echo ""
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews echo " cd srclib"
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login"
e20309353e6246485c521278131d3fced73d7957Tinderbox User echo " (password 'anoncvs')"
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr-util"
24934f08b9ff81c2be711e566e8002d145573031Tinderbox User echo ""
e20309353e6246485c521278131d3fced73d7957Tinderbox User exit 1
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsfi
7feccf248d2a20a2ae48b290f58ded5abc853e9aTinderbox User
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# These are temporary until Roy finishes the other build changes
ad411d8ccf8a27eb903b842ab507ba6729d0246bTinderbox User#
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updatertouch .deps
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsrm -f aclocal.m4
ad411d8ccf8a27eb903b842ab507ba6729d0246bTinderbox Userrm -f generated_lists
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark Andrews# Remove autoconf 2.5x's cache directory
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark Andrewsrm -rf autom4te*.cache
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewscase "`uname`" in
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson*BSD/OS*)
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews ./build/bsd_makefile;;
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsesac
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews#
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# end temporary stuff
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrewsapr_configure="srclib/apr/configure"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsaprutil_configure="srclib/apr-util/configure"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewspcre_configure="srclib/pcre/configure"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsconfig_h_in="include/ap_config_auto.h.in"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoncross_compile_warning="warning: AC_TRY_RUN called without default to allow cross compiling"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsecho rebuilding $apr_configure
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews(cd srclib/apr && ./buildconf) || {
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews echo "./buildconf failed for apr"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews exit 1
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson}
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsecho rebuilding $aprutil_configure
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews(cd srclib/apr-util && ./buildconf) || {
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews echo "./buildconf failed for apr-util"
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark Andrews exit 1
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark Andrews}
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox Userecho copying build files
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox Usercp srclib/apr/build/config.guess build
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrewscp srclib/apr/build/config.sub build
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark Andrewscp srclib/apr/build/PrintPath build
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark Andrews
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark Andrewsecho rebuilding $pcre_configure
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark Andrews(cd srclib/pcre && ${AUTOCONF:-autoconf})
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox Userecho rebuilding $config_h_in
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox Userrm -f $config_h_in
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont${AUTOHEADER:-autoheader} 2>&1 | grep -v "$cross_compile_warning"
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
2ba8f584b97cbab864570e38fd26b8cb90961428Tinderbox Userecho rebuilding configure
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox Userrm -f config.cache
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning"
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews
bed0874e1a09e810575328c4bfc346a47514b69fMark Andrewsexit 0
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic Updater