bug-autoconf
[Top][All Lists]
Advanced

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

Re: checking for sin in -lm fails


From: Noah Misch
Subject: Re: checking for sin in -lm fails
Date: Fri, 1 Apr 2005 02:04:03 -0800
User-agent: Mutt/1.5.5.1i

On Thu, Mar 31, 2005 at 10:19:21AM +0200, Tim Blechmann wrote:
> AC_CHECK_LIB(m,sin)

Use AC_SEARCH_LIBS for `sin' and for any other function found in libc on some
systems and in an auxiliary library like libm elsewhere.

The last paragraph of the AC_CHECK_LIB documentation in CVS Autoconf makes a
comment to this effect.

> the specific part in the config.log says:
> configure:4961: checking for sin in -lm
> configure:4991: gcc -o conftest -g -O2   -L/usr/X11R6/lib conftest.c -lm
>  -Wl,-s hared -Wl,-export-dynamic -lXxf86vm -lXext -lX11  >&5

-Wl,-shared causes

> /usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x1c): In function
> `__libc_csu_init ':

all these errors.  As such, the test result is in fact correct: linking in -lm
(with your link line bearing -Wl,-shared) for `sin' will fail.

Of course, if you somehow link your application without -Wl,-shared, you just
need to change the flags configuration commands see.  In that case, consider
adding that flag later in `configure' or in your Makefile.




reply via email to

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