autoconf AC_PREREQ ?

Yann E. MORIN yann.morin.1998@anciens.enib.fr
Wed Sep 24 05:30:00 GMT 2008


Hello All!

I'm bringing this discussion on the glibc ML after it was (briefly)
discussed (1) on the eglibc ML, and it turned out the issue is already
present in the glibc tree.

There are configure.in fragments throughout the glibc-2.8 tree. Those
fragments get parsed with 'autoconf', called from the glibc Makefiles.

Unfortunately, on some distributions (Debian is one), 'autoconf' is a
wrapper script that calls either autoconf2.13 or autoconf2.50, based on
some heuristics (2). And those heuristics decide to run autoconf2.13.

This gives some autoconf errors such as:
autoconf: Undefined macros:
***BUG in Autoconf--please report*** AC_FD_MSG
***BUG in Autoconf--please report*** AC_FD_CC

The affected files are listed in (3)

Forcing use of autoconf2.50 fixes this issue.

The solution is either to add an AC_PREREQ(2.50) directive to those files,
or to rename all configure.in fragments to configure.ac (which is specific
to autoconf2.50).

Please see the attached patch that adds the AC_PREREQ(2.50) directive so
that PowerPC builds. I can prepare a (untested) patch for all other affected
files.

What do you guys suggest? AC_PREREQ, or rename?

I'm not subscribed, could you keep me copied, please?

Regards,
Yann E. MORIN.

(1) http://www.eglibc.org/archives/patches/msg00530.html

(2) The following heuristics are used to choose an Autoconf version (extract
    from the autoconf man page on my Debian):
  ----8<----
  * If file configure.ac exists, Autoconf 2.50 is used. Autoconf 2.13 used the
    name configure.in instead, but version 2.50 supports both.
    (Usually autoconf is run without nonoption arguments. If a filename is
    supplied on the command line, then version 2.50 is used if the filename
    ends in .ac.)

  * Otherwise, configure.in (or the file specified on the command line, if
    any) is read. It is checked for the presence of an AC_PREREQ directive. If
    it specifies a minimum version higher than 2.13, Autoconf 2.50 is used.
    aclocal.m4, if present, is also scanned.

  * Otherwise, Autoconf 2.13 is used.
  ----8<----

(3) Affected files in snapshot glibc-2.8-20080922.tar.bz2 :
# find . -type f -name 'configure*.in' \
  | while read file; do
      autoconf "${file}" >/dev/null 2>&1 || echo "${file}"
    done
./sysdeps/unix/sysv/linux/powerpc/configure.in
./sysdeps/unix/sysv/linux/configure.in
./sysdeps/powerpc/powerpc32/elf/configure.in
./sysdeps/powerpc/powerpc32/configure.in
./sysdeps/powerpc/powerpc64/elf/configure.in
./sysdeps/powerpc/powerpc64/configure.in
./sysdeps/powerpc/configure.in
./sysdeps/s390/s390-64/elf/configure.in
./sysdeps/s390/s390-32/elf/configure.in
./sysdeps/i386/elf/configure.in
./sysdeps/i386/configure.in
./sysdeps/sh/elf/configure.in
./sysdeps/alpha/elf/configure.in
./sysdeps/ieee754/ldbl-opt/configure.in
./sysdeps/ia64/elf/configure.in
./sysdeps/mach/hurd/configure.in
./sysdeps/mach/configure.in
./sysdeps/sparc/sparc64/elf/configure.in
./sysdeps/sparc/sparc32/elf/configure.in
./sysdeps/x86_64/elf/configure.in
./nptl/sysdeps/pthread/configure.in

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
`------------------------------^-------^------------------^--------------------'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AC_PREREQ.patch
Type: text/x-diff
Size: 3074 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-help/attachments/20080924/bb7f38fe/attachment.bin>


More information about the Libc-help mailing list