Add configure option to enable static linking of iperf binary. (#989)
This commit is contained in:
parent
e39e44fdfd
commit
9427ecdf3c
11
config/iperf_config_static_bin.m4
Normal file
11
config/iperf_config_static_bin.m4
Normal 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"]
|
||||
[])
|
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user