X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=553aa0ab25ee332c6759fc4246e6857a70fa00f7;hb=8c864f5e634118fce2446ebbba96a1cb7ec39dda;hp=2f3b38d7fb62f4d85132f9f80c40bb3299b29a13;hpb=550ff5da10244d6e4e97cb0719e133007012d08d;p=collectd.git diff --git a/configure.ac b/configure.ac index 2f3b38d7..553aa0ab 100644 --- a/configure.ac +++ b/configure.ac @@ -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 #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 +#endif +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_NETINET_IN_SYSTM_H +# include +#endif +#if HAVE_NETINET_IN_H +# include +#endif +#if HAVE_NETINET_IP6_H +# include +#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"