xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] tools, configure: Fix LIB_PATH computation in configure scripts
@ 2012-06-08 20:23 Boris Ostrovsky
  2012-07-04 11:00 ` Ian Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Boris Ostrovsky @ 2012-06-08 20:23 UTC (permalink / raw)
  To: roger.pau, keir; +Cc: boris.ostrovsky, xen-devel

# HG changeset patch
# User Boris Ostrovsky <boris.ostrovsky@amd.com>
# Date 1339185838 -7200
# Node ID fa21f847fc66619fad38923cd87d6ba51d731eba
# Parent  32034d1914a607d7b6f1f060352b4cac973600f8
tools, configure: Fix LIB_PATH computation in configure scripts

tool's configure script sets LIB_PATH by chopping off ${exec_prefix}
from $libdir and it does so by computing length of ${exec_prefix} value.
However, $libdir's value is a literal '${exec_prefix}/lib' string
(i.e. $exec_prefix is not substituted) and therefore LIB_PATH may be
computed incorrectly, most likely as "c_prefix}/lib64" assuming that
exec_prefix is NONE.

Instead, we should start at offset `expr length '${exec_prefix}/'
(which is 15).

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>

diff -r 32034d1914a6 -r fa21f847fc66 tools/configure
--- a/tools/configure	Thu Jun 07 19:46:57 2012 +0100
+++ b/tools/configure	Fri Jun 08 22:03:58 2012 +0200
@@ -6062,7 +6062,7 @@ fi
 
 else
 
-    LIB_PATH="${libdir:`expr length "$exec_prefix" + 1`}"
+    LIB_PATH="${libdir:`expr length '${exec_prefix}/'`}"
 
 fi
 
diff -r 32034d1914a6 -r fa21f847fc66 tools/m4/default_lib.m4
--- a/tools/m4/default_lib.m4	Thu Jun 07 19:46:57 2012 +0100
+++ b/tools/m4/default_lib.m4	Fri Jun 08 22:03:58 2012 +0200
@@ -9,6 +9,6 @@ AC_DEFUN([AX_DEFAULT_LIB],
         LIB_PATH="lib"
     ])
 ], [
-    LIB_PATH="${libdir:`expr length "$exec_prefix" + 1`}"
+    LIB_PATH="${libdir:`expr length '${exec_prefix}/'`}"
 ])
 AC_SUBST(LIB_PATH)])

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-04 11:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-08 20:23 [PATCH v2] tools, configure: Fix LIB_PATH computation in configure scripts Boris Ostrovsky
2012-07-04 11:00 ` Ian Campbell
2012-07-04 11:26   ` Roger Pau Monne
2012-07-04 11:27     ` Ian Campbell
2012-07-04 11:31       ` Roger Pau Monne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).