xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@entel.upc.edu>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Jeffrey Karrels <karrelsj@gmail.com>
Subject: Re: make install not creating lib entries in /usr/lib under Ubunu 11.10
Date: Wed, 29 Feb 2012 12:43:14 +0100	[thread overview]
Message-ID: <CAPLaKK7RbsoTinxf7f=BtL2PZ-4gUqDPC3kM9bka=bLBnmpAxQ@mail.gmail.com> (raw)
In-Reply-To: <1330513027.4270.43.camel@zakaz.uk.xensource.com>

2012/2/29 Ian Campbell <Ian.Campbell@citrix.com>:
> 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@entel.upc.edu>

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)])
-

  reply	other threads:[~2012-02-29 11:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-18 22:36 make install not creating lib entries in /usr/lib under Ubunu 11.10 AP
2011-10-19  1:13 ` AP
2011-10-19  8:43 ` Ian Campbell
2011-10-19 15:53   ` Ian Jackson
2011-10-21  3:52     ` AP
2011-10-21  8:44       ` Olaf Hering
2011-10-21 16:45         ` AP
2011-10-22 12:47       ` Ian Campbell
2011-10-24  5:52         ` AP
2012-02-27 23:19           ` Jeffrey Karrels
2012-02-27 23:46             ` Jeffrey Karrels
2012-02-28 10:00             ` Ian Campbell
2012-02-28 17:51               ` Jeffrey Karrels
2012-02-28 19:57                 ` Ian Campbell
2012-02-29 10:18                   ` Roger Pau Monné
2012-02-29 10:57                     ` Ian Campbell
2012-02-29 11:43                       ` Roger Pau Monné [this message]
2012-02-29 17:01                         ` Jeffrey Karrels
2012-03-01 17:03                         ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPLaKK7RbsoTinxf7f=BtL2PZ-4gUqDPC3kM9bka=bLBnmpAxQ@mail.gmail.com' \
    --to=roger.pau@entel.upc.edu \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=karrelsj@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).