[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] make install not creating lib entries in /usr/lib under Ubunu 11.10



2012/2/29 Ian Campbell <Ian.Campbell@xxxxxxxxxx>:
> The code seems to use both ${exec_prefix} and ${prefix} is that correct?
> Seems like an odd place to set \$prefix is all.

$prefix is set by passing the command line option or by default when
calling AC_OUTPUT, but since AC_OUTPUT is called at the end, this is
not really helpful, so we have to set $exec_prefix manually to the
correct value, either $prefix if different than NONE or
$ac_default_prefix. I agree that the previous patch was a bit of a
mess with $prefix and $exec_prefix, this is more "correct"

8<--------------------------------------------

autoconf: fix libdir detection

If user specifies a libdir it is used, if no libdir is specified
configure checks if $exec_prefix/lib64 is a directory and uses that,
if not lib is used.

Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>

diff -r 4758a7a94c15 tools/configure
--- a/tools/configure   Wed Feb 22 04:46:07 2012 +0100
+++ b/tools/configure   Wed Feb 22 07:55:48 2012 +0100
@@ -3845,7 +3845,6 @@ case $host_os in *\ *) host_os=`echo "$h



-
 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 # serial 1 (pkg-config-0.24)
 #
@@ -6551,13 +6550,26 @@ else
 fi

 # Check library path
-if test -d "$prefix/lib64"; then :
-
-    LIB_PATH="lib64"
-
-else
-
-    LIB_PATH="lib"
+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

diff -r 4758a7a94c15 tools/m4/default_lib.m4
--- a/tools/m4/default_lib.m4   Wed Feb 22 04:46:07 2012 +0100
+++ b/tools/m4/default_lib.m4   Wed Feb 22 07:55:48 2012 +0100
@@ -1,8 +1,14 @@
 AC_DEFUN([AX_DEFAULT_LIB],
-[AS_IF([test -d "$prefix/lib64"], [
-    LIB_PATH="lib64"
-],[
-    LIB_PATH="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)])
-

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.