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:09 UTC

[3/5] mesos git commit: Added ELFIO as bundled dependency in libprocess.

Added ELFIO as bundled dependency in libprocess.

Review: https://reviews.apache.org/r/49560/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/4d24651c
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/4d24651c
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/4d24651c

Branch: refs/heads/master
Commit: 4d24651cf1493a93e97f73e9df9b02d77e8fd097
Parents: 5deb772
Author: Kevin Klues <kl...@gmail.com>
Authored: Sat Jul 2 13:48:27 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Sat Jul 2 14:46:58 2016 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/Makefile.am                 |  6 ++++
 .../cmake/Process3rdpartyConfigure.cmake        |  2 ++
 3rdparty/libprocess/configure.ac                | 35 ++++++++++++++++++++
 3 files changed, 43 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4d24651c/3rdparty/libprocess/Makefile.am
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/Makefile.am b/3rdparty/libprocess/Makefile.am
index 41bd8f4..05499a8 100644
--- a/3rdparty/libprocess/Makefile.am
+++ b/3rdparty/libprocess/Makefile.am
@@ -27,6 +27,7 @@ include ../versions.am
 
 STOUT = ../stout
 BOOST = ../boost-$(BOOST_VERSION)
+ELFIO = ../elfio-$(ELFIO_VERSION)
 GLOG = ../glog-$(GLOG_VERSION)
 GMOCK = ../gmock-$(GMOCK_VERSION)
 GPERFTOOLS = ../gperftools-$(GPERFTOOLS_VERSION)
@@ -39,6 +40,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
@@ -139,6 +144,7 @@ libprocess_la_CPPFLAGS =			\
   -DBUILD_DIR=\"$(LIBPROCESS_BUILD_DIR)\"	\
   -I$(srcdir)/include				\
   $(BOOST_INCLUDE_FLAGS)			\
+  $(ELFIO_INCLUDE_FLAGS)			\
   $(GLOG_INCLUDE_FLAGS)				\
   $(GPERFTOOLS_INCLUDE_FLAGS)			\
   $(HTTP_PARSER_INCLUDE_FLAGS)			\

http://git-wip-us.apache.org/repos/asf/mesos/blob/4d24651c/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
index fa84e7c..d34ea40 100644
--- a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
+++ b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
@@ -19,6 +19,7 @@
 set(STOUT ${MESOS_3RDPARTY_SRC}/stout)
 
 EXTERNAL("boost"       ${BOOST_VERSION}       "${MESOS_3RDPARTY_BIN}")
+EXTERNAL("elfio"       ${ELFIO_VERSION}       "${MESOS_3RDPARTY_BIN}")
 EXTERNAL("picojson"    ${PICOJSON_VERSION}    "${MESOS_3RDPARTY_BIN}")
 EXTERNAL("http_parser" ${HTTP_PARSER_VERSION} "${MESOS_3RDPARTY_BIN}")
 EXTERNAL("libev"       ${LIBEV_VERSION}       "${MESOS_3RDPARTY_BIN}")
@@ -53,6 +54,7 @@ set(PROCESS_INCLUDE_DIR     ${MESOS_3RDPARTY_SRC}/libprocess/include)
 set(STOUT_INCLUDE_DIR       ${STOUT}/include)
 
 set(BOOST_INCLUDE_DIR       ${BOOST_ROOT})
+set(ELFIO_INCLUDE_DIR       ${ELFIO_ROOT})
 set(GPERFTOOLS_INCLUDE_DIR  ${GPERFTOOLS}/src)
 set(HTTP_PARSER_INCLUDE_DIR ${HTTP_PARSER_ROOT})
 set(LIBEV_INCLUDE_DIR       ${LIBEV_ROOT})

http://git-wip-us.apache.org/repos/asf/mesos/blob/4d24651c/3rdparty/libprocess/configure.ac
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/configure.ac b/3rdparty/libprocess/configure.ac
index 41f4537..f5ed6c8 100644
--- a/3rdparty/libprocess/configure.ac
+++ b/3rdparty/libprocess/configure.ac
@@ -140,6 +140,13 @@ AC_ARG_WITH([curl],
                            [specify where to locate the curl library]),
             [], [])
 
+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
@@ -489,6 +496,34 @@ libcurl is required for libprocess to build.
 ])])
 
 
+# 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"])
+
+
 if test -n "`echo $with_glog`"; then
   CPPFLAGS="$CPPFLAGS -I${with_glog}/include"
   LDFLAGS="$LDFLAGS -L${with_glog}/lib"