From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Wilson Subject: Re: [PATCH] tools: honour --libdir when it is passed to ./configure Date: Wed, 20 Jun 2012 11:27:42 -0700 Message-ID: <20120620182742.GC2640@US-SEA-R8XVZTX> References: <0a592e08ac31b3934372.1340153217@kaos-source-31003.sea31.amazon.com> <4FE18F05.8030309@citrix.com> <20120620164413.GB2640@US-SEA-R8XVZTX> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20120620164413.GB2640@US-SEA-R8XVZTX> 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: Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Wed, Jun 20, 2012 at 09:44:13AM -0700, Wilson, Matt wrote: > On Wed, Jun 20, 2012 at 01:51:17AM -0700, Roger Pau Monne wrote: > > Matt Wilson wrote: > > > +CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ -DFSIMAGE_FSDIR=\"$(FSDIR)\" > > > > I would prefer to set FSIMAGE_FSDIR or an equivalent define in > > tools/config.h and include that header in > > tools/libfsimage/common/fsimage_plugin.h, so we don't have to pass that > > value from the compiler command line. It turns out to be tricky to do this, since you have to recursively expand the value from libdir="${exec_prefix}/lib". Also, it's counter to the generally accepted pattern for passing these types of variables down when using autoconf, which actually is to use -D in CFLAGS. See also this thread: http://stackoverflow.com/questions/5867136/autoconf-how-to-get-installation-paths-into-config-h Matt