buildconf revision 5a3fb2c128b4671fb5091eaea8861c759f50a4e6
625N/A#!/bin/sh
2887N/A#
671N/A# Copyright 1999-2004 The Apache Software Foundation
671N/A#
671N/A# Licensed under the Apache License, Version 2.0 (the "License");
671N/A# you may not use this file except in compliance with the License.
671N/A# You may obtain a copy of the License at
671N/A#
671N/A# http://www.apache.org/licenses/LICENSE-2.0
671N/A#
671N/A# Unless required by applicable law or agreed to in writing, software
671N/A# distributed under the License is distributed on an "AS IS" BASIS,
671N/A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
671N/A# See the License for the specific language governing permissions and
671N/A# limitations under the License.
671N/A#
671N/A#
671N/A# buildconf: Build the support scripts needed to compile from a
671N/A# checked-out version of the source code.
671N/A
873N/A# set a couple of defaults for where we should be looking for our support libs.
671N/A# can be overridden with --with-apr=[dir] and --with-apr-util=[dir]
671N/A
671N/Aapr_src_dir=srclib/apr
671N/Aapu_src_dir=srclib/apr-util
3215N/A
671N/Awhile test $# -gt 0
625N/Ado
625N/A # Normalize
625N/A case "$1" in
625N/A -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
625N/A *) optarg= ;;
749N/A esac
749N/A
749N/A case "$1" in
749N/A --with-apr=*)
749N/A apr_src_dir=$optarg
749N/A ;;
749N/A esac
625N/A
625N/A case "$1" in
625N/A --with-apr-util=*)
749N/A apu_src_dir=$optarg
749N/A ;;
749N/A esac
749N/A
749N/A shift
749N/Adone
749N/A
749N/A#
749N/A# Check to be sure that we have the srclib dependencies checked-out
749N/A#
749N/A
749N/Ashould_exit=0
749N/A
749N/Aif [ ! -d "$apr_src_dir" -o ! -f "$apr_src_dir/build/apr_common.m4" ]; then
749N/A echo ""
749N/A echo "You don't have a copy of the apr source in $apr_src_dir. "
749N/A echo "Please get the source using the following instructions,"
2171N/A echo "or specify the location of the source with "
625N/A echo "--with-apr=[path to apr] :"
785N/A echo ""
625N/A echo " svn co http://svn.apache.org/repos/asf/apr/apr/trunk srclib/apr"
625N/A echo ""
625N/A should_exit=1
625N/Afi
1996N/Aif [ ! -d "$apu_src_dir" -o ! -f "$apu_src_dir/Makefile.in" ]; then
1996N/A echo ""
1996N/A echo "You don't have a copy of the apr-util source in $apu_src_dir. "
1996N/A echo "Please get one the source using the following instructions, "
1996N/A echo "or specify the location of the source with "
2624N/A echo "--with-apr-util=[path to apr-util]:"
2624N/A echo ""
1996N/A echo " svn co http://svn.apache.org/repos/asf/apr/apr-util/trunk srclib/apr-util"
625N/A echo ""
1996N/A should_exit=1
1996N/Afi
1996N/A
1996N/Aif [ $should_exit -gt 0 ]; then
1996N/A exit 1
1996N/Afi
2624N/A
2624N/A# These are temporary until Roy finishes the other build changes
1996N/A#
1996N/Atouch .deps
1996N/Arm -f aclocal.m4
1996N/Arm -f generated_lists
1996N/Arm -f srclib/pcre/aclocal.m4
1996N/A
1996N/A# Remove autoconf 2.5x cache directories
1996N/Arm -rf autom4te*.cache srclib/pcre/autom4te*.cache
2624N/A
2624N/Acase "`uname`" in
1996N/A*BSD/OS*)
1996N/A ./build/bsd_makefile;;
1996N/Aesac
625N/A#
625N/A# end temporary stuff
625N/A
625N/Aapr_configure="$apr_src_dir/configure"
1911N/Aaprutil_configure="$apu_src_dir/configure"
1911N/Apcre_configure="srclib/pcre/configure"
1911N/Aconfig_h_in="include/ap_config_auto.h.in"
1911N/A
1911N/Across_compile_warning="warning: AC_TRY_RUN called without default to allow cross compiling"
1911N/A
1911N/Aif [ -d srclib/apr ]; then
1911N/A echo rebuilding $apr_configure
1911N/A (cd srclib/apr && ./buildconf) || {
625N/A echo "./buildconf failed for apr"
1911N/A exit 1
1911N/A }
625N/Afi
625N/A
625N/Aif [ -d srclib/apr-util ]; then
625N/A echo rebuilding $aprutil_configure
625N/A (cd srclib/apr-util && ./buildconf) || {
625N/A echo "./buildconf failed for apr-util"
625N/A exit 1
625N/A }
625N/Afi
625N/A
1911N/Aecho copying build files
625N/Acp $apr_src_dir/build/config.guess $apr_src_dir/build/config.sub \
625N/A $apr_src_dir/build/PrintPath $apr_src_dir/build/apr_common.m4 \
625N/A $apr_src_dir/build/find_apr.m4 $apu_src_dir/build/find_apu.m4 build
625N/A
625N/A# Remove any libtool files so one can switch between libtool 1.3
625N/A# and libtool 1.4 by simply rerunning the buildconf script.
625N/A(cd build ; rm -f ltconfig ltmain.sh)
625N/A
625N/A# Optionally copy libtool-1.3.x files
625N/Aif [ -f $apr_src_dir/build/ltconfig ]; then
785N/A cp $apr_src_dir/build/ltconfig build
785N/Afi
625N/Aif [ -f $apr_src_dir/build/ltmain.sh ]; then
625N/A cp $apr_src_dir/build/ltmain.sh build
625N/Afi
625N/A
625N/Aecho rebuilding $pcre_configure
749N/A(cd srclib/pcre && ${ACLOCAL:-aclocal} && ${AUTOCONF:-autoconf})
749N/A
749N/Aecho rebuilding $config_h_in
749N/Arm -f $config_h_in
749N/A${AUTOHEADER:-autoheader} 2>&1 | grep -v "$cross_compile_warning"
749N/A
749N/Aecho rebuilding configure
749N/Arm -f config.cache
749N/A${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning"
749N/A
749N/A# Remove autoconf 2.5x cache directories
749N/Arm -rf autom4te*.cache srclib/pcre/autom4te*.cache
749N/A
749N/Aif [ -f `which cut` ]; then
2171N/A echo rebuilding rpm spec file
625N/A ( VMMN=`build/get-version.sh mmn include/ap_mmn.h MODULE_MAGIC_NUMBER`
785N/A REVISION=`build/get-version.sh all include/ap_release.h AP_SERVER`
625N/A VERSION=`echo $REVISION | cut -d- -s -f1`
625N/A RELEASE=`echo $REVISION | cut -d- -s -f2`
625N/A if [ "x$VERSION" = "x" ]; then
625N/A VERSION=$REVISION
1911N/A RELEASE=1
1911N/A fi
1911N/A cat ./build/rpm/httpd.spec.in | \
1911N/A sed -e "s/APACHE_VERSION/$VERSION/" \
1911N/A -e "s/APACHE_RELEASE/$RELEASE/" \
2624N/A -e "s/APACHE_MMN/$VMMN/" \
2624N/A > httpd.spec )
625N/Afi
1911N/A
625N/A# ensure that the mod_ssl expression parser sources are never regenerated
625N/A# when running make
625N/Aecho fixing timestamps for mod_ssl sources
625N/Acd modules/ssl
1911N/Atouch ssl_expr_parse.y
1911N/Asleep 1
1911N/Atouch ssl_expr_parse.c ssl_expr_parse.h ssl_expr_scan.l
1911N/Asleep 1
1911N/Atouch ssl_expr_scan.c
1911N/Acd ../..
2624N/A
2420N/Aexit 0
1911N/A