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 5c6adfe..faec7b0 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