]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Make AC_PROG_GCC_TRADITIONAL a compatibility alias for AC_PROG_CC.
authorZack Weinberg <zackw@panix.com>
Mon, 3 Apr 2023 01:03:30 +0000 (21:03 -0400)
committerZack Weinberg <zackw@panix.com>
Mon, 3 Apr 2023 03:01:06 +0000 (23:01 -0400)
This macro is one of the last remaining internal uses of AC_EGREP_CPP.
It has only ever done anything useful with GCC, and GCC dropped
support for â€˜traditional’ compilation in version 3.3 (released 2003)
so I do not think it is worth trying to preserve.

* lib/autoconf/c.m4 (AC_PROG_GCC_TRADITIONAL): Make into a
  compatibility alias for AC_PROG_CC, similar to AC_PROG_CC_STDC.
* lib/autoconf/general.m4 (AC_EGREP_CPP): Remove stale comment.
* doc/autoconf.texi, NEWS: Document this change.
* tests/mktests.pl: Exclude AC_PROG_GCC_TRADITIONAL from
  autoupdate tests.

NEWS
doc/autoconf.texi
lib/autoconf/c.m4
lib/autoconf/general.m4
tests/mktests.pl

diff --git a/NEWS b/NEWS
index 6a106f155bd35cbf68c513571787485f178b1e8a..53c57ff597622c86e18ed0c1089cec9de605e1ee 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -81,6 +81,13 @@ GNU Autoconf NEWS - User visible changes.
   with plain apostrophes instead of the older GNU style `like this'
   with grave accent and apostrophe.
 
+*** AC_PROG_GCC_TRADITIONAL no longer does anything.
+
+  This macro has had no useful effect since GCC dropped support for
+  traditional-mode compilation in version 3.3 (released in 2003), and
+  the systems that needed it are also long obsolete.  It is now a
+  compatibility synonym for AC_PROG_CC.
+
 ** Notable bug fixes
 
 *** Autoconf caches now use finer-grained timestamps.
index 8db64d8bbd0e4e52a87d054ce7645a2a00954bd4..037c8055f403ab65e7aee47c46fd30aa4fe92dac 100644 (file)
@@ -7764,20 +7764,6 @@ This macro is obsolescent, as current C compilers support prototypes.
 New programs need not use this macro.
 @end defmac
 
-@anchor{AC_PROG_GCC_TRADITIONAL}
-@defmac AC_PROG_GCC_TRADITIONAL
-@acindex{PROG_GCC_TRADITIONAL}
-@ovindex CC
-Add @option{-traditional} to output variable @code{CC} if using a
-GNU C compiler and @code{ioctl} does not work properly without
-@option{-traditional}.  That usually happens when the fixed header files
-have not been installed on an old system.
-
-This macro is obsolescent, since current versions of the GNU C
-compiler fix the header files automatically when installed.
-@end defmac
-
-
 @node C++ Compiler
 @subsection C++ Compiler Characteristics
 
@@ -23986,7 +23972,8 @@ These days portable programs should use @code{waitpid}, not
 
 @defmac AC_GCC_TRADITIONAL
 @acindex{GCC_TRADITIONAL}
-Replaced by @code{AC_PROG_GCC_TRADITIONAL} (@pxref{AC_PROG_GCC_TRADITIONAL}).
+Replaced by @code{AC_PROG_GCC_TRADITIONAL} (@pxref{AC_PROG_GCC_TRADITIONAL}),
+which is itself obsolete.
 @end defmac
 
 @defmac AC_GETGROUPS_T
@@ -24369,6 +24356,18 @@ Now done by @code{AC_PROG_CC} (@pxref{AC_PROG_CC}).
 Now done by @code{AC_PROG_CC} (@pxref{AC_PROG_CC}).
 @end defmac
 
+@anchor{AC_PROG_GCC_TRADITIONAL}
+@defmac AC_PROG_GCC_TRADITIONAL
+@acindex{PROG_GCC_TRADITIONAL}
+Used to put GCC into ``traditional'' (pre-ISO C) compilation mode,
+on systems with headers that did not work correctly with a
+standard-compliant compiler.  GCC has not supported traditional
+compilation in many years, and all of the systems that required this are
+long obsolete themselves.  This macro is now a compatibility synonym for
+@code{AC_PROG_CC} (@pxref{AC_PROG_CC}).
+
+@end defmac
+
 @defmac AC_PROGRAMS_CHECK
 @acindex{PROGRAMS_CHECK}
 Replaced by @code{AC_CHECK_PROGS} (@pxref{AC_CHECK_PROGS}).
index fef6c516d0b1fb75c2e0fc15d3481f472b62c3fe..33648b5b9303e17abec308cd364fba42f1e6fafd 100644 (file)
@@ -551,30 +551,6 @@ fi[]dnl
 ])# _AC_PROG_CC_G
 
 
-# AC_PROG_GCC_TRADITIONAL
-# -----------------------
-AC_DEFUN([AC_PROG_GCC_TRADITIONAL],
-[AC_REQUIRE([AC_PROG_CC])dnl
-if test $ac_cv_c_compiler_gnu = yes; then
-    AC_CACHE_CHECK(whether $CC needs -traditional,
-      ac_cv_prog_gcc_traditional,
-[  ac_pattern="Autoconf.*'x'"
-  AC_EGREP_CPP($ac_pattern, [#include <sgtty.h>
-Autoconf TIOCGETP],
-  ac_cv_prog_gcc_traditional=yes, ac_cv_prog_gcc_traditional=no)
-
-  if test $ac_cv_prog_gcc_traditional = no; then
-    AC_EGREP_CPP($ac_pattern, [#include <termio.h>
-Autoconf TCGETA],
-    ac_cv_prog_gcc_traditional=yes)
-  fi])
-  if test $ac_cv_prog_gcc_traditional = yes; then
-    CC="$CC -traditional"
-  fi
-fi
-])# AC_PROG_GCC_TRADITIONAL
-
-
 # AC_PROG_CC_C_O
 # --------------
 AC_DEFUN([AC_PROG_CC_C_O],
@@ -1675,6 +1651,12 @@ AU_DEFUN([AC_PROG_CC_STDC],
   [$0 is obsolete; use AC_PROG_CC]
 )
 
+# AC_PROG_GCC_TRADITIONAL
+# -----------------------
+AU_DEFUN([AC_PROG_GCC_TRADITIONAL],
+  [AC_REQUIRE([AC_PROG_CC])],
+  [$0 is obsolete; use AC_PROG_CC]
+)
 
 # AC_C_BACKSLASH_A
 # ----------------
index ecda0a51c140e82d0dad05abf00535d95d64994f..47d896d5410e8752a1b7361f7e1c0dd0923afc4d 100644 (file)
@@ -2766,8 +2766,6 @@ AU_DEFUN([AC_TRY_CPP],
 # AC_EGREP_CPP(PATTERN, PROGRAM,
 #              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 # ------------------------------------------------------
-# Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
-# come early, it is not included in AC_BEFORE checks.
 AC_DEFUN([AC_EGREP_CPP],
 [AC_LANG_PREPROC_REQUIRE()dnl
 AC_REQUIRE([_AC_PROG_EGREP_TRADITIONAL])dnl
index effed0bcab7007ad7e52f161a45f6c124c323c95..81f63586cda2907e2dea8d8ab28196b79a51ac3a 100644 (file)
@@ -112,7 +112,7 @@ my @ac_exclude_list = (
 # Check all AU_DEFUN'ed macros with AT_CHECK_AU_MACRO, except these.
 my @au_exclude_list = (
   # Empty.
-  qr/^AC_(C_CROSS|PROG_CC_(C[89]9|STDC))$/,
+  qr/^AC_(C_CROSS|PROG_(CC_(C[89]9|STDC)|GCC_TRADITIONAL))$/,
 
   # Use AC_REQUIRE.
   qr/^AC_(CYGWIN|MINGW32|EMXOS2)$/,