From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Pau Monne Subject: [PATCH 1/3] autoconf/python_dev: pass include and library dir based on prefix Date: Fri, 11 May 2012 15:13:50 +0100 Message-ID: <1336745632-28158-2-git-send-email-roger.pau@citrix.com> References: <1336745632-28158-1-git-send-email-roger.pau@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1336745632-28158-1-git-send-email-roger.pau@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Roger Pau Monne List-Id: xen-devel@lists.xenproject.org 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 --- 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], [], -- 1.7.7.5 (Apple Git-26)