3
0
forked from pool/util-linux
util-linux/which-lib64.patch

30 lines
1.0 KiB
Diff

--- acinclude.m4
+++ acinclude.m4
@@ -3,7 +3,7 @@
dnl Like AC_CHECK_LIB but looking for static libraries.
dnl LIBRARY must be of the form libxxx.a.
dnl The current language must be C (AC_LANG_C).
-AC_DEFUN(AC_CHECK_STATICLIB,
+AC_DEFUN([AC_CHECK_STATICLIB],
[AC_MSG_CHECKING([for $2 in $1])
dnl Use a cache variable name containing both the library and function name,
dnl because the test really is for library $1 defining function $2, not
@@ -11,10 +11,15 @@
dnl may have different results.
ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
AC_CACHE_VAL(ac_cv_lib_static_$ac_lib_var,
+if test "$libdir" != "${exec_prefix}/lib"; then
+ if test ! -z `grep 64 $libdir`&& test ; then
+ libsuffix=64
+ fi
+fi
if test -r /etc/ld.so.conf ; then
- ld_so_paths="/lib /usr/lib `cat /etc/ld.so.conf`"
+ ld_so_paths="/lib${libsuffix} /usr/lib${libsuffix} `cat /etc/ld.so.conf`"
else
- ld_so_paths="/lib /usr/lib"
+ ld_so_paths="/lib${libsuffix} /usr/lib${libsuffix}"
fi
for path in $ld_so_paths; do
[ac_save_LIBS="$LIBS"