tools: remove vestigial default_lib.m4 macros and adjust substitutions
authorMatt Wilson <msw@amazon.com>
Fri, 31 Aug 2012 09:42:09 +0000 (10:42 +0100)
committerMatt Wilson <msw@amazon.com>
Fri, 31 Aug 2012 09:42:09 +0000 (10:42 +0100)
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>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc - reran autogen.sh ]
Committed-by: Ian Campbell <ian.campbell@citrix.com>
config/Tools.mk.in
tools/configure
tools/configure.ac
tools/m4/default_lib.m4 [deleted file]

index 8a52bccda3ae264f593d6e047502efae19b8697b..b6bdad091583273a16ccc2323e84cf79a703296f 100644 (file)
@@ -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@
index aa1d96f90c0b1b3bc86256716ce8eab6d6116c60..6107d88d120c14cdc485a3edf534e655703d568d 100755 (executable)
@@ -606,7 +606,6 @@ libgcrypt
 libext2fs
 system_aio
 zlib
-LIB_PATH
 glib_LIBS
 glib_CFLAGS
 PKG_CONFIG_LIBDIR
@@ -2308,8 +2307,6 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
 
-
-
 
 
 
@@ -6125,31 +6122,6 @@ $as_echo "yes" >&6; }
 
 fi
 
-# Check library path
-if test "\${exec_prefix}/lib" = "$libdir"; then :
-  if test "$exec_prefix" = "NONE" && test "$prefix" != "NONE"; then :
-  exec_prefix=$prefix
-fi
-    if test "$exec_prefix" = "NONE"; then :
-  exec_prefix=$ac_default_prefix
-fi
-    if test -d "${exec_prefix}/lib64"; then :
-
-        LIB_PATH="lib64"
-
-else
-
-        LIB_PATH="lib"
-
-fi
-
-else
-
-    LIB_PATH="${libdir:`expr length "$exec_prefix" + 1`}"
-
-fi
-
-
 # Checks for libraries.
 ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default"
 if test "x$ac_cv_header_bzlib_h" = x""yes; then :
index bb497cca92f9426e5dfe8402ff0005ce0bac1e9b..b41ba9ca7161dddbb8ba7e7652d9b7c11ba72c36 100644 (file)
@@ -28,7 +28,6 @@ m4_include([m4/path_or_fail.m4])
 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 @@ esac
  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 --git a/tools/m4/default_lib.m4 b/tools/m4/default_lib.m4
deleted file mode 100644 (file)
index 2e98683..0000000
+++ /dev/null
@@ -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)])