contrib/fedora/collectd.spec: Updated for 4.0.6.
[collectd.git] / configure.in
index b3e591d..41bb709 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(collectd, 4.0.3)
+AC_INIT(collectd, 4.0.6)
 AC_CONFIG_SRCDIR(src/collectd.c)
 AC_CONFIG_HEADERS(src/config.h)
 AM_INIT_AUTOMAKE(dist-bzip2)
@@ -189,7 +189,16 @@ AC_CHECK_HEADERS(netinet/udp.h, [], [],
 ])
 
 # For cpu modules
-AC_CHECK_HEADERS(sys/sysctl.h sys/dkstat.h)
+AC_CHECK_HEADERS(sys/sysctl.h, [], [],
+[
+#if HAVE_SYS_TYPES_H
+#  include <sys/types.h>
+#endif
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+])
+AC_CHECK_HEADERS(sys/dkstat.h)
 AC_CHECK_HEADERS(mach/mach_init.h)
 AC_CHECK_HEADERS(mach/host_priv.h)
 AC_CHECK_HEADERS(mach/mach_error.h)
@@ -240,7 +249,15 @@ AC_CHECK_HEADERS(sys/loadavg.h)
 AC_CHECK_HEADERS(linux/config.h)
 
 # For the swap module
-AC_CHECK_HEADERS(sys/swap.h)
+AC_CHECK_HEADERS(sys/swap.h, [], [],
+[
+#if HAVE_SYS_TYPES_H
+#  include <sys/types.h>
+#endif
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+])
 
 # For users module
 AC_CHECK_HEADERS(utmp.h)
@@ -283,7 +300,16 @@ AC_CHECK_HEADERS(linux/netdevice.h, [], [],
 AC_CHECK_HEADERS(curl/curl.h)
 
 # For quota module
-AC_CHECK_HEADERS(pwd.h sys/ucred.h)
+AC_CHECK_HEADERS(pwd.h)
+AC_CHECK_HEADERS(sys/ucred.h, [], [],
+[
+#if HAVE_SYS_TYPES_H
+#  include <sys/types.h>
+#endif
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+])
 AC_CHECK_HEADERS(ctype.h)
 AC_CHECK_HEADERS(limits.h)
 AC_CHECK_HEADERS(sys/quota.h)
@@ -299,7 +325,15 @@ AC_CHECK_HEADERS(sys/fstyp.h)
 AC_CHECK_HEADERS(sys/fs_types.h)
 AC_CHECK_HEADERS(sys/mntent.h)
 AC_CHECK_HEADERS(sys/mnttab.h)
-AC_CHECK_HEADERS(sys/mount.h)
+AC_CHECK_HEADERS(sys/mount.h, [], [],
+[
+#if HAVE_SYS_TYPES_H
+#  include <sys/types.h>
+#endif
+#if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+])
 AC_CHECK_HEADERS(sys/statfs.h)
 AC_CHECK_HEADERS(sys/statvfs.h)
 AC_CHECK_HEADERS(sys/vfs.h)
@@ -325,7 +359,13 @@ AC_CHECK_HEADERS(stdarg.h)
 AC_CHECK_HEADERS(regex.h)
 
 # For the dns plugin
-AC_CHECK_HEADERS(arpa/nameser.h arpa/nameser_compat.h)
+AC_CHECK_HEADERS(arpa/nameser.h)
+AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
+[
+#if HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h>
+#endif
+])
 
 AC_CHECK_HEADERS(net/if_arp.h, [], [],
 [#if HAVE_SYS_SOCKET_H
@@ -384,6 +424,9 @@ AC_CHECK_FUNCS(strchr memcpy strstr strcmp strncmp strncpy strlen)
 AC_CHECK_FUNCS(strncasecmp strcasecmp)
 AC_CHECK_FUNCS(openlog syslog closelog)
 
+AC_CHECK_FUNCS(getpwnam_r)
+AC_CHECK_FUNCS(getgrnam_r)
+
 socket_needs_socket="no"
 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
@@ -410,10 +453,6 @@ AC_CHECK_FUNCS(thread_info)
 # For users module
 AC_CHECK_FUNCS(getutent getutxent)
 
-# For quota module
-AC_CHECK_FUNCS(quotactl)
-AC_CHECK_FUNCS(getgrgid getpwuid)
-
 # For interface module
 AC_CHECK_FUNCS(getifaddrs)