From: Viktor Szakats Date: Thu, 4 Jul 2024 03:04:35 +0000 (+0200) Subject: build: add Debug, TrackMemory, ECH to feature list X-Git-Tag: curl-8_9_0~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96a1a05f662677af64b16d862c4126ed52ea4b30;p=thirdparty%2Fcurl.git 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: 065047dc62cba3efde597fa5420d112fc2f4c500 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 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 88f0d590b4..ac8100e4e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/configure.ac b/configure.ac index 6c9a3f1f1c..45263f18e1 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index 06e335d8fa..06cf1b2177 100644 --- a/m4/curl-compilers.m4 +++ b/m4/curl-compilers.m4 @@ -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 diff --git a/tests/libtest/test1013.pl b/tests/libtest/test1013.pl index 34e2cc56fc..9ae7723a21 100755 --- a/tests/libtest/test1013.pl +++ b/tests/libtest/test1013.pl @@ -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