summaryrefslogtreecommitdiff
path: root/usr.sbin/nsd/configure.ac
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2021-04-01 09:56:13 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2021-04-01 09:56:13 +0000
commit05ddf102e264b5237162df515ae685a140dfd340 (patch)
treee70b8569e0fbeefcca4c321c73dc1845fce69bdf /usr.sbin/nsd/configure.ac
parentaf8406fd802895a9cbb6c393e29475fc2627652b (diff)
merge NSD 4.3.6rc1
Diffstat (limited to 'usr.sbin/nsd/configure.ac')
-rw-r--r--usr.sbin/nsd/configure.ac147
1 files changed, 61 insertions, 86 deletions
diff --git a/usr.sbin/nsd/configure.ac b/usr.sbin/nsd/configure.ac
index 06e2f0e3b7e..4f9946e9595 100644
--- a/usr.sbin/nsd/configure.ac
+++ b/usr.sbin/nsd/configure.ac
@@ -5,8 +5,8 @@ dnl
sinclude(acx_nlnetlabs.m4)
sinclude(dnstap/dnstap.m4)
-AC_INIT(NSD,4.3.4,nsd-bugs@nlnetlabs.nl)
-AC_CONFIG_HEADER([config.h])
+AC_INIT([NSD],[4.3.6],[nsd-bugs@nlnetlabs.nl])
+AC_CONFIG_HEADERS([config.h])
#
# Setup the standard programs
@@ -23,7 +23,7 @@ cmdln="`echo $@ | sed -e 's/\\\\/\\\\\\\\/g' | sed -e 's/"/\\\\"/'g`"
AC_DEFINE_UNQUOTED(CONFCMDLINE, ["$cmdln"], [Command line arguments used with configure])
CFLAGS="$CFLAGS"
-AC_AIX
+AC_USE_SYSTEM_EXTENSIONS
if test "$ac_cv_header_minix_config_h" = "yes"; then
AC_DEFINE(_NETBSD_SOURCE,1, [Enable for compile on Minix])
fi
@@ -51,7 +51,7 @@ esac
#
configdir=$sysconfdir/nsd
AC_ARG_WITH([configdir],
- AC_HELP_STRING([--with-configdir=dir], [NSD configuration directory]),
+ AS_HELP_STRING([--with-configdir=dir],[NSD configuration directory]),
[configdir=$withval])
AC_DEFINE_UNQUOTED(CONFIGDIR, ["`eval echo $configdir`"], [NSD config dir])
AC_SUBST(configdir)
@@ -60,7 +60,7 @@ AC_SUBST(configdir)
# Determine configuration file
nsd_conf_file=${configdir}/nsd.conf
AC_ARG_WITH([nsd_conf_file],
- AC_HELP_STRING([--with-nsd_conf_file=path], [Pathname to the NSD configuration file]),
+ AS_HELP_STRING([--with-nsd_conf_file=path],[Pathname to the NSD configuration file]),
[nsd_conf_file=$withval])
AC_SUBST(nsd_conf_file)
# the eval is to evaluate shell expansion twice, once
@@ -72,7 +72,7 @@ AC_DEFINE_UNQUOTED(CONFIGFILE, ["`eval echo $nsd_conf_file`"], [Pathname to the
#
logfile=${localstatedir}/log/nsd.log
AC_ARG_WITH([logfile],
- AC_HELP_STRING([--with-logfile=path], [Pathname to the default log file]),
+ AS_HELP_STRING([--with-logfile=path],[Pathname to the default log file]),
[logfile=$withval])
AC_SUBST(logfile)
@@ -91,7 +91,7 @@ else
pidfile=${dbdir}/nsd.pid
fi
AC_ARG_WITH([pidfile],
- AC_HELP_STRING([--with-pidfile=path], [Pathname to the NSD pidfile]),
+ AS_HELP_STRING([--with-pidfile=path],[Pathname to the NSD pidfile]),
[pidfile=$withval])
AC_SUBST(pidfile)
AC_DEFINE_UNQUOTED(PIDFILE, ["`eval echo $pidfile`"], [Pathname to the NSD pidfile])
@@ -101,7 +101,7 @@ AC_DEFINE_UNQUOTED(PIDFILE, ["`eval echo $pidfile`"], [Pathname to the NSD pidfi
#
dbfile=${dbdir}/nsd.db
AC_ARG_WITH([dbfile],
- AC_HELP_STRING([--with-dbfile=path], [Pathname to the NSD database]),
+ AS_HELP_STRING([--with-dbfile=path],[Pathname to the NSD database]),
[dbfile=$withval])
AC_SUBST(dbfile)
AC_DEFINE_UNQUOTED(DBFILE, ["`eval echo $dbfile`"], [Pathname to the NSD database])
@@ -119,29 +119,26 @@ AC_SUBST(piddir)
#
zonesdir=$configdir
AC_ARG_WITH([zonesdir],
- AC_HELP_STRING([--with-zonesdir=dir], [NSD default location for zone files]),
+ AS_HELP_STRING([--with-zonesdir=dir],[NSD default location for zone files]),
[zonesdir=$withval])
AC_SUBST(zonesdir)
AC_DEFINE_UNQUOTED(ZONESDIR, ["`eval echo $zonesdir`"], [NSD default location for zone files. Empty string or NULL to disable.])
# default xfrd file location.
xfrdfile=${dbdir}/xfrd.state
-AC_ARG_WITH([xfrdfile], AC_HELP_STRING([--with-xfrdfile=path],
- [Pathname to the NSD xfrd zone timer state file]), [xfrdfile=$withval])
+AC_ARG_WITH([xfrdfile], AS_HELP_STRING([--with-xfrdfile=path],[Pathname to the NSD xfrd zone timer state file]), [xfrdfile=$withval])
AC_DEFINE_UNQUOTED(XFRDFILE, ["`eval echo $xfrdfile`"], [Pathname to the NSD xfrd zone timer state file.])
AC_SUBST(xfrdfile)
# default zonelist file location.
zonelistfile=${dbdir}/zone.list
-AC_ARG_WITH([zonelistfile], AC_HELP_STRING([--with-zonelistfile=path],
- [Pathname to the NSD zone list file]), [zonelistfile=$withval])
+AC_ARG_WITH([zonelistfile], AS_HELP_STRING([--with-zonelistfile=path],[Pathname to the NSD zone list file]), [zonelistfile=$withval])
AC_DEFINE_UNQUOTED(ZONELISTFILE, ["`eval echo $zonelistfile`"], [Pathname to the NSD zone list file.])
AC_SUBST(zonelistfile)
# default xfr dir location.
xfrdir="/tmp"
-AC_ARG_WITH([xfrdir], AC_HELP_STRING([--with-xfrdir=path],
- [Pathname to where the NSD transfer dir is created]), [xfrdir=$withval])
+AC_ARG_WITH([xfrdir], AS_HELP_STRING([--with-xfrdir=path],[Pathname to where the NSD transfer dir is created]), [xfrdir=$withval])
AC_DEFINE_UNQUOTED(XFRDIR, ["`eval echo $xfrdir`"], [Pathname to where the NSD transfer dir is created.])
AC_SUBST(xfrdir)
@@ -160,7 +157,7 @@ AC_DEFINE_UNQUOTED(NSD_START_PATH, ["$nsd_start_path"], [Pathname to start nsd f
# Determine default chroot directory
#
AC_ARG_WITH([chroot],
- AC_HELP_STRING([--with-chroot=dir], [NSD default chroot directory]),
+ AS_HELP_STRING([--with-chroot=dir],[NSD default chroot directory]),
[
chrootdir=$withval
AC_DEFINE_UNQUOTED(CHROOTDIR, ["`eval echo $chrootdir`"], [NSD default chroot directory])
@@ -172,7 +169,7 @@ AC_SUBST(chrootdir)
#
user=nsd
AC_ARG_WITH([user],
- AC_HELP_STRING([--with-user=username], [User name or ID to answer the queries with]),
+ AS_HELP_STRING([--with-user=username],[User name or ID to answer the queries with]),
[user=$withval])
AC_SUBST(user)
AC_DEFINE_UNQUOTED(USER, ["$user"], [the user name to drop privileges to])
@@ -182,7 +179,7 @@ AC_PROG_SED
AC_PROG_AWK
AC_PROG_GREP
AC_PROG_EGREP
-AC_PROG_LEX
+AC_PROG_LEX([noyywrap])
AC_PROG_YACC
AC_PROG_LN_S
AC_PROG_INSTALL
@@ -222,15 +219,12 @@ AC_DEFUN([AC_CHECK_FORMAT_ATTRIBUTE],
AC_MSG_CHECKING(whether the C compiler (${CC-cc}) accepts the "format" attribute)
AC_CACHE_VAL(ac_cv_c_format_attribute,
[ac_cv_c_format_attribute=no
-AC_TRY_COMPILE(
-[#include <stdio.h>
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
void f (char *format, ...) __attribute__ ((format (printf, 1, 2)));
void (*pf) (char *format, ...) __attribute__ ((format (printf, 1, 2)));
-], [
+]], [[
f ("%s", "str");
-],
-[ac_cv_c_format_attribute="yes"],
-[ac_cv_c_format_attribute="no"])
+]])],[ac_cv_c_format_attribute="yes"],[ac_cv_c_format_attribute="no"])
])
AC_MSG_RESULT($ac_cv_c_format_attribute)
@@ -244,14 +238,11 @@ AC_DEFUN([AC_CHECK_UNUSED_ATTRIBUTE],
AC_MSG_CHECKING(whether the C compiler (${CC-cc}) accepts the "unused" attribute)
AC_CACHE_VAL(ac_cv_c_unused_attribute,
[ac_cv_c_unused_attribute=no
-AC_TRY_COMPILE(
-[#include <stdio.h>
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
void f (char *u __attribute__((unused)));
-], [
+]], [[
f ("x");
-],
-[ac_cv_c_unused_attribute="yes"],
-[ac_cv_c_unused_attribute="no"])
+]])],[ac_cv_c_unused_attribute="yes"],[ac_cv_c_unused_attribute="no"])
])
AC_MSG_RESULT($ac_cv_c_unused_attribute)
@@ -265,14 +256,11 @@ AC_DEFUN([CHECK_NORETURN_ATTRIBUTE],
AC_MSG_CHECKING(whether the C compiler (${CC-cc}) accepts the "noreturn" attribute)
AC_CACHE_VAL(ac_cv_c_noreturn_attribute,
[ac_cv_c_noreturn_attribute=no
-AC_TRY_COMPILE(
-[ #include <stdio.h>
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h>
__attribute__((noreturn)) void f(int x) { printf("%d", x); }
-], [
+]], [[
f(1);
-],
-[ac_cv_c_noreturn_attribute="yes"],
-[ac_cv_c_noreturn_attribute="no"])
+]])],[ac_cv_c_noreturn_attribute="yes"],[ac_cv_c_noreturn_attribute="no"])
])
AC_MSG_RESULT($ac_cv_c_noreturn_attribute)
@@ -313,14 +301,10 @@ AC_DEFUN([AC_CHECK_CTIME_R],
AC_MSG_CHECKING(whether ctime_r works with two arguments)
AC_CACHE_VAL(ac_cv_c_ctime_c,
[ac_cv_c_ctime_c=no
-AC_TRY_COMPILE(
-[#include <time.h>
-void testing (void) { time_t clock; char current_time[40]; ctime_r(&clock, current_time); }],
-[
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>
+void testing (void) { time_t clock; char current_time[40]; ctime_r(&clock, current_time); }]], [[
testing();
-],
-[ac_cv_c_ctime_c="yes"],
-[ac_cv_c_ctime_c="no"])
+]])],[ac_cv_c_ctime_c="yes"],[ac_cv_c_ctime_c="no"])
])
AC_MSG_RESULT($ac_cv_c_ctime_c)
@@ -358,8 +342,7 @@ AC_CHECK_CTIME_R
# http://www.gnu.org/software/ac-archive/htmldoc/check_ssl.html and
# modified for NSD.
AC_DEFUN([CHECK_SSL], [
- AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname],
- [enable SSL (will check /usr/local/ssl
+ AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl=pathname],[enable SSL (will check /usr/local/ssl
/usr/lib/ssl /usr/ssl /usr/pkg /usr/sfw /usr/local /usr /usr/local/opt/openssl)]),[
],[
withval="yes"
@@ -381,9 +364,9 @@ AC_DEFUN([CHECK_SSL], [
fi
done
if test x_$found_ssl != x_yes; then
- AC_MSG_ERROR(Cannot find the SSL libraries in $withval)
+ AC_MSG_ERROR([Cannot find the SSL libraries in $withval])
else
- AC_MSG_RESULT(found in $ssldir)
+ AC_MSG_RESULT([found in $ssldir])
HAVE_SSL=yes
if test x_$ssldir != x_/usr; then
LDFLAGS="$LDFLAGS -L$ssldir/lib";
@@ -397,8 +380,7 @@ AC_DEFUN([CHECK_SSL], [
])dnl
# check for libevent
-AC_ARG_WITH(libevent, AC_HELP_STRING([--with-libevent=pathname],
- [use libevent (will check /usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr /usr/local/opt/libevent or you can specify an explicit path), useful when the zone count is high.]),
+AC_ARG_WITH(libevent, AS_HELP_STRING([--with-libevent=pathname],[use libevent (will check /usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr /usr/local/opt/libevent or you can specify an explicit path), useful when the zone count is high.]),
[ ],[ withval="yes" ])
if test x_$withval = x_yes -o x_$withval != x_no; then
AC_MSG_CHECKING(for libevent)
@@ -466,9 +448,8 @@ else
fi
# Checks for header files.
-AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([time.h arpa/inet.h signal.h string.h strings.h fcntl.h limits.h netinet/in.h netinet/tcp.h stddef.h sys/param.h sys/socket.h sys/un.h syslog.h unistd.h sys/select.h stdarg.h stdint.h netdb.h sys/bitypes.h tcpd.h glob.h grp.h endian.h sys/random.h])
+AC_CHECK_HEADERS([time.h arpa/inet.h signal.h string.h strings.h fcntl.h limits.h netinet/in.h netinet/tcp.h stddef.h sys/param.h sys/socket.h sys/un.h syslog.h unistd.h sys/select.h stdarg.h stdint.h netdb.h sys/bitypes.h tcpd.h glob.h grp.h endian.h sys/random.h ifaddrs.h],,, [AC_INCLUDES_DEFAULT])
AC_DEFUN([CHECK_VALIST_DEF],
[
@@ -565,7 +546,7 @@ fi
if test "$srcdir" != "."; then
CPPFLAGS="$CPPFLAGS -I$srcdir"
if test -f $srcdir/config.h; then
- AC_ERROR([$srcdir/config.h is in the way, please remove it])
+ AC_MSG_ERROR([$srcdir/config.h is in the way, please remove it])
fi
fi
@@ -577,18 +558,15 @@ dnl systems to get some types.
dnl AC_LIBGTOP_CHECK_TYPE(TYPE, DEFAULT)
AC_DEFUN([AC_LIBGTOP_CHECK_TYPE],
-[AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_MSG_CHECKING(for $1)
+[AC_MSG_CHECKING(for $1)
AC_CACHE_VAL(ac_cv_type_$1,
[AC_EGREP_CPP(dnl
changequote(<<,>>)dnl
<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
changequote([,]), [
#include <sys/types.h>
-#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
-#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
@@ -650,13 +628,13 @@ AC_INCLUDES_DEFAULT
AC_FUNC_CHOWN
AC_FUNC_FORK
AC_FUNC_MALLOC
-AC_TYPE_SIGNAL
+AC_DEFINE(RETSIGTYPE,void,[Return type of signal handlers, but autoconf 2.70 says 'your code may safely assume C89 semantics that RETSIGTYPE is void.'])
AC_FUNC_FSEEKO
AC_SYS_LARGEFILE
AC_CHECK_SIZEOF(void*)
AC_CHECK_SIZEOF(off_t)
AC_CHECK_FUNCS([getrandom arc4random arc4random_uniform])
-AC_SEARCH_LIBS([setusercontext],[util],[AC_CHECK_HEADERS([login_cap.h])])
+AC_SEARCH_LIBS([setusercontext],[util],[AC_CHECK_HEADERS([login_cap.h],,, [AC_INCLUDES_DEFAULT])])
AC_CHECK_FUNCS([tzset alarm chroot dup2 endpwent gethostname memset memcpy pwrite socket strcasecmp strchr strdup strerror strncasecmp strtol writev getaddrinfo getnameinfo freeaddrinfo gai_strerror sigaction sigprocmask strptime strftime localtime_r setusercontext glob initgroups setresuid setreuid setresgid setregid getpwnam mmap ppoll clock_gettime accept4 getifaddrs])
AC_CHECK_TYPE([struct mmsghdr], AC_DEFINE(HAVE_MMSGHDR, 1, [If sys/socket.h has a struct mmsghdr.]), [], [
@@ -664,7 +642,7 @@ AC_INCLUDES_DEFAULT
#include <sys/socket.h>
])
-AC_ARG_ENABLE(recvmmsg, AC_HELP_STRING([--enable-recvmmsg], [Enable recvmmsg and sendmmsg compilation, faster but some kernel versions may have implementation problems for IPv6]))
+AC_ARG_ENABLE(recvmmsg, AS_HELP_STRING([--enable-recvmmsg],[Enable recvmmsg and sendmmsg compilation, faster but some kernel versions may have implementation problems for IPv6]))
case "$enable_recvmmsg" in
yes)
AC_CHECK_FUNC([recvmmsg], [
@@ -716,7 +694,7 @@ if echo $target_os | $EGREP -i 'linux|hurd' > /dev/null; then
fi
# see comment on _GNU_SOURCE above
-AC_CHECK_HEADERS([sched.h sys/cpuset.h])
+AC_CHECK_HEADERS([sched.h sys/cpuset.h],,, [AC_INCLUDES_DEFAULT])
# Check for cpu_set_t (Linux) and cpuset_t (FreeBSD and NetBSD)
AC_CHECK_TYPES([cpu_set_t, cpuset_t, cpuid_t],,,[
@@ -732,8 +710,7 @@ AC_INCLUDES_DEFAULT
AC_DEFUN([AC_CHECK_CPU_OR],
[AC_REQUIRE([AC_PROG_CC])
AC_MSG_CHECKING(whether CPU_OR works with three arguments)
-AC_TRY_COMPILE(
-[#ifdef HAVE_SCHED_H
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_SCHED_H
# include <sched.h>
#endif
#ifdef HAVE_SYS_CPUSET_H
@@ -751,12 +728,12 @@ void testing (void) {
memset(&a, 0, sizeof(a));
memset(&b, 0, sizeof(b));
CPU_OR(&a, &a, &b);
-}], [
+}]], [[
testing();
-], [
+]])],[
AC_MSG_RESULT(yes)
AC_DEFINE([CPU_OR_THREE_ARGS], 1, [number of arguments for CPU_OR is three])
-], [
+],[
AC_MSG_RESULT(no)
])])
@@ -919,7 +896,7 @@ dnl Determine the syslog facility to use
dnl
facility=LOG_DAEMON
AC_ARG_WITH([facility],
- AC_HELP_STRING([--with-facility=name], [Syslog default facility (LOG_DAEMON)]),
+ AS_HELP_STRING([--with-facility=name],[Syslog default facility (LOG_DAEMON)]),
[facility=$withval])
AC_DEFINE_UNQUOTED([FACILITY], $facility, [Define to the default facility for syslog.])
@@ -928,14 +905,14 @@ dnl Determine the default tcp timeout
dnl
tcp_timeout=120
AC_ARG_WITH([tcp_timeout],
- AC_HELP_STRING([--with-tcp-timeout=number], [Limit the default tcp timeout]),
+ AS_HELP_STRING([--with-tcp-timeout=number],[Limit the default tcp timeout]),
[tcp_timeout=$withval])
AC_DEFINE_UNQUOTED([TCP_TIMEOUT], $tcp_timeout, [Define to the default tcp timeout.])
dnl
dnl Features
dnl
-AC_ARG_ENABLE(root-server, AC_HELP_STRING([--enable-root-server], [Configure NSD as a root server]))
+AC_ARG_ENABLE(root-server, AS_HELP_STRING([--enable-root-server],[Configure NSD as a root server]))
case "$enable_root_server" in
yes)
AC_DEFINE_UNQUOTED([ROOT_SERVER], [], [Define this to configure as a root server.])
@@ -944,7 +921,7 @@ case "$enable_root_server" in
;;
esac
-AC_ARG_ENABLE(ipv6, AC_HELP_STRING([--disable-ipv6], [Disables IPv6 support]))
+AC_ARG_ENABLE(ipv6, AS_HELP_STRING([--disable-ipv6],[Disables IPv6 support]))
case "$enable_ipv6" in
no)
;;
@@ -953,7 +930,7 @@ case "$enable_ipv6" in
;;
esac
-AC_ARG_ENABLE(bind8-stats, AC_HELP_STRING([--enable-bind8-stats], [Enables BIND8 like NSTATS & XSTATS and statistics in nsd-control]))
+AC_ARG_ENABLE(bind8-stats, AS_HELP_STRING([--enable-bind8-stats],[Enables BIND8 like NSTATS & XSTATS and statistics in nsd-control]))
case "$enable_bind8_stats" in
yes|'')
@@ -963,7 +940,7 @@ case "$enable_bind8_stats" in
;;
esac
-AC_ARG_ENABLE(zone-stats, AC_HELP_STRING([--enable-zone-stats], [Enable per-zone statistics gathering (needs --enable-bind8-stats)]))
+AC_ARG_ENABLE(zone-stats, AS_HELP_STRING([--enable-zone-stats],[Enable per-zone statistics gathering (needs --enable-bind8-stats)]))
case "$enable_zone_stats" in
yes)
AC_DEFINE_UNQUOTED([USE_ZONE_STATS], [], [Define this to enable per-zone statistics gathering.])
@@ -973,7 +950,7 @@ case "$enable_zone_stats" in
;;
esac
-AC_ARG_ENABLE(checking, AC_HELP_STRING([--enable-checking], [Enable internal runtime checks]))
+AC_ARG_ENABLE(checking, AS_HELP_STRING([--enable-checking],[Enable internal runtime checks]))
case "$enable_checking" in
yes)
CHECK_COMPILER_FLAG(W, [ CFLAGS="$CFLAGS -W" ])
@@ -986,11 +963,11 @@ case "$enable_checking" in
;;
esac
-AC_ARG_ENABLE(memclean, AC_HELP_STRING([--enable-memclean], [Cleanup memory (at exit) for eg. valgrind, memcheck]))
+AC_ARG_ENABLE(memclean, AS_HELP_STRING([--enable-memclean],[Cleanup memory (at exit) for eg. valgrind, memcheck]))
if test "$enable_memclean" = "yes"; then AC_DEFINE_UNQUOTED([MEMCLEAN], [1], [Define this to cleanup memory at exit (eg. for valgrind, etc.)])
fi
-AC_ARG_ENABLE(ratelimit, AC_HELP_STRING([--enable-ratelimit], [Enable rate limiting]))
+AC_ARG_ENABLE(ratelimit, AS_HELP_STRING([--enable-ratelimit],[Enable rate limiting]))
case "$enable_ratelimit" in
yes)
AC_DEFINE_UNQUOTED([RATELIMIT], [], [Define this to enable rate limiting.])
@@ -1003,7 +980,7 @@ case "$enable_ratelimit" in
esac
AC_SUBST(ratelimit)
-AC_ARG_ENABLE(ratelimit-default-is-off, AC_HELP_STRING([--enable-ratelimit-default-is-off], [Enable this to set default of ratelimit to off (enable in nsd.conf), otherwise ratelimit is enabled by default if --enable-ratelimit is enabled]))
+AC_ARG_ENABLE(ratelimit-default-is-off, AS_HELP_STRING([--enable-ratelimit-default-is-off],[Enable this to set default of ratelimit to off (enable in nsd.conf), otherwise ratelimit is enabled by default if --enable-ratelimit is enabled]))
case "$enable_ratelimit_default_is_off" in
yes)
AC_DEFINE_UNQUOTED([RATELIMIT_DEFAULT_OFF], [], [Define this to set ratelimit to off by default.])
@@ -1025,10 +1002,10 @@ if test x$HAVE_SSL = x"yes"; then
# Check for -pthread
BAKLIBS="$LIBS"
LIBS="-lcrypto $LIBS"
- AC_TRY_LINK([], [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
int EVP_sha256(void);
(void)EVP_sha256();
- ], [],[
+ ]])],[],[
dnl so link fails for EVP_sha256, try with -pthread.
BAKCFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -pthread"
@@ -1084,7 +1061,7 @@ else
AC_MSG_WARN([No SSL, therefore TLS is disabled])
fi
-AC_ARG_ENABLE(nsec3, AC_HELP_STRING([--disable-nsec3], [Disable NSEC3 support]))
+AC_ARG_ENABLE(nsec3, AS_HELP_STRING([--disable-nsec3],[Disable NSEC3 support]))
case "$enable_nsec3" in
no)
;;
@@ -1100,7 +1077,7 @@ case "$enable_nsec3" in
;;
esac
-AC_ARG_ENABLE(minimal-responses, AC_HELP_STRING([--disable-minimal-responses], [Disable response minimization. More truncation.]))
+AC_ARG_ENABLE(minimal-responses, AS_HELP_STRING([--disable-minimal-responses],[Disable response minimization. More truncation.]))
case "$enable_minimal_responses" in
no)
;;
@@ -1109,10 +1086,10 @@ case "$enable_minimal_responses" in
;;
esac
-AC_ARG_ENABLE(mmap, AC_HELP_STRING([--enable-mmap], [Use mmap instead of malloc. Experimental.]))
+AC_ARG_ENABLE(mmap, AS_HELP_STRING([--enable-mmap],[Use mmap instead of malloc. Experimental.]))
case "$enable_mmap" in
yes)
- AC_CHECK_HEADERS([sys/mman.h])
+ AC_CHECK_HEADERS([sys/mman.h],,, [AC_INCLUDES_DEFAULT])
AC_LIBGTOP_CHECK_TYPE(uintptr_t, void*)
AC_CHECK_FUNCS([mmap munmap])
AC_DEFINE_UNQUOTED([USE_MMAP_ALLOC], [], [Define this to enable mmap instead of malloc. Experimental.])
@@ -1121,7 +1098,7 @@ case "$enable_mmap" in
;;
esac
-AC_ARG_ENABLE(radix-tree, AC_HELP_STRING([--disable-radix-tree], [You can disable the radix tree and use the red-black tree for the main lookups, the red-black tree uses less memory, but uses some more CPU.]))
+AC_ARG_ENABLE(radix-tree, AS_HELP_STRING([--disable-radix-tree],[You can disable the radix tree and use the red-black tree for the main lookups, the red-black tree uses less memory, but uses some more CPU.]))
case "$enable_radix_tree" in
no)
;;
@@ -1130,7 +1107,7 @@ case "$enable_radix_tree" in
;;
esac
-AC_ARG_ENABLE(packed, AC_HELP_STRING([--enable-packed], [Enable packed structure alignment, uses less memory, but unaligned reads.]))
+AC_ARG_ENABLE(packed, AS_HELP_STRING([--enable-packed],[Enable packed structure alignment, uses less memory, but unaligned reads.]))
case "$enable_packed" in
yes)
AC_DEFINE_UNQUOTED([PACKED_STRUCTS], [], [Define this to use packed structure alignment.])
@@ -1164,7 +1141,7 @@ dt_DNSTAP([${localstatedir}/run/nsd-dnstap.sock],
sinclude(systemd.m4)
# Include systemd.m4 - end
-AC_ARG_ENABLE(tcp-fastopen, AC_HELP_STRING([--enable-tcp-fastopen], [Enable TCP Fast Open]))
+AC_ARG_ENABLE(tcp-fastopen, AS_HELP_STRING([--enable-tcp-fastopen],[Enable TCP Fast Open]))
case "$enable_tcp_fastopen" in
yes)
AC_CHECK_DECL([TCP_FASTOPEN], [], [AC_MSG_ERROR([TCP Fast Open is not available: please rerun without --enable-tcp-fastopen])], [AC_INCLUDES_DEFAULT
@@ -1219,10 +1196,8 @@ AH_BOTTOM([
AH_BOTTOM([
#include <sys/types.h>
-#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
-#endif
#ifdef HAVE_TIME_H
#include <time.h>