dnl CF_WITH_IDNA version: 7 updated: 2010/05/05 20:27:55
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)

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