This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch for gcc/configure.in, needed in egcs 1.1.2



gcc/configure.in has a problem with the check for <inttypes.h> in egcs 
1.1.* (this is fixed in the mainstream but I couldn't find a ChangeLog 
entry).  

The problem is that if you have <inttypes.h> and rerun configure; the
second time HAVE_INTTYPES_H is not defined since the cached value is
not considered.

Andreas

1999-02-24  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* configure.in (gcc_cv_c_have_stringify): Use test from mainstream 
	which works with cached value.


--- gcc/configure.in.~1~	Wed Feb 17 08:50:48 1999
+++ gcc/configure.in	Wed Feb 24 17:35:10 1999
@@ -196,15 +196,18 @@
 # Use <inttypes.h> only if it exists,
 # doesn't clash with <sys/types.h>, and declares intmax_t.
 AC_MSG_CHECKING(for inttypes.h)
+AC_MSG_CHECKING(for inttypes.h)
 AC_CACHE_VAL(gcc_cv_header_inttypes_h,
 [AC_TRY_COMPILE(
   [#include <sys/types.h>
 #include <inttypes.h>],
   [intmax_t i = -1;],
-  [AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H)
-   gcc_cv_header_inttypes_h=yes],
+  [gcc_cv_header_inttypes_h=yes],
   gcc_cv_header_inttypes_h=no)])
 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
+if test $gcc_cv_header_inttypes_h = yes; then
+  AC_DEFINE(HAVE_INTTYPES_H)
+fi
 
 AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \
 	index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \

-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]