$NetBSD: patch-af,v 1.15 2011/05/27 10:55:25 adam Exp $ --- configure.orig 2011-01-03 23:31:36.000000000 +0000 +++ configure @@ -19162,6 +19162,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_SYS_QUEUE_H #include #endif +#if HAVE_NET_ROUTE_H +#include +#endif #if HAVE_NETINET_IN_H #include #endif @@ -19259,6 +19262,9 @@ cat >>conftest.$ac_ext <<_ACEOF #if HAVE_NET_ROUTE_H #include #endif +#if HAVE_NETINET_IP_H +#include +#endif #include <$ac_header> @@ -28917,6 +28923,81 @@ fi ## ######################################### + +echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5 +echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6 +if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldes $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char des_cbc_encrypt (); +int +main () +{ +des_cbc_encrypt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_des_des_cbc_encrypt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_des_des_cbc_encrypt=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 +echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6 +if test $ac_cv_lib_des_des_cbc_encrypt = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDES 1 +_ACEOF + + LIBS="-ldes $LIBS" + +fi + + ## # Compilation-related ## @@ -37938,6 +38019,12 @@ char $ac_func (); #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif +#if HAVE_NET_IF_H +#include +#endif +#if HAVE_NET_ROUTE_H +#include +#endif int main () @@ -47154,6 +47241,219 @@ _ACEOF fi +{ $as_echo "$as_me:$LINENO: checking for struct ifnet.if_lastchange.tv_nsec" >&5 +$as_echo_n "checking for struct ifnet.if_lastchange.tv_nsec... " >&6; } +if test "${ac_cv_member_struct_ifnet_if_lastchange_tv_nsec+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef NETSNMP_IFNET_NEEDS_KERNEL +#define _KERNEL 1 +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_SYS_QUEUE_H +#include +#endif +#ifdef linux +struct ifnet { + char *if_name; /* name, e.g. "en" or "lo" */ + short if_unit; /* sub-unit for lower level driver */ + short if_mtu; /* maximum transmission unit */ + short if_flags; /* up/down, broadcast, etc. */ + int if_metric; /* routing metric (external only) */ + char if_hwaddr [6]; /* ethernet address */ + int if_type; /* interface type: 1=generic, + 28=slip, ether=6, loopback=24 */ + int if_speed; /* interface speed: in bits/sec */ + + struct sockaddr if_addr; /* interface's address */ + struct sockaddr ifu_broadaddr; /* broadcast address */ + struct sockaddr ia_subnetmask; /* interface's mask */ + + struct ifqueue { + int ifq_len; + int ifq_drops; + } if_snd; /* output queue */ + int if_ibytes; /* octets received on interface */ + int if_ipackets; /* packets received on interface */ + int if_ierrors; /* input errors on interface */ + int if_iqdrops; /* input queue overruns */ + int if_obytes; /* octets sent on interface */ + int if_opackets; /* packets sent on interface */ + int if_oerrors; /* output errors on interface */ + int if_collisions; /* collisions on csma interfaces */ +/* end statistics */ + struct ifnet *if_next; +}; +#endif + + +int +main () +{ +static struct ifnet ac_aggr; +if (ac_aggr.if_lastchange.tv_nsec) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_ifnet_if_lastchange_tv_nsec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef NETSNMP_IFNET_NEEDS_KERNEL +#define _KERNEL 1 +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_SYS_QUEUE_H +#include +#endif +#ifdef linux +struct ifnet { + char *if_name; /* name, e.g. "en" or "lo" */ + short if_unit; /* sub-unit for lower level driver */ + short if_mtu; /* maximum transmission unit */ + short if_flags; /* up/down, broadcast, etc. */ + int if_metric; /* routing metric (external only) */ + char if_hwaddr [6]; /* ethernet address */ + int if_type; /* interface type: 1=generic, + 28=slip, ether=6, loopback=24 */ + int if_speed; /* interface speed: in bits/sec */ + + struct sockaddr if_addr; /* interface's address */ + struct sockaddr ifu_broadaddr; /* broadcast address */ + struct sockaddr ia_subnetmask; /* interface's mask */ + + struct ifqueue { + int ifq_len; + int ifq_drops; + } if_snd; /* output queue */ + int if_ibytes; /* octets received on interface */ + int if_ipackets; /* packets received on interface */ + int if_ierrors; /* input errors on interface */ + int if_iqdrops; /* input queue overruns */ + int if_obytes; /* octets sent on interface */ + int if_opackets; /* packets sent on interface */ + int if_oerrors; /* output errors on interface */ + int if_collisions; /* collisions on csma interfaces */ +/* end statistics */ + struct ifnet *if_next; +}; +#endif + + +int +main () +{ +static struct ifnet ac_aggr; +if (sizeof ac_aggr.if_lastchange.tv_nsec) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_ifnet_if_lastchange_tv_nsec=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_ifnet_if_lastchange_tv_nsec=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifnet_if_lastchange_tv_nsec" >&5 +$as_echo "$ac_cv_member_struct_ifnet_if_lastchange_tv_nsec" >&6; } +if test "x$ac_cv_member_struct_ifnet_if_lastchange_tv_nsec" = x""yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC 1 +_ACEOF + + +fi { $as_echo "$as_me:$LINENO: checking for struct ifnet.if_mtu" >&5 $as_echo_n "checking for struct ifnet.if_mtu... " >&6; } if test "${ac_cv_member_struct_ifnet_if_mtu+set}" = set; then @@ -48674,8 +48974,10 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_SYS_SOCKET_H #ifdef NETSNMP_IFNET_NEEDS_KERNEL #define KERNEL +#if !defined(__DragonFly__) #define _KERNEL #endif +#endif #include #undef KERNEL #undef _KERNEL @@ -48732,8 +49034,10 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_SYS_SOCKET_H #ifdef NETSNMP_IFNET_NEEDS_KERNEL #define KERNEL +#if !defined(__DragonFly__) #define _KERNEL #endif +#endif #include #undef KERNEL #undef _KERNEL @@ -48813,8 +49117,10 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_SYS_SOCKET_H #ifdef NETSNMP_IFNET_NEEDS_KERNEL #define KERNEL +#if !defined(__DragonFly__) #define _KERNEL #endif +#endif #include #undef KERNEL #undef _KERNEL @@ -48871,8 +49177,10 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_SYS_SOCKET_H #ifdef NETSNMP_IFNET_NEEDS_KERNEL #define KERNEL +#if !defined(__DragonFly__) #define _KERNEL #endif +#endif #include #undef KERNEL #undef _KERNEL @@ -48952,8 +49260,10 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_SYS_SOCKET_H #ifdef NETSNMP_IFNET_NEEDS_KERNEL #define KERNEL +#if !defined(__DragonFly__) #define _KERNEL #endif +#endif #include #undef KERNEL #undef _KERNEL @@ -49010,8 +49320,10 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_SYS_SOCKET_H #ifdef NETSNMP_IFNET_NEEDS_KERNEL #define KERNEL +#if !defined(__DragonFly__) #define _KERNEL #endif +#endif #include #undef KERNEL #undef _KERNEL @@ -49091,8 +49403,10 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_SYS_SOCKET_H #ifdef NETSNMP_IFNET_NEEDS_KERNEL #define KERNEL +#if !defined(__DragonFly__) #define _KERNEL #endif +#endif #include #undef KERNEL #undef _KERNEL @@ -49149,8 +49463,10 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_SYS_SOCKET_H #ifdef NETSNMP_IFNET_NEEDS_KERNEL #define KERNEL +#if !defined(__DragonFly__) #define _KERNEL #endif +#endif #include #undef KERNEL #undef _KERNEL @@ -49230,8 +49546,10 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_SYS_SOCKET_H #ifdef NETSNMP_IFNET_NEEDS_KERNEL #define KERNEL +#if !defined(__DragonFly__) #define _KERNEL #endif +#endif #include #undef KERNEL #undef _KERNEL @@ -49288,8 +49606,10 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_SYS_SOCKET_H #ifdef NETSNMP_IFNET_NEEDS_KERNEL #define KERNEL +#if !defined(__DragonFly__) #define _KERNEL #endif +#endif #include #undef KERNEL #undef _KERNEL @@ -49369,8 +49689,10 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_SYS_SOCKET_H #ifdef NETSNMP_IFNET_NEEDS_KERNEL #define KERNEL +#if !defined(__DragonFly__) #define _KERNEL #endif +#endif #include #undef KERNEL #undef _KERNEL @@ -49427,8 +49749,10 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef HAVE_SYS_SOCKET_H #ifdef NETSNMP_IFNET_NEEDS_KERNEL #define KERNEL +#if !defined(__DragonFly__) #define _KERNEL #endif +#endif #include #undef KERNEL #undef _KERNEL @@ -49516,8 +49840,10 @@ cat >>conftest.$ac_ext <<_ACEOF #include #ifdef NETSNMP_IFNET_NEEDS_KERNEL #define KERNEL +#if !defined(__DragonFly__) #define _KERNEL #endif +#endif #include #undef KERNEL #undef _KERNEL @@ -49585,8 +49911,10 @@ cat >>conftest.$ac_ext <<_ACEOF #include #ifdef NETSNMP_IFNET_NEEDS_KERNEL #define KERNEL +#if !defined(__DragonFly__) #define _KERNEL #endif +#endif #include #undef KERNEL #undef _KERNEL