2018-02-23 09:53:12 +01:00
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
2014-03-10 23:46:12 +00:00
#
2016-06-27 14:56:38 +10:00
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
2018-02-23 09:53:12 +01:00
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
2014-03-10 12:14:35 -07:00
2018-03-08 09:00:45 -04:00
AC_INIT(BIND, [9.13], [info@isc.org], [], [https://www.isc.org/downloads/BIND/])
2005-09-05 00:12:29 +00:00
AC_PREREQ(2.59)
1998-12-11 20:10:26 +00:00
AC_CONFIG_HEADER(config.h)
2012-11-14 23:33:59 +00:00
AC_CONFIG_MACRO_DIR([libtool.m4])
1998-12-11 20:10:26 +00:00
AC_CANONICAL_HOST
1999-04-29 05:19:29 +00:00
AC_PROG_MAKE_SET
2009-06-10 02:23:42 +00:00
#
# GNU libtool support
#
case $build_os in
sunos*)
# Just set the maximum command line length for sunos as it otherwise
# takes a exceptionally long time to work it out. Required for libtool.
lt_cv_sys_max_cmd_len=4096;
;;
esac
2009-01-19 01:39:50 +00:00
AC_PROG_LIBTOOL
1999-04-29 05:19:29 +00:00
AC_PROG_INSTALL
2005-06-20 01:05:33 +00:00
AC_PROG_LN_S
1999-04-29 05:19:29 +00:00
AC_SUBST(STD_CINCLUDES)
AC_SUBST(STD_CDEFINES)
AC_SUBST(STD_CWARNINGS)
2000-06-23 22:38:26 +00:00
AC_SUBST(CCOPT)
2013-07-09 11:47:16 -07:00
AC_SUBST(CCNOOPT)
2014-02-12 09:07:54 +11:00
AC_SUBST(BACKTRACECFLAGS)
1999-04-29 05:19:29 +00:00
2008-09-24 02:13:12 +00:00
# Warn if the user specified libbind, which is now deprecated
2017-11-13 11:36:45 +11:00
AC_ARG_ENABLE(libbind, AS_HELP_STRING([--enable-libbind], [deprecated]))
2008-09-24 02:13:12 +00:00
case "$enable_libbind" in
yes)
AC_MSG_ERROR(['libbind' is no longer part of the BIND 9 distribution.
It is available from http://www.isc.org as a separate download.])
;;
no|'')
;;
esac
2017-11-13 11:36:45 +11:00
AC_ARG_ENABLE(buffer_useinline,
AS_HELP_STRING([--enable-buffer-useinline],
[define ISC_BUFFER_USEINLINE when compiling
[default=yes]]),
2017-11-08 23:28:10 +11:00
if test yes = "${enable}"
then
AC_DEFINE([ISC_BUFFER_USEINLINE], [1],
[Define if you want to use inline buffers])
fi,
AC_DEFINE([ISC_BUFFER_USEINLINE], [1]))
2017-11-13 11:36:45 +11:00
AC_ARG_ENABLE(warn_shadow,
AS_HELP_STRING([--enable-warn-shadow],
[turn on -Wshadow when compiling]))
2015-01-20 13:29:18 -08:00
2017-11-13 11:36:45 +11:00
AC_ARG_ENABLE(warn_error,
AS_HELP_STRING([--enable-warn-error],
[turn on -Werror when compiling]))
2014-07-08 15:51:40 +10:00
2017-11-13 11:36:45 +11:00
AC_ARG_ENABLE(developer,
AS_HELP_STRING([--enable-developer],
[enable developer build settings]))
2017-01-12 14:02:51 +11:00
XTARGETS=
2011-12-20 00:39:06 +00:00
case "$enable_developer" in
yes)
2017-10-11 15:02:50 -07:00
STD_CDEFINES="$STD_CDEFINES -DISC_MEM_DEFAULTFILL=1 -DISC_LIST_CHECKINIT=1 -DNS_HOOKS_ENABLE=1"
2011-12-20 00:39:06 +00:00
test "${enable_fixed_rrset+set}" = set || enable_fixed_rrset=yes
2015-03-02 12:57:50 +05:30
test "${enable_querytrace+set}" = set || enable_querytrace=yes
2011-12-20 00:39:06 +00:00
test "${with_atf+set}" = set || with_atf=yes
test "${with_dlz_filesystem+set}" = set || with_dlz_filesystem=yes
2013-07-10 20:54:08 -07:00
test "${enable_symtable+set}" = set || enable_symtable=all
2014-07-08 15:51:40 +10:00
test "${enable_warn_error+set}" = set || enable_warn_error=yes
2015-01-20 13:29:18 -08:00
test "${enable_warn_shadow+set}" = set || enable_warn_shadow=yes
2016-03-02 12:33:36 +11:00
test "${with_zlib+set}" = set || with_zlib=yes
2017-01-12 14:02:51 +11:00
XTARGETS='${XTARGETS}'
2011-12-20 00:39:06 +00:00
;;
esac
2017-01-12 14:02:51 +11:00
AC_SUBST(XTARGETS)
2014-05-15 20:29:30 -07:00
2016-05-05 11:46:11 +02:00
# American Fuzzy Lop
2017-11-13 11:36:45 +11:00
AC_ARG_ENABLE(afl,
AS_HELP_STRING([--enable-afl],
[enable American Fuzzy Lop test harness
[default=no]]),
[AC_DEFINE([ENABLE_AFL], [1],
[Define to enable American Fuzzy Lop test harness])])
2016-05-05 11:46:11 +02:00
case "$enable_afl" in
yes)
LIBS="$LIBS -lpthread"
;;
esac
2005-09-05 00:12:29 +00:00
#
# Make very sure that these are the first files processed by
# config.status, since we use the processed output as the input for
2009-01-17 09:35:58 +00:00
# AC_SUBST_FILE() substitutions in other files.
2005-09-05 00:12:29 +00:00
#
AC_CONFIG_FILES([make/rules make/includes])
1999-09-30 20:09:33 +00:00
AC_PATH_PROG(AR, ar)
ARFLAGS="cruv"
AC_SUBST(AR)
AC_SUBST(ARFLAGS)
2000-06-19 19:04:48 +00:00
# The POSIX ln(1) program. Non-POSIX systems may substitute
# "copy" or something.
LN=ln
AC_SUBST(LN)
2000-05-09 17:07:30 +00:00
case "$AR" in
"")
AC_MSG_ERROR([
ar program not found. Please fix your PATH to include the directory in
which ar resides, or set AR in the environment with the full path to ar.
])
;;
esac
2001-01-17 19:54:21 +00:00
#
# Etags.
#
2000-03-16 23:04:37 +00:00
AC_PATH_PROGS(ETAGS, etags emacs-etags)
2001-02-02 02:07:57 +00:00
2001-01-17 19:54:21 +00:00
#
# Some systems, e.g. RH7, have the Exuberant Ctags etags instead of
# GNU emacs etags, and it requires the -L flag.
#
if test "X$ETAGS" != "X"; then
AC_MSG_CHECKING(for Exuberant Ctags etags)
if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then
AC_MSG_RESULT(yes)
ETAGS="$ETAGS -L"
else
AC_MSG_RESULT(no)
fi
fi
2000-03-16 23:04:37 +00:00
AC_SUBST(ETAGS)
2000-06-13 17:34:28 +00:00
#
# Perl is optional; it is used only by some of the system test scripts.
2009-09-01 18:40:25 +00:00
# Note: the backtrace feature (see below) uses perl to build the symbol table,
# but it still compiles without perl, in which case an empty table will be used.
2000-06-13 17:34:28 +00:00
#
AC_PATH_PROGS(PERL, perl5 perl)
AC_SUBST(PERL)
2012-06-28 17:06:00 +10:00
#
# Python is also optional; it is used by the tools in bin/python.
# If python is unavailable, we simply don't build those.
#
AC_ARG_WITH(python,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-python=PATH],
[specify path to python interpreter]),
2012-06-28 17:06:00 +10:00
use_python="$withval", use_python="unspec")
2017-08-23 11:50:01 +02:00
AC_ARG_WITH(python-install-dir,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-python-install-dir=PATH],
2017-08-23 11:50:01 +02:00
[installation directory for Python modules]),
use_python_install_dir="$withval", use_python_install_dir="unspec")
2012-06-28 17:06:00 +10:00
2016-11-10 09:49:12 +11:00
python="python python3 python3.5 python3.4 python3.3 python3.2 python2 python2.7"
2016-04-28 00:12:33 -07:00
testargparse='try: import argparse
except: exit(1)'
testply='try: from ply import *
2014-09-05 10:20:26 -07:00
except: exit(1)'
2016-04-28 00:12:33 -07:00
2018-05-25 14:24:21 +02:00
testdnspython='try: import dns.message
except: exit(1)'
2016-11-10 09:49:12 +11:00
testminvers='import sys
if (sys.version_info < (2,7)) or (sys.version_info < (3,2) and sys.version_info >= (3,0)):
exit(1)'
2012-06-28 17:06:00 +10:00
case "$use_python" in
no)
2014-09-05 10:20:26 -07:00
AC_MSG_CHECKING([for python support])
2012-06-28 17:06:00 +10:00
AC_MSG_RESULT(disabled)
;;
unspec|yes|*)
case "$use_python" in
unspec|yes|'')
2014-09-05 10:20:26 -07:00
for p in $python
do
AC_PATH_PROGS(PYTHON, $p)
2015-04-17 05:02:28 +02:00
if test "X$PYTHON" = "X"; then
2014-09-05 10:20:26 -07:00
continue;
fi
2016-11-10 09:49:12 +11:00
AC_MSG_CHECKING([python2 version >= 2.7 or python3 version >= 3.2])
if ${PYTHON:-false} -c "$testminvers"; then
AC_MSG_RESULT([found])
2017-11-13 11:36:45 +11:00
else
AC_MSG_RESULT([not found])
unset ac_cv_path_PYTHON
unset PYTHON
continue
2016-11-10 09:49:12 +11:00
fi
2014-09-05 10:20:26 -07:00
AC_MSG_CHECKING([python module 'argparse'])
2016-04-28 00:12:33 -07:00
if ${PYTHON:-false} -c "$testargparse"; then
AC_MSG_RESULT([found])
2017-11-13 11:36:45 +11:00
else
AC_MSG_RESULT([not found])
unset ac_cv_path_PYTHON
unset PYTHON
continue
2016-04-28 00:12:33 -07:00
fi
AC_MSG_CHECKING([python module 'ply'])
if ${PYTHON:-false} -c "$testply"; then
AC_MSG_RESULT([found])
2018-05-25 14:24:21 +02:00
else
AC_MSG_RESULT([not found])
unset ac_cv_path_PYTHON
unset PYTHON
continue
fi
AC_MSG_CHECKING([python module 'dnspython'])
if ${PYTHON:-false} -c "$testdnspython"; then
AC_MSG_RESULT([found])
2014-09-05 10:20:26 -07:00
break
2017-11-13 11:36:45 +11:00
else
AC_MSG_RESULT([not found])
unset ac_cv_path_PYTHON
unset PYTHON
2014-09-05 10:20:26 -07:00
fi
done
2017-08-23 11:50:01 +02:00
if test "X$PYTHON" != "X"
2014-09-05 10:20:26 -07:00
then
2017-08-23 11:50:01 +02:00
case "$use_python_install_dir" in
unspec)
PYTHON_INSTALL_DIR=""
PYTHON_INSTALL_LIB=""
;;
*)
PYTHON_INSTALL_DIR="$use_python_install_dir"
PYTHON_INSTALL_LIB="--install-lib=$use_python_install_dir"
;;
esac
else
2014-09-05 10:20:26 -07:00
AC_MSG_CHECKING([for python support])
case "$use_python" in
unspec)
AC_MSG_RESULT(disabled)
;;
yes)
AC_MSG_ERROR([missing python])
;;
esac
fi
2012-06-28 17:06:00 +10:00
;;
*)
case "$use_python" in
2014-09-05 10:20:26 -07:00
/*)
PYTHON="$use_python"
2012-06-28 17:06:00 +10:00
;;
2014-09-05 10:20:26 -07:00
*)
AC_PATH_PROGS(PYTHON, $use_python)
2012-06-28 17:06:00 +10:00
;;
esac
2016-11-10 09:49:12 +11:00
AC_MSG_CHECKING([python2 version >= 2.7 or python3 version >= 3.2])
if ${PYTHON:-false} -c "$testminvers"; then
AC_MSG_RESULT([found])
else
AC_MSG_ERROR([not found])
fi
2014-09-05 10:20:26 -07:00
AC_MSG_CHECKING([python module 'argparse'])
2016-04-28 00:12:33 -07:00
if ${PYTHON:-false} -c "$testargparse"; then
AC_MSG_RESULT([found, using $PYTHON])
else
AC_MSG_ERROR([not found])
fi
AC_MSG_CHECKING([python module 'ply'])
if ${PYTHON:-false} -c "$testply"; then
2014-09-05 10:20:26 -07:00
AC_MSG_RESULT([found, using $PYTHON])
else
AC_MSG_ERROR([not found])
fi
;;
esac
2012-06-28 17:06:00 +10:00
;;
esac
PYTHON_TOOLS=''
2012-06-28 23:08:07 +10:00
CHECKDS=''
2013-03-20 14:31:10 -07:00
COVERAGE=''
2016-04-28 00:12:33 -07:00
KEYMGR=''
2012-06-28 17:06:00 +10:00
if test "X$PYTHON" != "X"; then
2014-02-10 15:01:06 +11:00
PYTHON_TOOLS=python
2012-06-28 23:08:07 +10:00
CHECKDS=checkds
2013-03-20 14:31:10 -07:00
COVERAGE=coverage
2016-04-28 00:12:33 -07:00
KEYMGR=keymgr
2012-06-28 17:06:00 +10:00
fi
2012-06-28 23:08:07 +10:00
AC_SUBST(CHECKDS)
2013-03-20 14:31:10 -07:00
AC_SUBST(COVERAGE)
2016-04-28 00:12:33 -07:00
AC_SUBST(KEYMGR)
2012-06-28 17:06:00 +10:00
AC_SUBST(PYTHON_TOOLS)
2017-08-23 11:50:01 +02:00
AC_SUBST(PYTHON_INSTALL_DIR)
AC_SUBST(PYTHON_INSTALL_LIB)
2012-06-28 17:06:00 +10:00
2000-02-11 18:35:11 +00:00
#
# Special processing of paths depending on whether --prefix,
# --sysconfdir or --localstatedir arguments were given. What's
2003-02-07 01:13:13 +00:00
# desired is some compatibility with the way previous versions
2000-02-11 18:35:11 +00:00
# of BIND built; they defaulted to /usr/local for most parts of
# the installation, but named.boot/named.conf was in /etc
# and named.pid was in /var/run.
#
# So ... if none of --prefix, --sysconfdir or --localstatedir are
# specified, set things up that way. If --prefix is given, use
# it for sysconfdir and localstatedir the way configure normally
# would. To change the prefix for everything but leave named.conf
# in /etc or named.pid in /var/run, then do this the usual configure way:
# ./configure --prefix=/somewhere --sysconfdir=/etc
# ./configure --prefix=/somewhere --localstatedir=/var
#
# To put named.conf and named.pid in /usr/local with everything else,
# set the prefix explicitly to /usr/local even though that's the default:
# ./configure --prefix=/usr/local
#
2000-02-10 01:14:06 +00:00
case "$prefix" in
2006-12-04 01:54:53 +00:00
NONE)
case "$sysconfdir" in
'${prefix}/etc')
sysconfdir=/etc
;;
esac
case "$localstatedir" in
'${prefix}/var')
localstatedir=/var
;;
esac
;;
2000-02-10 01:14:06 +00:00
esac
2016-04-28 00:12:33 -07:00
expanded_sysconfdir=`eval echo $sysconfdir`
AC_SUBST(expanded_sysconfdir)
2000-02-10 01:14:06 +00:00
2000-02-11 18:35:11 +00:00
#
# Make sure INSTALL uses an absolute path, else it will be wrong in all
# Makefiles, since they use make/rules.in and INSTALL will be adjusted by
# configure based on the location of the file where it is substituted.
# Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate
# subdirectory of install-sh, This relative path will be wrong for all
# directories more than one level down from install-sh.
#
2000-02-10 13:52:25 +00:00
case "$INSTALL" in
/*)
2006-12-04 01:54:53 +00:00
;;
*)
#
# Not all systems have dirname.
#
changequote({, })
ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`"
changequote([, ])
ac_prog="`echo $INSTALL | sed 's%.*/%%'`"
2016-10-20 10:26:05 +11:00
test "X$ac_dir" = "X$ac_prog" && ac_dir=.
2006-12-04 01:54:53 +00:00
test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`"
INSTALL="$ac_dir/$ac_prog"
;;
2000-02-10 13:52:25 +00:00
esac
2000-02-11 18:35:11 +00:00
#
# On these hosts, we really want to use cc, not gcc, even if it is
# found. The gcc that these systems have will not correctly handle
# pthreads.
#
# However, if the user sets $CC to be something, let that override
# our change.
#
1999-02-04 22:49:00 +00:00
if test "X$CC" = "X" ; then
case "$host" in
*-dec-osf*)
CC="cc"
;;
2000-03-04 18:36:40 +00:00
*-solaris*)
2006-12-04 01:54:53 +00:00
# Use Sun's cc if it is available, but watch
# out for /usr/ucb/cc; it will never be the right
# compiler to use.
#
# If setting CC here fails, the AC_PROG_CC done
# below might still find gcc.
2000-01-04 20:23:10 +00:00
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
case "$ac_dir" in
/usr/ucb)
# exclude
;;
*)
if test -f "$ac_dir/cc"; then
CC="$ac_dir/cc"
break
fi
;;
esac
done
IFS="$ac_save_ifs"
1999-02-04 22:49:00 +00:00
;;
*-hp-hpux*)
CC="cc"
;;
mips-sgi-irix*)
CC="cc"
;;
esac
fi
2001-01-31 19:22:46 +00:00
AC_PROG_CC
2003-01-21 04:11:26 +00:00
#
# gcc's optimiser is broken at -02 for ultrasparc
#
if test "$ac_env_CFLAGS_set" != set -a "X$GCC" = "Xyes"; then
case "$host" in
2003-01-28 02:06:20 +00:00
sparc-*)
2003-01-21 04:11:26 +00:00
CCFLAGS="-g -O1"
;;
esac
fi
2002-07-04 04:04:21 +00:00
#
2004-01-29 04:39:19 +00:00
# OS dependent CC flags
2002-07-04 04:04:21 +00:00
#
case "$host" in
2009-01-17 09:35:58 +00:00
# OSF 5.0: recv/send are only available with -D_POSIX_PII_SOCKET or
2004-01-29 04:39:19 +00:00
# -D_XOPEN_SOURCE_EXTENDED.
2002-07-04 04:04:21 +00:00
*-dec-osf*)
STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET"
CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
;;
2004-01-29 04:39:19 +00:00
#HP-UX: need -D_XOPEN_SOURCE_EXTENDED and -lxnet for CMSG macros
*-hp-hpux*)
STD_CDEFINES="$STD_CDEFINES -D_XOPEN_SOURCE_EXTENDED"
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
LIBS="-lxnet $LIBS"
;;
# Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
*-solaris*)
STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
;;
2008-10-15 00:05:16 +00:00
# POSIX doesn't include the IPv6 Advanced Socket API and glibc hides
# parts of the IPv6 Advanced Socket API as a result. This is stupid
# as it breaks how the two halves (Basic and Advanced) of the IPv6
# Socket API were designed to be used but we have to live with it.
# Define _GNU_SOURCE to pull in the IPv6 Advanced Socket API.
2014-06-26 11:46:31 +10:00
*-linux* | *-kfreebsd*-gnu*)
2008-10-15 00:05:16 +00:00
STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE"
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
;;
2011-07-26 21:59:13 +00:00
#
# Starting with OSX 10.7 (Lion) we must choose which IPv6 API to use.
# Setting this is sufficient to select the correct behavior for BIND 9.
#
*-darwin*)
STD_CDEFINES="$STD_CDEFINES -D__APPLE_USE_RFC_3542"
CPPFLAGS="$CPPFLAGS -D__APPLE_USE_RFC_3542"
;;
2002-07-04 04:04:21 +00:00
esac
2013-07-09 11:47:16 -07:00
#
# CCNOOPT defaults to -O0 on gcc and disables optimization when is last
#
if test "X$CCNOOPT" = "X" -a "X$GCC" = "Xyes"; then
CCNOOPT="-O0"
fi
2001-01-31 19:22:46 +00:00
AC_HEADER_STDC
2014-02-10 09:46:54 +11:00
AC_CHECK_HEADERS(fcntl.h regex.h sys/time.h unistd.h sys/mman.h sys/sockio.h sys/select.h sys/param.h sys/sysctl.h net/if6.h sys/socket.h net/route.h linux/netlink.h linux/rtnetlink.h,,,
2003-11-05 02:49:04 +00:00
[$ac_includes_default
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
2014-02-07 17:16:37 +11:00
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
2003-11-05 02:49:04 +00:00
])
2001-01-31 19:22:46 +00:00
2018-05-29 14:10:32 +02:00
#
# Check for thread local storage
#
AC_CHECK_HEADERS([threads.h],
[
AC_MSG_CHECKING([for C11 Thread-Local Storage using thread_local])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[
#include <threads.h>
],[
static thread_local int tls = 0;
return (tls);
])
],[
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_THREAD_LOCAL],[1],[Define if thread_local keyword is available])
AC_DEFINE([HAVE_TLS],[1],[Define if Thread-Local Storage is available])
],[
AC_MSG_RESULT([no])
])
],[
AC_MSG_CHECKING([for Thread-Local Storage using __thread])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[
],[
static __thread int tls = 0;
return (tls);
])
],[
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE___THREAD],[1],[Define if __thread keyword is available])
AC_DEFINE([HAVE_TLS],[1],[Define if Thread-Local Storage is available])
],[
AC_MSG_RESULT([no])
])
])
2001-01-31 19:22:46 +00:00
AC_C_CONST
AC_C_INLINE
2008-01-04 03:28:39 +00:00
AC_C_VOLATILE
2001-08-30 04:33:20 +00:00
AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME))
2010-05-19 07:13:15 +00:00
AC_C_FLEXIBLE_ARRAY_MEMBER
2001-05-03 19:54:44 +00:00
2012-06-21 12:58:46 -07:00
#
# Check for the existence of mmap to enable the fast format zones
#
AC_CHECK_FUNCS(mmap)
2009-07-14 22:39:30 +00:00
#
# Older versions of HP/UX don't define seteuid() and setegid()
#
AC_CHECK_FUNCS(seteuid setresuid)
AC_CHECK_FUNCS(setegid setresgid)
2001-05-03 19:54:44 +00:00
#
# UnixWare 7.1.1 with the feature supplement to the UDK compiler
# is reported to not support "static inline" (RT #1212).
#
AC_MSG_CHECKING(for static inline breakage)
2013-01-24 14:51:27 -08:00
AC_TRY_COMPILE([
2001-06-06 23:42:54 +00:00
static inline int foo1() {
return 0;
}
static inline int foo2() {
return foo1();
2013-01-24 14:51:27 -08:00
}
], [foo1();],
2001-05-03 19:54:44 +00:00
[AC_MSG_RESULT(no)],
[AC_MSG_RESULT(yes)
2011-01-13 01:59:28 +00:00
AC_DEFINE(inline, ,[Define to empty if your compiler does not support "static inline".])])
2001-05-03 19:54:44 +00:00
2001-01-31 19:22:46 +00:00
AC_TYPE_SIZE_T
2001-08-15 06:03:39 +00:00
AC_CHECK_TYPE(ssize_t, int)
2005-07-18 05:07:17 +00:00
AC_CHECK_TYPE(uintptr_t,unsigned long)
2004-10-05 03:17:18 +00:00
AC_CHECK_TYPE(socklen_t,
[AC_DEFINE(ISC_SOCKADDR_LEN_T, socklen_t)],
[
AC_TRY_COMPILE(
[
#include <sys/types.h>
#include <sys/socket.h>
int getsockname(int, struct sockaddr *, size_t *);
],[],
[AC_DEFINE(ISC_SOCKADDR_LEN_T, size_t)],
[AC_DEFINE(ISC_SOCKADDR_LEN_T, int)])
],
[
#include <sys/types.h>
#include <sys/socket.h>
])
AC_SUBST(ISC_SOCKADDR_LEN_T)
2001-01-31 19:22:46 +00:00
AC_HEADER_TIME
2001-02-21 06:09:56 +00:00
AC_MSG_CHECKING(for long long)
AC_TRY_COMPILE([],[long long i = 0; return (0);],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1"],
[AC_MSG_RESULT(no)
ISC_PLATFORM_HAVELONGLONG="#undef ISC_PLATFORM_HAVELONGLONG"])
AC_SUBST(ISC_PLATFORM_HAVELONGLONG)
2001-01-31 19:22:46 +00:00
2016-01-30 11:03:10 -08:00
#
# check for uname library routine
#
AC_MSG_CHECKING(for uname)
AC_TRY_COMPILE([
#include <sys/utsname.h>
#include <stdio.h>
],
[
struct utsname uts;
uname(&uts);
printf("running on %s %s %s for %s\n",
uts.sysname, uts.release, uts.version, uts.machine);
],
[AC_MSG_RESULT(yes)
2017-11-13 11:36:45 +11:00
AC_DEFINE(HAVE_UNAME)],
[AC_MSG_RESULT(no)
AC_MSG_WARN([uname is not correctly supported])])
2016-01-30 11:03:10 -08:00
2009-09-29 15:06:07 +00:00
#
# check for GCC noreturn attribute
#
AC_MSG_CHECKING(for GCC noreturn attribute)
AC_TRY_COMPILE([],[void foo() __attribute__((noreturn));],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE"
ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST __attribute__((noreturn))"],
[AC_MSG_RESULT(no)
ISC_PLATFORM_NORETURN_PRE="#define ISC_PLATFORM_NORETURN_PRE"
2009-10-02 06:28:27 +00:00
ISC_PLATFORM_NORETURN_POST="#define ISC_PLATFORM_NORETURN_POST"])
2009-09-29 15:06:07 +00:00
AC_SUBST(ISC_PLATFORM_NORETURN_PRE)
AC_SUBST(ISC_PLATFORM_NORETURN_POST)
2001-10-03 05:08:32 +00:00
#
# check if we have lifconf
#
AC_MSG_CHECKING(for struct lifconf)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
],
[
struct lifconf lifconf;
lifconf.lifc_len = 0;
]
,
[AC_MSG_RESULT(yes)
ISC_PLATFORM_HAVELIFCONF="#define ISC_PLATFORM_HAVELIFCONF 1"],
[AC_MSG_RESULT(no)
ISC_PLATFORM_HAVELIFCONF="#undef ISC_PLATFORM_HAVELIFCONF"])
AC_SUBST(ISC_PLATFORM_HAVELIFCONF)
2008-06-23 19:41:20 +00:00
#
# check if we have kqueue
#
2008-08-22 13:17:56 +00:00
AC_ARG_ENABLE(kqueue,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-kqueue],
[use BSD kqueue when available [default=yes]]),
2008-08-22 13:17:56 +00:00
want_kqueue="$enableval", want_kqueue="yes")
case $want_kqueue in
2008-06-23 19:41:20 +00:00
yes)
2008-08-22 13:17:56 +00:00
AC_CHECK_FUNC(kqueue, ac_cv_have_kqueue=yes, ac_cv_have_kqueue=no)
case $ac_cv_have_kqueue in
yes)
ISC_PLATFORM_HAVEKQUEUE="#define ISC_PLATFORM_HAVEKQUEUE 1"
;;
*)
ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
;;
esac
2008-06-23 19:41:20 +00:00
;;
*)
ISC_PLATFORM_HAVEKQUEUE="#undef ISC_PLATFORM_HAVEKQUEUE"
;;
esac
AC_SUBST(ISC_PLATFORM_HAVEKQUEUE)
#
2008-08-22 13:17:56 +00:00
# check if we have epoll. Linux kernel 2.4 has epoll_create() which fails,
# so we need to try running the code, not just test its existence.
2008-06-23 19:41:20 +00:00
#
2008-08-22 13:17:56 +00:00
AC_ARG_ENABLE(epoll,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-epoll],
[use Linux epoll when available [default=auto]]),
2008-12-22 04:16:37 +00:00
want_epoll="$enableval", want_epoll="auto")
2008-08-22 13:17:56 +00:00
case $want_epoll in
2008-12-22 04:16:37 +00:00
auto)
2008-08-22 13:17:56 +00:00
AC_MSG_CHECKING(epoll support)
AC_TRY_RUN([
#include <sys/epoll.h>
int main() {
if (epoll_create(1) < 0)
return (1);
return (0);
}
],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"],
[AC_MSG_RESULT(no)
2012-12-07 16:43:22 +11:00
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"],
[AC_MSG_RESULT(no)
2008-08-22 13:17:56 +00:00
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"])
2008-06-23 19:41:20 +00:00
;;
2008-12-22 04:16:37 +00:00
yes)
ISC_PLATFORM_HAVEEPOLL="#define ISC_PLATFORM_HAVEEPOLL 1"
;;
2008-06-23 19:41:20 +00:00
*)
ISC_PLATFORM_HAVEEPOLL="#undef ISC_PLATFORM_HAVEEPOLL"
;;
esac
AC_SUBST(ISC_PLATFORM_HAVEEPOLL)
#
# check if we support /dev/poll
#
2008-08-22 13:17:56 +00:00
AC_ARG_ENABLE(devpoll,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-devpoll],
[use /dev/poll when available [default=yes]]),
2008-08-22 13:17:56 +00:00
want_devpoll="$enableval", want_devpoll="yes")
case $want_devpoll in
yes)
2010-12-03 00:57:57 +00:00
AC_CHECK_HEADERS(sys/devpoll.h devpoll.h,
2008-08-22 13:17:56 +00:00
ISC_PLATFORM_HAVEDEVPOLL="#define ISC_PLATFORM_HAVEDEVPOLL 1"
,
ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
)
;;
*)
ISC_PLATFORM_HAVEDEVPOLL="#undef ISC_PLATFORM_HAVEDEVPOLL"
;;
esac
2008-06-23 19:41:20 +00:00
AC_SUBST(ISC_PLATFORM_HAVEDEVPOLL)
2001-10-03 05:08:32 +00:00
2001-01-31 19:22:46 +00:00
#
# check if we need to #include sys/select.h explicitly
#
case $ac_cv_header_unistd_h in
yes)
2002-05-03 02:00:06 +00:00
AC_MSG_CHECKING(if unistd.h or sys/types.h defines fd_set)
2001-01-31 19:22:46 +00:00
AC_TRY_COMPILE([
2002-05-03 02:00:06 +00:00
#include <sys/types.h> /* Ultrix */
2001-01-31 19:22:46 +00:00
#include <unistd.h>],
[fd_set read_set; return (0);],
[AC_MSG_RESULT(yes)
2017-09-08 13:39:09 -07:00
ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"],
2001-01-31 19:22:46 +00:00
[AC_MSG_RESULT(no)
2001-08-14 02:19:30 +00:00
case $ac_cv_header_sys_select_h in
2001-01-31 19:22:46 +00:00
yes)
2006-12-04 01:54:53 +00:00
ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
2001-01-31 19:22:46 +00:00
;;
no)
AC_MSG_ERROR([need either working unistd.h or sys/select.h])
;;
esac
])
;;
no)
2001-08-14 02:19:30 +00:00
case $ac_cv_header_sys_select_h in
2001-01-31 19:22:46 +00:00
yes)
2006-12-04 01:54:53 +00:00
ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
2001-01-31 19:22:46 +00:00
;;
no)
AC_MSG_ERROR([need either unistd.h or sys/select.h])
;;
esac
;;
esac
AC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH)
2000-06-07 19:41:49 +00:00
#
# Find the machine's endian flavor.
#
AC_C_BIGENDIAN
2000-08-02 19:35:35 +00:00
#
2014-01-14 15:40:56 -08:00
# GeoIP support?
2000-08-02 19:35:35 +00:00
#
2014-01-14 15:40:56 -08:00
GEOIPLINKSRCS=
GEOIPLINKOBJS=
AC_ARG_WITH(geoip,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-geoip=PATH],
[Build with GeoIP support (yes|no|path)]),
2014-01-14 15:40:56 -08:00
use_geoip="$withval", use_geoip="no")
2000-08-02 19:35:35 +00:00
2016-10-20 10:26:05 +11:00
if test "yes" = "$use_geoip"
2004-11-11 00:37:14 +00:00
then
2014-01-30 17:03:32 -08:00
for d in /usr /usr/local /opt/local
2004-11-11 00:37:14 +00:00
do
2014-01-14 15:40:56 -08:00
if test -f $d/include/GeoIP.h
2004-11-11 00:37:14 +00:00
then
2014-01-14 15:40:56 -08:00
use_geoip=$d
2004-11-11 00:37:14 +00:00
break
fi
done
fi
2014-01-14 15:40:56 -08:00
case "$use_geoip" in
no|'')
AC_MSG_CHECKING([for GeoIP support])
AC_MSG_RESULT([disabled])
2004-11-11 00:37:14 +00:00
;;
2000-08-08 19:11:05 +00:00
*)
2014-01-14 15:40:56 -08:00
if test -d "$use_geoip" -o -L "$use_geoip"
2004-07-23 04:35:08 +00:00
then
2014-01-14 15:40:56 -08:00
CFLAGS="$CFLAGS -I$use_geoip/include"
CPPFLAGS="$CPPFLAGS -I$use_geoip/include"
2014-04-01 09:51:14 +11:00
LIBS="$LIBS -L$use_geoip/lib"
2014-01-14 15:40:56 -08:00
case "$host_os" in
netbsd*|openbsd*|solaris*)
LIBS="$LIBS -Wl,-rpath=$use_geoip/lib"
;;
2004-07-23 04:35:08 +00:00
esac
2016-10-20 10:26:05 +11:00
elif test "yes" = "$use_geoip"
2014-02-10 15:01:06 +11:00
then
2014-01-14 15:40:56 -08:00
AC_MSG_ERROR([GeoIP path not found])
else
AC_MSG_ERROR([GeoIP path $use_geoip does not exist])
2004-07-23 04:35:08 +00:00
fi
2014-01-14 15:40:56 -08:00
AC_CHECK_HEADER(GeoIP.h, [],
[AC_MSG_ERROR([GeoIP header file not found])]
)
2014-09-03 21:37:30 -07:00
AC_SEARCH_LIBS(GeoIP_id_by_addr_gl, GeoIP, [],
[AC_MSG_ERROR([suitable GeoIP library not found])]
2014-01-14 15:40:56 -08:00
)
AC_SEARCH_LIBS(fabsf, m, [],
[AC_MSG_ERROR([Math library not found])]
)
2014-02-10 15:01:06 +11:00
AC_DEFINE(HAVE_GEOIP, 1, Build with GeoIP support)
2014-01-14 15:40:56 -08:00
GEOIPLINKSRCS='${GEOIPLINKSRCS}'
GEOIPLINKOBJS='${GEOIPLINKOBJS}'
AC_MSG_CHECKING([for GeoIP support])
AC_MSG_RESULT([yes])
2001-07-11 23:16:44 +00:00
2014-01-14 15:40:56 -08:00
AC_MSG_CHECKING([for GeoIP Country IPv6 support])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([
#include <GeoIP.h>
#include <netinet/in.h>
], [
struct in6_addr in6;
GeoIP_country_name_by_ipnum_v6(NULL, in6);
])],
[
AC_MSG_RESULT([yes])
2014-02-10 15:01:06 +11:00
AC_DEFINE(HAVE_GEOIP_V6, 1, Build with GeoIP Country IPv6 support)
2014-01-14 15:40:56 -08:00
],
[AC_MSG_RESULT([no])]
)
2002-05-29 04:25:51 +00:00
2014-01-14 15:40:56 -08:00
AC_MSG_CHECKING([for GeoIP City IPv6 support])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([
#include <GeoIP.h>
#include <GeoIPCity.h>
#include <netinet/in.h>
], [
struct in6_addr in6;
2014-02-10 15:01:06 +11:00
int i = GEOIP_CITY_EDITION_REV0_V6;
2014-01-14 15:40:56 -08:00
GeoIP_record_by_ipnum_v6(NULL, in6);
])],
[
AC_MSG_RESULT([yes])
2014-02-10 15:01:06 +11:00
AC_DEFINE(HAVE_GEOIP_CITY_V6, 1, Build with GeoIP City IPv6 support)
2014-01-14 15:40:56 -08:00
],
[AC_MSG_RESULT([no])]
2002-05-29 04:25:51 +00:00
)
2014-01-14 15:40:56 -08:00
;;
2006-10-02 01:44:27 +00:00
esac
2014-01-14 15:40:56 -08:00
AC_SUBST(GEOIPLINKSRCS)
AC_SUBST(GEOIPLINKOBJS)
2006-10-02 01:44:27 +00:00
2014-01-14 15:40:56 -08:00
AC_MSG_CHECKING(for GSSAPI library)
AC_ARG_WITH(gssapi,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-gssapi=[PATH|[/path/]krb5-config]],
[Specify path for system-supplied GSSAPI
[default=yes]]),
use_gssapi="$withval", use_gssapi="yes")
2012-05-02 23:20:17 +10:00
2016-07-04 15:46:50 +10:00
# first try using krb5-config, if that does not work then fall back to "yes" method.
case "$use_gssapi" in
*/krb5-config|krb5-config)
AC_MSG_RESULT(trying $use_gssapi)
2016-10-20 10:26:05 +11:00
if test krb5-config = "$use_gssapi"
2016-07-04 15:46:50 +10:00
then
AC_PATH_PROG(KRB5_CONFIG, $use_gssapi)
else
KRB5_CONFIG="$use_gssapi"
fi
gssapi_cflags=`$KRB5_CONFIG --cflags gssapi`
gssapi_libs=`$KRB5_CONFIG --libs gssapi`
saved_cppflags="$CPPFLAGS"
CPPFLAGS="$gssapi_cflags $CPPFLAGS"
AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h,
[ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>"])
2016-10-20 10:26:05 +11:00
if test "" = "$ISC_PLATFORM_GSSAPIHEADER"; then
2016-07-04 15:46:50 +10:00
AC_MSG_RESULT([krb5-config: gssapi.h not found])
CPPFLAGS="$saved_cppflags"
use_gssapi="yes"
else
AC_CHECK_HEADERS(krb5/krb5.h krb5.h,
[ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>"])
2016-10-20 10:26:05 +11:00
if test "" = "$ISC_PLATFORM_KRB5HEADER"; then
2016-07-04 15:46:50 +10:00
AC_MSG_RESULT([krb5-config: krb5.h not found])
CPPFLAGS="$saved_cppflags"
use_gssapi="yes"
else
CPPFLAGS="$saved_cppflags"
saved_libs="$LIBS"
LIBS=$gssapi_libs
AC_MSG_CHECKING([krb5-config linking as $LIBS])
AC_TRY_LINK( , [gss_acquire_cred();krb5_init_context()],
gssapi_linked=yes, gssapi_linked=no)
case $gssapi_linked in
yes) AC_MSG_RESULT([krb5-config: linked]);;
no) AC_MSG_RESULT([krb5-config: could not determine proper GSSAPI linkage])
use_gssapi="yes"
;;
esac
LIBS=$saved_libs
fi
fi
2016-10-20 10:26:05 +11:00
if test "yes" = "$use_gssapi"; then
2016-07-04 15:46:50 +10:00
AC_MSG_CHECKING([for GSSAPI library, non krb5-config method])
fi
;;
esac
2016-10-20 10:26:05 +11:00
case "$host" in
*darwin*)
if test "yes" = "$use_gssapi"
then
use_gssapi=framework
fi
;;
esac
2014-01-14 15:40:56 -08:00
# gssapi is just the framework, we really require kerberos v5, so
# look for those headers (the gssapi headers must be there, too)
# The problem with this implementation is that it doesn't allow
# for the specification of gssapi and krb5 headers in different locations,
# which probably ought to be fixed although fixing might raise the issue of
# trying to build with incompatible versions of gssapi and krb5.
2016-10-20 10:26:05 +11:00
if test "yes" = "$use_gssapi"
2014-01-14 15:40:56 -08:00
then
# first, deal with the obvious
if test \( -f /usr/include/kerberosv5/krb5.h -o \
-f /usr/include/krb5/krb5.h -o \
-f /usr/include/krb5.h \) -a \
\( -f /usr/include/gssapi.h -o \
-f /usr/include/gssapi/gssapi.h \)
then
use_gssapi=/usr
else
krb5dirs="/usr/local /usr/local/krb5 /usr/local/kerberosv5 /usr/local/kerberos /usr/pkg /usr/krb5 /usr/kerberosv5 /usr/kerberos /usr"
for d in $krb5dirs
do
if test -f $d/include/gssapi/gssapi_krb5.h -o \
2014-02-10 15:01:06 +11:00
-f $d/include/krb5.h
2014-01-14 15:40:56 -08:00
then
if test -f $d/include/gssapi/gssapi.h -o \
2014-02-10 15:01:06 +11:00
-f $d/include/gssapi.h
2014-01-14 15:40:56 -08:00
then
use_gssapi=$d
break
fi
fi
use_gssapi="no"
done
fi
fi
2012-12-07 16:43:22 +11:00
2014-01-14 15:40:56 -08:00
case "$use_gssapi" in
no)
AC_MSG_RESULT(disabled)
USE_GSSAPI=''
;;
yes)
AC_MSG_ERROR([--with-gssapi must specify a path])
;;
2016-07-04 15:46:50 +10:00
*/krb5-config|krb5-config)
USE_GSSAPI='-DGSSAPI'
DST_GSSAPI_INC="$gssapi_cflags"
DNS_GSSAPI_LIBS="$gssapi_libs"
;;
2016-10-20 10:26:05 +11:00
framework)
USE_GSSAPI='-DGSSAPI'
ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <Kerberos/Kerberos.h>"
ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <Kerberos/Kerberos.h>"
DNS_GSSAPI_LIBS="-framework Kerberos"
AC_MSG_RESULT(framework)
;;
2014-01-14 15:40:56 -08:00
*)
AC_MSG_RESULT(looking in $use_gssapi/lib)
USE_GSSAPI='-DGSSAPI'
saved_cppflags="$CPPFLAGS"
CPPFLAGS="-I$use_gssapi/include $CPPFLAGS"
AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h,
2014-04-03 19:52:03 -07:00
[ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>"
gssapi_hack="#include <$ac_header>"])
2010-12-23 04:08:00 +00:00
2016-10-20 10:26:05 +11:00
if test "" = "$ISC_PLATFORM_GSSAPIHEADER"; then
2014-01-14 15:40:56 -08:00
AC_MSG_ERROR([gssapi.h not found])
fi
2010-12-23 04:08:00 +00:00
2014-01-14 15:40:56 -08:00
AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h,
2014-04-03 19:52:03 -07:00
[ISC_PLATFORM_GSSAPI_KRB5_HEADER="#define ISC_PLATFORM_GSSAPI_KRB5_HEADER <$ac_header>"
gssapi_krb5_hack="#include <$ac_header>"])
2009-10-27 22:25:37 +00:00
2014-01-14 15:40:56 -08:00
AC_CHECK_HEADERS(krb5.h krb5/krb5.h kerberosv5/krb5.h,
2014-04-03 19:52:03 -07:00
[ISC_PLATFORM_KRB5HEADER="#define ISC_PLATFORM_KRB5HEADER <$ac_header>"
krb5_hack="#include <$ac_header>"])
2014-01-14 15:40:56 -08:00
2016-10-20 10:26:05 +11:00
if test "" = "$ISC_PLATFORM_KRB5HEADER"; then
2014-01-14 15:40:56 -08:00
AC_MSG_ERROR([krb5.h not found])
fi
#
# XXXDCL This probably doesn't work right on all systems.
# It will need to be worked on as problems become evident.
#
# Essentially the problems here relate to two different
# areas. The first area is building with either KTH
# or MIT Kerberos, particularly when both are present on
# the machine. The other is static versus dynamic linking.
#
# On the KTH vs MIT issue, Both have libkrb5 that can mess
# up the works if one implementation ends up trying to
# use the other's krb. This is unfortunately a situation
# that very easily arises.
#
# Dynamic linking when the dependency information is built
# into MIT's libgssapi_krb5 or KTH's libgssapi magically makes
# all such problems go away, but when that setup is not
# present, because either the dynamic libraries lack
# dependencies or static linking is being done, then the
# problems start to show up.
saved_libs="$LIBS"
for TRY_LIBS in \
"-lgssapi_krb5" \
"-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \
"-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \
"-lgssapi" \
"-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \
2017-09-07 22:05:20 -07:00
"-lgssapi -lkrb5 -lcrypt -lasn1 -lroken -lcom_err" \
"-lgssapi -lkrb5 -lgssapi_krb5 -lcrypt -lasn1 -lroken -lcom_err" \
"-lgssapi -lkrb5 -lhx509 -lcrypt -lasn1 -lroken -lcom_err" \
2014-01-14 15:40:56 -08:00
"-lgss -lkrb5"
do
# Note that this does not include $saved_libs, because
# on FreeBSD machines this configure script has added
# -L/usr/local/lib to LIBS, which can make the
# -lgssapi_krb5 test succeed with shared libraries even
# when you are trying to build with KTH in /usr/lib.
2016-10-20 10:26:05 +11:00
if test "/usr" = "$use_gssapi"
2014-01-14 15:40:56 -08:00
then
2017-09-07 22:05:20 -07:00
LIBS="$TRY_LIBS $ISC_OPENSSL_LIBS"
2014-01-14 15:40:56 -08:00
else
2017-09-07 22:05:20 -07:00
LIBS="-L$use_gssapi/lib $TRY_LIBS $ISC_OPENSSL_LIBS"
2014-01-14 15:40:56 -08:00
fi
AC_MSG_CHECKING(linking as $TRY_LIBS)
2014-04-03 19:52:03 -07:00
AC_TRY_LINK([
#include <sys/types.h>
$gssapi_hack
$gssapi_krb5_hack
$krb5_hack
2014-04-05 08:42:25 +11:00
] , [gss_acquire_cred(NULL, NULL, 0, NULL, 0, NULL, NULL, NULL);krb5_init_context(NULL);
#if defined(HAVE_GSSAPI_KRB5_H) || defined(HAVE_GSSAPI_GSSAPI_KRB5_H)
gsskrb5_register_acceptor_identity(NULL);
#endif],
2014-01-14 15:40:56 -08:00
gssapi_linked=yes, gssapi_linked=no)
case $gssapi_linked in
yes) AC_MSG_RESULT(yes); break ;;
no) AC_MSG_RESULT(no) ;;
esac
done
2014-04-04 15:07:44 +11:00
CPPFLAGS="$saved_cppflags"
2014-01-14 15:40:56 -08:00
case $gssapi_linked in
no) AC_MSG_ERROR(could not determine proper GSSAPI linkage) ;;
esac
#
# XXXDCL Major kludge. Tries to cope with KTH in /usr/lib
# but MIT in /usr/local/lib and trying to build with KTH.
# /usr/local/lib can end up earlier on the link lines.
# Like most kludges, this one is not only inelegant it
# is also likely to be the wrong thing to do at least as
# many times as it is the right thing. Something better
# needs to be done.
#
2016-10-20 10:26:05 +11:00
if test "/usr" = "$use_gssapi" -a \
2014-01-14 15:40:56 -08:00
-f /usr/local/lib/libkrb5.a; then
FIX_KTH_VS_MIT=yes
fi
case "$FIX_KTH_VS_MIT" in
yes)
case "$enable_static_linking" in
yes) gssapi_lib_suffix=".a" ;;
*) gssapi_lib_suffix=".so" ;;
esac
for lib in $LIBS; do
case $lib in
-L*)
;;
-l*)
new_lib=`echo $lib |
sed -e s%^-l%$use_gssapi/lib/lib% \
-e s%$%$gssapi_lib_suffix%`
NEW_LIBS="$NEW_LIBS $new_lib"
;;
*)
AC_MSG_ERROR([KTH vs MIT Kerberos confusion!])
;;
esac
done
LIBS="$NEW_LIBS"
;;
esac
DST_GSSAPI_INC="-I$use_gssapi/include"
DNS_GSSAPI_LIBS="$LIBS"
AC_MSG_RESULT(using GSSAPI from $use_gssapi/lib and $use_gssapi/include)
LIBS="$saved_libs"
;;
2000-08-08 19:11:05 +00:00
esac
2000-04-20 18:27:43 +00:00
2014-01-14 15:40:56 -08:00
AC_SUBST(ISC_PLATFORM_HAVEGSSAPI)
AC_SUBST(ISC_PLATFORM_GSSAPIHEADER)
AC_SUBST(ISC_PLATFORM_GSSAPI_KRB5_HEADER)
AC_SUBST(ISC_PLATFORM_KRB5HEADER)
AC_SUBST(USE_GSSAPI)
AC_SUBST(DST_GSSAPI_INC)
AC_SUBST(DNS_GSSAPI_LIBS)
2017-09-07 22:05:20 -07:00
DNS_CRYPTO_LIBS="$DNS_GSSAPI_LIBS"
2014-01-14 15:40:56 -08:00
2000-04-20 18:27:43 +00:00
#
2014-01-14 15:40:56 -08:00
# Applications linking with libdns also need to link with these libraries.
2000-04-20 18:27:43 +00:00
#
2014-01-14 15:40:56 -08:00
AC_SUBST(DNS_CRYPTO_LIBS)
2000-04-20 18:27:43 +00:00
2018-04-22 14:56:28 +02:00
# XXXOND: Change this to deterministic DSA generation
2008-03-31 14:42:51 +00:00
#
2014-01-14 15:40:56 -08:00
# Only check dsa signature generation on these platforms when performing
# system tests.
#
CHECK_DSA=0
if grep "#define PATH_RANDOMDEV " confdefs.h > /dev/null
then
case "$host" in
*darwin*|*freebsd*)
CHECK_DSA=1
;;
esac
fi
AC_SUBST(CHECK_DSA)
2008-03-31 14:42:51 +00:00
#
2016-11-01 14:00:16 -07:00
# Do we have arc4random(), etc ?
2008-03-31 14:42:51 +00:00
#
2018-04-22 14:56:28 +02:00
AC_CHECK_FUNCS(arc4random arc4random_buf arc4random_uniform getrandom)
2008-03-31 14:42:51 +00:00
2014-01-14 15:40:56 -08:00
sinclude(config.threads.in)dnl
2008-03-31 14:42:51 +00:00
2014-01-14 15:40:56 -08:00
if $use_threads
then
if test "X$GCC" = "Xyes"; then
case "$host" in
*-freebsd*)
CC="$CC -pthread"
CCOPT="$CCOPT -pthread"
CCNOOPT="$CCNOOPT -pthread"
STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
;;
*-openbsd*)
CC="$CC -pthread"
CCOPT="$CCOPT -pthread"
CCNOOPT="$CCNOOPT -pthread"
;;
*-solaris*)
LIBS="$LIBS -lthread"
;;
*-ibm-aix*)
STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
;;
esac
else
case $host in
*-dec-osf*)
CC="$CC -pthread"
CCOPT="$CCOPT -pthread"
CCNOOPT="$CCNOOPT -pthread"
;;
*-solaris*)
CC="$CC -mt"
CCOPT="$CCOPT -mt"
CCNOOPT="$CCNOOPT -mt"
;;
*-ibm-aix*)
STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
;;
*-sco-sysv*uw*|*-*-sysv*UnixWare*)
CC="$CC -Kthread"
CCOPT="$CCOPT -Kthread"
CCNOOPT="$CCNOOPT -Kthread"
;;
*-*-sysv*OpenUNIX*)
CC="$CC -Kpthread"
CCOPT="$CCOPT -Kpthread"
CCNOOPT="$CCNOOPT -Kpthread"
;;
esac
fi
ALWAYS_DEFINES="-D_REENTRANT"
ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
THREADOPTOBJS='${THREADOPTOBJS}'
THREADOPTSRCS='${THREADOPTSRCS}'
thread_dir=pthreads
#
# We'd like to use sigwait() too
#
AC_CHECK_FUNC(sigwait,
AC_DEFINE(HAVE_SIGWAIT),
AC_CHECK_LIB(c, sigwait,
AC_DEFINE(HAVE_SIGWAIT),
AC_CHECK_LIB(pthread, sigwait,
AC_DEFINE(HAVE_SIGWAIT),
AC_CHECK_LIB(pthread, _Psigwait,
AC_DEFINE(HAVE_SIGWAIT),))))
2008-03-31 14:42:51 +00:00
2014-01-14 15:40:56 -08:00
AC_CHECK_FUNC(pthread_attr_getstacksize,
AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
2009-10-05 12:07:08 +00:00
2014-01-14 15:40:56 -08:00
AC_CHECK_FUNC(pthread_attr_setstacksize,
AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE),)
2013-02-27 17:19:39 -08:00
2017-11-13 11:36:45 +11:00
AC_ARG_WITH(locktype,
AS_HELP_STRING([--with-locktype=ARG],
[Specify mutex lock type
(adaptive or standard)]),
locktype="$withval", locktype="adaptive")
2014-03-10 12:14:35 -07:00
2017-11-13 11:36:45 +11:00
case "$locktype" in
adaptive)
AC_MSG_CHECKING([for PTHREAD_MUTEX_ADAPTIVE_NP])
2014-03-10 12:14:35 -07:00
2017-11-13 11:36:45 +11:00
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2017-04-21 10:03:18 +10:00
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <pthread.h>
2017-11-13 11:36:45 +11:00
]], [[
2017-04-21 10:03:18 +10:00
return (PTHREAD_MUTEX_ADAPTIVE_NP);
2017-11-13 11:36:45 +11:00
]])],
[ AC_MSG_RESULT(using adaptive lock type)
AC_DEFINE([HAVE_PTHREAD_MUTEX_ADAPTIVE_NP], 1,
[Support for PTHREAD_MUTEX_ADAPTIVE_NP]) ],
[ AC_MSG_RESULT(using standard lock type) ])
;;
standard)
AC_MSG_RESULT(using standard lock type)
;;
*)
AC_MSG_ERROR([You must specify "adaptive" or "standard" for --with-locktype.])
;;
esac
2014-03-10 12:14:35 -07:00
2014-01-14 15:40:56 -08:00
AC_CHECK_HEADERS(sched.h)
2013-02-27 17:19:39 -08:00
2014-01-14 15:40:56 -08:00
case "$host" in
*solaris-*)
AC_CHECK_LIB(rt, sched_yield)
2013-02-27 17:19:39 -08:00
;;
2014-01-14 15:40:56 -08:00
esac
AC_CHECK_FUNCS(sched_yield pthread_yield pthread_yield_np)
#
# Additional OS-specific issues related to pthreads and sigwait.
#
case "$host" in
#
# One more place to look for sigwait.
#
*-freebsd*)
AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),)
case $host in
*-freebsd5.[[012]]|*-freebsd5.[[012]].*);;
*-freebsd5.[[3456789]]|*-freebsd5.[[3456789]].*)
AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
;;
*-freebsd6.*)
AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
;;
2013-02-27 17:19:39 -08:00
esac
2014-01-14 15:40:56 -08:00
;;
#
# BSDI 3.0 through 4.0.1 needs pthread_init() to be
# called before certain pthreads calls. This is deprecated
# in BSD/OS 4.1.
#
*-bsdi3.*|*-bsdi4.0*)
AC_DEFINE(NEED_PTHREAD_INIT)
;;
#
# LinuxThreads requires some changes to the way we
# deal with signals.
#
*-linux*)
AC_DEFINE(HAVE_LINUXTHREADS)
;;
#
# Ensure the right sigwait() semantics on Solaris and make
# sure we call pthread_setconcurrency.
#
*-solaris*)
AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
AC_CHECK_FUNC(pthread_setconcurrency,
AC_DEFINE(CALL_PTHREAD_SETCONCURRENCY))
;;
#
# UnixWare does things its own way.
#
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
;;
esac
2017-04-21 13:58:22 -07:00
# Look for functions relating to thread naming
AC_CHECK_FUNCS(pthread_setname_np pthread_set_name_np)
2017-08-03 18:02:04 -07:00
AC_CHECK_HEADERS([pthread_np.h], [], [], [#include <pthread.h>])
2017-04-21 13:58:22 -07:00
2014-01-14 15:40:56 -08:00
#
# Look for sysconf to allow detection of the number of processors.
#
AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
else
ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS"
thread_dir=nothreads
THREADOPTOBJS=""
THREADOPTSRCS=""
ALWAYS_DEFINES=""
fi
AC_SUBST(ALWAYS_DEFINES)
AC_SUBST(ISC_PLATFORM_USETHREADS)
AC_SUBST(THREADOPTOBJS)
AC_SUBST(THREADOPTSRCS)
ISC_THREAD_DIR=$thread_dir
AC_SUBST(ISC_THREAD_DIR)
2013-02-27 17:19:39 -08:00
2014-02-26 19:00:05 -08:00
AC_MSG_CHECKING(for libtool)
2017-11-13 11:36:45 +11:00
AC_ARG_WITH(libtool, AS_HELP_STRING([--with-libtool], [use GNU libtool]),
2014-02-11 21:20:28 -08:00
use_libtool="$withval", use_libtool="no")
case $use_libtool in
yes)
2014-02-26 19:00:05 -08:00
AC_MSG_RESULT(yes)
2014-02-11 21:20:28 -08:00
AM_PROG_LIBTOOL
O=lo
A=la
LIBTOOL_MKDEP_SED='s;\.o;\.lo;'
LIBTOOL_MODE_COMPILE='--mode=compile --tag=CC'
LIBTOOL_MODE_INSTALL='--mode=install --tag=CC'
LIBTOOL_MODE_LINK='--mode=link --tag=CC'
2016-11-01 19:17:07 -07:00
LIBTOOL_MODE_UNINSTALL='--mode=uninstall --tag=CC'
2014-09-05 10:24:20 -07:00
INSTALL_LIBRARY='${INSTALL_PROGRAM}'
2014-02-11 21:20:28 -08:00
case "$host" in
*) LIBTOOL_ALLOW_UNDEFINED= ;;
esac
case "$host" in
*-ibm-aix*) LIBTOOL_IN_MAIN="-Wl,-bI:T_testlist.imp" ;;
*) LIBTOOL_IN_MAIN= ;;
esac;
;;
*)
2014-02-26 19:00:05 -08:00
AC_MSG_RESULT(no)
2014-02-11 21:20:28 -08:00
O=o
A=a
LIBTOOL=
AC_SUBST(LIBTOOL)
LIBTOOL_MKDEP_SED=
LIBTOOL_MODE_COMPILE=
LIBTOOL_MODE_INSTALL=
LIBTOOL_MODE_LINK=
2016-11-01 19:17:07 -07:00
LIBTOOL_MODE_UNINSTALL=
2014-02-11 21:20:28 -08:00
LIBTOOL_ALLOW_UNDEFINED=
LIBTOOL_IN_MAIN=
2014-09-05 10:24:20 -07:00
INSTALL_LIBRARY='${INSTALL_DATA}'
2014-02-11 21:20:28 -08:00
;;
esac
2014-09-05 10:24:20 -07:00
AC_SUBST(INSTALL_LIBRARY)
2014-02-11 21:20:28 -08:00
2014-01-14 15:40:56 -08:00
#
# was --enable-native-pkcs11 specified?
# (note it implies both --without-openssl and --with-pkcs11)
#
AC_ARG_ENABLE(native-pkcs11,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-native-pkcs11],
[use native PKCS11 for all crypto [default=no]]),
want_native_pkcs11="$enableval", want_native_pkcs11="no")
2013-02-27 17:19:39 -08:00
2014-01-14 15:40:56 -08:00
#
# was --with-openssl specified?
#
AC_ARG_WITH(openssl,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-openssl[=PATH]],
[Build with OpenSSL [yes|no|path].
(Crypto is required for DNSSEC)]),
use_openssl="$withval", use_openssl="auto")
2013-02-27 17:19:39 -08:00
2014-01-14 15:40:56 -08:00
#
# was --with-pkcs11 specified?
#
AC_ARG_WITH(pkcs11,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-pkcs11[=PATH]],
[Build with PKCS11 support [yes|no|path]
(PATH is for the PKCS11 provider)]),
use_pkcs11="$withval", use_pkcs11="auto")
2006-12-04 01:54:53 +00:00
2014-02-26 19:00:05 -08:00
#
2018-05-25 16:17:13 +02:00
# were --with-ecdsa, --with-eddsa, --with-aes specified
2014-02-26 19:00:05 -08:00
#
2017-11-13 11:36:45 +11:00
AC_ARG_WITH(ecdsa, AS_HELP_STRING([--with-ecdsa], [Crypto ECDSA]),
2014-02-26 19:00:05 -08:00
with_ecdsa="$withval", with_ecdsa="auto")
2017-11-13 11:36:45 +11:00
AC_ARG_WITH(eddsa, AS_HELP_STRING([--with-eddsa], [Crypto EDDSA [yes|all|no].]),
with_eddsa="$withval", with_eddsa="auto")
AC_ARG_WITH(aes, AS_HELP_STRING([--with-aes], [Crypto AES]),
2015-07-06 09:44:24 +10:00
with_aes="$withval", with_aes="checkcc")
2014-02-26 19:00:05 -08:00
#
2015-07-06 09:44:24 +10:00
# Client Cookie algorithm choice
2014-02-26 19:00:05 -08:00
#
2015-07-06 09:44:24 +10:00
AC_ARG_WITH(cc-alg,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-cc-alg=ALG],
[choose the algorithm for Client Cookie
[aes|sha1|sha256]]),
2015-07-06 09:44:24 +10:00
with_cc_alg="$withval", with_cc_alg="auto")
2014-02-26 19:00:05 -08:00
2015-07-06 09:44:24 +10:00
case $with_cc_alg in
*1)
with_cc_alg="sha1"
;;
*2*)
with_cc_alg="sha256"
;;
auto)
2017-07-19 15:53:01 +10:00
if test "no" != "$with_aes"
2015-07-06 09:44:24 +10:00
then
with_aes="yes"
fi
;;
*)
with_cc_alg="aes"
2017-07-19 15:53:01 +10:00
if test "no" != "$with_aes"
2015-07-06 09:44:24 +10:00
then
with_aes="yes"
fi
;;
2014-02-26 19:00:05 -08:00
esac
2017-07-19 15:53:01 +10:00
if test "checkcc" = "with_aes"
2014-02-26 19:00:05 -08:00
then
with_aes="no"
fi
AC_MSG_CHECKING(for OpenSSL library)
2014-01-14 15:40:56 -08:00
openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg /usr/sfw"
2016-10-20 10:26:05 +11:00
if test "yes" = "$want_native_pkcs11"
2016-06-02 10:27:29 -07:00
then
use_openssl="native_pkcs11"
AC_MSG_RESULT(use of native PKCS11 instead)
fi
2016-10-20 10:26:05 +11:00
if test "auto" = "$use_openssl"
2006-12-04 01:54:53 +00:00
then
2016-06-02 10:27:29 -07:00
for d in $openssldirs
do
if test -f $d/include/openssl/opensslv.h
then
use_openssl=$d
break
fi
done
2006-12-04 01:54:53 +00:00
fi
2014-01-14 15:40:56 -08:00
OPENSSL_ECDSA=""
2017-07-31 15:26:00 +02:00
OPENSSL_ED25519=""
2014-01-18 11:51:07 -08:00
2014-01-14 15:40:56 -08:00
case "$use_openssl" in
native_pkcs11)
AC_MSG_RESULT(disabled because of native PKCS11)
DST_OPENSSL_INC=""
2018-05-22 15:24:37 +02:00
CRYPTO="PKCS11"
2017-09-12 19:05:46 -07:00
CRYPTOLIB="pkcs11"
2017-12-07 13:26:21 +11:00
OPENSSLECDSALINKOBJS=""
OPENSSLECDSALINKSRCS=""
2017-07-31 15:26:00 +02:00
OPENSSLEDDSALINKOBJS=""
2017-12-07 13:26:21 +11:00
OPENSSLEDDSALINKSRCS=""
2014-01-14 15:40:56 -08:00
OPENSSLLINKOBJS=""
OPENSSLLINKSRCS=""
2018-05-22 15:24:37 +02:00
AC_DEFINE([HAVE_PKCS11],[1],[Define if native PKCS#11 is used as cryptographic library provider])
2014-01-14 15:40:56 -08:00
;;
2006-12-04 01:54:53 +00:00
no)
2014-01-14 15:40:56 -08:00
AC_MSG_RESULT(no)
DST_OPENSSL_INC=""
CRYPTO=""
2017-09-12 19:05:46 -07:00
CRYPTOLIB=""
2017-12-07 13:26:21 +11:00
OPENSSLECDSALINKOBJS=""
OPENSSLECDSALINKSRCS=""
2017-07-31 15:26:00 +02:00
OPENSSLEDDSALINKOBJS=""
2017-12-07 13:26:21 +11:00
OPENSSLEDDSALINKSRCS=""
2014-01-14 15:40:56 -08:00
OPENSSLLINKOBJS=""
OPENSSLLINKSRCS=""
2006-12-04 01:54:53 +00:00
;;
2014-01-14 15:40:56 -08:00
auto)
DST_OPENSSL_INC=""
CRYPTO=""
2017-09-12 19:05:46 -07:00
CRYPTOLIB=""
2017-12-07 13:26:21 +11:00
OPENSSLECDSALINKOBJS=""
OPENSSLECDSALINKSRCS=""
2017-07-31 15:26:00 +02:00
OPENSSLEDDSALINKOBJS=""
2017-12-07 13:26:21 +11:00
OPENSSLEDDSALINKSRCS=""
2014-01-14 15:40:56 -08:00
OPENSSLLINKOBJS=""
OPENSSLLINKSRCS=""
AC_MSG_ERROR(
[OpenSSL was not found in any of $openssldirs; use --with-openssl=/path
2017-09-12 19:05:46 -07:00
If you do not want OpenSSL, use --without-openssl])
2006-12-04 01:54:53 +00:00
;;
*)
2016-10-20 10:26:05 +11:00
if test "yes" = "$want_native_pkcs11"
2014-03-11 13:52:36 -07:00
then
2017-11-13 11:36:45 +11:00
AC_MSG_RESULT()
2014-03-11 13:52:36 -07:00
AC_MSG_ERROR([OpenSSL and native PKCS11 cannot be used together.])
fi
2016-10-20 10:26:05 +11:00
if test "yes" = "$use_openssl"
2014-01-14 15:40:56 -08:00
then
# User did not specify a path - guess it
for d in $openssldirs
do
if test -f $d/include/openssl/opensslv.h
then
use_openssl=$d
break
fi
done
2016-10-20 10:26:05 +11:00
if test "yes" = "$use_openssl"
2014-01-14 15:40:56 -08:00
then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(
[OpenSSL was not found in any of $openssldirs; use --with-openssl=/path])
fi
elif ! test -f "$use_openssl"/include/openssl/opensslv.h
then
AC_MSG_ERROR(["$use_openssl/include/openssl/opensslv.h" not found])
fi
2018-05-22 15:24:37 +02:00
CRYPTO='OPENSSL'
2017-09-12 19:05:46 -07:00
CRYPTOLIB="openssl"
2016-10-20 10:26:05 +11:00
if test "/usr" = "$use_openssl"
2014-01-14 15:40:56 -08:00
then
DST_OPENSSL_INC=""
2014-02-13 15:09:08 +11:00
DST_OPENSSL_LIBS="-lcrypto"
2014-01-14 15:40:56 -08:00
else
DST_OPENSSL_INC="-I$use_openssl/include"
case $host in
*-solaris*)
2014-02-13 15:09:08 +11:00
DST_OPENSSL_LIBS="-L$use_openssl/lib -R$use_openssl/lib -lcrypto"
2014-01-14 15:40:56 -08:00
;;
*-hp-hpux*)
2014-02-13 15:09:08 +11:00
DST_OPENSSL_LIBS="-L$use_openssl/lib -Wl,+b: -lcrypto"
2014-01-14 15:40:56 -08:00
;;
*-apple-darwin*)
#
# Apple's ld seaches for serially for dynamic
# then static libraries. This means you can't
# use -L to override dynamic system libraries
# with static ones when linking. Instead
# we specify a absolute path.
#
if test -f "$use_openssl/lib/libcrypto.dylib"
then
2014-02-13 15:09:08 +11:00
DST_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
2014-01-14 15:40:56 -08:00
else
2014-02-13 15:09:08 +11:00
DST_OPENSSL_LIBS="$use_openssl/lib/libcrypto.a"
2014-01-14 15:40:56 -08:00
fi
;;
*)
2014-02-13 15:09:08 +11:00
DST_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
2014-01-14 15:40:56 -08:00
;;
esac
fi
AC_MSG_RESULT(using OpenSSL from $use_openssl/lib and $use_openssl/include)
saved_cc="$CC"
saved_cflags="$CFLAGS"
saved_libs="$LIBS"
2016-10-31 10:04:37 +11:00
CFLAGS="$DST_OPENSSL_INC $CFLAGS"
LIBS="$DST_OPENSSL_LIBS $LIBS"
2018-05-22 15:24:37 +02:00
AC_DEFINE([HAVE_OPENSSL],[1],[Define if OpenSSL is used as cryptographic library provider.])
2018-05-03 14:03:50 +02:00
AC_MSG_CHECKING(for OpenSSL >= 1.0.0 or LibreSSL)
AC_TRY_COMPILE([
#include <openssl/opensslv.h>
],
[
#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER < 0x1000000fL)
#error OpenSSL >= 1.0.0 or LibreSSL needed
#endif
],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([OpenSSL >= 1.0.0 or LibreSSL not found])])
2014-01-14 15:40:56 -08:00
AC_MSG_CHECKING(whether linking with OpenSSL works)
AC_TRY_RUN([
#include <openssl/err.h>
int main() {
ERR_clear_error();
return (0);
}
],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR(Could not run test program using OpenSSL from
$use_openssl/lib and $use_openssl/include.
Please check the argument to --with-openssl and your
shared library configuration (e.g., LD_LIBRARY_PATH).)],
[AC_MSG_RESULT(assuming it does work on target platform)])
AC_MSG_CHECKING(whether linking with OpenSSL requires -ldl)
AC_TRY_LINK([
2016-10-31 10:04:37 +11:00
#include <openssl/opensslv.h>
2016-11-01 12:02:36 +11:00
#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100004L)
2016-10-31 10:04:37 +11:00
#include <openssl/crypto.h>
#else
2015-02-27 09:05:03 -08:00
#include <openssl/err.h>
#include <openssl/dso.h>
2016-10-31 10:04:37 +11:00
#endif
],
[
2016-11-01 12:02:36 +11:00
#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100004L)
2016-10-31 10:04:37 +11:00
OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL);
#else
DSO_METHOD_dlfcn();
#endif
2015-02-27 09:05:03 -08:00
],
2014-01-14 15:40:56 -08:00
[AC_MSG_RESULT(no)],
[LIBS="$LIBS -ldl"
AC_TRY_LINK([
2016-11-01 12:02:36 +11:00
#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100004L)
2016-10-31 10:04:37 +11:00
#include <openssl/crypto.h>
#else
2014-01-14 15:40:56 -08:00
#include <openssl/err.h>
2015-02-27 09:05:03 -08:00
#include <openssl/dso.h>
2016-10-31 10:04:37 +11:00
#endif
],
[
2016-11-01 12:02:36 +11:00
#if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100004L)
2016-10-31 10:04:37 +11:00
OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_ALL_BUILTIN, NULL);
#else
DSO_METHOD_dlfcn();
#endif
],
2014-01-14 15:40:56 -08:00
[AC_MSG_RESULT(yes)
2014-02-13 15:09:08 +11:00
DST_OPENSSL_LIBS="$DST_OPENSSL_LIBS -ldl"
2014-01-14 15:40:56 -08:00
],
[AC_MSG_RESULT(unknown)
AC_MSG_ERROR(OpenSSL has unsupported dynamic loading)],
[AC_MSG_RESULT(assuming it does work on target platform)])
],
[AC_MSG_RESULT(assuming it does work on target platform)]
)
2018-01-17 14:33:21 +01:00
AC_MSG_CHECKING(for OpenSSL FIPS mode support)
have_fips_mode=""
AC_TRY_LINK([#include <openssl/crypto.h>],
[FIPS_mode();],
have_fips_mode=yes,
have_fips_mode=no)
if test "x$have_fips_mode" = "xyes"
then
AC_DEFINE([HAVE_FIPS_MODE], [1],
[Define if OpenSSL provides FIPS_mode()])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
2014-02-10 15:01:06 +11:00
AC_MSG_CHECKING(for OpenSSL DSA support)
if test -f $use_openssl/include/openssl/dsa.h
then
AC_DEFINE(HAVE_OPENSSL_DSA)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
2006-12-04 01:54:53 +00:00
2018-05-03 14:03:50 +02:00
AC_CHECK_FUNCS([EVP_sha1 EVP_sha224 EVP_sha256 EVP_sha384 EVP_sha512], [], [
AC_MSG_ERROR([SHA-1 and SHA-2 support in OpenSSL is mandatory.])])
2006-12-04 01:54:53 +00:00
2018-05-03 13:59:04 +02:00
AC_CHECK_FUNCS([DH_get0_key ECDSA_SIG_get0 RSA_set0_key DSA_get0_pqg])
2014-02-10 15:01:06 +11:00
AC_MSG_CHECKING(for OpenSSL ECDSA support)
have_ecdsa=""
AC_TRY_RUN([
2014-01-14 15:40:56 -08:00
#include <openssl/ecdsa.h>
#include <openssl/objects.h>
int main() {
EC_KEY *ec256, *ec384;
2010-12-18 01:56:23 +00:00
2014-01-14 15:40:56 -08:00
ec256 = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
ec384 = EC_KEY_new_by_curve_name(NID_secp384r1);
if (ec256 == NULL || ec384 == NULL)
return (2);
return (0);
}
],
2014-02-10 15:01:06 +11:00
[AC_MSG_RESULT(yes)
have_ecdsa="yes"],
[AC_MSG_RESULT(no)
have_ecdsa="no"],
[AC_MSG_RESULT(using --with-ecdsa)])
case "$with_ecdsa" in
yes)
case "$have_ecdsa" in
no) AC_MSG_ERROR([ecdsa not supported]) ;;
*) have_ecdsa=yes ;;
esac
;;
no)
have_ecdsa=no ;;
*)
case "$have_ecdsa" in
yes|no) ;;
*) AC_MSG_ERROR([need --with-ecdsa=[[yes or no]]]) ;;
esac
;;
esac
case $have_ecdsa in
yes)
OPENSSL_ECDSA="yes"
2017-12-07 13:26:21 +11:00
OPENSSLECDSALINKOBJS='${OPENSSLECDSALINKOBJS}'
OPENSSLECDSALINKSRCS='${OPENSSLECDSALINKSRCS}'
2014-02-10 15:01:06 +11:00
AC_DEFINE(HAVE_OPENSSL_ECDSA, 1,
[Define if your OpenSSL version supports ECDSA.])
;;
*)
;;
esac
2017-07-31 15:26:00 +02:00
AC_MSG_CHECKING(for OpenSSL Ed25519 support)
have_ed25519=""
have_ed448=""
AC_TRY_RUN([
#include <openssl/evp.h>
#include <openssl/objects.h>
int main() {
EVP_PKEY_CTX *ctx;
ctx = EVP_PKEY_CTX_new_id(NID_ED25519, NULL);
if (ctx == NULL)
return (2);
return (0);
}
],
[AC_MSG_RESULT(yes)
have_ed25519="yes"],
[AC_MSG_RESULT(no)
have_ed25519="no"],
[AC_MSG_RESULT(using --with-eddsa)])
case "$with_eddsa" in
yes|all)
case "$have_ed25519" in
no) AC_MSG_ERROR([eddsa not supported]) ;;
*) have_ed25519=yes ;;
esac
;;
no)
have_ed25519=no ;;
*)
case "$have_ed25519" in
yes|no) ;;
*) AC_MSG_ERROR([need --with-eddsa=[[yes, all or no]]]) ;;
esac
;;
esac
case $have_ed25519 in
yes)
OPENSSL_ED25519="yes"
OPENSSLEDDSALINKOBJS='${OPENSSLEDDSALINKOBJS}'
OPENSSLEDDSALINKSRCS='${OPENSSLEDDSALINKSRCS}'
AC_DEFINE(HAVE_OPENSSL_ED25519, 1,
[Define if your OpenSSL version supports Ed25519.])
AC_MSG_CHECKING(for OpenSSL Ed448 support)
AC_TRY_RUN([
#include <openssl/evp.h>
#include <openssl/objects.h>
int main() {
EVP_PKEY_CTX *ctx;
ctx = EVP_PKEY_CTX_new_id(NID_ED448, NULL);
if (ctx == NULL)
return (2);
return (0);
}
],
[AC_MSG_RESULT(yes)
have_ed448="yes"],
[AC_MSG_RESULT(no)
have_ed448="no"],
[AC_MSG_RESULT(using --with-eddsa)])
case $with_eddsa in
all)
have_ed448=yes ;;
*)
;;
esac
case $have_ed448 in
yes)
AC_DEFINE(HAVE_OPENSSL_ED448, 1,
2018-04-04 21:57:28 +02:00
[Define if your OpenSSL version supports Ed448.])
2017-07-31 15:26:00 +02:00
;;
*)
;;
esac
;;
*)
;;
esac
2014-02-26 19:00:05 -08:00
have_aes="no"
AC_MSG_CHECKING(for OpenSSL AES support)
AC_TRY_RUN([
#include <openssl/evp.h>
int main() {
2016-10-31 10:04:37 +11:00
const EVP_CIPHER *aes128, *aes192, *aes256;
2014-02-26 19:00:05 -08:00
aes128 = EVP_aes_128_ecb();
aes192 = EVP_aes_192_ecb();
aes256 = EVP_aes_256_ecb();
if (aes128 == NULL || aes192 == NULL || aes256 == NULL)
return (1);
return (0);
}
],
[AC_MSG_RESULT(yes)
have_aes="evp"],
[AC_CHECK_FUNC(AES_encrypt,
[AC_MSG_RESULT(yes)
have_aes="yes"],
[AC_MSG_RESULT(no)])],
2016-03-22 18:01:01 -07:00
[AC_MSG_RESULT(using --with-aes)
2017-11-13 11:36:45 +11:00
# Expect cross-compiling with a modern OpenSSL
2016-03-22 18:01:01 -07:00
have_aes="evp"])
2014-02-26 19:00:05 -08:00
ISC_OPENSSL_INC=""
ISC_OPENSSL_LIBS=""
2016-10-20 10:26:05 +11:00
if test "yes" = "$with_aes"
2014-02-26 19:00:05 -08:00
then
case "$have_aes" in
evp)
AC_DEFINE(HAVE_OPENSSL_EVP_AES, 1,
[Define if your OpenSSL version supports EVP AES])
ISC_OPENSSL_INC="$DST_OPENSSL_INC"
ISC_OPENSSL_LIBS="$DST_OPENSSL_LIBS"
;;
yes)
AC_DEFINE(HAVE_OPENSSL_AES, 1,
[Define if your OpenSSL version supports AES])
ISC_OPENSSL_INC="$DST_OPENSSL_INC"
ISC_OPENSSL_LIBS="$DST_OPENSSL_LIBS"
;;
*)
;;
esac
fi
2014-02-10 15:01:06 +11:00
CC="$saved_cc"
CFLAGS="$saved_cflags"
LIBS="$saved_libs"
OPENSSLLINKOBJS='${OPENSSLLINKOBJS}'
OPENSSLLINKSRCS='${OPENSSLLINKSRCS}'
;;
2014-01-14 15:40:56 -08:00
esac
2006-12-04 01:54:53 +00:00
2014-01-14 15:40:56 -08:00
#
# This would include the system openssl path (and linker options to use
# it as needed) if it is found.
#
2006-12-04 01:54:53 +00:00
2014-01-14 15:40:56 -08:00
AC_SUBST(DST_OPENSSL_INC)
2017-12-07 13:26:21 +11:00
AC_SUBST(OPENSSLECDSALINKOBJS)
AC_SUBST(OPENSSLECDSALINKSRCS)
2017-07-31 15:26:00 +02:00
AC_SUBST(OPENSSLEDDSALINKOBJS)
AC_SUBST(OPENSSLEDDSALINKSRCS)
2014-01-14 15:40:56 -08:00
AC_SUBST(OPENSSLLINKOBJS)
AC_SUBST(OPENSSLLINKSRCS)
AC_SUBST(OPENSSL_ECDSA)
2017-07-31 15:26:00 +02:00
AC_SUBST(OPENSSL_ED25519)
2006-12-04 01:54:53 +00:00
2014-02-26 19:00:05 -08:00
ISC_PLATFORM_WANTAES="#undef ISC_PLATFORM_WANTAES"
2016-10-20 10:26:05 +11:00
if test "yes" = "$with_aes"
2014-02-26 19:00:05 -08:00
then
if test "X$CRYPTO" = "X"
then
with_aes="no"
fi
fi
2016-10-20 10:26:05 +11:00
if test "yes" = "$with_aes"
2014-02-26 19:00:05 -08:00
then
ISC_PLATFORM_WANTAES="#define ISC_PLATFORM_WANTAES 1"
fi
AC_SUBST(ISC_PLATFORM_WANTAES)
2014-02-19 12:53:42 +11:00
#
2015-07-06 09:44:24 +10:00
# Choose Client Cookie algorithm
2014-02-19 12:53:42 +11:00
#
2017-09-20 02:22:22 +05:30
AC_MSG_CHECKING(for the algorithm for Client Cookie)
2016-10-20 10:26:05 +11:00
if test "auto" = "$with_cc_alg"
2014-02-26 19:00:05 -08:00
then
2016-10-20 10:26:05 +11:00
if test "yes" = "$with_aes"
2014-02-26 19:00:05 -08:00
then
2015-07-06 09:44:24 +10:00
with_cc_alg="aes"
else
with_cc_alg="sha256"
2014-02-26 19:00:05 -08:00
fi
fi
2015-07-06 09:44:24 +10:00
case $with_cc_alg in
2014-02-26 19:00:05 -08:00
sha1)
AC_MSG_RESULT(sha1)
2015-07-06 09:44:24 +10:00
AC_DEFINE(HMAC_SHA1_CC, 1,
[Use HMAC-SHA1 for Client Cookie generation])
2014-02-19 12:53:42 +11:00
;;
2014-02-26 19:00:05 -08:00
sha256)
AC_MSG_RESULT(sha256)
2015-07-06 09:44:24 +10:00
AC_DEFINE(HMAC_SHA256_CC, 1,
[Use HMAC-SHA256 for Client Cookie generation])
2014-02-19 15:22:31 +11:00
;;
2014-02-26 19:00:05 -08:00
aes)
AC_MSG_RESULT(aes)
2015-07-06 09:44:24 +10:00
AC_DEFINE(AES_CC, 1,
[Use AES for Client Cookie generation])
2014-02-19 12:53:42 +11:00
;;
esac
2014-02-26 19:00:05 -08:00
#
# Use OpenSSL for hash functions
#
2014-02-19 12:53:42 +11:00
2017-09-20 02:22:22 +05:30
#
# was --enable-openssl-hash specified?
#
AC_ARG_ENABLE(openssl-hash,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-openssl-hash],
[use OpenSSL for hash functions [default=yes]]),
2017-09-20 02:22:22 +05:30
want_openssl_hash="$enableval", want_openssl_hash="whenossl")
2017-09-20 13:40:03 +05:30
AC_MSG_CHECKING(for using OpenSSL for hash functions)
2014-02-26 19:00:05 -08:00
ISC_PLATFORM_OPENSSLHASH="#undef ISC_PLATFORM_OPENSSLHASH"
2017-09-06 11:28:02 +02:00
if test "whenossl" = "$want_openssl_hash"
then
2018-05-22 15:24:37 +02:00
if test "$CRYPTO" = "OPENSSL"
2017-09-06 11:28:02 +02:00
then
want_openssl_hash="yes"
else
want_openssl_hash="no"
fi
fi
2014-01-14 15:40:56 -08:00
case $want_openssl_hash in
yes)
2018-05-22 15:24:37 +02:00
if test "$CRYPTO" != "OPENSSL"
2014-01-14 15:40:56 -08:00
then
AC_MSG_ERROR([No OpenSSL for hash functions])
fi
2014-02-13 15:09:08 +11:00
AC_MSG_RESULT(yes)
2014-01-14 15:40:56 -08:00
ISC_PLATFORM_OPENSSLHASH="#define ISC_PLATFORM_OPENSSLHASH 1"
ISC_OPENSSL_INC="$DST_OPENSSL_INC"
2014-02-13 15:09:08 +11:00
ISC_OPENSSL_LIBS="$DST_OPENSSL_LIBS"
2014-01-14 15:40:56 -08:00
;;
no)
2014-02-13 15:09:08 +11:00
AC_MSG_RESULT(no)
2014-02-19 12:53:42 +11:00
;;
esac
2014-01-14 15:40:56 -08:00
AC_SUBST(ISC_PLATFORM_OPENSSLHASH)
AC_SUBST(ISC_OPENSSL_INC)
2014-02-13 15:09:08 +11:00
AC_SUBST(ISC_OPENSSL_LIBS)
2001-11-06 20:05:13 +00:00
2017-09-08 16:15:37 +10:00
if test "X${ISC_OPENSSL_LIBS}" != "X${DST_OPENSSL_LIBS}"
then
DNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DST_OPENSSL_LIBS"
fi
2001-11-06 20:05:13 +00:00
#
2014-01-14 15:40:56 -08:00
# PKCS11 (aka crypto hardware) support (--with moved just after openssl)
2001-11-06 20:05:13 +00:00
#
2014-01-14 15:40:56 -08:00
AC_MSG_CHECKING(for PKCS11 support)
2001-11-06 20:05:13 +00:00
2016-10-20 10:26:05 +11:00
if test "auto" = "$use_pkcs11"
2014-01-14 15:40:56 -08:00
then
2016-10-20 10:26:05 +11:00
if test "yes" = "$want_native_pkcs11"
2014-01-14 15:40:56 -08:00
then
use_pkcs11="yes"
else
use_pkcs11="no"
fi
fi
2000-08-17 18:56:49 +00:00
2014-01-14 15:40:56 -08:00
case "$use_pkcs11" in
no)
AC_MSG_RESULT(no)
2014-02-11 21:20:28 -08:00
USE_PKCS11=""
PKCS11_TEST=""
PKCS11_TOOLS=""
ISC_PK11_C=""
ISC_PK11_O=""
ISC_PK11_API_C=""
ISC_PK11_API_O=""
2014-03-12 20:52:01 -07:00
ISC_PK11_RESULT_C=""
ISC_PK11_RESULT_O=""
2014-02-11 21:20:28 -08:00
ISC_ISCPK11_API_C=""
ISC_ISCPK11_API_O=""
2000-08-17 18:56:49 +00:00
;;
2014-01-14 15:40:56 -08:00
yes|*)
AC_MSG_RESULT(yes)
2014-02-10 15:01:06 +11:00
if ! $use_threads; then
2014-01-14 15:40:56 -08:00
AC_MSG_ERROR([PKCS11 requires thread support])
2014-02-10 15:01:06 +11:00
fi
2018-05-22 15:24:37 +02:00
if test "$CRYPTO" = "OPENSSL"
2014-01-14 15:40:56 -08:00
then
AC_MSG_CHECKING(for OpenSSL with PKCS11 support)
2014-02-10 15:01:06 +11:00
saved_cc="$CC"
2014-01-14 15:40:56 -08:00
saved_cflags="$CFLAGS"
saved_libs="$LIBS"
2014-02-10 15:01:06 +11:00
CC="$CC -pthread"
2014-01-14 15:40:56 -08:00
CFLAGS="$CFLAGS $DST_OPENSSL_INC"
2014-02-13 15:09:08 +11:00
LIBS="$LIBS $DST_OPENSSL_LIBS"
2014-01-14 15:40:56 -08:00
AC_TRY_RUN([
#include <openssl/conf.h>
#include <openssl/engine.h>
int main() {
ENGINE *e;
OPENSSL_config(NULL);
e = ENGINE_by_id("pkcs11");
if (e == NULL)
return (1);
if (ENGINE_init(e) <= 0)
return (1);
return (0);
}
],
[AC_MSG_RESULT(yes)
PKCS11_TEST=pkcs11ssl
PKCS11_ENGINE='-DPKCS11_ENGINE="\"pkcs11\""'],
[AC_MSG_RESULT(no)
PKCS11_TEST=''
PKCS11_ENGINE='-DPKCS11_ENGINE=NULL'],
[AC_MSG_RESULT(cross compile, defaulting to no)
PKCS11_TEST=''
PKCS11_ENGINE='-DPKCS11_ENGINE=NULL'])
2014-02-10 15:01:06 +11:00
CC="$saved_cc"
2014-01-14 15:40:56 -08:00
CFLAGS="$saved_cflags"
LIBS="$saved_libs"
else
PKCS11_TEST=''
PKCS11_ENGINE='-DPKCS11_ENGINE=NULL'
fi
USE_PKCS11='-DUSE_PKCS11'
PKCS11_TOOLS=pkcs11
AC_CHECK_FUNC(getpassphrase, AC_DEFINE(HAVE_GETPASSPHRASE),)
2014-02-11 21:20:28 -08:00
ISC_PK11_C="pk11.c"
ISC_PK11_O="pk11.$O"
ISC_PK11_API_C="pk11_api.c"
ISC_PK11_API_O="pk11_api.$O"
2014-03-12 20:52:01 -07:00
ISC_PK11_RESULT_C="pk11_result.c"
ISC_PK11_RESULT_O="pk11_result.$O"
2014-02-11 21:20:28 -08:00
ISC_ISCPK11_API_C="unix/pk11_api.c"
ISC_ISCPK11_API_O="unix/pk11_api.$O"
2000-08-17 18:56:49 +00:00
;;
2014-01-14 15:40:56 -08:00
esac
AC_SUBST(USE_PKCS11)
AC_SUBST(PKCS11_TOOLS)
AC_SUBST(PKCS11_ENGINE)
2014-02-11 21:20:28 -08:00
AC_SUBST(ISC_PK11_C)
AC_SUBST(ISC_PK11_O)
AC_SUBST(ISC_PK11_API_C)
AC_SUBST(ISC_PK11_API_O)
2014-03-12 20:52:01 -07:00
AC_SUBST(ISC_PK11_RESULT_C)
AC_SUBST(ISC_PK11_RESULT_O)
2014-02-11 21:20:28 -08:00
AC_SUBST(ISC_ISCPK11_API_C)
AC_SUBST(ISC_ISCPK11_API_O)
2014-01-14 15:40:56 -08:00
AC_MSG_CHECKING(for PKCS11 tools)
case "$use_pkcs11" in
2001-06-03 19:36:01 +00:00
no)
2014-01-14 15:40:56 -08:00
PKCS11_PROVIDER="undefined"
2001-06-03 19:36:01 +00:00
AC_MSG_RESULT(disabled)
;;
2014-01-14 15:40:56 -08:00
yes|'')
PKCS11_PROVIDER="undefined"
AC_MSG_RESULT(enabled)
;;
2000-08-17 18:56:49 +00:00
*)
2014-01-14 15:40:56 -08:00
PKCS11_PROVIDER="$use_pkcs11"
AC_MSG_RESULT([enabled, PKCS11 provider is $PKCS11_PROVIDER])
2000-08-17 18:56:49 +00:00
;;
esac
2014-01-14 15:40:56 -08:00
AC_SUBST(PKCS11_PROVIDER)
2002-12-04 01:19:28 +00:00
2014-01-14 15:40:56 -08:00
PKCS11_ECDSA=""
2017-07-31 15:26:00 +02:00
PKCS11_ED25519=""
2016-08-19 08:02:51 +10:00
set_pk11_flavor="no"
2014-01-14 15:40:56 -08:00
AC_MSG_CHECKING(for native PKCS11)
2000-08-29 00:41:18 +00:00
2014-01-14 15:40:56 -08:00
case "$want_native_pkcs11" in
yes)
AC_MSG_RESULT(using native PKCS11 crypto)
PKCS11LINKOBJS='${PKCS11LINKOBJS}'
PKCS11LINKSRCS='${PKCS11LINKSRCS}'
2014-02-10 15:01:06 +11:00
PKCS11_TEST=pkcs11
2014-03-11 13:52:36 -07:00
AC_MSG_CHECKING(for PKCS11 ECDSA)
2014-01-14 15:40:56 -08:00
case "$with_ecdsa" in
no)
2014-03-11 13:52:36 -07:00
AC_MSG_RESULT(disabled)
2006-07-20 05:42:09 +00:00
;;
2014-01-14 15:40:56 -08:00
*)
2014-03-11 13:52:36 -07:00
AC_MSG_RESULT(enabled)
2014-01-14 15:40:56 -08:00
PKCS11_ECDSA="yes"
AC_DEFINE(HAVE_PKCS11_ECDSA, 1,
2014-02-10 15:01:06 +11:00
[Define if your PKCS11 provider supports ECDSA.])
2006-07-20 05:42:09 +00:00
;;
esac
2017-07-31 15:26:00 +02:00
AC_MSG_CHECKING(for PKCS11 Ed25519)
case "$with_eddsa" in
yes|all)
AC_MSG_RESULT(enabled)
PKCS11_ED25519="yes"
AC_DEFINE(HAVE_PKCS11_ED25519, 1,
[Define if your PKCS11 provider supports Ed25519.])
AC_MSG_CHECKING(for PKCS11 Ed448)
case "$with_eddsa" in
all)
AC_MSG_RESULT(enabled)
AC_DEFINE(HAVE_PKCS11_ED448, 1,
[Define if your PKCS11 provider supports Ed448.])
;;
*)
AC_MSG_RESULT(disabled)
;;
esac
;;
*)
AC_MSG_RESULT(disabled)
;;
esac
2016-08-19 08:02:51 +10:00
AC_MSG_CHECKING(for PKCS11 flavor)
case "$PKCS11_PROVIDER" in
*nfast*)
AC_MSG_RESULT(Thales nCipher)
# default
pk11_flavor="PK11_THALES_FLAVOR"
set_pk11_flavor="yes"
;;
*libsofthsm2*)
AC_MSG_RESULT(SoftHSMv2)
pk11_flavor="PK11_SOFTHSMV2_FLAVOR"
set_pk11_flavor="yes"
;;
*libsofthsm*)
AC_MSG_RESULT(SoftHSM)
pk11_flavor="PK11_SOFTHSMV1_FLAVOR"
set_pk11_flavor="yes"
;;
*cryptech*)
AC_MSG_RESULT(Cryptech)
pk11_flavor="PK11_CRYPTECH_FLAVOR"
set_pk11_flavor="yes"
;;
*Keyper*)
2017-01-03 16:40:11 -08:00
AC_MSG_RESULT(AEP Keyper)
pk11_flavor="PK11_AEP_FLAVOR"
set_pk11_flavor="yes"
2016-08-19 08:02:51 +10:00
;;
undefined)
AC_MSG_RESULT(undefined provider?)
;;
*)
AC_MSG_RESULT(unknown provider: tweaks are in lib/isc/include/pk11/site.h)
;;
esac
2016-10-20 10:26:05 +11:00
if test "yes" = "$set_pk11_flavor" ; then
2016-08-19 08:02:51 +10:00
CFLAGS="$CFLAGS -DPK11_FLAVOR=$pk11_flavor"
fi
2013-10-08 11:43:08 +11:00
;;
2014-01-14 15:40:56 -08:00
no|'')
AC_MSG_RESULT(disabled)
;;
esac
2013-10-08 11:43:08 +11:00
2014-01-14 15:40:56 -08:00
AC_SUBST(PKCS11LINKOBJS)
AC_SUBST(PKCS11LINKSRCS)
AC_SUBST(PKCS11_ECDSA)
2017-07-31 15:26:00 +02:00
AC_SUBST(PKCS11_ED25519)
2014-01-14 15:40:56 -08:00
AC_SUBST(PKCS11_TEST)
2000-08-29 00:41:18 +00:00
2018-02-25 23:19:18 -08:00
if test "X$CRYPTO" = "X"; then
# cat << \EOF
AC_MSG_ERROR([No cryptography library has been found or provided.
You must use --with-openssl, or --with-pkcs11 and --enable-native-pkcs11,
to enable cryptography.])
#EOF
exit 1
fi
2014-01-14 15:40:56 -08:00
# for PKCS11 benchmarks
2000-08-29 00:41:18 +00:00
2014-01-14 15:40:56 -08:00
have_clock_gt=no
AC_CHECK_FUNC(clock_gettime,have_clock_gt=yes,)
2016-10-20 10:26:05 +11:00
if test "no" = "$have_clock_gt"; then
2014-04-03 09:24:53 +02:00
AC_CHECK_LIB(rt,clock_gettime,have_clock_gt=rt,)
2000-08-29 00:11:15 +00:00
fi
2000-12-23 18:27:43 +00:00
2017-07-19 15:53:01 +10:00
if test "no" != "$have_clock_gt"; then
2014-01-14 15:40:56 -08:00
AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if clock_gettime is available.])
fi
2000-08-29 18:24:01 +00:00
2016-10-20 10:26:05 +11:00
if test "rt" = "$have_clock_gt"; then
2014-04-03 09:24:53 +02:00
LIBS="-lrt $LIBS"
fi
2016-07-21 11:13:03 -07:00
#
# was --with-lmdb specified?
#
AC_MSG_CHECKING(for lmdb library)
AC_ARG_WITH(lmdb,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-lmdb[=PATH]],
[build with LMDB library [yes|no|path]]),
2016-07-21 11:13:03 -07:00
use_lmdb="$withval", use_lmdb="auto")
have_lmdb=""
case "$use_lmdb" in
no)
lmdb_libs=""
;;
auto|yes)
for d in /usr /usr/local /opt/local
do
if test -f "${d}/include/lmdb.h"
then
if test ${d} != /usr
then
lmdb_cflags="-I ${d}/include"
LIBS="$LIBS -L${d}/lib"
fi
have_lmdb="yes"
fi
done
;;
*)
if test -f "${use_lmdb}/include/lmdb.h"
then
lmdb_cflags="-I${use_lmdb}/include"
LIBS="$LIBS -L${use_lmdb}/lib"
have_lmdb="yes"
else
AC_MSG_ERROR([$use_lmdb/include/lmdb.h not found.])
fi
;;
esac
if test "X${have_lmdb}" != "X"
then
AC_MSG_RESULT(yes)
AC_SEARCH_LIBS([mdb_env_create], [lmdb], [],
[AC_MSG_ERROR([found lmdb include but not library.])
have_lmdb=""])
elif test "X$use_lmdb" = Xyes
then
AC_MSG_ERROR([include/lmdb.h not found.])
else
AC_MSG_RESULT(no)
fi
NZD_TOOLS=""
NZDSRCS=
NZDTARGETS=
if test "X${have_lmdb}" != "X"
then
CFLAGS="$CFLAGS $lmdb_cflags"
AC_DEFINE(HAVE_LMDB, 1, [Define if lmdb was found])
NZD_TOOLS="nzd"
2017-11-13 11:36:45 +11:00
NZDSRCS='${NZDSRCS}'
NZDTARGETS='${NZDTARGETS}'
2016-07-21 11:13:03 -07:00
fi
AC_SUBST(NZD_TOOLS)
AC_SUBST(NZDSRCS)
AC_SUBST(NZDTARGETS)
2006-12-21 06:03:37 +00:00
#
# was --with-libxml2 specified?
#
AC_MSG_CHECKING(for libxml2 library)
AC_ARG_WITH(libxml2,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-libxml2[=PATH]],
[build with libxml2 library [yes|no|path]]),
2006-12-21 06:03:37 +00:00
use_libxml2="$withval", use_libxml2="auto")
case "$use_libxml2" in
no)
DST_LIBXML2_INC=""
;;
auto|yes)
2006-12-21 12:04:16 +00:00
case X`(xml2-config --version) 2>/dev/null` in
2013-01-01 23:10:51 +00:00
X2.[[6789]].*)
2006-12-21 12:04:16 +00:00
libxml2_libs=`xml2-config --libs`
libxml2_cflags=`xml2-config --cflags`
;;
*)
2016-10-20 10:26:05 +11:00
if test "yes" = "$use_libxml2" ; then
2015-08-12 21:58:04 -07:00
AC_MSG_RESULT(no)
AC_MSG_ERROR(required libxml2 version not available)
else
libxml2_libs=
libxml2_cflags=
fi
2006-12-21 12:04:16 +00:00
;;
esac
2006-12-21 06:03:37 +00:00
;;
*)
if test -f "$use_libxml2/bin/xml2-config" ; then
libxml2_libs=`$use_libxml2/bin/xml2-config --libs`
libxml2_cflags=`$use_libxml2/bin/xml2-config --cflags`
fi
;;
esac
if test "X$libxml2_libs" != "X"
then
CFLAGS="$CFLAGS $libxml2_cflags"
LIBS="$LIBS $libxml2_libs"
2014-08-22 16:10:43 +10:00
#
# Sanity check xml2-config output.
#
AC_TRY_LINK([#include <libxml/xmlwriter.h>],
[return(xmlTextWriterStartElement(NULL, NULL));],
AC_MSG_RESULT(yes),
AC_MSG_ERROR(xml2-config returns badness))
2006-12-21 06:03:37 +00:00
AC_DEFINE(HAVE_LIBXML2, 1, [Define if libxml2 was found])
2015-10-28 20:19:31 -07:00
XMLSTATS=1
2006-12-21 06:03:37 +00:00
else
AC_MSG_RESULT(no)
fi
2015-10-28 20:19:31 -07:00
AC_SUBST(XMLSTATS)
2006-12-21 06:03:37 +00:00
2013-03-13 14:24:50 -07:00
#
# was --with-libjson specified?
#
AC_MSG_CHECKING(for json library)
AC_ARG_WITH(libjson,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-libjson[=PATH]],
[build with libjson0 library [yes|no|path]]),
use_libjson="$withval", use_libjson="auto")
2013-03-13 14:24:50 -07:00
2013-07-13 15:12:51 -07:00
have_libjson=""
2015-06-05 10:16:24 +10:00
have_libjson_c=""
2013-03-13 14:24:50 -07:00
case "$use_libjson" in
no)
libjson_libs=""
;;
auto|yes)
2014-05-21 12:06:00 +10:00
for d in /usr /usr/local /opt/local
do
if test -f "${d}/include/json/json.h"
then
if test ${d} != /usr
then
2015-06-05 10:16:24 +10:00
libjson_cflags="-I ${d}/include"
2014-05-21 12:06:00 +10:00
LIBS="$LIBS -L${d}/lib"
fi
have_libjson="yes"
elif test -f "${d}/include/json-c/json.h"
then
if test ${d} != /usr
then
2015-06-05 10:16:24 +10:00
libjson_cflags="-I ${d}/include"
2014-05-21 12:06:00 +10:00
LIBS="$LIBS -L${d}/lib"
fi
have_libjson="yes"
2015-06-05 10:16:24 +10:00
have_libjson_c="yes"
2014-05-21 12:06:00 +10:00
fi
done
2013-03-13 14:24:50 -07:00
;;
*)
if test -f "${use_libjson}/include/json/json.h"
2014-02-10 15:01:06 +11:00
then
2015-06-05 10:16:24 +10:00
libjson_cflags="-I${use_libjson}/include"
2013-07-09 16:43:59 -07:00
LIBS="$LIBS -L${use_libjson}/lib"
have_libjson="yes"
elif test -f "${use_libjson}/include/json-c/json.h"
then
2015-06-05 10:16:24 +10:00
libjson_cflags="-I${use_libjson}/include"
2013-07-09 16:43:59 -07:00
LIBS="$LIBS -L${use_libjson}/lib"
have_libjson="yes"
2015-06-05 10:16:24 +10:00
have_libjson_c="yes"
2013-07-09 16:43:59 -07:00
else
AC_MSG_ERROR([$use_libjson/include/json{,-c}/json.h not found.])
2013-03-13 14:24:50 -07:00
fi
;;
esac
2013-08-05 15:14:31 +10:00
if test "X${have_libjson}" != "X"
2013-03-13 14:24:50 -07:00
then
AC_MSG_RESULT(yes)
2013-08-05 15:14:31 +10:00
AC_SEARCH_LIBS([json_object_new_int64], [json json-c], [],
2014-05-21 12:06:00 +10:00
[AC_MSG_ERROR([found libjson include but not library.])
2014-02-10 15:01:06 +11:00
have_libjson=""])
2014-05-21 12:06:00 +10:00
elif test "X$use_libjson" = Xyes
then
AC_MSG_ERROR([include/json{,-c}/json.h not found.])
2013-03-13 14:24:50 -07:00
else
AC_MSG_RESULT(no)
fi
2013-07-09 16:43:59 -07:00
if test "X${have_libjson}" != "X"
then
CFLAGS="$CFLAGS $libjson_cflags"
AC_DEFINE(HAVE_JSON, 1, [Define if libjson was found])
2015-06-05 10:16:24 +10:00
if test "X${have_libjson_c}" = Xyes
then
AC_DEFINE(HAVE_JSON_C, 1, [Define if json-c was found])
fi
2015-10-28 20:19:31 -07:00
JSONSTATS=1
2013-07-09 16:43:59 -07:00
fi
2015-10-28 20:19:31 -07:00
AC_SUBST(JSONSTATS)
2013-07-09 16:43:59 -07:00
2015-10-02 10:45:10 +02:00
#
# was --with-zlib specified?
#
AC_MSG_CHECKING(for zlib library)
AC_ARG_WITH(zlib,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-zlib[=PATH]],
[build with zlib for HTTP compression
[default=yes]]),
with_zlib="$withval", with_zlib="auto")
2015-10-02 10:45:10 +02:00
have_zlib=""
2016-03-02 12:37:41 +11:00
case "$with_zlib" in
2015-10-02 10:45:10 +02:00
no)
zlib_libs=""
;;
auto|yes)
for d in /usr /usr/local /opt/local
do
if test -f "${d}/include/zlib.h"
then
if test ${d} != /usr
then
zlib_cflags="-I ${d}/include"
LIBS="$LIBS -L${d}/lib"
fi
have_zlib="yes"
fi
done
;;
*)
2017-11-07 10:11:55 +11:00
if test -f "${with_zlib}/include/zlib.h"
2015-10-02 10:45:10 +02:00
then
2016-03-02 12:37:41 +11:00
zlib_cflags="-I${with_zlib}/include"
LIBS="$LIBS -L${with_zlib}/lib"
2015-10-02 10:45:10 +02:00
have_zlib="yes"
else
2016-03-02 12:37:41 +11:00
AC_MSG_ERROR([$with_zlib/include/zlib.h not found.])
2015-10-02 10:45:10 +02:00
fi
;;
esac
if test "X${have_zlib}" != "X"
then
AC_MSG_RESULT(yes)
AC_SEARCH_LIBS([deflate], [z], [],
[AC_MSG_ERROR([found zlib include but not library.])
have_zlib=""])
2016-03-02 12:37:41 +11:00
elif test "X$with_zlib" = Xyes
2015-10-02 10:45:10 +02:00
then
AC_MSG_ERROR([include/zlib.h not found.])
else
AC_MSG_RESULT(no)
fi
2015-10-28 20:19:31 -07:00
ZLIB=
2015-10-02 10:45:10 +02:00
if test "X${have_zlib}" != "X"
then
CFLAGS="$CFLAGS $zlib_cflags"
AC_DEFINE(HAVE_ZLIB, 1, [Define if zlib was found])
2015-10-28 20:19:31 -07:00
ZLIB=1
2015-10-02 10:45:10 +02:00
fi
2015-10-28 20:19:31 -07:00
AC_SUBST(ZLIB)
2015-10-02 10:45:10 +02:00
2004-09-01 07:25:51 +00:00
#
# In solaris 10, SMF can manage named service
#
AC_CHECK_LIB(scf, smf_enable_instance)
2000-09-22 18:52:39 +00:00
#
# flockfile is usually provided by pthreads, but we may want to use it
2001-07-04 00:34:44 +00:00
# even if compiled with --disable-threads. getc_unlocked might also not
# be defined.
2000-09-22 18:52:39 +00:00
#
AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),)
2001-07-04 00:34:44 +00:00
AC_CHECK_FUNC(getc_unlocked, AC_DEFINE(HAVE_GETCUNLOCKED),)
2000-09-22 18:52:39 +00:00
2000-12-23 18:27:43 +00:00
#
# Indicate what the final decision was regarding threads.
#
AC_MSG_CHECKING(whether to build with threads)
if $use_threads; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
#
# End of pthreads stuff.
#
2002-03-08 00:24:00 +00:00
#
# Large File
#
2017-11-13 11:36:45 +11:00
AC_ARG_ENABLE(largefile,
AS_HELP_STRING([--enable-largefile], [64-bit file support]),
2002-03-08 00:24:00 +00:00
want_largefile="yes", want_largefile="no")
case $want_largefile in
yes)
ALWAYS_DEFINES="$ALWAYS_DEFINES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
;;
*)
;;
esac
2000-12-23 18:27:43 +00:00
#
# Additional compiler settings.
#
MKDEPCC="$CC"
MKDEPCFLAGS="-M"
IRIX_DNSSEC_WARNINGS_HACK=""
if test "X$GCC" = "Xyes"; then
2014-05-23 11:25:59 +10:00
STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith"
2006-08-10 01:57:41 +00:00
AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing)
2014-05-23 11:25:59 +10:00
SAVE_CFLAGS="$CFLAGS"
2015-04-15 12:39:55 +10:00
CFLAGS="$CFLAGS -Werror -fno-strict-aliasing"
2006-08-10 01:57:41 +00:00
AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no])
2014-05-23 11:25:59 +10:00
CFLAGS="$SAVE_CFLAGS"
2016-10-20 10:26:05 +11:00
if test "yes" = "$FNOSTRICTALIASING"; then
2006-08-10 01:57:41 +00:00
AC_MSG_RESULT(yes)
2014-05-23 11:25:59 +10:00
STD_CWARNINGS="$STD_CWARNINGS -fno-strict-aliasing"
else
AC_MSG_RESULT(no)
fi
#
# turn off delete null pointer checks
#
AC_MSG_CHECKING(if "$CC" supports -fno-delete-null-pointer-checks)
SAVE_CFLAGS="$CFLAGS"
2015-04-15 12:39:55 +10:00
CFLAGS="$CFLAGS -Werror -fno-delete-null-pointer-checks"
2014-05-23 11:25:59 +10:00
AC_TRY_COMPILE(,, [FNODELETENULLPOINTERCHECKS=yes],
[FNODELETENULLPOINTERCHECKS=no])
CFLAGS="$SAVE_CFLAGS"
2016-10-20 10:26:05 +11:00
if test "yes" = "$FNODELETENULLPOINTERCHECKS"; then
2014-05-23 11:25:59 +10:00
AC_MSG_RESULT(yes)
STD_CWARNINGS="$STD_CWARNINGS -fno-delete-null-pointer-checks"
2006-08-10 01:57:41 +00:00
else
AC_MSG_RESULT(no)
fi
2004-12-06 21:49:41 +00:00
case "$host" in
*-hp-hpux*)
2014-02-12 09:07:54 +11:00
CFLAGS="$CFLAGS -Wl,+vnocompatwarnings"
BACKTRACECFLAGS="$BACKTRACECFLAGS -Wl,+vnocompatwarnings"
2004-12-06 21:49:41 +00:00
;;
esac
2015-01-20 13:29:18 -08:00
if test "X$enable_warn_shadow" = Xyes; then
STD_CWARNINGS="$STD_CWARNINGS -Wshadow"
fi
2014-07-08 15:51:40 +10:00
if test "X$enable_warn_error" = Xyes; then
STD_CWARNINGS="$STD_CWARNINGS -Werror"
fi
2000-12-23 18:27:43 +00:00
else
case $host in
*-dec-osf*)
CC="$CC -std"
CCOPT="$CCOPT -std"
2013-07-09 11:47:16 -07:00
CCNOOPT="$CCNOOPT -std"
2000-12-23 18:27:43 +00:00
MKDEPCC="$CC"
;;
*-hp-hpux*)
CC="$CC -Ae -z"
# The version of the C compiler that constantly warns about
2006-12-04 01:54:53 +00:00
# 'const' as well as alignment issues is unfortunately not
# able to be discerned via the version of the operating
# system, nor does cc have a version flag.
2000-12-23 18:27:43 +00:00
case "`$CC +W 123 2>&1`" in
*Unknown?option*)
STD_CWARNINGS="+w1"
;;
*)
# Turn off the pointlessly noisy warnings.
2005-10-14 01:14:08 +00:00
STD_CWARNINGS="+w1 +W 474,530,2193,2236"
2000-12-23 18:27:43 +00:00
;;
esac
CCOPT="$CCOPT -Ae -z"
2013-07-09 11:47:16 -07:00
CCNOOPT="$CCNOOPT -Ae -z"
2014-02-12 09:07:54 +11:00
CFLAGS="$CFLAGS -Wl,+vnocompatwarnings"
BACKTRACECFLAGS="$BACKTRACECFLAGS -Wl,+vnocompatwarnings"
2000-12-23 18:27:43 +00:00
MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
;;
*-sgi-irix*)
STD_CWARNINGS="-fullwarn -woff 1209"
#
# Silence more than 250 instances of
# "prototyped function redeclared without prototype"
# and 11 instances of
# "variable ... was set but never used"
# from lib/dns/sec/openssl.
#
IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552"
;;
*-solaris*)
MKDEPCFLAGS="-xM"
;;
2001-09-20 18:30:43 +00:00
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
2006-12-04 01:54:53 +00:00
# UnixWare
2001-09-20 02:32:44 +00:00
CC="$CC -w"
;;
2000-12-23 18:27:43 +00:00
esac
fi
AC_SUBST(MKDEPCC)
AC_SUBST(MKDEPCFLAGS)
AC_SUBST(MKDEPPROG)
AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK)
2000-02-11 18:35:11 +00:00
#
# NLS
#
1999-06-23 02:51:39 +00:00
AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
2000-02-11 18:35:11 +00:00
#
# -lxnet buys us one big porting headache... standards, gotta love 'em.
#
# AC_CHECK_LIB(xnet, socket, ,
# AC_CHECK_LIB(socket, socket)
# )
#
# Use this for now, instead:
#
1999-02-11 06:38:12 +00:00
case "$host" in
mips-sgi-irix*)
;;
2008-12-01 07:50:17 +00:00
*-linux*)
;;
1999-02-11 06:38:12 +00:00
*)
AC_CHECK_LIB(socket, socket)
2008-12-01 07:50:17 +00:00
AC_CHECK_LIB(nsl, inet_addr)
1999-02-11 06:38:12 +00:00
;;
esac
1999-01-22 04:35:11 +00:00
2008-10-21 02:43:08 +00:00
#
# Work around Solaris's select() limitations.
#
case "$host" in
*-solaris2.[[89]]|*-solaris2.1?)
AC_DEFINE(FD_SETSIZE, 65536,
[Solaris hack to get select_large_fdset.])
;;
esac
2001-02-01 23:16:10 +00:00
#
# Purify support
#
AC_MSG_CHECKING(whether to use purify)
AC_ARG_WITH(purify,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-purify[=PATH]],[use Rational purify]),
use_purify="$withval", use_purify="no")
2001-02-01 23:16:10 +00:00
case "$use_purify" in
no)
;;
yes)
AC_PATH_PROG(purify_path, purify, purify)
;;
*)
purify_path="$use_purify"
;;
esac
case "$use_purify" in
no)
AC_MSG_RESULT(no)
PURIFY=""
;;
*)
2017-07-19 15:53:01 +10:00
if test -f "$purify_path" || test purify = "$purify_path"; then
2001-02-01 23:16:10 +00:00
AC_MSG_RESULT($purify_path)
PURIFYFLAGS="`echo $PURIFYOPTIONS`"
PURIFY="$purify_path $PURIFYFLAGS"
else
AC_MSG_ERROR([$purify_path not found.
Please choose the proper path with the following command:
configure --with-purify=PATH
])
fi
;;
esac
AC_SUBST(PURIFY)
2014-10-08 15:14:02 +02:00
#
# Google/Great Performance Tools CPU Profiler
#
AC_MSG_CHECKING(whether to use gperftools profiler)
AC_ARG_WITH(gperftools-profiler,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-gperftools-profiler],
[use gperftools CPU profiler]),
use_profiler="$withval", use_profiler="no")
2014-10-08 15:14:02 +02:00
case $use_profiler in
yes)
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_GPERFTOOLS_PROFILER], 1,
[Define to use gperftools CPU profiler.])
LIBS="$LIBS -lprofiler"
;;
*)
AC_MSG_RESULT(no)
;;
esac
2008-04-28 23:43:24 +00:00
2009-09-01 18:40:25 +00:00
#
# enable/disable dumping stack backtrace. Also check if the system supports
# glibc-compatible backtrace() function.
#
AC_ARG_ENABLE(backtrace,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-backtrace],
[log stack backtrace on abort [default=yes]]),
2009-09-01 18:40:25 +00:00
want_backtrace="$enableval", want_backtrace="yes")
case $want_backtrace in
yes)
ISC_PLATFORM_USEBACKTRACE="#define ISC_PLATFORM_USEBACKTRACE 1"
AC_TRY_LINK([#include <execinfo.h>],
[return (backtrace((void **)0, 0));],
[AC_DEFINE([HAVE_LIBCTRACE], [], [if system have backtrace function])],)
;;
*)
ISC_PLATFORM_USEBACKTRACE="#undef ISC_PLATFORM_USEBACKTRACE"
;;
esac
AC_SUBST(ISC_PLATFORM_USEBACKTRACE)
AC_ARG_ENABLE(symtable,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-symtable],
[use internal symbol table for backtrace
[all|minimal(default)|none]]),
2009-09-01 18:40:25 +00:00
want_symtable="$enableval", want_symtable="minimal")
case $want_symtable in
2009-11-11 08:46:47 +00:00
yes|all|minimal) # "yes" is a hidden value equivalent to "minimal"
2016-10-20 10:26:05 +11:00
if test "" = "$PERL"
2009-09-01 18:40:25 +00:00
then
AC_MSG_ERROR([Internal symbol table requires perl but no perl is found.
Install perl or explicitly disable the feature by --disable-symtable.])
fi
2016-10-20 10:26:05 +11:00
if test "yes" = "$use_libtool"; then
2009-09-15 23:17:22 +00:00
AC_MSG_WARN([Internal symbol table does not work with libtool. Disabling symbol table.])
2009-09-01 18:40:25 +00:00
else
2009-11-11 08:46:47 +00:00
# we generate the internal symbol table only for those systems
# known to work to avoid unexpected build failure. Also, warn
# about unsupported systems when the feature is enabled
# manually.
case $host_os in
freebsd*|netbsd*|openbsd*|linux*|solaris*|darwin*)
MKSYMTBL_PROGRAM="$PERL"
2017-07-19 15:53:01 +10:00
if test "all" = "$want_symtable"; then
2009-11-11 08:46:47 +00:00
ALWAYS_MAKE_SYMTABLE="yes"
fi
;;
*)
2017-07-19 15:53:01 +10:00
if test "yes" = "$want_symtable" -o "all" = "$want_symtable"
2009-11-11 08:46:47 +00:00
then
AC_MSG_WARN([this system is not known to generate internal symbol table safely; disabling it])
fi
esac
2009-09-01 18:40:25 +00:00
fi
;;
*)
;;
esac
AC_SUBST(MKSYMTBL_PROGRAM)
AC_SUBST(ALWAYS_MAKE_SYMTABLE)
2001-02-02 02:07:57 +00:00
#
2000-02-23 23:02:28 +00:00
# File name extension for static archive files, for those few places
# where they are treated differently from dynamic ones.
2001-02-02 02:07:57 +00:00
#
2000-02-23 23:02:28 +00:00
SA=a
1999-07-03 21:07:10 +00:00
AC_SUBST(O)
AC_SUBST(A)
2000-02-23 23:02:28 +00:00
AC_SUBST(SA)
2001-03-15 19:12:53 +00:00
AC_SUBST(LIBTOOL_MKDEP_SED)
2004-02-24 01:41:28 +00:00
AC_SUBST(LIBTOOL_MODE_COMPILE)
AC_SUBST(LIBTOOL_MODE_INSTALL)
AC_SUBST(LIBTOOL_MODE_LINK)
2016-11-01 19:17:07 -07:00
AC_SUBST(LIBTOOL_MODE_UNINSTALL)
2004-12-05 23:03:22 +00:00
AC_SUBST(LIBTOOL_ALLOW_UNDEFINED)
2004-12-06 22:50:41 +00:00
AC_SUBST(LIBTOOL_IN_MAIN)
1999-07-03 21:07:10 +00:00
2013-04-10 13:49:57 -07:00
BIND9_CO_RULE=".c.$O:"
2009-09-01 00:22:28 +00:00
AC_SUBST(BIND9_CO_RULE)
2000-07-25 23:54:09 +00:00
#
# Here begins a very long section to determine the system's networking
2009-01-17 09:35:58 +00:00
# capabilities. The order of the tests is significant.
2000-07-25 23:54:09 +00:00
#
2000-02-11 18:35:11 +00:00
#
# IPv6
#
2000-01-07 02:44:13 +00:00
AC_ARG_ENABLE(ipv6,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-ipv6], [use IPv6 [default=autodetect]]))
2000-01-07 02:44:13 +00:00
2000-09-15 20:50:46 +00:00
case "$enable_ipv6" in
yes|''|autodetect)
AC_DEFINE(WANT_IPV6)
;;
no)
;;
esac
2000-02-11 18:35:11 +00:00
#
# We do the IPv6 compilation checking after libtool so that we can put
# the right suffix on the files.
#
2000-09-15 20:50:46 +00:00
AC_MSG_CHECKING(for IPv6 structures)
AC_TRY_COMPILE([
2000-01-07 19:44:28 +00:00
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>],
2000-09-15 20:50:46 +00:00
[struct sockaddr_in6 sin6; return (0);],
[AC_MSG_RESULT(yes)
found_ipv6=yes],
[AC_MSG_RESULT(no)
found_ipv6=no])
2000-01-07 02:44:13 +00:00
2000-05-13 18:15:11 +00:00
#
# See whether IPv6 support is provided via a Kame add-on.
# This is done before other IPv6 linking tests to LIBS is properly set.
#
AC_MSG_CHECKING(for Kame IPv6 support)
AC_ARG_WITH(kame,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-kame[=PATH]],
[use Kame IPv6 [default path /usr/local/v6]]),
use_kame="$withval", use_kame="no")
2000-05-13 18:15:11 +00:00
case "$use_kame" in
no)
;;
yes)
kame_path=/usr/local/v6
;;
*)
kame_path="$use_kame"
;;
esac
case "$use_kame" in
no)
AC_MSG_RESULT(no)
;;
*)
if test -f $kame_path/lib/libinet6.a; then
AC_MSG_RESULT($kame_path/lib/libinet6.a)
LIBS="-L$kame_path/lib -linet6 $LIBS"
else
AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
Please choose the proper path with the following command:
configure --with-kame=PATH
])
fi
;;
esac
#
# Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
# Including it on Kame-using platforms is very bad, though, because
# Kame uses #error against direct inclusion. So include it on only
# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
# This is done before the in6_pktinfo check because that's what
# netinet6/in6.h is needed for.
#
changequote({, })
2000-05-18 22:35:47 +00:00
case "$host" in
*-bsdi4.[01]*)
2000-05-13 18:15:11 +00:00
ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
2000-05-18 22:35:47 +00:00
isc_netinet6in6_hack="#include <netinet6/in6.h>"
2000-05-13 18:15:11 +00:00
;;
*)
ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
2000-05-18 22:35:47 +00:00
isc_netinet6in6_hack=""
2000-05-13 18:15:11 +00:00
;;
esac
changequote([, ])
2000-05-18 22:35:47 +00:00
#
# This is similar to the netinet6/in6.h issue.
#
case "$host" in
2001-09-20 18:30:43 +00:00
*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
2006-12-04 01:54:53 +00:00
# UnixWare
2001-09-20 02:32:44 +00:00
ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
2006-12-04 01:54:53 +00:00
ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1"
2001-09-20 02:32:44 +00:00
isc_netinetin6_hack="#include <netinet/in6.h>"
;;
2000-05-18 22:35:47 +00:00
*)
ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H"
2006-12-04 01:54:53 +00:00
ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR"
2000-05-18 22:35:47 +00:00
isc_netinetin6_hack=""
;;
esac
2000-05-13 18:15:11 +00:00
#
# Now delve deeper into the suitability of the IPv6 support.
#
2000-01-07 02:44:13 +00:00
case "$found_ipv6" in
yes)
2000-02-04 06:04:16 +00:00
ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
2000-06-15 21:52:21 +00:00
2001-01-03 13:05:14 +00:00
AC_MSG_CHECKING(for in6_addr)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
$isc_netinetin6_hack
$isc_netinet6in6_hack
],
[struct in6_addr in6; return (0);],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6"
isc_in_addr6_hack=""],
[AC_MSG_RESULT(no)
ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1"
isc_in_addr6_hack="#define in6_addr in_addr6"])
2000-03-22 22:07:17 +00:00
AC_MSG_CHECKING(for in6addr_any)
2000-04-04 18:33:08 +00:00
AC_TRY_LINK([
2000-03-22 22:07:17 +00:00
#include <sys/types.h>
#include <sys/socket.h>
2000-05-18 22:35:47 +00:00
#include <netinet/in.h>
2001-01-03 13:05:14 +00:00
$isc_netinetin6_hack
$isc_netinet6in6_hack
$isc_in_addr6_hack
],
2001-11-09 23:08:22 +00:00
[struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);],
2000-03-22 22:07:17 +00:00
[AC_MSG_RESULT(yes)
2017-09-08 13:39:09 -07:00
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"],
2000-03-22 22:07:17 +00:00
[AC_MSG_RESULT(no)
2017-09-08 13:39:09 -07:00
ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"])
2000-06-15 21:52:21 +00:00
2001-11-01 22:39:30 +00:00
AC_MSG_CHECKING(for in6addr_loopback)
AC_TRY_LINK([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
$isc_netinetin6_hack
$isc_netinet6in6_hack
$isc_in_addr6_hack
],
2001-11-09 23:08:22 +00:00
[struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);],
2001-11-01 22:39:30 +00:00
[AC_MSG_RESULT(yes)
2017-09-08 13:39:09 -07:00
ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"],
2001-11-01 22:39:30 +00:00
[AC_MSG_RESULT(no)
2017-09-08 13:39:09 -07:00
ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"])
2001-11-01 22:39:30 +00:00
2000-06-15 21:52:21 +00:00
AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
$isc_netinetin6_hack
$isc_netinet6in6_hack
],
[struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
[AC_MSG_RESULT(yes)
2017-09-08 13:39:09 -07:00
ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"],
2000-06-15 21:52:21 +00:00
[AC_MSG_RESULT(no)
2017-09-08 13:39:09 -07:00
ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"])
2000-06-15 21:52:21 +00:00
2000-05-06 01:30:32 +00:00
AC_MSG_CHECKING(for in6_pktinfo)
2000-05-13 18:15:11 +00:00
AC_TRY_COMPILE([
2000-05-06 01:30:32 +00:00
#include <sys/types.h>
#include <sys/socket.h>
2000-05-06 22:53:20 +00:00
#include <netinet/in.h>
2000-05-18 22:35:47 +00:00
$isc_netinetin6_hack
$isc_netinet6in6_hack
2000-05-06 22:53:20 +00:00
],
2000-05-06 01:30:32 +00:00
[struct in6_pktinfo xyzzy; return (0);],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
[AC_MSG_RESULT(no -- disabling runtime ipv6 support)
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
2000-01-07 02:44:13 +00:00
;;
no)
ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
2000-04-04 18:33:08 +00:00
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
2000-05-06 01:30:32 +00:00
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
2002-10-24 03:52:35 +00:00
ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
2000-01-07 02:44:13 +00:00
ISC_IPV6_H="ipv6.h"
ISC_IPV6_O="ipv6.$O"
ISC_ISCIPV6_O="unix/ipv6.$O"
ISC_IPV6_C="ipv6.c"
;;
esac
2014-12-19 12:06:35 +11:00
AC_MSG_CHECKING(for struct sockaddr_storage)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
$isc_netinetin6_hack
$isc_netinet6in6_hack
],
[struct sockaddr_storage storage; return (0);],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_HAVESOCKADDRSTORAGE="#define ISC_PLATFORM_HAVESOCKADDRSTORAGE 1"],
[AC_MSG_RESULT(no)
ISC_PLATFORM_HAVESOCKADDRSTORAGE="#undef ISC_PLATFORM_HAVESOCKADDRSTORAGE"])
1999-10-05 19:52:30 +00:00
AC_SUBST(ISC_PLATFORM_HAVEIPV6)
2000-05-18 22:35:47 +00:00
AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
2000-05-13 18:15:11 +00:00
AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
2001-01-03 13:05:14 +00:00
AC_SUBST(ISC_PLATFORM_HAVEINADDR6)
2000-03-22 22:07:17 +00:00
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
2001-11-01 23:00:44 +00:00
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
2000-05-06 01:30:32 +00:00
AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
2000-12-08 00:55:51 +00:00
AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
2014-12-19 12:06:35 +11:00
AC_SUBST(ISC_PLATFORM_HAVESOCKADDRSTORAGE)
1999-08-27 21:08:40 +00:00
AC_SUBST(ISC_IPV6_H)
AC_SUBST(ISC_IPV6_O)
AC_SUBST(ISC_ISCIPV6_O)
AC_SUBST(ISC_IPV6_C)
2002-10-24 03:52:35 +00:00
AC_SUBST(ISC_PLATFORM_HAVESCOPEID)
2000-07-25 23:54:09 +00:00
2001-10-22 04:01:32 +00:00
AC_MSG_CHECKING([for struct if_laddrreq])
AC_TRY_LINK([
#include <sys/types.h>
#include <net/if6.h>
],[ struct if_laddrreq a; ],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_HAVEIF_LADDRREQ="#define ISC_PLATFORM_HAVEIF_LADDRREQ 1"],
[AC_MSG_RESULT(no)
ISC_PLATFORM_HAVEIF_LADDRREQ="#undef ISC_PLATFORM_HAVEIF_LADDRREQ"])
AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRREQ)
AC_MSG_CHECKING([for struct if_laddrconf])
AC_TRY_LINK([
#include <sys/types.h>
#include <net/if6.h>
],[ struct if_laddrconf a; ],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_HAVEIF_LADDRCONF="#define ISC_PLATFORM_HAVEIF_LADDRCONF 1"],
[AC_MSG_RESULT(no)
ISC_PLATFORM_HAVEIF_LADDRCONF="#undef ISC_PLATFORM_HAVEIF_LADDRCONF"])
AC_SUBST(ISC_PLATFORM_HAVEIF_LADDRCONF)
2000-02-11 18:35:11 +00:00
#
# Check for network functions that are often missing. We do this
# after the libtool checking, so we can put the right suffix on
2000-07-25 23:54:09 +00:00
# the files. It also needs to come after checking for a Kame add-on,
# which provides some (all?) of the desired functions.
2000-02-11 18:35:11 +00:00
#
2001-03-21 02:06:28 +00:00
2002-05-15 07:26:09 +00:00
AC_MSG_CHECKING([for inet_ntop with IPv6 support])
AC_TRY_RUN([
2000-04-26 21:50:49 +00:00
#include <sys/types.h>
2002-05-15 07:26:09 +00:00
#include <sys/socket.h>
2000-04-26 21:50:49 +00:00
#include <netinet/in.h>
2002-05-15 07:26:09 +00:00
#include <arpa/inet.h>
main() {
char a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}],
2006-12-04 01:54:53 +00:00
[AC_MSG_RESULT(yes)
ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
2000-04-26 21:50:49 +00:00
2006-12-04 01:54:53 +00:00
[AC_MSG_RESULT(no)
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"],
2011-05-05 18:09:39 +00:00
[AC_MSG_RESULT(assuming inet_ntop not needed)
ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"])
2001-03-21 02:06:28 +00:00
# On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
2001-07-16 03:06:53 +00:00
# addresses with less than four octets, like "1.2.3". Also leading
# zeros should also be rejected.
2001-03-21 02:06:28 +00:00
2002-05-15 07:26:09 +00:00
AC_MSG_CHECKING([for working inet_pton with IPv6 support])
2001-03-21 02:06:28 +00:00
AC_TRY_RUN([
2000-04-26 21:50:49 +00:00
#include <sys/types.h>
2001-03-21 02:06:28 +00:00
#include <sys/socket.h>
2000-04-26 21:50:49 +00:00
#include <netinet/in.h>
2001-03-21 02:06:28 +00:00
#include <arpa/inet.h>
2002-05-15 07:26:09 +00:00
main() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 :
(inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }],
2006-12-04 01:54:53 +00:00
[AC_MSG_RESULT(yes)
ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
[AC_MSG_RESULT(no)
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
[AC_MSG_RESULT(assuming inet_pton needed)
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
2011-05-05 18:09:39 +00:00
ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"])
2001-03-21 02:06:28 +00:00
2000-04-26 21:50:49 +00:00
AC_SUBST(ISC_PLATFORM_NEEDNTOP)
AC_SUBST(ISC_PLATFORM_NEEDPTON)
2000-07-25 23:54:09 +00:00
#
# Look for a 4.4BSD-style sa_len member in struct sockaddr.
#
case "$host" in
*-dec-osf*)
# Turn on 4.4BSD style sa_len support.
AC_DEFINE(_SOCKADDR_LEN)
;;
esac
AC_MSG_CHECKING(for sa_len in struct sockaddr)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>],
[struct sockaddr sa; sa.sa_len = 0; return (0);],
[AC_MSG_RESULT(yes)
2017-09-08 13:39:09 -07:00
ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1"],
2000-07-25 23:54:09 +00:00
[AC_MSG_RESULT(no)
2017-09-08 13:39:09 -07:00
ISC_PLATFORM_HAVESALEN="#undef ISC_PLATFORM_HAVESALEN"])
2000-07-25 23:54:09 +00:00
AC_SUBST(ISC_PLATFORM_HAVESALEN)
#
# Look for a 4.4BSD or 4.3BSD struct msghdr
#
AC_MSG_CHECKING(for struct msghdr flavor)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>],
[struct msghdr msg; msg.msg_flags = 0; return (0);],
[AC_MSG_RESULT(4.4BSD)
ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"],
[AC_MSG_RESULT(4.3BSD)
ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])
AC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)
#
# Look for in_port_t.
#
AC_MSG_CHECKING(for type in_port_t)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <netinet/in.h>],
[in_port_t port = 25; return (0);],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"],
2006-12-04 01:54:53 +00:00
[AC_MSG_RESULT(no)
2000-07-25 23:54:09 +00:00
ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])
AC_SUBST(ISC_PLATFORM_NEEDPORTT)
2016-08-12 15:31:33 +10:00
#
2017-09-18 08:34:41 +02:00
# Allow forcibly disabling TCP Fast Open support as autodetection might yield
# confusing results on some systems (e.g. FreeBSD; see set_tcp_fastopen()
# comment in lib/isc/unix/socket.c).
2016-08-12 15:31:33 +10:00
#
2017-09-18 08:34:41 +02:00
AC_ARG_ENABLE(tcp_fastopen,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--disable-tcp-fastopen],
2017-11-13 13:06:12 +11:00
[disable TCP Fast Open support [default=autodetect]]))
2017-09-18 08:34:41 +02:00
2016-08-12 15:31:33 +10:00
AC_MSG_CHECKING(for TCP_FASTOPEN socket option)
2017-09-18 08:34:41 +02:00
case "$enable_tcp_fastopen" in
yes|''|autodetect)
AC_EGREP_CPP(has_tfo, [
2016-08-12 15:31:33 +10:00
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
#ifdef TCP_FASTOPEN
int has_tfo() { return (0); }
#endif
],
2017-09-18 08:34:41 +02:00
[AC_MSG_RESULT(yes)
ISC_PLATFORM_HAVETFO="#define ISC_PLATFORM_HAVETFO 1"],
[AC_MSG_RESULT(no)
ISC_PLATFORM_HAVETFO="#undef ISC_PLATFORM_HAVETFO"])
;;
no)
AC_MSG_RESULT(disabled)
ISC_PLATFORM_HAVETFO="#undef ISC_PLATFORM_HAVETFO"
;;
esac
2016-08-12 15:31:33 +10:00
AC_SUBST(ISC_PLATFORM_HAVETFO)
2000-07-25 23:54:09 +00:00
#
# Check for addrinfo
#
AC_MSG_CHECKING(for struct addrinfo)
AC_TRY_COMPILE([
#include <netdb.h>],
[struct addrinfo a; return (0);],
[AC_MSG_RESULT(yes)
2009-09-01 00:22:28 +00:00
ISC_IRS_NEEDADDRINFO="#undef ISC_IRS_NEEDADDRINFO"
2000-07-25 23:54:09 +00:00
AC_DEFINE(HAVE_ADDRINFO)],
[AC_MSG_RESULT(no)
2009-09-01 00:22:28 +00:00
ISC_IRS_NEEDADDRINFO="#define ISC_IRS_NEEDADDRINFO 1"])
AC_SUBST(ISC_IRS_NEEDADDRINFO)
2000-07-25 23:54:09 +00:00
2009-09-01 00:22:28 +00:00
#
# Sadly, the definitions of system-supplied getnameinfo(3) vary. Try to catch
# known variations here:
#
AC_MSG_CHECKING(for getnameinfo prototype definitions)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int getnameinfo(const struct sockaddr *, socklen_t, char *,
2014-02-10 15:01:06 +11:00
socklen_t, char *, socklen_t, unsigned int);],
2009-09-01 00:22:28 +00:00
[ return (0);],
[AC_MSG_RESULT(socklen_t for buflen; u_int for flags)
2014-12-19 12:06:35 +11:00
AC_DEFINE(IRS_GETNAMEINFO_SOCKLEN_T, socklen_t,
[Define to the sockaddr length type used by getnameinfo(3).])
2009-10-27 22:25:37 +00:00
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t,
[Define to the buffer length type used by getnameinfo(3).])
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, unsigned int,
[Define to the flags type used by getnameinfo(3).])],
2009-09-01 00:22:28 +00:00
[AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int getnameinfo(const struct sockaddr *, socklen_t, char *,
2014-02-10 15:01:06 +11:00
size_t, char *, size_t, int);],
2009-09-01 00:22:28 +00:00
[ return (0);],
[AC_MSG_RESULT(size_t for buflen; int for flags)
2014-12-19 12:06:35 +11:00
AC_DEFINE(IRS_GETNAMEINFO_SOCKLEN_T, socklen_t)
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, size_t)
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)],
[AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int getnameinfo(const struct sockaddr *, size_t, char *,
size_t, char *, size_t, int);],
[ return (0);],
[AC_MSG_RESULT(size_t for buflen; int for flags)
AC_DEFINE(IRS_GETNAMEINFO_SOCKLEN_T, size_t)
2009-09-01 00:22:28 +00:00
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, size_t)
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)],
[AC_MSG_RESULT(not match any subspecies; assume standard definition)
2014-12-19 12:06:35 +11:00
AC_DEFINE(IRS_GETNAMEINFO_SOCKLEN_T, socklen_t)
2009-09-01 00:22:28 +00:00
AC_DEFINE(IRS_GETNAMEINFO_BUFLEN_T, socklen_t)
2014-12-19 12:06:35 +11:00
AC_DEFINE(IRS_GETNAMEINFO_FLAGS_T, int)])])])
2009-09-01 00:22:28 +00:00
2009-09-01 17:54:16 +00:00
#
# ...and same for gai_strerror().
#
AC_MSG_CHECKING(for gai_strerror prototype definitions)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
char *gai_strerror(int ecode);],
[ return (0); ],
[AC_MSG_RESULT(returning char *)
AC_DEFINE([IRS_GAISTRERROR_RETURN_T], [char *],
2009-11-03 23:17:31 +00:00
[return type of gai_strerror])],
[AC_MSG_RESULT(not match any subspecies; assume standard definition)
AC_DEFINE([IRS_GAISTRERROR_RETURN_T], [const char *])])
2009-09-01 17:54:16 +00:00
2017-09-08 13:39:09 -07:00
AC_CHECK_FUNC(getaddrinfo, AC_DEFINE(HAVE_GETADDRINFO))
2001-01-18 22:21:31 +00:00
AC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))
2009-09-01 00:22:28 +00:00
AC_SUBST(ISC_IRS_GETNAMEINFOSOCKLEN)
2000-07-25 23:54:09 +00:00
2003-04-01 05:18:22 +00:00
AC_ARG_ENABLE(getifaddrs,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-getifaddrs],
[enable the use of getifaddrs() [yes|no].]),
2003-04-01 05:18:22 +00:00
want_getifaddrs="$enableval", want_getifaddrs="yes")
2008-03-20 04:51:00 +00:00
#
# This interface iteration code for getifaddrs() will fall back to using
# /proc/net/if_inet6 if getifaddrs() in glibc doesn't return any IPv6
# addresses.
#
2003-04-01 05:18:22 +00:00
case $want_getifaddrs in
2008-03-20 04:51:00 +00:00
glibc)
AC_MSG_WARN("--enable-getifaddrs=glibc is no longer required")
AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
;;
yes)
AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
2003-04-01 05:18:22 +00:00
;;
no)
;;
esac
2000-07-25 23:54:09 +00:00
#
# Look for a sysctl call to get the list of network interfaces.
#
2002-10-15 04:32:50 +00:00
case $ac_cv_header_sys_sysctl_h in
yes)
2000-07-25 23:54:09 +00:00
AC_MSG_CHECKING(for interface list sysctl)
AC_EGREP_CPP(found_rt_iflist, [
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
#ifdef NET_RT_IFLIST
found_rt_iflist
#endif
],
[AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_IFLIST_SYSCTL)],
[AC_MSG_RESULT(no)])
2002-10-15 04:32:50 +00:00
;;
esac
2000-07-25 23:54:09 +00:00
#
2000-04-26 21:50:49 +00:00
# Check for some other useful functions that are not ever-present.
2000-07-25 23:54:09 +00:00
#
2001-12-03 21:52:07 +00:00
2003-06-24 05:11:53 +00:00
AC_CHECK_FUNC(memmove,
[ISC_PLATFORM_NEEDMEMMOVE="#undef ISC_PLATFORM_NEEDMEMMOVE"],
[ISC_PLATFORM_NEEDMEMMOVE="#define ISC_PLATFORM_NEEDMEMMOVE 1"])
AC_SUBST(ISC_PLATFORM_NEEDMEMMOVE)
AC_CHECK_FUNC(strtoul,
2005-06-08 02:09:18 +00:00
[ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL"
GENRANDOMLIB=""],
[ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1"
2006-07-20 03:31:11 +00:00
GENRANDOMLIB='${ISCLIBS}'])
2003-06-24 05:11:53 +00:00
AC_SUBST(ISC_PLATFORM_NEEDSTRTOUL)
2005-06-08 02:09:18 +00:00
AC_SUBST(GENRANDOMLIB)
2003-06-24 05:11:53 +00:00
2003-04-10 04:47:56 +00:00
AC_CHECK_FUNC(strlcpy,
2017-09-08 13:39:09 -07:00
[ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY"],
[ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1"])
2003-04-10 04:47:56 +00:00
AC_SUBST(ISC_PLATFORM_NEEDSTRLCPY)
AC_CHECK_FUNC(strlcat,
[ISC_PLATFORM_NEEDSTRLCAT="#undef ISC_PLATFORM_NEEDSTRLCAT"],
[ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1"])
AC_SUBST(ISC_PLATFORM_NEEDSTRLCAT)
2001-12-03 21:52:07 +00:00
2014-01-09 22:02:06 -08:00
AC_CHECK_FUNC(strcasestr,
[ISC_PLATFORM_NEEDSTRCASESTR="#undef ISC_PLATFORM_NEEDSTRCASESTR"],
[ISC_PLATFORM_NEEDSTRCASESTR="#define ISC_PLATFORM_NEEDSTRCASESTR 1"])
AC_SUBST(ISC_PLATFORM_NEEDSTRCASESTR)
2011-12-16 23:01:17 +00:00
2013-01-10 17:34:28 +11:00
AC_SUBST(READLINE_LIB)
2011-12-16 23:01:17 +00:00
AC_ARG_WITH(readline,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-readline[=LIBSPEC]],
[specify readline library [default auto]]),
use_readline="$withval", use_readline="auto")
2016-10-12 11:56:59 +11:00
case "$use_readline" in
2011-12-16 23:01:17 +00:00
no) ;;
2016-10-12 11:56:59 +11:00
*)
2015-04-17 15:27:47 -07:00
saved_LIBS="$LIBS"
2016-10-12 11:56:59 +11:00
case "$use_readline" in
yes|auto) try_readline="-ledit"; or_readline="-lreadline" ;;
*) try_readline="$use_readline"
esac
for readline in "$try_readline" $or_readline
2015-04-17 15:27:47 -07:00
do
2016-10-12 11:56:59 +11:00
LIBS="$readline"
AC_MSG_NOTICE(checking for readline with $readline)
2015-04-17 15:27:47 -07:00
AC_CHECK_FUNCS(readline)
2016-10-20 10:26:05 +11:00
if test "yes" = "$ac_cv_func_readline"
2015-04-17 15:27:47 -07:00
then
2016-10-12 11:56:59 +11:00
READLINE_LIB="$readline"
2015-04-17 15:27:47 -07:00
break
fi
for lib in -lterminfo -ltermcap -lncurses -lcurses
do
2016-10-12 11:56:59 +11:00
AC_MSG_NOTICE(checking for readline with $readline $lib)
2015-04-17 15:27:47 -07:00
unset ac_cv_func_readline
2016-10-12 11:56:59 +11:00
LIBS="$readline $lib"
2015-04-17 15:27:47 -07:00
AC_CHECK_FUNCS(readline)
2016-10-20 10:26:05 +11:00
if test "yes" = "$ac_cv_func_readline"
2015-04-17 15:27:47 -07:00
then
2016-10-12 11:56:59 +11:00
READLINE_LIB="$readline $lib"
2015-04-17 15:27:47 -07:00
break
fi
done
2016-10-20 10:26:05 +11:00
if test "yes" = "$ac_cv_func_readline"
2016-04-14 13:46:15 -07:00
then
break
fi
2015-04-17 15:27:47 -07:00
done
2017-07-19 15:53:01 +10:00
if test "auto" != "$use_readline" &&
2016-10-12 11:56:59 +11:00
test "X$READLINE_LIB" = "X"
2016-10-11 15:15:56 +11:00
then
AC_MSG_ERROR([The readline library was not found.])
fi
2013-01-10 17:34:28 +11:00
LIBS="$saved_LIBS"
2014-02-10 15:01:06 +11:00
;;
2011-12-16 23:01:17 +00:00
esac
2017-07-19 15:53:01 +10:00
if test "yes" = "$ac_cv_func_readline"
2016-10-27 15:48:51 +11:00
then
case "$READLINE_LIB" in
*edit*)
AC_CHECK_HEADERS(editline/readline.h)
2016-11-18 11:12:42 -08:00
AC_CHECK_HEADERS(edit/readline/readline.h)
AC_CHECK_HEADERS(edit/readline/history.h)
2016-10-27 15:48:51 +11:00
;;
esac
AC_CHECK_HEADERS(readline/readline.h)
AC_CHECK_HEADERS(readline/history.h)
fi
2011-12-16 23:01:17 +00:00
2003-06-24 06:24:44 +00:00
ISC_PRINT_OBJS=
ISC_PRINT_SRCS=
2015-05-22 22:12:42 +10:00
ISC_PLATFORM_NEEDPRINTF='#undef ISC_PLATFORM_NEEDPRINTF'
ISC_PLATFORM_NEEDFPRINTF='#undef ISC_PLATFORM_NEEDFPRINTF'
ISC_PLATFORM_NEEDSPRINTF='#undef ISC_PLATFORM_NEEDSPRINTF'
ISC_PLATFORM_NEEDVSNPRINTF='#undef ISC_PLATFORM_NEEDVSNPRINTF'
AC_MSG_CHECKING(sprintf return type)
2003-06-24 06:24:44 +00:00
AC_TRY_COMPILE([
#include <stdio.h>
],
[ char buf[2]; return(*sprintf(buf,"x"));],
2015-05-22 22:12:42 +10:00
[AC_MSG_RESULT(char *)
2003-06-24 06:24:44 +00:00
ISC_PRINT_OBJS="print.$O"
ISC_PRINT_SRCS="print.c"
ISC_PLATFORM_NEEDSPRINTF="#define ISC_PLATFORM_NEEDSPRINTF"
2015-05-22 22:12:42 +10:00
],[AC_MSG_RESULT(int)])
2003-06-24 06:24:44 +00:00
2015-05-22 22:12:42 +10:00
AC_CHECK_FUNC(vsnprintf, [],
2003-06-24 06:28:14 +00:00
[ISC_PRINT_OBJS="print.$O"
ISC_PRINT_SRCS="print.c"
2017-09-08 13:39:09 -07:00
ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"])
2015-05-22 22:12:42 +10:00
AC_MSG_CHECKING(printf for %z support)
AC_TRY_RUN([
#include <stdio.h>
main() {
2017-11-13 11:36:45 +11:00
size_t j = 0;
char buf[100];
buf[0] = 0;
sprintf(buf, "%zu", j);
exit(strcmp(buf, "0") != 0);
2015-05-22 22:12:42 +10:00
}
],
2017-11-13 11:36:45 +11:00
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
2015-05-22 22:12:42 +10:00
ISC_PRINT_OBJS="print.$O"
ISC_PRINT_SRCS="print.c"
2017-11-13 11:36:45 +11:00
ISC_PLATFORM_NEEDPRINTF='#define ISC_PLATFORM_NEEDPRINTF 1'
ISC_PLATFORM_NEEDFPRINTF='#define ISC_PLATFORM_NEEDFPRINTF 1'
ISC_PLATFORM_NEEDFSRINTF='#define ISC_PLATFORM_NEEDSPRINTF 1'
2017-09-08 13:39:09 -07:00
ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"],
2017-11-13 11:36:45 +11:00
[AC_MSG_RESULT(assuming target platform supports %z)])
2015-05-22 22:12:42 +10:00
AC_SUBST(ISC_PLATFORM_NEEDPRINTF)
AC_SUBST(ISC_PLATFORM_NEEDFPRINTF)
AC_SUBST(ISC_PLATFORM_NEEDSPRINTF)
1999-10-05 19:52:30 +00:00
AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
2015-05-22 22:12:42 +10:00
2003-06-24 06:24:44 +00:00
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS $ISC_PRINT_OBJS"
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS $ISC_PRINT_SRCS"
1999-07-13 20:12:47 +00:00
AC_SUBST(ISC_EXTRA_OBJS)
AC_SUBST(ISC_EXTRA_SRCS)
2000-04-26 21:50:49 +00:00
2015-05-22 22:12:42 +10:00
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR))
2006-12-04 01:54:53 +00:00
#
# Use our own SPNEGO implementation?
#
AC_ARG_ENABLE(isc-spnego,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--disable-isc-spnego],
[use SPNEGO from GSSAPI library]))
2006-12-04 01:54:53 +00:00
if test -n "$USE_GSSAPI"
then
case "$enable_isc_spnego" in
yes|'')
USE_ISC_SPNEGO='-DUSE_ISC_SPNEGO'
DST_EXTRA_OBJS="$DST_EXTRA_OBJS spnego.$O"
DST_EXTRA_SRCS="$DST_EXTRA_SRCS spnego.c"
AC_MSG_RESULT(using SPNEGO from lib/dns)
;;
no)
AC_MSG_RESULT(using SPNEGO from GSSAPI library)
;;
esac
fi
AC_SUBST(USE_ISC_SPNEGO)
AC_SUBST(DST_EXTRA_OBJS)
AC_SUBST(DST_EXTRA_SRCS)
2001-02-27 02:22:17 +00:00
# Determine the printf format characters to use when printing
2004-07-01 00:22:29 +00:00
# values of type isc_int64_t. This will normally be "ll", but where
# the compiler treats "long long" as a alias for "long" and printf
# doesn't know about "long long" use "l". Hopefully the sprintf
2009-01-17 09:35:58 +00:00
# will produce a inconsistent result in the later case. If the compiler
2004-07-01 00:22:29 +00:00
# fails due to seeing "%lld" we fall back to "l".
#
2005-05-06 02:12:48 +00:00
# Digital Unix 4.0 (gcc?) (long long) is 64 bits as is its long. It uses
# %ld even for (long long)/
#
2004-07-01 00:22:29 +00:00
# Win32 uses "%I64d", but that's defined elsewhere since we don't use
# configure on Win32.
2001-02-27 02:22:17 +00:00
#
AC_MSG_CHECKING(printf format modifier for 64-bit integers)
2004-07-01 00:22:29 +00:00
AC_TRY_RUN([
#include <stdio.h>
main() {
long long int j = 0;
char buf[100];
buf[0] = 0;
sprintf(buf, "%lld", j);
exit((sizeof(long long int) != sizeof(long int))? 0 :
(strcmp(buf, "0") != 0));
}
],
2001-02-27 02:22:17 +00:00
[AC_MSG_RESULT(ll)
2017-09-08 13:39:09 -07:00
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'],
2004-07-01 00:22:29 +00:00
[AC_MSG_RESULT(l)
2017-09-08 13:39:09 -07:00
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'],
2001-07-14 01:44:44 +00:00
[AC_MSG_RESULT(assuming target platform uses ll)
2017-09-08 13:39:09 -07:00
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'])
2001-02-27 02:22:17 +00:00
AC_SUBST(ISC_PLATFORM_QUADFORMAT)
1999-10-07 19:32:08 +00:00
2015-05-21 14:55:15 -07:00
2000-02-11 18:35:11 +00:00
#
# Security Stuff
#
2008-12-01 03:53:32 +00:00
# Note it is very recommended to *not* disable chroot(),
# this is only because chroot() was made obsolete by Posix.
2017-11-13 11:36:45 +11:00
AC_ARG_ENABLE(chroot, AS_HELP_STRING([--disable-chroot], [disable chroot]))
2008-12-01 03:53:32 +00:00
case "$enable_chroot" in
yes|'')
AC_CHECK_FUNCS(chroot)
;;
no)
;;
esac
2001-07-17 22:26:43 +00:00
AC_ARG_ENABLE(linux-caps,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--disable-linux-caps],
[disable linux capabilities]))
2001-07-17 22:26:43 +00:00
case "$enable_linux_caps" in
yes|'')
2013-07-10 20:44:58 -07:00
AC_CHECK_HEADERS(linux/types.h)
2013-09-26 15:26:43 +10:00
AC_CHECK_HEADERS([sys/capability.h])
AC_CHECK_HEADERS([linux/capability.h], [], [],
2013-07-10 20:44:58 -07:00
[#ifdef HAVE_LINUX_TYPES_H
#include <linux/types.h>
#endif
])
2008-05-06 01:31:11 +00:00
AC_CHECK_LIB(cap, cap_set_proc)
2001-07-17 22:26:43 +00:00
;;
no)
;;
esac
2001-02-24 23:05:09 +00:00
AC_CHECK_HEADERS(sys/prctl.h)
1999-10-07 19:32:08 +00:00
2005-02-23 01:09:23 +00:00
AC_CHECK_HEADERS(sys/un.h,
ISC_PLATFORM_HAVESYSUNH="#define ISC_PLATFORM_HAVESYSUNH 1"
,
ISC_PLATFORM_HAVESYSUNH="#undef ISC_PLATFORM_HAVESYSUNH"
)
AC_SUBST(ISC_PLATFORM_HAVESYSUNH)
case "$host" in
*-solaris*)
AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
[Define if connect does not honour the permission on the UNIX domain socket.])
;;
*-sunos*)
AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
[Define if connect does not honour the permission on the UNIX domain socket.])
;;
esac
2004-01-07 05:48:15 +00:00
#
# Time Zone Stuff
#
AC_CHECK_FUNC(tzset, AC_DEFINE(HAVE_TZSET))
2009-01-17 09:35:58 +00:00
AC_MSG_CHECKING(for optarg declaration)
2005-06-08 02:09:18 +00:00
AC_TRY_COMPILE([
#include <unistd.h>
],
[optarg = 0;],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
2006-01-05 00:30:34 +00:00
GEN_NEED_OPTARG="-DNEED_OPTARG=1"
2005-06-08 02:09:18 +00:00
AC_DEFINE(NEED_OPTARG, 1, [Defined if extern char *optarg is not declared.])])
2016-05-05 12:22:26 -07:00
#
# Check for nanoseconds in file stats
#
AC_MSG_CHECKING(st_mtim.tv_nsec)
AC_TRY_COMPILE([#include <sys/fcntl.h>],[struct stat s; return(s.st_mtim.tv_nsec);],
[AC_MSG_RESULT(yes)
2017-11-13 11:36:45 +11:00
ISC_PLATFORM_HAVESTATNSEC="#define ISC_PLATFORM_HAVESTATNSEC 1"],
2016-05-05 12:22:26 -07:00
[AC_MSG_RESULT(no)
2017-11-13 11:36:45 +11:00
ISC_PLATFORM_HAVESTATNSEC="#undef ISC_PLATFORM_HAVESTATNSEC"])
2016-05-05 12:22:26 -07:00
AC_SUBST(ISC_PLATFORM_HAVESTATNSEC)
2000-04-28 00:32:19 +00:00
#
2000-12-23 02:46:34 +00:00
# BSD/OS, and perhaps some others, don't define rlim_t.
#
AC_MSG_CHECKING(for type rlim_t)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>],
[rlim_t rl = 19671212; return (0);],
2001-07-14 01:44:44 +00:00
[AC_MSG_RESULT(yes)
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t"],
[AC_MSG_RESULT(no)
AC_MSG_CHECKING(type of rlim_cur)
2001-01-23 04:58:57 +00:00
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}],
[AC_MSG_RESULT(int)
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"],
[
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
main() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}],
[AC_MSG_RESULT(long int)
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"],
[
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
main() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}],
[AC_MSG_RESULT(long long int)
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"],
[AC_MSG_ERROR([unable to determine sizeof rlim_cur])
2001-07-14 01:44:44 +00:00
],[AC_MSG_ERROR(this cannot happen)])
],[AC_MSG_ERROR(this cannot happen)])
2005-10-11 22:34:09 +00:00
],[
2011-05-05 18:09:39 +00:00
AC_ARG_WITH(rlimtype, , rlimtype="$withval", rlimtype="long long int")
ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE $rlimtype"
AC_MSG_RESULT(cannot determine type of rlim_cur when cross compiling - assuming $rlimtype)])
2001-07-14 01:44:44 +00:00
])
2001-01-23 04:58:57 +00:00
AC_SUBST(ISC_PLATFORM_RLIMITTYPE)
2001-01-23 18:08:15 +00:00
2008-08-05 07:05:47 +00:00
#
# Older HP-UX doesn't have gettune
#
case "$host" in
2014-02-10 15:01:06 +11:00
*-hp-hpux*)
2008-08-05 07:05:47 +00:00
AC_CHECK_HEADERS(sys/dyntune.h)
;;
*)
;;
esac
2002-06-07 00:03:50 +00:00
#
# Compaq TruCluster requires more code for handling cluster IP aliases
#
case "$host" in
*-dec-osf*)
AC_CHECK_LIB(clua, clua_getaliasaddress, LIBS="-lclua $LIBS")
AC_CHECK_FUNC(clua_getaliasaddress,
AC_DEFINE(HAVE_TRUCLUSTER, 1,
[Define if running under Compaq TruCluster]))
;;
*)
;;
esac
2006-02-02 23:07:53 +00:00
#
2006-02-26 22:57:18 +00:00
# Some hosts need msg_namelen to match the size of the socket structure.
2006-02-02 23:07:53 +00:00
# Some hosts don't set msg_namelen appropriately on return from recvmsg().
#
case $host in
*os2*|*hp-mpeix*)
AC_DEFINE(BROKEN_RECVMSG, 1,
[Define if recvmsg() does not meet all of the BSD socket API specifications.])
;;
esac
2001-07-11 05:32:55 +00:00
#
# Microsoft has their own way of handling shared libraries that requires
# additional qualifiers on extern variables. Unix systems don't need it.
#
AC_SUBST(ISC_PLATFORM_USEDECLSPEC)
ISC_PLATFORM_USEDECLSPEC="#undef ISC_PLATFORM_USEDECLSPEC"
2009-09-01 00:22:28 +00:00
AC_SUBST(IRS_PLATFORM_USEDECLSPEC)
IRS_PLATFORM_USEDECLSPEC="#undef IRS_PLATFORM_USEDECLSPEC"
2001-07-11 05:32:55 +00:00
2000-12-23 02:46:34 +00:00
#
# Random remaining OS-specific issues involving compiler warnings.
2000-06-06 16:06:50 +00:00
# XXXDCL print messages to indicate some compensation is being done?
2000-04-28 00:32:19 +00:00
#
2000-06-06 16:06:50 +00:00
AC_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT)
ISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT"
2000-04-28 00:32:19 +00:00
case "$host" in
2006-06-20 06:56:43 +00:00
*-aix5.[[123]].*)
2004-11-30 01:12:52 +00:00
hack_shutup_pthreadonceinit=yes
;;
2000-06-06 16:06:50 +00:00
*-bsdi3.1*)
hack_shutup_sputaux=yes
;;
*-bsdi4.0*)
hack_shutup_sigwait=yes
hack_shutup_sputaux=yes
;;
2001-10-02 17:23:52 +00:00
[*-bsdi4.[12]*])
2000-06-06 16:06:50 +00:00
hack_shutup_stdargcast=yes
;;
2002-08-08 09:16:19 +00:00
[*-solaris2.[89]])
2000-06-06 16:06:50 +00:00
hack_shutup_pthreadonceinit=yes
;;
2008-08-05 07:05:47 +00:00
*-solaris2.1[[0-9]])
2008-12-08 04:50:52 +00:00
AC_TRY_COMPILE([ #include <pthread.h> ], [ static pthread_once_t once_test = { PTHREAD_ONCE_INIT }; ], [hack_shutup_pthreadonceinit=yes], )
2006-11-09 23:57:58 +00:00
;;
2000-06-06 16:06:50 +00:00
esac
case "$hack_shutup_pthreadonceinit" in
yes)
#
# Shut up PTHREAD_ONCE_INIT unbraced initializer warnings.
#
ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1"
;;
esac
case "$hack_shutup_sigwait" in
yes)
#
# Shut up a -Wmissing-prototypes warning for sigwait().
2000-08-01 01:33:37 +00:00
#
2000-06-06 16:06:50 +00:00
AC_DEFINE(SHUTUP_SIGWAIT)
;;
esac
case "$hack_shutup_sputaux" in
yes)
#
# Shut up a -Wmissing-prototypes warning from <stdio.h>.
#
2000-04-28 00:32:19 +00:00
AC_DEFINE(SHUTUP_SPUTAUX)
;;
2000-06-06 16:06:50 +00:00
esac
case "$hack_shutup_stdargcast" in
yes)
#
# Shut up a -Wcast-qual warning from va_start().
#
AC_DEFINE(SHUTUP_STDARG_CAST)
;;
2000-04-28 00:32:19 +00:00
esac
2007-09-13 04:45:18 +00:00
AC_CHECK_HEADERS(strings.h,
ISC_PLATFORM_HAVESTRINGSH="#define ISC_PLATFORM_HAVESTRINGSH 1"
,
ISC_PLATFORM_HAVESTRINGSH="#undef ISC_PLATFORM_HAVESTRINGSH"
)
AC_SUBST(ISC_PLATFORM_HAVESTRINGSH)
2002-11-26 03:53:42 +00:00
#
# Check for if_nametoindex() for IPv6 scoped addresses support
#
AC_CHECK_FUNC(if_nametoindex, ac_cv_have_if_nametoindex=yes,
ac_cv_have_if_nametoindex=no)
case $ac_cv_have_if_nametoindex in
no)
case "$host" in
2006-12-04 01:54:53 +00:00
*-hp-hpux*)
AC_CHECK_LIB(ipv6, if_nametoindex,
2002-11-26 03:53:42 +00:00
ac_cv_have_if_nametoindex=yes
LIBS="-lipv6 $LIBS",)
2006-12-04 01:54:53 +00:00
;;
2002-11-26 03:53:42 +00:00
esac
esac
case $ac_cv_have_if_nametoindex in
yes)
ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1"
2014-10-08 15:14:02 +02:00
AC_DEFINE(HAVE_IF_NAMETOINDEX, 1,
[Define to 1 if you have the if_nametoindex function.])
2002-11-26 03:53:42 +00:00
;;
*)
ISC_PLATFORM_HAVEIFNAMETOINDEX="#undef ISC_PLATFORM_HAVEIFNAMETOINDEX"
;;
esac
AC_SUBST(ISC_PLATFORM_HAVEIFNAMETOINDEX)
2017-09-19 16:16:45 +05:30
AC_CHECK_FUNCS(nanosleep usleep explicit_bzero)
2008-12-01 03:53:32 +00:00
2005-06-04 05:32:50 +00:00
#
# Machine architecture dependent features
#
2017-11-07 13:27:14 -08:00
have_stdatomic=no
2018-01-22 13:35:29 +05:30
AC_MSG_CHECKING(for usable stdatomic.h)
AC_TRY_COMPILE([
#include <stdio.h>
#include <stdatomic.h>
],
[
atomic_int_fast32_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed);
],
[AC_MSG_RESULT(yes)
have_stdatomic=yes
ISC_PLATFORM_HAVESTDATOMIC="#define ISC_PLATFORM_HAVESTDATOMIC 1"],
[AC_MSG_RESULT(no)
have_stdatomic=no
ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC"])
2017-09-19 15:42:54 +05:30
2005-06-04 05:32:50 +00:00
AC_ARG_ENABLE(atomic,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-atomic],
[enable machine specific atomic operations [default=autodetect]]),
2005-06-04 05:32:50 +00:00
enable_atomic="$enableval",
enable_atomic="autodetect")
case "$enable_atomic" in
yes|''|autodetect)
2009-10-16 04:10:06 +00:00
case "$host" in
powerpc-ibm-aix*)
if test "X$GCC" = "Xyes"; then
2017-07-07 17:32:36 +05:30
AC_MSG_CHECKING([if asm("ics"); works])
2009-10-16 04:10:06 +00:00
AC_TRY_COMPILE(,[
main() { asm("ics"); exit(0); }
],
[AC_MSG_RESULT(yes)
use_atomic=yes],
[
saved_cflags="$CFLAGS"
CFLAGS="$CFLAGS -Wa,-many"
AC_TRY_RUN([
main() { asm("ics"); exit(0); }
],
[AC_MSG_RESULT([yes, required -Wa,-many])
use_atomic=yes],
[AC_MSG_RESULT([no, use_atomic disabled])
CFLAGS="$saved_cflags"
use_atomic=no],
[AC_MSG_RESULT([cross compile, assume yes])
CFLAGS="$saved_cflags"
use_atomic=yes])
]
)
2010-05-26 23:44:27 +00:00
else
use_atomic=yes
2009-10-16 04:10:06 +00:00
fi
;;
*)
use_atomic=yes
;;
esac
2005-06-04 05:32:50 +00:00
;;
no)
2017-11-13 11:36:45 +11:00
have_stdatomic=no
2017-09-19 15:42:54 +05:30
ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC"
2005-06-04 05:32:50 +00:00
use_atomic=no
2005-07-05 00:44:24 +00:00
arch=noatomic
2005-06-04 05:32:50 +00:00
;;
esac
2017-11-07 13:27:14 -08:00
if test "X$have_stdatomic" = "Xyes"; then
AC_MSG_CHECKING(if -latomic is needed to use 64-bit stdatomic.h primitives)
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <stdatomic.h>],
[atomic_int_fast64_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed);])],
[AC_MSG_RESULT(no)
ISC_ATOMIC_LIBS=""],
[AC_MSG_RESULT(yes)
ISC_ATOMIC_LIBS="-latomic"]
)
LIBS="$LIBS $ISC_ATOMIC_LIBS"
fi
2017-09-19 15:42:54 +05:30
AC_SUBST(ISC_PLATFORM_HAVESTDATOMIC)
2005-06-04 05:32:50 +00:00
ISC_PLATFORM_USEOSFASM="#undef ISC_PLATFORM_USEOSFASM"
2015-03-09 23:07:09 +11:00
ISC_PLATFORM_USEGCCASM="#undef ISC_PLATFORM_USEGCCASM"
ISC_PLATFORM_USESTDASM="#undef ISC_PLATFORM_USESTDASM"
ISC_PLATFORM_USEMACASM="#undef ISC_PLATFORM_USEMACASM"
2016-10-20 10:26:05 +11:00
if test "yes" = "$use_atomic"; then
2017-09-12 19:05:46 -07:00
AC_CHECK_SIZEOF([void *])
2005-07-27 04:22:59 +00:00
have_atomic=yes # set default
2005-06-04 05:32:50 +00:00
case "$host" in
2005-07-27 04:22:59 +00:00
[i[3456]86-*])
2005-07-09 07:09:26 +00:00
# XXX: some old x86 architectures actually do not support
2005-06-04 05:32:50 +00:00
# (some of) these operations. Do we need stricter checks?
2011-05-05 18:09:39 +00:00
if test $ac_cv_sizeof_void_p = 8; then
arch=x86_64
have_xaddq=yes
else
arch=x86_32
fi
2005-07-27 04:22:59 +00:00
;;
2008-12-05 02:02:12 +00:00
x86_64-*|amd64-*)
2011-05-05 18:09:39 +00:00
if test $ac_cv_sizeof_void_p = 8; then
arch=x86_64
have_xaddq=yes
else
arch=x86_32
fi
2005-06-04 05:32:50 +00:00
;;
alpha*-*)
arch=alpha
;;
2010-09-13 07:06:05 +00:00
powerpc-*|powerpc64-*)
2005-09-01 03:36:18 +00:00
arch=powerpc
2005-07-05 00:44:24 +00:00
;;
2007-02-14 23:28:17 +00:00
mips-*|mipsel-*|mips64-*|mips64el-*)
2005-07-09 07:09:26 +00:00
arch=mips
;;
2006-06-21 03:40:34 +00:00
ia64-*)
arch=ia64
;;
2005-06-04 05:32:50 +00:00
*)
have_atomic=no
arch=noatomic
;;
esac
2016-03-04 11:12:23 +05:30
AC_MSG_CHECKING([architecture type for atomic operations])
2005-06-04 05:32:50 +00:00
AC_MSG_RESULT($arch)
fi
2016-10-20 10:26:05 +11:00
if test "yes" = "$have_atomic"; then
2005-06-16 21:58:00 +00:00
AC_MSG_CHECKING([compiler support for inline assembly code])
compiler=generic
2005-09-01 03:36:18 +00:00
# Check whether the compiler supports the assembly syntax we provide.
2005-06-16 21:58:00 +00:00
if test "X$GCC" = "Xyes"; then
# GCC's ASM extension always works
compiler=gcc
2005-07-27 04:22:59 +00:00
if test $arch = "x86_64"; then
# We can share the same code for gcc with x86_32
arch=x86_32
fi
2007-02-12 00:50:01 +00:00
if test $arch = "powerpc"; then
#
# The MacOS (and maybe others) uses "r0" for register
# zero. Under linux/ibm it is "0" for register 0.
# Probe to see if we have a MacOS style assembler.
#
AC_MSG_CHECKING([Checking for MacOS style assembler syntax])
AC_TRY_COMPILE(, [
__asm__ volatile ("li r0, 0x0\n"::);
], [
AC_MSG_RESULT(yes)
compiler="mac"
ISC_PLATFORM_USEMACASM="#define ISC_PLATFORM_USEMACASM 1"
], [AC_MSG_RESULT(no)])
fi
2005-06-16 21:58:00 +00:00
else
case "$host" in
alpha*-dec-osf*)
# Tru64 compiler has its own syntax for inline
# assembly.
AC_TRY_COMPILE(, [
#ifndef __DECC
#error "unexpected compiler"
#endif
return (0);],
[compiler=osf],)
;;
2005-09-01 03:36:18 +00:00
powerpc-ibm-aix*)
compiler=aix
;;
2005-06-16 21:58:00 +00:00
esac
fi
case "$compiler" in
gcc)
ISC_PLATFORM_USEGCCASM="#define ISC_PLATFORM_USEGCCASM 1"
;;
osf)
ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1"
;;
2005-09-01 03:36:18 +00:00
aix)
;;
2007-02-12 00:50:01 +00:00
mac)
;;
2005-06-16 21:58:00 +00:00
*)
# See if the generic __asm function works. If not,
# we need to disable the atomic operations.
AC_TRY_LINK(, [
__asm("nop")
],
[compiler="standard"
ISC_PLATFORM_USESTDASM="#define ISC_PLATFORM_USESTDASM 1"],
[compiler="not supported (atomic operations disabled)"
have_atomic=no
arch=noatomic ]);
;;
esac
AC_MSG_RESULT($compiler)
fi
2016-10-20 10:26:05 +11:00
if test "yes" = "$have_atomic"; then
2005-06-04 05:32:50 +00:00
ISC_PLATFORM_HAVEXADD="#define ISC_PLATFORM_HAVEXADD 1"
ISC_PLATFORM_HAVECMPXCHG="#define ISC_PLATFORM_HAVECMPXCHG 1"
ISC_PLATFORM_HAVEATOMICSTORE="#define ISC_PLATFORM_HAVEATOMICSTORE 1"
2016-10-20 10:26:05 +11:00
if test "yes" = "$have_xaddq"; then
2015-03-09 23:07:09 +11:00
ISC_PLATFORM_HAVEXADDQ="#define ISC_PLATFORM_HAVEXADDQ 1"
2015-10-28 22:19:18 -07:00
ISC_PLATFORM_HAVEATOMICSTOREQ="#define ISC_PLATFORM_HAVEATOMICSTOREQ 1"
2015-03-09 23:07:09 +11:00
else
ISC_PLATFORM_HAVEXADDQ="#undef ISC_PLATFORM_HAVEXADDQ"
2015-10-28 22:19:18 -07:00
ISC_PLATFORM_HAVEATOMICSTOREQ="#undef ISC_PLATFORM_HAVEATOMICSTOREQ"
2015-03-09 23:07:09 +11:00
fi
2005-06-04 05:32:50 +00:00
else
ISC_PLATFORM_HAVEXADD="#undef ISC_PLATFORM_HAVEXADD"
ISC_PLATFORM_HAVECMPXCHG="#undef ISC_PLATFORM_HAVECMPXCHG"
ISC_PLATFORM_HAVEATOMICSTORE="#undef ISC_PLATFORM_HAVEATOMICSTORE"
2009-08-13 01:51:19 +00:00
ISC_PLATFORM_HAVEXADDQ="#undef ISC_PLATFORM_HAVEXADDQ"
2015-10-28 22:19:18 -07:00
ISC_PLATFORM_HAVEATOMICSTOREQ="#undef ISC_PLATFORM_HAVEATOMICSTOREQ"
2008-01-24 02:00:44 +00:00
fi
2005-06-04 05:32:50 +00:00
AC_SUBST(ISC_PLATFORM_HAVEXADD)
2008-01-24 02:00:44 +00:00
AC_SUBST(ISC_PLATFORM_HAVEXADDQ)
2005-06-04 05:32:50 +00:00
AC_SUBST(ISC_PLATFORM_HAVECMPXCHG)
AC_SUBST(ISC_PLATFORM_HAVEATOMICSTORE)
2015-10-28 22:19:18 -07:00
AC_SUBST(ISC_PLATFORM_HAVEATOMICSTOREQ)
2005-06-16 21:58:00 +00:00
AC_SUBST(ISC_PLATFORM_USEGCCASM)
2005-06-04 05:32:50 +00:00
AC_SUBST(ISC_PLATFORM_USEOSFASM)
2005-06-16 21:58:00 +00:00
AC_SUBST(ISC_PLATFORM_USESTDASM)
2007-02-12 00:50:01 +00:00
AC_SUBST(ISC_PLATFORM_USEMACASM)
2005-06-04 05:32:50 +00:00
ISC_ARCH_DIR=$arch
AC_SUBST(ISC_ARCH_DIR)
2016-02-01 08:59:49 +05:30
#
# Check for __builtin_expect
#
AC_MSG_CHECKING([compiler support for __builtin_expect])
AC_TRY_LINK(, [
2017-11-13 11:36:45 +11:00
return (__builtin_expect(1, 1) ? 1 : 0);
2016-02-01 08:59:49 +05:30
], [
2017-11-13 11:36:45 +11:00
have_builtin_expect=yes
AC_MSG_RESULT(yes)
2016-02-01 08:59:49 +05:30
], [
2017-11-13 11:36:45 +11:00
have_builtin_expect=no
AC_MSG_RESULT(no)
2016-02-01 08:59:49 +05:30
])
2016-10-20 10:26:05 +11:00
if test "yes" = "$have_builtin_expect"; then
2017-11-13 11:36:45 +11:00
AC_DEFINE(HAVE_BUILTIN_EXPECT, 1, [Define to 1 if the compiler supports __builtin_expect.])
2016-02-01 08:59:49 +05:30
fi
2016-07-10 19:46:17 +05:30
#
# Check for __builtin_clz
#
AC_MSG_CHECKING([compiler support for __builtin_clz])
AC_TRY_LINK(, [
2017-11-13 11:36:45 +11:00
return (__builtin_clz(0xff) == 24 ? 1 : 0);
2016-07-10 19:46:17 +05:30
], [
2017-11-13 11:36:45 +11:00
have_builtin_clz=yes
AC_MSG_RESULT(yes)
2016-07-10 19:46:17 +05:30
], [
2017-11-13 11:36:45 +11:00
have_builtin_clz=no
AC_MSG_RESULT(no)
2016-07-10 19:46:17 +05:30
])
2016-10-20 10:26:05 +11:00
if test "yes" = "$have_builtin_clz"; then
2017-11-13 11:36:45 +11:00
AC_DEFINE(HAVE_BUILTIN_CLZ, 1, [Define to 1 if the compiler supports __builtin_clz.])
2016-07-10 19:46:17 +05:30
fi
2016-03-22 17:59:21 -07:00
#
# CPU relax (for spin locks)
#
if $use_threads
then
case "$host" in
[i[3456]86-*])
# x86_32
AC_MSG_CHECKING([if asm("rep; nop"); works])
AC_TRY_COMPILE(,[asm("rep; nop");],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"rep; nop\")"],
[AC_MSG_RESULT(no)],
[AC_MSG_RESULT([cross compile, assume yes])
ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"rep; nop\")"])
;;
x86_64-*|amd64-*)
# x86_64
AC_MSG_CHECKING([if asm("rep; nop"); works])
AC_TRY_COMPILE(,[asm("rep; nop");],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"rep; nop\")"],
[AC_MSG_RESULT(no)],
[AC_MSG_RESULT([cross compile, assume yes])
ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"rep; nop\")"])
;;
ia64-*)
# ia64
AC_MSG_CHECKING([if asm("hint @pause"); works])
AC_TRY_COMPILE(,[asm("hint @pause");],
[AC_MSG_RESULT(yes)
ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"hint @pause\")"],
[AC_MSG_RESULT(no)],
[AC_MSG_RESULT([cross compile, assume yes])
ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP asm(\"hint @pause\")"])
;;
sparc-*)
# sparc
AC_MSG_CHECKING([if cpu_relax(); or __cpu_relax(); works])
AC_CHECK_FUNC(cpu_relax,
[AC_MSG_RESULT(yes)
ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP cpu_relax()"],
[AC_CHECK_FUNC(__cpu_relax,
[AC_MSG_RESULT(yes)
ISC_PLATFORM_BUSYWAITNOP="#define ISC_PLATFORM_BUSYWAITNOP __cpu_relax()"],
[AC_MSG_RESULT(no)])])
;;
esac
fi
AC_SUBST(ISC_PLATFORM_BUSYWAITNOP)
2008-04-23 21:32:57 +00:00
#
# Activate "rrset-order fixed" or not?
#
AC_ARG_ENABLE(fixed-rrset,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-fixed-rrset],
[enable fixed rrset ordering [default=no]]),
enable_fixed="$enableval", enable_fixed="no")
2008-04-23 21:32:57 +00:00
case "$enable_fixed" in
yes)
AC_DEFINE(DNS_RDATASET_FIXED, 1,
2009-08-13 01:51:19 +00:00
[Define to enable "rrset-order fixed" syntax.])
2008-04-23 21:32:57 +00:00
;;
no)
;;
*)
;;
esac
2011-01-13 01:59:28 +00:00
#
# Enable response policy rewriting using NS IP addresses
#
AC_ARG_ENABLE(rpz-nsip,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--disable-rpz-nsip],
[disable rpz nsip rules [default=enabled]]),
enable_nsip="$enableval", enable_nsip="yes")
2011-01-13 01:59:28 +00:00
case "$enable_nsip" in
yes)
AC_DEFINE(ENABLE_RPZ_NSIP, 1,
2017-09-11 11:53:42 -07:00
[Define to enable rpz nsip rules.])
2011-01-13 01:59:28 +00:00
;;
no)
;;
*)
;;
esac
#
# Enable response policy rewriting using NS name
#
AC_ARG_ENABLE(rpz-nsdname,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--disable-rpz-nsdname],
[disable rpz nsdname rules [default=enabled]]),
enable_nsdname="$enableval", enable_nsdname="yes")
2011-01-13 01:59:28 +00:00
case "$enable_nsdname" in
yes)
AC_DEFINE(ENABLE_RPZ_NSDNAME, 1,
2017-09-11 11:53:42 -07:00
[Define to enable rpz nsdname rules.])
2011-01-13 01:59:28 +00:00
;;
no)
;;
*)
;;
esac
2017-09-11 11:53:42 -07:00
#
# Response policy rewriting using DNS Response Policy Service (DNSRPS)
# interface.
#
# DNSRPS can be compiled into BIND everywhere with a reasonably
# modern C compiler. It is enabled on systems with dlopen() and librpz.so.
#
dnsrps_avail=yes
AC_MSG_CHECKING([for librpz __attribute__s])
AC_TRY_COMPILE(,[
extern void f(char *p __attribute__((unused)), ...)
__attribute__((format(printf,1,2))) __attribute__((__noreturn__));],
librpz_have_attr=yes
AC_DEFINE([LIBRPZ_HAVE_ATTR], 1, [have __attribute__s used in librpz.h])
AC_MSG_RESULT([yes]),
librpz_have_attr=no
AC_MSG_RESULT([no]))
AC_SEARCH_LIBS(dlopen, dl)
librpz_dl=yes
AC_CHECK_FUNCS(dlopen dlclose dlsym,,librpz_dl=no)
AC_ARG_ENABLE([dnsrps-dl],
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-dnsrps-dl],
[DNS Response Policy Service delayed link
[default=$librpz_dl]]),
[enable_librpz_dl="$enableval"], [enable_librpz_dl="$librpz_dl"])
2017-09-11 11:53:42 -07:00
AC_ARG_WITH([dnsrps-libname],
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-dnsrps-libname],
[DNSRPS provider library name (librpz.so)]),
[librpz_name="$withval"], [librpz_name="librpz.so"])
2017-09-11 11:53:42 -07:00
AC_ARG_WITH([dnsrps-dir],
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-dnsrps-dir],
[path to DNSRPS provider library]),
[librpz_path="$withval/$librpz_name"], [librpz_path="$librpz_name"])
2017-09-11 11:53:42 -07:00
AC_DEFINE_UNQUOTED([DNSRPS_LIBRPZ_PATH], ["$librpz_path"],
[dnsrps $librpz_name])
if test "x$enable_librpz_dl" = "xyes"; then
dnsrps_lib_open=2
else
dnsrps_lib_open=1
# Add librpz.so to linked libraries if we are not using dlopen()
AC_SEARCH_LIBS([librpz_client_create], [rpz], [],
[dnsrps_lib_open=0
dnsrps_avail=no])
fi
AC_DEFINE_UNQUOTED([DNSRPS_LIB_OPEN], [$dnsrps_lib_open],
[0=no DNSRPS 1=static link 2=dlopen()])
AC_ARG_ENABLE([dnsrps],
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-dnsrps],
[enable DNS Response Policy Service API]),
[enable_dnsrps=$enableval], [enable_dnsrps=no])
2017-09-11 11:53:42 -07:00
if test "x$enable_dnsrps" != "xno"; then
2017-11-13 11:36:45 +11:00
if test "x$dnsrps_avail" != "xyes"; then
AC_MSG_ERROR([[dlopen and librpz.so needed for DNSRPS]])
fi
2017-09-11 11:53:42 -07:00
if test "x$dnsrps_lib_open" = "x0"; then
AC_MSG_ERROR([[dlopen and librpz.so needed for DNSRPS]])
fi
AC_DEFINE([USE_DNSRPS], [1], [Enable DNS Response Policy Service API])
fi
2015-10-02 12:32:42 -07:00
#
# Activate dnstap?
#
AC_ARG_ENABLE(dnstap,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-dnstap],
[enable dnstap support
(requires fstrm, protobuf-c)]),
use_dnstap=$enableval, use_dnstap=no)
2015-10-02 12:32:42 -07:00
DNSTAP=
DNSTAPSRCS=
DNSTAPOBJS=
DNSTAPTARGETS=
2016-06-24 09:37:04 +10:00
DNSTAP_PB_C_H=
2015-10-02 12:32:42 -07:00
if test "x$use_dnstap" != "xno"; then
2016-06-24 09:37:04 +10:00
if ! $use_threads; then
AC_MSG_ERROR([Dnstap requires threads.])
fi
AC_ARG_WITH([protobuf-c],
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-protobuf-c=path],
2016-06-24 09:37:04 +10:00
[Path where protobuf-c is installed, for dnstap]), [
# workaround for protobuf-c includes at old dir
# before protobuf-c-1.0.0
if test -f $withval/include/google/protobuf-c/protobuf-c.h
then
CFLAGS="$CFLAGS -I$withval/include/google"
else
CFLAGS="$CFLAGS -I$withval/include"
fi
LDFLAGS="$LDFLAGS -L$withval/lib"
2017-05-11 18:30:04 +10:00
AC_PATH_PROG([PROTOC_C], [protoc-c], [],
[$PATH$PATH_SEPARATOR$withval/bin])
2016-06-24 09:37:04 +10:00
], [
# workaround for protobuf-c includes at old dir
# before protobuf-c-1.0.0
if test -f /usr/include/google/protobuf-c/protobuf-c.h
then
CFLAGS="$CFLAGS -I/usr/include/google"
else
if test -f /usr/local/include/google/protobuf-c/protobuf-c.h
then
CFLAGS="$CFLAGS -I/usr/local/include/google"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
fi
fi
2017-05-11 18:30:04 +10:00
AC_PATH_PROG([PROTOC_C],[protoc-c])
2016-06-24 09:37:04 +10:00
])
2017-05-11 18:30:04 +10:00
if test -z "$PROTOC_C"; then
AC_MSG_ERROR([The protoc-c program was not found.])
fi
2017-11-13 11:36:45 +11:00
AC_ARG_WITH([libfstrm], AS_HELP_STRING([--with-libfstrm=path],
2016-06-24 09:37:04 +10:00
[Path where libfstrm is installed, for dnstap]), [
CFLAGS="$CFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval/lib"
2017-05-11 18:30:04 +10:00
AC_PATH_PROG([FSTRM_CAPTURE], [fstrm_capture], [], [$PATH$PATH_SEPARATOR$withval/bin])
],[
AC_PATH_PROG([FSTRM_CAPTURE], [fstrm_capture])
2016-06-24 09:37:04 +10:00
])
AC_SEARCH_LIBS([fstrm_iothr_init], [fstrm], [],
AC_MSG_ERROR([The fstrm library was not found. Please install fstrm!]))
AC_SEARCH_LIBS([protobuf_c_message_pack], [protobuf-c], [],
AC_MSG_ERROR([The protobuf-c library was not found. Please install protobuf-c!]))
AC_DEFINE(HAVE_DNSTAP, 1, [Define to 1 to enable dnstap support])
DNSTAP=dnstap
DNSTAPSRCS='${DNSTAPSRCS}'
DNSTAPOBJS='${DNSTAPOBJS}'
DNSTAPTARGETS='${DNSTAPTARGETS}'
DNSTAP_PB_C_H="dnstap.pb-c.h"
2015-10-02 12:32:42 -07:00
fi
AC_SUBST(DNSTAP)
AC_SUBST(DNSTAPSRCS)
AC_SUBST(DNSTAPOBJS)
AC_SUBST(DNSTAPTARGETS)
2016-06-24 09:37:04 +10:00
AC_SUBST(DNSTAP_PB_C_H)
2015-10-02 12:32:42 -07:00
2005-07-08 04:30:22 +00:00
#
# The following sets up how non-blocking i/o is established.
# Sunos, cygwin and solaris 2.x (x<5) require special handling.
#
case "$host" in
*-sunos*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
*-cygwin*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
2005-07-11 03:18:34 +00:00
*-solaris2.[[01234]])
2005-07-08 04:30:22 +00:00
AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK)
AC_DEFINE(USE_FIONBIO_IOCTL, 1,
[Defined if you need to use ioctl(FIONBIO) instead a fcntl call to make non-blocking.])
;;
*) AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK,
[Sets which flag to pass to open/fcntl to make non-blocking (O_NDELAY/O_NONBLOCK).])
;;
esac
2001-05-02 23:15:38 +00:00
#
2006-01-04 04:15:55 +00:00
# Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket.
# This prevents the source address being set.
#
case "$host" in
*-solaris2.[[012345]]|*-solaris2.5.1)
AC_DEFINE(BROKEN_TCP_BIND_BEFORE_CONNECT, 1,
[Define if you cannot bind() before connect() for TCP sockets.])
;;
esac
#
2001-05-02 23:15:38 +00:00
# The following sections deal with tools used for formatting
# the documentation. They are all optional, unless you are
# a developer editing the documentation source.
#
2000-11-15 23:53:00 +00:00
#
2005-05-11 05:55:41 +00:00
# Look for TeX.
2000-11-15 23:53:00 +00:00
#
2005-05-11 05:55:41 +00:00
AC_PATH_PROGS(LATEX, latex, latex)
AC_SUBST(LATEX)
AC_PATH_PROGS(PDFLATEX, pdflatex, pdflatex)
AC_SUBST(PDFLATEX)
2000-11-15 23:53:00 +00:00
2015-10-05 21:59:35 -07:00
AC_PATH_PROGS(DBLATEX, dblatex, dblatex)
AC_SUBST(DBLATEX)
2005-08-17 22:55:57 +00:00
#
# Look for w3m
#
AC_PATH_PROGS(W3M, w3m, w3m)
AC_SUBST(W3M)
2017-04-20 19:21:54 -07:00
#
# Look for pandoc
#
AC_PATH_PROG(PANDOC, pandoc, pandoc)
AC_SUBST(PANDOC)
2001-02-02 22:37:20 +00:00
#
2005-05-11 05:55:41 +00:00
# Look for xsltproc (libxslt)
2001-02-02 22:37:20 +00:00
#
2005-05-11 05:55:41 +00:00
AC_PATH_PROG(XSLTPROC, xsltproc, xsltproc)
AC_SUBST(XSLTPROC)
#
# Look for xmllint (libxml2)
#
2001-02-02 22:37:20 +00:00
2005-05-11 05:55:41 +00:00
AC_PATH_PROG(XMLLINT, xmllint, xmllint)
AC_SUBST(XMLLINT)
2001-02-02 22:37:20 +00:00
2006-12-22 01:46:19 +00:00
#
# Look for Doxygen
#
AC_PATH_PROG(DOXYGEN, doxygen, doxygen)
AC_SUBST(DOXYGEN)
2015-06-29 18:33:18 +05:30
#
# Look for curl
#
AC_PATH_PROG(CURL, curl, curl)
AC_SUBST(CURL)
2001-07-11 23:35:33 +00:00
#
# Subroutine for searching for an ordinary file (e.g., a stylesheet)
# in a number of directories:
#
# NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES)
#
# If the file FILENAME is found in one of the DIRECTORIES, the shell
# variable VARIABLE is defined to its absolute pathname. Otherwise,
# it is set to FILENAME, with no directory prefix (that's not terribly
# useful, but looks less confusing in substitutions than leaving it
# empty). The variable VARIABLE will be substituted into output files.
#
AC_DEFUN(NOM_PATH_FILE, [
$1=""
AC_MSG_CHECKING(for $2)
for d in $3
do
f=$d/$2
if test -f $f
then
$1=$f
AC_MSG_RESULT($f)
break
fi
done
if test "X[$]$1" = "X"
then
AC_MSG_RESULT("not found");
$1=$2
fi
AC_SUBST($1)
])
2002-01-26 23:12:39 +00:00
#
2008-01-11 03:11:44 +00:00
# Look for Docbook-XSL stylesheets. Location probably varies by system.
# If it's not explicitly specified, guess where it might be found, based on
# where SGML stuff lives on some systems (FreeBSD is the only one we're sure
# of at the moment).
2002-01-26 23:12:39 +00:00
#
2008-01-11 03:11:44 +00:00
AC_MSG_CHECKING(for Docbook-XSL path)
AC_ARG_WITH(docbook-xsl,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-docbook-xsl[=PATH]],
[specify path for Docbook-XSL stylesheets]),
2008-01-11 03:11:44 +00:00
docbook_path="$withval", docbook_path="auto")
case "$docbook_path" in
auto)
AC_MSG_RESULT(auto)
2015-10-07 15:04:36 +11:00
docbook_xsl_trees="/usr/pkg/share/xsl/docbook /usr/local/share/xsl/docbook-ns /usr/local/share/xsl/docbook /usr/share/xsl/docbook /opt/local/share/xsl/docbook-xsl /usr/share/xml/docbook/stylesheet/docbook-xsl"
2008-01-11 03:11:44 +00:00
;;
*)
docbook_xsl_trees="$withval"
2014-02-10 15:01:06 +11:00
AC_MSG_RESULT($docbook_xsl_trees)
2008-01-11 03:11:44 +00:00
;;
esac
2001-05-15 17:33:32 +00:00
2000-11-15 23:32:21 +00:00
#
2005-05-11 05:55:41 +00:00
# Look for stylesheets we need.
#
2008-01-11 03:11:44 +00:00
NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_HTML, html/docbook.xsl, $docbook_xsl_trees)
NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_XHTML, xhtml/docbook.xsl, $docbook_xsl_trees)
NOM_PATH_FILE(XSLT_DOCBOOK_STYLE_MAN, manpages/docbook.xsl, $docbook_xsl_trees)
NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_HTML, html/chunk.xsl, $docbook_xsl_trees)
NOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_XHTML, xhtml/chunk.xsl, $docbook_xsl_trees)
NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_HTML, html/chunktoc.xsl, $docbook_xsl_trees)
NOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_XHTML, xhtml/chunktoc.xsl, $docbook_xsl_trees)
NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_HTML, html/maketoc.xsl, $docbook_xsl_trees)
NOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_XHTML, xhtml/maketoc.xsl, $docbook_xsl_trees)
2005-05-11 05:55:41 +00:00
2001-03-29 22:54:36 +00:00
#
2015-10-05 21:59:35 -07:00
# Same dance for dblatex
2000-11-16 03:24:48 +00:00
#
2015-10-05 21:59:35 -07:00
dblatex_xsl_trees="/usr/local/share/xml/docbook/stylesheet/dblatex /usr/pkg/share/xml/docbook/stylesheet/dblatex /usr/share/xml/docbook/stylesheet/dblatex"
NOM_PATH_FILE(XSLT_DBLATEX_STYLE, xsl/docbook.xsl, $dblatex_xsl_trees)
NOM_PATH_FILE(XSLT_DBLATEX_FASTBOOK, xsl/latex_book_fast.xsl, $dblatex_xsl_trees)
2000-11-16 03:24:48 +00:00
2015-09-23 16:47:37 +02:00
#
# IDN support using libidn2
#
2018-03-14 11:30:47 +01:00
LIBIDN2_CFLAGS=
2018-04-03 20:35:29 +02:00
LIBIDN2_LDFLAGS=
2017-08-15 14:36:59 +02:00
LIBIDN2_LIBS=
2015-09-23 16:47:37 +02:00
AC_ARG_WITH(libidn2,
2017-08-15 14:36:59 +02:00
AS_HELP_STRING([--with-libidn2[=PATH]], [enable IDN support using GNU libidn2 [yes|no|path]]),
2015-09-23 16:47:37 +02:00
use_libidn2="$withval", use_libidn2="no")
2018-03-14 11:30:47 +01:00
AS_CASE([$use_libidn2],
[no],[:],
2018-04-03 20:35:29 +02:00
[yes],[:],
2018-03-14 11:30:47 +01:00
[*],[
LIBIDN2_CFLAGS="-I$use_libidn2/include"
2018-04-03 20:35:29 +02:00
LIBIDN2_LDFLAGS="-L$use_libidn2/lib"
2018-03-14 11:30:47 +01:00
])
2017-08-15 14:36:59 +02:00
2018-03-14 11:30:47 +01:00
AS_IF([test "$use_libidn2" != "no"],
2018-04-03 20:35:29 +02:00
[save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
save_LDFLAGS="$LDFLAGS"
CFLAGS="$LIBIDN2_CFLAGS $CFLAGS"
LDFLAGS="$LIBIDN2_LDFLAGS $LDFLAGS"
AC_SEARCH_LIBS([idn2_to_ascii_8z], [idn2],
2018-03-14 12:03:53 +01:00
[AC_DEFINE(WITH_IDN_SUPPORT, 1, [define if IDN input support is to be included.])
2018-04-03 20:35:29 +02:00
AC_DEFINE(WITH_LIBIDN2, 1, [define if libidn2 support is to be included.])
LIBIDN2_LIBS="$LIBIDN2_LDFLAGS -lidn2"],
2018-03-14 11:30:47 +01:00
[AC_MSG_ERROR([libidn2 requested, but not found])])
AC_TRY_LINK([#include <idn2.h>],
[idn2_to_unicode_8zlz(".", NULL, IDN2_NONTRANSITIONAL|IDN2_NFC_INPUT);],
[AC_MSG_RESULT(yes)
AC_DEFINE(WITH_IDN_OUT_SUPPORT, 1, [define if IDN output support is to be included.])],
[AC_MSG_RESULT([no])])
2018-04-03 20:35:29 +02:00
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
LDFLAGS="$save_LDFLAGS"
2018-03-14 11:30:47 +01:00
])
AC_SUBST([LIBIDN2_CFLAGS])
AC_SUBST([LIBIDN2_LIBS])
2015-09-23 16:47:37 +02:00
2011-02-26 02:26:33 +00:00
#
# Check whether to build Automated Test Framework unit tests
#
AC_ARG_WITH(atf,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-atf],[support Automated Test Framework]),
2011-02-26 02:26:33 +00:00
atf="$withval", atf="no")
2017-07-19 15:53:01 +10:00
if test "yes" = "$atf"; then
2011-02-26 02:26:33 +00:00
atf=`pwd`/unit/atf
ATFBUILD=atf-src
AC_SUBST(ATFBUILD)
AC_CONFIG_COMMANDS([atf-config],
2012-11-17 09:33:46 +00:00
[(
mkdir -p unit/atf-src;
cd unit/atf-src;
case "$srcdir" in
/*) ;;
*) srcdir="../../$srcdir";;
esac
2013-09-12 16:18:26 -07:00
${SHELL} "${srcdir}${srcdir:+/unit/atf-src/}./configure" --enable-tools --disable-shared MISSING=: --prefix $atfdir;
2017-11-28 13:36:57 +01:00
) || AC_MSG_ERROR([Failed to configure ATF.]) ],
2011-02-26 02:26:33 +00:00
[atfdir=`pwd`/unit/atf])
AC_MSG_RESULT(building ATF from bind9/unit/atf-src)
fi
ATFLIBS=
2017-07-19 15:53:01 +10:00
if test "no" != "$atf"; then
2011-02-26 02:26:33 +00:00
AC_DEFINE(ATF_TEST, 1, [define if ATF unit tests are to be built.])
STD_CINCLUDES="$STD_CINCLUDES -I$atf/include"
2017-11-13 11:36:45 +11:00
STD_CDEFINES="$STD_CDEFINES -DNS_HOOKS_ENABLE=1"
2011-02-26 02:26:33 +00:00
ATFBIN="$atf/bin"
2011-02-27 13:29:11 +00:00
ATFLIBS="-L$atf/lib -latf-c"
2014-06-04 13:38:59 +05:30
AC_CHECK_LIB(m, exp, libm=yes, libm=no)
2016-10-20 10:26:05 +11:00
if test "yes" = "$libm"; then
2014-06-04 13:38:59 +05:30
ATFLIBS="$ATFLIBS -lm"
fi
2011-02-26 02:26:33 +00:00
UNITTESTS=tests
fi
AC_SUBST(ATFBIN)
AC_SUBST(ATFLIBS)
AC_SUBST(UNITTESTS)
2005-09-09 06:17:03 +00:00
AC_CHECK_HEADERS(locale.h)
AC_CHECK_FUNCS(setlocale)
2014-02-18 22:36:14 -08:00
#
# was --with-tuning specified?
#
AC_ARG_WITH(tuning,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-tuning=ARG],
[Specify server tuning (large or default)]),
use_tuning="$withval", use_tuning="no")
2014-02-18 22:36:14 -08:00
case "$use_tuning" in
large)
if ! $use_threads; then
AC_MSG_ERROR([Large-system tuning requires threads.])
fi
2014-02-26 19:00:05 -08:00
AC_DEFINE(TUNE_LARGE, 1, [Define to use large-system tuning.])
2014-02-18 22:36:14 -08:00
AC_MSG_RESULT(using large-system tuning)
;;
no|default)
AC_MSG_RESULT(using default tuning)
;;
yes|*)
2014-02-26 19:00:05 -08:00
AC_MSG_ERROR([You must specify "large" or "default" for --with-tuning.])
2014-02-18 22:36:14 -08:00
;;
esac
2015-02-26 16:49:27 +05:30
#
# was --enable-querytrace specified?
#
AC_ARG_ENABLE(querytrace,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-querytrace],
[enable very verbose query trace logging
[default=no]]),
want_querytrace="$enableval", want_querytrace="no")
2015-02-26 16:49:27 +05:30
2016-03-04 11:12:23 +05:30
AC_MSG_CHECKING([whether to enable query trace logging])
2015-02-26 16:49:27 +05:30
case "$want_querytrace" in
yes)
AC_MSG_RESULT(yes)
AC_DEFINE(WANT_QUERYTRACE, 1, [Define to enable very verbose query trace logging.])
;;
no)
AC_MSG_RESULT(no)
;;
*)
AC_MSG_ERROR("--enable-querytrace requires yes or no")
;;
esac
2018-05-16 11:58:15 -07:00
#
# Was --disable-auto-validation specified?
#
2018-06-06 12:02:40 +02:00
validation_default=auto
2018-05-16 11:58:15 -07:00
AC_ARG_ENABLE(auto-validation,
AS_HELP_STRING([--enable-auto-validation],
[turn on DNSSEC validation by default, using the IANA root key [default=yes]]),
2018-06-06 12:02:40 +02:00
[:],[enable_auto_validation=yes])
AS_IF([test "$enable_auto_validation" = "no"],[validation_default=yes])
AC_DEFINE_UNQUOTED([VALIDATION_DEFAULT], ["$validation_default"], [the default value of dnssec-validation option])
2018-05-16 11:58:15 -07:00
2000-02-11 18:35:11 +00:00
#
# Substitutions
#
1999-02-18 01:24:32 +00:00
AC_SUBST(BIND9_TOP_BUILDDIR)
BIND9_TOP_BUILDDIR=`pwd`
1999-10-05 19:52:30 +00:00
AC_SUBST(BIND9_ISC_BUILDINCLUDE)
2001-03-27 00:44:59 +00:00
AC_SUBST(BIND9_ISCCC_BUILDINCLUDE)
2001-02-15 04:14:15 +00:00
AC_SUBST(BIND9_ISCCFG_BUILDINCLUDE)
1999-10-05 19:52:30 +00:00
AC_SUBST(BIND9_DNS_BUILDINCLUDE)
2017-09-08 13:39:09 -07:00
AC_SUBST(BIND9_NS_BUILDINCLUDE)
2001-09-20 15:17:07 +00:00
AC_SUBST(BIND9_BIND9_BUILDINCLUDE)
2014-02-16 13:03:17 -08:00
AC_SUBST(BIND9_IRS_BUILDINCLUDE)
1999-10-05 19:52:30 +00:00
if test "X$srcdir" != "X"; then
BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include"
2001-03-27 00:44:59 +00:00
BIND9_ISCCC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccc/include"
2001-02-15 04:14:15 +00:00
BIND9_ISCCFG_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccfg/include"
1999-10-05 19:52:30 +00:00
BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include"
2017-09-08 13:39:09 -07:00
BIND9_NS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/ns/include"
2001-09-20 15:17:07 +00:00
BIND9_BIND9_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/bind9/include"
2014-02-16 13:03:17 -08:00
BIND9_IRS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/irs/include"
1999-10-05 19:52:30 +00:00
else
BIND9_ISC_BUILDINCLUDE=""
2001-03-27 00:44:59 +00:00
BIND9_ISCCC_BUILDINCLUDE=""
2001-02-15 04:14:15 +00:00
BIND9_ISCCFG_BUILDINCLUDE=""
1999-10-05 19:52:30 +00:00
BIND9_DNS_BUILDINCLUDE=""
2017-09-08 13:39:09 -07:00
BIND9_NS_BUILDINCLUDE=""
2001-09-20 15:17:07 +00:00
BIND9_BIND9_BUILDINCLUDE=""
2014-02-16 13:03:17 -08:00
BIND9_IRS_BUILDINCLUDE=""
1999-10-05 19:52:30 +00:00
fi
2001-09-20 15:17:07 +00:00
AC_SUBST_FILE(BIND9_MAKE_INCLUDES)
BIND9_MAKE_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
1999-10-05 19:52:30 +00:00
1998-12-11 20:10:26 +00:00
AC_SUBST_FILE(BIND9_MAKE_RULES)
1999-02-18 01:24:32 +00:00
BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
1998-12-11 20:10:26 +00:00
2013-08-15 12:41:52 +10:00
. "$srcdir/version"
2013-03-02 00:16:55 -08:00
BIND9_PRODUCT="PRODUCT=\"${PRODUCT}\""
2013-03-01 16:24:12 -06:00
AC_SUBST(BIND9_PRODUCT)
2013-05-03 15:08:45 -07:00
BIND9_DESCRIPTION="DESCRIPTION=\"${DESCRIPTION}\""
AC_SUBST(BIND9_DESCRIPTION)
2015-11-08 21:34:24 -08:00
BIND9_VERSION="${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}${EXTENSIONS}"
2000-04-27 23:47:49 +00:00
AC_SUBST(BIND9_VERSION)
2012-06-20 14:13:12 -05:00
BIND9_MAJOR="MAJOR=${MAJORVER}.${MINORVER}"
AC_SUBST(BIND9_MAJOR)
2014-10-20 23:34:21 -07:00
BIND9_VERSIONSTRING="${PRODUCT} ${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}${EXTENSIONS}${DESCRIPTION:+ }${DESCRIPTION}"
AC_SUBST(BIND9_VERSIONSTRING)
2015-10-05 21:59:35 -07:00
BIND9_VERSIONSHORT="${PRODUCT} ${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}${EXTENSIONS}"
AC_SUBST(BIND9_VERSIONSHORT)
1998-12-11 20:10:26 +00:00
2016-10-19 17:18:42 +02:00
BIND9_SRCID="SRCID=unset_id"
2013-08-15 12:41:52 +10:00
if test -f "${srcdir}/srcid"; then
. "${srcdir}/srcid"
2012-10-22 12:56:47 -07:00
BIND9_SRCID="SRCID=$SRCID"
2013-08-15 12:41:52 +10:00
elif test -d "${srcdir}/.git"; then
2014-06-17 13:42:32 -07:00
BIND9_SRCID="SRCID="`(cd "${srcdir}";git rev-parse --short HEAD)`
2012-10-22 12:56:47 -07:00
fi
2013-08-15 12:41:52 +10:00
2012-10-22 12:56:47 -07:00
AC_SUBST(BIND9_SRCID)
2008-09-23 17:25:47 +00:00
if test -z "$ac_configure_args"; then
BIND9_CONFIGARGS="defaults"
else
for a in $ac_configure_args
do
BIND9_CONFIGARGS="$BIND9_CONFIGARGS $a"
done
fi
BIND9_CONFIGARGS="`echo $BIND9_CONFIGARGS | sed 's/^ //'`"
BIND9_CONFIGARGS="CONFIGARGS=${BIND9_CONFIGARGS}"
AC_SUBST(BIND9_CONFIGARGS)
1999-07-03 21:07:10 +00:00
AC_SUBST_FILE(LIBISC_API)
2013-08-15 12:41:52 +10:00
LIBISC_API="$srcdir/lib/isc/api"
1999-07-03 21:07:10 +00:00
2001-03-27 00:44:59 +00:00
AC_SUBST_FILE(LIBISCCC_API)
2013-08-15 12:41:52 +10:00
LIBISCCC_API="$srcdir/lib/isccc/api"
2001-03-27 00:44:59 +00:00
2001-02-15 04:14:15 +00:00
AC_SUBST_FILE(LIBISCCFG_API)
2013-08-15 12:41:52 +10:00
LIBISCCFG_API="$srcdir/lib/isccfg/api"
2001-02-15 04:14:15 +00:00
1999-07-03 21:07:10 +00:00
AC_SUBST_FILE(LIBDNS_API)
2013-08-15 12:41:52 +10:00
LIBDNS_API="$srcdir/lib/dns/api"
1999-07-03 21:07:10 +00:00
2013-01-24 14:20:48 -08:00
AC_SUBST_FILE(LIBDNS_MAPAPI)
2013-08-15 12:41:52 +10:00
LIBDNS_MAPAPI="$srcdir/lib/dns/mapapi"
2012-06-20 14:13:12 -05:00
2001-09-20 15:17:07 +00:00
AC_SUBST_FILE(LIBBIND9_API)
2013-08-15 12:41:52 +10:00
LIBBIND9_API="$srcdir/lib/bind9/api"
2001-09-20 15:17:07 +00:00
2009-09-01 00:22:28 +00:00
AC_SUBST_FILE(LIBIRS_API)
2013-08-15 12:41:52 +10:00
LIBIRS_API="$srcdir/lib/irs/api"
2009-09-01 00:22:28 +00:00
2017-09-08 13:39:09 -07:00
AC_SUBST_FILE(LIBNS_API)
LIBNS_API="$srcdir/lib/ns/api"
2005-09-05 00:12:29 +00:00
#
# Configure any DLZ drivers.
#
# If config.dlz.in selects one or more DLZ drivers, it will set
2011-03-10 04:36:16 +00:00
# CONTRIB_DLZ to a non-empty value, which will be our clue to
# build DLZ drivers in contrib.
2005-09-05 00:12:29 +00:00
#
# This section has to come after the libtool stuff because it needs to
# know how to name the driver object files.
#
2011-03-10 04:36:16 +00:00
CONTRIB_DLZ=""
2005-09-05 00:12:29 +00:00
DLZ_DRIVER_INCLUDES=""
DLZ_DRIVER_LIBS=""
DLZ_DRIVER_SRCS=""
DLZ_DRIVER_OBJS=""
2010-08-16 04:49:14 +00:00
DLZ_SYSTEM_TEST=""
2017-10-06 19:09:30 -07:00
DLZ_DRIVER_MYSQL_INCLUDES=""
DLZ_DRIVER_MYSQL_LIBS=""
2005-09-05 00:12:29 +00:00
2011-03-10 04:36:16 +00:00
#
# Configure support for building a shared library object
#
# Even when libtool is available it can't always be relied upon
# to build an object that can be dlopen()'ed, but this is necessary
# for building the dlzexternal system test, so we'll try it the
# old-fashioned way.
#
SO="so"
SO_CFLAGS=""
2014-02-10 15:01:06 +11:00
SO_LDFLAGS=""
2011-03-10 04:36:16 +00:00
SO_LD=""
SO_TARGETS=""
2016-11-10 11:31:21 +11:00
SO_STRIP="cat"
2011-03-10 04:36:16 +00:00
AC_ARG_WITH(dlopen,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-dlopen=ARG],
[support dynamically loadable DLZ drivers]),
dlopen="$withval", dlopen="yes")
2011-03-10 04:36:16 +00:00
2012-10-29 15:56:59 -07:00
case $host in
*-sunos*) dlopen="no"
;;
esac
2016-10-20 10:26:05 +11:00
if test "yes" = "$dlopen"; then
2011-04-19 22:30:52 +00:00
AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
2016-10-20 10:26:05 +11:00
if test "yes" = "$have_dl"; then
2011-04-19 22:30:52 +00:00
LIBS="-ldl $LIBS"
fi
2014-02-10 15:01:06 +11:00
AC_CHECK_FUNCS(dlopen dlclose dlsym,,dlopen=no)
2011-03-10 04:36:16 +00:00
fi
2016-10-20 10:26:05 +11:00
if test "yes" = "$dlopen"; then
2011-03-10 04:36:16 +00:00
case $host in
2014-06-26 11:46:31 +10:00
*-linux*|*-gnu*)
2011-03-10 04:36:16 +00:00
SO_CFLAGS="-fPIC"
2014-02-10 15:01:06 +11:00
SO_LDFLAGS=""
2016-10-20 10:26:05 +11:00
if test "yes" = "$have_dl"
2011-03-10 04:36:16 +00:00
then
2016-10-20 10:26:05 +11:00
if test "yes" = "$use_libtool"; then
2014-02-10 15:01:06 +11:00
SO_LDFLAGS="-Xcompiler -shared"
SO_LD="${CC}"
2012-11-20 03:40:07 +00:00
else
2014-02-10 15:01:06 +11:00
SO_LDFLAGS="-shared"
SO_LD="${CC}"
2012-11-20 03:40:07 +00:00
fi
2011-03-10 04:36:16 +00:00
else
2014-02-10 15:01:06 +11:00
SO_LDFLAGS="-shared"
SO_LD="ld"
2011-03-10 04:36:16 +00:00
fi
;;
2015-09-29 15:56:11 +00:00
*-freebsd*|*-openbsd*)
2016-05-12 10:00:00 +10:00
LDFLAGS="${LDFLAGS} -Wl,-E"
2015-09-29 15:56:11 +00:00
SO_CFLAGS="-fpic"
2016-10-20 10:26:05 +11:00
if test "yes" = "$use_libtool"; then
2015-09-30 12:38:07 +10:00
SO_LDFLAGS="-Xcompiler -shared"
SO_LD="${CC}"
else
SO_LDFLAGS="-shared"
SO_LD="${CC}"
fi
2015-09-29 15:56:11 +00:00
;;
*-netbsd*)
2011-03-10 04:36:16 +00:00
SO_CFLAGS="-fpic"
2014-02-10 15:01:06 +11:00
SO_LDFLAGS="-Bshareable -x"
SO_LD="ld"
2016-11-10 11:31:21 +11:00
SO_STRIP="sed -e s/-Wl,//g"
2011-03-10 04:36:16 +00:00
;;
*-solaris*)
SO_CFLAGS="-KPIC"
2014-02-10 15:01:06 +11:00
SO_LDFLAGS="-G -z text"
SO_LD="ld"
;;
2011-03-10 04:36:16 +00:00
*-hp-hpux*)
SO=sl
SO_CFLAGS="+z"
2014-02-11 13:22:27 +11:00
SO_LDFLAGS="-b +vnocompatwarnings"
2014-02-10 15:01:06 +11:00
SO_LD="ld"
;;
2011-03-10 04:36:16 +00:00
*)
SO_CFLAGS="-fPIC"
;;
esac
if test "X$GCC" = "Xyes"; then
SO_CFLAGS="-fPIC"
2014-02-10 15:01:06 +11:00
if test -z "$SO_LD"
then
2016-10-20 10:26:05 +11:00
if test "yes" = "$use_libtool"; then
2014-02-10 15:01:06 +11:00
SO_LDFLAGS="-Xcompiler -shared"
SO_LD="${CC}"
else
SO_LDFLAGS="-shared"
SO_LD="${CC}"
fi
fi
2011-03-10 04:36:16 +00:00
fi
2005-09-05 00:12:29 +00:00
2011-03-10 04:36:16 +00:00
# If we still don't know how to make shared objects, don't make any.
if test -n "$SO_LD"; then
SO_TARGETS="\${SO_TARGETS}"
AC_DEFINE(ISC_DLZ_DLOPEN, 1,
[Define to allow building of objects for dlopen().])
fi
fi
2015-09-28 23:12:35 -07:00
CFLAGS="$CFLAGS $SO_CFLAGS"
2011-03-10 04:36:16 +00:00
AC_SUBST(SO)
AC_SUBST(SO_CFLAGS)
2014-02-10 15:01:06 +11:00
AC_SUBST(SO_LDFLAGS)
2011-03-10 04:36:16 +00:00
AC_SUBST(SO_LD)
2016-11-10 11:31:21 +11:00
AC_SUBST(SO_STRIP)
2011-03-10 04:36:16 +00:00
AC_SUBST(SO_TARGETS)
sinclude(contrib/dlz/config.dlz.in)
AC_MSG_CHECKING(contributed DLZ drivers)
2005-09-05 00:12:29 +00:00
2011-03-10 04:36:16 +00:00
if test -n "$CONTRIB_DLZ"
2005-09-05 00:12:29 +00:00
then
AC_MSG_RESULT(yes)
DLZ_DRIVER_RULES=contrib/dlz/drivers/rules
2017-10-06 19:09:30 -07:00
AC_CONFIG_FILES([$DLZ_DRIVER_RULES
contrib/dlz/modules/mysql/Makefile
contrib/dlz/modules/mysqldyn/Makefile])
2005-09-05 00:12:29 +00:00
else
AC_MSG_RESULT(no)
DLZ_DRIVER_RULES=/dev/null
fi
2011-03-10 04:36:16 +00:00
AC_SUBST(CONTRIB_DLZ)
2005-09-05 00:12:29 +00:00
AC_SUBST(DLZ_DRIVER_INCLUDES)
AC_SUBST(DLZ_DRIVER_LIBS)
AC_SUBST(DLZ_DRIVER_SRCS)
AC_SUBST(DLZ_DRIVER_OBJS)
2010-08-16 04:49:14 +00:00
AC_SUBST(DLZ_SYSTEM_TEST)
2017-10-06 19:09:30 -07:00
AC_SUBST(DLZ_DRIVER_MYSQL_INCLUDES)
AC_SUBST(DLZ_DRIVER_MYSQL_LIBS)
2005-09-05 00:12:29 +00:00
AC_SUBST_FILE(DLZ_DRIVER_RULES)
2016-10-20 10:26:05 +11:00
if test "yes" = "$cross_compiling"; then
2006-01-05 00:30:34 +00:00
if test -z "$BUILD_CC"; then
2014-02-21 21:17:23 +11:00
AC_MSG_ERROR([BUILD_CC not set])
2006-01-05 00:30:34 +00:00
fi
BUILD_CFLAGS="$BUILD_CFLAGS"
BUILD_CPPFLAGS="$BUILD_CPPFLAGS"
BUILD_LDFLAGS="$BUILD_LDFLAGS"
BUILD_LIBS="$BUILD_LIBS"
else
BUILD_CC="$CC"
BUILD_CFLAGS="$CFLAGS"
BUILD_CPPFLAGS="$CPPFLAGS $GEN_NEED_OPTARG"
BUILD_LDFLAGS="$LDFLAGS"
BUILD_LIBS="$LIBS"
fi
2006-12-04 01:54:53 +00:00
NEWFLAGS=""
for e in $BUILD_LDFLAGS ; do
case $e in
-L*)
case $host_os in
netbsd*)
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
NEWFLAGS="$NEWFLAGS $e $ee"
;;
freebsd*)
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
NEWFLAGS="$NEWFLAGS $e $ee"
;;
2008-09-25 01:22:47 +00:00
solaris*)
2008-09-25 03:33:11 +00:00
ee=`echo $e | sed -e 's%^-L%-R%'`
2008-09-25 01:22:47 +00:00
NEWFLAGS="$NEWFLAGS $e $ee"
;;
2006-12-04 04:27:29 +00:00
*)
NEWFLAGS="$NEWFLAGS $e"
;;
2006-12-04 01:54:53 +00:00
esac
;;
*)
NEWFLAGS="$NEWFLAGS $e"
;;
esac
done
BUILD_LDFLAGS="$NEWFLAGS"
NEWFLAGS=""
for e in $DNS_GSSAPI_LIBS ; do
case $e in
-L*)
case $host_os in
netbsd*)
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
NEWFLAGS="$NEWFLAGS $e $ee"
;;
freebsd*)
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
NEWFLAGS="$NEWFLAGS $e $ee"
;;
2008-09-25 01:22:47 +00:00
solaris*)
2008-09-25 03:33:11 +00:00
ee=`echo $e | sed -e 's%^-L%-R%'`
2008-09-25 01:22:47 +00:00
NEWFLAGS="$NEWFLAGS $e $ee"
;;
2006-12-04 04:27:29 +00:00
*)
NEWFLAGS="$NEWFLAGS $e"
;;
2006-12-04 01:54:53 +00:00
esac
;;
*)
NEWFLAGS="$NEWFLAGS $e"
;;
esac
done
DNS_GSSAPI_LIBS="$NEWFLAGS"
2014-02-13 15:09:08 +11:00
NEWFLAGS=""
for e in $ISC_OPENSSL_LIBS ; do
case $e in
-L*)
case $host_os in
netbsd*)
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
NEWFLAGS="$NEWFLAGS $e $ee"
;;
freebsd*)
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
NEWFLAGS="$NEWFLAGS $e $ee"
;;
solaris*)
ee=`echo $e | sed -e 's%^-L%-R%'`
NEWFLAGS="$NEWFLAGS $e $ee"
;;
*)
NEWFLAGS="$NEWFLAGS $e"
;;
esac
;;
*)
NEWFLAGS="$NEWFLAGS $e"
;;
esac
done
ISC_OPENSSL_LIBS="$NEWFLAGS"
2006-12-04 01:54:53 +00:00
NEWFLAGS=""
for e in $DNS_CRYPTO_LIBS ; do
case $e in
-L*)
case $host_os in
netbsd*)
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
NEWFLAGS="$NEWFLAGS $e $ee"
;;
freebsd*)
ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
NEWFLAGS="$NEWFLAGS $e $ee"
;;
2008-09-25 01:22:47 +00:00
solaris*)
2008-09-25 03:33:11 +00:00
ee=`echo $e | sed -e 's%^-L%-R%'`
2008-09-25 01:22:47 +00:00
NEWFLAGS="$NEWFLAGS $e $ee"
;;
2006-12-04 04:27:29 +00:00
*)
NEWFLAGS="$NEWFLAGS $e"
;;
2006-12-04 01:54:53 +00:00
esac
;;
*)
NEWFLAGS="$NEWFLAGS $e"
;;
esac
done
DNS_CRYPTO_LIBS="$NEWFLAGS"
2006-01-05 00:30:34 +00:00
AC_SUBST(BUILD_CC)
AC_SUBST(BUILD_CFLAGS)
AC_SUBST(BUILD_CPPFLAGS)
AC_SUBST(BUILD_LDFLAGS)
AC_SUBST(BUILD_LIBS)
2005-09-05 00:12:29 +00:00
2005-05-11 05:55:41 +00:00
#
# Commands to run at the end of config.status.
# Don't just put these into configure, it won't work right if somebody
# runs config.status directly (which autoconf allows).
#
AC_CONFIG_COMMANDS(
[chmod],
2006-12-22 01:46:19 +00:00
[chmod a+x isc-config.sh doc/doxygen/doxygen-input-filter])
2005-05-11 05:55:41 +00:00
#
2005-09-05 00:12:29 +00:00
# Files to configure. These are listed here because we used to
# specify them as arguments to AC_OUTPUT. It's (now) ok to move these
# elsewhere if there's a good reason for doing so.
2005-05-11 05:55:41 +00:00
#
2005-09-05 00:12:29 +00:00
AC_CONFIG_FILES([
2011-01-11 21:36:22 +00:00
make/Makefile
make/mkdep
1998-12-11 20:10:26 +00:00
Makefile
bin/Makefile
2000-12-13 06:21:42 +00:00
bin/check/Makefile
2009-06-10 00:27:22 +00:00
bin/confgen/Makefile
bin/confgen/unix/Makefile
2014-04-23 11:14:12 -07:00
bin/delv/Makefile
2011-01-11 21:36:22 +00:00
bin/dig/Makefile
bin/dnssec/Makefile
1999-01-19 19:43:25 +00:00
bin/named/Makefile
1999-10-23 01:06:31 +00:00
bin/named/unix/Makefile
2000-06-21 20:57:33 +00:00
bin/nsupdate/Makefile
2011-01-11 21:36:22 +00:00
bin/pkcs11/Makefile
2012-06-28 17:06:00 +10:00
bin/python/Makefile
2016-04-28 00:12:33 -07:00
bin/python/isc/Makefile
bin/python/isc/utils.py
bin/python/isc/tests/Makefile
2012-06-28 17:06:00 +10:00
bin/python/dnssec-checkds.py
2013-03-20 14:31:10 -07:00
bin/python/dnssec-coverage.py
2016-04-28 00:12:33 -07:00
bin/python/dnssec-keymgr.py
2016-06-24 12:20:37 +10:00
bin/python/isc/__init__.py
bin/python/isc/checkds.py
bin/python/isc/coverage.py
bin/python/isc/dnskey.py
bin/python/isc/eventlist.py
bin/python/isc/keydict.py
bin/python/isc/keyevent.py
bin/python/isc/keymgr.py
bin/python/isc/keyseries.py
bin/python/isc/keyzone.py
bin/python/isc/policy.py
bin/python/isc/rndc.py
bin/python/isc/tests/dnskey_test.py
bin/python/isc/tests/policy_test.py
2011-01-11 21:36:22 +00:00
bin/rndc/Makefile
1999-05-01 01:41:14 +00:00
bin/tests/Makefile
2011-01-11 21:36:22 +00:00
bin/tests/headerdep_test.sh
2018-02-27 12:48:10 -08:00
bin/tests/optional/Makefile
2014-01-14 15:40:56 -08:00
bin/tests/pkcs11/Makefile
bin/tests/pkcs11/benchmarks/Makefile
2000-05-19 21:42:43 +00:00
bin/tests/system/Makefile
2014-09-10 15:31:40 +10:00
bin/tests/system/conf.sh
2011-04-19 22:30:52 +00:00
bin/tests/system/dlz/prereq.sh
2011-03-10 04:36:16 +00:00
bin/tests/system/dlzexternal/Makefile
2018-02-20 15:43:27 -08:00
bin/tests/system/dlzexternal/ns1/dlzs.conf
2015-09-28 23:12:35 -07:00
bin/tests/system/dyndb/Makefile
bin/tests/system/dyndb/driver/Makefile
2013-09-19 10:40:38 +10:00
bin/tests/system/inline/checkdsa.sh
2015-01-20 16:10:30 -08:00
bin/tests/system/pipelined/Makefile
2014-11-14 15:58:54 -08:00
bin/tests/system/rndc/Makefile
2017-09-11 11:53:42 -07:00
bin/tests/system/rpz/Makefile
2012-06-14 15:44:20 +10:00
bin/tests/system/rsabigexponent/Makefile
2001-01-11 20:46:32 +00:00
bin/tests/system/tkey/Makefile
2010-06-17 05:39:19 +00:00
bin/tests/virtual-time/Makefile
bin/tests/virtual-time/conf.sh
2009-03-02 03:54:10 +00:00
bin/tools/Makefile
2014-02-05 16:17:50 -08:00
contrib/scripts/check-secure-delegation.pl
contrib/scripts/zone-edit.sh
2000-12-01 02:16:28 +00:00
doc/Makefile
2001-01-09 21:28:28 +00:00
doc/arm/Makefile
2017-11-13 11:36:45 +11:00
doc/arm/noteversion.xml
doc/arm/pkgversion.xml
doc/arm/releaseinfo.xml
2011-01-11 21:36:22 +00:00
doc/doxygen/Doxyfile
doc/doxygen/Makefile
doc/doxygen/doxygen-input-filter
2001-07-26 21:31:12 +00:00
doc/misc/Makefile
2017-11-13 11:36:45 +11:00
doc/tex/Makefile
doc/tex/armstyle.sty
2005-07-19 04:55:25 +00:00
doc/xsl/Makefile
2005-05-11 05:55:41 +00:00
doc/xsl/isc-docbook-chunk.xsl
doc/xsl/isc-docbook-html.xsl
doc/xsl/isc-manpage.xsl
2015-01-07 17:26:03 -08:00
doc/xsl/isc-notes-html.xsl
2011-01-11 21:36:22 +00:00
isc-config.sh
lib/Makefile
lib/bind9/Makefile
lib/bind9/include/Makefile
lib/bind9/include/bind9/Makefile
lib/dns/Makefile
lib/dns/include/Makefile
lib/dns/include/dns/Makefile
lib/dns/include/dst/Makefile
2011-02-26 02:26:33 +00:00
lib/dns/tests/Makefile
2011-01-11 21:36:22 +00:00
lib/irs/Makefile
lib/irs/include/Makefile
lib/irs/include/irs/Makefile
lib/irs/include/irs/netdb.h
lib/irs/include/irs/platform.h
2016-10-27 13:17:58 +11:00
lib/irs/tests/Makefile
2011-01-11 21:36:22 +00:00
lib/isc/$arch/Makefile
lib/isc/$arch/include/Makefile
lib/isc/$arch/include/isc/Makefile
lib/isc/$thread_dir/Makefile
lib/isc/$thread_dir/include/Makefile
lib/isc/$thread_dir/include/isc/Makefile
lib/isc/Makefile
lib/isc/include/Makefile
lib/isc/include/isc/Makefile
lib/isc/include/isc/platform.h
2014-02-11 21:20:28 -08:00
lib/isc/include/pk11/Makefile
lib/isc/include/pkcs11/Makefile
2011-07-06 01:36:32 +00:00
lib/isc/tests/Makefile
2011-01-11 21:36:22 +00:00
lib/isc/nls/Makefile
lib/isc/unix/Makefile
lib/isc/unix/include/Makefile
lib/isc/unix/include/isc/Makefile
2014-02-11 21:20:28 -08:00
lib/isc/unix/include/pkcs11/Makefile
2011-01-11 21:36:22 +00:00
lib/isccc/Makefile
lib/isccc/include/Makefile
lib/isccc/include/isccc/Makefile
lib/isccfg/Makefile
lib/isccfg/include/Makefile
lib/isccfg/include/isccfg/Makefile
2016-10-10 17:11:21 -07:00
lib/isccfg/tests/Makefile
2017-09-08 13:39:09 -07:00
lib/ns/Makefile
lib/ns/include/Makefile
lib/ns/include/ns/Makefile
lib/ns/tests/Makefile
2013-04-10 13:49:57 -07:00
lib/samples/Makefile
lib/samples/Makefile-postinstall
2011-02-26 02:26:33 +00:00
unit/Makefile
unit/unittest.sh
2005-09-05 00:12:29 +00:00
])
#
# Do it
#
AC_OUTPUT
2000-07-04 01:20:53 +00:00
2010-03-18 13:28:32 +00:00
#
# Now that the Makefiles exist we can ensure that everything is rebuilt.
#
AC_ARG_WITH(make-clean,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--with-make-clean],
[run "make clean" at end of configure [yes|no]]),
2010-03-18 13:28:32 +00:00
make_clean="$withval", make_clean="yes")
case "$make_clean" in
yes)
2017-07-19 15:53:01 +10:00
if test "yes" != "$no_create"
2016-03-18 08:28:21 +11:00
then
2017-07-19 15:53:01 +10:00
if test "yes" = "$silent"
2017-04-20 15:09:28 -07:00
then
2017-11-13 11:36:45 +11:00
make clean > /dev/null
else
make clean
2017-04-20 15:09:28 -07:00
fi
2016-03-18 08:28:21 +11:00
fi
2010-03-18 13:28:32 +00:00
;;
esac
2013-07-10 20:54:08 -07:00
AC_ARG_ENABLE(full-report,
2017-11-13 11:36:45 +11:00
AS_HELP_STRING([--enable-full-report],
[report values of all configure options]))
2013-07-10 20:54:08 -07:00
2017-04-20 15:09:28 -07:00
report() {
echo "==============================================================================="
echo "Configuration summary:"
echo "-------------------------------------------------------------------------------"
echo "Optional features enabled:"
if $use_threads; then
2017-11-13 11:36:45 +11:00
echo " Multiprocessing support (--enable-threads)"
if test "yes" = "$enable_full_report" -o "standard" = "$locktype"; then
echo " Mutex lock type: $locktype"
fi
2017-04-20 15:09:28 -07:00
fi
2017-06-16 09:07:36 +02:00
test "large" = "$use_tuning" && echo " Large-system tuning (--with-tuning)"
2017-04-20 15:09:28 -07:00
test "no" = "$use_dnstap" || \
2017-11-13 11:36:45 +11:00
echo " Allow 'dnstap' packet logging (--enable-dnstap)"
2017-04-20 15:09:28 -07:00
test "no" = "$use_geoip" || echo " GeoIP access control (--with-geoip)"
test "no" = "$use_gssapi" || echo " GSS-API (--with-gssapi)"
2017-07-19 15:53:01 +10:00
if test "yes" = "$enable_full_report" -o "aes" != "$with_cc_alg"; then
2017-11-13 11:36:45 +11:00
echo " Algorithm: $with_cc_alg"
2014-03-10 12:14:35 -07:00
fi
2014-01-18 11:51:07 -08:00
2017-04-20 15:09:28 -07:00
# these lines are only printed if run with --enable-full-report
if test "yes" = "$enable_full_report"; then
2017-11-13 11:36:45 +11:00
test "no" = "$enable_ipv6" -o "no" = "$found_ipv6" || \
echo " IPv6 support (--enable-ipv6)"
test "X$CRYPTO" = "X" -o "yes" = "$want_native_pkcs11" || \
echo " OpenSSL cryptography/DNSSEC (--with-openssl)"
test "X$PYTHON" = "X" || echo " Python tools (--with-python)"
test "X$XMLSTATS" = "X" || echo " XML statistics (--with-libxml2)"
test "X$JSONSTATS" = "X" || echo " JSON statistics (--with-libjson)"
test "X$ZLIB" = "X" || echo " HTTP zlib compression (--with-zlib)"
test "X$NZD_TOOLS" = "X" || echo " LMDB database to store configuration for 'addzone' zones (--with-lmdb)"
2018-04-05 11:45:41 +02:00
test "no" = "$use_libidn2" || echo " IDN support (--with-libidn2)"
2017-04-20 15:09:28 -07:00
fi
2014-01-18 11:51:07 -08:00
2017-07-19 15:53:01 +10:00
if test "no" != "$use_pkcs11"; then
2017-11-13 11:36:45 +11:00
if test "yes" = "$want_native_pkcs11"; then
echo " Native PKCS#11/Cryptoki support (--enable-native-pkcs11)"
else
echo " PKCS#11/Cryptoki support using OpenSSL (--with-pkcs11)"
fi
echo " Provider library: $PKCS11_PROVIDER"
2014-01-18 11:51:07 -08:00
fi
2017-04-20 15:09:28 -07:00
test "yes" = "$OPENSSL_ECDSA" -o "$PKCS11_ECDSA" && \
2017-11-13 11:36:45 +11:00
echo " ECDSA algorithm support (--with-ecdsa)"
2017-07-31 15:26:00 +02:00
test "yes" = "$OPENSSL_ED25519" -o "$PKCS11_ED25519" && \
2017-11-13 11:36:45 +11:00
echo " EDDSA algorithm support (--with-eddsa)"
2017-09-11 11:53:42 -07:00
test "yes" = "$enable_dnsrps" && \
2017-11-13 11:36:45 +11:00
echo " DNS Response Policy Service interface (--enable-dnsrps)"
2017-04-20 15:09:28 -07:00
test "yes" = "$enable_fixed" && \
2017-11-13 11:36:45 +11:00
echo " Allow 'fixed' rrset-order (--enable-fixed-rrset)"
2017-04-20 15:09:28 -07:00
test "yes" = "$want_backtrace" && \
2017-11-13 11:36:45 +11:00
echo " Print backtrace on crash (--enable-backtrace)"
2017-04-20 15:09:28 -07:00
test "minimal" = "$want_symtable" && \
2017-11-13 11:36:45 +11:00
echo " Use symbol table for backtrace, named only (--enable-symtable)"
2017-04-20 15:09:28 -07:00
test "yes" = "$want_symtable" -o "all" = "$want_symtable" && \
2017-11-13 11:36:45 +11:00
echo " Use symbol table for backtrace, all binaries (--enable-symtable=all)"
2017-04-20 15:09:28 -07:00
test "no" = "$use_libtool" || echo " Use GNU libtool (--with-libtool)"
test "yes" = "$want_querytrace" && \
2017-11-13 11:36:45 +11:00
echo " Very verbose query trace logging (--enable-querytrace)"
2017-04-20 15:09:28 -07:00
test "no" = "$atf" || echo " Automated Testing Framework (--with-atf)"
2018-05-16 11:58:15 -07:00
test "no" = "$want_autoval" || echo " DNSSEC validation active by default (--enable-auto-validation)"
2017-09-12 19:05:46 -07:00
echo " Cryptographic library for DNSSEC: $CRYPTOLIB"
2017-04-20 15:09:28 -07:00
echo " Dynamically loadable zone (DLZ) drivers:"
test "no" = "$use_dlz_bdb" || \
2017-11-13 11:36:45 +11:00
echo " Berkeley DB (--with-dlz-bdb)"
2017-04-20 15:09:28 -07:00
test "no" = "$use_dlz_ldap" || \
2017-11-13 11:36:45 +11:00
echo " LDAP (--with-dlz-ldap)"
2017-04-20 15:09:28 -07:00
test "no" = "$use_dlz_mysql" || \
2017-11-13 11:36:45 +11:00
echo " MySQL (--with-dlz-mysql)"
2017-04-20 15:09:28 -07:00
test "no" = "$use_dlz_odbc" || \
2017-11-13 11:36:45 +11:00
echo " ODBC (--with-dlz-odbc)"
2017-04-20 15:09:28 -07:00
test "no" = "$use_dlz_postgres" || \
2017-11-13 11:36:45 +11:00
echo " Postgres (--with-dlz-postgres)"
2017-04-20 15:09:28 -07:00
test "no" = "$use_dlz_filesystem" || \
2017-11-13 11:36:45 +11:00
echo " Filesystem (--with-dlz-filesystem)"
2017-04-20 15:09:28 -07:00
test "no" = "$use_dlz_stub" || \
2017-11-13 11:36:45 +11:00
echo " Stub (--with-dlz-stub)"
2017-04-20 15:09:28 -07:00
test "$use_dlz_bdb $use_dlz_ldap $use_dlz_mysql $use_dlz_odbc $use_dlz_postgres $use_dlz_filesystem $use_dlz_stub" = "no no no no no no no" && echo " None"
2017-09-30 10:01:01 -07:00
echo "-------------------------------------------------------------------------------"
2017-04-20 15:09:28 -07:00
echo "Features disabled or unavailable on this platform:"
$use_threads || echo " Multiprocessing support (--enable-threads)"
test "no" = "$enable_ipv6" -o "no" = "$found_ipv6" && \
2017-11-13 11:36:45 +11:00
echo " IPv6 support (--enable-ipv6)"
2017-04-20 15:09:28 -07:00
test "large" = "$use_tuning" || echo " Large-system tuning (--with-tuning)"
test "no" = "$use_dnstap" && \
2017-11-13 11:36:45 +11:00
echo " Allow 'dnstap' packet logging (--enable-dnstap)"
2017-04-20 15:09:28 -07:00
test "no" = "$use_geoip" && echo " GeoIP access control (--with-geoip)"
test "no" = "$use_gssapi" && echo " GSS-API (--with-gssapi)"
2017-09-11 11:53:42 -07:00
test "no" = "$enable_dnsrps" && \
2017-11-13 11:36:45 +11:00
echo " DNS Response Policy Service interface (--enable-dnsrps)"
2017-09-11 11:53:42 -07:00
2017-04-20 15:09:28 -07:00
test "yes" = "$enable_fixed" || \
2017-11-13 11:36:45 +11:00
echo " Allow 'fixed' rrset-order (--enable-fixed-rrset)"
2017-04-20 15:09:28 -07:00
2018-05-16 11:58:15 -07:00
test "no" = "$want_autoval" && echo " DNSSEC validation requires configuration (--disable-auto-validation)"
2017-04-20 15:09:28 -07:00
if test "X$CRYPTO" = "X" -o "yes" = "$want_native_pkcs11"
then
2017-11-13 11:36:45 +11:00
echo " OpenSSL cryptography/DNSSEC (--with-openssl)"
2017-04-20 15:09:28 -07:00
elif test "no" = "$use_pkcs11"; then
2017-11-13 11:36:45 +11:00
echo " PKCS#11/Cryptoki support (--with-pkcs11)"
2017-04-20 15:09:28 -07:00
fi
test "yes" = "$want_native_pkcs11" ||
2017-11-13 11:36:45 +11:00
echo " Native PKCS#11/Cryptoki support (--enable-native-pkcs11)"
2017-04-20 15:09:28 -07:00
test "X$CRYPTO" = "X" -o "yes" = "$OPENSSL_ECDSA" -o "yes" = "$PKCS11_ECDSA" || \
2017-11-13 11:36:45 +11:00
echo " ECDSA algorithm support (--with-ecdsa)"
2017-07-31 15:26:00 +02:00
test "X$CRYPTO" = "X" -o "yes" = "$OPENSSL_ED25519" -o "yes" = "$PKCS11_ED25519" || \
2017-11-13 11:36:45 +11:00
echo " EDDSA algorithm support (--with-eddsa)"
2017-04-20 15:09:28 -07:00
test "yes" = "$want_backtrace" || \
2017-11-13 11:36:45 +11:00
echo " Print backtrace on crash (--enable-backtrace)"
2017-04-20 15:09:28 -07:00
test "yes" = "$want_querytrace" || \
2017-11-13 11:36:45 +11:00
echo " Very verbose query trace logging (--enable-querytrace)"
2017-04-20 15:09:28 -07:00
test "yes" = "$use_libtool" || echo " Use GNU libtool (--with-libtool)"
test "no" = "$atf" && echo " Automated Testing Framework (--with-atf)"
test "X$PYTHON" = "X" && echo " Python tools (--with-python)"
test "X$XMLSTATS" = "X" && echo " XML statistics (--with-libxml2)"
test "X$JSONSTATS" = "X" && echo " JSON statistics (--with-libjson)"
test "X$ZLIB" = "X" && echo " HTTP zlib compression (--with-zlib)"
test "X$NZD_TOOLS" = "X" && echo " LMDB database to store configuration for 'addzone' zones (--with-lmdb)"
2018-04-05 11:45:41 +02:00
test "no" = "$use_libidn2" && echo " IDN support (--with-libidn2)"
2017-04-20 15:09:28 -07:00
2017-09-30 10:01:01 -07:00
echo "-------------------------------------------------------------------------------"
echo "Configured paths:"
echo " prefix: $prefix"
echo " sysconfdir: $sysconfdir"
echo " localstatedir: $localstatedir"
2017-04-20 15:09:28 -07:00
if test "X$ac_unrecognized_opts" != "X"; then
2017-11-13 11:36:45 +11:00
echo
echo "Unrecognized options:"
echo " $ac_unrecognized_opts"
2017-04-20 15:09:28 -07:00
fi
2017-09-30 10:01:01 -07:00
2017-07-19 15:53:01 +10:00
if test "yes" != "$enable_full_report"; then
2017-11-13 11:36:45 +11:00
echo "-------------------------------------------------------------------------------"
echo "For more detail, use --enable-full-report."
2017-04-20 15:09:28 -07:00
fi
echo "==============================================================================="
}
2017-07-19 15:53:01 +10:00
if test "yes" != "$silent"; then
2017-11-13 11:36:45 +11:00
report
2015-12-02 14:02:53 -08:00
fi
2013-07-10 20:54:08 -07:00
2000-07-04 01:20:53 +00:00
# Tell Emacs to edit this file in shell mode.
# Local Variables:
# mode: sh
# End: