]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Makefile.mk: fixup enabling libidn2
authorViktor Szakats <commit@vsz.me>
Tue, 6 Aug 2024 14:24:59 +0000 (16:24 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 6 Aug 2024 20:33:05 +0000 (22:33 +0200)
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

lib/Makefile.mk

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