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