[glom/glom-1-28] AX_BOOST_PYTHON: Update for the AX_PYTHON_DEVEL change.



commit a37f85cbd57d564c7ab639ec690897d322f16cdf
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Oct 20 10:50:53 2015 +0200

    AX_BOOST_PYTHON: Update for the AX_PYTHON_DEVEL change.
    
    Because AX_PYTHON_DEVEL now provides PYTHON_LIBS instead of PYTHON_FLAGS,
    this script needs to be updated accordingly.
    This lets AX_BOOST_PYTHON actually find the boost python library
    on newer systems that ignore the -l flags if they appear before the
    source file on the command line.
    
    I'm not sure why I needed to add PYTHON_LIBS to LIBS in the AC_CACHE_CHECK()
    line, though it apparently wasn't necessary to use PYTHON_LDFLAGS there
    before. I suspect that much of this file doesn't really make sense.
    
    I have submitted this patch upstream:
    https://savannah.gnu.org/patch/index.php?8776

 macros/ax_boost_python.m4 |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/macros/ax_boost_python.m4 b/macros/ax_boost_python.m4
index 5a40f61..2941ff6 100644
--- a/macros/ax_boost_python.m4
+++ b/macros/ax_boost_python.m4
@@ -65,9 +65,19 @@ ax_boost_python_save_LIBS="$LIBS"
 if test "x$PYTHON_CPPFLAGS" != "x"; then
   CPPFLAGS="$PYTHON_CPPFLAGS $CPPFLAGS"
 fi
+
+# Versions of AX_PYTHON_DEVEL() before serial 18 provided PYTHON_LDFLAGS
+# instead of PYTHON_LIBS, so this is just here for compatibility.
 if test "x$PYTHON_LDFLAGS" != "x"; then
   LDFLAGS="$PYTHON_LDFLAGS $LDFLAGS"
 fi
+
+# Note: Only versions of AX_PYTHON_DEVEL() since serial 18 provide PYTHON_LIBS
+# instead of PYTHON_LDFLAGS.
+if test "x$PYTHON_LIBS" != "x"; then
+  LIBS="$PYTHON_LIBS $LIBS"
+fi
+
 if test "x$BOOST_CPPFLAGS" != "x"; then
   CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
 fi
@@ -93,7 +103,7 @@ if test "$ac_cv_boost_python" = "yes"; then
   for ax_lib in $ax_python_lib $ax_boost_python_lib `ls $BOOSTLIBDIR/libboost_python*.so* 
$BOOSTLIBDIR/libboost_python*.dylib* $BOOSTLIBDIR/libboost_python*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 
's;^lib\(boost_python.*\)\.so.*$;\1;' -e 's;^lib\(boost_python.*\)\.dylib.*$;\1;' -e 
's;^lib\(boost_python.*\)\.a.*$;\1;' ` boost_python boost_python3; do
     AS_VAR_PUSHDEF([ax_Lib], [ax_cv_lib_$ax_lib''_BOOST_PYTHON_MODULE])dnl
     AC_CACHE_CHECK([whether $ax_lib is the correct library], [ax_Lib],
-    [LIBS="-l$ax_lib $ax_boost_python_save_LIBS"
+    [LIBS="-l$ax_lib $ax_boost_python_save_LIBS $PYTHON_LIBS"
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <boost/python/module.hpp>
 BOOST_PYTHON_MODULE(test) { throw "Boost::Python test."; }]], [])],


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]