From ed26d79be822ce51934df7e3148f20df2745c826 Mon Sep 17 00:00:00 2001 From: spadix Date: Sun, 18 Sep 2011 18:33:24 -0700 Subject: [PATCH] fix missing configure check for Python.h (bug #3092663) - thanks to Zoltan Kovacs for reporting this problem! --- ChangeLog | 2 ++ configure.ac | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 32772de2..72939260 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ current: + * fix missing configure check for Python.h (bug #3092663) + - thanks to Zoltan Kovacs for reporting this problem! * fix C++ wrapper missing Symbol.quality (bug #3076524) - thanks to Rudy Melli for pointing this out! * fix C++ wrapper bugs (bug #3396068) diff --git a/configure.ac b/configure.ac index 53007133..e8f18687 100644 --- a/configure.ac +++ b/configure.ac @@ -436,7 +436,16 @@ AS_IF([test "x$with_python" != "xno"], [test -x "$PYTHON-config"], [PYTHON_CFLAGS=`$PYTHON-config --cflags`], [PYTHON_CFLAGS=`$PYTHON -c 'import distutils.sysconfig as s; print " ".join(s.get_config_vars("CFLAGS")) + " -I"+s.get_python_inc() + " -I"+s.get_python_inc(plat_specific=True)'`]) -dnl FIXME now should check that #include compiles + +dnl check that #include compiles (bug #3092663) + CPPFLAGS_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" + AC_CHECK_HEADER([Python.h], [], [AC_MSG_ERROR([dnl +Python module enabled, but unable to compile Python.h. +Install the development package for python-$am_cv_python_version, or configure +--without-python to disable the python bindings.dnl +])]) + CPPFLAGS="$CPPFLAGS_save" AS_IF([test "x$with_gtk" = "xyes"], [PKG_CHECK_MODULES([PYGTK], [pygtk-2.0])