3
# buildcheck.sh: Inspects the build setup to make detection and
4
# correction of problems an easier process.
6
# Initialize parameters
9
if test "$VERSION_CHECK" != "--release"; then
10
echo "buildcheck: checking installation..."
12
echo "buildcheck: checking installation for a source release..."
15
#--------------------------------------------------------------------------
16
# autoconf 2.50 or newer
18
ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//' -e 1q`
19
if test -z "$ac_version"; then
20
echo "buildcheck: autoconf not found."
21
echo " You need autoconf version 2.50 or newer installed."
24
IFS=.; set $ac_version; IFS=' '
25
if test "$1" = "2" -a "$2" -lt "50" || test "$1" -lt "2"; then
26
echo "buildcheck: autoconf version $ac_version found."
27
echo " You need autoconf version 2.50 or newer installed."
28
echo " If you have a sufficient autoconf installed, but it"
29
echo " is not named 'autoconf', then try setting the"
30
echo " AUTOCONF environment variable. (See the INSTALL file"
34
if test "$ac_version" = "2.58"; then
35
echo "buildcheck: autoconf version 2.58 found."
36
echo " This version of autoconf is broken. Please install at"
37
echo " least autoconf 2.59 or downgrade to version 2.57 which"
38
echo " is known to work."
42
echo "buildcheck: autoconf version $ac_version (ok)"
44
#--------------------------------------------------------------------------
45
# autoheader 2.50 or newer
47
ah_version=`${AUTOHEADER:-autoheader} --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//' -e 1q`
48
if test -z "$ah_version"; then
49
echo "buildcheck: autoheader not found."
50
echo " You need autoheader version 2.50 or newer installed."
53
IFS=.; set $ah_version; IFS=' '
54
if test "$1" = "2" -a "$2" -lt "50" || test "$1" -lt "2"; then
55
echo "buildcheck: autoheader version $ah_version found."
56
echo " You need autoheader version 2.50 or newer installed."
57
echo " If you have a sufficient autoheader installed, but it"
58
echo " is not named 'autoheader', then try setting the"
59
echo " AUTOHEADER environment variable. (See the INSTALL file"
64
echo "buildcheck: autoheader version $ah_version (ok)"
66
#--------------------------------------------------------------------------
67
# libtool 1.4 or newer
69
LIBTOOL_WANTED_MAJOR=1
70
LIBTOOL_WANTED_MINOR=4
72
LIBTOOL_WANTED_VERSION=1.4
74
# The minimum version for source releases is 1.4.3,
75
# because it's required by (at least) Solaris.
76
if test "$VERSION_CHECK" = "--release"; then
77
LIBTOOL_WANTED_PATCH=3
78
LIBTOOL_WANTED_VERSION=1.4.3
82
LIBTOOL_WANTED_PATCH=3
83
LIBTOOL_WANTED_VERSION=1.4.3
88
libtool=`which glibtool 2>/dev/null`
89
if test ! -x "$libtool"; then
90
libtool=`which libtool`
92
if test ! -x "$libtool"; then
93
libtool=`which libtool15`
95
lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[- ].*//' -e 1q`
96
if test -z "$lt_pversion"; then
97
echo "buildcheck: libtool not found."
98
echo " You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
101
lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
102
IFS=.; set $lt_version; IFS=' '
104
if test "$1" = "$LIBTOOL_WANTED_MAJOR"; then
105
if test "$2" -gt "$LIBTOOL_WANTED_MINOR"; then
107
elif test "$2" -lt "$LIBTOOL_WANTED_MINOR"; then
109
elif test ! -z "$LIBTOOL_WANTED_PATCH"; then
110
if test "$3" -lt "$LIBTOOL_WANTED_PATCH"; then
115
if test $lt_status != "good"; then
116
echo "buildcheck: libtool version $lt_pversion found."
117
echo " You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
121
echo "buildcheck: libtool version $lt_pversion (ok)"
123
#--------------------------------------------------------------------------
124
# check that our local copies of files match up with those in APR(UTIL)
126
if test -d ./apr; then
127
if cmp -s ./build/ac-macros/find_apr.m4 ./apr/build/find_apr.m4; then
130
echo "buildcheck: local copy of find_apr.m4 does not match APR's copy."
131
echo " An updated copy of find_apr.m4 may need to be checked in."
133
if cmp -s ./build/PrintPath ./apr/build/PrintPath; then
136
echo "buildcheck: local copy of PrintPath does not match APR's copy."
137
echo " An updated copy of PrintPath may need to be checked in."
141
if test -d ./apr-util; then
142
if cmp -s ./build/ac-macros/find_apu.m4 ./apr-util/build/find_apu.m4; then
145
echo "buildcheck: local copy of find_apu.m4 does not match APRUTIL's copy."
146
echo " An updated copy of find_apu.m4 may need to be checked in."
150
#--------------------------------------------------------------------------