3 # TODO - Steal the new PHP buildconf and build.mk.
4 # This will do for now, though
8 # do some version checking for the tools we use
9 if test "$1" = "--force"; then
11 # this is a posix correct "test -nt"
12 elif test "`ls -t buildconf buildconf.stamp 2>/dev/null |head -1`" != "buildconf"; then
15 echo "buildconf: checking installation..."
17 # autoconf will check for the version itself
18 # automake 1.4 or newer
19 am_version=`automake --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
20 if test "$am_version" = ""; then
21 echo "buildconf: automake not found."
22 echo " You need automake version 1.4 or newer installed"
23 echo " to build APACHE from CVS."
27 IFS=.; set $am_version; IFS="$old_IFS"
28 if test "$1" = "1" -a "$2" -lt "4" || test "$1" -lt "1"; then
29 echo "buildconf: automake version $am_version found."
30 echo " You need automake version 1.4 or newer installed"
31 echo " to build APACHE from CVS."
34 echo "buildconf: automake version $am_version (ok)"
37 # libtool 1.3.3 or newer
38 lt_pversion=`libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[- ].*//'`
39 if test "$lt_pversion" = ""; then
40 echo "buildconf: libtool not found."
41 echo " You need libtool version 1.3 or newer installed"
42 echo " to build APACHE from CVS."
45 lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
46 IFS=.; set $lt_version; IFS="$old_IFS"
47 if test "$1" -gt "1" || test "$2" -gt "3" || test "$2" = "3" -a "$3" -ge "3"
49 echo "buildconf: libtool version $lt_pversion (ok)"
51 echo "buildconf: libtool version $lt_pversion found."
52 echo " You need libtool version 1.3.3 or newer installed"
53 echo " to build APACHE from CVS."
59 am_prefix=`which automake | sed -e 's#/[^/]*/[^/]*$##'`
60 lt_prefix=`which libtool | sed -e 's#/[^/]*/[^/]*$##'`
61 if test "$am_prefix" != "$lt_prefix"; then
62 echo "buildconf: WARNING: automake and libtool are installed in different"
63 echo " directories. This may cause aclocal to fail."
64 echo "buildconf: continuing anyway"
67 if test "$supplied_flag" = "--copy"; then
71 mv aclocal.m4 aclocal.m4.old 2>/dev/null
73 if test "$?" != "0" -a "$am_prefix" != "$lt_prefix"; then
74 echo "buildconf: ERROR: aclocal failed, probably because automake and"
75 echo " libtool are installed with different prefixes;"
76 echo " automake is installed in $am_prefix, but libtool in $lt_prefix."
77 echo " Please re-install automake and/or libtool with a common prefix"
78 echo " and try again."
82 if cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
83 echo "buildconf: keeping aclocal.m4"
84 mv aclocal.m4.old aclocal.m4
86 echo "buildconf: created or modified aclocal.m4"
91 # find all Makefile.ams
92 files="Makefile `find ap lib main modules regex os -name Makefile.am | sed 's#\.am$##'`"
94 # suppress stupid automake warning
95 automake --add-missing $automake_flags $files 2>&1 | grep -v \$APACHE_OUTPUT_FILES >&2
98 mv configure configure.old 2>/dev/null
100 if cmp configure.old configure > /dev/null 2>&1; then
101 echo "buildconf: keeping configure"
102 mv configure.old configure
104 echo "buildconf: created or modified configure"
109 echo "buildconf: setting up APR"
113 mv configure configure.old 2>/dev/null
116 if cmp configure.old configure > /dev/null 2>&1; then
117 echo "buildconf: keeping configure"
118 mv configure.old configure
120 echo "buildconf: created or modified configure"
125 # Remove cached config data