bug-gnulib
[Top][All Lists]
Advanced

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

Fix gl_MULTIARCH to work around autoconf bug


From: Eric Blake
Subject: Fix gl_MULTIARCH to work around autoconf bug
Date: Mon, 29 Dec 2008 22:50:42 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Bruno, okay to apply in response to your bug report?
http://lists.gnu.org/archive/html/bug-autoconf/2008-12/msg00039.html

I've tested that before this patch,
gnulib-tool --create-testdir --dir=... vasnprintf-posix

references $APPLE_UNIVERSAL_BUILD prior to its definition, and after the patch, 
the same testcase did things in a correct order.

Note my emphasis on _a_ correct order, not _the_ correct order; with autoconf 
2.63 and earlier, this patch has the result of exploiting the autoconf bug in 
order to hoist the expansion of gl_MULTIARCH_BODY to occur prior to gl_INIT, in 
such a manner that the overall dependencies are still met.  But with autoconf 
2.64, the patch I am working on there will no longer have an AC_REQUIRE bug, 
and therefore gl_MULTIARCH_BODY will be expanded in place after the start of 
gl_INIT.  But in both cases, all require relationships are honored; or put 
another way, since there is no AC_REQUIRE relationship between 
gl_MULTIARCH_BODY and the beginning text of gl_INIT, either piece can occur 
first and the resulting configure file will still be correct (or if there is an 
ordering relationship, we need to add an AC_REQUIRE to make it explicit).



From: Eric Blake <address@hidden>
Date: Mon, 29 Dec 2008 15:41:49 -0700
Subject: [PATCH] multiarch: avoid autoconf AC_REQUIRE bug

* m4/multiarch.m4 (gl_MULTIARCH): Split body...
(gl_MULTIARCH_BODY): ...into new macro, to work around bug in Autoconf
2.63 and older.
Reported by Bruno Haible, and analyzed in
http://lists.gnu.org/archive/html/bug-autoconf/2008-12/msg00039.html

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog       |    9 +++++++++
 m4/multiarch.m4 |    5 +++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8bd92e7..0d9eb4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2008-12-29  Eric Blake  <address@hidden>
 
+       multiarch: avoid autoconf AC_REQUIRE bug
+       * m4/multiarch.m4 (gl_MULTIARCH): Split body...
+       (gl_MULTIARCH_BODY): ...into new macro, to work around bug in Autoconf
+       2.63 and older.
+       Reported by Bruno Haible, and analyzed in
+       http://lists.gnu.org/archive/html/bug-autoconf/2008-12/msg00039.html
+
+2008-12-29  Eric Blake  <address@hidden>
+
        wchar.h: supply WEOF on Irix 5.3
        * lib/wchar.in.h (wint_t): Also supply WEOF.
        * lib/wctype.in.h (wint_t): Likewise.
diff --git a/m4/multiarch.m4 b/m4/multiarch.m4
index d857599..8e312f6 100644
--- a/m4/multiarch.m4
+++ b/m4/multiarch.m4
@@ -21,6 +21,11 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_MULTIARCH],
 [
+  AC_REQUIRE([gl_MULTIARCH_BODY])
+])
+
+AC_DEFUN([gl_MULTIARCH_BODY],
+[
   dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN.
   gl_cv_c_multiarch=no
   AC_COMPILE_IFELSE(
-- 
1.6.0.4







reply via email to

[Prev in Thread] Current Thread [Next in Thread]