# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
+# serial 48 AC_PROG_LIBTOOL
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
dynamic_linker=no
;;
+kfreebsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='GNU ld.so'
+ ;;
+
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux*)
version_type=linux
need_lib_prefix=no
need_version=no
# before this can be enabled.
hardcode_into_libs=yes
+ # find out which ABI we are using
+ libsuff=
+ case "$host_cpu" in
+ x86_64*|s390x*|powerpc64*)
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *64-bit*)
+ libsuff=64
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+ esac
+
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/^[ ]*//;s/#.*//;/^[^\/]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
dynamic_linker='GNU/Linux ld.so'
;;
-netbsdelf*-gnu)
+knetbsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
- dynamic_linker='NetBSD ld.elf_so'
+ dynamic_linker='GNU ld.so'
;;
netbsd*)
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | dragonfly*)
+freebsd* | kfreebsd*-gnu | dragonfly*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+linux*)
lt_cv_deplibs_check_method=pass_all
;;
-netbsd* | netbsdelf*-gnu)
+netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
else
freebsd-elf*)
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
;;
- freebsd* | dragonfly*)
+ freebsd* | kfreebsd*-gnu | dragonfly*)
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
# conventions
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
;;
- linux* | k*bsd*-gnu)
+ linux*)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
;;
esac
;;
- netbsd* | netbsdelf*-gnu)
+ netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
wlarc=
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
;;
-linux* | k*bsd*-gnu)
+linux*)
if test "$host_cpu" = ia64; then
symcode='[[ABCDGIRSTW]]'
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
;;
esac
;;
- freebsd* | dragonfly*)
+ freebsd* | kfreebsd*-gnu | dragonfly*)
# FreeBSD uses GNU C++
;;
hpux9* | hpux10* | hpux11*)
;;
esac
;;
- linux* | k*bsd*-gnu)
+ linux*)
case $cc_basename in
KCC*)
# KAI C++ Compiler
;;
esac
;;
- netbsd* | netbsdelf*-gnu)
+ netbsd*)
;;
osf3* | osf4* | osf5*)
case $cc_basename in
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
- linux* | k*bsd*-gnu)
+ linux*)
case $cc_basename in
icc* | ecc*)
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cygwin* | mingw*)
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
;;
- linux* | k*bsd*-gnu)
- _LT_AC_TAGVAR(link_all_deplibs, $1)=no
- ;;
*)
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- linux* | k*bsd*-gnu)
+ linux*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
$echo "local: *; };" >> $output_objdir/$libname.ver~
$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
- _LT_AC_TAGVAR(link_all_deplibs, $1)=no
else
_LT_AC_TAGVAR(ld_shlibs, $1)=no
fi
;;
- netbsd* | netbsdelf*-gnu)
+ netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
+ freebsd* | kfreebsd*-gnu | dragonfly*)
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
;;
- netbsd* | netbsdelf*-gnu)
+ netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
done
done
done
+IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
done
])
SED=$lt_cv_path_SED
+AC_SUBST([SED])
AC_MSG_RESULT([$SED])
])
#include <pwd.h>
#include <sys/resource.h>
-/** if we want to enable coredumps after daemonize */
-static int enable_coredumps = 0;
-
/** print usage. */
static void usage()
{
printf("-h this help\n");
printf("-c file config file to read, unbound.conf(5).\n");
printf("-d do not fork into the background.\n");
- printf("-C try to enable coredumps after fork into background.\n");
printf("-v verbose (multiple times increase verbosity)\n");
printf("Version %s\n", PACKAGE_VERSION);
printf("BSD licensed, see LICENSE in source package for details.\n");
}
}
-/** printout rlimit prettily */
-static void
-print_rlim_pretty(const char* str, struct rlimit* rlim)
-{
- if(rlim->rlim_cur == (rlim_t)RLIM_INFINITY &&
- rlim->rlim_max == (rlim_t)RLIM_INFINITY)
- log_info("%s unlimited, max unlimited", str);
- else if(rlim->rlim_max == (rlim_t)RLIM_INFINITY)
- log_info("%s %d, max unlimited", str, (int)rlim->rlim_cur);
- else if(rlim->rlim_cur == (rlim_t)RLIM_INFINITY)
- log_info("%s unlimited, max %d", str, (int)rlim->rlim_max);
- else log_info("%s %d, max %d", str, (int)rlim->rlim_cur,
- (int)rlim->rlim_max);
-}
-
-/** try to enable coredumps */
-static void
-do_coredump_enable()
-{
- struct rlimit rlim;
- if(getrlimit(RLIMIT_CORE, &rlim) < 0) {
- log_warn("getrlimit(core): %s", strerror(errno));
- return;
- }
- print_rlim_pretty("rlimit(core) is", &rlim);
- if(rlim.rlim_cur == (rlim_t)RLIM_INFINITY &&
- rlim.rlim_max == (rlim_t)RLIM_INFINITY) {
- return;
- }
- if(rlim.rlim_cur > (rlim_t)10000) {
- return;
- }
- rlim.rlim_cur = (rlim_t)RLIM_INFINITY;
- rlim.rlim_max = (rlim_t)RLIM_INFINITY;
- if(setrlimit(RLIMIT_CORE, &rlim) < 0) {
- log_warn("setrlimit(core): %s", strerror(errno));
- return;
- }
- if(getrlimit(RLIMIT_CORE, &rlim) < 0) {
- log_warn("getrlimit(core, upd): %s", strerror(errno));
- return;
- }
- print_rlim_pretty("updated rlimit(core) is", &rlim);
-}
-
/** to changedir, logfile */
static void
apply_dir(struct daemon* daemon, struct config_file* cfg, int cmdline_verbose)
log_init(cfg->logfile);
if(!debug_mode && cfg->do_daemonize) {
detach(cfg);
- if(enable_coredumps)
- do_coredump_enable();
}
if(cfg->pidfile && cfg->pidfile[0]) {
writepid(cfg->pidfile, getpid());
log_init(NULL);
/* parse the options */
- while( (c=getopt(argc, argv, "Cc:dhv")) != -1) {
+ while( (c=getopt(argc, argv, "c:dhv")) != -1) {
switch(c) {
- case 'C':
- enable_coredumps = 1;
- break;
case 'c':
cfgfile = optarg;
break;
allocator. For example, with caches per thread.
o #define BIT_... different on bigendian and smallendian systems so that
the htons on flags is not needed to send a message from the cache.
-o possible optimization with delayed malloc of msgreply after parse
- (reuse parse structures and ptrs to packet in meantime).
-o possible optimization, so that precious id number resource is not depleted
- by parsing of messages. Delay malloc, as above, or try to reverse release
- special id numbers, and if you release the next_id number for the thread
- it reuses that id number.
-o use rbtree to compress domain names in messages, sorted AXFRs of 16Kb
- and so on. For current packets, even worstcase, list, is ok. Only if we
- start to send out compressed AXFRs then it becomes a problem.
- We can cap AXFR packets on 256 or 1024 domain names, for example.
o speed up pkt domain name decompression loop detection using counter perhaps.
o detect OS/400 pthreads implementation that allows upgrading to writelock
on pthreads rwlocks and use it to examine-rd before storing-wr rrset cache.
o fallback without EDNS if result is NOTIMPL, now only on FORMERR like in java.
o scrubber has slow pkt_subdomain and pkt_strict_subdomain functions.
o get serverselection algorithm out of local optimum.
+ make subtargets to get rtt info for a couple of targets, like fetch-policy.
+ or send out multiple queries to multiple servers.
o donotqueryaddresses allow specification of subnets, use trie to store.
extend default list to contain illegal ip4 and ip6 addresses.
o memory profile; and if needed put serviced queries under qstate->region