Change-Id: Ieb8467d3c1d0fac819864ff873594432170289d3
if BUILD_PLUGIN_WRITE_MONGODB
pkglib_LTLIBRARIES += write_mongodb.la
write_mongodb_la_SOURCES = write_mongodb.c
-write_mongodb_la_LDFLAGS = -module -avoid-version
+write_mongodb_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMONGOC_CPPFLAGS)
+write_mongodb_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBMONGOC_LDFLAGS)
write_mongodb_la_LIBADD = -lmongoc
collectd_LDADD += "-dlopen" write_mongodb.la
collectd_DEPENDENCIES += write_mongodb.la