← Commit list

2b30d29c3c

Viktor Szakats
Viktor Szakats
2025-10-24
SUCCESS Duration: 155s

Subject

autotools: merge `if`s in GnuTLS/OpenSSL feature detection

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

m4/curl-gnutls.m4+6 -10
@@ -137,11 +137,10 @@ if test "x$OPT_GNUTLS" != xno; then
test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
fi
-dnl ---
-dnl Check which crypto backend GnuTLS uses
-dnl ---
-
if test "$GNUTLS_ENABLED" = "1"; then
+ dnl ---
+ dnl Check which crypto backend GnuTLS uses
+ dnl ---
USE_GNUTLS_NETTLE=
# First check if we can detect either crypto library via transitive linking
AC_CHECK_LIB(gnutls, nettle_MD5Init, [ USE_GNUTLS_NETTLE=1 ])
@@ -154,17 +153,14 @@ if test "$GNUTLS_ENABLED" = "1"; then
AC_MSG_ERROR([GnuTLS found, but nettle was not found])
fi
LIBS="-lnettle $LIBS"
-fi
-dnl ---
-dnl We require GnuTLS with SRP support.
-dnl ---
-if test "$GNUTLS_ENABLED" = "1"; then
+ dnl ---
+ dnl We require GnuTLS with SRP support.
+ dnl ---
AC_CHECK_LIB(gnutls, gnutls_srp_verifier,
[
AC_DEFINE(HAVE_GNUTLS_SRP, 1, [if you have the function gnutls_srp_verifier])
HAVE_GNUTLS_SRP=1
])
fi
-
])
m4/curl-openssl.m4+12 -18
@@ -340,10 +340,10 @@ if test X"$OPT_OPENSSL" != Xno &&
AC_MSG_ERROR([--with-openssl was given but OpenSSL could not be detected])
fi
-dnl ---
-dnl We check OpenSSL for DES support.
-dnl ---
if test "$OPENSSL_ENABLED" = "1"; then
+ dnl ---
+ dnl We check OpenSSL for DES support.
+ dnl ---
AC_MSG_CHECKING([for DES support in OpenSSL])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
@@ -361,12 +361,10 @@ if test "$OPENSSL_ENABLED" = "1"; then
],[
AC_MSG_RESULT([no])
])
-fi
-dnl ---
-dnl We require OpenSSL with SRP support.
-dnl ---
-if test "$OPENSSL_ENABLED" = "1"; then
+ dnl ---
+ dnl We require OpenSSL with SRP support.
+ dnl ---
AC_MSG_CHECKING([for SRP support in OpenSSL])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
@@ -385,12 +383,10 @@ if test "$OPENSSL_ENABLED" = "1"; then
],[
AC_MSG_RESULT([no])
])
-fi
-dnl ---
-dnl Whether the OpenSSL configuration will be loaded automatically
-dnl ---
-if test X"$OPENSSL_ENABLED" = X"1"; then
+ dnl ---
+ dnl Whether the OpenSSL configuration will be loaded automatically
+ dnl ---
AC_ARG_ENABLE(openssl-auto-load-config,
AS_HELP_STRING([--enable-openssl-auto-load-config],[Enable automatic loading of OpenSSL configuration])
AS_HELP_STRING([--disable-openssl-auto-load-config],[Disable automatic loading of OpenSSL configuration]),
@@ -399,12 +395,10 @@ AS_HELP_STRING([--disable-openssl-auto-load-config],[Disable automatic loading o
AC_DEFINE(CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG, 1, [if the OpenSSL configuration won't be loaded automatically])
fi
])
-fi
-dnl ---
-dnl We may use OpenSSL QUIC.
-dnl ---
-if test "$OPENSSL_ENABLED" = "1"; then
+ dnl ---
+ dnl We may use OpenSSL QUIC.
+ dnl ---
AC_MSG_CHECKING([for QUIC support and OpenSSL >= 3.3])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[