]> granicus.if.org Git - curl/commitdiff
check for and require tld.h to be present before libidn usage is activated
authorDaniel Stenberg <daniel@haxx.se>
Mon, 8 Nov 2004 07:47:08 +0000 (07:47 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 8 Nov 2004 07:47:08 +0000 (07:47 +0000)
in the build, since libidn 0.3.X didn't have the header and we don't support
that old libidn versions anyway.

This was mentioned on the list by Jean-Philippe Barrette-LaPierre and in bug
report #1062264.

configure.ac
lib/setup.h

index 3a01b2a4554eeeaa8982f54b831ab0ca49adc91c..091c869b80d9246af230b0cfaa73237a11777b82 100644 (file)
@@ -984,7 +984,7 @@ case "$LIBIDN" in
          curl_idn_msg="enabled"
          dnl different versions of libidn have different setups of these:
          AC_CHECK_FUNCS( idn_free idna_strerror tld_strerror)
-         AC_CHECK_HEADERS( idn-free.h )
+         AC_CHECK_HEADERS( idn-free.h tld.h )
        fi
                     
        ;; 
index f121b7320c60760f1cee4761e162374b2de673c6..e535279c817483aac87eb056ea8e2e9c1e02fb34 100644 (file)
@@ -281,11 +281,12 @@ typedef int curl_socket_t;
 #undef HAVE_ALARM
 #endif
 
-#ifdef HAVE_LIBIDN
-/* This could benefit from additional checks that some of the used/important
-   header files are present as well before we define the USE_* define. */
+#if defined(HAVE_LIBIDN) && defined(HAVE_TLD_H)
+/* The lib was present and the tld.h header (which is missing in libidn 0.3.X
+   but we only work with libidn 0.4.1 or later) */
 #define USE_LIBIDN
-#define LIBIDN_REQUIRED_VERSION "0.4.1"
 #endif
 
+#define LIBIDN_REQUIRED_VERSION "0.4.1"
+
 #endif /* __CONFIG_H */