gbranden pushed a commit to branch master
in repository groff.

commit 5669247d85fcfcdcb2e09c35ff8f22261160107b
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Mar 23 16:04:23 2026 -0500

    [build]: Drop `GROFF_CXX_CHECK` "configure" macro.
    
    * configure.ac: Stop interpolating `GROFF_CXX_CHECK` macro.
    
    * m4/groff.m4 (GROFF_CXX_CHECK): Delete macro definition. It dates back
      at least to groff 1.10 (1995).  ISO standardized C++ in 1998; it no
      longer seems necessary in 2026 to check that a purported C++ compiler
      validly compiles a `main()` that simply returns `0`, nor that it
      correctly arranges for constructors and destructors of statically
      allocated objects to run.  A C++ compiler failing to meet these
      criteria is not fit for purpose; working alternatives are universally
      available.
---
 ChangeLog    | 12 ++++++++++
 configure.ac |  1 -
 m4/groff.m4  | 72 ------------------------------------------------------------
 3 files changed, 12 insertions(+), 73 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0f2648cff..716ccf5cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2026-03-23  G. Branden Robinson <[email protected]>
+
+       * configure.ac: Stop interpolating `GROFF_CXX_CHECK` macro.
+       * m4/groff.m4 (GROFF_CXX_CHECK): Delete macro definition. It
+       dates back at least to groff 1.10 (1995).  ISO standardized C++
+       in 1998; it no longer seems necessary in 2026 to check that a
+       purported C++ compiler validly compiles a `main()` that simply
+       returns `0`, nor that it correctly arranges for constructors and
+       destructors of statically allocated objects to run.  A C++
+       compiler failing to meet these criteria is not fit for purpose;
+       working alternatives are universally available.
+
 2026-03-22  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (char_list::set, char_list::get):
diff --git a/configure.ac b/configure.ac
index e90ce446f..46e1cdd94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,6 @@ AC_PROG_CC
 AC_PROG_CXX
 gl_EARLY
 gl_INIT
-GROFF_CXX_CHECK
 GROFF_CMD_FILES
 GROFF_X11
 GROFF_APPDEFDIR_OPTION
diff --git a/m4/groff.m4 b/m4/groff.m4
index e0b81a9ef..fbe3d07f3 100644
--- a/m4/groff.m4
+++ b/m4/groff.m4
@@ -990,78 +990,6 @@ AC_DEFUN([GROFF_PAGE], [
 ])
 
 
-AC_DEFUN([GROFF_CXX_CHECK],
-  [AC_REQUIRE([AC_PROG_CXX])
-   AC_LANG_PUSH([C++])
-   if test "$cross_compiling" = no; then
-     AC_MSG_CHECKING([that C++ compiler can compile simple program])
-   fi
-   AC_RUN_IFELSE([
-       AC_LANG_SOURCE([[
-
-int main() {
-  return 0;
-}
-
-       ]])
-     ],
-     [AC_MSG_RESULT([yes])],
-     [AC_MSG_RESULT([no])
-      AC_MSG_ERROR([a working C++ compiler is required])],
-     [:])
-
-   if test "$cross_compiling" = no; then
-     AC_MSG_CHECKING([that C++ static constructors and destructors are called])
-   fi
-   AC_RUN_IFELSE([
-       AC_LANG_SOURCE([[
-
-extern "C" {
-  void _exit(int);
-}
-
-int i;
-struct A {
-  char dummy;
-  A() { i = 1; }
-  ~A() { if (i == 1) _exit(0); }
-};
-
-A a;
-
-int main()
-{
-  return 1;
-}
-
-       ]])
-     ],
-     [AC_MSG_RESULT([yes])],
-     [AC_MSG_RESULT([no])
-      AC_MSG_ERROR([a working C++ compiler is required])],
-     [:])
-
-   AC_MSG_CHECKING([that header files support C++])
-   AC_LINK_IFELSE([
-       AC_LANG_PROGRAM([[
-
-#include <stdio.h>
-
-       ]],
-       [[
-
-fopen(0, 0);
-
-       ]])
-     ],
-     [AC_MSG_RESULT([yes])],
-     [AC_MSG_RESULT([no])
-      AC_MSG_ERROR([header files do not support C++
-                  (if you are using a version of gcc/g++ earlier than 2.5,
-                  you should install libg++)])])
-   AC_LANG_POP([C++])])
-
-
 AC_DEFUN([GROFF_TMAC],
   [AC_MSG_CHECKING([file name prefix of system macro packages])
    sys_tmac_prefix=

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to