#endif
])
+# For ipvs module
+have_net_ip_vs_h="no"
+have_ip_vs_h="no"
+if test "x$ac_system" = "xLinux"
+then
+ AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
+ AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
+fi
+
# For quota module
AC_CHECK_HEADERS(sys/ucred.h, [], [],
[
plugin_disk="yes"
plugin_entropy="yes"
plugin_interface="yes"
- plugin_ipvs="yes"
plugin_irq="yes"
plugin_load="yes"
plugin_memory="yes"
plugin_tcpconns="yes"
plugin_vserver="yes"
plugin_wireless="yes"
+
+ if test "x$have_net_ip_vs_h" = "xyes" -o "x$have_ip_vs_h" = "xyes"
+ then
+ plugin_ipvs="yes"
+ fi
fi
# Mac OS X devices
AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
+dnl ip_vs.h
+if test "x$ac_system" = "xLinux" -a "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
+then
+ enable_ipvs="$enable_ipvs (ip_vs.h not found)"
+fi
+
dnl Perl bindings
AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
[
#include "plugin.h"
#include "common.h"
-#include <arpa/inet.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+#if HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif /* HAVE_ARPA_INET_H */
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif /* HAVE_SYS_SOCKET_H */
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif /* HAVE_NETINET_IN_H */
/* this can probably only be found in the kernel sources */
-#include <net/ip_vs.h>
+#if HAVE_NET_IP_VS_H
+# include <net/ip_vs.h>
+#elif HAVE_IP_VS_H
+# include <ip_vs.h>
+#endif /* HAVE_IP_VS_H */
#define log_err(...) ERROR ("ipvs: " __VA_ARGS__)