autoconf
[Top][All Lists]
Advanced

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

Re: AC_PROG_CPP not quite usable for cross-compiling


From: Momchil Velikov
Subject: Re: AC_PROG_CPP not quite usable for cross-compiling
Date: 12 Nov 2002 22:10:28 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>>>>> "Paul" == Paul Eggert <address@hidden> writes:

    >> From: Momchil Velikov <address@hidden> Date: 12 Nov 2002
    >> 16:34:27 +0200
    >> 
    >> AC_PROG_CPP and maybe others depend upon the existance of the
    >> header <assert.h>.
    >> 
    >> This renders it unusable for certain environments, where there
    >> are NO host headers, e.g. a fresh GNU libc port.

    Paul> What headers are available?  Do you have <limits.h>, say?
    Paul> Even a freestanding C compiler is supposed to have
    Paul> <limits.h>, <stdarg.h>, and <stddef.h>.

Here's the patch I used for a NetBSD port of glibc.  

    Paul> I suppose we could change the check to look for <limits.h>
    Paul> if __STDC__ is defined, and for <assert.h> otherwise.  Could
    Paul> you write up a little patch to do that, and see whether it
    Paul> works in your environment.

I use GCC, it would have worked ;)

~velco
Index: lib/autoconf/c.m4
===================================================================
--- lib/autoconf/c.m4   (revision 3)
+++ lib/autoconf/c.m4   (working copy)
@@ -314,7 +314,7 @@
   # with a fresh cross-compiler works.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
-  _AC_PREPROC_IFELSE([AC_LANG_SOURCE(address@hidden:@include <assert.h>
+  _AC_PREPROC_IFELSE([AC_LANG_SOURCE(address@hidden:@include <limits.h>
                      Syntax error]])],
                      [],
                      [# Broken: fails on valid input.

reply via email to

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