From a8e73e8e617942cf2c25a6301415488c74b5662d Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sat, 21 May 2011 20:09:44 +0200 Subject: [PATCH] Only link with -lm if needed Some systems don't have libm. --- Makefile.in | 2 +- configure.ac | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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], -- 2.47.2