From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Pau Monne Subject: Re: [PATCH] tools: honour --libdir when it is passed to ./configure Date: Thu, 21 Jun 2012 10:12:17 +0100 Message-ID: <4FE2E571.5040505@citrix.com> References: <0a592e08ac31b3934372.1340153217@kaos-source-31003.sea31.amazon.com> <4FE18F05.8030309@citrix.com> <20120620164413.GB2640@US-SEA-R8XVZTX> <20120620182742.GC2640@US-SEA-R8XVZTX> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120620182742.GC2640@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: Matt Wilson Cc: Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Matt Wilson wrote: > 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 Fair enough, thanks.