On 05/15/2011 02:45 AM, Rasmus Lerdorf wrote:
As you may have noticed, I have fixed the autoconf stuff to work with autoconf 2.60+ 
in PHP_5_4 and trunk. In the past I have tried to make it support both <2.60 and 
>=2.60 at the same time and it never worked. autoconf 2.60 was released in June 
2006, so
nearly 5 years ago and it is in every modern distro at this point. Most distros 
also have the ability to run older versions concurrently so you should be able 
to build 5.3 and 5.4 on the same system. On Ubuntu I have to set PHP_AUTOCONF 
to autoconf2.59
before running ./buildconf in 5.3, for example. With 5.4 you should no longer 
need to do that.

Let me know if there are any autoconf-related problems and we will get them 
tracked down.

-Rasmus



Rasmus,

We should make PHP 5.4 support autoconf 2.59 by not calling
AC_PRESERVE_HELP_ORDER when using autoconf < 2.60.

This would allow PECL extensions to install on Oracle Linux 5.6 & RHEL
5.6 using the standard tool chain.  These OSes have autoconf 2.59
without AC_PRESERVE_HELP_ORDER (i.e. autoconf doesn't appear to be
2.59c, see [1]).  Currently 'pecl install abc' immediately fails.

Anyone on more up to date distros (e.g. Oracle Linux 6.1) will have a
autoconf 2.60+ which will support AC_PRESERVE_HELP_ORDER.  So there is
no functionality lost for most people.

On PHP_5_4 I changed the build checks to accept 2.59+ and added ifdefs
similar to
http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/configure.in?r1=291410&r2=291409&pathrev=291410
The build seems fine both with the system autoconf 2.59 and a hand
built 2.68.

There are 'configure --help' order differences between the two, and
some new options given when using autoconf 2.68.  I think this is
acceptable for this edge case.

A patch for PHP_5_4 is attached.  It drops the overall autoconf
requirement to 2.59, allowing both PECL installs and buildconf to
work.

Chris

References:
[1] http://lists.gnu.org/archive/html/autoconf/2006-04/msg00085.html


--
Email: christopher.jo...@oracle.com
Tel:  +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/
Index: scripts/phpize.m4
===================================================================
--- scripts/phpize.m4   (revision 311741)
+++ scripts/phpize.m4   (working copy)
@@ -1,8 +1,8 @@
 dnl This file becomes configure.in for self-contained extensions.
 
-AC_PREREQ(2.60)
+AC_PREREQ(2.59)
 AC_INIT(config.m4)
-AC_PRESERVE_HELP_ORDER
+ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
 
 PHP_CONFIG_NICE(config.nice)
 
Index: configure.in
===================================================================
--- configure.in        (revision 311741)
+++ configure.in        (working copy)
@@ -8,9 +8,9 @@
 dnl Basic autoconf + automake initialization, generation of config.nice.
 dnl -------------------------------------------------------------------------
 
-AC_PREREQ(2.60)
+AC_PREREQ(2.59)
 AC_INIT(README.SVN-RULES)
-AC_PRESERVE_HELP_ORDER
+ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
 
 PHP_CONFIG_NICE(config.nice)
 
Index: build/buildcheck.sh
===================================================================
--- build/buildcheck.sh (revision 311741)
+++ build/buildcheck.sh (working copy)
@@ -28,18 +28,18 @@
   PHP_AUTOCONF='autoconf'
 fi
 
-# autoconf 2.60 or newer
+# autoconf 2.59 or newer
 ac_version=`$PHP_AUTOCONF --version 2>/dev/null|head -n 1|sed -e 
's/^[^0-9]*//' -e 's/[a-z]* *$//'`
 if test -z "$ac_version"; then
 echo "buildconf: autoconf not found."
-echo "           You need autoconf version 2.60 or newer installed"
+echo "           You need autoconf version 2.59 or newer installed"
 echo "           to build PHP from SVN."
 exit 1
 fi
 IFS=.; set $ac_version; IFS=' '
-if test "$1" = "2" -a "$2" -lt "60" || test "$1" -lt "2"; then
+if test "$1" = "2" -a "$2" -lt "59" || test "$1" -lt "2"; then
 echo "buildconf: autoconf version $ac_version found."
-echo "           You need autoconf version 2.60 or newer installed"
+echo "           You need autoconf version 2.59 or newer installed"
 echo "           to build PHP from SVN."
 exit 1
 else

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to