build: add Debug, TrackMemory, ECH to feature list

Also:

- remove stray `ECH` and `HTTPSRR` from cmake protocol list.

- stop excluding `Debug` and `TrackMemory` in `test1013.pl`.

- configure: delete `CURL_CHECK_CURLDEBUG` check.
  Ref: 065047dc62
  This check was effectively doing nothing, except disabling
 `--enable-curldebug` in `curl-config` for
 Cygwin/MSYS/cegcc/OS2/AIX targets with c-ares enabled.

Closes #14096
This commit is contained in:
Viktor Szakats 2024-07-04 05:04:35 +02:00
parent b9fea261e6
commit 96a1a05f66
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
4 changed files with 16 additions and 53 deletions

View File

@ -1667,8 +1667,6 @@ if(NOT CURL_DISABLE_INSTALL)
_add_if("IPFS" NOT CURL_DISABLE_HTTP)
_add_if("IPNS" NOT CURL_DISABLE_HTTP)
_add_if("HTTPS" NOT CURL_DISABLE_HTTP AND SSL_ENABLED)
_add_if("ECH" HAVE_ECH)
_add_if("HTTPSRR" HAVE_ECH)
_add_if("FTP" NOT CURL_DISABLE_FTP)
_add_if("FTPS" NOT CURL_DISABLE_FTP AND SSL_ENABLED)
_add_if("FILE" NOT CURL_DISABLE_FILE)
@ -1741,6 +1739,9 @@ if(NOT CURL_DISABLE_INSTALL)
_add_if("threadsafe" HAVE_ATOMIC OR
(USE_THREADS_POSIX AND HAVE_PTHREAD_H) OR
(WIN32 AND HAVE_WIN32_WINNT GREATER_EQUAL 0x600))
_add_if("Debug" ENABLE_DEBUG)
_add_if("TrackMemory" ENABLE_CURLDEBUG)
_add_if("ECH" SSL_ENABLED AND HAVE_ECH)
_add_if("PSL" USE_LIBPSL)
if(_items)
if(NOT CMAKE_VERSION VERSION_LESS 3.13)

View File

@ -549,8 +549,6 @@ CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH
CURL_CHECK_COMPILER_SYMBOL_HIDING
CURL_CHECK_CURLDEBUG
supports_unittests=yes
# cross-compilation of unit tests static library/programs fails when
# libcurl shared library is built. This might be due to a libtool or
@ -4817,6 +4815,12 @@ else
AC_MSG_RESULT([no])
fi
if test "x$OPENSSL_ENABLED" = "x1" -o -n "$SSL_ENABLED"; then
if test "x$ECH_ENABLED" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES ECH"
fi
fi
if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
if test ${ac_cv_sizeof_off_t} -gt 4 -o \
"$curl_win32_file_api" = "win32_large_files"; then
@ -4844,6 +4848,13 @@ else
])
fi
if test "x$want_debug" = "xyes"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES Debug"
fi
if test "x$want_curldebug" = "xyes"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES TrackMemory"
fi
dnl replace spaces with newlines
dnl sort the lines
dnl replace the newlines back to spaces

View File

@ -1248,52 +1248,6 @@ squeeze() {
])
dnl CURL_CHECK_CURLDEBUG
dnl -------------------------------------------------
dnl Settings which depend on configure's curldebug given
dnl option, and other additional configure pre-requisites.
dnl Actually the curl debug memory tracking feature can
dnl only be used/enabled when libcurl is built as a static
dnl library or as a shared one on those systems on which
dnl shared libraries support undefined symbols.
AC_DEFUN([CURL_CHECK_CURLDEBUG], [
AC_REQUIRE([XC_LIBTOOL])dnl
AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
supports_curldebug="unknown"
if test "$want_curldebug" = "yes"; then
if test "x$enable_shared" != "xno" &&
test "x$enable_shared" != "xyes"; then
AC_MSG_WARN([unknown enable_shared setting.])
supports_curldebug="no"
fi
if test "x$enable_static" != "xno" &&
test "x$enable_static" != "xyes"; then
AC_MSG_WARN([unknown enable_static setting.])
supports_curldebug="no"
fi
if test "$supports_curldebug" != "no"; then
if test "$enable_shared" = "yes" &&
test "x$xc_lt_shlib_use_no_undefined" = 'xyes'; then
supports_curldebug="no"
AC_MSG_WARN([shared library does not support undefined symbols.])
fi
fi
fi
#
if test "$want_curldebug" = "yes"; then
AC_MSG_CHECKING([if curl debug memory tracking can be enabled])
test "$supports_curldebug" = "no" || supports_curldebug="yes"
AC_MSG_RESULT([$supports_curldebug])
if test "$supports_curldebug" = "no"; then
AC_MSG_WARN([cannot enable curl debug memory tracking.])
want_curldebug="no"
fi
fi
])
dnl CURL_CHECK_COMPILER_HALT_ON_ERROR
dnl -------------------------------------------------
dnl Verifies if the compiler actually halts after the

View File

@ -44,9 +44,6 @@ close CURL;
$curl_protocols =~ s/\r//;
$curl_protocols =~ /\w+: (.*)$/;
@curl = split / /,$1;
# These features are not supported by curl-config
@curl = grep(!/^(Debug|TrackMemory)$/i, @curl);
@curl = sort @curl;
# Read the output of curl-config