]> Savannah Git Hosting - gnulib.git/commitdiff
no-c++: Avoid "egrep: repetition-operator operand invalid" error.
authorSam Steingold <sds@gnu.org>
Tue, 5 Dec 2017 16:02:33 +0000 (11:02 -0500)
committerBruno Haible <bruno@clisp.org>
Wed, 6 Dec 2017 01:04:10 +0000 (02:04 +0100)
* m4/no-c++.m4 (gt_NO_CXX): Don't use '+' characters nor spaces in the
AC_EGREP_CPP pattern.

ChangeLog
m4/no-c++.m4

index 6d4b1ba8258bc20605d921baf8613d5b617124ce..3a7ddc1cb2a243beeb3c96ec9c66b169884e81e0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-12-05  Sam Steingold  <sds@gnu.org>
+            Bruno Haible  <bruno@clisp.org>
+
+       no-c++: Avoid "egrep: repetition-operator operand invalid" error.
+       * m4/no-c++.m4 (gt_NO_CXX): Don't use '+' characters nor spaces in the
+       AC_EGREP_CPP pattern.
+
 2017-12-03  Bruno Haible  <bruno@clisp.org>
 
        all: Replace more http URLs by https URLs.
index ed06b22b611a897370ca651d98a29363ea2c2529..cf63f6d3c6aa5ac8d0a279bc20966f99bc380064 100644 (file)
@@ -1,4 +1,4 @@
-# no-c++.m4 serial 1
+# no-c++.m4 serial 2
 dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -7,14 +7,14 @@ dnl with or without modifications, as long as this notice is preserved.
 # Support for C source files that cannot be compiled by a C++ compiler.
 # Set NO_CXX to the C++ compiler flags needed to request C mode instead of
 # C++ mode.
-# So far only g++ is supported.
+# So far only g++ is supported. This includes clang++, as it is g++ compatible.
 
 AC_DEFUN([gt_NO_CXX],
 [
   NO_CXX=
-  AC_EGREP_CPP([Is g++], [
+  AC_EGREP_CPP([Is_g_plus_plus], [
 #if defined __GNUC__ && defined __cplusplus
-  Is g++
+  Is_g_plus_plus
 #endif
     ],
     [NO_CXX="-x c"])