From 1e648d412b43d95f5fa85ac08f094067d7984afd Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 5 Sep 2012 08:43:18 +0200 Subject: [PATCH] src/Makefile.am: Unconditionally link collectd with libm. Under FreeBSD, running src/utils_format_json.c fails because isfinite() cannot be resolved. The GNU manpages for isnan() and isfinite() also advise users to link with libm and AIX has had the library being linked in for a while. Since it's such a basic library it seems easier to just link with it unconditionally. Fixes Github issue #122. --- src/Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index fd85107f..29aac6a9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -46,7 +46,7 @@ collectd_SOURCES = collectd.c collectd.h \ collectd_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL) collectd_CFLAGS = $(AM_CFLAGS) collectd_LDFLAGS = -export-dynamic -collectd_LDADD = +collectd_LDADD = -lm collectd_DEPENDENCIES = # Link to these libraries.. @@ -73,7 +73,6 @@ collectd_LDADD += -ldevinfo endif if BUILD_AIX collectd_LDFLAGS += -Wl,-bexpall,-brtllib -collectd_LDADD += -lm endif # The daemon needs to call sg_init, so we need to link it against libstatgrab, -- 2.11.0