buildconf revision 22ad84685642948ad15cc1e881ecbc4ac8cbf98c
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# TODO - Steal the new PHP buildconf and build.mk.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# This will do for now, though
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# do some version checking for the tools we use
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# this is a posix correct "test -nt"
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrewselif test "`ls -t buildconf buildconf.stamp 2>/dev/null |head -1`" != "buildconf"; then
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews echo "buildconf: checking installation..."
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington # autoconf will check for the version itself
3cae549ddb56c52c1f585dabd54da5b9d7edeeb9Automatic Updater # automake 1.4 or newer
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein am_version=`automake --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo "buildconf: automake not found."
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo " You need automake version 1.4 or newer installed"
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo " to build APACHE from CVS."
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence if test "$1" = "1" -a "$2" -lt "4" || test "$1" -lt "1"; then
364a82f7c25b62967678027043425201a5e5171aBob Halley echo "buildconf: automake version $am_version found."
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo " You need automake version 1.4 or newer installed"
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo " to build APACHE from CVS."
600cfa2ba4c50017581b6c14e3a688a82ecebbe0David Lawrence echo "buildconf: automake version $am_version (ok)"
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington # libtool 1.3.3 or newer
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein lt_pversion=`libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[- ].*//'`
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence echo "buildconf: libtool not found."
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo " You need libtool version 1.3 or newer installed"
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo " to build APACHE from CVS."
87cafc5e70f79f2586d067fbdd64f61bbab069d2David Lawrence lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
87cafc5e70f79f2586d067fbdd64f61bbab069d2David Lawrence if test "$1" -gt "1" || test "$2" -gt "3" || test "$2" = "3" -a "$3" -ge "3"
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo "buildconf: libtool version $lt_pversion (ok)"
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein echo "buildconf: libtool version $lt_pversion found."
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo " You need libtool version 1.3.3 or newer installed"
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo " to build APACHE from CVS."
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonam_prefix=`which automake | sed -e 's#/[^/]*/[^/]*$##'`
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonlt_prefix=`which libtool | sed -e 's#/[^/]*/[^/]*$##'`
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonif test "$am_prefix" != "$lt_prefix"; then
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo "buildconf: WARNING: automake and libtool are installed in different"
91cd0f93ad34d23e8b09dca337120f64fbe8f0a1Andreas Gustafsson echo " directories. This may cause aclocal to fail."
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo "buildconf: continuing anyway"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonif test "$?" != "0" -a "$am_prefix" != "$lt_prefix"; then
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson echo "buildconf: ERROR: aclocal failed, probably because automake and"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson echo " libtool are installed with different prefixes;"
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo " automake is installed in $am_prefix, but libtool in $lt_prefix."
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson echo " Please re-install automake and/or libtool with a common prefix"
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo " and try again."
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellingtonif cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo "buildconf: keeping aclocal.m4"
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington echo "buildconf: created or modified aclocal.m4"
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellingtonfiles="Makefile `find ap lib main modules regex os -name Makefile.am | sed 's#\.am##' | tr '\n' ' '`"
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington# suppress stupid automake warning
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellingtonautomake --add-missing --include-deps $automake_flags $files 2>&1 | grep -v \$APACHE_OUTPUT_FILES >&2
2c9c7c5bb5975a18925c30aeb33a26094902f1c1Andreas Gustafssonif cmp configure.old configure > /dev/null 2>&1; then
2c9c7c5bb5975a18925c30aeb33a26094902f1c1Andreas Gustafsson echo "buildconf: keeping configure"
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein echo "buildconf: created or modified configure"