bubox: update to latest git HEAD
[openwrt/openwrt.git] / package / network / utils / iperf3 / patches / 010-fix-openssl-ac-macro.patch
1 commit 3fd1a2ae907bff2d7593c0bb9944aa05eca7b58d
2 Author: ralcini <roberto.alcini@gmail.com>
3 Date: Mon Aug 14 22:43:38 2017 +0200
4
5 fix for issue #624 - force build without openssl (#631)
6
7 * fix: now --without-openssl configure flags works
8 enh: if openssl support is required and no valid installation is found, now it raise an error
9
10 * enh: added warning if building without openssl (iperf_auth disabled)
11
12 diff --git a/configure.ac b/configure.ac
13 index 3c56cb3..79f3869 100644
14 --- a/configure.ac
15 +++ b/configure.ac
16 @@ -101,13 +101,18 @@ AC_CHECK_HEADERS([netinet/sctp.h],
17 #endif
18 ])
19
20 -# Check for OPENSSL support
21 -AX_CHECK_OPENSSL(
22 - AC_DEFINE([HAVE_SSL], [1], [OpenSSL Is Available])
23 -)
24 -LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
25 -LIBS="$OPENSSL_LIBS $LIBS"
26 -CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
27 +if test "x$with_openssl" = "xno"; then
28 + AC_MSG_WARN( [Building without OpenSSL; disabling iperf_auth functionality.] )
29 +else
30 + # Check for OPENSSL support
31 + AX_CHECK_OPENSSL(
32 + [ AC_DEFINE([HAVE_SSL], [1], [OpenSSL Is Available]) ],
33 + [ AC_MSG_FAILURE([--with-openssl was given, but test for openssl failed]) ]
34 + )
35 + LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
36 + LIBS="$OPENSSL_LIBS $LIBS"
37 + CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
38 +fi
39
40 # Check for TCP_CONGESTION sockopt (believed to be Linux and FreeBSD only)
41 AC_CACHE_CHECK([TCP_CONGESTION socket option],