autoconf
[Top][All Lists]
Advanced

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

Re: Problem with AC_CHECK_FUNCS when cross compiling


From: Ralf Wildenhues
Subject: Re: Problem with AC_CHECK_FUNCS when cross compiling
Date: Tue, 28 Apr 2009 20:49:38 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Thies,

* Thies Jochimsen wrote on Mon, Apr 27, 2009 at 02:03:20PM CEST:
> 
> I have just upgraded to autoconf 2.63 (from 2.61) and I am now struggling 
> with 
> way the AC_CHECK_FUNCS behaves when cross compiling:
> In the past, I have used AC_CHECK_FUNCS to test whether certain functions are 
> available on the the target host. But with 2.63, the test in AC_CHECK_FUNCS 
> now, additionally, returns true if $cross_compiling is set to "yes" (which is 
> always true in my case) and, thus, always declares a HAVE_SOMEFUNCTION, 
> regardless whether the function is actually available.
> 
> I understand that there was a reason for adding the extra check for 
> $cross_compiling to AC_LINK_IFELSE:
> http://lists.gnu.org/archive/html/autoconf/2007-03/msg00085.html
> 
> Is there a convenient way to check for functions available on the target 
> host, 
> even when cross compiling?

I'm not sure I understand; I cannot connect your description in the
first paragraph with the mailing list reference below that.
Can you be more specific and show us an full example that produces
the wrong answer for you, or different answers between Autoconf 2.61 and
2.63, including all commands you need to get there?

A small example would be something like this; maybe you can modify this
so that it exposes the issue:

cat >configure.ac <<'END'
AC_INIT
AC_CONFIG_HEADERS([config.h])
AC_PROG_CC
AC_CHECK_FUNCS([doesnotexist])
AC_OUTPUT
END

autoconf
autoheader
./configure
grep HAVE config.h


Thanks,
Ralf




reply via email to

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