From: Ian Jackson Subject: Re: [PATCH 1/3] autoconf/python_dev: pass include and library dir based on prefix Date: Fri, 11 May 2012 17:32:49 +0100 Message-ID: <20397.16177.826755.879002@mariner.uk.xensource.com> References: <1336745632-28158-1-git-send-email-roger.pau@citrix.com> <1336745632-28158-2-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-2-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: Roger Pau Monne Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Roger Pau Monne writes ("[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. ... > 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" Shouldn't the -I and particulary the -L come first ? TBH I'm surprised that this works since it looks like it ought to generate -lpython2.6 -L/usr/blah/lib/bleh/python2.6 or something, which I wouldn't expect to work. Ian.