buildconf revision ab44eb80e084a02a66a58336d6fcfbbe48310439
d3ed5b56cb6b58f87ffd125bed48f7668f13de1edirkx#!/bin/sh
893328ef6ff86d0ca27774778d84410353789fb0fielding# ====================================================================
893328ef6ff86d0ca27774778d84410353789fb0fielding# The Apache Software License, Version 1.1
893328ef6ff86d0ca27774778d84410353789fb0fielding#
33bdcae1f7a1a65e351dda2a766a0cf28b1e695dnd# Copyright (c) 2000-2003 The Apache Software Foundation. All rights
893328ef6ff86d0ca27774778d84410353789fb0fielding# reserved.
893328ef6ff86d0ca27774778d84410353789fb0fielding#
893328ef6ff86d0ca27774778d84410353789fb0fielding# Redistribution and use in source and binary forms, with or without
893328ef6ff86d0ca27774778d84410353789fb0fielding# modification, are permitted provided that the following conditions
893328ef6ff86d0ca27774778d84410353789fb0fielding# are met:
893328ef6ff86d0ca27774778d84410353789fb0fielding#
893328ef6ff86d0ca27774778d84410353789fb0fielding# 1. Redistributions of source code must retain the above copyright
893328ef6ff86d0ca27774778d84410353789fb0fielding# notice, this list of conditions and the following disclaimer.
893328ef6ff86d0ca27774778d84410353789fb0fielding#
893328ef6ff86d0ca27774778d84410353789fb0fielding# 2. Redistributions in binary form must reproduce the above copyright
893328ef6ff86d0ca27774778d84410353789fb0fielding# notice, this list of conditions and the following disclaimer in
893328ef6ff86d0ca27774778d84410353789fb0fielding# the documentation and/or other materials provided with the
893328ef6ff86d0ca27774778d84410353789fb0fielding# distribution.
893328ef6ff86d0ca27774778d84410353789fb0fielding#
893328ef6ff86d0ca27774778d84410353789fb0fielding# 3. The end-user documentation included with the redistribution,
893328ef6ff86d0ca27774778d84410353789fb0fielding# if any, must include the following acknowledgment:
893328ef6ff86d0ca27774778d84410353789fb0fielding# "This product includes software developed by the
893328ef6ff86d0ca27774778d84410353789fb0fielding# Apache Software Foundation (http://www.apache.org/)."
893328ef6ff86d0ca27774778d84410353789fb0fielding# Alternately, this acknowledgment may appear in the software itself,
893328ef6ff86d0ca27774778d84410353789fb0fielding# if and wherever such third-party acknowledgments normally appear.
893328ef6ff86d0ca27774778d84410353789fb0fielding#
893328ef6ff86d0ca27774778d84410353789fb0fielding# 4. The names "Apache" and "Apache Software Foundation" must
893328ef6ff86d0ca27774778d84410353789fb0fielding# not be used to endorse or promote products derived from this
893328ef6ff86d0ca27774778d84410353789fb0fielding# software without prior written permission. For written
893328ef6ff86d0ca27774778d84410353789fb0fielding# permission, please contact apache@apache.org.
893328ef6ff86d0ca27774778d84410353789fb0fielding#
893328ef6ff86d0ca27774778d84410353789fb0fielding# 5. Products derived from this software may not be called "Apache",
893328ef6ff86d0ca27774778d84410353789fb0fielding# nor may "Apache" appear in their name, without prior written
893328ef6ff86d0ca27774778d84410353789fb0fielding# permission of the Apache Software Foundation.
893328ef6ff86d0ca27774778d84410353789fb0fielding#
893328ef6ff86d0ca27774778d84410353789fb0fielding# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
893328ef6ff86d0ca27774778d84410353789fb0fielding# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
893328ef6ff86d0ca27774778d84410353789fb0fielding# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
893328ef6ff86d0ca27774778d84410353789fb0fielding# DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
893328ef6ff86d0ca27774778d84410353789fb0fielding# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
893328ef6ff86d0ca27774778d84410353789fb0fielding# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
893328ef6ff86d0ca27774778d84410353789fb0fielding# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
893328ef6ff86d0ca27774778d84410353789fb0fielding# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
893328ef6ff86d0ca27774778d84410353789fb0fielding# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
893328ef6ff86d0ca27774778d84410353789fb0fielding# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
893328ef6ff86d0ca27774778d84410353789fb0fielding# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
893328ef6ff86d0ca27774778d84410353789fb0fielding# SUCH DAMAGE.
893328ef6ff86d0ca27774778d84410353789fb0fielding# ====================================================================
893328ef6ff86d0ca27774778d84410353789fb0fielding#
893328ef6ff86d0ca27774778d84410353789fb0fielding# This software consists of voluntary contributions made by many
893328ef6ff86d0ca27774778d84410353789fb0fielding# individuals on behalf of the Apache Software Foundation. For more
893328ef6ff86d0ca27774778d84410353789fb0fielding# information on the Apache Software Foundation, please see
893328ef6ff86d0ca27774778d84410353789fb0fielding# <http://www.apache.org/>.
893328ef6ff86d0ca27774778d84410353789fb0fielding#
6c7c4bf3d26c01cce4d26526db94f17eb5a44396ben
893328ef6ff86d0ca27774778d84410353789fb0fielding# buildconf: Build the support scripts needed to compile from a
893328ef6ff86d0ca27774778d84410353789fb0fielding# checked-out version of the source code.
0d50a692ff2ac7bdb42e417737ed86ebf0a41671ben
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz# set a couple of defaults for where we should be looking for our support libs.
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz# can be overridden with --with-apr=[dir] and --with-apr-util=[dir]
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantzapr_src_dir=srclib/apr
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantzapu_src_dir=srclib/apr-util
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantzwhile test $# -gt 0
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantzdo
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz # Normalize
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz case "$1" in
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz *) optarg= ;;
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz esac
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz case "$1" in
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz --with-apr=*)
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz apr_src_dir=$optarg
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz ;;
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz esac
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz case "$1" in
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz --with-apr-util=*)
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz apu_src_dir=$optarg
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz ;;
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz esac
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz shift
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantzdone
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz
893328ef6ff86d0ca27774778d84410353789fb0fielding#
893328ef6ff86d0ca27774778d84410353789fb0fielding# Check to be sure that we have the srclib dependencies checked-out
893328ef6ff86d0ca27774778d84410353789fb0fielding#
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantzif [ ! -d "$apr_src_dir" -o ! -f "$apr_src_dir/build/apr_common.m4" ]; then
893328ef6ff86d0ca27774778d84410353789fb0fielding echo ""
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz echo "You don't have a copy of the apr source in $apr_src_dir. "
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz echo "Please get the source using the following instructions,"
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz echo "or specify the location of the source with "
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz echo "--with-apr=[path to apr] :"
893328ef6ff86d0ca27774778d84410353789fb0fielding echo ""
893328ef6ff86d0ca27774778d84410353789fb0fielding echo " cd srclib"
42f9227f80ce22e944d427e3d7490fa1dd07f9f2rbb echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login"
893328ef6ff86d0ca27774778d84410353789fb0fielding echo " (password 'anoncvs')"
42f9227f80ce22e944d427e3d7490fa1dd07f9f2rbb echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr"
893328ef6ff86d0ca27774778d84410353789fb0fielding echo ""
893328ef6ff86d0ca27774778d84410353789fb0fielding exit 1
893328ef6ff86d0ca27774778d84410353789fb0fieldingfi
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantzif [ ! -d "$apu_src_dir" -o ! -f "$apu_src_dir/Makefile.in" ]; then
893328ef6ff86d0ca27774778d84410353789fb0fielding echo ""
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz echo "You don't have a copy of the apr-util source in $apu_src_dir. "
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz echo "Please get one the source using the following instructions, "
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz echo "or specify the location of the source with "
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz echo "--with-apr-util=[path to apr-util]:"
893328ef6ff86d0ca27774778d84410353789fb0fielding echo ""
893328ef6ff86d0ca27774778d84410353789fb0fielding echo " cd srclib"
42f9227f80ce22e944d427e3d7490fa1dd07f9f2rbb echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login"
893328ef6ff86d0ca27774778d84410353789fb0fielding echo " (password 'anoncvs')"
42f9227f80ce22e944d427e3d7490fa1dd07f9f2rbb echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr-util"
893328ef6ff86d0ca27774778d84410353789fb0fielding echo ""
893328ef6ff86d0ca27774778d84410353789fb0fielding exit 1
893328ef6ff86d0ca27774778d84410353789fb0fieldingfi
893328ef6ff86d0ca27774778d84410353789fb0fielding
893328ef6ff86d0ca27774778d84410353789fb0fielding# These are temporary until Roy finishes the other build changes
893328ef6ff86d0ca27774778d84410353789fb0fielding#
893328ef6ff86d0ca27774778d84410353789fb0fieldingtouch .deps
893328ef6ff86d0ca27774778d84410353789fb0fieldingrm -f aclocal.m4
623882f55701a4c5a6bded180f60d86a524ac341sascharm -f generated_lists
623882f55701a4c5a6bded180f60d86a524ac341sascha
c066cdcb75ca262e424345b347b86e7ce2285869jerenkrantz# Remove autoconf 2.5x's cache directory
c066cdcb75ca262e424345b347b86e7ce2285869jerenkrantzrm -rf autom4te*.cache
c066cdcb75ca262e424345b347b86e7ce2285869jerenkrantz
c15906bab97b9b71b6dc08c1aa2f5c0b72b5ca4edreidcase "`uname`" in
c15906bab97b9b71b6dc08c1aa2f5c0b72b5ca4edreid*BSD/OS*)
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha ./build/bsd_makefile;;
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csaschaesac
893328ef6ff86d0ca27774778d84410353789fb0fielding#
893328ef6ff86d0ca27774778d84410353789fb0fielding# end temporary stuff
893328ef6ff86d0ca27774778d84410353789fb0fielding
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantzapr_configure="$apr_src_dir/configure"
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantzaprutil_configure="$apu_src_dir/configure"
893328ef6ff86d0ca27774778d84410353789fb0fieldingpcre_configure="srclib/pcre/configure"
893328ef6ff86d0ca27774778d84410353789fb0fieldingconfig_h_in="include/ap_config_auto.h.in"
893328ef6ff86d0ca27774778d84410353789fb0fielding
893328ef6ff86d0ca27774778d84410353789fb0fieldingcross_compile_warning="warning: AC_TRY_RUN called without default to allow cross compiling"
893328ef6ff86d0ca27774778d84410353789fb0fielding
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantzif [ -d srclib/apr ]; then
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz echo rebuilding $apr_configure
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz (cd srclib/apr && ./buildconf) || {
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz echo "./buildconf failed for apr"
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz exit 1
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz }
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantzfi
893328ef6ff86d0ca27774778d84410353789fb0fielding
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantzif [ -d srclib/apr-util ]; then
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz echo rebuilding $aprutil_configure
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz (cd srclib/apr-util && ./buildconf) || {
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz echo "./buildconf failed for apr-util"
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz exit 1
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz }
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantzfi
893328ef6ff86d0ca27774778d84410353789fb0fielding
1e5333ef1a0edb888d75c0cdd90b33fa7e89fc31wsanchezecho copying build files
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantzcp $apr_src_dir/build/config.guess $apr_src_dir/build/config.sub \
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz $apr_src_dir/build/PrintPath $apr_src_dir/build/apr_common.m4 \
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz $apr_src_dir/build/find_apr.m4 $apu_src_dir/build/find_apu.m4 build
1e5333ef1a0edb888d75c0cdd90b33fa7e89fc31wsanchez
9045837071eae7a4b55204a21f31ccee17749af3jerenkrantz# Optionally copy libtool-1.3.x files
ab44eb80e084a02a66a58336d6fcfbbe48310439trawickif [ -f $apr_src_dir/build/ltconfig ]; then
ab44eb80e084a02a66a58336d6fcfbbe48310439trawick cp $apr_src_dir/build/ltconfig build
9045837071eae7a4b55204a21f31ccee17749af3jerenkrantzfi
ab44eb80e084a02a66a58336d6fcfbbe48310439trawickif [ -f $apr_src_dir/build/ltmain.sh ]; then
ab44eb80e084a02a66a58336d6fcfbbe48310439trawick cp $apr_src_dir/build/ltmain.sh build
9045837071eae7a4b55204a21f31ccee17749af3jerenkrantzfi
9045837071eae7a4b55204a21f31ccee17749af3jerenkrantz
893328ef6ff86d0ca27774778d84410353789fb0fieldingecho rebuilding $pcre_configure
544c23d79a3a7596a3612224ed3ac9fa8372929djerenkrantz(cd srclib/pcre && ${AUTOCONF:-autoconf})
893328ef6ff86d0ca27774778d84410353789fb0fielding
893328ef6ff86d0ca27774778d84410353789fb0fieldingecho rebuilding $config_h_in
893328ef6ff86d0ca27774778d84410353789fb0fieldingrm -f $config_h_in
544c23d79a3a7596a3612224ed3ac9fa8372929djerenkrantz${AUTOHEADER:-autoheader} 2>&1 | grep -v "$cross_compile_warning"
893328ef6ff86d0ca27774778d84410353789fb0fielding
893328ef6ff86d0ca27774778d84410353789fb0fieldingecho rebuilding configure
893328ef6ff86d0ca27774778d84410353789fb0fieldingrm -f config.cache
544c23d79a3a7596a3612224ed3ac9fa8372929djerenkrantz${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning"
96e6cafca226a8a2a64a7bbdc634b5b2679c9e0csascha
893328ef6ff86d0ca27774778d84410353789fb0fieldingexit 0