On 25 May 2001, Hrvoje Niksic wrote:

> > Would it be possible to add a default to AC_TRY_RUN or place it under
> > AC_CACHE_VAL so that cross-compiling works?
> 
> I have no idea what AC_CACHE_VAL is.  I know that AC_TRY_RUN can be
> given a parameter that tells it what to do when cross-compiling.  I've
> never cross-compiled an Autoconf-based program, so I don't know what
> should go there.

 See autoconf macros -- it's used by most of them for caching variables
across configure runs.  It also enables overriding variables.  For
example, an AC_CHECK_SIZEOF(long) test fails when cross-compiling.  If
configure is invoked as `ac_cv_sizeof_long=4 ./configure', the test does
not fail anymore as it sees the variable it uses preset.  It's actually a
better solution than using AC_CHECK_SIZEOF(long, 4) as there are hosts
that have a different size of the long type (e.g. Alpha, where it's 8).

> BTW, are you really cross-compiling Wget, or are you complaining out
> of principle?

 Working on th MIPS/Linux port I'm cross-compiling many programs either
because tools or libraries are missing on my host or because of speed.  I
can't quote exact numbers at the moment as I don't have logs available,
but building wget on my i386-linux host lasts for a minute, or so, while
on my mipsel-linux host it takes ten minutes or so (for a comparison: a
gcc 2.95.3 bootstrap takes about 15 hours to complete -- an R3k @ 40MHz is
not necessarily a speed demon).

> > The function called in AC_TRY_RUN doesn't do anything catchable by
> > the configure script at all -- it does never fail.
> 
> The function doesn't fail, but the program can and does fail when
> either libcrypto or libssl are not resolved by the runtime linker.

 Ah yes, I understand.  Due to SSL shared libs being placed in weird
places, they cannot always be located by the dynamic linker.  So you need
to add an RPATH entry to the ELF dynamic section of wget executable.

 OK, then -- I'll cook a patch to make use of AC_CACHE_VAL.  Note that
adding RPATH for a cross-compiled program would usually be bogus anyway,
as the convention is to place cross-compilation libraries in ${tooldir},
which is /usr/${host_alias}/lib, normally. 

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [EMAIL PROTECTED], PGP key available        +

Reply via email to