summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2931f54)
raw | patch | inline | side by side (parent: 2931f54)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 6 Apr 2007 08:07:18 +0000 (10:07 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 6 Apr 2007 08:07:18 +0000 (10:07 +0200) |
Also changed `src/Makefile.am' to link `collectd-nagios' with `libsocket' if needed.
configure.in | patch | blob | history | |
src/Makefile.am | patch | blob | history |
diff --git a/configure.in b/configure.in
index dad499a9ddec0e9aa185a04ebbb9c17faa21b969..8f9e3be6103847215ca28c39b0f826bb656e7af0 100644 (file)
--- a/configure.in
+++ b/configure.in
AC_CHECK_HEADERS(arpa/inet.h)
AC_CHECK_HEADERS(sys/resource.h)
AC_CHECK_HEADERS(sys/param.h)
+AC_CHECK_HEADERS(kstat.h)
# For ping library
AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
# For the dns plugin
AC_CHECK_HEADERS(arpa/nameser.h arpa/nameser_compat.h)
-AC_CHECK_HEADERS(net/if_arp.h)
+AC_CHECK_HEADERS(net/if_arp.h, [], [],
+[#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+])
AC_CHECK_HEADERS(net/if_ppp.h)
-AC_CHECK_HEADERS(netinet/if_ether.h)
+AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
+[#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+#if HAVE_NET_IF_H
+# include <net/if.h>
+#endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+])
# For the multimeter plugin
AC_CHECK_HEADERS(termios.h)
#endif
])
+AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
+ [],
+ [],
+ [
+#if HAVE_KSTAT_H
+# include <kstat.h>
+#endif
+ ])
+
AC_MSG_CHECKING([for kernel type ($host_os)])
case $host_os in
*linux*)
diff --git a/src/Makefile.am b/src/Makefile.am
index 32bef648842279d049a14b26123c648074204adb..23d82aa5e563f57ddd0a1ebac1d255f11941a389 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
collectd_DEPENDENCIES = $(LIBLTDL) liboconfig/liboconfig.la
collectd_nagios_SOURCES = collectd-nagios.c
+collectd_nagios_LDFLAGS =
+if BUILD_WITH_LIBSOCKET
+collectd_nagios_LDFLAGS += -lsocket
+endif
pkglib_LTLIBRARIES =