autotools: use CURLDEBUG to exclude TrackMemory code from unity

Before this patch, autotools builds excluded TrackMemory sources
(`lib/memdebug.c` and `lib/curl_multibyte.c`) based on the `DEBUGBUILD`
setting. This works in most cases because its value is the same as
`CURLDEBUG` by default, but the correct condition is `CURLDEBUG`.

It should fix `--disable-debug --enable-curldebug --enable-unity`
builds. (not tested in CI)

It also syncs behavior with cmake builds.

Ref: #16705
Closes #16723
This commit is contained in:
Viktor Szakats 2025-03-14 03:37:37 +01:00
parent a16485a42e
commit d36f164e61
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
2 changed files with 2 additions and 2 deletions

View file

@ -86,7 +86,7 @@ if USE_UNITY
# Keep these separate to avoid duplicate definitions when linking libtests
# in static mode.
curl_EXCLUDE = curl_threads.c timediff.c warnless.c
if DEBUGBUILD
if CURLDEBUG
# We must compile these sources separately to avoid memdebug.h redefinitions
# applying to them.
curl_EXCLUDE += memdebug.c curl_multibyte.c

View file

@ -71,7 +71,7 @@ CLEANFILES =
if USE_UNITY
curl_EXCLUDE =
if DEBUGBUILD
if CURLDEBUG
# We must compile this source separately to avoid memdebug.h redefinitions
# applying to them.
curl_EXCLUDE += ../lib/curl_multibyte.c