Re: AC_PROG_CC wrongly setting $GCC=yes while clang is used

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

 



On 09/08/2014 07:29 AM, Eric Blake wrote:
Maybe it's as simple as patching autoconf to change the message

Thanks, good idea.  I installed the attached.
>From db9a848f1042ae17ddbf85ba66a970998746a0d0 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@xxxxxxxxxxx>
Date: Mon, 8 Sep 2014 09:25:08 -0700
Subject: [PATCH] autoconf: clarify "checking" message for GNU-compatible
 compiliers

Problem reported by Bastien Chevreux in:
http://lists.gnu.org/archive/html/autoconf/2014-09/msg00022.html
and idea for fix by Eric Blake in:
http://lists.gnu.org/archive/html/autoconf/2014-09/msg00025.html
* doc/autoconf.texi (Running the Preprocessor)
(Present But Cannot Be Compiled):
Adjust examples to match current behavior.
* lib/autoconf/lang.m4 (_AC_LANG_COMPILER_GNU): Say
"checking whether the compiler supports GNU C", not
"checking whether we are using the GNU C compiler".
---
 doc/autoconf.texi    | 23 +++--------------------
 lib/autoconf/lang.m4 |  2 +-
 2 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 83e6643..ebb0a01 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -9261,7 +9261,7 @@ checking for C compiler default output file name... a.out
 checking for suffix of executables...
 checking whether we are cross compiling... no
 checking for suffix of object files... o
-checking whether we are using the GNU C compiler... yes
+checking whether the compiler supports GNU C... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to enable C11 features... -std=gnu11
 checking how to run the C preprocessor... gcc -std=gnu11 -E
@@ -25976,32 +25976,15 @@ checking for C compiler default output file name... a.out
 checking for suffix of executables...
 checking whether we are cross compiling... no
 checking for suffix of object files... o
-checking whether we are using the GNU C compiler... yes
+checking whether the compiler supports GNU C... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to enable C11 features... -std=gnu11
-checking how to run the C preprocessor... gcc -std=gnu11 -E
-checking for grep that handles long lines and -e... /usr/bin/grep
-checking for egrep... /usr/bin/grep -E
-checking for ANSI C header files... yes
 checking for sys/types.h... yes
 checking for sys/stat.h... yes
-checking for stdlib.h... yes
-checking for string.h... yes
-checking for memory.h... yes
 checking for strings.h... yes
 checking for inttypes.h... yes
 checking for stdint.h... yes
 checking for unistd.h... yes
-checking pi.h usability... no
-checking pi.h presence... yes
-configure: WARNING: pi.h: present but cannot be compiled
-configure: WARNING: pi.h:     check for missing prerequisite headers?
-configure: WARNING: pi.h: see the Autoconf documentation
-configure: WARNING: pi.h:     section "Present But Cannot Be Compiled"
-configure: WARNING: pi.h: proceeding with the compiler's result
-configure: WARNING:     ## --------------------------------------- ##
-configure: WARNING:     ## Report this to bug-example@@example.org ##
-configure: WARNING:     ## --------------------------------------- ##
 checking for pi.h... no
 @end smallexample
 
@@ -26025,7 +26008,7 @@ checking for C compiler default output file name... a.out
 checking for suffix of executables...
 checking whether we are cross compiling... no
 checking for suffix of object files... o
-checking whether we are using the GNU C compiler... yes
+checking whether the compiler supports GNU C... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to enable C11 features... -std=gnu11
 checking for number.h... yes
diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4
index 434a0e9..318f621 100644
--- a/lib/autoconf/lang.m4
+++ b/lib/autoconf/lang.m4
@@ -343,7 +343,7 @@ AC_DEFUN([AC_LANG_COMPILER_REQUIRE],
 # some Fortran compilers (e.g., SGI) might consider it's a
 # continuation line, and warn instead of reporting an error.
 m4_define([_AC_LANG_COMPILER_GNU],
-[AC_CACHE_CHECK([whether we are using the GNU _AC_LANG compiler],
+[AC_CACHE_CHECK([whether the compiler supports GNU _AC_LANG],
 		[ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu],
 [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __GNUC__
        choke me
-- 
1.9.3

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux