autoconf
[Top][All Lists]
Advanced

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

Re: Bugs encountered updating GCC


From: Paul Eggert
Subject: Re: Bugs encountered updating GCC
Date: 23 Sep 2003 16:09:17 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Daniel Jacobowitz <address@hidden> writes:

> I need to settle on a solution to use in GCC until an updated
> autoconf is available.

Thanks.  Your change good to me, so I installed it.  I documented it a
bit differently though.  Here's what I installed; this patch also
handles an unrelated doc issue with test -L.

2003-09-23  Paul Eggert  <address@hidden>

        * doc/autoconf.texi (Limitations of Builtins): Document test -h
        versus test -L issues.

2003-09-23  Daniel Jacobowitz  <address@hidden> and
            Paul Eggert <address@hidden>

        * lib/autoconf/c.m4 (AC_PROG_CPP_WERROR): New macro.
        * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Don't warn
        about inconsistency if the preprocessor is set to give errors for
        any warning.
        * doc/autoconf.texi (C Compiler Characteristics): Document this.

Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.759
diff -p -u -r1.759 autoconf.texi
--- doc/autoconf.texi   12 Sep 2003 07:19:09 -0000      1.759
+++ doc/autoconf.texi   23 Sep 2003 23:02:03 -0000
@@ -5302,6 +5302,17 @@ Some preprocessors don't indicate missin
 status.  For such preprocessors an internal variable is set that causes
 other macros to check the standard error from the preprocessor and
 consider the test failed if any warnings have been reported.
+For most preprocessors, though, warnings do not cause include-file
+tests to fail unless @code{AC_PROG_CPP_WERROR} is also specified.
address@hidden defmac
+
address@hidden AC_PROG_CPP_WERROR
address@hidden
address@hidden CPP
+This acts like @code{AC_PROG_CPP}, except it treats warnings from the
+preprocessor as errors even if the preprocessor exit status indicates
+success.  This is useful for avoiding headers that generate mandatory
+warnings, such as deprecation notices.
 @end defmac
 
 
@@ -10209,7 +10220,10 @@ the host system.  But occasionally you m
 whether some arbitrary file exists.  To do so, use @samp{test -f} or
 @samp{test -r}.  Do not use @samp{test -x}, because address@hidden does not
 have it.  Do not use @samp{test -e} either, because Solaris 2.5 does not
-have it.
+have it.  To test for symbolic links on systems that have them, use
address@hidden -h} rather than @samp{test -L}; either form conforms to
address@hidden 1003.1-2001, but older shells like Solaris 8
address@hidden/bin/sh} support only @option{-h}.
 
 @item @command{test} (strings)
 @c ---------------------------
Index: lib/autoconf/c.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/c.m4,v
retrieving revision 1.182
diff -p -u -r1.182 c.m4
--- lib/autoconf/c.m4   3 Sep 2003 00:35:52 -0000       1.182
+++ lib/autoconf/c.m4   23 Sep 2003 23:02:04 -0000
@@ -419,6 +419,12 @@ AC_SUBST(CPP)dnl
 AC_LANG_POP(C)dnl
 ])# AC_PROG_CPP
 
+# AC_PROG_CPP_WERROR
+# ------------------
+# Treat warnings from the preprocessor as errors.
+AC_DEFUN([AC_PROG_CPP_WERROR],
+[AC_REQUIRE([AC_PROG_CPP])dnl
+ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR
 
 # AC_LANG_COMPILER(C)
 # -------------------
Index: lib/autoconf/headers.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/headers.m4,v
retrieving revision 1.34
diff -p -u -r1.34 headers.m4
--- lib/autoconf/headers.m4     22 May 2003 15:17:06 -0000      1.34
+++ lib/autoconf/headers.m4     23 Sep 2003 23:02:05 -0000
@@ -121,13 +121,13 @@ AC_PREPROC_IFELSE([AC_LANG_SOURCE(address@hidden:@i
 AC_MSG_RESULT([$ac_header_preproc])
 
 # So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
+case 
$ac_header_compiler:$ac_header_preproc:$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
 in
+  yes:no: )
     AC_MSG_WARN([$1: accepted by the compiler, rejected by the preprocessor!])
     AC_MSG_WARN([$1: proceeding with the compiler's result])
     ac_header_preproc=yes
     ;;
-  no:yes )
+  no:yes:* )
     AC_MSG_WARN([$1: present but cannot be compiled])
     AC_MSG_WARN([$1:     check for missing prerequisite headers?])
     AC_MSG_WARN([$1: see the Autoconf documentation])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]