summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0a3cf36)
raw | patch | inline | side by side (parent: 0a3cf36)
author | Florian Forster <octo@collectd.org> | |
Thu, 11 Jun 2015 13:35:43 +0000 (14:35 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 11 Jun 2015 13:35:43 +0000 (14:35 +0100) |
"make check" fails on Solaris because libraries are missing:
CCLD test_common
Undefined first referenced
symbol in file
kc ./.libs/libcommon.a(common.o)
kstat_data_lookup ./.libs/libcommon.a(common.o)
kstat_lookup ./.libs/libcommon.a(common.o)
kstat_read ./.libs/libcommon.a(common.o)
getaddrinfo ./.libs/libcommon.a(common.o)
freeaddrinfo ./.libs/libcommon.a(common.o)
gai_strerror ./.libs/libcommon.a(common.o)
ld: fatal: symbol referencing errors. No output written to test_common
collect2: error: ld returned 1 exit status
CCLD test_common
Undefined first referenced
symbol in file
kc ./.libs/libcommon.a(common.o)
kstat_data_lookup ./.libs/libcommon.a(common.o)
kstat_lookup ./.libs/libcommon.a(common.o)
kstat_read ./.libs/libcommon.a(common.o)
getaddrinfo ./.libs/libcommon.a(common.o)
freeaddrinfo ./.libs/libcommon.a(common.o)
gai_strerror ./.libs/libcommon.a(common.o)
ld: fatal: symbol referencing errors. No output written to test_common
collect2: error: ld returned 1 exit status
src/daemon/Makefile.am | patch | blob | history |
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am
index 7f826e345a579888f9a4b9015a4a867b126189b8..00a8fd73a51b5c85cc4c605c3345c03a3c49b01d 100644 (file)
--- a/src/daemon/Makefile.am
+++ b/src/daemon/Makefile.am
AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"'
AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"'
+# Link to these libraries..
+COMMON_LIBS =
+if BUILD_WITH_LIBRT
+COMMON_LIBS += -lrt
+endif
+if BUILD_WITH_LIBPOSIX4
+COMMON_LIBS += -lposix4
+endif
+if BUILD_WITH_LIBSOCKET
+COMMON_LIBS += -lsocket
+endif
+if BUILD_WITH_LIBRESOLV
+COMMON_LIBS += -lresolv
+endif
+if BUILD_WITH_LIBPTHREAD
+COMMON_LIBS += -lpthread
+endif
+if BUILD_WITH_LIBKSTAT
+COMMON_LIBS += -lkstat
+endif
+if BUILD_WITH_LIBDEVINFO
+COMMON_LIBS += -ldevinfo
+endif
+
AUTOMAKE_OPTIONS = subdir-objects
sbin_PROGRAMS = collectd
collectd_CPPFLAGS = $(AM_CPPFLAGS) $(LTDLINCL)
collectd_CFLAGS = $(AM_CFLAGS)
collectd_LDFLAGS = -export-dynamic
-collectd_LDADD = libavltree.la libcommon.la libheap.la -lm
+collectd_LDADD = libavltree.la libcommon.la libheap.la -lm $(COMMON_LIBS)
collectd_DEPENDENCIES =
-# Link to these libraries..
-if BUILD_WITH_LIBRT
-collectd_LDADD += -lrt
-endif
-if BUILD_WITH_LIBPOSIX4
-collectd_LDADD += -lposix4
-endif
-if BUILD_WITH_LIBSOCKET
-collectd_LDADD += -lsocket
-endif
-if BUILD_WITH_LIBRESOLV
-collectd_LDADD += -lresolv
-endif
-if BUILD_WITH_LIBPTHREAD
-collectd_LDADD += -lpthread
-endif
-if BUILD_WITH_LIBKSTAT
-collectd_LDADD += -lkstat
-endif
-if BUILD_WITH_LIBDEVINFO
-collectd_LDADD += -ldevinfo
-endif
-if BUILD_AIX
-collectd_LDFLAGS += -Wl,-bexpall,-brtllib
-endif
-
# The daemon needs to call sg_init, so we need to link it against libstatgrab,
# too. -octo
if BUILD_WITH_LIBSTATGRAB
TESTS = test_common test_utils_avltree test_utils_heap
test_common_SOURCES = common_test.c ../testing.h
-test_common_LDADD = libcommon.la libplugin_mock.la
+test_common_LDADD = libcommon.la libplugin_mock.la $(COMMON_LIBS)
test_utils_avltree_SOURCES = utils_avltree_test.c ../testing.h
-test_utils_avltree_LDADD = libavltree.la
+test_utils_avltree_LDADD = libavltree.la $(COMMON_LIBS)
test_utils_heap_SOURCES = utils_heap_test.c ../testing.h
-test_utils_heap_LDADD = libheap.la
+test_utils_heap_LDADD = libheap.la $(COMMON_LIBS)