From bf491b87447a3146fe1c2481470ef6f7eaad393b Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Tue, 22 Jul 2014 11:10:12 +0200 Subject: [PATCH] Fix out of tree builds When building out of tree, we need to look for headers in the source dir. This fixes out of tree builds and make distcheck. This will resolve in some duplicate and unused include paths, I'll clean those up in followup patches. --- configure.ac | 3 +++ pdns/Makefile.am | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3f21823e3f..f726e5f29e 100644 --- a/configure.ac +++ b/configure.ac @@ -329,6 +329,9 @@ done AC_SUBST(LIBS) +AC_SUBST([AM_CPPFLAGS], ['-I$(top_builddir) -I$(top_srcdir)']) +AC_SUBST([AM_CXXFLAGS], ['-I$(top_builddir) -I$(top_srcdir)']) + export moduledirs moduleobjects modulelibs AC_CONFIG_FILES([ diff --git a/pdns/Makefile.am b/pdns/Makefile.am index 0638338f05..63faf95cc0 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -1,4 +1,4 @@ -AM_CXXFLAGS=-DSYSCONFDIR=\"@sysconfdir@\" -DPKGLIBDIR=\"$(pkglibdir)\" -DLOCALSTATEDIR=\"@socketdir@\" @THREADFLAGS@ $(LUA_CFLAGS) $(SQLITE3_CFLAGS) $(POLARSSL_CFLAGS) -Iext/rapidjson/include -Iext/yahttp +AM_CXXFLAGS += -DSYSCONFDIR=\"@sysconfdir@\" -DPKGLIBDIR=\"$(pkglibdir)\" -DLOCALSTATEDIR=\"@socketdir@\" @THREADFLAGS@ $(LUA_CFLAGS) $(SQLITE3_CFLAGS) $(POLARSSL_CFLAGS) -I$(top_srcdir)/pdns/ext/rapidjson/include -I$(top_srcdir)/pdns/ext/yahttp YAHTTP_LIBS = -Lext/yahttp/yahttp -lyahttp -- 2.47.2