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