You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/07/02 21:51:08 UTC
[2/5] mesos git commit: Added ELFIO as bundled dependency in stout.
Added ELFIO as bundled dependency in stout.
Review: https://reviews.apache.org/r/49561/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/03496668
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/03496668
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/03496668
Branch: refs/heads/master
Commit: 03496668fde640a38f3eddff8bea65c8b1344be0
Parents: 4d24651
Author: Kevin Klues <kl...@gmail.com>
Authored: Sat Jul 2 13:54:45 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Sat Jul 2 14:46:58 2016 -0700
----------------------------------------------------------------------
3rdparty/stout/Makefile.am | 6 +++++
3rdparty/stout/cmake/StoutConfigure.cmake | 2 ++
3rdparty/stout/configure.ac | 35 ++++++++++++++++++++++++++
3 files changed, 43 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/03496668/3rdparty/stout/Makefile.am
----------------------------------------------------------------------
diff --git a/3rdparty/stout/Makefile.am b/3rdparty/stout/Makefile.am
index eeaca48..6769130 100644
--- a/3rdparty/stout/Makefile.am
+++ b/3rdparty/stout/Makefile.am
@@ -22,6 +22,7 @@ SUBDIRS = . include
include ../versions.am
BOOST = ../boost-$(BOOST_VERSION)
+ELFIO = ../elfio-$(ELFIO_VERSION)
GLOG = ../glog-$(GLOG_VERSION)
GMOCK = ../gmock-$(GMOCK_VERSION)
GTEST = $(GMOCK)/gtest
@@ -35,6 +36,10 @@ if WITH_BUNDLED_BOOST
BOOST_INCLUDE_FLAGS = -isystem $(BOOST)
endif
+if WITH_BUNDLED_ELFIO
+ELFIO_INCLUDE_FLAGS = -I$(ELFIO)
+endif
+
if WITH_BUNDLED_GLOG
GLOG_INCLUDE_FLAGS = -I$(GLOG)/src
LIB_GLOG = $(GLOG)/libglog.la
@@ -128,6 +133,7 @@ endif
stout_tests_CPPFLAGS = \
-I$(srcdir)/include \
$(BOOST_INCLUDE_FLAGS) \
+ $(ELFIO_INCLUDE_FLAGS) \
$(GLOG_INCLUDE_FLAGS) \
$(GMOCK_INCLUDE_FLAGS) \
$(GTEST_INCLUDE_FLAGS) \
http://git-wip-us.apache.org/repos/asf/mesos/blob/03496668/3rdparty/stout/cmake/StoutConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/stout/cmake/StoutConfigure.cmake b/3rdparty/stout/cmake/StoutConfigure.cmake
index e4e3217..7e483aa 100644
--- a/3rdparty/stout/cmake/StoutConfigure.cmake
+++ b/3rdparty/stout/cmake/StoutConfigure.cmake
@@ -33,6 +33,7 @@ endif (NOT WIN32)
set(STOUT_DEPENDENCIES
${STOUT_DEPENDENCIES}
${BOOST_TARGET}
+ ${ELFIO_TARGET}
${GLOG_TARGET}
${NVML_TARGET}
${PROTOBUF_TARGET}
@@ -55,6 +56,7 @@ set(STOUT_INCLUDE_DIRS
${STOUT_INCLUDE_DIR}
${APR_INCLUDE_DIR}
${BOOST_INCLUDE_DIR}
+ ${ELFIO_INCLUDE_DIR}
${GLOG_INCLUDE_DIR}
${NVML_INCLUDE_DIR}
${PICOJSON_INCLUDE_DIR}
http://git-wip-us.apache.org/repos/asf/mesos/blob/03496668/3rdparty/stout/configure.ac
----------------------------------------------------------------------
diff --git a/3rdparty/stout/configure.ac b/3rdparty/stout/configure.ac
index ca6f041..dab005b 100644
--- a/3rdparty/stout/configure.ac
+++ b/3rdparty/stout/configure.ac
@@ -102,6 +102,13 @@ AC_ARG_WITH([boost],
location prefixed by the given path]),
[without_bundled_boost=yes], [])
+AC_ARG_WITH([elfio],
+ AS_HELP_STRING([--with-elfio@<:@=DIR@:>@],
+ [excludes building and using the bundled ELFIO
+ package in lieu of an installed version at a
+ location prefixed by the given path]),
+ [without_bundled_elfio=yes], [])
+
AC_ARG_WITH([glog],
AS_HELP_STRING([--with-glog@<:@=DIR@:>@],
[excludes building and using the bundled glog
@@ -281,6 +288,34 @@ fi
AM_CONDITIONAL([WITH_BUNDLED_BOOST], [test "x$with_bundled_boost" = "xyes"])
+# If the user has asked not to include the bundled ELFIO headers,
+# check to see if the path to the ELFIO headers has been specified. If
+# it has, make sure that the path is absolute. If everything is in
+# order, add this path to the CPPFLAGS.
+if test "x$without_bundled_elfio" = "xyes" || \
+ test "x$enable_bundled" != "xyes"; then
+ if test -n "`echo $with_elfio`"; then
+ if test "$with_elfio" = "${with_elfio#/}"; then
+ AC_MSG_ERROR([The path passed to --with-elfio must be absolute.])
+ fi
+ CPPFLAGS="-I${with_elfio} $CPPFLAGS"
+ fi
+
+ AC_CHECK_HEADERS([elfio/elfio.h], [],
+ [AC_MSG_ERROR([Cannot find the ELFIO headers
+-------------------------------------------------------------------
+You have requested the use of a non-bundled ELFIO but no suitable
+ELFIO headers could be found. Make sure these headers are either
+installed on the system or the path passed via --with-elfio is correct.
+-------------------------------------------------------------------
+ ])])
+else
+ with_bundled_elfio=yes
+fi
+
+AM_CONDITIONAL([WITH_BUNDLED_ELFIO], [test "x$with_bundled_elfio" = "xyes"])
+
+
# Include directories used by package managers (e.g., MacPorts).
if test "x$enable_bundled" != "xyes" && \
test "x$OS_NAME" = "xdarwin"; then