Commit dfac6253 authored by Martin Szulecki's avatar Martin Szulecki

m4: Use python-config if available to fix Python 3 support on newer distros

parent 2731ec0c
...@@ -150,6 +150,9 @@ $ac_distutils_result]) ...@@ -150,6 +150,9 @@ $ac_distutils_result])
# #
# Check for Python include path # Check for Python include path
# #
if type $PYTHON-config; then
PYTHON_CPPFLAGS=`$PYTHON-config --includes`
fi
AC_MSG_CHECKING([for Python include path]) AC_MSG_CHECKING([for Python include path])
if test -z "$PYTHON_CPPFLAGS"; then if test -z "$PYTHON_CPPFLAGS"; then
python_path=`$PYTHON -c "import distutils.sysconfig; \ python_path=`$PYTHON -c "import distutils.sysconfig; \
...@@ -166,6 +169,9 @@ $ac_distutils_result]) ...@@ -166,6 +169,9 @@ $ac_distutils_result])
# Check for Python library path # Check for Python library path
# #
AC_MSG_CHECKING([for Python library path]) AC_MSG_CHECKING([for Python library path])
if type $PYTHON-config; then
PYTHON_LDFLAGS=`$PYTHON-config --ldflags`
fi
if test -z "$PYTHON_LDFLAGS"; then if test -z "$PYTHON_LDFLAGS"; then
# (makes two attempts to ensure we've got a version number # (makes two attempts to ensure we've got a version number
# from the interpreter) # from the interpreter)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment