]> granicus.if.org Git - apache/blob - build/buildcheck.sh
These changes are committed together, because they depend on each other.
[apache] / build / buildcheck.sh
1 #! /bin/sh
2
3 echo "buildconf: checking installation..."
4
5 # autoconf 2.13 or newer
6 ac_version=`autoconf --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
7 if test -z "$ac_version"; then
8 echo "buildconf: autoconf not found."
9 echo "           You need autoconf version 2.13 or newer installed"
10 echo "           to build PHP from CVS."
11 exit 1
12 fi
13 IFS=.; set $ac_version; IFS=' '
14 if test "$1" = "2" -a "$2" -lt "13" || test "$1" -lt "2"; then
15 echo "buildconf: autoconf version $ac_version found."
16 echo "           You need autoconf version 2.13 or newer installed"
17 echo "           to build PHP from CVS."
18 exit 1
19 else
20 echo "buildconf: autoconf version $ac_version (ok)"
21 fi
22
23 # automake 1.4 or newer
24 am_version=`automake --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
25 if test "$am_version" = ""; then
26 echo "buildconf: automake not found."
27 echo "           You need automake version 1.4 or newer installed"
28 echo "           to build PHP from CVS."
29 exit 1
30 fi
31 IFS=.; set $am_version; IFS=' '
32 if test "$1" = "1" -a "$2" -lt "4" || test "$1" -lt "1"; then
33 echo "buildconf: automake version $am_version found."
34 echo "           You need automake version 1.4 or newer installed"
35 echo "           to build PHP from CVS."
36 exit 1
37 else
38 echo "buildconf: automake version $am_version (ok)"
39 fi
40
41 # libtool 1.3.3 or newer
42 lt_pversion=`libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[- ].*//'`
43 if test "$lt_pversion" = ""; then
44 echo "buildconf: libtool not found."
45 echo "           You need libtool version 1.3 or newer installed"
46 echo "           to build PHP from CVS."
47 exit 1
48 fi
49 lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
50 IFS=.; set $lt_version; IFS=' '
51 if test "$1" -gt "1" || test "$2" -gt "3" || test "$2" = "3" -a "$3" -ge "3"
52 then
53 echo "buildconf: libtool version $lt_pversion (ok)"
54 else
55 echo "buildconf: libtool version $lt_pversion found."
56 echo "           You need libtool version 1.3.3 or newer installed"
57 echo "           to build PHP from CVS."
58 exit 1
59 fi
60
61 am_prefix=`which automake | sed -e 's#/[^/]*/[^/]*$##'`
62 lt_prefix=`which libtool | sed -e 's#/[^/]*/[^/]*$##'`
63 if test "$am_prefix" != "$lt_prefix"; then
64     echo "WARNING: automake and libtool are installed in different"
65     echo "         directories.  This may cause aclocal to fail."
66     echo "         continuing anyway"
67 fi
68
69 exit 0