Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 135 lines (123 sloc) 4.533 kB
cc5e008 @zsuraski * Added buildconf, runs all the scripts necessary to build configure …
zsuraski authored
1 #!/bin/sh
2
1207465 @zsuraski This should sort the buildconf bug...
zsuraski authored
3 supplied_flag=$1
4
84656f1 add checks for autoconf, automake and whether libzend/TSRM is around
Stig Bakken authored
5 # do some version checking for the tools we use
6 if test "$1" = "--force"; then
7 shift
e8f465f rerun checks if buildconf is newer than the time stamp file
Sascha Schumann authored
8 # this is a posix correct "test -nt"
263c685 @buildconf now uses build.mk
Stig Bakken authored
9 elif test "`ls -t build.mk buildconf buildconf.stamp 2>/dev/null |head -1`" = "buildconf.stamp"; then
270be25 Improve speed on subsequent runs of buildconf
Sascha Schumann authored
10 :
84656f1 add checks for autoconf, automake and whether libzend/TSRM is around
Stig Bakken authored
11 else
12 echo "buildconf: checking installation..."
13
14 # autoconf 2.13 or newer
15 ac_version=`autoconf --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
16 if test "$ac_version" = ""; then
17 echo "buildconf: autoconf not found."
18 echo " You need autoconf version 2.13 or newer installed"
19 echo " to build PHP from CVS."
20 exit 1
21 fi
22 IFS=.; set $ac_version; IFS=' '
23 if test "$1" = "2" -a "$2" -lt "13" || test "$1" -lt "2"; then
24 echo "buildconf: autoconf version $ac_version found."
25 echo " You need autoconf version 2.13 or newer installed"
26 echo " to build PHP from CVS."
27 exit 1
28 else
29 echo "buildconf: autoconf version $ac_version (ok)"
30 fi
31
32 # automake 1.4 or newer
33 am_version=`automake --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
34 if test "$am_version" = ""; then
35 echo "buildconf: automake not found."
36 echo " You need automake version 1.4 or newer installed"
37 echo " to build PHP from CVS."
38 exit 1
39 fi
40 IFS=.; set $am_version; IFS=' '
41 if test "$1" = "1" -a "$2" -lt "4" || test "$1" -lt "1"; then
d3e8858 @zsuraski Please add in any changes/bug fixes you've made - we need to keep a d…
zsuraski authored
42 echo "buildconf: automake version $am_version found."
84656f1 add checks for autoconf, automake and whether libzend/TSRM is around
Stig Bakken authored
43 echo " You need automake version 1.4 or newer installed"
44 echo " to build PHP from CVS."
45 exit 1
46 else
47 echo "buildconf: automake version $am_version (ok)"
48 fi
49
4092f4b ext/lcg -> ext/standard in various places
Stig Bakken authored
50 # libtool 1.3.3 or newer
39df209 @rlerdorf libtool check fix
rlerdorf authored
51 lt_pversion=`libtool --version 2>/dev/null|sed -e 's/^[^0-9]*//' -e 's/[- ].*//'`
b291b09 small fix to libtool check
Stig Bakken authored
52 if test "$lt_pversion" = ""; then
6c856de require libtool to be installed as well
Stig Bakken authored
53 echo "buildconf: libtool not found."
54 echo " You need libtool version 1.3 or newer installed"
55 echo " to build PHP from CVS."
56 exit 1
57 fi
b291b09 small fix to libtool check
Stig Bakken authored
58 lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
6c856de require libtool to be installed as well
Stig Bakken authored
59 IFS=.; set $lt_version; IFS=' '
4092f4b ext/lcg -> ext/standard in various places
Stig Bakken authored
60 if test "$1" -gt "1" || test "$2" -gt "3" || test "$2" = "3" -a "$3" -ge "3"
6c856de require libtool to be installed as well
Stig Bakken authored
61 then
b291b09 small fix to libtool check
Stig Bakken authored
62 echo "buildconf: libtool version $lt_pversion (ok)"
6c856de require libtool to be installed as well
Stig Bakken authored
63 else
b291b09 small fix to libtool check
Stig Bakken authored
64 echo "buildconf: libtool version $lt_pversion found."
4092f4b ext/lcg -> ext/standard in various places
Stig Bakken authored
65 echo " You need libtool version 1.3.3 or newer installed"
6c856de require libtool to be installed as well
Stig Bakken authored
66 echo " to build PHP from CVS."
67 exit 1
68 fi
270be25 Improve speed on subsequent runs of buildconf
Sascha Schumann authored
69 touch buildconf.stamp
84656f1 add checks for autoconf, automake and whether libzend/TSRM is around
Stig Bakken authored
70 fi
71
5665459 Detect automake/libtool that are installed with different prefixes.
Stig Bakken authored
72 am_prefix=`which automake | sed -e 's#/[^/]*/[^/]*$##'`
73 lt_prefix=`which libtool | sed -e 's#/[^/]*/[^/]*$##'`
74 if test "$am_prefix" != "$lt_prefix"; then
75 echo "buildconf: WARNING: automake and libtool are installed in different"
76 echo " directories. This may cause aclocal to fail."
77 echo "buildconf: continuing anyway"
78 fi
79
1207465 @zsuraski This should sort the buildconf bug...
zsuraski authored
80 if test "$supplied_flag" = "--copy"; then
84656f1 add checks for autoconf, automake and whether libzend/TSRM is around
Stig Bakken authored
81 automake_flags=--copy
8a7784d make copy optional
Sascha Schumann authored
82 fi
83
63a48af Fix for compatibility.
Andrey Hristov authored
84 if test ! -d libzend; then
84656f1 add checks for autoconf, automake and whether libzend/TSRM is around
Stig Bakken authored
85 if test -d ../libzend; then
86 echo "buildconf: linking ../libzend to ./libzend"
87 ln -s ../libzend .
88 else
89 echo "buildconf: can not find libzend"
9bee15a spoonfeed
Stig Bakken authored
90 echo " libzend should be installed in . or .., how to fetch:"
91 echo ""
92 echo " cvs -d :pserver:cvsread@cvs.zend.com:/repository login"
55b31d5 forgot to mention the password
Stig Bakken authored
93 echo " (password \"zend\")"
9bee15a spoonfeed
Stig Bakken authored
94 echo " cvs -d :pserver:cvsread@cvs.zend.com:/repository co libzend"
95 echo ""
84656f1 add checks for autoconf, automake and whether libzend/TSRM is around
Stig Bakken authored
96 exit 1
97 fi
98 fi
63a48af Fix for compatibility.
Andrey Hristov authored
99 if test ! -d TSRM; then
84656f1 add checks for autoconf, automake and whether libzend/TSRM is around
Stig Bakken authored
100 if test -d ../TSRM; then
101 echo "buildconf: linking ../TSRM to ./TSRM"
102 ln -s ../TSRM .
103 else
104 echo "buildconf: can not find TSRM"
9bee15a spoonfeed
Stig Bakken authored
105 echo " TSRM should be installed in . or .., how to fetch:"
106 echo ""
107 echo " cvs -d :pserver:cvsread@cvs.zend.com:/repository login"
55b31d5 forgot to mention the password
Stig Bakken authored
108 echo " (password \"zend\")"
9bee15a spoonfeed
Stig Bakken authored
109 echo " cvs -d :pserver:cvsread@cvs.zend.com:/repository co TSRM"
110 echo ""
84656f1 add checks for autoconf, automake and whether libzend/TSRM is around
Stig Bakken authored
111 exit 1
112 fi
113 fi
a916379 make symlinks if they are not present already
Stig Bakken authored
114
263c685 @buildconf now uses build.mk
Stig Bakken authored
115 ## build.mk does not check automake/libtool prefixes yet.
116 ##
117 #mv aclocal.m4 aclocal.m4.old 2>/dev/null
118 #aclocal
119 #if test "$?" != "0" -a "$am_prefix" != "$lt_prefix"; then
120 # echo "buildconf: ERROR: aclocal failed, probably because automake and"
121 # echo " libtool are installed with different prefixes;"
122 # echo " automake is installed in $am_prefix, but libtool in $lt_prefix."
123 # echo " Please re-install automake and/or libtool with a common prefix"
124 # echo " and try again."
125 # exit 1
126 #fi
127
128 if test "$supplied_flag" = "--local"; then
129 subdirs='SUBDIRS='
aac5a43 keep old files if they are not modified
Stig Bakken authored
130 else
263c685 @buildconf now uses build.mk
Stig Bakken authored
131 subdirs=''
aac5a43 keep old files if they are not modified
Stig Bakken authored
132 fi
133
263c685 @buildconf now uses build.mk
Stig Bakken authored
134 make -s -f build.mk AMFLAGS="$automake_flags" $subdirs
Something went wrong with that request. Please try again.