buildconf revision eb06d6a7dc2a6609217689ee5e430d87637ef9e6
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# Licensed to the Apache Software Foundation (ASF) under one or more
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# contributor license agreements. See the NOTICE file distributed with
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# this work for additional information regarding copyright ownership.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# The ASF licenses this file to You under the Apache License, Version 2.0
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# (the "License"); you may not use this file except in compliance with
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# the License. You may obtain a copy of the License at
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# http://www.apache.org/licenses/LICENSE-2.0
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder# Unless required by applicable law or agreed to in writing, software
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder# distributed under the License is distributed on an "AS IS" BASIS,
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder# See the License for the specific language governing permissions and
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder# limitations under the License.
a1ed34933c266ce85066acb0d7b20c90cb8eb213Christian Maeder# buildconf: Build the support scripts needed to compile from a
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder# checked-out version of the source code.
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder# set a couple of defaults for where we should be looking for our support libs.
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder# can be overridden with --with-apr=[dir] and --with-apr-util=[dir]
ef9e8535c168d3f774d9e74368a2317a9eda5826Christian Maeder -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder# Check to be sure that we have the srclib dependencies checked-out
a7c27282e71cf4505026645f96d4f5cb8a284e32Christian Maeder if [ -f "${dir}/build/apr_common.m4" ]; then
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder echo "found apr source: ${dir}"
db675e8302ddb0d6528088ce68f5e98a00e890e3Christian Maeder echo "You don't have a copy of the apr source in srclib/apr. "
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder echo "Please get the source using the following instructions,"
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder echo "or specify the location of the source with "
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder echo "--with-apr=[path to apr] :"
23ffcc44ca8612feccbd8fda63fa5be7ab5f9dc3Christian Maeder echo " svn co http://svn.apache.org/repos/asf/apr/apr/trunk srclib/apr"
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder apr_major_version=`grep "#define APR_MAJOR_VERSION" \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $apr_src_dir/include/apr_version.h | sed 's/[^0-9]//g'`
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder if test -z "$apu_src_dir"; then
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder apu_src_dir=`echo $apr_src_dir | sed -e 's#/apr#/apr-util#g;'`
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder apu_src_dir="$apu_src_dir `echo $apr_src_dir | sed -e 's#/apr#/aprutil#;g'`"
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder apu_src_dir="$apu_src_dir srclib/apr-util ../apr-util"
bc8cbf12aa172bf5673b92a9e7a0151d4aa4c315Christian Maeder if [ -f "${dir}/Makefile.in" ]; then
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder echo "found apr-util source: ${dir}"
1cd4f6541984962658add5cfaa9f28a93879881bChristian Maeder echo "You don't have a copy of the apr-util source in srclib/apr-util. "
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder echo "Please get one the source using the following instructions, "
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder echo "or specify the location of the source with "
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder echo "--with-apr-util=[path to apr-util]:"
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder echo " svn co http://svn.apache.org/repos/asf/apr/apr-util/trunk srclib/apr-util"
dc679edd4ca027663212afdf00926ae2ce19b555Christian Maeder# These are temporary until Roy finishes the other build changes
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder# Remove autoconf 2.5x cache directories
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# end temporary stuff
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maedercross_compile_warning="warning: AC_TRY_RUN called without default to allow cross compiling"
e6d5dbbc3308f05197868806e0b860f4f53875f1Christian Maeder if [ "$apu_src_dir" = "srclib/apr-util" ]; then
e4f4d096e5e6d60dd91c746d0e833d0ac7a29c50Christian Maeder (cd srclib/apr-util && ./buildconf --with-apr=$apr_src_dir) || {
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maedercp $apr_src_dir/build/config.guess $apr_src_dir/build/config.sub \
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maeder $apr_src_dir/build/PrintPath $apr_src_dir/build/apr_common.m4 \
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maeder# Remove any libtool files so one can switch between libtool 1.3
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# and libtool 1.4 by simply rerunning the buildconf script.
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# Optionally copy libtool-1.3.x files
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederif [ -f $apr_src_dir/build/ltmain.sh ]; then
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder${AUTOHEADER:-autoheader} 2>&1 | grep -v "$cross_compile_warning"
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning"
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder# Remove autoconf 2.5x cache directories
a6db617ca58eb6a0587b6366e913107dfecb71b5Heng Jiangif [ -f `which cut` ]; then
254df6f22d01eacf7c57b85729e0445747b630d9Christian Maeder ( VMMN=`build/get-version.sh mmn include/ap_mmn.h MODULE_MAGIC_NUMBER`
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder REVISION=`build/get-version.sh all include/ap_release.h AP_SERVER`
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder# ensure that the mod_ssl expression parser sources are never regenerated
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# when running make