buildconf revision 9a57324b50d0c133068e05973aaa83bd70daad24
421N/A#!/bin/sh
421N/A
421N/A# TODO - Steal the new PHP buildconf and build.mk.
421N/A# This will do for now, though
421N/A
421N/Asupplied_flag=$1
421N/A
421N/A# do some version checking for the tools we use
421N/Aif test "$1" = "--force"; then
421N/A shift
421N/A# this is a posix correct "test -nt"
421N/Aelif test "`ls -t buildconf buildconf.stamp 2>/dev/null |head -1`" != "buildconf"; then
421N/A :
421N/Aelse
421N/A echo "buildconf: checking installation..."
421N/A
421N/A # autoconf will check for the version itself
421N/A # automake 1.4 or newer
421N/A am_version=`automake --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
421N/A if test "$am_version" = ""; then
421N/A echo "buildconf: automake not found."
421N/A echo " You need automake version 1.4 or newer installed"
421N/A echo " to build APACHE from CVS."
421N/A exit 1
776N/A fi
421N/A IFS=.; set $am_version; IFS=' '
421N/A if test "$1" = "1" -a "$2" -lt "4" || test "$1" -lt "1"; then
421N/A echo "buildconf: automake version $am_version found."
421N/A echo " You need automake version 1.4 or newer installed"
421N/A echo " to build APACHE from CVS."
421N/A exit 1
421N/A else
421N/A echo "buildconf: automake version $am_version (ok)"
421N/A fi
421N/A
421N/A # libtool 1.3.3 or newer
421N/A lt_pversion=`libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[- ].*//'`
421N/A if test "$lt_pversion" = ""; then
421N/A echo "buildconf: libtool not found."
421N/A echo " You need libtool version 1.3 or newer installed"
421N/A echo " to build APACHE from CVS."
421N/A exit 1
421N/A fi
421N/A lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
421N/A IFS=.; set $lt_version; IFS=' '
421N/A if test "$1" -gt "1" || test "$2" -gt "3" || test "$2" = "3" -a "$3" -ge "3"
645N/A then
421N/A echo "buildconf: libtool version $lt_pversion (ok)"
421N/A else
421N/A echo "buildconf: libtool version $lt_pversion found."
421N/A echo " You need libtool version 1.3.3 or newer installed"
421N/A echo " to build APACHE from CVS."
421N/A exit 1
421N/A fi
421N/A touch buildconf.stamp
421N/Afi
421N/A
421N/Aam_prefix=`which automake | sed -e 's#/[^/]*/[^/]*$##'`
421N/Alt_prefix=`which libtool | sed -e 's#/[^/]*/[^/]*$##'`
776N/Aif test "$am_prefix" != "$lt_prefix"; then
421N/A echo "buildconf: WARNING: automake and libtool are installed in different"
421N/A echo " directories. This may cause aclocal to fail."
421N/A echo "buildconf: continuing anyway"
421N/Afi
421N/A
421N/Aif test "$supplied_flag" = "--copy"; then
421N/A automake_flags=--copy
421N/Afi
421N/A
421N/Amv aclocal.m4 aclocal.m4.old 2>/dev/null
421N/Aaclocal
421N/Aif test "$?" != "0" -a "$am_prefix" != "$lt_prefix"; then
421N/A echo "buildconf: ERROR: aclocal failed, probably because automake and"
421N/A echo " libtool are installed with different prefixes;"
421N/A echo " automake is installed in $am_prefix, but libtool in $lt_prefix."
776N/A echo " Please re-install automake and/or libtool with a common prefix"
421N/A echo " and try again."
421N/A exit 1
421N/Afi
421N/A
421N/Aif cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
421N/A echo "buildconf: keeping aclocal.m4"
421N/A mv aclocal.m4.old aclocal.m4
421N/Aelse
421N/A echo "buildconf: created or modified aclocal.m4"
421N/Afi
421N/A
421N/Aautoheader
421N/A
421N/A# find all Makefile.ams
776N/Afiles="Makefile `find ap lib main modules regex os -name Makefile.am | sed 's#\.am##' | tr '\n' ' '`"
776N/A
421N/A# suppress stupid automake warning
421N/Aautomake --add-missing $automake_flags $files 2>&1 | grep -v \$APACHE_OUTPUT_FILES >&2
421N/A
421N/A
421N/Amv configure configure.old 2>/dev/null
421N/Aautoconf
421N/Aif cmp configure.old configure > /dev/null 2>&1; then
421N/A echo "buildconf: keeping configure"
421N/A mv configure.old configure
421N/Aelse
421N/A echo "buildconf: created or modified configure"
868N/Afi
868N/A
868N/A# Now do APR...
421N/A
421N/Aecho "buildconf: setting up APR"
421N/A
421N/Acd lib/apr
421N/A
421N/Amv configure configure.old 2>/dev/null
421N/Aautoheader
421N/Aautoconf
421N/Aif cmp configure.old configure > /dev/null 2>&1; then
421N/A echo "buildconf: keeping configure"
421N/A mv configure.old configure
421N/Aelse
421N/A echo "buildconf: created or modified configure"
421N/Afi
421N/A
421N/Acd ../..
421N/A
868N/A# Remove cached config data
421N/Arm -f config.cache
421N/A
421N/A