This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: cross-compile: patch for configure.in
- To: Jan Nieuwenhuizen <janneke at gnu dot org>
- Subject: Re: cross-compile: patch for configure.in
- From: Kalle Olavi Niemitalo <tosi at stekt dot oulu dot fi>
- Date: 28 Mar 2000 11:20:27 +0300
- Cc: guile at sourceware dot cygnus dot com
- References: <200003271125.NAA19726@appel.dyndns.org>
Jan Nieuwenhuizen <janneke@gnu.org> writes:
> Urg, this look like magic. The manual doesn't mention it,
The manual mentions everything except the names of particular
cache variables... and one can find them by looking at
config.cache.
> and I verified that you do need to specify the default:
>
> , $ac_cv_sizeof_int)
>
> if you use SITE_CONFIG, and are not cross-compiling (ie, use cc).
Really? Here are the files I tested with:
=== configure.in
AC_INIT(configure.in)
AC_CONFIG_HEADER(config.h)
AC_PROG_CC
AC_CHECK_SIZEOF(int)
AC_OUTPUT()
=== config.h.in
#undef SIZEOF_INT
=== site-init
ac_cv_sizeof_int=5
===
In the shell:
kalle@PC486:/tmp/kalle$ autoconf
configure.in:5: warning: AC_TRY_RUN called without default to allow cross compiling
kalle@PC486:/tmp/kalle$ CONFIG_SITE=/tmp/kalle/site-init ./configure
loading site script /tmp/kalle/site-init
creating cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking size of int... (cached) 5
updating cache ./config.cache
creating ./config.status
creating config.h
kalle@PC486:/tmp/kalle$ cat config.h
/* config.h. Generated automatically by configure. */
#define SIZEOF_INT 5
kalle@PC486:/tmp/kalle$
The value set in site-init was used even without the second
argument of AC_CHECK_SIZEOF. Did you get different results?