aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorEzra <ezkissel@indiana.edu>2020-05-04 18:09:05 -0400
committerGitHub <noreply@github.com>2020-05-04 15:09:05 -0700
commit9427ecdf3c5e62e3a8340fd2226c2c2f68545254 (patch)
tree399886b0fb2d2584808d32697c9923de14a73feb /config
parente39e44fdfd58915bf5da0d835b73a62a04760dc9 (diff)
downloadiperf3-9427ecdf3c5e62e3a8340fd2226c2c2f68545254.tar.gz
Add configure option to enable static linking of iperf binary. (#989)
Diffstat (limited to 'config')
-rw-r--r--config/iperf_config_static_bin.m411
1 files changed, 11 insertions, 0 deletions
diff --git a/config/iperf_config_static_bin.m4 b/config/iperf_config_static_bin.m4
new file mode 100644
index 0000000..1f35bbf
--- /dev/null
+++ b/config/iperf_config_static_bin.m4
@@ -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"]
+ [])