dnl CF_WITH_IDNA version: 8 updated: 2010/11/26 15:10:07
dnl ------------
dnl Check for libidn, use it if found.
dnl
dnl $1 = optional path for headers/library
AC_DEFUN([CF_WITH_IDNA],[
  CF_ADD_OPTIONAL_PATH($1)

  CF_FIND_LINKAGE([
#include <stdio.h>
#include <idna.h>
],[
	char *output = 0;
    int code = idna_to_ascii_8z("name", &output, IDNA_USE_STD3_ASCII_RULES);
],idn,,,,[$LIBICONV])

if test "x$cf_cv_find_linkage_idn" = xyes ; then
	AC_DEFINE(USE_IDNA)
fi 
])dnl
