logo       

AC_CHECK_LIB(m, main, LIBM="-lm") broken with C++: msg#00055

gnu.libtool.general

Subject: AC_CHECK_LIB(m, main, LIBM="-lm") broken with C++

I posted a detailed message to bugs-libtool@xxxxxxx and
bugs-autoconf@xxxxxxx but there has been no response at all so I will
post again.

CVS libtool.m4 contains lines like

AC_CHECK_LIB(m, main, LIBM="-lm")

and

AC_CHECK_LIB(ltdl, main, ... blah

Unfortunately, these result in Autoconf generating a test program
which contains a recursive call to main(). Some of these tests are
done while configuring the CXX tag with CC set to the C++ compiler.
While g++ and C compilers accept this, it has been discovered that
several commercial C++ compilers reject the code so the test fails.

The solution seems to be to either fix autoconf so that it emmits a
different test program for the special case where 'main' is tested for
(which is in fact a valid test!), or to fix libtool.m4 so that it
requests a known symbol from the library being tested.

What is the best path forward?

Bob
======================================
Bob Friesenhahn
bfriesen@xxxxxxxxxxxxxxxxxxx
http://www.simplesystems.org/users/bfriesen






<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise