Blob Blame History Raw
diff --git a/config.h.in b/config.h.in
index e1364dd921..1dc65cfb21 100644
--- a/config.h.in
+++ b/config.h.in
@@ -588,7 +588,7 @@ int sigwait(const unsigned int *set, int *sig);
 #undef PREFER_GOSTASN1
 
 /* The size of `void *', as computed by sizeof. */
-#undef SIZEOF_VOID_P
+/* #undef SIZEOF_VOID_P */
 
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
diff --git a/configure.in b/configure.in
index 73b1c8ccbb..129fc3f311 100644
--- a/configure.in
+++ b/configure.in
@@ -3523,14 +3523,14 @@ AC_TRY_COMPILE([
 #include <sys/socket.h>
 #include <netdb.h>
 int getnameinfo(const struct sockaddr *, socklen_t, char *,
-		socklen_t, char *, socklen_t, unsigned int);],
+		socklen_t, char *, socklen_t, int);],
 [ return (0);],
-	[AC_MSG_RESULT(socklen_t for buflen; u_int for flags)
+	[AC_MSG_RESULT(socklen_t for buflen; int for flags)
 	 AC_DEFINE(IRS_GETNAMEINFO_SOCKLEN_T, socklen_t,
 		   [Define to the sockaddr length type used by getnameinfo(3).])
 	 AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t,
 		   [Define to the buffer length type used by getnameinfo(3).])
-	 AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, unsigned int,
+	 AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int,
 		   [Define to the flags type used by getnameinfo(3).])],
 [AC_TRY_COMPILE([
 #include <sys/types.h>
@@ -3557,7 +3557,7 @@ int getnameinfo(const struct sockaddr *, size_t, char *,
 [AC_MSG_RESULT(not match any subspecies; assume standard definition)
 AC_DEFINE(IRS_GETNAMEINFO_SOCKLEN_T, socklen_t)
 AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t)
-AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)])])])
+AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, unsigned int)])])])
 
 #
 # ...and same for gai_strerror().
diff --git a/isc-config.sh.in b/isc-config.sh.in
index a8a0a89e88..b5e94ed13e 100644
--- a/isc-config.sh.in
+++ b/isc-config.sh.in
@@ -13,7 +13,18 @@ prefix=@prefix@
 exec_prefix=@exec_prefix@
 exec_prefix_set=
 includedir=@includedir@
-libdir=@libdir@
+arch=$(uname -m)
+
+case $arch in
+	x86_64 | amd64 | sparc64 | s390x | ppc64)
+		libdir=/usr/lib64
+		sec_libdir=/usr/lib
+		;;
+	* )
+		libdir=/usr/lib
+		sec_libdir=/usr/lib64
+		;;
+esac
 
 usage()
 {
@@ -132,6 +143,16 @@ if test x"$echo_libs" = x"true"; then
 	if test x"${exec_prefix_set}" = x"true"; then
 		libs="-L${exec_prefix}/lib"
 	else
+		if [ ! -x $libdir/libisc.so ] ; then
+			if [ ! -x $sec_libdir/libisc.so ] ; then
+				echo "Error: ISC libs not found in $libdir"
+				if [ -d $sec_libdir ] ; then
+					echo "Error: ISC libs not found in $sec_libdir"
+				fi
+				exit 1
+			fi
+			libdir=$sec_libdir
+		fi
 		libs="-L${libdir}"
 	fi
 	if test x"$libirs" = x"true" ; then