From: Florian Forster Date: Tue, 9 Jan 2024 20:17:20 +0000 (+0100) Subject: cpu plugin: Link the unit test with libstatgrab, if so configured. X-Git-Tag: 6.0.0-rc0~5^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d377abb76441114a3c6721a7fe0cc9214fcb6b3;p=thirdparty%2Fcollectd.git cpu plugin: Link the unit test with libstatgrab, if so configured. --- diff --git a/Makefile.am b/Makefile.am index 685268af3..eb4b60318 100644 --- a/Makefile.am +++ b/Makefile.am @@ -939,7 +939,12 @@ endif check_PROGRAMS += test_plugin_cpu test_plugin_cpu_SOURCES = src/cpu_test.c +test_plugin_cpu_CFLAGS = $(AM_CFLAGS) test_plugin_cpu_LDADD = libplugin_mock.la +if BUILD_WITH_LIBSTATGRAB +test_plugin_cpu_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS) +test_plugin_cpu_LDADD += $(BUILD_WITH_LIBSTATGRAB_LDFLAGS) +endif endif if BUILD_PLUGIN_CPUFREQ