e55890
diff --git a/config.h.in b/config.h.in
27025e
index 4ecaa8f..2f65ccc 100644
e55890
--- a/config.h.in
e55890
+++ b/config.h.in
27025e
@@ -600,7 +600,7 @@ int sigwait(const unsigned int *set, int *sig);
e55890
 #undef PREFER_GOSTASN1
e55890
 
e55890
 /* The size of `void *', as computed by sizeof. */
e55890
-#undef SIZEOF_VOID_P
e55890
+/* #undef SIZEOF_VOID_P */
e55890
 
e55890
 /* Define to 1 if you have the ANSI C header files. */
e55890
 #undef STDC_HEADERS
e55890
diff --git a/isc-config.sh.in b/isc-config.sh.in
27025e
index a8a0a89..b5e94ed 100644
e55890
--- a/isc-config.sh.in
e55890
+++ b/isc-config.sh.in
e55890
@@ -13,7 +13,18 @@ prefix=@prefix@
e55890
 exec_prefix=@exec_prefix@
e55890
 exec_prefix_set=
e55890
 includedir=@includedir@
e55890
-libdir=@libdir@
e55890
+arch=$(uname -m)
e55890
+
e55890
+case $arch in
e55890
+	x86_64 | amd64 | sparc64 | s390x | ppc64)
e55890
+		libdir=/usr/lib64
e55890
+		sec_libdir=/usr/lib
e55890
+		;;
e55890
+	* )
e55890
+		libdir=/usr/lib
e55890
+		sec_libdir=/usr/lib64
e55890
+		;;
e55890
+esac
e55890
 
e55890
 usage()
e55890
 {
e55890
@@ -132,6 +143,16 @@ if test x"$echo_libs" = x"true"; then
e55890
 	if test x"${exec_prefix_set}" = x"true"; then
e55890
 		libs="-L${exec_prefix}/lib"
e55890
 	else
e55890
+		if [ ! -x $libdir/libisc.so ] ; then
e55890
+			if [ ! -x $sec_libdir/libisc.so ] ; then
e55890
+				echo "Error: ISC libs not found in $libdir"
e55890
+				if [ -d $sec_libdir ] ; then
e55890
+					echo "Error: ISC libs not found in $sec_libdir"
e55890
+				fi
e55890
+				exit 1
e55890
+			fi
e55890
+			libdir=$sec_libdir
e55890
+		fi
e55890
 		libs="-L${libdir}"
e55890
 	fi
e55890
 	if test x"$libirs" = x"true" ; then