mirror of https://github.com/getdnsapi/getdns.git
Allow --without-libidn configure option
This commit is contained in:
parent
3034e0c62a
commit
a8d2e489ad
15
configure.ac
15
configure.ac
|
@ -209,6 +209,7 @@ AC_DEFINE_UNQUOTED([EDNS_COOKIE_ROLLOVER_TIME], [(24 * 60 * 60)], [How often the
|
||||||
|
|
||||||
# search to set include and library paths right
|
# search to set include and library paths right
|
||||||
# find libidn
|
# find libidn
|
||||||
|
my_with_libidn=1
|
||||||
AC_ARG_WITH(libidn, AS_HELP_STRING([--with-libidn=pathname],
|
AC_ARG_WITH(libidn, AS_HELP_STRING([--with-libidn=pathname],
|
||||||
[path to libidn (default: search /usr/local ..)]),
|
[path to libidn (default: search /usr/local ..)]),
|
||||||
[], [withval="yes"])
|
[], [withval="yes"])
|
||||||
|
@ -236,6 +237,8 @@ else
|
||||||
if test x_$withval != x_no; then
|
if test x_$withval != x_no; then
|
||||||
CFLAGS="$CFLAGS -I$withval/include"
|
CFLAGS="$CFLAGS -I$withval/include"
|
||||||
LDFLAGS="$LDFLAGS -L$withval/lib"
|
LDFLAGS="$LDFLAGS -L$withval/lib"
|
||||||
|
else
|
||||||
|
my_with_libidn=0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -287,19 +290,23 @@ fi
|
||||||
found_all_libs=1
|
found_all_libs=1
|
||||||
AC_MSG_NOTICE([Checking for dependency ldns])
|
AC_MSG_NOTICE([Checking for dependency ldns])
|
||||||
AC_CHECK_LIB([ldns], [ldns_dname_new_frm_str], [], [found_all_libs=0])
|
AC_CHECK_LIB([ldns], [ldns_dname_new_frm_str], [], [found_all_libs=0])
|
||||||
AC_MSG_NOTICE([Checking for dependency libidn])
|
|
||||||
AC_CHECK_LIB([idn], [idna_to_ascii_8z], [], [found_all_libs=0])
|
if test $my_with_libidn = 1
|
||||||
|
then
|
||||||
|
AC_MSG_NOTICE([Checking for dependency libidn])
|
||||||
|
AC_CHECK_LIB([idn], [idna_to_ascii_8z], [], [found_all_libs=0])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_CHECK_MEMBER([struct ldns_struct_dnssec_zone.hashed_names],
|
AC_CHECK_MEMBER([struct ldns_struct_dnssec_zone.hashed_names],
|
||||||
[AC_DEFINE_UNQUOTED([LDNS_DNSSEC_ZONE_HASHED_NAMES], [1], [When defined ldns_dnssec_zone contained the hashed_names member.])], [], [[#include <ldns/ldns.h>]])
|
[AC_DEFINE_UNQUOTED([LDNS_DNSSEC_ZONE_HASHED_NAMES], [1], [When defined ldns_dnssec_zone contained the hashed_names member.])], [], [[#include <ldns/ldns.h>]])
|
||||||
|
|
||||||
if test $my_with_libunbound == 1
|
if test $my_with_libunbound = 1
|
||||||
then
|
then
|
||||||
AC_MSG_NOTICE([Checking for dependency libunbound])
|
AC_MSG_NOTICE([Checking for dependency libunbound])
|
||||||
AC_CHECK_LIB([unbound], [ub_fd], [], [found_all_libs=0])
|
AC_CHECK_LIB([unbound], [ub_fd], [], [found_all_libs=0])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $found_all_libs == 0
|
if test $found_all_libs = 0
|
||||||
then
|
then
|
||||||
AC_MSG_ERROR([One more dependencies is missing])
|
AC_MSG_ERROR([One more dependencies is missing])
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -37,7 +37,9 @@
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <stringprep.h>
|
#include <stringprep.h>
|
||||||
|
#ifdef HAVE_LIBIDN
|
||||||
#include <idna.h>
|
#include <idna.h>
|
||||||
|
#endif
|
||||||
#include "getdns/getdns.h"
|
#include "getdns/getdns.h"
|
||||||
#include "getdns/getdns_extra.h"
|
#include "getdns/getdns_extra.h"
|
||||||
#include "util-internal.h"
|
#include "util-internal.h"
|
||||||
|
@ -102,6 +104,7 @@ getdns_convert_fqdn_to_dns_name(
|
||||||
char *
|
char *
|
||||||
getdns_convert_ulabel_to_alabel(const char *ulabel)
|
getdns_convert_ulabel_to_alabel(const char *ulabel)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_LIBIDN
|
||||||
int ret;
|
int ret;
|
||||||
char *buf;
|
char *buf;
|
||||||
char *prepped;
|
char *prepped;
|
||||||
|
@ -139,6 +142,9 @@ getdns_convert_ulabel_to_alabel(const char *ulabel)
|
||||||
}
|
}
|
||||||
free(prepped2);
|
free(prepped2);
|
||||||
return buf;
|
return buf;
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------------------------------------- getdns_convert_alabel_to_ulabel */
|
/*---------------------------------------- getdns_convert_alabel_to_ulabel */
|
||||||
|
@ -155,6 +161,7 @@ getdns_convert_ulabel_to_alabel(const char *ulabel)
|
||||||
char *
|
char *
|
||||||
getdns_convert_alabel_to_ulabel(const char *alabel)
|
getdns_convert_alabel_to_ulabel(const char *alabel)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_LIBIDN
|
||||||
int ret; /* just in case we might want to use it someday */
|
int ret; /* just in case we might want to use it someday */
|
||||||
char *buf;
|
char *buf;
|
||||||
|
|
||||||
|
@ -164,6 +171,9 @@ getdns_convert_alabel_to_ulabel(const char *alabel)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return buf;
|
return buf;
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue