aarch64, ppc64, s390x also use lib64
--- a/configure.ac
+++ b/configure.ac
@@ -167,6 +167,8 @@ ac_topdirs="/usr/share /usr/lib"
if test "x$ac_arch" = "xx86_64"; then
CFLAGS="-fPIC $CFLAGS"
CPPFLAGS="-fPIC $CPPFLAGS"
+fi
+if test -d /usr/lib64; then
ac_topdirs="$ac_topdirs /usr/lib64"
fi
@@ -199,11 +201,10 @@ for X in $ac_with_paths; do
CPPFLAGS="-I$X/include $CPPFLAGS"
ac_incpath="$X/include $ac_incpath"
fi
- if test "x$ac_arch" = "xx86_64" -a -d $X/lib64; then
+ if test -d $X/lib64; then
LIBS="-L$X/lib64 $LIBS"
ac_libs="-L$X/lib64 $ac_libs"
- fi
- if test -d $X/lib; then
+ elif test -d $X/lib; then
LIBS="-L$X/lib $LIBS"
ac_libs="-L$X/lib $ac_libs"
fi