guile-devel
[Top][All Lists]
Advanced

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

Re: autconf stdint types checking in guile-core


From: Thamer Al-Harbash
Subject: Re: autconf stdint types checking in guile-core
Date: Wed, 16 Apr 2003 03:28:21 -0400 (EDT)

On Wed, 16 Apr 2003, Rob Browning wrote:

> Actually, this may be hard to get right.  I haven't yet figured out a
> way to get the value of CHAR_BIT either at configure time, or from the
> C compiler at gen-scmconfig time in the cross-compilation case...

Is AC_TRY_RUN at configure time bad for cross compilation? I'm
assuming it is. Otherwise, AC_TRY_RUN a program that includes
limits.h, outputs the number of bits to a temporary file, read it
in and then make sure to put that temporary file in CLEANFILES in
the Makefile.am If CHAR_BITS is not defined put -1 in the file
meaning undefined.

The only other way is to use the preprocessor. I'm fairly certain
using -dM won't be portable everywhere though :|

char_bits=echo "#include <limits.h>" | cpp -dM | awk '/#define.*CHAR_BIT/ { 
pintf("%s", $3);}'

Using the preprocessor is more friendly to cross compilation
since we'd be, technically, be preprocessing the target hosts
header files.

-- 
Thamer Al-Harbash            http://www.whitefang.com/
        (if (> pressure too-much-pressure)
                'flame 'work)




reply via email to

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