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