From: Sebastian Harl Date: Sat, 17 Nov 2007 19:49:19 +0000 (+0100) Subject: src/Makefile.am: Add installation directory defines to AM_CPPFLAGS. X-Git-Tag: collectd-4.3.0beta0~89 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=149eea1300930abaef37ff9ccb988d952f66125b;p=collectd.git src/Makefile.am: Add installation directory defines to AM_CPPFLAGS. Those definitions used to be available when compiling collectd itself only. However, they should be available to the plugins as well - else, different paths would be used within different parts of collectd. Signed-off-by: Sebastian Harl Signed-off-by: Florian Forster --- diff --git a/src/Makefile.am b/src/Makefile.am index b7f343fa..06f45dca 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,6 +10,15 @@ if COMPILER_IS_GCC AM_CFLAGS = -Wall -Werror endif +AM_CPPFLAGS = -DPREFIX='"${prefix}"' +AM_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"' +AM_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"' +AM_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"' +if BUILD_FEATURE_DAEMON +AM_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"' +endif +AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"' + sbin_PROGRAMS = collectd bin_PROGRAMS = collectd-nagios @@ -25,14 +34,7 @@ collectd_SOURCES = collectd.c collectd.h \ utils_threshold.c utils_threshold.h \ types_list.c types_list.h collectd_CPPFLAGS = $(LTDLINCL) -collectd_CPPFLAGS += -DPREFIX='"${prefix}"' -collectd_CPPFLAGS += -DCONFIGFILE='"${sysconfdir}/${PACKAGE_NAME}.conf"' -collectd_CPPFLAGS += -DLOCALSTATEDIR='"${localstatedir}"' -collectd_CPPFLAGS += -DPKGLOCALSTATEDIR='"${localstatedir}/lib/${PACKAGE_NAME}"' -if BUILD_FEATURE_DAEMON -collectd_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"' -endif -collectd_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"' +collectd_CPPFLAGS += $(AM_CPPFLAGS) # Link to these libraries.. collectd_LDFLAGS = -export-dynamic @@ -574,7 +576,6 @@ endif if BUILD_PLUGIN_UNIXSOCK pkglib_LTLIBRARIES += unixsock.la unixsock_la_SOURCES = unixsock.c utils_cmd_putval.h utils_cmd_putval.c -unixsock_la_CPPFLAGS = -DLOCALSTATEDIR='"${localstatedir}"' unixsock_la_LDFLAGS = -module -avoid-version -lpthread collectd_LDADD += "-dlopen" unixsock.la collectd_DEPENDENCIES += unixsock.la