Makefile.mk: fixup enabling libidn2

Replicate the method used by autotools and cmake to enable libidn2.
This way `lib/curl_setup.h` sets `USE_LIBIDN2` automatically.

Before this patch, `USE_LIBIDN2` was enabled directly, shortcutting
internal logic prioritizing IDN backends.

(This is academic now because `Makefile.mk` no longer supports
other IDN backends. But still useful for clarity.)

Closes #14421
This commit is contained in:
Viktor Szakats 2024-08-06 16:24:59 +02:00
parent ea3dfcb361
commit 7b1c0ab75e
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -239,7 +239,7 @@ endif
ifneq ($(findstring -idn2,$(CFG)),) ifneq ($(findstring -idn2,$(CFG)),)
LIBIDN2_PATH ?= $(PROOT)/../libidn2 LIBIDN2_PATH ?= $(PROOT)/../libidn2
CPPFLAGS += -DUSE_LIBIDN2 CPPFLAGS += -DHAVE_LIBIDN2 -DHAVE_IDN2_H
CPPFLAGS += -I"$(LIBIDN2_PATH)/include" CPPFLAGS += -I"$(LIBIDN2_PATH)/include"
LDFLAGS += -L"$(LIBIDN2_PATH)/lib" LDFLAGS += -L"$(LIBIDN2_PATH)/lib"
LIBS += -lidn2 LIBS += -lidn2