X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=configure.ac;h=be1f02ef46dee175a28ed7e2972b827f97fb33d8;hb=4cee263e4f6a1cc0cf98f8f30f1687e99dcc74b5;hp=11c113491a1a2682ec965b6a41b7eb6acde3e15c;hpb=619cdcd8fb748ee06056fa4ef63dac7f24c7db1f;p=collectd.git diff --git a/configure.ac b/configure.ac index 11c11349..be1f02ef 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,8 @@ m4_ifdef([LT_PACKAGE_VERSION], ] ) +AM_CONDITIONAL([BUILD_INCLUDED_LTDL], [test "x$LTDLDEPS" != "x"]) + AM_INIT_AUTOMAKE([tar-pax dist-bzip2 foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_LANG(C) @@ -276,7 +278,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 @@ -294,6 +297,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" @@ -578,34 +610,6 @@ AC_CHECK_HEADERS(netinet/if_ether.h, [], [], AC_CHECK_HEADERS(netinet/ip_compat.h) -AC_CHECK_MEMBER([struct ip6_ext.ip6e_len], [], -[ -# Solaris needs special definition to have ip6_ext defined - # Invalidate cache so we can retest - AS_UNSET([ac_cv_member_struct_ip6_ext_ip6e_len]) - - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -DSOLARIS2=8" - AC_CHECK_MEMBER([struct ip6_ext.ip6e_len],[c_cv_ip6_ext_needs_d_solaris2_8=yes], [], -[[#if HAVE_NETINET_IP_COMPAT_H -# include -#endif -]]) - CFLAGS="$SAVE_CFLAGS" -],[[#if HAVE_NETINET_IP_COMPAT_H -# include -#endif -]]) - -AC_MSG_CHECKING([if struct ip6_ext.ip6e_len reauired -DSOLARIS2=8]) -if test "x$c_cv_ip6_ext_needs_d_solaris2_8" = "xyes" -then - AC_MSG_RESULT([yes]) - CFLAGS="$CFLAGS -DSOLARIS2=8" -else - AC_MSG_RESULT([no]) -fi - have_net_pfvar_h="no" AC_CHECK_HEADERS(net/pfvar.h, [have_net_pfvar_h="yes"], @@ -620,6 +624,9 @@ AC_CHECK_HEADERS(net/pfvar.h, #if HAVE_NET_IF_H # include #endif +#if HAVE_NETINET_IN_H +# include +#endif ]) # For the multimeter plugin @@ -2454,7 +2461,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 @@ -3128,11 +3135,6 @@ then fi if test "x$with_libpcap" = "xyes" then - AC_CHECK_HEADERS(pcap-bpf.h,, - [with_libpcap="no (pcap-bpf.h not found)"]) -fi -if test "x$with_libpcap" = "xyes" -then AC_CACHE_CHECK([whether libpcap has PCAP_ERROR_IFACE_NOT_UP], [c_cv_libpcap_have_pcap_error_iface_not_up], AC_COMPILE_IFELSE([AC_LANG_PROGRAM(