]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Trivial change to support GCC's configuration procedure.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 23 Sep 2003 23:05:08 +0000 (23:05 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 23 Sep 2003 23:05:08 +0000 (23:05 +0000)
ChangeLog
doc/autoconf.texi
lib/autoconf/c.m4
lib/autoconf/headers.m4

index 39f989705681388b93ea36fcc09ecb6c8b013c7b..dd63f223e92636b31d0b3f302412aa57f0a0d0d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2003-09-23  Paul Eggert  <eggert@twinsun.com>
+
+       * doc/autoconf.texi (Limitations of Builtins): Document test -h
+       versus test -L issues.
+
+2003-09-23  Daniel Jacobowitz  <drow@mvista.com> and
+           Paul Eggert <eggert@twinsun.com>
+
+       Trivial change to support GCC's configuration procedure.
+        * 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.
+       
 2003-09-13  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * Makefile.am (autom4te-update, autom4te_files): Fetch Struct.pm
index 4f0e26f2d924fb8e1341507a96f439574a2137a5..4d2ce3afed1021195b018d169d0459cdf6327842 100644 (file)
@@ -5302,6 +5302,17 @@ Some preprocessors don't indicate missing include files by the error
 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.
+@end defmac
+
+@defmac AC_PROG_CPP_WERROR
+@acindex{PROG_CPP_WERROR}
+@ovindex 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 may find it necessary to check
 whether some arbitrary file exists.  To do so, use @samp{test -f} or
 @samp{test -r}.  Do not use @samp{test -x}, because 4.3@acronym{BSD} 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
+@samp{test -h} rather than @samp{test -L}; either form conforms to
+@acronym{POSIX} 1003.1-2001, but older shells like Solaris 8
+@code{/bin/sh} support only @option{-h}.
 
 @item @command{test} (strings)
 @c ---------------------------
index da1d080f58b5f894e1538d6db656a5d4301452e0..9d80b994ded855dcfb79d6a7367130fc9c21332c 100644 (file)
@@ -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 d44e7c15be3a0e3b9297e537eba91571b3cf6bac..9609ad158200f4f9e9cfa1f2d9ffb15767373731 100644 (file)
@@ -121,13 +121,13 @@ AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <$1>])],
 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])