1
1
#! /bin/sh
2
2
3
+ # do some version checking for the tools we use
4
+ if test " $1 " = " --force" ; then
5
+ shift
6
+ else
7
+ echo " buildconf: checking installation..."
8
+
9
+ # autoconf 2.13 or newer
10
+ ac_version=` autoconf --version 2> /dev/null| head -1| sed -e ' s/^[^0-9]*//' -e ' s/[a-z]* *$//' `
11
+ if test " $ac_version " = " " ; then
12
+ echo " buildconf: autoconf not found."
13
+ echo " You need autoconf version 2.13 or newer installed"
14
+ echo " to build PHP from CVS."
15
+ exit 1
16
+ fi
17
+ IFS=.; set $ac_version ; IFS=' '
18
+ if test " $1 " = " 2" -a " $2 " -lt " 13" || test " $1 " -lt " 2" ; then
19
+ echo " buildconf: autoconf version $ac_version found."
20
+ echo " You need autoconf version 2.13 or newer installed"
21
+ echo " to build PHP from CVS."
22
+ exit 1
23
+ else
24
+ echo " buildconf: autoconf version $ac_version (ok)"
25
+ fi
26
+
27
+ # automake 1.4 or newer
28
+ am_version=` automake --version 2> /dev/null| head -1| sed -e ' s/^[^0-9]*//' -e ' s/[a-z]* *$//' `
29
+ if test " $am_version " = " " ; then
30
+ echo " buildconf: automake not found."
31
+ echo " You need automake version 1.4 or newer installed"
32
+ echo " to build PHP from CVS."
33
+ exit 1
34
+ fi
35
+ IFS=.; set $am_version ; IFS=' '
36
+ if test " $1 " = " 1" -a " $2 " -lt " 4" || test " $1 " -lt " 1" ; then
37
+ echo " buildconf: automake version $ac_version found."
38
+ echo " You need automake version 1.4 or newer installed"
39
+ echo " to build PHP from CVS."
40
+ exit 1
41
+ else
42
+ echo " buildconf: automake version $am_version (ok)"
43
+ fi
44
+
45
+ # The stuff from libtool we need is in CVS right now, so it is
46
+ # not required to run buildconf.
47
+ fi
48
+
3
49
if test " $1 " = " --copy" ; then
4
- automake_flags=--copy
50
+ automake_flags=--copy
5
51
fi
6
52
7
- test -d libzend || ln -s ../libzend .
8
- test -d TSRM || ln -s ../TSRM .
53
+ if ! test -d libzend; then
54
+ if test -d ../libzend; then
55
+ echo " buildconf: linking ../libzend to ./libzend"
56
+ ln -s ../libzend .
57
+ else
58
+ echo " buildconf: can not find libzend"
59
+ echo " libzend should be installed in . or .."
60
+ exit 1
61
+ fi
62
+ fi
63
+ if ! test -d TSRM; then
64
+ if test -d ../TSRM; then
65
+ echo " buildconf: linking ../TSRM to ./TSRM"
66
+ ln -s ../TSRM .
67
+ else
68
+ echo " buildconf: can not find TSRM"
69
+ echo " TSRM should be installed in . or .."
70
+ exit 1
71
+ fi
72
+ fi
9
73
10
74
./scripts/preconfig
11
75
12
76
mv aclocal.m4 aclocal.m4.old 2> /dev/null
13
77
aclocal
14
78
if cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1 ; then
15
- echo keeping aclocal.m4
79
+ echo " buildconf: keeping aclocal.m4"
16
80
mv aclocal.m4.old aclocal.m4
17
81
else
18
- echo created or modified aclocal.m4
82
+ echo " buildconf: created or modified aclocal.m4"
19
83
fi
20
84
21
85
autoheader
@@ -25,10 +89,10 @@ automake --add-missing --include-deps $automake_flags
25
89
mv configure configure.old 2> /dev/null
26
90
autoconf
27
91
if cmp configure.old configure > /dev/null 2>&1 ; then
28
- echo keeping configure
92
+ echo " buildconf: keeping configure"
29
93
mv configure.old configure
30
94
else
31
- echo created or modified configure
95
+ echo " buildconf: created or modified configure"
32
96
fi
33
97
34
98
(cd libzend; ./buildconf libzend/)
0 commit comments