--enable-stub-only configure option

This commit is contained in:
Willem Toorop 2015-08-28 11:09:32 +02:00
parent 15943b1b49
commit 8ca93a22de
4 changed files with 43 additions and 27 deletions

View File

@ -2,10 +2,10 @@
* Fix returned upstreams list by getdns_context_get_api_information() * Fix returned upstreams list by getdns_context_get_api_information()
* Fix some autoconf issues when srcdir != builddir * Fix some autoconf issues when srcdir != builddir
* Fix remove build date from manpage version for reproducable builds * Fix remove build date from manpage version for reproducable builds
Thanks DKG
* Fix transport fallback issues plus transport fallback unit test script * Fix transport fallback issues plus transport fallback unit test script
* Fix string bindata's need not contain trailing zero byte * Fix string bindata's need not contain trailing zero byte
* --without-libunbound configure option. For stub only operation. * --enable-stub-only configure option for stub only operation.
Stub mode will be the default. Removes the dependency on libunbound
* 2015-07-18: Version 0.3.1 * 2015-07-18: Version 0.3.1
* Fix repeating rdata fields * Fix repeating rdata fields

View File

@ -208,6 +208,16 @@ esac
AC_DEFINE_UNQUOTED([EDNS_COOKIE_OPCODE], [10], [The edns cookie option code.]) AC_DEFINE_UNQUOTED([EDNS_COOKIE_OPCODE], [10], [The edns cookie option code.])
AC_DEFINE_UNQUOTED([EDNS_COOKIE_ROLLOVER_TIME], [(24 * 60 * 60)], [How often the edns client cookie is refreshed.]) AC_DEFINE_UNQUOTED([EDNS_COOKIE_ROLLOVER_TIME], [(24 * 60 * 60)], [How often the edns client cookie is refreshed.])
my_with_libunbound=1
AC_ARG_ENABLE(stub-only, AC_HELP_STRING([--enable-stub-only], [Restricts resolution modes to STUB (which will be the default mode). Removes the libunbound dependency.]))
case "$enable_stub_only" in
yes)
my_with_libunbound=0
;;
no|*)
;;
esac
# search to set include and library paths right # search to set include and library paths right
# find libidn # find libidn
my_with_libidn=1 my_with_libidn=1
@ -263,12 +273,13 @@ else
fi fi
fi fi
my_with_libunbound=1 if test $my_with_libunbound = 1
# find libunbound then
AC_ARG_WITH(libunbound, AS_HELP_STRING([--with-libunbound=pathname], # find libunbound
AC_ARG_WITH(libunbound, AS_HELP_STRING([--with-libunbound=pathname],
[path to libunbound (default: search /usr/local ..)]), [path to libunbound (default: search /usr/local ..)]),
[], [withval="yes"]) [], [withval="yes"])
if test x_$withval = x_yes; then if test x_$withval = x_yes; then
for dir in /usr/local /opt/local /usr/pkg /usr/sfw; do for dir in /usr/local /opt/local /usr/pkg /usr/sfw; do
if test -f "$dir/include/unbound.h"; then if test -f "$dir/include/unbound.h"; then
CFLAGS="$CFLAGS -I$dir/include" CFLAGS="$CFLAGS -I$dir/include"
@ -277,7 +288,7 @@ if test x_$withval = x_yes; then
break break
fi fi
done done
else 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"
@ -285,6 +296,7 @@ else
AC_DEFINE_UNQUOTED([DISABLE_RESOLUTION_RECURSING], [1], [Define this to disable recursing resolution type.]) AC_DEFINE_UNQUOTED([DISABLE_RESOLUTION_RECURSING], [1], [Define this to disable recursing resolution type.])
my_with_libunbound=0 my_with_libunbound=0
fi fi
fi
fi fi
# Checks for libraries. # Checks for libraries.

View File

@ -226,11 +226,11 @@ context.lo context.o: $(srcdir)/context.c config.h $(srcdir)/gldns/str2wire.h $(
config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h $(srcdir)/types-internal.h \ config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h $(srcdir)/types-internal.h \
$(srcdir)/util-internal.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h \ $(srcdir)/util-internal.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h \
$(srcdir)/dnssec.h $(srcdir)/stub.h $(srcdir)/list.h $(srcdir)/dnssec.h $(srcdir)/stub.h $(srcdir)/list.h
convert.lo convert.o: $(srcdir)/convert.c getdns/getdns.h getdns/getdns_extra.h \ convert.lo convert.o: $(srcdir)/convert.c config.h getdns/getdns.h getdns/getdns_extra.h \
getdns/getdns.h $(srcdir)/util-internal.h config.h $(srcdir)/context.h $(srcdir)/types-internal.h \ getdns/getdns.h $(srcdir)/util-internal.h $(srcdir)/context.h $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h \
$(srcdir)/util/rbtree.h $(srcdir)/extension/libmini_event.h config.h $(srcdir)/util/mini_event.h \ $(srcdir)/extension/libmini_event.h config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \
$(srcdir)/util/rbtree.h $(srcdir)/types-internal.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h \ $(srcdir)/types-internal.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h \
$(srcdir)/gldns/pkthdr.h $(srcdir)/gldns/wire2str.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/wire2str.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h
dict.lo dict.o: $(srcdir)/dict.c $(srcdir)/types-internal.h getdns/getdns.h getdns/getdns_extra.h \ dict.lo dict.o: $(srcdir)/dict.c $(srcdir)/types-internal.h getdns/getdns.h getdns/getdns_extra.h \
getdns/getdns.h $(srcdir)/util/rbtree.h $(srcdir)/util-internal.h config.h $(srcdir)/context.h \ getdns/getdns.h $(srcdir)/util/rbtree.h $(srcdir)/util-internal.h config.h $(srcdir)/context.h \
$(srcdir)/extension/libmini_event.h config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ $(srcdir)/extension/libmini_event.h config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \

View File

@ -824,7 +824,11 @@ getdns_context_create_with_extended_memory_functions(
_getdns_rbtree_init(&result->outbound_requests, transaction_id_cmp); _getdns_rbtree_init(&result->outbound_requests, transaction_id_cmp);
_getdns_rbtree_init(&result->local_hosts, local_host_cmp); _getdns_rbtree_init(&result->local_hosts, local_host_cmp);
#ifdef HAVE_LIBUNBOUND
result->resolution_type = GETDNS_RESOLUTION_RECURSING; result->resolution_type = GETDNS_RESOLUTION_RECURSING;
#else
result->resolution_type = GETDNS_RESOLUTION_STUB;
#endif
if ((r = create_default_namespaces(result))) if ((r = create_default_namespaces(result)))
goto error; goto error;