Module: check_mk
Branch: master
Commit: 40058a3389c1c02d5650f92093eafaaf44f0b00e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=40058a3389c1c0…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Feb 10 07:57:09 2017 +0100
Prepare build system for Boost stuff.
Change-Id: Ie61aa024dee738aba4b02bab3394666bb5615723
---
Makefile | 18 ++++++++++++++----
livestatus/src/Makefile.am | 4 ++--
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index c977b2c..26a1135 100644
--- a/Makefile
+++ b/Makefile
@@ -384,12 +384,22 @@ ar-lib compile config.guess config.sub install-sh missing depcomp:
configure.ac
autoreconf --install --include=m4
config.status: ar-lib compile config.guess config.sub install-sh missing depcomp
configure
- if test -f config.status; then \
+ @if test -f config.status; then \
+ echo "update config.status by reconfiguring in the same conditions" ; \
./config.status --recheck; \
else \
- ./configure CXXFLAGS="$(CXX_FLAGS)" \
- $(shell test -d ../rrdtool/rrdtool-1.5.4/src/.libs && echo
LDFLAGS="-L$(realpath ../rrdtool/rrdtool-1.5.4/src/.libs)") \
- $(shell test ! -d /usr/include/boost -a -d /usr/include/boost141/boost
&& echo "CPPFLAGS=-I/usr/include/boost141"); \
+ if test -d $(abspath ../boost/local) ; then \
+ BOOST_OPT="--with-boost=$(abspath ../boost/local)" ; \
+ elif test -d $(abspath ../cmk-omd/packages/boost/local) ; then \
+ BOOST_OPT="--with-boost=$(abspath ../cmk-omd/packages/boost/local)" ; \
+ elif test ! -d /usr/include/boost -a -d /usr/include/boost141/boost ; then \
+ BOOST_OPT="CPPFLAGS=-I/usr/include/boost141" ; \
+ else \
+ BOOST_OPT="" ; \
+ fi ; \
+ RRD_OPT="$(shell test -d ../rrdtool/rrdtool-1.5.4/src/.libs && echo
LDFLAGS="-L$(realpath ../rrdtool/rrdtool-1.5.4/src/.libs)")" ; \
+ echo "configure CXXFLAGS=\"$(CXX_FLAGS)\" $$BOOST_OPT $$RRD_OPT" ;
\
+ ./configure CXXFLAGS="$(CXX_FLAGS)" $$BOOST_OPT $$RRD_OPT ; \
fi
configure: $(CONFIGURE_DEPS)
diff --git a/livestatus/src/Makefile.am b/livestatus/src/Makefile.am
index 8fcabff..df66bd9 100644
--- a/livestatus/src/Makefile.am
+++ b/livestatus/src/Makefile.am
@@ -158,13 +158,13 @@ livestatus_so_SOURCES = \
strutil.cc \
waittriggers.cc
-livestatus_so_CPPFLAGS = -I..
+livestatus_so_CPPFLAGS = -I.. @BOOST_CPPFLAGS@
livestatus_so_CXXFLAGS = -fPIC
livestatus_so_CFLAGS = -fPIC
livestatus.o: $(livestatus_so_OBJECTS) $(livestatus_so_DEPENDENCIES)
-rm -f plugin.so
- $(CXX) $(LDFLAGS) -s -fPIC -shared $(livestatus_so_OBJECTS) -o $@ -lpthread
-static-libstdc++
+ $(CXX) $(LDFLAGS) -s -fPIC -shared $(livestatus_so_OBJECTS) -o $@ -lpthread
-static-libstdc++ @BOOST_LDFLAGS@
all-local: livestatus.o