summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f02efdb)
raw | patch | inline | side by side (parent: f02efdb)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 8 Dec 2009 13:36:43 +0000 (14:36 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 8 Dec 2009 13:36:43 +0000 (14:36 +0100) |
On several platforms, we have observed bogus information provided by
Python. Double check those flags and only enable the Python plugin if it
is *really* possible to build anything with the library.
Python. Double check those flags and only enable the Python plugin if it
is *really* possible to build anything with the library.
configure.in | patch | blob | history |
diff --git a/configure.in b/configure.in
index ea1e40e2b0a1012ef97570fc07ffa393db187632..b02f004f61b0264ba33a8c5c2eace7425ee363b3 100644 (file)
--- a/configure.in
+++ b/configure.in
@@ -2678,6 +2678,10 @@ AC_ARG_WITH(python, [AS_HELP_STRING([--with-python@<:@=PREFIX@:>@], [Path to the
], [with_python="yes"])
SAVE_PATH="$PATH"
+SAVE_CPPFLAGS="$CPPFLAGS"
+SAVE_LDFLAGS="$LDFLAGS"
+SAVE_LIBS="$LIBS"
+
PATH="$with_python_path"
if test "x$with_python" = "xyes" && test "x$with_python_prog" = "x"
fi
fi
-PATH="$SAVE_PATH"
-
if test "x$with_python" = "xyes"
then
AC_MSG_CHECKING([for Python CPPFLAGS])
fi
fi
+if test "x$with_python" = "xyes"
+then
+ CPPFLAGS="-I$python_include_path $CPPFLAGS"
+ AC_CHECK_HEADERS(Python.h,
+ [with_python="yes"],
+ [with_python="no ('Python.h' not found)"])
+fi
+
if test "x$with_python" = "xyes"
then
AC_MSG_CHECKING([for Python LDFLAGS])
fi
fi
+if test "x$with_python" = "xyes"
+then
+ LDFLAGS="-L$python_library_path $LDFLAGS"
+ LIBS="$python_library_flags $LIBS"
+
+ AC_CHECK_FUNC(PyObject_CallFunction,
+ [with_python="yes"],
+ [with_python="no (Symbol 'PyObject_CallFunction' not found)"])
+fi
+
+PATH="$SAVE_PATH"
+CPPFLAGS="$SAVE_CPPFLAGS"
+LDFLAGS="$SAVE_LDFLAGS"
+LIBS="$SAVE_LIBS"
+
if test "x$with_python" = "xyes"
then
BUILD_WITH_PYTHON_CPPFLAGS="-I$python_include_path"