diff options
author | Bruce A. Mah <bmah@es.net> | 2014-04-10 11:20:36 -0700 |
---|---|---|
committer | Bruce A. Mah <bmah@es.net> | 2014-04-10 11:20:36 -0700 |
commit | 4155c45471b52cd6f5d608f9d1424370da9dc5aa (patch) | |
tree | ed3df0ea6255ee04fa2bfb07f61077e6cb71e82a /configure.ac | |
parent | 8cb96d14055ce8260c8bebf859c393180217fb16 (diff) | |
download | iperf3-4155c45471b52cd6f5d608f9d1424370da9dc5aa.tar.gz |
Improve detection of IPv6 flowlabel support (Linux only).
We check at configure-time to see if IPV6_FLOWLABEL_MGR is defined
in <linux/in.6>, if it is we set a HAVE_FLOWLABEL CPP symbol to
turn on conditional compilation of the support for this feature.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8c26b7e..a67aa78 100644 --- a/configure.ac +++ b/configure.ac @@ -63,4 +63,21 @@ if test "x$iperf3_cv_header_tcp_congestion" = "xyes"; then AC_DEFINE([HAVE_TCP_CONGESTION], [1], [Have TCP_CONGESTION sockopt.]) fi +# Check for IPv6 flowlabel support (believed to be Linux only) +# We check for IPV6_FLOWLABEL_MGR in <linux/in6.h> even though we +# don't use that file directly (we have our own stripped-down +# copy, see src/flowlabel.h for more details). +AC_CACHE_CHECK([IPv6 flowlabel support], +[iperf3_cv_header_flowlabel], +AC_EGREP_CPP(yes, +[#include <sys/types.h> +#include <linux/in6.h> +#ifdef IPV6_FLOWLABEL_MGR + yes +#endif +],iperf3_cv_header_flowlabel=yes,iperf3_cv_header_flowlabel=no)) +if test "x$iperf3_cv_header_flowlabel" = "xyes"; then + AC_DEFINE([HAVE_FLOWLABEL], [1], [Have IPv6 flowlabel support.]) +fi + AC_OUTPUT([Makefile src/Makefile examples/Makefile]) |