aboutsummaryrefslogtreecommitdiffstats
path: root/tools/configure
diff options
context:
space:
mode:
authorRoger Pau Monne <roger.pau@entel.upc.edu>2012-03-01 16:59:33 +0000
committerRoger Pau Monne <roger.pau@entel.upc.edu>2012-03-01 16:59:33 +0000
commit192c0b406d19b488fe83b055ced358f41de0ccc5 (patch)
tree0ff1562ad72dda6ffff810be3da5d99ff185d0b3 /tools/configure
parent156ef03248cbb0cb0a0e8a5e318c1058c5cf674a (diff)
downloadxen-192c0b406d19b488fe83b055ced358f41de0ccc5.tar.gz
xen-192c0b406d19b488fe83b055ced358f41de0ccc5.tar.bz2
xen-192c0b406d19b488fe83b055ced358f41de0ccc5.zip
build: 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. $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. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/configure')
-rwxr-xr-xtools/configure20
1 files changed, 16 insertions, 4 deletions
diff --git a/tools/configure b/tools/configure
index 39bf1f35a4..b1bad1323a 100755
--- a/tools/configure
+++ b/tools/configure
@@ -3842,7 +3842,6 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24)
#
@@ -6437,13 +6436,26 @@ $as_echo "yes" >&6; }
fi
# Check library path
-if test -d "$prefix/lib64"; then :
+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"
- LIB_PATH="lib64"
+else
+
+ LIB_PATH="lib"
+
+fi
else
- LIB_PATH="lib"
+ LIB_PATH="${libdir:`expr length "$exec_prefix" + 1`}"
fi