cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH] add support for pkg-config detection of libidn

From: Mark Brand <mabrand_at_mabrand.nl>
Date: Fri, 25 Nov 2011 23:00:16 +0100

---
 configure.ac |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2ba6625..52158f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2377,6 +2377,15 @@ case "$LIBIDN" in
        fi
 
        if test "x$idn" != "xyes"; then
+         dnl check with pkg-config
+         PKG_CHECK_MODULES(LIBIDN_PC, libidn >= 0.0.0, [idn=yes], [idn=no])
+         if test "x$idn" = "xyes"; then
+            LIBS="$LIBS $LIBIDN_PC_LIBS"
+            CPPFLAGS="$CPPFLAGS $LIBIDN_PC_CFLAGS"
+         fi
+       fi
+
+       if test "x$idn" != "xyes"; then
           dnl check with default paths
           idn="yes"
           AC_CHECK_LIB(idn, idna_to_ascii_lz, ,
-- 
1.7.7.3
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-11-25