]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2873: undefined symbol rint
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 10 Mar 2010 07:59:21 +0000 (20:59 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 10 Mar 2010 07:59:21 +0000 (20:59 +1300)
Detect math library properly based on rint synbol we need.
On Solaris at least "main" symbol does not exist.

configure.in
src/Common.am

index 83b6ebfce3733b9ed32be9817d7287690f932236..82f0ff9a0f0cacfa5855e71b9a30b71b7d3341ba 100644 (file)
@@ -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])
index 15c60bb7e6afd42fa0013c98c49d22907c0e3b05..f7bdff495a749ddb43986d0cf557e9c14ad50877 100644 (file)
@@ -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)