Re: checking for sin in -lm fails
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.
Re: checking for sin in -lm fails
Tim Blechmann <[EMAIL PROTECTED]> writes: > my configure.in file contains: > AC_CHECK_LIB(m,sin) Could you please send a complete, self-contained test case, and mention which version of Autoconf (and other software) you're using?
checking for sin in -lm fails
hi all, there is a bug in autoconf concerning the symbol checking in libraries: my configure.in file contains: AC_CHECK_LIB(m,sin) 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 conftest.c:23: warning: conflicting types for built-in function 'sin' /usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x1c): In function `__libc_csu_init ': : undefined reference to `__init_array_end' /usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x22): In function `__libc_csu_init ': : undefined reference to `__init_array_start' /usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x68): In function `__libc_csu_fini ': : undefined reference to `__fini_array_end' /usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x6e): In function `__libc_csu_fini ': : undefined reference to `__fini_array_start' /usr/bin/ld: conftest: hidden symbol `__fini_array_end' isn't defined /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status configure:4997: $? = 1 am i missing something, or is it a problem of autoconf? thanks ... tim -- mailto:[EMAIL PROTECTED]ICQ: 96771783 http://www.mokabar.tk latest mp3: kMW.mp3 http://mattin.org/mp3.html latest cd: Goh Lee Kwang & Tim Blechmann: Drone http://www.geocities.com/gohleekwangtimblechmannduo/ After one look at this planet any visitor from outer space would say "I want to see the manager." William S. Burroughs