python headers on Win32 don't live in a versioned subdir. Handle that

2005-08-28  Manish Singh  <yosh@gimp.org>

        * m4macros/pythondev.m4: python headers on Win32 don't live in a
        versioned subdir. Handle that case.
This commit is contained in:
Manish Singh 2005-08-28 16:59:56 +00:00 committed by Manish Singh
parent 5fd191b770
commit 19ea886842
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-08-28 Manish Singh <yosh@gimp.org>
* m4macros/pythondev.m4: python headers on Win32 don't live in a
versioned subdir. Handle that case.
2005-08-27 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpviewrendererpalette.c

View File

@ -7,12 +7,18 @@ dnl function also defines PYTHON_INCLUDES
AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
[AC_REQUIRE([AM_PATH_PYTHON])
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="-I${py_prefix}/include/python${PYTHON_VERSION}"
PYTHON_INCLUDES="-I${py_prefix}/include${py_versiondir}"
if test "$py_prefix" != "$py_exec_prefix"; then
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include${py_versiondir}"
fi
AC_SUBST(PYTHON_INCLUDES)
dnl check if the headers exist: