Linux specifuc fix for -lm
authorBrian Aker <brian@tangent.org>
Thu, 22 Sep 2011 21:27:29 +0000 (14:27 -0700)
committerBrian Aker <brian@tangent.org>
Thu, 22 Sep 2011 21:27:29 +0000 (14:27 -0700)
libhashkit/include.am
libmemcached/include.am
m4/pandora_platform.m4

index 9a556e3551e0d015eca359e76596a8c2e0f2398a..72fec057f5f1c0d05d51a2f0bcc597380c2dc727 100644 (file)
@@ -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
index 5e8b32ae32c05af318994513cfc747a947888aa2..c29da7878ff3778388e8a3b098d83d57c69728be 100644 (file)
@@ -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)
index 0d2f103b1b5fe4a3cce4dc300488f7587809c5be..c8e31197e9c44abc9d01acf8771b16bb7badbe08 100644 (file)
@@ -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"