[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] autoconf AC_PREREQ



Hello All!

I'm trying to X-build  the eglibc 2_8 branch on my Debian. The target is
PowerPC 8548 with spe extensions: powerpc-unknown-linux-gnuspe.

The build procedure was copied from the libc/EGLIBC.cross-building and adapted
to fit in crosstool-NG: http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool

Now to my problem:

There are some configure.in files throughout the eglibc tree that are used to
generate configure scripts. Those configure.in require autoconf-2.50, but
plain autoconf is called from the eglibc Makefiles.

Unfortunately, on my Debian, autoconf is a wrapper script that calls either
autoconf2.13 or autoconf2.50 based on some heuristics (*). Those heuristics
are caught out here because the files are named configure.in, as per
autoconf2.13 conventions, but are in fact autoconf2.50 files.

The attached patch solves the issue for the PowerPC build (which is the only
one I attempted so far), but the problem may arise for other architectures,
as well as for other PowerPC variants.

What are your opinion on the subject?

Regards,
Yann E. MORIN.

PS. I'm not subscribed, could you keep me CC:ed, please?

(*) 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<----
YEM.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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=.