Add configure option to enable static linking of iperf binary. (#989)

This commit is contained in:
Ezra 2020-05-04 18:09:05 -04:00 committed by GitHub
parent e39e44fdfd
commit 9427ecdf3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,11 @@
# Also link binaries as static
AC_ARG_ENABLE([static-bin],
AS_HELP_STRING([--enable-static-bin], [link iperf binary statically]),
[enable_static_bin=yes
AC_DISABLE_SHARED],
[:])
AM_CONDITIONAL([ENABLE_STATIC_BIN], [test x$enable_static_bin = xno])
AS_IF([test "x$enable_static_bin" == xyes],
[LDFLAGS="$LDFLAGS --static"]
[])

View File

@ -26,6 +26,7 @@
# Initialize the autoconf system for the specified tool, version and mailing list
AC_INIT(iperf, 3.7+, https://github.com/esnet/iperf, iperf, https://software.es.net/iperf/)
m4_include([config/ax_check_openssl.m4])
m4_include([config/iperf_config_static_bin.m4])
AC_LANG(C)
# Specify where the auxiliary files created by configure should go. The config
@ -35,6 +36,9 @@ AC_CONFIG_AUX_DIR(config)
# Initialize the automake system
AM_INIT_AUTOMAKE([foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
LT_INIT
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(src/iperf_config.h)