From: Joel Rosdahl Date: Sat, 21 May 2011 18:09:44 +0000 (+0200) Subject: Only link with -lm if needed X-Git-Tag: v3.1.5~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a8e73e8e617942cf2c25a6301415488c74b5662d;p=thirdparty%2Fccache.git Only link with -lm if needed Some systems don't have libm. --- diff --git a/Makefile.in b/Makefile.in index 0ce3cdf3b..e3f6e518b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,7 +16,7 @@ LDFLAGS = @LDFLAGS@ EXEEXT = @EXEEXT@ RANLIB = @RANLIB@ -libs = @LIBS@ -lm -lz +libs = @LIBS@ -lz base_sources = \ ccache.c mdfour.c hash.c execute.c util.c args.c stats.c version.c \ diff --git a/configure.ac b/configure.ac index ffc49f8e1..faf709060 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,9 @@ HW_FUNC_SNPRINTF HW_FUNC_VASPRINTF HW_FUNC_ASPRINTF +dnl Check if -lm is needed. +AC_SEARCH_LIBS(cos, m) + dnl Check for zlib. AC_CACHE_CHECK( [for zlib >= 1.2.3],