From 0b2774646f452fdce775923119568a7513477659 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 4 Aug 2008 06:56:53 -0600 Subject: [PATCH] Fix autoheader 2.62 regression on AC_DEFINE([__EXTENSIONS__]). * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Use a unique key for the AH_VERBATIM. * tests/c.at (AC_USE_SYSTEM_EXTENSIONS): New test. * NEWS: Mention the fix. Reported by Andreas Schwab, analyzed by Stepan Kasal. Signed-off-by: Eric Blake --- ChangeLog | 7 +++++++ NEWS | 5 +++++ lib/autoconf/specific.m4 | 7 +++++-- tests/c.at | 27 +++++++++++++++++++++++++-- 4 files changed, 42 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 60b3ee54..4c4cc3ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-08-06 Eric Blake + Fix autoheader 2.62 regression on AC_DEFINE([__EXTENSIONS__]). + * lib/autoconf/specific.m4 (AC_USE_SYSTEM_EXTENSIONS): Use a + unique key for the AH_VERBATIM. + * tests/c.at (AC_USE_SYSTEM_EXTENSIONS): New test. + * NEWS: Mention the fix. + Reported by Andreas Schwab, analyzed by Stepan Kasal. + Add linear m4_cond for m4 1.4.x. * lib/m4sugar/m4sugar.m4 (m4_cond): Split into... (_m4_cond): ...this, for fewer macros per iteration. diff --git a/NEWS b/NEWS index efd7f46e..dbff114c 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,11 @@ GNU Autoconf NEWS - User visible changes. ** AC_PATH_X now includes /lib64 and /usr/lib64 in its list of default library directories. +** AC_USE_SYSTEM_EXTENSIONS no longer conflicts with an external + AC_DEFINE([__EXTENSIONS__]). This fixes a regression introduced in + 2.62 when using macros such as AC_AIX that were made obsolete in + favor of the more portable AC_USE_SYSTEM_EXTENSIONS. + ** Newly obsolete macros The following macro has been marked obsolete, since current porting targets can safely assume C89 semantics that signal handlers return diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index d183d595..5fcfe377 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -2,7 +2,8 @@ # Macros that test for specific, unclassified, features. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, +# Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -398,7 +399,9 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl [Define to 1 if on MINIX.]) fi - AH_VERBATIM([__EXTENSIONS__], +dnl Use a different key than __EXTENSIONS__, as that name broke existing +dnl configure.ac when using autoheader 2.62. + AH_VERBATIM([USE_SYSTEM_EXTENSIONS], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE diff --git a/tests/c.at b/tests/c.at index 39fcb181..bc07c6eb 100644 --- a/tests/c.at +++ b/tests/c.at @@ -2,8 +2,8 @@ AT_BANNER([C low level compiling/preprocessing macros.]) -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. +# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 Free +# Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -232,3 +232,26 @@ AT_CHECK_MACRO([AC_NO_EXECUTABLES (broken linker)], AC_NO_EXECUTABLES AC_PROG_CC ]) + + +## -------------------------- ## +## AC_USE_SYSTEM_EXTENSIONS. ## +## -------------------------- ## + +AT_SETUP([AC_USE_SYSTEM_EXTENSIONS]) + +# Some existing configure.ac mixed AC_AIX (now an alias for +# AC_USE_SYSTEM_EXTENSIONS) and AC_DEFINE([__EXTENSIONS__]), which +# broke autoheader in 2.62. Test that this is supported. + +_AT_CHECK_AC_MACRO( +[[AC_AIX +AC_DEFINE([__EXTENSIONS__], [1], [Manually defined for Solaris]) +]]) + +_AT_CHECK_AC_MACRO( +[[AC_USE_SYSTEM_EXTENSIONS +AC_DEFINE([__EXTENSIONS__], [1], [Manually defined for Solaris]) +]]) + +AT_CLEANUP -- 2.11.4.GIT