Matt Wilson
2012-Aug-28 22:37 UTC
[PATCH] tools: remove vestigial default_lib.m4 macros and adjust substitutions
LIB_PATH is no longer used, so the AX_DEFAULT_LIB macro is no longer needed. Additionally lower case make variables are now used as autoconf substitutions, which allows for more correct overrides at build time. I''ve checked the file layout in dist/install from the build made before this change versus after with ./configure values of: 1) ./configure (no flags provided) 2) ./configure --libdir=/usr/lib/x86_64-linux-gnu (Debian style) 3) ./configure --libdir=''${exec_prefix}/lib'' (late variable expansion) Signed-off-by: Matt Wilson <msw@amazon.com> diff -r c95d96c70108 -r d7e4efa17fb0 config/Tools.mk.in --- a/config/Tools.mk.in Tue Aug 28 13:36:29 2012 -0700 +++ b/config/Tools.mk.in Tue Aug 28 15:35:08 2012 -0700 @@ -1,7 +1,9 @@ # Prefix and install folder -PREFIX := @prefix@ +prefix := @prefix@ +PREFIX := $(prefix) exec_prefix := @exec_prefix@ -LIBDIR := @libdir@ +libdir := @libdir@ +LIBDIR := $(libdir) # A debug build of tools? debug := @debug@ diff -r c95d96c70108 -r d7e4efa17fb0 tools/configure.ac --- a/tools/configure.ac Tue Aug 28 13:36:29 2012 -0700 +++ b/tools/configure.ac Tue Aug 28 15:35:08 2012 -0700 @@ -28,7 +28,6 @@ m4_include([m4/python_version.m4]) m4_include([m4/python_devel.m4]) m4_include([m4/ocaml.m4]) -m4_include([m4/default_lib.m4]) m4_include([m4/set_cflags_ldflags.m4]) m4_include([m4/uuid.m4]) m4_include([m4/pkg.m4]) @@ -121,9 +120,6 @@ AX_CHECK_CURSES PKG_CHECK_MODULES(glib, [glib-2.0 >= 2.12]) -# Check library path -AX_DEFAULT_LIB - # Checks for libraries. AC_CHECK_HEADER([bzlib.h], [ AC_CHECK_LIB([bz2], [BZ2_bzDecompressInit], [zlib="$zlib -DHAVE_BZLIB -lbz2"]) diff -r c95d96c70108 -r d7e4efa17fb0 tools/m4/default_lib.m4 --- a/tools/m4/default_lib.m4 Tue Aug 28 13:36:29 2012 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -AC_DEFUN([AX_DEFAULT_LIB], -[AS_IF([test "\${exec_prefix}/lib" = "$libdir"], - [AS_IF([test "$exec_prefix" = "NONE" && test "$prefix" != "NONE"], - [exec_prefix=$prefix]) - AS_IF([test "$exec_prefix" = "NONE"], [exec_prefix=$ac_default_prefix]) - AS_IF([test -d "${exec_prefix}/lib64"], [ - LIB_PATH="lib64" - ],[ - LIB_PATH="lib" - ]) -], [ - LIB_PATH="${libdir:`expr length "$exec_prefix" + 1`}" -]) -AC_SUBST(LIB_PATH)])
Ian Jackson
2012-Aug-30 15:34 UTC
Re: [PATCH] tools: remove vestigial default_lib.m4 macros and adjust substitutions
Matt Wilson writes ("[Xen-devel] [PATCH] tools: remove vestigial default_lib.m4 macros and adjust substitutions"):> LIB_PATH is no longer used, so the AX_DEFAULT_LIB macro is no longer > needed. Additionally lower case make variables are now used as > autoconf substitutions, which allows for more correct overrides at > build time. > > I''ve checked the file layout in dist/install from the build made > before this change versus after with ./configure values of: > 1) ./configure (no flags provided) > 2) ./configure --libdir=/usr/lib/x86_64-linux-gnu (Debian style) > 3) ./configure --libdir=''${exec_prefix}/lib'' (late variable expansion) > > Signed-off-by: Matt Wilson <msw@amazon.com>Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Good for 4.2. Ian.
Ian Campbell
2012-Aug-31 09:42 UTC
Re: [PATCH] tools: remove vestigial default_lib.m4 macros and adjust substitutions
On Thu, 2012-08-30 at 16:34 +0100, Ian Jackson wrote:> Matt Wilson writes ("[Xen-devel] [PATCH] tools: remove vestigial default_lib.m4 macros and adjust substitutions"): > > LIB_PATH is no longer used, so the AX_DEFAULT_LIB macro is no longer > > needed. Additionally lower case make variables are now used as > > autoconf substitutions, which allows for more correct overrides at > > build time. > > > > I''ve checked the file layout in dist/install from the build made > > before this change versus after with ./configure values of: > > 1) ./configure (no flags provided) > > 2) ./configure --libdir=/usr/lib/x86_64-linux-gnu (Debian style) > > 3) ./configure --libdir=''${exec_prefix}/lib'' (late variable expansion) > > > > Signed-off-by: Matt Wilson <msw@amazon.com> > > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>The problem with this last time was <1341478690.31696.110.camel@zakaz.uk.xensource.com>, I''ve confirmed that this doesn''t happen this time (list of installed files is identical before and after). Acked-by: Ian Campbell <ian.campbell@citrix.com>> > Good for 4.2. > > Ian.