summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac164
1 files changed, 103 insertions, 61 deletions
diff --git a/configure.ac b/configure.ac
index 274bb9c..2476562 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,9 +4,9 @@ dnl Process this file with autogen.sh to produce configure files
dnl ===================================================================
-AC_PREREQ(2.59)
-AC_INIT(Iperf,2.1.9)
-AC_CONFIG_HEADER([config.h])
+AC_PREREQ([2.71])
+AC_INIT([Iperf],[2.2.0])
+AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE()
dnl The end user may not have autotools
@@ -16,59 +16,51 @@ m4_include([m4/ax_create_stdint_h.m4])
m4_include([m4/dast.m4])
m4_include([m4/ax_pthread.m4])
-AC_ARG_ENABLE(ipv6, AC_HELP_STRING([--disable-ipv6],
- [disable ipv6 support (default is autodetect)]),
+AC_ARG_ENABLE(ipv6, AS_HELP_STRING([--disable-ipv6],[disable ipv6 support (default is autodetect)]),
ac_cv_have_ipv6=$enable_ipv6)
-AC_ARG_ENABLE(multicast, AC_HELP_STRING([--disable-multicast],
- [disable multicast support (default is autodetect)]),
+AC_ARG_ENABLE(multicast, AS_HELP_STRING([--disable-multicast],[disable multicast support (default is autodetect)]),
ac_cv_multicast=$enable_multicast)
-AC_ARG_ENABLE(tcpstats, AC_HELP_STRING([--disable-tcpstats],
- [disable tcpstats support (default is autodetect)]),
+AC_ARG_ENABLE(tcpstats, AS_HELP_STRING([--disable-tcpstats],[disable tcpstats support (default is autodetect)]),
ac_cv_tcpstats=$enable_tcpstats)
-AC_ARG_ENABLE(threads, AC_HELP_STRING([--disable-threads],
- [disable thread support (default is autodetect)]))
+AC_ARG_ENABLE(threads, AS_HELP_STRING([--disable-threads],[disable thread support (default is autodetect)]))
-AC_ARG_ENABLE(debuginfo, AC_HELP_STRING([--enable-debuginfo],
- [enable asserts and debugging info for sockets (default is no)]),
+AC_ARG_ENABLE(debuginfo, AS_HELP_STRING([--enable-debuginfo],[enable asserts and debugging info for sockets (default is no)]),
enable_debuginfo=$enableval,
enable_debuginfo=no)
-AC_ARG_ENABLE(web100, AC_HELP_STRING([--disable-web100],
- [disable web100 support (default is autodetect)]))
+AC_ARG_ENABLE(web100, AS_HELP_STRING([--disable-web100],[disable web100 support (default is autodetect)]))
-AC_ARG_ENABLE(kalman, AC_HELP_STRING([--disable-kalman],
- [disable kalman delay tuning (default is enable)]))
+AC_ARG_ENABLE(kalman, AS_HELP_STRING([--disable-kalman],[disable kalman delay tuning (default is enable)]))
-AC_ARG_ENABLE(role_reversal_id, AC_HELP_STRING([--disable-role-reversal-id],
- [disable role reversal special characters (default is enable)]))
+AC_ARG_ENABLE(multicast_all, AS_HELP_STRING([--disable-multicast-all],[enable the use of IP_MULITICAST_ALL (default is disable)]))
-AC_ARG_ENABLE(default_localonly, AC_HELP_STRING([--enable-default-localonly],
- [enforce limiting test traffic to local-only network (via socket SO_DONTROUTE) as the default mode]))
+AC_ARG_ENABLE(write_select, AS_HELP_STRING([--disable-write-select],[disable use of select before writes (default is enable)]))
-AC_ARG_ENABLE(seqno64b, AC_HELP_STRING([--disable-seqno64b],
- [disable 64 bit sequence numer support (default is enable)]))
+AC_ARG_ENABLE(role_reversal_id, AS_HELP_STRING([--disable-role-reversal-id],[disable role reversal special characters (default is enable)]))
-AC_ARG_ENABLE(fastsampling, AC_HELP_STRING([--enable-fastsampling],
- [enable support for 100 microsecond report intervals (default is disable)]))
+AC_ARG_ENABLE(default_localonly, AS_HELP_STRING([--enable-default-localonly],[enforce limiting test traffic to local-only network (via socket SO_DONTROUTE) as the default mode]))
+
+AC_ARG_ENABLE(seqno64b, AS_HELP_STRING([--disable-seqno64b],[disable 64 bit sequence numer support (default is enable)]))
+
+AC_ARG_ENABLE(fastsampling, AS_HELP_STRING([--enable-fastsampling],[enable support for 100 microsecond report intervals (default is disable)]))
AM_CONDITIONAL([FASTSAMPLING], [test "x$enable_fastsampling" = "xyes"])
-AC_ARG_ENABLE(discover_defaultlen, AC_HELP_STRING([--enable-discover-defaultlen],
- [enable support to set the default payload size after device MTU discovery (default is disable)]))
+AC_ARG_ENABLE(discover_defaultlen, AS_HELP_STRING([--enable-discover-defaultlen],[enable support to set the default payload size after device MTU discovery (default is disable)]))
AM_CONDITIONAL([DISCOVER_DEFAULTLEN], [test "x$enable_discover_defaultlen" = "xyes"])
-AC_ARG_ENABLE(thread_debug, AC_HELP_STRING([--enable-thread-debug],
- [enable support for thread debugging (default is disable)]))
+AC_ARG_ENABLE(thread_debug, AS_HELP_STRING([--enable-thread-debug],[enable support for thread debugging (default is disable)]))
AM_CONDITIONAL([THREAD_DEBUG], [test "x$enable_thread_debug" = "xyes"])
-AC_ARG_ENABLE(packet_debug, AC_HELP_STRING([--enable-packet-debug],
- [enable support for packet level debugging (default is disable)]))
+AC_ARG_ENABLE(packet_debug, AS_HELP_STRING([--enable-packet-debug],[enable support for packet level debugging (default is disable)]))
AM_CONDITIONAL([PACKET_DEBUG], [test "x$enable_packet_debug" = "xyes"])
-AC_ARG_ENABLE(checkprograms, AC_HELP_STRING([--enable-checkprograms],
- [enable support for building support programs such as checkdelay, checkpdfs, etc. (default is disable)]))
+AC_ARG_ENABLE(summing_debug, AS_HELP_STRING([--enable-summing-debug],[enable support for interval summing debugging (default is disable)]))
+AM_CONDITIONAL([SUMMING_DEBUG], [test "x$enable_summing_debug" = "xyes"])
+
+AC_ARG_ENABLE(checkprograms, AS_HELP_STRING([--enable-checkprograms],[enable support for building support programs such as checkdelay, checkpdfs, etc. (default is disable)]))
AM_CONDITIONAL([CHECKPROGRAMS], [test "x$enable_checkprograms" = "xyes"])
AC_ARG_ENABLE([static-bin],
@@ -135,8 +127,10 @@ dnl Checks for programs
dnl ===================================================================
AC_PROG_CXX
+CXXFLAGS=`echo " $CXXFLAGS " | sed -e "s/ -g / /"` # do not want it implicitly
AC_PROG_CC
-AC_ISC_POSIX
+CFLAGS=`echo " $CFLAGS " | sed -e "s/ -g / /"` # do not want it implicitly
+AC_SEARCH_LIBS([strerror],[cposix])
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_RANLIB
@@ -172,8 +166,16 @@ AC_SEARCH_LIBS([socket], [socket], [],
[#include <windows.h>])])
dnl Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS([arpa/inet.h libintl.h net/ethernet.h net/if.h sys/ioctl.h sys/sockio.h linux/sockios.h linux/ip.h linux/udp.h linux/if_packet.h linux/filter.h linux/if_tun.h netdb.h netinet/in.h netinet/tcp.h stdlib.h string.h strings.h sys/socket.h sys/time.h syslog.h unistd.h signal.h ifaddrs.h])
+m4_warn([obsolete],
+[The preprocessor macro `STDC_HEADERS' is obsolete.
+ Except in unusual embedded environments, you can safely include all
+ ISO C90 headers unconditionally.])dnl
+# Autoupdate added the next two lines to ensure that your configure
+# script's behavior did not change. They are probably safe to remove.
+AC_CHECK_INCLUDES_DEFAULT
+AC_PROG_EGREP
+
+AC_CHECK_HEADERS([arpa/inet.h libintl.h net/ethernet.h net/if.h sys/ioctl.h sys/sockio.h linux/sockios.h linux/ip.h linux/udp.h linux/tcp.h linux/if_packet.h linux/filter.h linux/if_tun.h netdb.h netinet/in.h netinet/tcp.h stdlib.h string.h strings.h sys/socket.h sys/time.h syslog.h unistd.h signal.h ifaddrs.h])
dnl ===================================================================
dnl Checks for typedefs, structures
@@ -182,7 +184,20 @@ dnl ===================================================================
AC_C_CONST
AC_TYPE_SIZE_T
AC_CHECK_TYPES(ssize_t,,AC_DEFINE_UNQUOTED(ssize_t, int))
-AC_HEADER_TIME
+m4_warn([obsolete],
+[Update your code to rely only on HAVE_SYS_TIME_H,
+then remove this warning and the obsolete code below it.
+All current systems provide time.h; it need not be checked for.
+Not all systems provide sys/time.h, but those that do, all allow
+you to include it and time.h simultaneously.])dnl
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+# Obsolete code to be removed.
+if test $ac_cv_header_sys_time_h = yes; then
+ AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
+ and <time.h>. This macro is obsolete.])
+fi
+# End of obsolete code.
+
AC_STRUCT_TM
AC_CHECK_TYPES(int64_t)
@@ -213,7 +228,19 @@ AC_DEFINE_UNQUOTED([Socklen_t], $ac_cv_accept_arg, [Define 3rd arg of accept])
dnl Checks for library functions.
AC_FUNC_MEMCMP
AC_FUNC_SELECT_ARGTYPES
-AC_TYPE_SIGNAL
+m4_warn([obsolete],
+[your code may safely assume C89 semantics that RETSIGTYPE is void.
+Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])dnl
+AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM([#include <sys/types.h>
+#include <signal.h>
+],
+ [return *(signal (0, 0)) (0) == 1;])],
+ [ac_cv_type_signal=int],
+ [ac_cv_type_signal=void])])
+AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
+ (`int' or `void').])
+
AC_FUNC_STRFTIME
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([atexit memset select strchr strerror strtol strtoll strtod usleep clock_gettime sched_setscheduler sched_yield mlockall setitimer nanosleep clock_nanosleep freopen])
@@ -227,7 +254,7 @@ AC_CHECK_DECLS([SIOCGIFMTU],[],[],[
#include <sys/sockio.h>
#endif
])
-AC_CHECK_DECLS([pthread_cancel],[],[],[#include <pthread.h>])
+AC_CHECK_DECLS([pthread_cancel, pthread_threadid_np],[],[],[#include <pthread.h>])
AC_CHECK_DECLS([CPU_SET],[],[],[
#define _GNU_SOURCE
#include <sched.h>
@@ -249,29 +276,34 @@ in_h='
#endif
'
-AC_CHECK_DECLS([AF_INET6, SO_TIMESTAMP, SO_SNDTIMEO, SO_REUSEPORT, SO_BINDTODEVICE, MSG_DONTWAIT,
- SO_MAX_PACING_RATE, SO_DONTROUTE, IPV6_TCLASS, IP_MULTICAST_ALL, IP_TOS,
- MCAST_JOIN_GROUP, MCAST_JOIN_SOURCE_GROUP, IPV6_JOIN_GROUP, IPV6_V6ONLY,
- IPV6_ADD_MEMBERSHIP, IPV6_MULTICAST_HOPS, MSG_PEEK, MSG_WAITALL,
- TCP_NODELAY, TCP_INFO, TCP_CONNECTION_INFO, TCP_WINDOW_CLAMP, TCP_QUICKACK,
- TCP_NOTSENT_LOWAT, TCP_MAXSEG, IP_ADD_MEMBERSHIP, IP_ADD_SOURCE_MEMBERSHIP],
+AC_CHECK_DECLS([AF_INET6, SO_TIMESTAMP, SO_SNDTIMEO, SO_REUSEADDR, SO_REUSEPORT, SO_BINDTODEVICE, MSG_DONTWAIT, MSG_TRUNC,
+ MSG_CTRUNC, SO_MAX_PACING_RATE, SO_DONTROUTE, IPV6_TCLASS, IP_MULTICAST_ALL, IP_TOS,
+ IP_DROP_MEMBERSHIP,IPV6_LEAVE_GROUP,MCAST_LEAVE_GROUP,
+ MCAST_JOIN_GROUP, MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP, IPV6_JOIN_GROUP, IPV6_V6ONLY,
+ IPV6_ADD_MEMBERSHIP, IPV6_MULTICAST_HOPS, MSG_PEEK, MSG_WAITALL, TCP_CONGESTION,
+ TCP_NODELAY, TCP_INFO, TCP_CONNECTION_INFO, TCP_WINDOW_CLAMP, TCP_TX_DELAY, TCP_QUICKACK,
+ SO_ZEROCOPY, MSG_ZEROCOPY, MSG_ERRQUEUE, IP_MULTICAST_IF, IPV6_MULTICAST_IF,
+ MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE, IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE,
+ TCP_NOTSENT_LOWAT, TCP_MAXSEG, IP_ADD_MEMBERSHIP, IP_ADD_SOURCE_MEMBERSHIP, IP_DROP_SOURCE_MEMBERSHIP],
[],[],[$in_h])
AC_CHECK_TYPES([struct sockaddr_storage, struct sockaddr_in6,
- struct group_source_req, struct ip_mreq,
+ struct group_source_req, struct ip_mreq, struct ip_mreqn,
struct ipv6_mreq, struct ip_mreq_source],,,[$in_h])
AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_len,
struct ip_mreq_source.imr_multiaddr.s_addr], [], [],[$in_h])
-AC_CHECK_MEMBER([struct tcp_info.tcpi_total_retrans], [], [],[
+AC_CHECK_MEMBERS([struct tcp_info.tcpi_total_retrans, struct tcp_info.tcpi_unacked, struct tcp_info.tcpi_sacked,
+ struct tcp_info.tcpi_lost, struct tcp_info.tcpi_retrans, struct tcp_info.tcpi_snd_mss,
+ struct tcp_info.tcpi_snd_cwnd], [], [],[
#include <netinet/in.h>
#include <netinet/tcp.h>
])
-AC_CHECK_MEMBERS([struct tcp_info.tcpi_total_retrans], [], [],[
-#include <netinet/in.h>
-#include <netinet/tcp.h>
+AC_CHECK_MEMBERS([struct tcp_info.tcpi_delivered, struct tcp_info.tcpi_delivered_ce, struct tcp_info.tcpi_dsack_dups,
+ struct tcp_info.tcpi_data_segs_out], [], [],[
+#include <linux/tcp.h>
])
dnl ===================================================================
@@ -284,9 +316,9 @@ AC_C_BIGENDIAN
dnl ===================================================================
dnl Check for system services
AC_MSG_CHECKING([for gettid syscall])
-AC_TRY_LINK([#include <unistd.h>
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
#include <sys/syscall.h>
-], [syscall(SYS_gettid);], [ok=yes], [ok=no])
+]], [[syscall(SYS_gettid);]])],[ok=yes],[ok=no])
if test "$ok" = "yes"; then
AC_DEFINE(HAVE_GETTID_SYSCALL,1,[Define if syscall(SYS_gettid) available.])
fi
@@ -369,14 +401,19 @@ if test "$ac_cv_have_ipv6" = yes; then
fi
+if test "$enable_packet_debug" = yes; then
+ AC_DEFINE([HAVE_PACKET_DEBUG], 1, [Define if packet level debugging is desired])
+fi
if test "$enable_thread_debug" = yes; then
- AC_DEFINE([HAVE_THREAD_DEBUG], 1, [Define for thread level debugging of the code])
-else
- if test "$enable_debuginfo" = yes; then
+ AC_DEFINE([HAVE_THREAD_DEBUG], 1, [Define for thread level debugging])
+fi
+if test "$enable_summing_debug" = yes; then
+ AC_DEFINE([HAVE_SUMMING_DEBUG], 1, [Define for interval summing debugging])
+fi
+if test "$enable_debuginfo" = yes; then
AC_DEFINE([DBG_MJZ], 1, [Define if debugging info is desired])
- else
+else
AC_DEFINE([NDEBUG], [1], [Define to disable asserts])
- fi
fi
if test "$enable_web100" != no; then
@@ -395,6 +432,14 @@ if test "$enable_kalman" != no; then
AC_DEFINE([HAVE_KALMAN], 1, [Define if Kalman tuning is desired and available])
fi
+if test "$enable_multicast_all" = no; then
+AC_DEFINE([HAVE_MULTICAST_ALL_DISABLE], 1, [Define if use of IP_MULTICAST_ALL is desired and available])
+fi
+
+if test "$enable_write_select" != no; then
+AC_DEFINE([HAVE_USE_WRITE_SELECT], 1, [Define if select based writes are desired])
+fi
+
if test "$enable_role_reversal_id" != no; then
AC_DEFINE([HAVE_ROLE_REVERSAL_ID], 1, [Define if role reversal ids are desired ])
fi
@@ -418,10 +463,6 @@ if test "$enable_discover_defaultlen" = yes; then
AC_DEFINE([DEFAULT_PAYLOAD_LEN_PER_MTU_DISCOVERY], 1, [Define if default UDP payload length is based on device MTU and socket buffer size])
fi
-if test "$enable_packet_debug" = yes; then
-AC_DEFINE([HAVE_PACKET_DEBUG], 1, [Define if packet level debugging is desired])
-fi
-
case "$ac_cv_host" in
*-mingw32)
dnl Static link on MINGW for standalone DOS executable
@@ -454,6 +495,7 @@ AC_SUBST(STRIP_END)
AC_CONFIG_FILES([Makefile
compat/Makefile
doc/Makefile
+ flows/Makefile
include/Makefile
src/Makefile
man/Makefile])