[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_CHECK_LIB(m, main, LIBM="-lm") broken with C++
From: |
Bob Friesenhahn |
Subject: |
AC_CHECK_LIB(m, main, LIBM="-lm") broken with C++ |
Date: |
Wed, 5 Feb 2003 15:00:39 -0600 (CST) |
I posted a detailed message to address@hidden and
address@hidden 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
address@hidden
http://www.simplesystems.org/users/bfriesen
- AC_CHECK_LIB(m, main, LIBM="-lm") broken with C++,
Bob Friesenhahn <=