Repository: mesos
Updated Branches:
  refs/heads/master 7c60343b0 -> c309611bb


Detect gflags when present and link when building Python module

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


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

Branch: refs/heads/master
Commit: c309611bbb591de7770c2434531be2b432a0b895
Parents: 7c60343
Author: Greg Mann <[email protected]>
Authored: Mon Aug 17 15:46:11 2015 -0700
Committer: Timothy Chen <[email protected]>
Committed: Wed Aug 19 18:37:24 2015 -0700

----------------------------------------------------------------------
 configure.ac | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c309611b/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index db0632d..87461d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -489,6 +489,18 @@ AM_CONDITIONAL([WITH_BUNDLED_ZOOKEEPER],
                [test "x$with_bundled_zookeeper" = "xyes"])
 
 
+# Check if gflags are present. If so, make sure we link against them
+# when building the Python module.
+AC_CHECK_LIB([gflags],
+             [main],
+             [found_gflags=yes])
+if test "x$found_gflags" = "xyes"; then
+  GFLAGS_LIBS="-lgflags"
+else
+  GFLAGS_LIBS=""
+fi
+
+
 AS_CASE($ax_cv_cxx_compiler_vendor,
   [clang], [
     # Check if -Wno-unused-local-typedef is needed by checking a sample
@@ -1259,7 +1271,7 @@ There are two possible workarounds for this issue:
   # TODO(tillt): Remove this once Apple distributed an updated Python.
   PYTHON_CPPFLAGS="$CPPFLAGS"
   PYTHON_CFLAGS="$CFLAGS $CXXFLAGS" # distutils requires we embed CXXFLAGS.
-  PYTHON_LDFLAGS="$LDFLAGS"
+  PYTHON_LDFLAGS="$LDFLAGS $GFLAGS_LIBS"
 
   AS_IF([test "x$ax_cv_cxx_compiler_vendor" = "xclang"],
        [PYTHON_CPPFLAGS="$PYTHON_CPPFLAGS -Qunused-arguments"

Reply via email to