From 836cbe2d13889c5fcf453767ae365da033fee11d Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Fri, 6 Nov 2009 13:40:13 -0800 Subject: [PATCH] core: link against libm for pow() Link against libm (using the LT_LIB_M macro and the $LIBM variable) as we are using pow() and otherwise fail to build with stricter linkers like binutils-gold. --- configure.ac | 5 +++++ src/Makefile.am | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 877cf54efc..a0d96ea5a2 100644 --- a/configure.ac +++ b/configure.ac @@ -177,6 +177,11 @@ if test "$ac_have_iwevgenie" = no; then AC_MSG_ERROR(wireless-tools library and development headers >= 28pre9 not installed or not functional) fi +dnl +dnl Checks for libm - needed for pow() +dnl +LT_LIB_M + PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.1 dbus-glib-1 >= 0.75) AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) diff --git a/src/Makefile.am b/src/Makefile.am index fb337a6bb4..a14e1d0beb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -197,7 +197,8 @@ NetworkManager_LDADD = \ $(GLIB_LIBS) \ $(GUDEV_LIBS) \ $(LIBNL_LIBS) \ - $(GMODULE_LIBS) + $(GMODULE_LIBS) \ + $(LIBM) NetworkManager_LDFLAGS = -rdynamic