[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] build: autoconf: fix libdir detection
# HG changeset patch # User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx> # Date 1330621173 0 # Node ID d86f2a45701d50ef919139303195adcb703d18b2 # Parent cf744a33ae9aae45f77130d612ea6671dcfde680 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@xxxxxxxxxxxxx> Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- diff -r cf744a33ae9a -r d86f2a45701d tools/configure --- a/tools/configure Thu Mar 01 16:51:39 2012 +0000 +++ b/tools/configure Thu Mar 01 16:59:33 2012 +0000 @@ -3842,7 +3842,6 @@ - # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # @@ -6437,13 +6436,26 @@ 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 cf744a33ae9a -r d86f2a45701d tools/m4/default_lib.m4 --- a/tools/m4/default_lib.m4 Thu Mar 01 16:51:39 2012 +0000 +++ b/tools/m4/default_lib.m4 Thu Mar 01 16:59:33 2012 +0000 @@ -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-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |