Re: Implementation of `AC_COMPUTE_INT'

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

 



Hello Ludovic,

* Ludovic Courtès wrote on Tue, Mar 18, 2008 at 09:36:58PM CET:
> 
> I've seen people reporting `configure' failures due to
> "cannot compile sizeof (char)".  Investigating the issue, it turned out
> to be that, in a native compilation environment, the executable produced
> by `AC_COMPUTE_INT' could not be run because some library specified in
> `$LIBS' was not in `$LD_LIBRARY_PATH'.
> 
> Hence my question: why not always use `AC_COMPUTE_INT_COMPILE' instead
> of `AC_COMPUTE_INT_RUN'?

But a library that will not be found by the runtime linker is a problem
for all run tests, not just AC_COMPUTE_INT.  The normal way to go about
this is to ensure that libraries are found; see for example the macros
from the gnulib module 'havelib'.

The other possibility you could go about if you need to avoid run tests
is to set $cross_compiling to yes.

> I realize the former might be slower in some
> cases, because of the binary search, but maybe not that slower with
> small integers as is the case with `AC_CHECK_SIZEOF', and probably more
> reliable.

Well, it needs up to 'sizeof(long) * CHAR_BIT' compile steps for large
values (but fewer for small ones; IIRC it was skewed towards small
values).

Cheers,
Ralf


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux