AC_DEFINE(HAVE_TYPE_U_INT64_T, 1, [Does u_int64_t exist?])
fi
-#
-# Look for in_port_t.
-#
-AC_CACHE_CHECK(
- [for in_port_t],
- isc_cv_have_in_port_t,
- [
- AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- #include <netinet/in.h>
- ],
- [
- in_port_t port = 25;
- return (0);
- ],
- [isc_cv_have_in_port_t=yes],
- [isc_cv_have_in_port_t=no]
- )
- ]
-)
-case "$isc_cv_have_in_port_t" in
- no)
- AC_DEFINE(ISC_PLATFORM_NEEDPORTT, 1, [Declare in_port_t?])
-esac
-
AC_CACHE_CHECK([for a fallback value for HZ], ac_cv_var_default_hz,
[ac_cv_var_default_hz=100
case "$host" in
AC_DEFINE(HAVE_STRUCT_PPSCLOCKEV, 1, [Does a system header define struct ppsclockev?])
fi
-AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage,
-[AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-],[
-struct sockaddr_storage n;],
- ac_cv_struct_sockaddr_storage=yes,
- ac_cv_struct_sockaddr_storage=no)
-])
-if test $ac_cv_struct_sockaddr_storage = yes; then
+AC_CACHE_CHECK(
+ [for struct sockaddr_storage],
+ ntp_cv_sockaddr_storage,
+ [
+ AC_TRY_COMPILE(
+ [
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ ],
+ [
+ struct sockaddr_storage n;
+ ],
+ [ntp_cv_sockaddr_storage="yes"],
+ [ntp_cv_sockaddr_storage="no"]
+ )
+ ]
+)
+case "$ntp_cv_sockaddr_storage" in
+ yes)
AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1, [Does a system header define struct sockaddr_storage?])
-fi
+esac
-AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
- ac_cv_have_ss_family_in_struct_ss, [
+AC_CACHE_CHECK(
+ [for sockaddr_storage.ss_family],
+ ntp_cv_have_ss_family,
+ [
AC_TRY_COMPILE(
- [
-#include <sys/types.h>
-#include <sys/socket.h>
- ],
- [ struct sockaddr_storage s; s.ss_family = 1; ],
- [ ac_cv_have_ss_family_in_struct_ss="yes" ],
- [ ac_cv_have_ss_family_in_struct_ss="no" ],
+ [
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ ],
+ [
+ struct sockaddr_storage s;
+ s.ss_family = 1;
+ ],
+ [ntp_cv_have_ss_family="yes"],
+ [ntp_cv_have_ss_family="no"]
)
-])
-if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
- AC_DEFINE(HAVE_SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have ss_family?])
-else
- # Hack around a problem...
- # HMS: This is $host because we need the -D if we are building *for* it.
- # HMS: 061029: Now that we separate the ss_* checks this is causing
- # a problem - disable it until we get to the bottom of it.
- case "$host" in
- XXX*-*-hpux11.11) CPPFLAGS="$CPPFLAGS -D_NETINET_IN6_H"
- ;;
- esac
-fi
+ ]
+)
-AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
- ac_cv_have___ss_family_in_struct_ss, [
- AC_TRY_COMPILE(
+case "$ntp_cv_have_ss_family" in
+ no)
+ AC_CACHE_CHECK(
+ [for sockaddr_storage.__ss_family],
+ ntp_cv_have___ss_family,
+ [
+ AC_TRY_COMPILE(
[
-#include <sys/types.h>
-#include <sys/socket.h>
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
],
- [ struct sockaddr_storage s; s.__ss_family = 1; ],
- [ ac_cv_have___ss_family_in_struct_ss="yes" ],
- [ ac_cv_have___ss_family_in_struct_ss="no" ]
- )
-])
-if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
+ [
+ struct sockaddr_storage s;
+ s.__ss_family = 1;
+ ],
+ [ntp_cv_have___ss_family="yes"],
+ [ntp_cv_have___ss_family="no"]
+ )
+ ]
+ )
+ case "$ntp_cv_have___ss_family" in
+ yes)
AC_DEFINE(HAVE___SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have __ss_family?])
-fi
+ esac
+esac
-AH_VERBATIM([X_HAVE_SS_FAMILY_IN_SS],
-[/* Handle ss_family */
-#if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS)
-# define ss_family __ss_family
-#endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */])
+AH_VERBATIM(
+ [HAVE___SS_FAMILY_IN_SS_VERBATIM],
+ [
+ /* Handle sockaddr_storage.__ss_family */
+ #ifdef HAVE___SS_FAMILY_IN_SS
+ # define ss_family __ss_family
+ #endif /* HAVE___SS_FAMILY_IN_SS */
+ ]
+)
-AC_CACHE_CHECK([for ss_len field in struct sockaddr_storage],
- ac_cv_have_ss_len_in_struct_ss, [
+AC_CACHE_CHECK(
+ [for sockaddr_storage.ss_len],
+ ntp_cv_have_ss_len,
+ [
AC_TRY_COMPILE(
- [
-#include <sys/types.h>
-#include <sys/socket.h>
- ],
- [ struct sockaddr_storage s; s.ss_len = 1; ],
- [ ac_cv_have_ss_len_in_struct_ss="yes" ],
- [ ac_cv_have_ss_len_in_struct_ss="no" ],
+ [
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ ],
+ [
+ struct sockaddr_storage s;
+ s.ss_len = 1;
+ ],
+ [ntp_cv_have_ss_len="yes"],
+ [ntp_cv_have_ss_len="no"]
)
-])
-if test "x$ac_cv_have_ss_len_in_struct_ss" = "xyes" ; then
- AC_DEFINE(HAVE_SS_LEN_IN_SS, 1, [Does struct sockaddr_storage have ss_len?])
-fi
+ ]
+)
-AC_CACHE_CHECK([for __ss_len field in struct sockaddr_storage],
- ac_cv_have___ss_len_in_struct_ss, [
- AC_TRY_COMPILE(
+case "$ntp_cv_have_ss_len" in
+ no)
+ AC_CACHE_CHECK(
+ [for sockaddr_storage.__ss_len],
+ ntp_cv_have___ss_len,
+ [
+ AC_TRY_COMPILE(
[
-#include <sys/types.h>
-#include <sys/socket.h>
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
],
- [ struct sockaddr_storage s; s.__ss_len = 1; ],
- [ ac_cv_have___ss_len_in_struct_ss="yes" ],
- [ ac_cv_have___ss_len_in_struct_ss="no" ]
- )
-])
-if test "x$ac_cv_have___ss_len_in_struct_ss" = "xyes" ; then
+ [
+ struct sockaddr_storage s;
+ s.__ss_len = 1;
+ ],
+ [ntp_cv_have___ss_len="yes"],
+ [ntp_cv_have___ss_len="no"]
+ )
+ ]
+ )
+ case "$ntp_cv_have___ss_len" in
+ yes)
AC_DEFINE(HAVE___SS_LEN_IN_SS, 1, [Does struct sockaddr_storage have __ss_len?])
-fi
+ esac
+esac
-AH_VERBATIM([X_HAVE_SS_LEN_IN_SS],
-[/* Handle ss_len */
-#if !defined(HAVE_SS_LEN_IN_SS) && defined(HAVE___SS_LEN_IN_SS)
-# define ss_len __ss_len
-#endif /* !defined(HAVE_SS_LEN_IN_SS) && defined(HAVE_SA_LEN_IN_SS) */])
+AH_VERBATIM(
+ [HAVE___SS_LEN_IN_SS_VERBATIM],
+ [
+ /* Handle sockaddr_storage.__ss_len */
+ #ifdef HAVE___SS_LEN_IN_SS
+ # define ss_len __ss_len
+ #endif /* HAVE___SS_LEN_IN_SS */
+ ]
+)
+
+#
+# Look for in_port_t.
+#
+AC_CACHE_CHECK(
+ [for in_port_t],
+ isc_cv_have_in_port_t,
+ [
+ AC_TRY_COMPILE(
+ [
+ #include <sys/types.h>
+ #include <netinet/in.h>
+ ],
+ [
+ in_port_t port = 25;
+ return (0);
+ ],
+ [isc_cv_have_in_port_t=yes],
+ [isc_cv_have_in_port_t=no]
+ )
+ ]
+)
+case "$isc_cv_have_in_port_t" in
+ no)
+ AC_DEFINE(ISC_PLATFORM_NEEDPORTT, 1, [Declare in_port_t?])
+esac
case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
*yes*)
$ac_cv_func_getsockname_socklen_type,
[What is getsockname()'s socklen type?])
-AC_CACHE_CHECK(for struct sockaddr_storage, ac_cv_struct_sockaddr_storage,
-[AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-],[
-struct sockaddr_storage n;],
- ac_cv_struct_sockaddr_storage=yes,
- ac_cv_struct_sockaddr_storage=no)
-])
-if test $ac_cv_struct_sockaddr_storage = yes; then
- AC_DEFINE([HAVE_STRUCT_SOCKADDR_STORAGE], 1, [Does a system header define struct sockaddr_storage?])
-fi
+AC_CACHE_CHECK(
+ [for struct sockaddr_storage],
+ ntp_cv_sockaddr_storage,
+ [
+ AC_TRY_COMPILE(
+ [
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ ],
+ [
+ struct sockaddr_storage n;
+ ],
+ [ntp_cv_sockaddr_storage="yes"],
+ [ntp_cv_sockaddr_storage="no"]
+ )
+ ]
+)
+case "$ntp_cv_sockaddr_storage" in
+ yes)
+ AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1, [Does a system header define struct sockaddr_storage?])
+esac
AC_CACHE_CHECK(
- [for ss_family field in struct sockaddr_storage],
- ac_cv_have_ss_family_in_struct_ss,
+ [for sockaddr_storage.ss_family],
+ ntp_cv_have_ss_family,
[
AC_TRY_COMPILE(
[
- #include <sys/types.h>
- #include <sys/socket.h>
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
],
[
struct sockaddr_storage s;
s.ss_family = 1;
],
- [ac_cv_have_ss_family_in_struct_ss=yes],
- [ac_cv_have_ss_family_in_struct_ss=no]
+ [ntp_cv_have_ss_family="yes"],
+ [ntp_cv_have_ss_family="no"]
)
]
)
-if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
- AC_DEFINE(HAVE_SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have ss_family?])
-else
- # Hack around a problem...
- # HMS: This is $host because we need the -D if we are building *for* it.
- # HMS: 061029: Now that we separate the ss_* checks this is causing
- # a problem - disable it until we get to the bottom of it.
- case "$host" in
- XXX*-*-hpux11.11) CPPFLAGS="$CPPFLAGS -D_NETINET_IN6_H"
- ;;
+
+case "$ntp_cv_have_ss_family" in
+ no)
+ AC_CACHE_CHECK(
+ [for sockaddr_storage.__ss_family],
+ ntp_cv_have___ss_family,
+ [
+ AC_TRY_COMPILE(
+ [
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ ],
+ [
+ struct sockaddr_storage s;
+ s.__ss_family = 1;
+ ],
+ [ntp_cv_have___ss_family="yes"],
+ [ntp_cv_have___ss_family="no"]
+ )
+ ]
+ )
+ case "$ntp_cv_have___ss_family" in
+ yes)
+ AC_DEFINE(HAVE___SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have __ss_family?])
esac
-fi
+esac
+
+AH_VERBATIM(
+ [HAVE___SS_FAMILY_IN_SS_VERBATIM],
+ [
+ /* Handle sockaddr_storage.__ss_family */
+ #ifdef HAVE___SS_FAMILY_IN_SS
+ # define ss_family __ss_family
+ #endif /* HAVE___SS_FAMILY_IN_SS */
+ ]
+)
AC_CACHE_CHECK(
- [for __ss_family field in struct sockaddr_storage],
- ac_cv_have___ss_family_in_struct_ss,
+ [for sockaddr_storage.ss_len],
+ ntp_cv_have_ss_len,
[
AC_TRY_COMPILE(
[
- #include <sys/types.h>
- #include <sys/socket.h>
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
],
[
struct sockaddr_storage s;
- s.__ss_family = 1;
+ s.ss_len = 1;
],
- [ac_cv_have___ss_family_in_struct_ss=yes],
- [ac_cv_have___ss_family_in_struct_ss=no]
+ [ntp_cv_have_ss_len="yes"],
+ [ntp_cv_have_ss_len="no"]
)
-])
-if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
- AC_DEFINE(HAVE___SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have __ss_family?])
-fi
+ ]
+)
+
+case "$ntp_cv_have_ss_len" in
+ no)
+ AC_CACHE_CHECK(
+ [for sockaddr_storage.__ss_len],
+ ntp_cv_have___ss_len,
+ [
+ AC_TRY_COMPILE(
+ [
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_SYS_SOCKET_H
+ # include <sys/socket.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ # include <netinet/in.h>
+ #endif
+ ],
+ [
+ struct sockaddr_storage s;
+ s.__ss_len = 1;
+ ],
+ [ntp_cv_have___ss_len="yes"],
+ [ntp_cv_have___ss_len="no"]
+ )
+ ]
+ )
+ case "$ntp_cv_have___ss_len" in
+ yes)
+ AC_DEFINE(HAVE___SS_LEN_IN_SS, 1, [Does struct sockaddr_storage have __ss_len?])
+ esac
+esac
-AH_VERBATIM([X_HAVE_SS_FAMILY_IN_SS],
-[/* Handle ss_family */
-#if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS)
-# define ss_family __ss_family
-#endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */])
+AH_VERBATIM(
+ [HAVE___SS_LEN_IN_SS_VERBATIM],
+ [
+ /* Handle sockaddr_storage.__ss_len */
+ #ifdef HAVE___SS_LEN_IN_SS
+ # define ss_len __ss_len
+ #endif /* HAVE___SS_LEN_IN_SS */
+ ]
+)
#
# Look for in_port_t.