Hello,

    I have a somewhat unusal C compiler and version
of unix that is giving me problems with a configure
script (using Autoconf 2.13).

The result is that configure incorrectly decides that
the <limits.h> header doesn't exist.

There are two related reasons for this problem:
  a) The C compiler likes to print a copyright message on 
       stderr every time that it is executed.  It looks
       something like (qwe.c is an empty file):

           dan@mesaweb:~/t/newac $ cc -E qwe.c
           NCR High Performance C Compiler R3.0c 
           (c) Copyright 1994-97, NCR Corporation
           (c) Copyright 1987-97, MetaWare Incorporated

           #pragma warning_level 3

       The problem with this is that the configure script
       generated by autoconf thinks that this means that
       using 'cc -E' isn't a good way to get at the C preprocessor,
       So configure defaults to using /lib/cpp instead.

  b) The second reason is that /lib/cpp chokes on a preprocessor
       construct in <limits.h> that 'cc -E' will accept.

       That construct is:

           #if #machine(i386)


Getting GCC to compile on this platform is not something that I
have succeeded at yet, so switching to it really isn't an option
at this point.

Now, for what it's worth, there are ways to suppress this copyright
message, but this version of UNIX ships with the message enabled by
default.  And it's somewhat of a hassle to figure out where to tweak
the system to globally disable this message.




I'm not sure how you would like to deal with this (since submitting
patches isn't something that I've done before), but the attached
patch fixes the problem on my system.

Thanks.

        - Dan ([EMAIL PROTECTED] - Daniel Carroll - Mesa State College)

*** autoconf-2.13-orig/acgeneral.m4     Tue Jan  5 06:27:37 1999
--- autoconf-2.13/acgeneral.m4  Fri Apr 20 12:15:59 2001
***************
*** 1669,1675 ****
  dnl with ` +' to stderr in eval and subshells.
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  AC_TRY_EVAL(ac_try)
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    ifelse([$2], , :, [rm -rf conftest*
    $2])
--- 1669,1675 ----
  dnl with ` +' to stderr in eval and subshells.
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  AC_TRY_EVAL(ac_try)
! ac_err=`grep -v '^ *+' conftest.out | grep -v 'NCR High Performance C Compiler' | 
grep -v '^(c) Copyright' | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    ifelse([$2], , :, [rm -rf conftest*
    $2])

Reply via email to