buildconf revision 9045837071eae7a4b55204a21f31ccee17749af3
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#!/bin/sh
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# ====================================================================
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# The Apache Software License, Version 1.1
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Copyright (c) 2000-2002 The Apache Software Foundation. All rights
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# reserved.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Redistribution and use in source and binary forms, with or without
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# modification, are permitted provided that the following conditions
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# are met:
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# 1. Redistributions of source code must retain the above copyright
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# notice, this list of conditions and the following disclaimer.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# 2. Redistributions in binary form must reproduce the above copyright
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# notice, this list of conditions and the following disclaimer in
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# the documentation and/or other materials provided with the
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# distribution.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# 3. The end-user documentation included with the redistribution,
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# if any, must include the following acknowledgment:
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# "This product includes software developed by the
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Apache Software Foundation (http://www.apache.org/)."
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Alternately, this acknowledgment may appear in the software itself,
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# if and wherever such third-party acknowledgments normally appear.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# 4. The names "Apache" and "Apache Software Foundation" must
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# not be used to endorse or promote products derived from this
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# software without prior written permission. For written
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# permission, please contact apache@apache.org.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# 5. Products derived from this software may not be called "Apache",
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# nor may "Apache" appear in their name, without prior written
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# permission of the Apache Software Foundation.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# SUCH DAMAGE.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# ====================================================================
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# This software consists of voluntary contributions made by many
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# individuals on behalf of the Apache Software Foundation. For more
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# information on the Apache Software Foundation, please see
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# <http://www.apache.org/>.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# buildconf: Build the support scripts needed to compile from a
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# checked-out version of the source code.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Check to be sure that we have the srclib dependencies checked-out
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson#
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafssonif [ ! -d srclib/apr -o ! -f srclib/apr/build/apr_common.m4 ]; then
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo ""
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo "You don't have a srclib/apr/ subdirectory. Please get one:"
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo ""
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo " cd srclib"
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login"
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson echo " (password 'anoncvs')"
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr"
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo ""
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson exit 1
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonfi
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonif [ ! -d srclib/apr-util -o ! -f srclib/apr-util/Makefile.in ]; then
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson echo ""
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson echo "You don't have a srclib/apr-util/ subdirectory. Please get one:"
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo ""
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo " cd srclib"
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login"
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo " (password 'anoncvs')"
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson echo " cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic co apr-util"
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson echo ""
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson exit 1
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonfi
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson# These are temporary until Roy finishes the other build changes
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson#
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafssontouch .deps
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonrm -f aclocal.m4
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonrm -f generated_lists
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Remove autoconf 2.5x's cache directory
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafssonrm -rf autom4te*.cache
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssoncase "`uname`" in
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson*BSD/OS*)
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson ./build/bsd_makefile;;
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonesac
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson#
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson# end temporary stuff
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonapr_configure="srclib/apr/configure"
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonaprutil_configure="srclib/apr-util/configure"
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonpcre_configure="srclib/pcre/configure"
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafssonconfig_h_in="include/ap_config_auto.h.in"
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssoncross_compile_warning="warning: AC_TRY_RUN called without default to allow cross compiling"
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonecho rebuilding $apr_configure
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson(cd srclib/apr && ./buildconf) || {
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson echo "./buildconf failed for apr"
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson exit 1
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson}
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonecho rebuilding $aprutil_configure
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson(cd srclib/apr-util && ./buildconf) || {
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson echo "./buildconf failed for apr-util"
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafsson exit 1
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson}
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonecho copying build files
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssoncp srclib/apr/build/config.guess build
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssoncp srclib/apr/build/config.sub build
474a81662f79f5d6c3c68737d0a76c775552025cAndreas Gustafssoncp srclib/apr/build/PrintPath build
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Optionally copy libtool-1.3.x files
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonif [ -f srclib/apr/build/ltconfig ]; then
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson cp srclib/apr/build/ltconfig build
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonfi
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonif [ -f srclib/apr/build/ltmain.sh ]; then
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson cp srclib/apr/build/ltmain.sh build
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonfi
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonecho rebuilding $pcre_configure
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson(cd srclib/pcre && ${AUTOCONF:-autoconf})
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonecho rebuilding $config_h_in
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonrm -f $config_h_in
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson${AUTOHEADER:-autoheader} 2>&1 | grep -v "$cross_compile_warning"
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonecho rebuilding configure
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonrm -f config.cache
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning"
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonexit 0
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson