buildconf revision 4cb8bb9049d1643295ebda12c76dad441ddc2228
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# Licensed to the Apache Software Foundation (ASF) under one or more
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# contributor license agreements. See the NOTICE file distributed with
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# this work for additional information regarding copyright ownership.
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# The ASF licenses this file to You under the Apache License, Version 2.0
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# (the "License"); you may not use this file except in compliance with
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# the License. You may obtain a copy of the License at
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# Unless required by applicable law or agreed to in writing, software
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# distributed under the License is distributed on an "AS IS" BASIS,
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# See the License for the specific language governing permissions and
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# limitations under the License.
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# buildconf: Build the support scripts needed to compile from a
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# checked-out version of the source code.
104a37ccc1f0447ab5567644c98d5ed7266d3211Zach Kissel# version check for AC_PROG_CC_C99
14ea4bb737263733ad80a36b4f73f681c30a6b45sdac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;q'`
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# versions older than 2.50 are denied by AC_PREREQ
14ea4bb737263733ad80a36b4f73f681c30a6b45sd echo WARNING: You are using an outdated version of autoconf.
14ea4bb737263733ad80a36b4f73f681c30a6b45sd echo WARNING: This may lead to less than optimal performance of httpd.
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# set a couple of defaults for where we should be looking for our support libs.
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# can be overridden with --with-apr=[dir] and --with-apr-util=[dir]
14ea4bb737263733ad80a36b4f73f681c30a6b45sd # Normalize
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# Check to be sure that we have the srclib dependencies checked-out
14ea4bb737263733ad80a36b4f73f681c30a6b45sd if [ -f "${dir}/build/apr_common.m4" ]; then
14ea4bb737263733ad80a36b4f73f681c30a6b45sd echo "found apr source: ${dir}"
14ea4bb737263733ad80a36b4f73f681c30a6b45sd echo "APR could not be found automatically."
14ea4bb737263733ad80a36b4f73f681c30a6b45sd echo "Please refer to the documentation on APR in the httpd INSTALL file."
14ea4bb737263733ad80a36b4f73f681c30a6b45sd if test -z "$apu_src_dir"; then
59ac0c1669407488b67ae9e273667a340dccc611davemq apu_src_dir=`echo $apr_src_dir | sed -e 's#/apr#/apr-util#g;'`
14ea4bb737263733ad80a36b4f73f681c30a6b45sd apu_src_dir="$apu_src_dir `echo $apr_src_dir | sed -e 's#/apr#/aprutil#;g'`"
14ea4bb737263733ad80a36b4f73f681c30a6b45sd if [ -f "${dir}/Makefile.in" ]; then
14ea4bb737263733ad80a36b4f73f681c30a6b45sd echo "found apr-util source: ${dir}"
14ea4bb737263733ad80a36b4f73f681c30a6b45sd echo "You are using APR 1.x but APR-util 1.x was not found."
14ea4bb737263733ad80a36b4f73f681c30a6b45sd echo "Please refer to the documentation on APR in the httpd INSTALL file."
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# These are temporary until Roy finishes the other build changes
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# Remove autoconf 2.5x cache directories
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# end temporary stuff
14ea4bb737263733ad80a36b4f73f681c30a6b45sdcross_compile_warning="warning: AC_TRY_RUN called without default to allow cross compiling"
14ea4bb737263733ad80a36b4f73f681c30a6b45sd (cd srclib/apr-util && ./buildconf --with-apr=$apr_src_dir) || {
14ea4bb737263733ad80a36b4f73f681c30a6b45sdcp $apr_src_dir/build/config.guess $apr_src_dir/build/config.sub \
14ea4bb737263733ad80a36b4f73f681c30a6b45sd $apr_src_dir/build/PrintPath $apr_src_dir/build/apr_common.m4 \
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# Remove any libtool files so one can switch between libtool 1.3
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# and libtool 1.4 by simply rerunning the buildconf script.
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# Optionally copy libtool-1.3.x files
14ea4bb737263733ad80a36b4f73f681c30a6b45sd${AUTOHEADER:-autoheader} 2>&1 | grep -v "$cross_compile_warning"
14ea4bb737263733ad80a36b4f73f681c30a6b45sd${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning"
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# Remove autoconf 2.5x cache directories
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# Remove possible bsd_converted file
14ea4bb737263733ad80a36b4f73f681c30a6b45sdif [ -f `which cut` ]; then
14ea4bb737263733ad80a36b4f73f681c30a6b45sd ( VMMN=`build/get-version.sh mmn include/ap_mmn.h MODULE_MAGIC_NUMBER`
14ea4bb737263733ad80a36b4f73f681c30a6b45sd EPOCH=`build/get-version.sh epoch include/ap_release.h AP_SERVER`
14ea4bb737263733ad80a36b4f73f681c30a6b45sd REVISION=`build/get-version.sh all include/ap_release.h AP_SERVER`
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# ensure that the ap_expr expression parser sources are never regenerated
14ea4bb737263733ad80a36b4f73f681c30a6b45sd# when running make