Skip to content

Commit e715fb0

Browse files
author
Sascha Schumann
committed
Eliminate need for automake/aclocal
1 parent 4608ddb commit e715fb0

File tree

2 files changed

+21
-36
lines changed

2 files changed

+21
-36
lines changed

build/build2.mk

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,13 @@ $(TOUCH_FILES):
5252
touch $(TOUCH_FILES)
5353

5454
aclocal.m4: configure.in acinclude.m4
55-
aclocal 2>&1 | $(SUPPRESS_WARNINGS)
56-
55+
@echo rebuilding $@
56+
@libtoolize=`./build/shtool path glibtoolize libtoolize`; \
57+
$$libtoolize --copy --automake; \
58+
ltpath=`dirname $$libtoolize`; \
59+
ltfile=`cd $$ltpath/../share/aclocal; pwd`/libtool.m4; \
60+
cat acinclude.m4 $$ltfile > $@
61+
5762
configure: aclocal.m4 configure.in $(config_m4_files)
5863
@echo rebuilding $@
5964
@autoconf 2>&1 | $(SUPPRESS_WARNINGS)

build/buildcheck.sh

Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# | Sascha Schumann <[email protected]> |
1717
# +----------------------------------------------------------------------+
1818
#
19-
# $Id: buildcheck.sh,v 1.26 2003-06-10 20:03:25 imajes Exp $
19+
# $Id: buildcheck.sh,v 1.27 2003-06-27 00:19:43 sas Exp $
2020
#
2121

2222
echo "buildconf: checking installation..."
@@ -50,39 +50,17 @@ if test "$1" = "2" && test "$2" -ge "50"; then
5050
stamp=
5151
fi
5252

53-
54-
# automake 1.4 or newer
55-
am_version=`automake --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
56-
am_version_clean=`echo $am_version|sed -e 's/-p[0-9]*$//'`
57-
if test "$am_version" = ""; then
58-
echo "buildconf: automake not found."
59-
echo " You need automake version 1.4 or newer installed"
60-
echo " to build PHP from CVS."
61-
exit 1
62-
fi
63-
IFS=.; set $am_version_clean; IFS=' '
64-
if test "$1" = "1" -a "$2" -lt "4" || test "$1" -lt "1"; then
65-
echo "buildconf: automake version $am_version found."
66-
echo " You need automake version 1.4 or newer installed"
67-
echo " to build PHP from CVS."
68-
exit 1
69-
else
70-
echo "buildconf: automake version $am_version (ok)"
71-
fi
72-
73-
# libtool 1.4.3 or newer
74-
# Prefer glibtool over libtool for Mac OS X compatibility
75-
libtool=`./build/shtool path glibtool 2> /dev/null`
76-
if test ! -r "$libtool"; then libtool=`./build/shtool path libtool`; fi
77-
lt_pversion=`$libtool --version 2>/dev/null|sed -n -e 's/^[^0-9]*//' -e 1's/[- ].*//p'`
53+
# libtoolize 1.4.3 or newer
54+
# Prefer glibtoolize over libtoolize for Mac OS X compatibility
55+
libtoolize=`./build/shtool path glibtoolize libtoolize 2> /dev/null`
56+
lt_pversion=`$libtoolize --version 2>/dev/null|sed -e 's/^[^0-9]*//'`
7857
if test "$lt_pversion" = ""; then
7958
echo "buildconf: libtool not found."
8059
echo " You need libtool version 1.4.3 or newer installed"
8160
echo " to build PHP from CVS."
8261
exit 1
8362
fi
84-
lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
85-
IFS=.; set $lt_version; IFS=' '
63+
IFS=.; set $lt_pversion; IFS=' '
8664

8765
if test "$3" = ""; then
8866
third=0
@@ -100,12 +78,14 @@ echo " to build PHP from CVS."
10078
exit 1
10179
fi
10280

103-
am_prefix=`./build/shtool path automake | sed -e 's#/[^/]*/[^/]*$##'`
104-
lt_prefix=`echo $libtool | sed -e 's#/[^/]*/[^/]*$##'`
105-
if test "$am_prefix" != "$lt_prefix"; then
106-
echo "WARNING: automake and libtool are installed in different"
107-
echo " directories. This may cause aclocal to fail."
108-
echo " continuing anyway"
81+
ltpath=`echo $libtoolize | sed -e 's#/[^/]*/[^/]*$##'`
82+
ltfile="$ltpath/share/aclocal/libtool.m4"
83+
if test -r "$ltfile"; then
84+
:
85+
else
86+
echo "buildconf: $ltfile does not exist."
87+
echo " Please reinstall libtool."
88+
exit 1
10989
fi
11090

11191
test -n "$stamp" && touch $stamp

0 commit comments

Comments
 (0)