mirror of https://github.com/GNOME/gimp.git
m4macros: Windows may have a versioned directory for headers.
Cf !84. We don't want to just replace the old path without versionned python, because I assume it has been set for a reason. So there may be machines with a versionned python path, others without. Let's test both on Windows.
This commit is contained in:
parent
4d74452444
commit
61c11b04c1
|
@ -222,18 +222,19 @@ dnl function also defines PYTHON_INCLUDES
|
||||||
AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
|
AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
|
||||||
[AC_REQUIRE([AM_PATH_PYTHON3])
|
[AC_REQUIRE([AM_PATH_PYTHON3])
|
||||||
AC_MSG_CHECKING(for headers required to compile python extensions)
|
AC_MSG_CHECKING(for headers required to compile python extensions)
|
||||||
dnl Win32 doesn't have a versioned directory for headers
|
|
||||||
if test "$PYTHON_PLATFORM" != "win32"; then
|
|
||||||
py_versiondir="/python${PYTHON_VERSION}"
|
|
||||||
else
|
|
||||||
py_versiondir=
|
|
||||||
fi
|
|
||||||
dnl deduce PYTHON_INCLUDES
|
dnl deduce PYTHON_INCLUDES
|
||||||
py_prefix=`$PYTHON -c "import sys; print(sys.prefix)"`
|
py_prefix=`$PYTHON -c "import sys; print(sys.prefix)"`
|
||||||
py_exec_prefix=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
|
py_exec_prefix=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
|
||||||
PYTHON_INCLUDES=`$PKG_CONFIG --cflags-only-I python-${PYTHON_VERSION}`
|
PYTHON_INCLUDES=`$PKG_CONFIG --cflags-only-I python-${PYTHON_VERSION}`
|
||||||
if test "$py_prefix" != "$py_exec_prefix"; then
|
if test "$py_prefix" != "$py_exec_prefix"; then
|
||||||
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include${py_versiondir}"
|
py_versiondir="${py_exec_prefix}/include/python${PYTHON_VERSION}"
|
||||||
|
dnl Win32 doesn't always have a versioned directory for headers
|
||||||
|
if test "$PYTHON_PLATFORM" = "win32"; then
|
||||||
|
if test -d "${py_versiondir}" ; then
|
||||||
|
py_versiondir=${py_exec_prefix}/include
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_versiondir}"
|
||||||
fi
|
fi
|
||||||
AC_SUBST(PYTHON_INCLUDES)
|
AC_SUBST(PYTHON_INCLUDES)
|
||||||
dnl check if the headers exist:
|
dnl check if the headers exist:
|
||||||
|
|
Loading…
Reference in New Issue