--- a/configure	2023-06-01 18:40:35.000000000 +0000
+++ b/configure	2023-06-24 08:24:18.442874885 +0000
@@ -6631,7 +6631,7 @@
 	  # symlink names. Use -P option, and hope it's portable enough.
 	  test -d /usr/lib${ABI} \
 	    && (cd /usr/lib${ABI} && pwd -P | grep >/dev/null "/lib${ABI}"'$') \
-	    && libdir='${exec_prefix}/'"lib${ABI}"
+	    && libdir='${exec_prefix}/'"lib"
 	fi
 	;;
       # On freebsd, it seems 32-bit libraries are in lib32,
--- a/configure.ac	2023-06-01 18:40:35.000000000 +0000
+++ b/configure.ac	2023-06-24 08:24:18.442874885 +0000
@@ -431,7 +431,7 @@
 	  # symlink names. Use -P option, and hope it's portable enough.
 	  test -d /usr/lib${ABI} \
 	    && (cd /usr/lib${ABI} && pwd -P | grep >/dev/null "/lib${ABI}"'$') \
-	    && libdir='${exec_prefix}/'"lib${ABI}"
+	    && libdir='${exec_prefix}/'"lib"
 	fi
 	;;
       # On freebsd, it seems 32-bit libraries are in lib32,
