Merge pull request #7663 from javacruft/wip-pybind-flags

pybind: Ensure correct python flags are passed

Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
This commit is contained in:
Josh Durgin 2016-03-11 17:40:40 -08:00
commit 93863e7e22
2 changed files with 10 additions and 2 deletions

View File

@ -213,6 +213,14 @@ if test x"$with_cython" = xyes; then
if test x"$CYTHON_CHECK" != xyes; then
AC_MSG_FAILURE([cython not found])
fi
AC_CHECK_PROG(PYTHON_CONFIG_CHECK, python-config, yes)
if test x"$PYTHON_CONFIG_CHECK" != xyes; then
AC_MSG_FAILURE([python-config not found])
fi
PYTHON_CFLAGS=`python-config --cflags`
AC_SUBST(PYTHON_CFLAGS)
PYTHON_LDFLAGS=`python-config --ldflags`
AC_SUBST(PYTHON_LDFLAGS)
fi
# cond-check if snappy-devel is installed, needed by leveldb that is need by server parts of the project

View File

@ -4,8 +4,8 @@ if WITH_CYTHON
PY_DISTUTILS = \
CPPFLAGS="-iquote \${abs_srcdir}/include ${AM_CPPFLAGS} ${CPPFLAGS}" \
CFLAGS="-iquote \${abs_srcdir}/include ${AM_CFLAGS} ${CFLAGS}" \
LDFLAGS="-L\${abs_builddir}/.libs $(subst -pie,,${AM_LDFLAGS}) ${LDFLAGS}" \
CFLAGS="-iquote \${abs_srcdir}/include ${AM_CFLAGS} ${PYTHON_CFLAGS}" \
LDFLAGS="-L\${abs_builddir}/.libs $(subst -pie,,${AM_LDFLAGS}) ${PYTHON_LDFLAGS}" \
CYTHON_BUILD_DIR="$(shell readlink -f $(builddir))/build" \
${PYTHON} ./setup.py