buildconf revision 6c7c4bf3d26c01cce4d26526db94f17eb5a44396
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj# TODO - Steal the new PHP buildconf and build.mk.
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj# This will do for now, though
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj# do some version checking for the tools we use
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj# this is a posix correct "test -nt"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanojelif test "`ls -t buildconf buildconf.stamp 2>/dev/null |head -1`" != "buildconf"; then
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo "buildconf: checking installation..."
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj # autoconf will check for the version itself
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj # automake 1.4 or newer
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj am_version=`automake --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo "buildconf: automake not found."
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo " You need automake version 1.4 or newer installed"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo " to build APACHE from CVS."
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj if test "$1" = "1" -a "$2" -lt "4" || test "$1" -lt "1"; then
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo "buildconf: automake version $am_version found."
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo " You need automake version 1.4 or newer installed"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo " to build APACHE from CVS."
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo "buildconf: automake version $am_version (ok)"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj # libtool 1.3.3 or newer
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj lt_pversion=`libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[- ].*//'`
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo "buildconf: libtool not found."
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo " You need libtool version 1.3 or newer installed"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo " to build APACHE from CVS."
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj if test "$1" -gt "1" || test "$2" -gt "3" || test "$2" = "3" -a "$3" -ge "3"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo "buildconf: libtool version $lt_pversion (ok)"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo "buildconf: libtool version $lt_pversion found."
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo " You need libtool version 1.3.3 or newer installed"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo " to build APACHE from CVS."
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanojam_prefix=`which automake | sed -e 's#/[^/]*/[^/]*$##'`
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo "buildconf: WARNING: automake and libtool are installed in different"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo " directories. This may cause aclocal to fail."
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo "buildconf: continuing anyway"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanojif test "$?" != "0" -a "$am_prefix" != "$lt_prefix"; then
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo "buildconf: ERROR: aclocal failed, probably because automake and"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo " libtool are installed with different prefixes;"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo " automake is installed in $am_prefix, but libtool in $lt_prefix."
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo " Please re-install automake and/or libtool with a common prefix"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo " and try again."
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanojif cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo "buildconf: keeping aclocal.m4"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo "buildconf: created or modified aclocal.m4"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanojfiles="Makefile `find ap lib main modules regex os -name Makefile.am | sed 's#\.am##' | tr '\n' ' '`"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj# suppress stupid automake warning
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanojautomake --add-missing --include-deps $automake_flags $files 2>&1 | grep -v \$APACHE_OUTPUT_FILES >&2
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo "buildconf: keeping configure"
22ad84685642948ad15cc1e881ecbc4ac8cbf98cmanoj echo "buildconf: created or modified configure"
6c7c4bf3d26c01cce4d26526db94f17eb5a44396ben# Now do APR...
6c7c4bf3d26c01cce4d26526db94f17eb5a44396benecho "buildconf: setting up APR"
6c7c4bf3d26c01cce4d26526db94f17eb5a44396ben echo "buildconf: keeping configure"
6c7c4bf3d26c01cce4d26526db94f17eb5a44396ben echo "buildconf: created or modified configure"
6c7c4bf3d26c01cce4d26526db94f17eb5a44396ben# Now run the configs...