From: Amos Jeffries Date: Wed, 10 Mar 2010 07:59:21 +0000 (+1300) Subject: Bug 2873: undefined symbol rint X-Git-Tag: SQUID_3_2_0_1~374 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9a80d0e7e516cddb7a330c23a8e02c5b19cfaa7b;p=thirdparty%2Fsquid.git Bug 2873: undefined symbol rint Detect math library properly based on rint synbol we need. On Solaris at least "main" symbol does not exist. --- diff --git a/configure.in b/configure.in index 83b6ebfce3..82f0ff9a0f 100644 --- a/configure.in +++ b/configure.in @@ -2973,14 +2973,22 @@ 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_CHECK_LIB(m, main) + AC_SEARCH_LIBS([rint],[m],[ + case "$ac_cv_search_rint" in + no*) + ;; + *) + MATHLIB="$ac_cv_search_rint" + esac ]) ;; 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 15c60bb7e6..f7bdff495a 100644 --- a/src/Common.am +++ b/src/Common.am @@ -29,6 +29,8 @@ INCLUDES += $(KRB5INCS) $(OBJS): $(top_srcdir)/include/version.h $(top_builddir)/include/autoconf.h ## Because compatibility is almost universal. And the link order is important. +## NP: libmisc util.cc depends on rint from math library COMPAT_LIB = \ -L$(top_builddir)/lib -lmiscutil \ - $(top_builddir)/compat/libcompat.la + $(top_builddir)/compat/libcompat.la \ + $(MATHLIB)