From 4649d67bfa3157dc4af97ff39a3fd9c8cdc84ac5 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 11 Mar 2016 11:57:05 +0100 Subject: [PATCH] Dnsdist: Fix build failure on FreeBSD YaHTTP needs Boost headers, and those are in /usr/local/include on FreeBSD. Append BOOST_CPPFLAGS to AM_CPPFLAGS in configure.ac, so every Makefile uses them. Also set the compiler flags globally, so that we compile yahttp with the same settings. Fixes "/reqresp.hpp:7:10: fatal error: 'boost/function.hpp' file not found" --- pdns/dnsdistdist/Makefile.am | 2 +- pdns/dnsdistdist/configure.ac | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/Makefile.am b/pdns/dnsdistdist/Makefile.am index 5ba6f6ccd3..29ad0ae952 100644 --- a/pdns/dnsdistdist/Makefile.am +++ b/pdns/dnsdistdist/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = $(LUA_CFLAGS) $(LIBEDIT_CFLAGS) $(YAHTTP_CFLAGS) $(BOOST_CPPFLAGS) $(SANITIZER_FLAGS) -O3 -Wall -pthread -DSYSCONFDIR=\"${sysconfdir}\" +AM_CPPFLAGS += $(LUA_CFLAGS) $(LIBEDIT_CFLAGS) $(YAHTTP_CFLAGS) $(SANITIZER_FLAGS) -DSYSCONFDIR=\"${sysconfdir}\" ACLOCAL_AMFLAGS = -I m4 diff --git a/pdns/dnsdistdist/configure.ac b/pdns/dnsdistdist/configure.ac index e0c6e0aa0e..9ac87555c3 100644 --- a/pdns/dnsdistdist/configure.ac +++ b/pdns/dnsdistdist/configure.ac @@ -58,6 +58,10 @@ AS_IF([test "x$static" != "xyes"], [ ]) AC_SUBST([PROGRAM_LDFLAGS]) +AC_SUBST([AM_CPPFLAGS], + ["AS_ESCAPE([-I$(top_builddir) -I$(top_srcdir)]) -Wall -O3 -pthread $BOOST_CPPFLAGS"] +) + AC_CONFIG_FILES([Makefile ext/yahttp/Makefile ext/yahttp/yahttp/Makefile]) -- 2.47.2