-
-# TODO - Steal the new PHP buildconf and build.mk.
-# This will do for now, though
-
-supplied_flag=$1
-
-# do some version checking for the tools we use
-if test "$1" = "--force"; then
- shift
-# this is a posix correct "test -nt"
-elif test "`ls -t buildconf buildconf.stamp 2>/dev/null |head -1`" != "buildconf"; then
- :
-else
- echo "buildconf: checking installation..."
-
- # autoconf will check for the version itself
- # automake 1.4 or newer
- am_version=`automake --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
- if test "$am_version" = ""; then
- echo "buildconf: automake not found."
- echo " You need automake version 1.4 or newer installed"
- echo " to build APACHE from CVS."
- exit 1
- fi
- IFS=.; set $am_version; IFS=' '
- if test "$1" = "1" -a "$2" -lt "4" || test "$1" -lt "1"; then
- echo "buildconf: automake version $am_version found."
- echo " You need automake version 1.4 or newer installed"
- echo " to build APACHE from CVS."
- exit 1
- else
- echo "buildconf: automake version $am_version (ok)"
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+# buildconf: Build the support scripts needed to compile from a
+# checked-out version of the source code.
+
+# version check for AC_PROG_CC_C99
+ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;q'`
+case "$ac_version" in
+# versions older than 2.50 are denied by AC_PREREQ
+2.5*)
+ echo WARNING: You are using an outdated version of autoconf.
+ echo WARNING: This may lead to less than optimal performance of httpd.
+ echo WARNING: You should use autoconf 2.60 or newer.
+ sleep 1
+ ;;
+esac
+
+# set a couple of defaults for where we should be looking for our support libs.
+# can be overridden with --with-apr=[dir] and --with-apr-util=[dir]
+
+apr_src_dir="srclib/apr ../apr"
+apu_src_dir=""
+
+while test $# -gt 0
+do
+ # Normalize
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case "$1" in
+ --with-apr=*)
+ apr_src_dir=$optarg
+ ;;
+ esac
+
+ case "$1" in
+ --with-apr-util=*)
+ apu_src_dir=$optarg
+ ;;
+ esac
+
+ shift
+done
+
+#
+# Check to be sure that we have the srclib dependencies checked-out
+#
+
+should_exit=0
+apr_found=0
+apu_found=0
+apr_major_version=2
+
+for dir in $apr_src_dir
+do
+ if [ -f "${dir}/build/apr_common.m4" ]; then
+ echo "found apr source: ${dir}"
+ apr_src_dir=$dir
+ apr_found=1
+ break