From: octo Date: Fri, 7 Apr 2006 17:41:25 +0000 (+0000) Subject: Fixed the configure script to include net/if.h and/or linux/if.h in the right order... X-Git-Tag: liboping-0.1.0~118 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cd377858836ed5466266d1a01030d6972f1f4702;p=collectd.git Fixed the configure script to include net/if.h and/or linux/if.h in the right order and other such annoying stuff.. --- diff --git a/configure.in b/configure.in index 5150146e..accdd0f9 100644 --- a/configure.in +++ b/configure.in @@ -152,8 +152,16 @@ AC_CHECK_HEADERS(utmp.h) AC_CHECK_HEADERS(utmpx.h) # For traffic plugin -AC_CHECK_HEADERS(net/if.h) AC_CHECK_HEADERS(ifaddrs.h) +AC_CHECK_HEADERS(net/if.h, [], [], +[ +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif +]) AC_CHECK_HEADERS(linux/if.h, [], [], [ #if HAVE_SYS_TYPES_H @@ -321,7 +329,11 @@ fi AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_obytes], [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])], [], - [#include ]) + [ + #include + #include + #include + ]) AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_bytes], [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])], [],