Add support for handling new multi-arch under Debian.

The libraries are now in /usr/lib/arch-linux-gnu and not /usr/lib{32,64} so
check for them there too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-09-23 22:33:17 +00:00
parent 88cb53908a
commit 87d2c6f507
2 changed files with 63 additions and 33 deletions

46
configure vendored
View File

@@ -26999,8 +26999,8 @@ SEARCH_INCLUDE="\
\ \
/usr/openwin/share/include" /usr/openwin/share/include"
{ echo "$as_me:$LINENO: checking for libraries directory" >&5 { echo "$as_me:$LINENO: checking for libraries directories" >&5
echo $ECHO_N "checking for libraries directory... $ECHO_C" >&6; } echo $ECHO_N "checking for libraries directories... $ECHO_C" >&6; }
case "${host}" in case "${host}" in
*-*-irix6* ) *-*-irix6* )
@@ -27052,9 +27052,6 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
fi fi
done done
done done
if test "x$wx_cv_std_libpath" = "x"; then
wx_cv_std_libpath="lib"
fi
fi fi
@@ -27064,29 +27061,44 @@ fi
*-*-solaris2* ) *-*-solaris2* )
if test "$ac_cv_sizeof_void_p" = 8 -a -d "/usr/lib/64"; then if test "$ac_cv_sizeof_void_p" = 8 -a -d "/usr/lib/64"; then
wx_cv_std_libpath="lib/64" wx_cv_std_libpath="lib/64"
else
wx_cv_std_libpath="lib"
fi fi
;; ;;
*-*-linux* ) *-*-linux* )
if test "$ac_cv_sizeof_void_p" = 8 -a \ if test "$ac_cv_sizeof_void_p" = 8; then
-d "/usr/lib64" -a ! -h "/usr/lib64"; then if test -d "/usr/lib/`uname -m`-linux-gnu"; then
wx_cv_std_libpath="lib64" wx_cv_std_libfullpath="/usr/lib/`uname -m`-linux-gnu"
elif test -d "/usr/lib64" -a ! -h "/usr/lib64"; then
wx_cv_std_libpath="lib64"
fi
else else
wx_cv_std_libpath="lib" case "${host}" in
i*86-*-linux* )
if test -d '/usr/lib/i386-linux-gnu'; then
wx_cv_std_libfullpath='/usr/lib/i386-linux-gnu'
fi
esac
fi fi
;;
*) if test -n "$wx_cv_std_libfullpath" -a -d "/usr/lib"; then
wx_cv_std_libpath="lib"; wx_cv_std_libfullpath="$wx_cv_std_libfullpath /usr/lib"
fi
;; ;;
esac esac
{ echo "$as_me:$LINENO: result: $wx_cv_std_libpath" >&5 if test -z "$wx_cv_std_libpath"; then
echo "${ECHO_T}$wx_cv_std_libpath" >&6; } wx_cv_std_libpath="lib"
fi
SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s@include@$wx_cv_std_libpath@g` /usr/$wx_cv_std_libpath" if test -z "$wx_cv_std_libfullpath"; then
wx_cv_std_libfullpath="/usr/$wx_cv_std_libpath"
fi
{ echo "$as_me:$LINENO: result: $wx_cv_std_libfullpath" >&5
echo "${ECHO_T}$wx_cv_std_libfullpath" >&6; }
SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s@include@$wx_cv_std_libpath@g` $wx_cv_std_libfullpath"
if test "$build" != "$host" -a "$GCC" = yes; then if test "$build" != "$host" -a "$GCC" = yes; then
if cross_root=`$CC -print-prog-name=ld 2>/dev/null`; then if cross_root=`$CC -print-prog-name=ld 2>/dev/null`; then

View File

@@ -2251,7 +2251,7 @@ SEARCH_INCLUDE="\
dnl try to find out the standard lib locations for the systems with multiple dnl try to find out the standard lib locations for the systems with multiple
dnl ABIs dnl ABIs
AC_MSG_CHECKING([for libraries directory]) AC_MSG_CHECKING([for libraries directories])
case "${host}" in case "${host}" in
*-*-irix6* ) *-*-irix6* )
@@ -2273,9 +2273,6 @@ case "${host}" in
fi fi
done done
done done
if test "x$wx_cv_std_libpath" = "x"; then
wx_cv_std_libpath="lib"
fi
] ]
) )
;; ;;
@@ -2284,29 +2281,50 @@ case "${host}" in
dnl use ../lib or ../lib/64 depending on the size of void* dnl use ../lib or ../lib/64 depending on the size of void*
if test "$ac_cv_sizeof_void_p" = 8 -a -d "/usr/lib/64"; then if test "$ac_cv_sizeof_void_p" = 8 -a -d "/usr/lib/64"; then
wx_cv_std_libpath="lib/64" wx_cv_std_libpath="lib/64"
else
wx_cv_std_libpath="lib"
fi fi
;; ;;
*-*-linux* ) *-*-linux* )
dnl use ../lib or ../lib64 depending on the size of void* dnl Recent Debian versions (as of 2011) use new approach to multiarch
if test "$ac_cv_sizeof_void_p" = 8 -a \ dnl and put the libraries under /usr/lib/arch-linux-gnu. Annoyingly,
-d "/usr/lib64" -a ! -h "/usr/lib64"; then dnl "arch" here is not `uname -m` because it is "i386" even when uname
wx_cv_std_libpath="lib64" dnl returns e.g. "i686". So we need to test for it explicitly.
if test "$ac_cv_sizeof_void_p" = 8; then
if test -d "/usr/lib/`uname -m`-linux-gnu"; then
wx_cv_std_libfullpath="/usr/lib/`uname -m`-linux-gnu"
elif test -d "/usr/lib64" -a ! -h "/usr/lib64"; then
wx_cv_std_libpath="lib64"
fi
else else
wx_cv_std_libpath="lib" case "${host}" in
i*86-*-linux* )
if test -d '/usr/lib/i386-linux-gnu'; then
wx_cv_std_libfullpath='/usr/lib/i386-linux-gnu'
fi
esac
fi fi
;;
*) dnl And on top of all this, some packages haven't been updated for
wx_cv_std_libpath="lib"; dnl full multiarch support yet so we still need to look in /usr/lib
dnl too as well.
if test -n "$wx_cv_std_libfullpath" -a -d "/usr/lib"; then
wx_cv_std_libfullpath="$wx_cv_std_libfullpath /usr/lib"
fi
;; ;;
esac esac
AC_MSG_RESULT($wx_cv_std_libpath) if test -z "$wx_cv_std_libpath"; then
wx_cv_std_libpath="lib"
fi
SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s@include@$wx_cv_std_libpath@g` /usr/$wx_cv_std_libpath" if test -z "$wx_cv_std_libfullpath"; then
wx_cv_std_libfullpath="/usr/$wx_cv_std_libpath"
fi
AC_MSG_RESULT($wx_cv_std_libfullpath)
SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s@include@$wx_cv_std_libpath@g` $wx_cv_std_libfullpath"
dnl Cross compiling with gcc? dnl Cross compiling with gcc?
if test "$build" != "$host" -a "$GCC" = yes; then if test "$build" != "$host" -a "$GCC" = yes; then