From: Amos Jeffries Date: Mon, 15 Mar 2010 11:09:55 +0000 (+1300) Subject: Better fix for math library. X-Git-Tag: SQUID_3_2_0_1~365 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c753b5e61e9ef6abd0113014c966b77dafa857c7;p=thirdparty%2Fsquid.git Better fix for math library. This one leaves the library include in LIBS for general use. Also, the C code where rint() symbol is used is more limited than C++ so we must specify the code language where it will be used correctly. TODO: have yet to determine if we can drop the host_os windows detection when using AC_SEARCH_LIBS --- diff --git a/configure.in b/configure.in index 82f0ff9a0f..c3fdc0ffc1 100644 --- a/configure.in +++ b/configure.in @@ -2973,22 +2973,17 @@ dnl end rip fi AC_CHECK_LIB(regex, main, [REGEXLIB="-lregex"]) -MATHLIB="" case "$host_os" in mingw|mingw32) AC_MSG_NOTICE([Use MSVCRT for math functions.]) ;; *) - AC_SEARCH_LIBS([rint],[m],[ - case "$ac_cv_search_rint" in - no*) - ;; - *) - MATHLIB="$ac_cv_search_rint" - esac ]) + dnl rint() is only used in old C code for now. + AC_LANG_PUSH([C]) + AC_SEARCH_LIBS([rint],[m]) + AC_LANG_POP([C]) ;; esac -AC_SUBST(MATHLIB) dnl Enable IPv6 support AC_MSG_CHECKING([whether to enable IPv6]) diff --git a/src/Common.am b/src/Common.am index f7bdff495a..b7d410bb7b 100644 --- a/src/Common.am +++ b/src/Common.am @@ -32,5 +32,4 @@ $(OBJS): $(top_srcdir)/include/version.h $(top_builddir)/include/autoconf.h ## NP: libmisc util.cc depends on rint from math library COMPAT_LIB = \ -L$(top_builddir)/lib -lmiscutil \ - $(top_builddir)/compat/libcompat.la \ - $(MATHLIB) + $(top_builddir)/compat/libcompat.la