build: use pkg-config for i18n
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Mon, 16 Sep 2024 20:20:04 +0000 (22:20 +0200)
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Tue, 17 Sep 2024 20:53:08 +0000 (22:53 +0200)
As a side effect: this enables pkg-config support for all
SUPPORT_* items of the EDITME/Makefile.

src/scripts/Configure-Makefile
src/src/EDITME

index 74f8dda47af9f16b9357e1a17620291a95bd15c6..3ba9005cfb480fbbb07792fa547749d88776190c 100755 (executable)
@@ -159,7 +159,7 @@ rm -f ./$mftepcp ./$mftepcp2
 
 # handle pkg-config
 # beware portability of extended regexps with sed.
-$egrep "^[$st]*(AUTH|LOOKUP)_[A-Z0-9_]*[$st]*=[$st]*" $mft | \
+$egrep "^[$st]*(AUTH|LOOKUP|SUPPORT)_[A-Z0-9_]*[$st]*=[$st]*" $mft | \
   sed "s/[$st]*=/='/" | \
   sed "s/\$/'/" > $mftt
 $egrep "^[$st]*((USE_(OPENSSL|GNUTLS)_PC)|SUPPORT_TLS|USE_GNUTLS|PCRE2?_CONFIG|AVOID_GNUTLS_PKCS11)[$st]*=[$st]*" $mft | \
@@ -236,6 +236,9 @@ then
           elif [ "$var" != "${var#AUTH_}" ]; then
             echo "CFLAGS += $cflags"
             echo "AUTH_LIBS += $libs"
+         elif [ "$var" != "${var#SUPPORT_}" ]; then
+           echo "CFLAGS += $cflags"
+           echo "LIBS += $libs"
           else
             echo >&2 "Don't know how to handle pkg-config for $var"
           fi
index 2cf0b3da9ba76db6f612fd58829b4a41d8d8a969..6295d72d620d48de425fdf138b0c32ee19a76842 100644 (file)
@@ -1149,11 +1149,15 @@ ZCAT_COMMAND=/usr/bin/zcat
 # You need to have the IDN library installed.
 # If you want IDNA2008 mappings per RFCs 5890, 6530 and 6533, you additionally
 # need libidn2 and SUPPORT_I18N_2008.
+# If you're using pkg-config, enable the _PC lines, otherwise the LDFLAGS ones.
 
 # SUPPORT_I18N=yes
+# SUPPORT_I18N_PC=libidn
 # LDFLAGS += -lidn
+#
 # SUPPORT_I18N_2008=yes
-# LDFLAGS += -lidn -lidn2
+# SUPPORT_I18N_2008_PC=libidn2
+# LDFLAGS += -lidn2
 
 
 #------------------------------------------------------------------------------