[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 1/3] autoconf/python_dev: pass include and library dir based on prefix

NetBSD `python-conf --ldflags` doesn't return the library dir, so we
have to add it to LDFLAGS based on the prefix returned by `python-conf
--prefix`. Also the include dir has been added to CFLAGS using the
same technique.

If not passed the configure script fails on NetBSD, complaining it
cannot find lpythonx.x library during the python_dev test phase.

This is currently done on all OSes, since I think it's harmless to do
this on other systems also.

Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxx>
 tools/m4/python_devel.m4 |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/m4/python_devel.m4 b/tools/m4/python_devel.m4
index 0a2202c..61326df 100644
--- a/tools/m4/python_devel.m4
+++ b/tools/m4/python_devel.m4
@@ -23,8 +23,9 @@ AS_IF([test x"$pyconfig" == x"no"], [
         print distutils.sysconfig.get_config_var("LDFLAGS")'`"
 ], [
     dnl If python-config is found use it
-    CPPFLAGS="$CFLAGS `$PYTHON-config --cflags`"
-    LDFLAGS="$LDFLAGS `$PYTHON-config --ldflags`"
+    ac_python_prefix=`$PYTHON-config --prefix`
+    CPPFLAGS="$CFLAGS `$PYTHON-config --cflags` -I$ac_python_prefix/include"
+    LDFLAGS="$LDFLAGS `$PYTHON-config --ldflags` -L$ac_python_prefix/lib"
 AC_CHECK_HEADER([Python.h], [],
-- (Apple Git-26)

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.