xref: /aosp_15_r20/external/iperf3/config/iperf_config_static_bin.m4 (revision 7ab6e6ace082586527a400463bc693a412a40341)
1*7ab6e6acSAndroid Build Coastguard Worker# Also link binaries as static
2*7ab6e6acSAndroid Build Coastguard WorkerAC_ARG_ENABLE([static-bin],
3*7ab6e6acSAndroid Build Coastguard Worker    AS_HELP_STRING([--enable-static-bin], [link iperf3 binary statically]),
4*7ab6e6acSAndroid Build Coastguard Worker    [enable_static=yes
5*7ab6e6acSAndroid Build Coastguard Worker     enable_shared=no
6*7ab6e6acSAndroid Build Coastguard Worker     enable_static_bin=yes],
7*7ab6e6acSAndroid Build Coastguard Worker    [:])
8*7ab6e6acSAndroid Build Coastguard WorkerAM_CONDITIONAL([ENABLE_STATIC_BIN], [test x$enable_static_bin = xno])
9*7ab6e6acSAndroid Build Coastguard Worker
10*7ab6e6acSAndroid Build Coastguard WorkerAS_IF([test "x$enable_static_bin" == xyes],
11*7ab6e6acSAndroid Build Coastguard Worker [LDFLAGS="$LDFLAGS --static"]
12*7ab6e6acSAndroid Build Coastguard Worker [])
13