Merge branch 'collectd-5.4' into collectd-5.5
[collectd.git] / configure.ac
index 6460965..5d5e693 100644 (file)
@@ -90,12 +90,12 @@ case $host_os in
 esac
 AC_MSG_RESULT([$ac_system])
 
-AM_CONDITIONAL([BUILD_LINUX],[test "x$x$ac_system" = "xLinux"])
-AM_CONDITIONAL([BUILD_SOLARIS],[test "x$x$ac_system" = "xSolaris"])
-AM_CONDITIONAL([BUILD_DARWIN],[test "x$x$ac_system" = "xDarwin"])
-AM_CONDITIONAL([BUILD_OPENBSD],[test "x$x$ac_system" = "xOpenBSD"])
-AM_CONDITIONAL([BUILD_AIX],[test "x$x$ac_system" = "xAIX"])
-AM_CONDITIONAL([BUILD_FREEBSD],[test "x$x$ac_system" = "xFreeBSD"])
+AM_CONDITIONAL([BUILD_LINUX],[test "x$ac_system" = "xLinux"])
+AM_CONDITIONAL([BUILD_SOLARIS],[test "x$ac_system" = "xSolaris"])
+AM_CONDITIONAL([BUILD_DARWIN],[test "x$ac_system" = "xDarwin"])
+AM_CONDITIONAL([BUILD_OPENBSD],[test "x$ac_system" = "xOpenBSD"])
+AM_CONDITIONAL([BUILD_AIX],[test "x$ac_system" = "xAIX"])
+AM_CONDITIONAL([BUILD_FREEBSD],[test "x$ac_system" = "xFreeBSD"])
 
 if test "x$ac_system" = "xLinux"
 then
@@ -115,7 +115,7 @@ then
        AC_DEFINE(_REENTRANT,               1, [Define to enable reentrancy interfaces.])
 
        AC_MSG_CHECKING([whether compiler builds 64bit binaries])
-       AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
                           #ifndef _LP64
                           # error "Compiler not in 64bit mode."
                           #endif
@@ -298,7 +298,8 @@ AC_CHECK_HEADERS(netinet/udp.h, [], [],
 #endif
 ])
 
-AC_CHECK_TYPES([struct ip6_ext], [], [],
+have_ip6_ext="no"
+AC_CHECK_TYPES([struct ip6_ext], [have_ip6_ext="yes"], [have_ip6_ext="no"],
 [#if HAVE_STDINT_H
 # include <stdint.h>
 #endif
@@ -316,6 +317,35 @@ AC_CHECK_TYPES([struct ip6_ext], [], [],
 #endif
 ])
 
+if test "x$have_ip6_ext" = "xno"; then
+       SAVE_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS -DSOLARIS2=8"
+
+       AC_CHECK_TYPES([struct ip6_ext],
+                      [have_ip6_ext="yes, with -DSOLARIS2=8"],
+                      [have_ip6_ext="no"],
+[#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP6_H
+# include <netinet/ip6.h>
+#endif
+])
+
+       if test "x$have_ip6_ext" = "xno"; then
+               CFLAGS="$SAVE_CFLAGS"
+       fi
+fi
+
 # For cpu modules
 AC_CHECK_HEADERS(sys/dkstat.h)
 if test "x$ac_system" = "xDarwin"
@@ -614,14 +644,14 @@ AC_CHECK_HEADERS(asm/msr-index.h, [have_asm_msrindex_h="yes"])
 
 if test "x$have_asm_msrindex_h" = "xyes"
 then
-  AC_CACHE_CHECK([whether asm/msr-index.h has MSR_CORE_C3_RESIDENCY],
+  AC_CACHE_CHECK([whether asm/msr-index.h has MSR_PKG_C10_RESIDENCY],
                  [c_cv_have_usable_asm_msrindex_h],
                  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
 [[[
 #include<asm/msr-index.h>
 ]]],
 [[[
-int y = MSR_CORE_C3_RESIDENCY;
+int y = MSR_PKG_C10_RESIDENCY;
 return(y);
 ]]]
   )],
@@ -2532,7 +2562,7 @@ then
        SAVE_CPPFLAGS="$CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
 
-       AC_CHECK_HEADERS(modbus/modbus.h, [], [with_libmodbus="no (modbus/modbus.h not found)"])
+       AC_CHECK_HEADERS(modbus.h, [], [with_libmodbus="no (modbus.h not found)"])
 
        CPPFLAGS="$SAVE_CPPFLAGS"
 fi
@@ -3672,8 +3702,8 @@ fi
 # }}} --with-python
 
 # --with-librabbitmq {{{
-with_librabbitmq_cppflags=""
-with_librabbitmq_ldflags=""
+with_librabbitmq_cppflags="-I/usr/local/include"
+with_librabbitmq_ldflags="-L/usr/local/lib"
 AC_ARG_WITH(librabbitmq, [AS_HELP_STRING([--with-librabbitmq@<:@=PREFIX@:>@], [Path to librabbitmq.])],
 [
        if test "x$withval" != "xno" && test "x$withval" != "xyes"
@@ -4761,11 +4791,11 @@ then
 
        CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
 
-       AC_CHECK_HEADERS(varnish/vapi/vsc.h,
+       AC_CHECK_HEADERS(vapi/vsc.h,
                [AC_DEFINE([HAVE_VARNISH_V4], [1], [Varnish 4 API support])],
-               [AC_CHECK_HEADERS(varnish/vsc.h,
+               [AC_CHECK_HEADERS(vsc.h,
                        [AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support])],
-                       [AC_CHECK_HEADERS(varnish/varnishapi.h,
+                       [AC_CHECK_HEADERS(varnishapi.h,
                                [AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])],
                                [with_libvarnish="no (found none of the varnish header files)"])])])
 
@@ -5274,15 +5304,15 @@ fi
 
 if test "x$ac_system" = "xAIX"
 then
-        plugin_tcpconns="yes"
-        plugin_ipc="yes"
+       plugin_tcpconns="yes"
+       plugin_ipc="yes"
 fi
 
 # FreeBSD
 
 if test "x$ac_system" = "xFreeBSD"
 then
-        plugin_zfs_arc="yes"
+       plugin_zfs_arc="yes"
 fi