Check for struct sockaddr_storage only in top-level configure script, not
authorKen Raeburn <raeburn@mit.edu>
Fri, 22 Aug 2008 01:20:23 +0000 (01:20 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 22 Aug 2008 01:20:23 +0000 (01:20 +0000)
in code common to all.  Use an existing AC_CHECK_TYPES invocation, not a
special-purpose test.  Eliminate now-unused
KRB5_AC_CHECK_TYPE_WITH_HEADERS and KRB5_AC_CHECK_SOCKADDR_STORAGE macros.
Merge KRB5_AC_CHECK_INET6 into the one place where it gets used.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20681 dc483132-0cff-0310-8789-dd5450dbe970

src/aclocal.m4
src/configure.in

index 898cca5b87eecd508f8a6914d3016a3e3bec6ba9..d788f0a5e8b5775b40ccbe4effd40ce0f60ce998 100644 (file)
@@ -411,35 +411,6 @@ fi
 dnl
 AC_REQUIRE([KRB5_SOCKADDR_SA_LEN])dnl
 AC_ARG_ENABLE([ipv6], , AC_MSG_WARN(enable/disable-ipv6 option is deprecated))dnl
-KRB5_AC_CHECK_INET6
-])dnl
-dnl
-AC_DEFUN(KRB5_AC_CHECK_TYPE_WITH_HEADERS,[
-AC_MSG_CHECKING(for type $1)
-changequote(<<,>>)dnl
-varname=`echo $1 | sed 's,[ -],_,g'`
-changequote([,])dnl
-AC_CACHE_VAL(krb5_cv_$varname,[
-AC_TRY_COMPILE([$2],[ $1 foo; ], eval krb5_cv_$varname=yes, eval krb5_cv_$varname=no)])
-eval x="\$krb5_cv_$varname"
-AC_MSG_RESULT($x)
-if eval test "$x" = yes ; then
-  AC_DEFINE_UNQUOTED(HAVE_`echo $varname | tr '[[[a-z]]]' '[[[A-Z]]]'`)
-fi])
-dnl
-dnl
-AC_DEFUN(KRB5_AC_CHECK_SOCKADDR_STORAGE,[
-KRB5_AC_CHECK_TYPE_WITH_HEADERS(struct sockaddr_storage, [
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#include <sys/socket.h>
-#include <netinet/in.h>
-])])dnl
-dnl
-dnl
-AC_DEFUN(KRB5_AC_CHECK_INET6,[
-AC_REQUIRE([KRB5_AC_CHECK_SOCKADDR_STORAGE])dnl
 AC_MSG_CHECKING(for IPv6 compile-time support)
 AC_CACHE_VAL(krb5_cv_inet6,[
 if test "$ac_cv_func_inet_ntop" != "yes" ; then
index 0e9bd3ab5ae5ce8b4f95a401adb650ae82debf96..cb12875e1392fe8cceeae1f846353728ebea1893 100644 (file)
@@ -606,7 +606,7 @@ AC_CHECK_TYPES([uint32_t, int32_t, uint64_t, int64_t, uint_least32_t, uintptr_t,
 # include <inttypes.h>
 #endif
 ])
-AC_CHECK_TYPES([struct cmsghdr, struct in_pktinfo, struct in6_pktinfo], , , [
+AC_CHECK_TYPES([struct cmsghdr, struct in_pktinfo, struct in6_pktinfo, struct sockaddr_storage], , , [
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>