How about this patch? The math library is not actually used by anything but the test suite in Libtool, so as long as the C standard and common practice put "cos" in -lm it's all good.
ChangeLog entry: 2003-02-05 Robert Boehne <[EMAIL PROTECTED]> * libtool.m4 (AC_CHECK_LIBM): Search for a real symbol in the math library rather than 'main', it causes problems for C++ compilers with certain Auto* tools. (AC_LIBLTDL_INSTALLABLE): ditto. Index: libtool.m4 =================================================================== RCS file: /cvsroot/libtool/libtool/libtool.m4,v retrieving revision 1.297 diff -u -r1.297 libtool.m4 --- libtool.m4 5 Feb 2003 07:03:55 -0000 1.297 +++ libtool.m4 6 Feb 2003 02:50:39 -0000 @@ -2246,10 +2246,10 @@ ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) - AC_CHECK_LIB(m, main, LIBM="-lm") + AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM @@ -2294,7 +2294,7 @@ # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, + AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) Albert Chin wrote: > > On Wed, Feb 05, 2003 at 03:00:39PM -0600, Bob Friesenhahn wrote: > > I posted a detailed message to [EMAIL PROTECTED] and > > [EMAIL PROTECTED] 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 > > Gross! > > > What is the best path forward? > > Replace main with a *real* function in one of the libraries. > > -- > albert chin ([EMAIL PROTECTED]) > > _______________________________________________ > Libtool mailing list > [EMAIL PROTECTED] > http://mail.gnu.org/mailman/listinfo/libtool _______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/libtool