# autoconf 2.60+ support

- Thread: https://externals.io/message/52374
- Original archive: https://news-web.php.net/php.internals/52374
- Started by Rasmus Lerdorf on 2011-05-15T09:45:35+00:00
- Messages: 8
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #52374 — Rasmus Lerdorf — 2011-05-15T09:45:35+00:00

URL: https://externals.io/message/52374#52374

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

---

## #52375 — Sebastian Bergmann — 2011-05-15T10:00:17+00:00

URL: https://externals.io/message/52374#52375 · In reply to: #52374

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

  I am seeing the following warnings on Fedora 15

   Forcing buildconf
   buildconf: checking installation...
   buildconf: autoconf version 2.68 (ok)
   rebuilding aclocal.m4
   rebuilding configure
   rebuilding acconfig.h
   rebuilding main/php_config.h.in
   autoheader: WARNING: Using auxiliary files such as `acconfig.h',
   `config.h.bot'
   autoheader: WARNING: and `config.h.top', to define templates for
   `config.h.in'
   autoheader: WARNING: is deprecated and discouraged.
   autoheader:
   autoheader: WARNING: Using the third argument of `AC_DEFINE' and
   autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows one to define a
   template without
   autoheader: WARNING: `acconfig.h':
   autoheader:
   autoheader: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
   autoheader: 		[Define if a function `main' is needed.])
   autoheader:
   autoheader: WARNING: More sophisticated templates can also be produced,
   see the
   autoheader: WARNING: documentation.

  Not sure this is a problem since the generated configure script works
  just fine.

-- 
Sebastian Bergmann                    Co-Founder and Principal Consultant
http://sebastian-bergmann.de/                           http://thePHP.cc/

---

## #52376 — Stefan Marr — 2011-05-15T10:06:38+00:00

URL: https://externals.io/message/52374#52376 · In reply to: #52375

Hi:



> 
> > […]
> 
> I am seeing the following warnings on Fedora 15
> 

> .....

> Not sure this is a problem since the generated configure script works
> just fine.
Same warning on OSX 10.6 with autoconf 2.68 (macports)
However, configure and make work fine, too.

Best regards
Stefan

-- 
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax:   +32 2 629 3525

---

## #52377 — Rasmus Lerdorf — 2011-05-15T14:58:17+00:00

URL: https://externals.io/message/52374#52377 · In reply to: #52375

> autoheader: WARNING: Using auxiliary files such as `acconfig.h',
> `config.h.bot'
> autoheader: WARNING: and `config.h.top', to define templates for
> `config.h.in'
> autoheader: WARNING: is deprecated and discouraged.
> autoheader:
> autoheader: WARNING: Using the third argument of `AC_DEFINE' and
> autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows one to define a
> template without
> autoheader: WARNING: `acconfig.h':
> autoheader:
> autoheader: WARNING: AC_DEFINE([NEED_FUNC_MAIN], 1,
> autoheader: [Define if a function `main' is needed.])
> autoheader:
> autoheader: WARNING: More sophisticated templates can also be produced,
> see the
> autoheader: WARNING: documentation.
>
> Not sure this is a problem since the generated configure script works
> just fine.
>

Yup, I know about these. They were there before as well when using 
autoconf 2.50-2.59 in 5.3. It is just a warning telling us that we 
should be inlining our templates. It's a bit of a pain in the ass to 
switch this, but we should do it.

-Rasmus

---

## #52829 — Christopher Jones — 2011-06-03T01:06:03+00:00

URL: https://externals.io/message/52374#52829 · In reply to: #52374

> 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.jones@oracle.com
Tel:  +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/

---

## #52831 — Rasmus Lerdorf — 2011-06-03T01:44:32+00:00

URL: https://externals.io/message/52374#52831 · In reply to: #52829

I'm on a plane headed for Rio, so I can't test your patch for a while. If you have checked it on a couple of different systems, commit it, and we will work out any issues during the early stages of getting 5.4 out the door.

-Rasmus

---

## #52833 — Christopher Jones — 2011-06-03T05:56:46+00:00

URL: https://externals.io/message/52374#52833 · In reply to: #52831

> I'm on a plane headed for Rio, so I can't test your patch for a while. If you have checked it on a couple of different systems, commit it, and we will work out any issues during the early stages of getting 5.4 out the door.
>
> -Rasmus
>

I'll test it on Ubuntu and older/newer Oracle Linux stacks, probably on Monday.

Chris

-- 
Email: christopher.jones@oracle.com
Tel:  +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/

---

## #52855 — Rune Kaagaard — 2011-06-03T10:55:02+00:00

URL: https://externals.io/message/52374#52855 · In reply to: #52833

I compiled trunk on Ubuntu 11.04 desktop yesterday with default
settings and was surprised and confused when it worked even after I
forgot to use the older autoconf binary. Nice job!
