From f14a57f5b7f05105f49a38e3c48f68846d8bf28c Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Thu, 22 Sep 2011 14:27:29 -0700 Subject: [PATCH] Linux specifuc fix for -lm --- libhashkit/include.am | 8 +++++--- libmemcached/include.am | 5 ++++- m4/pandora_platform.m4 | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/libhashkit/include.am b/libhashkit/include.am index 9a556e35..72fec057 100644 --- a/libhashkit/include.am +++ b/libhashkit/include.am @@ -59,9 +59,11 @@ libhashkit_libhashkit_la_CFLAGS= -DBUILDING_HASHKIT libhashkit_libhashkit_la_CXXFLAGS= -DBUILDING_HASHKIT -libhashkit_libhashkit_la_LDFLAGS= \ - $(LIBM) \ - -version-info $(HASHKIT_LIBRARY_VERSION) +libhashkit_libhashkit_la_LIBADD= +libhashkit_libhashkit_la_LDFLAGS= -version-info $(HASHKIT_LIBRARY_VERSION) +if TARGET_LINUX +libhashkit_libhashkit_la_LIBADD+= -lm +endif # library used for testing noinst_LTLIBRARIES+= libhashkit/libhashkitinc.la diff --git a/libmemcached/include.am b/libmemcached/include.am index 5e8b32ae..c29da787 100644 --- a/libmemcached/include.am +++ b/libmemcached/include.am @@ -135,7 +135,10 @@ libmemcached/options.cc: libmemcached/csl/parser.h libmemcached_libmemcached_la_DEPENDENCIES= -libmemcached_libmemcached_la_LIBADD= $(LIBM) +libmemcached_libmemcached_la_LIBADD= +if TARGET_LINUX +libmemcached_libmemcached_la_LIBADD+= -lm +endif libmemcached_libmemcached_la_LDFLAGS+= -version-info ${MEMCACHED_LIBRARY_VERSION} libmemcached_libmemcached_la_LIBADD+= $(LTLIBSASL) $(LTLIBSASL2) diff --git a/m4/pandora_platform.m4 b/m4/pandora_platform.m4 index 0d2f103b..c8e31197 100644 --- a/m4/pandora_platform.m4 +++ b/m4/pandora_platform.m4 @@ -50,6 +50,7 @@ AC_DEFUN([PANDORA_PLATFORM],[ TARGET_LINUX="true" AC_SUBST(TARGET_LINUX) AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux]) + AM_CONDITIONAL(TARGET_LINUX, [test "x${TARGET_LINUX}" = "xtrue"]) ;; *darwin*) TARGET_OSX="true" -- 2.30.2