Annotation of embedaddon/iperf/configure.ac, revision 1.1

1.1     ! misho       1: # iperf, Copyright (c) 2014, 2015, 2016, The Regents of the University of
        !             2: # California, through Lawrence Berkeley National Laboratory (subject
        !             3: # to receipt of any required approvals from the U.S. Dept. of
        !             4: # Energy).  All rights reserved.
        !             5: #
        !             6: # If you have questions about your rights to use or distribute this
        !             7: # software, please contact Berkeley Lab's Technology Transfer
        !             8: # Department at TTD@lbl.gov.
        !             9: #
        !            10: # NOTICE.  This software is owned by the U.S. Department of Energy.
        !            11: # As such, the U.S. Government has been granted for itself and others
        !            12: # acting on its behalf a paid-up, nonexclusive, irrevocable,
        !            13: # worldwide license in the Software to reproduce, prepare derivative
        !            14: # works, and perform publicly and display publicly.  Beginning five
        !            15: # (5) years after the date permission to assert copyright is obtained
        !            16: # from the U.S. Department of Energy, and subject to any subsequent
        !            17: # five (5) year renewals, the U.S. Government is granted for itself
        !            18: # and others acting on its behalf a paid-up, nonexclusive,
        !            19: # irrevocable, worldwide license in the Software to reproduce,
        !            20: # prepare derivative works, distribute copies to the public, perform
        !            21: # publicly and display publicly, and to permit others to do so.
        !            22: #
        !            23: # This code is distributed under a BSD style license, see the LICENSE
        !            24: # file for complete information.
        !            25: 
        !            26: # Initialize the autoconf system for the specified tool, version and mailing list
        !            27: AC_INIT(iperf, 3.1.3, https://github.com/esnet/iperf, iperf, http://software.es.net/iperf/)
        !            28: AC_LANG(C)
        !            29: 
        !            30: # Specify where the auxiliary files created by configure should go. The config
        !            31: # directory is picked so that they don't clutter up more useful directories.
        !            32: AC_CONFIG_AUX_DIR(config)
        !            33: 
        !            34: 
        !            35: # Initialize the automake system
        !            36: AM_INIT_AUTOMAKE
        !            37: AM_MAINTAINER_MODE
        !            38: AM_CONFIG_HEADER(src/iperf_config.h)
        !            39: 
        !            40: AC_CANONICAL_HOST
        !            41: 
        !            42: # Checks for tools: c compiler, ranlib (used for creating static libraries),
        !            43: # symlinks and libtool
        !            44: AC_PROG_CC
        !            45: AC_PROG_RANLIB
        !            46: AC_PROG_LN_S
        !            47: AC_PROG_LIBTOOL
        !            48: 
        !            49: # Add -Wall if we are using GCC.
        !            50: if test "x$GCC" = "xyes"; then
        !            51:   CFLAGS="$CFLAGS -Wall"
        !            52: fi
        !            53: 
        !            54: # Checks for header files.
        !            55: AC_HEADER_STDC
        !            56: 
        !            57: # Check for systems which need -lsocket and -lnsl
        !            58: #AX_LIB_SOCKET_NSL
        !            59: 
        !            60: # Check for the math library (needed by cjson on some platforms)
        !            61: AC_SEARCH_LIBS(floor, [m], [], [
        !            62: echo "floor()"
        !            63: exit 1
        !            64: ])
        !            65: 
        !            66: # Solaris puts nanosleep in -lrt
        !            67: AC_SEARCH_LIBS(nanosleep, [rt], [], [
        !            68: echo "nanosleep() required for timing operations."
        !            69: exit 1
        !            70: ])
        !            71: 
        !            72: # Solaris puts hstrerror in -lresolv
        !            73: AC_SEARCH_LIBS(hstrerror, [resolv], [], [
        !            74: echo "nanosleep() required for timing operations."
        !            75: exit 1
        !            76: ])
        !            77: 
        !            78: # On illumos we need -lsocket
        !            79: AC_SEARCH_LIBS(socket, [socket], [], [
        !            80: echo "socket()"
        !            81: exit 1
        !            82: ])
        !            83: 
        !            84: # On illumos inet_ntop in in -lnsl
        !            85: AC_SEARCH_LIBS(inet_ntop, [nsl], [], [
        !            86: echo "inet_ntop()"
        !            87: exit 1
        !            88: ])
        !            89: 
        !            90: # Checks for typedefs, structures, and compiler characteristics.
        !            91: AC_C_CONST
        !            92: 
        !            93: # Check for SCTP support
        !            94: AC_CHECK_HEADERS([sys/socket.h])
        !            95: AC_CHECK_HEADERS([netinet/sctp.h],
        !            96:                 AC_DEFINE([HAVE_SCTP], [1], [Have SCTP support.])
        !            97:                 AC_SEARCH_LIBS(sctp_bindx, [sctp])
        !            98:                 AC_CHECK_TYPES([struct sctp_assoc_value], [], [],
        !            99:                                [[#include <netinet/sctp.h>]]),
        !           100:                 [],
        !           101:                 [#ifdef HAVE_SYS_SOCKET_H
        !           102: #include <sys/socket.h>
        !           103: #endif
        !           104: ])
        !           105: 
        !           106: # Check for TCP_CONGESTION sockopt (believed to be Linux and FreeBSD only)
        !           107: AC_CACHE_CHECK([TCP_CONGESTION socket option],
        !           108: [iperf3_cv_header_tcp_congestion],
        !           109: AC_EGREP_CPP(yes,
        !           110: [#include <netinet/tcp.h>
        !           111: #ifdef TCP_CONGESTION
        !           112:   yes
        !           113: #endif
        !           114: ],iperf3_cv_header_tcp_congestion=yes,iperf3_cv_header_tcp_congestion=no))
        !           115: if test "x$iperf3_cv_header_tcp_congestion" = "xyes"; then
        !           116:     AC_DEFINE([HAVE_TCP_CONGESTION], [1], [Have TCP_CONGESTION sockopt.])
        !           117: fi
        !           118: 
        !           119: # Check for IPv6 flowlabel support (believed to be Linux only)
        !           120: # We check for IPV6_FLOWLABEL_MGR in <linux/in6.h> even though we
        !           121: # don't use that file directly (we have our own stripped-down
        !           122: # copy, see src/flowlabel.h for more details).
        !           123: AC_CACHE_CHECK([IPv6 flowlabel support],
        !           124: [iperf3_cv_header_flowlabel],
        !           125: AC_EGREP_CPP(yes,
        !           126: [#include <sys/types.h>
        !           127: #include <linux/in6.h>
        !           128: #ifdef IPV6_FLOWLABEL_MGR
        !           129:   yes
        !           130: #endif
        !           131: ],iperf3_cv_header_flowlabel=yes,iperf3_cv_header_flowlabel=no))
        !           132: if test "x$iperf3_cv_header_flowlabel" = "xyes"; then
        !           133:     AC_DEFINE([HAVE_FLOWLABEL], [1], [Have IPv6 flowlabel support.])
        !           134: fi
        !           135: 
        !           136: # Check for CPU affinity support.  FreeBSD and Linux do this differently
        !           137: # unfortunately so we have to check separately for each of them.
        !           138: # FreeBSD uses cpuset_setaffinity while Linux uses sched_setaffinity.
        !           139: # Define HAVE_CPU_AFFINITY to indicate the CPU affinity setting as a
        !           140: # generic concept is available.
        !           141: AC_CHECK_FUNCS([cpuset_setaffinity sched_setaffinity],
        !           142:               AC_DEFINE([HAVE_CPU_AFFINITY], [1], 
        !           143:                         [Have CPU affinity support.]))
        !           144: 
        !           145: # Check for sendfile support.  FreeBSD, Linux, and MacOS all support
        !           146: # this system call, but they're all different in terms of what headers
        !           147: # it needs and what arguments it expects.
        !           148: AC_CHECK_FUNCS([sendfile])
        !           149: 
        !           150: # Check for packet pacing socket option (Linux only for now).
        !           151: AC_CACHE_CHECK([SO_MAX_PACING_RATE socket option],
        !           152: [iperf3_cv_header_so_max_pacing_rate],
        !           153: AC_EGREP_CPP(yes,
        !           154: [#include <sys/socket.h>
        !           155: #ifdef SO_MAX_PACING_RATE
        !           156:   yes
        !           157: #endif
        !           158: ],iperf3_cv_header_so_max_pacing_rate=yes,iperf3_cv_header_so_max_pacing_rate=no))
        !           159: if test "x$iperf3_cv_header_so_max_pacing_rate" = "xyes"; then
        !           160:     AC_DEFINE([HAVE_SO_MAX_PACING_RATE], [1], [Have SO_MAX_PACING_RATE sockopt.])
        !           161: fi
        !           162: 
        !           163: 
        !           164: AC_OUTPUT([Makefile src/Makefile src/version.h examples/Makefile iperf3.spec])

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>