[collectd] [PATCH] Allow out-of-tree builds

Dan Fandrich dan at coneharvesters.com
Sat Feb 2 01:26:43 CET 2013


The generated header file lcc_features.h and collectd.h cause problems
otherwise.
---
 src/Makefile.am                   |    1 +
 src/libcollectdclient/Makefile.am |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index f31c176..bd00029 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,6 +16,7 @@ AM_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
 endif
 AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"'
 AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"'
+AM_CPPFLAGS += -I$(top_builddir)/src/libcollectdclient/collectd
 
 sbin_PROGRAMS = collectd collectdmon
 bin_PROGRAMS = collectd-nagios collectdctl collectd-tg
diff --git a/src/libcollectdclient/Makefile.am b/src/libcollectdclient/Makefile.am
index 9fbf0d1..1d4dff5 100644
--- a/src/libcollectdclient/Makefile.am
+++ b/src/libcollectdclient/Makefile.am
@@ -11,7 +11,7 @@ nodist_pkgconfig_DATA = libcollectdclient.pc
 BUILT_SOURCES = collectd/lcc_features.h
 
 libcollectdclient_la_SOURCES = client.c network.c network_buffer.c
-libcollectdclient_la_CPPFLAGS = $(AM_CPPFLAGS)
+libcollectdclient_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/libcollectdclient/collectd -I$(top_srcdir)/src
 libcollectdclient_la_LDFLAGS = -version-info 1:0:0
 libcollectdclient_la_LIBADD = 
 if BUILD_WITH_LIBGCRYPT
-- 
1.7.10




More information about the collectd mailing list