842ae4bd224140319ae7feec1872b93dfd491143fielding# Licensed to the Apache Software Foundation (ASF) under one or more
842ae4bd224140319ae7feec1872b93dfd491143fielding# contributor license agreements. See the NOTICE file distributed with
842ae4bd224140319ae7feec1872b93dfd491143fielding# this work for additional information regarding copyright ownership.
842ae4bd224140319ae7feec1872b93dfd491143fielding# The ASF licenses this file to You under the Apache License, Version 2.0
842ae4bd224140319ae7feec1872b93dfd491143fielding# (the "License"); you may not use this file except in compliance with
842ae4bd224140319ae7feec1872b93dfd491143fielding# the License. You may obtain a copy of the License at
0202d2114cc6d7042995100519cce45c808c153bnd# Unless required by applicable law or agreed to in writing, software
0202d2114cc6d7042995100519cce45c808c153bnd# distributed under the License is distributed on an "AS IS" BASIS,
0202d2114cc6d7042995100519cce45c808c153bnd# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0202d2114cc6d7042995100519cce45c808c153bnd# See the License for the specific language governing permissions and
0202d2114cc6d7042995100519cce45c808c153bnd# limitations under the License.
893328ef6ff86d0ca27774778d84410353789fb0fielding# buildconf: Build the support scripts needed to compile from a
893328ef6ff86d0ca27774778d84410353789fb0fielding# checked-out version of the source code.
14eccd0082c748ae3464dc2459430ff0772b5107sf# version check for AC_PROG_CC_C99
14eccd0082c748ae3464dc2459430ff0772b5107sfac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;q'`
14eccd0082c748ae3464dc2459430ff0772b5107sf# versions older than 2.50 are denied by AC_PREREQ
14eccd0082c748ae3464dc2459430ff0772b5107sf echo WARNING: You are using an outdated version of autoconf.
14eccd0082c748ae3464dc2459430ff0772b5107sf echo WARNING: This may lead to less than optimal performance of httpd.
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 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
893328ef6ff86d0ca27774778d84410353789fb0fielding# Check to be sure that we have the srclib dependencies checked-out
c5694b1d7dca4f561ebce416b5ffacf856f825aawrowe if [ -f "${dir}/build/apr_common.m4" ]; then
90b402e944318ae02afd50911eae6da1910f661dpquerna echo "found apr source: ${dir}"
91ea8a85362a63522578e4d59fc6bfe37bc8df17trawick echo "APR could not be found automatically."
91ea8a85362a63522578e4d59fc6bfe37bc8df17trawick echo "Please refer to the documentation on APR in the httpd INSTALL file."
eb06d6a7dc2a6609217689ee5e430d87637ef9e6rpluem apr_major_version=`grep "#define APR_MAJOR_VERSION" \
eb06d6a7dc2a6609217689ee5e430d87637ef9e6rpluem $apr_src_dir/include/apr_version.h | sed 's/[^0-9]//g'`
eb06d6a7dc2a6609217689ee5e430d87637ef9e6rpluem if test -z "$apu_src_dir"; then
eb06d6a7dc2a6609217689ee5e430d87637ef9e6rpluem apu_src_dir=`echo $apr_src_dir | sed -e 's#/apr#/apr-util#g;'`
eb06d6a7dc2a6609217689ee5e430d87637ef9e6rpluem apu_src_dir="$apu_src_dir `echo $apr_src_dir | sed -e 's#/apr#/aprutil#;g'`"
eb06d6a7dc2a6609217689ee5e430d87637ef9e6rpluem apu_src_dir="$apu_src_dir srclib/apr-util ../apr-util"
eb06d6a7dc2a6609217689ee5e430d87637ef9e6rpluem if [ -f "${dir}/Makefile.in" ]; then
eb06d6a7dc2a6609217689ee5e430d87637ef9e6rpluem echo "found apr-util source: ${dir}"
91ea8a85362a63522578e4d59fc6bfe37bc8df17trawick echo "You are using APR 1.x but APR-util 1.x was not found."
91ea8a85362a63522578e4d59fc6bfe37bc8df17trawick echo "Please refer to the documentation on APR in the httpd INSTALL file."
893328ef6ff86d0ca27774778d84410353789fb0fielding# These are temporary until Roy finishes the other build changes
e07615ab3b59412d79eebb8d5b12f488e77c14a7jorton# Remove autoconf 2.5x cache directories
893328ef6ff86d0ca27774778d84410353789fb0fielding# end temporary stuff
893328ef6ff86d0ca27774778d84410353789fb0fieldingcross_compile_warning="warning: AC_TRY_RUN called without default to allow cross compiling"
eb06d6a7dc2a6609217689ee5e430d87637ef9e6rpluem (cd srclib/apr-util && ./buildconf --with-apr=$apr_src_dir) || {
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 \
1d13cbde60ace1b56ca57b9f0f74168bb1288174trawick# Remove any libtool files so one can switch between libtool 1.3
1d13cbde60ace1b56ca57b9f0f74168bb1288174trawick# and libtool 1.4 by simply rerunning the buildconf script.
9045837071eae7a4b55204a21f31ccee17749af3jerenkrantz# Optionally copy libtool-1.3.x files
544c23d79a3a7596a3612224ed3ac9fa8372929djerenkrantz${AUTOHEADER:-autoheader} 2>&1 | grep -v "$cross_compile_warning"
544c23d79a3a7596a3612224ed3ac9fa8372929djerenkrantz${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning"
e07615ab3b59412d79eebb8d5b12f488e77c14a7jorton# Remove autoconf 2.5x cache directories
4cb8bb9049d1643295ebda12c76dad441ddc2228jim# Remove possible bsd_converted file
4028d805f3ab215e39bae405d35e001a538bc50eminfrinif [ -f `which cut` ]; then
4028d805f3ab215e39bae405d35e001a538bc50eminfrin ( VMMN=`build/get-version.sh mmn include/ap_mmn.h MODULE_MAGIC_NUMBER`
2834087a8155f38c7edd908a765ef3211ed37cf1minfrin EPOCH=`build/get-version.sh epoch include/ap_release.h AP_SERVER`
4028d805f3ab215e39bae405d35e001a538bc50eminfrin REVISION=`build/get-version.sh all include/ap_release.h AP_SERVER`
8fae12696bce44be9ce4c56888690cad8ac7b8f9sf# ensure that the ap_expr expression parser sources are never regenerated
f0528865c2e6c22ecc51eeecc496251489029bddjorton# when running make