From 619cdcd8fb748ee06056fa4ef63dac7f24c7db1f Mon Sep 17 00:00:00 2001 From: Dagobert Michelsen Date: Thu, 11 Jun 2015 11:26:23 +0200 Subject: [PATCH] Automatically add -DSOLARIS2=8 if required for ip6_ext Fixes: #348 --- configure.ac | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/configure.ac b/configure.ac index 8572749f..11c11349 100644 --- a/configure.ac +++ b/configure.ac @@ -578,6 +578,34 @@ 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"], -- 2.30.2