This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

autoconf AC_PREREQ ?


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.  |
`------------------------------^-------^------------------^--------------------'
Index: sysdeps/powerpc/powerpc32/configure.in
===================================================================
--- libc/sysdeps/powerpc/powerpc32/configure.in	(revision 7000)
+++ libc/sysdeps/powerpc/powerpc32/configure.in	(working copy)
@@ -1,6 +1,8 @@
 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
 # Local configure fragment for sysdeps/powerpc/powerpc32.
 
+AC_PREREQ(2.50)
+
 # See whether gas has R_PPC_REL16 relocs.
 AC_CACHE_CHECK(for R_PPC_REL16 gas support, libc_cv_ppc_rel16, [dnl
 cat > conftest.s <<\EOF
Index: sysdeps/powerpc/powerpc32/elf/configure.in
===================================================================
--- libc/sysdeps/powerpc/powerpc32/elf/configure.in	(revision 7000)
+++ libc/sysdeps/powerpc/powerpc32/elf/configure.in	(working copy)
@@ -1,6 +1,8 @@
 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
 # Local configure fragment for sysdeps/powerpc32/elf.
 
+AC_PREREQ(2.50)
+
 if test "$usetls" != no; then
 # Check for support of thread-local storage handling in assembler and
 # linker.
Index: sysdeps/powerpc/configure.in
===================================================================
--- libc/sysdeps/powerpc/configure.in	(revision 7000)
+++ libc/sysdeps/powerpc/configure.in	(working copy)
@@ -1,6 +1,8 @@
 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
 # Local configure fragment for sysdeps/powerpc.
 
+AC_PREREQ(2.50)
+
 # Accept binutils which knows about ".machine".
 AC_CACHE_CHECK(for .machine support, libc_cv_ppc_machine, [dnl
 cat > conftest.s <<\EOF
Index: sysdeps/unix/sysv/linux/powerpc/configure.in
===================================================================
--- libc/sysdeps/unix/sysv/linux/powerpc/configure.in	(revision 7000)
+++ libc/sysdeps/unix/sysv/linux/powerpc/configure.in	(working copy)
@@ -2,6 +2,8 @@
 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
 # Local configure fragment for sysdeps/unix/sysv/linux/powerpc/.
 
+AC_PREREQ(2.50)
+
 AC_CACHE_CHECK(whether $CC $CFLAGS -mlong-double-128 uses IBM extended format,
 	       libc_cv_mlong_double_128ibm, [dnl
 save_CFLAGS="$CFLAGS"
Index: sysdeps/ieee754/ldbl-opt/configure.in
===================================================================
--- libc/sysdeps/ieee754/ldbl-opt/configure.in	(revision 7000)
+++ libc/sysdeps/ieee754/ldbl-opt/configure.in	(working copy)
@@ -2,6 +2,8 @@
 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
 # Local configure fragment for sysdeps/ieee754/ldbl-opt/.
 
+AC_PREREQ(2.50)
+
 AC_CACHE_CHECK(whether $CC $CFLAGS supports -mlong-double-128,
 	       libc_cv_mlong_double_128, [dnl
 save_CFLAGS="$CFLAGS"
Index: libidn/configure.in
===================================================================
--- libc/libidn/configure.in	(revision 7000)
+++ libc/libidn/configure.in	(working copy)
@@ -1,6 +1,8 @@
 dnl glibc configure fragment for libidn add-on
 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
 
+AC_PREREQ(2.50)
+
 libc_add_on_canonical=
 libc_add_on_subdirs=.
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]