From: Florian Forster Date: Wed, 5 Sep 2012 06:43:18 +0000 (+0200) Subject: src/Makefile.am: Unconditionally link collectd with libm. X-Git-Tag: collectd-5.0.5~7^2~3 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=1e648d412b43d95f5fa85ac08f094067d7984afd;hp=ee992f505a64e4da5637988c33783ef9a350ed29;p=collectd.git 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. --- 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,