From f52a37fe86250116e985ddfeb454e21702daf5f5 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Wed, 27 Jul 2016 23:16:05 +0100 Subject: [PATCH] [#766] Fix building bindings with python-dbg (#958) * In ax_python_devel grep and remove '[xxxx refs]' if found in python-dbg output so that it will still catch any errors redirected to stdout. * In ax_boost_python change the specific _BOOST_PYTHON_MODULE test for the old version that used a generic _main method test. --- m4/ax_boost_python.m4 | 5 ++--- m4/ax_python_devel.m4 | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/m4/ax_boost_python.m4 b/m4/ax_boost_python.m4 index 385af3ef5..5d21fd31e 100644 --- a/m4/ax_boost_python.m4 +++ b/m4/ax_boost_python.m4 @@ -101,12 +101,11 @@ if test "$ac_cv_boost_python" = "yes"; then fi]) BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` 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 + AS_VAR_PUSHDEF([ax_Lib], [ax_cv_lib_$ax_lib''_main])dnl AC_CACHE_CHECK([whether $ax_lib is the correct library], [ax_Lib], [LIBS="-l$ax_lib $ax_boost_python_save_LIBS $PYTHON_LIBS" AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include -BOOST_PYTHON_MODULE(test) { throw "Boost::Python test."; }]], [])], + ]], [])], [AS_VAR_SET([ax_Lib], [yes])], [AS_VAR_SET([ax_Lib], [no])])]) AS_VAR_IF([ax_Lib], [yes], [BOOST_PYTHON_LIB=$ax_lib break], []) diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4 index f18ed8a01..11f1f51ac 100644 --- a/m4/ax_python_devel.m4 +++ b/m4/ax_python_devel.m4 @@ -136,7 +136,7 @@ variable to configure. See ``configure --help'' for reference. # Check if you have distutils, else fail # AC_MSG_CHECKING([for the distutils Python package]) - ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` + ac_distutils_result=`$PYTHON -c "import distutils" 2>&1 | grep -v '^\[[0-9]\{1,\} refs\]'` if test -z "$ac_distutils_result"; then AC_MSG_RESULT([yes]) else