[gimp] m4macros: Windows may have a versioned directory for headers.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] m4macros: Windows may have a versioned directory for headers.
- Date: Tue, 6 Aug 2019 14:26:46 +0000 (UTC)
commit 61c11b04c12635fd6aa63cf800b37b24d018fdae
Author: Jehan <jehan girinstud io>
Date: Tue Aug 6 16:22:32 2019 +0200
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.
m4macros/python3dev.m4 | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/m4macros/python3dev.m4 b/m4macros/python3dev.m4
index 7f2629f548..065b7136c7 100644
--- a/m4macros/python3dev.m4
+++ b/m4macros/python3dev.m4
@@ -222,18 +222,19 @@ dnl function also defines PYTHON_INCLUDES
AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
[AC_REQUIRE([AM_PATH_PYTHON3])
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
py_prefix=`$PYTHON -c "import sys; print(sys.prefix)"`
py_exec_prefix=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
PYTHON_INCLUDES=`$PKG_CONFIG --cflags-only-I python-${PYTHON_VERSION}`
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
AC_SUBST(PYTHON_INCLUDES)
dnl check if the headers exist:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]