149a5771aSDavid Bar-On# iperf, Copyright (c) 2014-2022, The Regents of the University of 2da9f046fSBruce A. Mah# California, through Lawrence Berkeley National Laboratory (subject 3da9f046fSBruce A. Mah# to receipt of any required approvals from the U.S. Dept. of 4da9f046fSBruce A. Mah# Energy). All rights reserved. 5da9f046fSBruce A. Mah# 6da9f046fSBruce A. Mah# If you have questions about your rights to use or distribute this 7da9f046fSBruce A. Mah# software, please contact Berkeley Lab's Technology Transfer 8da9f046fSBruce A. Mah# Department at [email protected]. 9da9f046fSBruce A. Mah# 10da9f046fSBruce A. Mah# NOTICE. This software is owned by the U.S. Department of Energy. 11da9f046fSBruce A. Mah# As such, the U.S. Government has been granted for itself and others 12da9f046fSBruce A. Mah# acting on its behalf a paid-up, nonexclusive, irrevocable, 13da9f046fSBruce A. Mah# worldwide license in the Software to reproduce, prepare derivative 14da9f046fSBruce A. Mah# works, and perform publicly and display publicly. Beginning five 15da9f046fSBruce A. Mah# (5) years after the date permission to assert copyright is obtained 16da9f046fSBruce A. Mah# from the U.S. Department of Energy, and subject to any subsequent 17da9f046fSBruce A. Mah# five (5) year renewals, the U.S. Government is granted for itself 18da9f046fSBruce A. Mah# and others acting on its behalf a paid-up, nonexclusive, 19da9f046fSBruce A. Mah# irrevocable, worldwide license in the Software to reproduce, 20da9f046fSBruce A. Mah# prepare derivative works, distribute copies to the public, perform 21da9f046fSBruce A. Mah# publicly and display publicly, and to permit others to do so. 22da9f046fSBruce A. Mah# 23da9f046fSBruce A. Mah# This code is distributed under a BSD style license, see the LICENSE 24da9f046fSBruce A. Mah# file for complete information. 25da9f046fSBruce A. Mah 26f4a3ddaaSAaronMatthewBrown# Initialize the autoconf system for the specified tool, version and mailing list 278a8c7edcSBruce A. MahAC_PREREQ([2.71]) 28d83ffa33SBruce A. MahAC_INIT([iperf],[3.11],[https://github.com/esnet/iperf],[iperf],[https://software.es.net/iperf/]) 29a026b29bSBruce A. Mahm4_include([config/ax_check_openssl.m4]) 309427ecdfSEzram4_include([config/iperf_config_static_bin.m4]) 313b60f090SBruce A. MahAC_LANG(C) 32f4a3ddaaSAaronMatthewBrown 33f4a3ddaaSAaronMatthewBrown# Specify where the auxiliary files created by configure should go. The config 34f4a3ddaaSAaronMatthewBrown# directory is picked so that they don't clutter up more useful directories. 35f4a3ddaaSAaronMatthewBrownAC_CONFIG_AUX_DIR(config) 36f4a3ddaaSAaronMatthewBrown 37f4a3ddaaSAaronMatthewBrown 38f4a3ddaaSAaronMatthewBrown# Initialize the automake system 39f64da9b9SHkAM_INIT_AUTOMAKE([foreign]) 409427ecdfSEzram4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 419427ecdfSEzraLT_INIT 429427ecdfSEzra 436edfd8d6SBruce A. MahAM_MAINTAINER_MODE 448a8c7edcSBruce A. MahAC_CONFIG_HEADERS(src/iperf_config.h) 45f4a3ddaaSAaronMatthewBrown 46f4a3ddaaSAaronMatthewBrownAC_CANONICAL_HOST 47f4a3ddaaSAaronMatthewBrown 48f4a3ddaaSAaronMatthewBrown# Checks for tools: c compiler, ranlib (used for creating static libraries), 49f4a3ddaaSAaronMatthewBrown# symlinks and libtool 50f4a3ddaaSAaronMatthewBrownAC_PROG_CC 51f4a3ddaaSAaronMatthewBrownAC_PROG_RANLIB 52f4a3ddaaSAaronMatthewBrownAC_PROG_LN_S 53318fbf2eSBruce A. MahLT_INIT 54f4a3ddaaSAaronMatthewBrown 5594c0bfffSBruce A. Mah# Add -Wall if we are using GCC. 568de51b58SBruce A. Mahif test "x$GCC" = "xyes"; then 5794c0bfffSBruce A. Mah CFLAGS="$CFLAGS -Wall" 588de51b58SBruce A. Mahfi 598de51b58SBruce A. Mah 604a3efb37SBruce A. Mah# Check if enable profiling 61e6689a8cSHkAC_ARG_ENABLE([profiling], 62215acfe7SAlexandru-Sever Horin AS_HELP_STRING([--enable-profiling], [Enable iperf3 profiling binary])) 63e6689a8cSHkAM_CONDITIONAL([ENABLE_PROFILING], [test x$enable_profiling = xyes]) 64e6689a8cSHk 65ed94082bSBruce A. Mah# Check for the math library (needed by cjson on some platforms) 66ed94082bSBruce A. MahAC_SEARCH_LIBS(floor, [m], [], [ 67ed94082bSBruce A. Mahecho "floor()" 68ed94082bSBruce A. Mahexit 1 69ed94082bSBruce A. Mah]) 70ed94082bSBruce A. Mah 71165d10deSAnte Vojvodic# On illumos we need -lsocket 72165d10deSAnte VojvodicAC_SEARCH_LIBS(socket, [socket], [], [ 73165d10deSAnte Vojvodicecho "socket()" 74165d10deSAnte Vojvodicexit 1 75165d10deSAnte Vojvodic]) 76165d10deSAnte Vojvodic 77165d10deSAnte Vojvodic# On illumos inet_ntop in in -lnsl 78165d10deSAnte VojvodicAC_SEARCH_LIBS(inet_ntop, [nsl], [], [ 79165d10deSAnte Vojvodicecho "inet_ntop()" 80165d10deSAnte Vojvodicexit 1 81165d10deSAnte Vojvodic]) 82165d10deSAnte Vojvodic 83f4a3ddaaSAaronMatthewBrown# Checks for typedefs, structures, and compiler characteristics. 84f4a3ddaaSAaronMatthewBrownAC_C_CONST 85f4a3ddaaSAaronMatthewBrown 869d7d60acSBruce A. Mah# Check for poll.h (it's in POSIX so everyone should have it?) 879d7d60acSBruce A. MahAC_CHECK_HEADERS([poll.h]) 889d7d60acSBruce A. Mah 89f72054ebSBruce A. Mah# SCTP. Allow user to disable SCTP support with --without-sctp. 90f72054ebSBruce A. Mah# Otherwise we try to find whatever support is required. 91f72054ebSBruce A. Mahtry_sctp=true 92f72054ebSBruce A. MahAC_ARG_WITH([sctp], 93f72054ebSBruce A. Mah [AS_HELP_STRING([--without-sctp], 94f72054ebSBruce A. Mah [disable SCTP])], 95f72054ebSBruce A. Mah [ 96f72054ebSBruce A. Mah case "$withval" in 97f72054ebSBruce A. Mah y | ye | yes) 98f72054ebSBruce A. Mah ;; 99f72054ebSBruce A. Mah n | no) 100f72054ebSBruce A. Mah try_sctp=false 101f72054ebSBruce A. Mah ;; 102f72054ebSBruce A. Mah *) 103f72054ebSBruce A. Mah AC_MSG_ERROR([Invalid --with-sctp value]) 104f72054ebSBruce A. Mah ;; 105f72054ebSBruce A. Mah esac 106f72054ebSBruce A. Mah ], [ 107f72054ebSBruce A. Mah try_sctp=true 108f72054ebSBruce A. Mah ] 109f72054ebSBruce A. Mah) 110f72054ebSBruce A. Mah 11147985d7fSShuo ChenAC_CHECK_HEADERS([linux/tcp.h]) 11247985d7fSShuo Chen 113cd81de3cSBruce A. Mah# Check for SCTP support 114f72054ebSBruce A. Mahif $try_sctp; then 115ddf55791SBruce A. MahAC_CHECK_HEADERS([sys/socket.h]) 116cd81de3cSBruce A. MahAC_CHECK_HEADERS([netinet/sctp.h], 1170b0aa349SStefano Garzarella AC_DEFINE([HAVE_SCTP_H], [1], [Have SCTP support.]) 1188fb86886SBruce A. Mah AC_SEARCH_LIBS(sctp_bindx, [sctp]) 1198fb86886SBruce A. Mah AC_CHECK_TYPES([struct sctp_assoc_value], [], [], 1208fb86886SBruce A. Mah [[#include <netinet/sctp.h>]]), 121ddf55791SBruce A. Mah [], 122ddf55791SBruce A. Mah [#ifdef HAVE_SYS_SOCKET_H 123ddf55791SBruce A. Mah#include <sys/socket.h> 124ddf55791SBruce A. Mah#endif 125ddf55791SBruce A. Mah]) 126f72054ebSBruce A. Mahfi 127cd81de3cSBruce A. Mah 128d88f4cecSPhilip PrindevilleAC_CHECK_HEADER([endian.h], 129d88f4cecSPhilip Prindeville AC_DEFINE([HAVE_ENDIAN_H], [1], [Define to 1 if you have the <endian.h> header file.]), 130d88f4cecSPhilip Prindeville AC_CHECK_HEADER([sys/endian.h], 131d88f4cecSPhilip Prindeville AC_DEFINE([HAVE_SYS_ENDIAN_H], [1], [Define to 1 if you have the <sys/endian.h> header file.]), 132d88f4cecSPhilip Prindeville AC_MSG_WARN([Couldn't find endian.h or sys/endian.h files: doing compile-time tests.]) 133d88f4cecSPhilip Prindeville ) 134d88f4cecSPhilip Prindeville ) 135d88f4cecSPhilip Prindeville 1363fd1a2aeSralciniif test "x$with_openssl" = "xno"; then 1373fd1a2aeSralcini AC_MSG_WARN( [Building without OpenSSL; disabling iperf_auth functionality.] ) 1383fd1a2aeSralcinielse 139a51045deSralcini # Check for OPENSSL support 140f7817145Shhb havs_ssl=false 141a51045deSralcini AX_CHECK_OPENSSL( 142f7817145Shhb [ AC_DEFINE([HAVE_SSL], [1], [OpenSSL Is Available]) 143f7817145Shhb have_ssl=true ], 1444a45b32bSBruce A. Mah [ if test "x$with_openssl" != "x"; then 1454a45b32bSBruce A. Mah AC_MSG_FAILURE([--with-openssl was given, but test for OpenSSL failed]) 1464a45b32bSBruce A. Mah fi ] 147a51045deSralcini ) 148f7817145Shhb if $have_ssl; then 149cf1cad40Sralcini case $host in 150cf1cad40Sralcini *-*-cygwin) 151cf1cad40Sralcini CFLAGS="$CFLAGS -DNOCRYPT" 152cf1cad40Sralcini ;; 153cf1cad40Sralcini esac 154a51045deSralcini LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS" 155a51045deSralcini LIBS="$OPENSSL_LIBS $LIBS" 156a51045deSralcini CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS" 1573fd1a2aeSralcini fi 158f7817145Shhbfi 159a51045deSralcini 1600932b664SBruce A. Mah# Check for TCP_CONGESTION sockopt (believed to be Linux and FreeBSD only) 161c550ef46SBruce A. MahAC_CACHE_CHECK([TCP_CONGESTION socket option], 162c550ef46SBruce A. Mah[iperf3_cv_header_tcp_congestion], 1638a8c7edcSBruce A. MahAC_COMPILE_IFELSE( 1648a8c7edcSBruce A. Mah [AC_LANG_PROGRAM([[#include <netinet/tcp.h>]], 1658a8c7edcSBruce A. Mah [[int foo = TCP_CONGESTION;]])], 1668a8c7edcSBruce A. Mah iperf3_cv_header_tcp_congestion=yes, 1678a8c7edcSBruce A. Mah iperf3_cv_header_tcp_congestion=no)) 168c550ef46SBruce A. Mahif test "x$iperf3_cv_header_tcp_congestion" = "xyes"; then 169c550ef46SBruce A. Mah AC_DEFINE([HAVE_TCP_CONGESTION], [1], [Have TCP_CONGESTION sockopt.]) 170c550ef46SBruce A. Mahfi 171c550ef46SBruce A. Mah 172*9eef1603SDavid Bar-On# Check for TCP_USER_TIMEOUT sockopt (believed to be Linux 2.6.37+ only) 173*9eef1603SDavid Bar-OnAC_CACHE_CHECK([TCP_USER_TIMEOUT socket option], 174*9eef1603SDavid Bar-On[iperf3_cv_header_tcp_user_timeout], 175*9eef1603SDavid Bar-OnAC_COMPILE_IFELSE( 176*9eef1603SDavid Bar-On [AC_LANG_PROGRAM([[#include <netinet/tcp.h>]], 177*9eef1603SDavid Bar-On [[int foo = TCP_USER_TIMEOUT;]])], 178*9eef1603SDavid Bar-On iperf3_cv_header_tcp_user_timeout=yes, 179*9eef1603SDavid Bar-On iperf3_cv_header_tcp_user_timeout=no)) 180*9eef1603SDavid Bar-Onif test "x$iperf3_cv_header_tcp_user_timeout" = "xyes"; then 181*9eef1603SDavid Bar-On AC_DEFINE([HAVE_TCP_USER_TIMEOUT], [1], [Have TCP_USER_TIMEOUT sockopt.]) 182*9eef1603SDavid Bar-Onfi 183*9eef1603SDavid Bar-On 1844155c454SBruce A. Mah# Check for IPv6 flowlabel support (believed to be Linux only) 1854155c454SBruce A. Mah# We check for IPV6_FLOWLABEL_MGR in <linux/in6.h> even though we 1864155c454SBruce A. Mah# don't use that file directly (we have our own stripped-down 1874155c454SBruce A. Mah# copy, see src/flowlabel.h for more details). 1884155c454SBruce A. MahAC_CACHE_CHECK([IPv6 flowlabel support], 1894155c454SBruce A. Mah[iperf3_cv_header_flowlabel], 1908a8c7edcSBruce A. MahAC_COMPILE_IFELSE( 1918a8c7edcSBruce A. Mah [AC_LANG_PROGRAM([[#include <sys/types.h> 1928a8c7edcSBruce A. Mah #include <linux/in6.h>]], 1938a8c7edcSBruce A. Mah [[int foo = IPV6_FLOWLABEL_MGR;]])], 1948a8c7edcSBruce A. Mah iperf3_cv_header_flowlabel=yes, 1958a8c7edcSBruce A. Mah iperf3_cv_header_flowlabel=no)) 1964155c454SBruce A. Mahif test "x$iperf3_cv_header_flowlabel" = "xyes"; then 1974155c454SBruce A. Mah AC_DEFINE([HAVE_FLOWLABEL], [1], [Have IPv6 flowlabel support.]) 1984155c454SBruce A. Mahfi 1994155c454SBruce A. Mah 20040a1faf3SBruce A. Mah# Check for CPU affinity support. FreeBSD and Linux do this differently 20140a1faf3SBruce A. Mah# unfortunately so we have to check separately for each of them. 20240a1faf3SBruce A. Mah# FreeBSD uses cpuset_setaffinity while Linux uses sched_setaffinity. 20340a1faf3SBruce A. Mah# Define HAVE_CPU_AFFINITY to indicate the CPU affinity setting as a 20440a1faf3SBruce A. Mah# generic concept is available. 2055b27ea39SBoris OkunevAC_CHECK_FUNCS([cpuset_setaffinity sched_setaffinity SetProcessAffinityMask], 20640a1faf3SBruce A. Mah AC_DEFINE([HAVE_CPU_AFFINITY], [1], 20740a1faf3SBruce A. Mah [Have CPU affinity support.])) 20840a1faf3SBruce A. Mah 20973b02f98SBruce A. Mah# Check for daemon(). Most systems have this but a few (IRIX) don't. 21073b02f98SBruce A. MahAC_CHECK_FUNCS([daemon]) 21173b02f98SBruce A. Mah 2123f8c33cdSBruce A. Mah# Check for sendfile support. FreeBSD, Linux, and MacOS all support 2133f8c33cdSBruce A. Mah# this system call, but they're all different in terms of what headers 2143f8c33cdSBruce A. Mah# it needs and what arguments it expects. 2153f8c33cdSBruce A. MahAC_CHECK_FUNCS([sendfile]) 2163f8c33cdSBruce A. Mah 217cb2dcd3fSBruce A. Mah# Check for getline support, used as a part of authenticated 218cb2dcd3fSBruce A. Mah# connections. 219cb2dcd3fSBruce A. MahAC_CHECK_FUNCS([getline]) 220cb2dcd3fSBruce A. Mah 2219915746aSBruce A. Mah# Check for packet pacing socket option (Linux only for now). 2229915746aSBruce A. MahAC_CACHE_CHECK([SO_MAX_PACING_RATE socket option], 2239915746aSBruce A. Mah[iperf3_cv_header_so_max_pacing_rate], 2248a8c7edcSBruce A. MahAC_COMPILE_IFELSE( 2258a8c7edcSBruce A. Mah [AC_LANG_PROGRAM([[#include <sys/socket.h>]], 2268a8c7edcSBruce A. Mah [[int foo = SO_MAX_PACING_RATE;]])], 2278a8c7edcSBruce A. Mah iperf3_cv_header_so_max_pacing_rate=yes, 2288a8c7edcSBruce A. Mah iperf3_cv_header_so_max_pacing_rate=no)) 2299915746aSBruce A. Mahif test "x$iperf3_cv_header_so_max_pacing_rate" = "xyes"; then 2309915746aSBruce A. Mah AC_DEFINE([HAVE_SO_MAX_PACING_RATE], [1], [Have SO_MAX_PACING_RATE sockopt.]) 2319915746aSBruce A. Mahfi 2329915746aSBruce A. Mah 23321581a72SBruce A. Mah# Check for SO_BINDTODEVICE sockopt (believed to be Linux only) 23421581a72SBruce A. MahAC_CACHE_CHECK([SO_BINDTODEVICE socket option], 23521581a72SBruce A. Mah[iperf3_cv_header_so_bindtodevice], 2368a8c7edcSBruce A. MahAC_COMPILE_IFELSE( 2378a8c7edcSBruce A. Mah [AC_LANG_PROGRAM([[#include <sys/socket.h>]], 2388a8c7edcSBruce A. Mah [[int foo = SO_BINDTODEVICE;]])], 2398a8c7edcSBruce A. Mah iperf3_cv_header_so_bindtodevice=yes, 2408a8c7edcSBruce A. Mah iperf3_cv_header_so_bindtodevice=no)) 24121581a72SBruce A. Mahif test "x$iperf3_cv_header_so_bindtodevice" = "xyes"; then 24221581a72SBruce A. Mah AC_DEFINE([HAVE_SO_BINDTODEVICE], [1], [Have SO_BINDTODEVICE sockopt.]) 24321581a72SBruce A. Mahfi 24421581a72SBruce A. Mah 2458a8c7edcSBruce A. Mah# Check for IP_MTU_DISCOVER (mostly on Linux) 2468a8c7edcSBruce A. MahAC_CACHE_CHECK([IP_MTU_DISCOVER socket option], 2478a8c7edcSBruce A. Mah[iperf3_cv_header_ip_mtu_discover], 2488a8c7edcSBruce A. MahAC_COMPILE_IFELSE( 2498a8c7edcSBruce A. Mah [AC_LANG_PROGRAM([[#include <sys/types.h> 2508a8c7edcSBruce A. Mah #include <sys/socket.h> 2518a8c7edcSBruce A. Mah #include <netinet/in.h>]], 2528a8c7edcSBruce A. Mah [[int foo = IP_MTU_DISCOVER;]])], 2538a8c7edcSBruce A. Mah iperf3_cv_header_ip_mtu_discover=yes, 2548a8c7edcSBruce A. Mah iperf3_cv_header_ip_mtu_discover=no)) 2558a8c7edcSBruce A. Mahif test "x$iperf3_cv_header_ip_mtu_discover" = "xyes"; then 2568a8c7edcSBruce A. Mah AC_DEFINE([HAVE_IP_MTU_DISCOVER], [1], [Have IP_MTU_DISCOVER sockopt.]) 25749a5771aSDavid Bar-Onfi 25849a5771aSDavid Bar-On 2598a8c7edcSBruce A. Mah# Check for IP_DONTFRAG (BSD?) 2608a8c7edcSBruce A. MahAC_CACHE_CHECK([IP_DONTFRAG socket option], 2618a8c7edcSBruce A. Mah[iperf3_cv_header_ip_dontfrag], 2628a8c7edcSBruce A. MahAC_COMPILE_IFELSE( 2638a8c7edcSBruce A. Mah [AC_LANG_PROGRAM([[#include <sys/types.h> 2648a8c7edcSBruce A. Mah #include <sys/socket.h> 2658a8c7edcSBruce A. Mah #include <netinet/in.h>]], 2668a8c7edcSBruce A. Mah [[int foo = IP_DONTFRAG;]])], 2678a8c7edcSBruce A. Mah iperf3_cv_header_ip_dontfrag=yes, 2688a8c7edcSBruce A. Mah iperf3_cv_header_ip_dontfrag=no)) 2698a8c7edcSBruce A. Mahif test "x$iperf3_cv_header_ip_dontfrag" = "xyes"; then 2708a8c7edcSBruce A. Mah AC_DEFINE([HAVE_IP_DONTFRAG], [1], [Have IP_DONTFRAG sockopt.]) 2718a8c7edcSBruce A. Mahfi 2728a8c7edcSBruce A. Mah 2738a8c7edcSBruce A. Mah# Check for IP_DONTFRAGMENT (Windows?) 2748a8c7edcSBruce A. MahAC_CACHE_CHECK([IP_DONTFRAGMENT socket option], 2758a8c7edcSBruce A. Mah[iperf3_cv_header_ip_dontfragment], 2768a8c7edcSBruce A. MahAC_COMPILE_IFELSE( 2778a8c7edcSBruce A. Mah [AC_LANG_PROGRAM([[#include <sys/types.h> 2788a8c7edcSBruce A. Mah #include <sys/socket.h> 2798a8c7edcSBruce A. Mah #include <netinet/in.h>]], 2808a8c7edcSBruce A. Mah [[int foo = IP_DONTFRAGMENT;]])], 2818a8c7edcSBruce A. Mah iperf3_cv_header_ip_dontfragment=yes, 2828a8c7edcSBruce A. Mah iperf3_cv_header_ip_dontfragment=no)) 2838a8c7edcSBruce A. Mahif test "x$iperf3_cv_header_ip_dontfragment" = "xyes"; then 2848a8c7edcSBruce A. Mah AC_DEFINE([HAVE_IP_DONTFRAGMENT], [1], [Have IP_DONTFRAGMENT sockopt.]) 2858a8c7edcSBruce A. Mahfi 2868a8c7edcSBruce A. Mah 2878a8c7edcSBruce A. Mah# Check for IP DF support 2888a8c7edcSBruce A. MahAC_CACHE_CHECK([any kind of DF socket option], 2898a8c7edcSBruce A. Mah[iperf3_cv_header_dontfragment], 2908a8c7edcSBruce A. Mah[if test "x$iperf3_cv_header_ip_mtu_discover" = "xyes" -o "x$iperf3_cv_header_ip_dontfrag" = "xyes" -o "x$iperf3_cv_header_ip_dontfragment" = "xyes"; then 2918a8c7edcSBruce A. Mah iperf3_cv_header_dontfragment=yes 2928a8c7edcSBruce A. Mahelse 2938a8c7edcSBruce A. Mah iperf3_cv_header_dontfragment=no 2948a8c7edcSBruce A. Mahfi]) 2958a8c7edcSBruce A. Mah 2968a8c7edcSBruce A. Mahif test "x$iperf3_cv_header_dontfragment" = "xyes"; then 2978a8c7edcSBruce A. Mah AC_DEFINE([HAVE_DONT_FRAGMENT], [1], [Have IP_MTU_DISCOVER/IP_DONTFRAG/IP_DONTFRAGMENT sockopt.]) 2988a8c7edcSBruce A. Mahfi 2998a8c7edcSBruce A. Mah 3008a8c7edcSBruce A. Mah# 3018a8c7edcSBruce A. Mah# Check for tcpi_snd_wnd in struct tcp_info 3028a8c7edcSBruce A. Mah# 30347985d7fSShuo ChenAC_CHECK_MEMBER([struct tcp_info.tcpi_snd_wnd], 30447985d7fSShuo Chen[iperf3_cv_header_tcp_info_snd_wnd=yes], [iperf3_cv_header_tcp_info_snd_wnd=no], 30547985d7fSShuo Chen[#ifdef HAVE_LINUX_TCP_H 30647985d7fSShuo Chen#include <linux/tcp.h> 30747985d7fSShuo Chen#else 30847985d7fSShuo Chen#include <netinet/tcp.h> 30947985d7fSShuo Chen#endif 31047985d7fSShuo Chen]) 31147985d7fSShuo Chen 31247985d7fSShuo Chenif test "x$iperf3_cv_header_tcp_info_snd_wnd" = "xyes"; then 31347985d7fSShuo Chen AC_DEFINE([HAVE_TCP_INFO_SND_WND], [1], [Have tcpi_snd_wnd field in tcp_info.]) 31447985d7fSShuo Chenfi 31547985d7fSShuo Chen 316cde81d76SBen Fox-Moore# Check if we need -lrt for clock_gettime 317cde81d76SBen Fox-MooreAC_SEARCH_LIBS(clock_gettime, [rt posix4]) 318cde81d76SBen Fox-Moore# Check for clock_gettime support 319cde81d76SBen Fox-MooreAC_CHECK_FUNCS([clock_gettime]) 3209915746aSBruce A. Mah 321318fbf2eSBruce A. MahAC_CONFIG_FILES([Makefile src/Makefile src/version.h examples/Makefile iperf3.spec]) 322318fbf2eSBruce A. MahAC_OUTPUT 323