curl/m4
Petr Štetiar 8af6b087e0
curl-wolfssl.m4: error out if wolfSSL is not usable
When I explicitly declare, that I would like to have curl built with
wolfSSL support using `--with-wolfssl` configure option, then I would
expect, that either I endup with curl having that support, for example
in form of https support or it wouldn't be available at all.

Downstream projects like for example OpenWrt build curl wolfSSL variant
with `--with-wolfssl` already, but in certain corner cases it does fail:

  configure:25299: checking for wolfSSL_Init in -lwolfssl
  configure:25321: x86_64-openwrt-linux-musl-gcc -o conftest [snip]
  In file included from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/dsa.h:33,
                   from target-x86_64_musl/usr/include/wolfssl/wolfcrypt/asn_public.h:35,
                  from target-x86_64_musl/usr/include/wolfssl/ssl.h:35,
                   from conftest.c:47:
  target-x86_64_musl/usr/include/wolfssl/wolfcrypt/integer.h:37:14: fatal error: wolfssl/wolfcrypt/sp_int.h: No such file or directory
       #include <wolfssl/wolfcrypt/sp_int.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

and in the end thus produces curl without https support:

 curl: (1) Protocol "https" not supported or disabled in libcurl

So fix it, by making the working wolfSSL mandatory and error out in
configure step when that's not the case:

 checking for wolfSSL_Init in -lwolfssl... no
 configure: error: --with-wolfssl but wolfSSL was not found or doesn't work

References: https://github.com/openwrt/packages/issues/19005
References: https://github.com/openwrt/packages/issues/19547
Signed-off-by: Petr Štetiar <ynezz@true.cz>

Closes #9682
2022-10-10 11:17:53 +02:00
..
.gitignore copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
curl-amissl.m4 amissl: make AmiSSL v5 a minimum requirement 2022-08-08 09:16:01 +02:00
curl-bearssl.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
curl-compilers.m4 curl-compilers.m4: for gcc + want warnings, set gnu89 standard 2022-09-23 08:27:43 +02:00
curl-confopts.m4 autotools: allow --enable-symbol-hiding with windows 2022-09-25 22:19:13 +00:00
curl-functions.m4 configure: introduce CURL_SIZEOF 2022-08-11 09:07:02 +02:00
curl-gnutls.m4 misc: spelling fixes 2022-08-31 14:31:01 +00:00
curl-mbedtls.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
curl-nss.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
curl-openssl.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
curl-override.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
curl-reentrant.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
curl-rustls.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
curl-schannel.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
curl-sectransp.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
curl-sysconfig.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
curl-wolfssl.m4 curl-wolfssl.m4: error out if wolfSSL is not usable 2022-10-10 11:17:53 +02:00
xc-am-iface.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
xc-cc-check.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
xc-lt-iface.m4 misc: spelling fixes 2022-08-31 14:31:01 +00:00
xc-translit.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
xc-val-flgs.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
zz40-xc-ovr.m4 misc: spelling fixes 2022-08-31 14:31:01 +00:00
zz50-xc-ovr.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00
zz60-xc-ovr.m4 copyright: make repository REUSE compliant 2022-06-13 09:13:00 +02:00