use idn2.h or idna.h depending on HAVE_LIBIDN/HAVE_LIBIDN
authorChristian Grothoff <christian@grothoff.org>
Mon, 11 Feb 2019 22:10:12 +0000 (23:10 +0100)
committerChristian Grothoff <christian@grothoff.org>
Mon, 11 Feb 2019 22:10:12 +0000 (23:10 +0100)
configure.ac
src/util/dnsparser.c

index 38182599f10ecb9540bb7e82d60b3bc494f6d11d..14360284a3a7656b6ff63c34a3c409fc4b79156e 100644 (file)
@@ -862,7 +862,7 @@ AS_IF([test x$my_with_libidn2 = x1],
                     LIBS="-lidn2 $LIBS"
                    AC_DEFINE_UNQUOTED([HAVE_LIBIDN2],
                                        [1],
-                                        [Define to 1 if you have 'libidn2' (-lidn).])],
+                                        [Define to 1 if you have 'libidn2' (-lidn2).])],
                      [MISSING_DEPS="${MISSING_DEPS}${MISSING_SEP}libidn2"
                      MISSING_SEP=", "])])
 AM_CONDITIONAL(HAVE_LIBIDN2, test x$working_libidn2 = x1)
index 2baa76ef2ebcfdaaee45e2782fe29263a2187e77..55a9ff6c876e4e8d4758caf64ca6cb0ac2957bef 100644 (file)
  * @author Christian Grothoff
  */
 #include "platform.h"
+#if HAVE_LIBIDN2
 #if HAVE_IDN2_H
 #include <idn2.h>
 #elif HAVE_IDN2_IDN2_H
 #include <idn2/idn2.h>
-#elif HAVE_IDNA_H
+#endif
+#elif HAVE_LIBIDN
+#if HAVE_IDNA_H
 #include <idna.h>
 #elif HAVE_IDN_IDNA_H
 #include <idn/idna.h>
 #endif
+#endif
 #if WINDOWS
 #include <idn-free.h>
 #endif