Code

Link collectd-tg with -lpthread if available
authorLandry Breuil <landry@rhaalovely.net>
Mon, 27 Oct 2014 08:36:28 +0000 (09:36 +0100)
committerLandry Breuil <landry@rhaalovely.net>
Mon, 27 Oct 2014 08:36:28 +0000 (09:36 +0100)
otherwise linking fails with undefined refs to pthread_mutex_* functions

src/Makefile.am

index 5c6adfe737a17d20163435ee39210bb8a3ef5e9d..faec7b088895313fb74c05adeb69d32930294768 100644 (file)
@@ -68,6 +68,9 @@ endif
 if BUILD_AIX
 collectd_tg_LDADD += -lm
 endif
+if BUILD_WITH_LIBPTHREAD
+collectd_tg_LDADD += -lpthread
+endif
 collectd_tg_LDADD += libcollectdclient/libcollectdclient.la
 collectd_tg_DEPENDENCIES = libcollectdclient/libcollectdclient.la