# The POSIX ln(1) program. Non-POSIX systems may substitute
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.
AC_PATH_PROGS(ETAGS, etags emacs-etags)
# 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
# Perl is optional; it is used only by some of the system test scripts.
AC_PATH_PROGS(PERL, perl5 perl)
#
isc/list.h and others clash with the rest of BIND 9
# 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.
# Not all systems have dirname.
ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`"
ac_prog="`echo $INSTALL | sed 's%.*/%%'`"
test "$ac_dir" = "$ac_prog" && ac_dir=.
test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`"
INSTALL="$ac_dir/$ac_prog"
# 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
# However, if the user sets $CC to be something, let that override
if test "X$CC" = "X" ; then
# Use Sun's cc if it is available, but watch
# If setting CC here fails, the AC_PROG_CC done
# below might still find gcc.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
test -z "$ac_dir" && ac_dir=.
AC_CHECK_TYPE(uintptr_t,unsigned long)
case $ac_cv_header_unistd_h in
AC_MSG_CHECKING(if
unistd.h defines fd_set)
[fd_set read_set; return (0);],
ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"
case ac_cv_header_sys_select_h in
ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
case ac_cv_header_sys_select_h in
ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
AC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH)
# Find the machine's endian flavor.
AC_ARG_WITH(irs-gr,[ --with-irs-gr Build ....],
want_irs_gr="$withval", want_irs_gr="no")
yes) WANT_IRS_GR="#define WANT_IRS_GR 1"
WANT_IRS_GR_OBJS="\${WANT_IRS_GR_OBJS}"
*) WANT_IRS_GR="#undef WANT_IRS_GR" WANT_IRS_GR_OBJS="";;
AC_SUBST(WANT_IRS_GR_OBJS)
AC_ARG_WITH(irs-pw,[ --with-irs-pw Build ....],
want_irs_pw="$withval", want_irs_pw="no")
yes) WANT_IRS_PW="#define WANT_IRS_PW 1"
WANT_IRS_PW_OBJS="\${WANT_IRS_PW_OBJS}";;
*) WANT_IRS_PW="#undef WANT_IRS_PW" WANT_IRS_PW_OBJS="";;
AC_SUBST(WANT_IRS_PW_OBJS)
AC_ARG_WITH(irs-nis,[ --with-irs-nis Build ....],
want_irs_nis="$withval", want_irs_nis="no")
WANT_IRS_NIS="#define WANT_IRS_NIS 1"
WANT_IRS_NIS_OBJS="\${WANT_IRS_NIS_OBJS}"
WANT_IRS_NISGR_OBJS="\${WANT_IRS_NISGR_OBJS}";;
WANT_IRS_NISPW_OBJS="\${WANT_IRS_NISPW_OBJS}";;
WANT_IRS_NIS="#undef WANT_IRS_NIS"
AC_SUBST(WANT_IRS_NIS_OBJS)
AC_SUBST(WANT_IRS_NISGR_OBJS)
AC_SUBST(WANT_IRS_NISPW_OBJS)
main() { return(!have_db_h); }
WANT_IRS_DBPW_OBJS="\${WANT_IRS_DBPW_OBJS}"
AC_SUBST(WANT_IRS_DBPW_OBJS)
# was --with-randomdev specified?
AC_MSG_CHECKING(for random device)
[ --with-randomdev=PATH Specify path for random device],
use_randomdev="$withval", use_randomdev="unspec")
AC_MSG_RESULT($devrandom)
AC_CHECK_FILE($devrandom,
AC_DEFINE_UNQUOTED(PATH_RANDOMDEV,
AC_MSG_ERROR([--with-randomdev must specify a path])
AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, "$use_randomdev")
AC_MSG_RESULT(using "$use_randomdev")
if test "X$GCC" = "Xyes"; then
STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
ALWAYS_DEFINES="-D_REENTRANT"
DO_PTHREADS="#define DO_PTHREADS 1"
WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}"
WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}"
WANT_IRS_THREADS_OBJS="";;
WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}";;
WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}"
# We'd like to use sigwait() too
AC_CHECK_LIB(pthread, sigwait,
AC_CHECK_LIB(pthread, _Psigwait,
AC_DEFINE(HAVE_SIGWAIT),))))
AC_CHECK_FUNC(pthread_attr_getstacksize,
AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
# Additional OS-specific issues related to pthreads and sigwait.
# One more place to look for sigwait.
AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),)
# BSDI 3.0 through 4.0.1 needs pthread_init() to be
# called before certain pthreads calls. This is deprecated
AC_DEFINE(NEED_PTHREAD_INIT)
# LinuxThreads requires some changes to the way we
AC_DEFINE(HAVE_LINUXTHREADS)
# Ensure the right sigwait() semantics on Solaris and make
# sure we call pthread_setconcurrency.
AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
AC_CHECK_FUNC(pthread_setconcurrency,
AC_DEFINE(CALL_PTHREAD_SETCONCURRENCY))
AC_DEFINE(POSIX_GETPWUID_R)
AC_DEFINE(POSIX_GETPWNAM_R)
AC_DEFINE(POSIX_GETGRGID_R)
AC_DEFINE(POSIX_GETGRNAM_R)
AC_DEFINE(NEED_ENDNETGRENT_R)
AC_DEFINE(_PTHREADS_DRAFT4)
# UnixWare does things its own way.
AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
# Look for sysconf to allow detection of the number of processors.
AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
DO_PTHREADS="#undef DO_PTHREADS"
WANT_IRS_THREADSGR_OBJS=""
WANT_IRS_THREADSPW_OBJS=""
AC_SUBST(WANT_IRS_THREADSGR_OBJS)
AC_SUBST(WANT_IRS_THREADSPW_OBJS)
AC_SUBST(WANT_IRS_THREADS_OBJS)
AC_SUBST(WANT_THREADS_OBJS)
AC_CHECK_FUNC(strlcat, AC_DEFINE(HAVE_STRLCAT))
AC_CHECK_FUNC(if_nametoindex,
[USE_IFNAMELINKID="#define USE_IFNAMELINKID 1"],
[USE_IFNAMELINKID="#undef USE_IFNAMELINKID"])
AC_SUBST(USE_IFNAMELINKID)
ISC_THREAD_DIR=$thread_dir
[DAEMON_OBJS="" NEED_DAEMON="#undef NEED_DAEMON"]
[DAEMON_OBJS="\${DAEMON_OBJS}" NEED_DAEMON="#define NEED_DAEMON 1"]
[STRSEP_OBJS="" NEED_STRSEP="#undef NEED_STRSEP"]
[STRSEP_OBJS="\${STRSEP_OBJS}" NEED_STRSEP="#define NEED_STRSEP 1"]
AC_CHECK_FUNC(strerror, [NEED_STRERROR="#undef NEED_STRERROR"],
[NEED_STRERROR="#define NEED_STRERROR 1"])
# flockfile is usually provided by pthreads, but we may want to use it
# even if compiled with --disable-threads.
AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),)
# Indicate what the final decision was regarding threads.
AC_MSG_CHECKING(whether to build with threads)
# Additional compiler settings.
IRIX_DNSSEC_WARNINGS_HACK=""
if test "X$GCC" = "Xyes"; then
AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing)
CFLAGS=-fno-strict-aliasing
AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no])
if test "$FNOSTRICTALIASING" = "yes"; then
STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing"
STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith"
# The version of the C compiler that constantly warns about
# '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.
case "`$CC +W 123 2>&1`" in
# Turn off the pointlessly noisy warnings.
STD_CWARNINGS="+w1 +W 474,530,2193,2236"
LIBS="-Wl,+vnocompatwarnings $LIBS"
MKDEPPROG='cc -Ae -E -Wp,-M >
/dev/null 2>&1 | awk '"'"'BEGIN {colon=0; rec="";} { for (i = 0 ; i < NF; i++) { if (colon && a[$i]) continue; if ($i == "\\") continue; if (!colon) { rec = $i continue; } if ($i == ":") { rec = rec " :" colon = 1 continue; } if (length(rec $i) > 76) { print rec " \\"; rec = "\t" $i; a[$i] = 1; } else { rec = rec " " $i a[$i] = 1; } } } END {print rec}'"'"' >>$TMP'
MKDEPPROG='cc -Ae -E -Wp,-M >
/dev/null 2>>$TMP'
STD_CWARNINGS="-fullwarn -woff 1209"
# Silence more than 250 instances of
# "prototyped function redeclared without prototype"
# "variable ... was set but never used"
IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552"
# _GNU_SOURCE is needed to access the fd_bits field of struct fd_set, which
# is supposed to be opaque.
STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE"
AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK)
AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
# -lxnet buys us one big porting headache... standards, gotta love 'em.
# AC_CHECK_LIB(xnet, socket, ,
# AC_CHECK_LIB(socket, socket)
# AC_CHECK_LIB(nsl, inet_ntoa)
# Use this for now, instead:
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, inet_ntoa)
AC_CHECK_LIB(d4r, gethostbyname_r)
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, inet_ntoa)
AC_MSG_CHECKING(whether to use purify)
[ --with-purify[=PATH] use Rational purify],
use_purify="$withval", use_purify="no")
AC_PATH_PROG(purify_path, purify, purify)
purify_path="$use_purify"
if test -f $purify_path || test $purify_path = purify; then
AC_MSG_RESULT($purify_path)
PURIFYFLAGS="`echo $PURIFYOPTIONS`"
PURIFY="$purify_path $PURIFYFLAGS"
AC_MSG_ERROR([$purify_path not found.
Please choose the proper path with the following command:
configure --with-purify=PATH
[ --with-libtool use GNU libtool (following indented options supported)],
use_libtool="$withval", use_libtool="no")
LIBTOOL_MKDEP_SED='s;\.o;\.lo;'
LIBTOOL_MODE_COMPILE='--mode=compile'
LIBTOOL_MODE_INSTALL='--mode=install'
LIBTOOL_MODE_LINK='--mode=link'
# File name extension for static archive files, for those few places
# where they are treated differently from dynamic ones.
AC_SUBST(LIBTOOL_MKDEP_SED)
AC_SUBST(LIBTOOL_MODE_COMPILE)
AC_SUBST(LIBTOOL_MODE_INSTALL)
AC_SUBST(LIBTOOL_MODE_LINK)
# Here begins a very long section to determine the system's networking
# capabilities. The order of the tests is signficant.
[ --enable-ipv6 use IPv6 [default=autodetect]])
# We do the IPv6 compilation checking after libtool so that we can put
# the right suffix on the files.
AC_MSG_CHECKING(for IPv6 structures)
[struct sockaddr_in6 sin6; return (0);],
# 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)
[ --with-kame[=PATH] use Kame IPv6 [default path
/usr/local/v6]],
use_kame="$withval", use_kame="no")
Please choose the proper path with the following command:
configure --with-kame=PATH
# 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
ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1"
ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H"
ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR"
# Now delve deeper into the suitability of the IPv6 support.
HAS_INET6_STRUCTS="#define HAS_INET6_STRUCTS 1"
AC_MSG_CHECKING(for in6_addr)
[struct in6_addr in6; return (0);],
HAS_IN_ADDR6="#undef HAS_IN_ADDR6"
HAS_IN_ADDR6="#define HAS_IN_ADDR6 1"
isc_in_addr6_hack="#define in6_addr in_addr6"])
AC_MSG_CHECKING(for in6addr_any)
[struct in6_addr in6; in6 = in6addr_any; return (0);],
NEED_IN6ADDR_ANY="#undef NEED_IN6ADDR_ANY"],
NEED_IN6ADDR_ANY="#define NEED_IN6ADDR_ANY 1"])
AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
result="#define HAVE_SIN6_SCOPE_ID 1"],
result="#undef HAVE_SIN6_SCOPE_ID"])
HAVE_SIN6_SCOPE_ID="$result"
AC_MSG_CHECKING(for in6_pktinfo)
[struct in6_pktinfo xyzzy; return (0);],
ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
[AC_MSG_RESULT(no -- disabling runtime ipv6 support)
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
AC_MSG_CHECKING(for sockaddr_storage)
[struct sockaddr_storage xyzzy; return (0);],
HAVE_SOCKADDR_STORAGE="#define HAVE_SOCKADDR_STORAGE 1"],
HAVE_SOCKADDR_STORAGE="#undef HAVE_SOCKADDR_STORAGE"])
HAS_INET6_STRUCTS="#undef HAS_INET6_STRUCTS"
NEED_IN6ADDR_ANY="#undef NEED_IN6ADDR_ANY"
ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
HAVE_SIN6_SCOPE_ID="#define HAVE_SIN6_SCOPE_ID 1"
HAVE_SOCKADDR_STORAGE="#undef HAVE_SOCKADDR_STORAGE"
AC_SUBST(HAS_INET6_STRUCTS)
AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
AC_SUBST(NEED_IN6ADDR_ANY)
AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
AC_SUBST(HAVE_SIN6_SCOPE_ID)
AC_SUBST(HAVE_SOCKADDR_STORAGE)
# Check for network functions that are often missing. We do this
# after the libtool checking, so we can put the right suffix on
# the files. It also needs to come after checking for a Kame add-on,
# which provides some (all?) of the desired functions.
AC_MSG_CHECKING([for inet_ntop])
[inet_ntop(0, 0, 0, 0); return (0);],
ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"])
AC_MSG_CHECKING([for inet_pton])
[inet_pton(0, 0, 0); return (0);],
ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"])
AC_MSG_CHECKING([for inet_aton])
[struct in_addr in; inet_aton(0, &in); return (0);],
ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON"],
ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1"])
AC_SUBST(ISC_PLATFORM_NEEDNTOP)
AC_SUBST(ISC_PLATFORM_NEEDPTON)
AC_SUBST(ISC_PLATFORM_NEEDATON)
# Look for a 4.4BSD-style sa_len member in struct sockaddr.
# Turn on 4.4BSD style sa_len support.
AC_MSG_CHECKING(for sa_len in struct sockaddr)
[struct sockaddr sa;
sa.sa_len = 0; return (0);],
HAVE_SA_LEN="#define HAVE_SA_LEN 1"],
HAVE_SA_LEN="#undef HAVE_SA_LEN"])
*-bsdi[2345]*) have_minimum_ifreq=yes;;
*-darwin*) have_minimum_ifreq=yes;;
*-freebsd*) have_minimum_ifreq=yes;;
*-lynxos*) have_minimum_ifreq=yes;;
*-netbsd*) have_minimum_ifreq=yes;;
*-next*) have_minimum_ifreq=yes;;
*-openbsd*) have_minimum_ifreq=yes;;
*-rhapsody*) have_minimum_ifreq=yes;;
case "$have_minimum_ifreq" in
HAVE_MINIMUM_IFREQ="#define HAVE_MINIMUM_IFREQ 1";;
HAVE_MINIMUM_IFREQ="#undef HAVE_MINIMUM_IFREQ";;
HAVE_MINIMUM_IFREQ="#undef HAVE_MINIMUM_IFREQ";;
AC_SUBST(HAVE_MINIMUM_IFREQ)
SOLARIS_BITTYPES="#undef NEED_SOLARIS_BITTYPES"
BSD_COMP="#undef BSD_COMP"
USE_FIONBIO_IOCTL="#undef USE_FIONBIO_IOCTL"
PORT_NONBLOCK="#define PORT_NONBLOCK O_NONBLOCK"
HAVE_MD5="#undef HAVE_MD5"
USE_POLL="#undef HAVE_POLL"
SOLARIS2="#undef SOLARIS2"
PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
BSD_COMP="#define BSD_COMP 1"
SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
USE_FIONBIO_IOCTL="#define USE_FIONBIO_IOCTL 1"
SOLARIS2="#define SOLARIS2 1"
BSD_COMP="#define BSD_COMP 1"
SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
SOLARIS2="#define SOLARIS2 1"
BSD_COMP="#define BSD_COMP 1"
SOLARIS2="#define SOLARIS2 1"
*-solaris2*) BSD_COMP="#define BSD_COMP 1"
USE_POLL="#define USE_POLL 1"
HAVE_MD5="#define HAVE_MD5 1"
SOLARIS2="#define SOLARIS2 1"
AC_SUBST(SOLARIS_BITTYPES)
AC_SUBST(USE_FIONBIO_IOCTL)
PORT_INCLUDE=${PORT_DIR}/include
# Look for a 4.4BSD or 4.3BSD struct msghdr
AC_MSG_CHECKING(for struct msghdr flavor)
ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"],
ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])
AC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)
AC_MSG_CHECKING(for type in_port_t)
[in_port_t port = 25; return (0);],
ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"],
ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])
AC_SUBST(ISC_PLATFORM_NEEDPORTT)
AC_MSG_CHECKING(for struct addrinfo)
[struct addrinfo a; return (0);],
AC_DEFINE(HAVE_ADDRINFO)],
AC_MSG_CHECKING(for int sethostent)
[int i = sethostent(0); return(0);],
AC_MSG_CHECKING(for int endhostent)
[int i = endhostent(); return(0);],
ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"],
ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"])
AC_SUBST(ISC_LWRES_ENDHOSTENTINT)
AC_MSG_CHECKING(for int setnetent)
[int i = setnetent(0); return(0);],
ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"],
ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"])
AC_SUBST(ISC_LWRES_SETNETENTINT)
AC_MSG_CHECKING(for int endnetent)
[int i = endnetent(); return(0);],
ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"],
ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"])
AC_SUBST(ISC_LWRES_ENDNETENTINT)
AC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...))
struct hostent *gethostbyaddr(const void *, size_t, int);],
ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"],
ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"])
AC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID)
AC_MSG_CHECKING(for h_errno in
netdb.h)
[h_errno = 1; return(0);],
ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"],
ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1"])
AC_SUBST(ISC_LWRES_NEEDHERRNO)
AC_CHECK_FUNC(getipnodebyname,
[ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
[ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
AC_CHECK_FUNC(getnameinfo,
[ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"],
[ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"])
AC_CHECK_FUNC(getaddrinfo,
[ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"
AC_DEFINE(HAVE_GETADDRINFO)],
[ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])
AC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))
AC_SUBST(ISC_LWRES_GETIPNODEPROTO)
AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)
[NEED_PSELECT="#undef NEED_PSELECT"],
[NEED_PSELECT="#define NEED_PSELECT"])
AC_CHECK_FUNC(gettimeofday,
[NEED_GETTIMEOFDAY="#undef NEED_GETTIMEOFDAY"],
[NEED_GETTIMEOFDAY="#define NEED_GETTIMEOFDAY 1"])
AC_SUBST(NEED_GETTIMEOFDAY)
[HAVE_STRNDUP="#define HAVE_STRNDUP 1"],
[HAVE_STRNDUP="#undef HAVE_STRNDUP"])
# Look for a sysctl call to get the list of network interfaces.
AC_MSG_CHECKING(for interface list sysctl)
AC_EGREP_CPP(found_rt_iflist, [
AC_DEFINE(HAVE_IFLIST_SYSCTL)],
# Check for some other useful functions that are not ever-present.
[ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
[ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
[ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"],
[ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O"
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS
print.c"
ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"])
AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
[USE_SYSERROR_LIST="#undef USE_SYSERROR_LIST"],
[USE_SYSERROR_LIST="#define USE_SYSERROR_LIST 1"])
AC_SUBST(USE_SYSERROR_LIST)
# Determine the printf format characters to use when printing
# values of type isc_int64_t. We make the assumption that platforms
# want "%ld" and everyone else can use "%lld". Win32 uses "%I64d",
# but that's defined elsewhere since we don't use configure on Win32.
AC_MSG_CHECKING(printf format modifier for 64-bit integers)
AC_TRY_RUN([main() { exit(!(sizeof(long long int) == sizeof(long int))); }],
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'],
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'],
[AC_MSG_RESULT(default ll)
ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'])
AC_SUBST(ISC_PLATFORM_QUADFORMAT)
AC_CHECK_FUNC(chroot, AC_DEFINE(HAVE_CHROOT))
# for accept, recvfrom, getpeername etc.
AC_MSG_CHECKING(for socket length type)
int accept(int, struct sockaddr *, socklen_t *);
[ISC_SOCKLEN_T="#define ISC_SOCKLEN_T socklen_t"
AC_MSG_RESULT(socklen_t)]
int accept(int, struct sockaddr *, unsigned int *);
[ISC_SOCKLEN_T="#define ISC_SOCKLEN_T unsigned int"
AC_MSG_RESULT(unsigned int)]
int accept(int, struct sockaddr *, unsigned long *);
[ISC_SOCKLEN_T="#define ISC_SOCKLEN_T unsigned long"
AC_MSG_RESULT(unsigned long)]
int accept(int, struct sockaddr *, long *);
[ISC_SOCKLEN_T="#define ISC_SOCKLEN_T long"
ISC_SOCKLEN_T="#define ISC_SOCKLEN_T int"
AC_CHECK_FUNC(getgrouplist,
getgrouplist(const char *name, int basegid, int *groups, int *ngroups) {
GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, int basegid, int *groups, int *ngroups"
GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups"
GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups"
AC_DEFINE(NEED_GETGROUPLIST)
AC_SUBST(GETGROUPLIST_ARGS)
AC_CHECK_FUNC(setgroupent,,AC_DEFINE(NEED_SETGROUPENT))
AC_CHECK_FUNC(getnetbyaddr_r,
getnetbyaddr_r(long net, int type, struct netent *result, char *buffer,
NET_R_ARGS="#define NET_R_ARGS char *buf, int buflen"
NET_R_BAD="#define NET_R_BAD NULL"
NET_R_COPY="#define NET_R_COPY buf, buflen"
NET_R_COPY_ARGS="#define NET_R_COPY_ARGS NET_R_ARGS"
NET_R_OK="#define NET_R_OK nptr"
NET_R_SETANSWER="#undef NET_R_SETANSWER"
NET_R_RETURN="#define NET_R_RETURN struct netent *"
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
NETENT_DATA="#undef NETENT_DATA"
int getnetbyaddr_r (unsigned long int, int, struct netent *,
char *, size_t, struct netent **, int *);
NET_R_ARGS="#define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop"
NET_R_BAD="#define NET_R_BAD ERANGE"
NET_R_COPY="#define NET_R_COPY buf, buflen"
NET_R_COPY_ARGS="#define NET_R_COPY_ARGS char *buf, size_t buflen"
NET_R_OK="#define NET_R_OK 0"
NET_R_SETANSWER="#define NET_R_SETANSWER 1"
NET_R_RETURN="#define NET_R_RETURN int"
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T unsigned long int"
NETENT_DATA="#undef NETENT_DATA"
extern int getnetbyaddr_r(int, int, struct netent *, struct netent_data *);
NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"
NET_R_BAD="#define NET_R_BAD (-1)"
NET_R_COPY="#define NET_R_COPY ndptr"
NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"
NET_R_OK="#define NET_R_OK 0"
NET_R_SETANSWER="#undef NET_R_SETANSWER"
NET_R_RETURN="#define NET_R_RETURN int"
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T int"
NETENT_DATA="#define NETENT_DATA 1"
int getnetbyaddr_r (in_addr_t, int, struct netent *, struct netent_data *);
NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"
NET_R_BAD="#define NET_R_BAD (-1)"
NET_R_COPY="#define NET_R_COPY ndptr"
NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"
NET_R_OK="#define NET_R_OK 0"
NET_R_SETANSWER="#undef NET_R_SETANSWER"
NET_R_RETURN="#define NET_R_RETURN int"
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
NETENT_DATA="#define NETENT_DATA 1"
int getnetbyaddr_r (long, int, struct netent *, struct netent_data *);
NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"
NET_R_BAD="#define NET_R_BAD (-1)"
NET_R_COPY="#define NET_R_COPY ndptr"
NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"
NET_R_OK="#define NET_R_OK 0"
NET_R_SETANSWER="#undef NET_R_SETANSWER"
NET_R_RETURN="#define NET_R_RETURN int"
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
NETENT_DATA="#define NETENT_DATA 1"
int getnetbyaddr_r (uint32_t, int, struct netent *,
char *, size_t, struct netent **, int *);
NET_R_ARGS="#define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop"
NET_R_BAD="#define NET_R_BAD ERANGE"
NET_R_COPY="#define NET_R_COPY buf, buflen"
NET_R_COPY_ARGS="#define NET_R_COPY_ARGS char *buf, size_t buflen"
NET_R_OK="#define NET_R_OK 0"
NET_R_SETANSWER="#define NET_R_SETANSWER 1"
NET_R_RETURN="#define NET_R_RETURN int"
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T unsigned long int"
NETENT_DATA="#undef NETENT_DATA"
NET_R_ARGS="#define NET_R_ARGS char *buf, int buflen"
NET_R_BAD="#define NET_R_BAD NULL"
NET_R_COPY="#define NET_R_COPY buf, buflen"
NET_R_COPY_ARGS="#define NET_R_COPY_ARGS NET_R_ARGS"
NET_R_OK="#define NET_R_OK nptr"
NET_R_SETANSWER="#undef NET_R_SETANSWER"
NET_R_RETURN="#define NET_R_RETURN struct netent *"
GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
NETENT_DATA="#undef NETENT_DATA"
*dec-osf*) GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T int" ;;
AC_SUBST(NET_R_COPY_ARGS)
AC_SUBST(NET_R_SETANSWER)
AC_SUBST(GETNETBYADDR_ADDR_T)
AC_CHECK_FUNC(setnetent_r,
NET_R_ENT_ARGS="#undef NET_R_ENT_ARGS /*empty*/"
NET_R_SET_RESULT="#undef NET_R_SET_RESULT /*empty*/"
NET_R_SET_RETURN="#define NET_R_SET_RETURN void"
extern int setnetent_r(int, struct netent_data *);
NET_R_ENT_ARGS="#define NET_R_ENT_ARGS struct netent_data *ndptr"
NET_R_SET_RESULT="#define NET_R_SET_RESULT NET_R_OK"
NET_R_SET_RETURN="#define NET_R_SET_RETURN int"
NET_R_ENT_ARGS="#undef NET_R_ENT_ARGS /*empty*/"
NET_R_SET_RESULT="#undef NET_R_SET_RESULT /*empty*/"
NET_R_SET_RETURN="#define NET_R_SET_RETURN void"
AC_SUBST(NET_R_SET_RESULT)
AC_SUBST(NET_R_SET_RETURN)
AC_CHECK_FUNC(endnetent_r,
NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
NET_R_END_RETURN="#define NET_R_END_RETURN void"
extern int endnetent_r(struct netent_data *);
NET_R_END_RESULT="#define NET_R_END_RESULT(x) return (x)"
NET_R_END_RETURN="#define NET_R_END_RETURN int"
extern void endnetent_r(struct netent_data *);
NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
NET_R_END_RETURN="#define NET_R_END_RETURN void"
NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
NET_R_END_RETURN="#define NET_R_END_RETURN void"
AC_SUBST(NET_R_END_RESULT)
AC_SUBST(NET_R_END_RETURN)
AC_CHECK_FUNC(getgrnam_r,,AC_DEFINE(NEED_GETGRNAM_R))
AC_CHECK_FUNC(getgrgid_r,,AC_DEFINE(NEED_GETGRGID_R))
AC_CHECK_FUNC(getgrent_r,
struct group *getgrent_r(struct group *grp, char *buffer,
GROUP_R_ARGS="#define GROUP_R_ARGS char *buf, int buflen"
GROUP_R_BAD="#define GROUP_R_BAD NULL"
GROUP_R_OK="#define GROUP_R_OK gptr"
GROUP_R_RETURN="#define GROUP_R_RETURN struct group *"
GROUP_R_ARGS="#define GROUP_R_ARGS char *buf, int buflen"
GROUP_R_BAD="#define GROUP_R_BAD NULL"
GROUP_R_OK="#define GROUP_R_OK gptr"
GROUP_R_RETURN="#define GROUP_R_RETURN struct group *"
AC_DEFINE(NEED_GETGRENT_R)
AC_CHECK_FUNC(endgrent_r,
GROUP_R_END_RESULT="#define GROUP_R_END_RESULT(x) /*empty*/"
GROUP_R_END_RETURN="#define GROUP_R_END_RETURN void"
GROUP_R_ENT_ARGS="#define GROUP_R_ENT_ARGS void"
AC_DEFINE(NEED_ENDGRENT_R)
AC_SUBST(GROUP_R_END_RESULT)
AC_SUBST(GROUP_R_END_RETURN)
AC_SUBST(GROUP_R_ENT_ARGS)
AC_CHECK_FUNC(setgrent_r,
GROUP_R_SET_RESULT="#undef GROUP_R_SET_RESULT /*empty*/"
GROUP_R_SET_RETURN="#define GROUP_R_SET_RETURN void"
AC_DEFINE(NEED_SETGRENT_R)
AC_SUBST(GROUP_R_SET_RESULT)
AC_SUBST(GROUP_R_SET_RETURN)
AC_CHECK_FUNC(gethostbyname_r,
struct hostent *gethostbyname_r
(const char *name, struct hostent *hp, char *buf, int len, int *h_errnop) {}
HOST_R_ARGS="#define HOST_R_ARGS char *buf, int buflen, int *h_errnop"
HOST_R_BAD="#define HOST_R_BAD NULL"
HOST_R_COPY="#define HOST_R_COPY buf, buflen"
HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
HOST_R_OK="#define HOST_R_OK hptr"
HOST_R_RETURN="#define HOST_R_RETURN struct hostent *"
HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
HOSTENT_DATA="#undef HOSTENT_DATA"
int gethostbyname_r(const char *name,
struct hostent_data *hdptr);
HOST_R_ARGS="#define HOST_R_ARGS struct hostent_data *hdptr"
HOST_R_BAD="#define HOST_R_BAD (-1)"
HOST_R_COPY="#define HOST_R_COPY hdptr"
HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS HOST_R_ARGS"
HOST_R_ERRNO="#undef HOST_R_ERRNO"
HOST_R_OK="#define HOST_R_OK 0"
HOST_R_RETURN="#define HOST_R_RETURN int"
HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
HOSTENT_DATA="#define HOSTENT_DATA 1"
extern int gethostbyname_r (const char *,
HOST_R_ARGS="#define HOST_R_ARGS char *buf, size_t buflen, struct hostent **answerp, int *h_errnop"
HOST_R_BAD="#define HOST_R_BAD ERANGE"
HOST_R_COPY="#define HOST_R_COPY buf, buflen"
HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
HOST_R_OK="#define HOST_R_OK 0"
HOST_R_RETURN="#define HOST_R_RETURN int"
HOST_R_SETANSWER="#define HOST_R_SETANSWER 1"
HOSTENT_DATA="#undef HOSTENT_DATA"
HOST_R_ARGS="#define HOST_R_ARGS char *buf, int buflen, int *h_errnop"
HOST_R_BAD="#define HOST_R_BAD NULL"
HOST_R_COPY="#define HOST_R_COPY buf, buflen"
HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
HOST_R_OK="#define HOST_R_OK hptr"
HOST_R_RETURN="#define HOST_R_RETURN struct hostent *"
HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
HOSTENT_DATA="#undef HOSTENT_DATA"
AC_SUBST(HOST_R_COPY_ARGS)
AC_SUBST(HOST_R_SETANSWER)
AC_CHECK_FUNC(endhostent_r,
int endhostent_r(struct hostent_data *buffer);
HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) return (x)"
HOST_R_END_RETURN="#define HOST_R_END_RETURN int"
HOST_R_ENT_ARGS="#define HOST_R_ENT_ARGS struct hostent_data *hdptr"
extern void endhostent_r(struct hostent_data *ht_data);
HOST_R_END_RESULT="#define HOST_R_END_RESULT(x)"
HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
HOST_R_ENT_ARGS="#define HOST_R_ENT_ARGS struct hostent_data *hdptr"
extern void endhostent_r(void);
HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) /*empty*/"
HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
HOST_R_ENT_ARGS="#undef HOST_R_ENT_ARGS /*empty*/"
HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) /*empty*/"
HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
HOST_R_ENT_ARGS="#undef HOST_R_ENT_ARGS /*empty*/"
AC_SUBST(HOST_R_END_RESULT)
AC_SUBST(HOST_R_END_RETURN)
AC_SUBST(HOST_R_ENT_ARGS)
AC_CHECK_FUNC(sethostent_r,
extern void sethostent_r(int flag, struct hostent_data *ht_data);],[],
[HOST_R_SET_RESULT="#undef HOST_R_SET_RESULT /*empty*/"
HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"],
extern int sethostent_r(int flag, struct hostent_data *ht_data);],[],
[HOST_R_SET_RESULT="#define HOST_R_SET_RESULT 0"
HOST_R_SET_RETURN="#define HOST_R_SET_RETURN int"],
void sethostent_r (int);],[],
[HOST_R_SET_RESULT="#undef HOST_R_SET_RESULT"
HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"],
HOST_R_SET_RESULT="#undef HOST_R_SET_RESULT"
HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"
AC_SUBST(HOST_R_SET_RESULT)
AC_SUBST(HOST_R_SET_RETURN)
AC_MSG_CHECKING(struct passwd element pw_class)
],[struct passwd *pw; pw->pw_class = "";],
SETPWENT_VOID="#define SETPWENT_VOID 1"
SETPWENT_VOID="#undef SETPWENT_VOID"
SETGRENT_VOID="#define SETGRENT_VOID 1"
SETGRENT_VOID="#undef SETGRENT_VOID"
AC_CHECK_FUNC(getnetgrent_r,
int getnetgrent_r(char **m, char **u, char **d, char *b, int l) {}
NGR_R_ARGS="#define NGR_R_ARGS char *buf, int buflen"
NGR_R_BAD="#define NGR_R_BAD (0)"
NGR_R_COPY="#define NGR_R_COPY buf, buflen"
NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
NGR_R_OK="#define NGR_R_OK 1"
NGR_R_RETURN="#define NGR_R_RETURN int"
int getnetgrent_r(char **m, char **u, char **d, char *b, size_t l) {}
NGR_R_ARGS="#define NGR_R_ARGS char *buf, size_t buflen"
NGR_R_BAD="#define NGR_R_BAD (0)"
NGR_R_COPY="#define NGR_R_COPY buf, buflen"
NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
NGR_R_OK="#define NGR_R_OK 1"
NGR_R_RETURN="#define NGR_R_RETURN int"
extern int getnetgrent_r( char **, char **, char **, void **);
NGR_R_ARGS="#define NGR_R_ARGS void **buf"
NGR_R_BAD="#define NGR_R_BAD (0)"
NGR_R_COPY="#define NGR_R_COPY buf"
NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
NGR_R_OK="#define NGR_R_OK 1"
NGR_R_RETURN="#define NGR_R_RETURN int"
NGR_R_PRIVATE="#define NGR_R_PRIVATE 1"
NGR_R_ARGS="#define NGR_R_ARGS char *buf, int buflen"
NGR_R_BAD="#define NGR_R_BAD (0)"
NGR_R_COPY="#define NGR_R_COPY buf, buflen"
NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
NGR_R_OK="#define NGR_R_OK 1"
NGR_R_RETURN="#define NGR_R_RETURN int"
AC_SUBST(NGR_R_COPY_ARGS)
AC_CHECK_FUNC(endnetgrent_r,
void endnetgrent_r(void **ptr);
NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /* empty */"
NGR_R_END_RETURN="#define NGR_R_END_RETURN void"
NGR_R_ENT_ARGS="#define NGR_R_ENT_ARGS NGR_R_ARGS"
NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) return (x)"
NGR_R_END_RETURN="#define NGR_R_END_RETURN int"
NGR_R_ENT_ARGS="#define NGR_R_ENT_ARGS NGR_R_ARGS"
NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /*empty*/"
NGR_R_END_RETURN="#define NGR_R_END_RETURN void"
NGR_R_ENT_ARGS="#undef NGR_R_ENT_ARGS /*empty*/"
AC_DEFINE(NEED_ENDNETGRENT_R)
AC_SUBST(NGR_R_END_RESULT)
AC_SUBST(NGR_R_END_RETURN)
AC_CHECK_FUNC(setnetgrent_r,
NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /*empty*/"
NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
NGR_R_SET_RESULT="#define NGR_R_SET_RESULT NGR_R_OK"
NGR_R_SET_RETURN="#define NGR_R_SET_RETURN int"
NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /*empty*/"
NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
AC_SUBST(NGR_R_SET_RESULT)
AC_SUBST(NGR_R_SET_RETURN)
AC_CHECK_FUNC(innetgr_r,,AC_DEFINE(NEED_INNETGR_R))
AC_CHECK_FUNC(getprotoent_r,
struct protoent *getprotoent_r(struct protoent *result,
char *buffer, int buflen) {}
PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen"
PROTO_R_BAD="#define PROTO_R_BAD NULL"
PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS"
PROTO_R_OK="#define PROTO_R_OK pptr"
PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER"
PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *"
PROTOENT_DATA="#undef PROTOENT_DATA"
int getprotoent_r (struct protoent *, char *, size_t, struct protoent **);
PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, size_t buflen, struct protoent **answerp"
PROTO_R_BAD="#define PROTO_R_BAD ERANGE"
PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS char *buf, size_t buflen"
PROTO_R_OK="#define PROTO_R_OK 0"
PROTO_R_SETANSWER="#define PROTO_R_SETANSWER 1"
PROTO_R_RETURN="#define PROTO_R_RETURN int"
PROTOENT_DATA="#undef PROTOENT_DATA"
int getprotoent_r (struct protoent *, struct protoent_data *prot_data);
PROTO_R_ARGS="#define PROTO_R_ARGS struct protoent_data *prot_data"
PROTO_R_BAD="#define PROTO_R_BAD (-1)"
PROTO_R_COPY="#define PROTO_R_COPY prot_data"
PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS struct protoent_data *pdptr"
PROTO_R_OK="#define PROTO_R_OK 0"
PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER"
PROTO_R_RETURN="#define PROTO_R_RETURN int"
PROTOENT_DATA="#define PROTOENT_DATA 1"
PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen"
PROTO_R_BAD="#define PROTO_R_BAD NULL"
PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS"
PROTO_R_OK="#define PROTO_R_OK pptr"
PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER"
PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *"
PROTOENT_DATA="#undef PROTOENT_DATA"
AC_SUBST(PROTO_R_COPY_ARGS)
AC_SUBST(PROTO_R_SETANSWER)
AC_CHECK_FUNC(endprotoent_r,
void endprotoent_r(void);
PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/"
PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void"
PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS"
PROTO_R_ENT_UNUSED="#undef PROTO_R_ENT_UNUSED"
void endprotoent_r(struct protoent_data *);
PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/"
PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void"
PROTO_R_ENT_ARGS="#define PROTO_R_ENT_ARGS struct protoent_data *proto_data"
PROTO_R_ENT_UNUSED="#define PROTO_R_ENT_UNUSED UNUSED(proto_data)"
int endprotoent_r(struct protoent_data *);
PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) return(0)"
PROTO_R_END_RETURN="#define PROTO_R_END_RETURN int"
PROTO_R_ENT_ARGS="#define PROTO_R_ENT_ARGS struct protoent_data *proto_data"
PROTO_R_ENT_UNUSED="#define PROTO_R_ENT_UNUSED UNUSED(proto_data)"
PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/"
PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void"
PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS /*empty*/"
PROTO_R_ENT_UNUSED="#undef PROTO_R_ENT_UNUSED"
AC_SUBST(PROTO_R_END_RESULT)
AC_SUBST(PROTO_R_END_RETURN)
AC_SUBST(PROTO_R_ENT_ARGS)
AC_SUBST(PROTO_R_ENT_UNUSED)
AC_CHECK_FUNC(setprotoent_r,
void setprotoent_r __P((int));
PROTO_R_SET_RESULT="#undef PROTO_R_SET_RESULT"
PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void"
int setprotoent_r (int, struct protoent_data *);
PROTO_R_SET_RESULT="#define PROTO_R_SET_RESULT (0)"
PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN int"
PROTO_R_SET_RESULT="#undef PROTO_R_SET_RESULT"
PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void"
AC_SUBST(PROTO_R_SET_RESULT)
AC_SUBST(PROTO_R_SET_RETURN)
AC_CHECK_FUNC(getpwent_r,
getpwent_r(struct passwd *pwptr, char *buf, int buflen) {}
PASS_R_ARGS="#define PASS_R_ARGS char *buf, int buflen"
PASS_R_BAD="#define PASS_R_BAD NULL"
PASS_R_COPY="#define PASS_R_COPY buf, buflen"
PASS_R_COPY_ARGS="#define PASS_R_COPY_ARGS PASS_R_ARGS"
PASS_R_OK="#define PASS_R_OK pwptr"
PASS_R_RETURN="#define PASS_R_RETURN struct passwd *"
PASS_R_ARGS="#define PASS_R_ARGS char *buf, int buflen"
PASS_R_BAD="#define PASS_R_BAD NULL"
PASS_R_COPY="#define PASS_R_COPY buf, buflen"
PASS_R_COPY_ARGS="#define PASS_R_COPY_ARGS PASS_R_ARGS"
PASS_R_OK="#define PASS_R_OK pwptr"
PASS_R_RETURN="#define PASS_R_RETURN struct passwd *"
AC_DEFINE(NEED_GETPWENT_R)
AC_SUBST(PASS_R_COPY_ARGS)
AC_CHECK_FUNC(endpwent_r,
void endpwent_r(FILE **pwfp);
PASS_R_END_RESULT="#define PASS_R_END_RESULT(x) /*empty*/"
PASS_R_END_RETURN="#define PASS_R_END_RETURN void"
PASS_R_ENT_ARGS="#define PASS_R_ENT_ARGS FILE **pwptr"
PASS_R_END_RESULT="#define PASS_R_END_RESULT(x) /*empty*/"
PASS_R_END_RETURN="#define PASS_R_END_RETURN void"
PASS_R_ENT_ARGS="#undef PASS_R_ENT_ARGS"
AC_DEFINE(NEED_ENDPWENT_R)
AC_SUBST(PASS_R_END_RESULT)
AC_SUBST(PASS_R_END_RETURN)
AC_SUBST(PASS_R_ENT_ARGS)
AC_CHECK_FUNC(setpassent_r,,AC_DEFINE(NEED_SETPASSENT_R))
AC_CHECK_FUNC(setpassent,,AC_DEFINE(NEED_SETPASSENT))
AC_CHECK_FUNC(setpwent_r,
void setpwent_r(FILE **pwfp);
PASS_R_SET_RESULT="#undef PASS_R_SET_RESULT /* empty */"
PASS_R_SET_RETURN="#define PASS_R_SET_RETURN int"
int setpwent_r(FILE **pwfp);
PASS_R_SET_RESULT="#define PASS_R_SET_RESULT 0"
PASS_R_SET_RETURN="#define PASS_R_SET_RETURN int"
PASS_R_SET_RESULT="#undef PASS_R_SET_RESULT /*empty*/"
PASS_R_SET_RETURN="#define PASS_R_SET_RETURN void"
AC_DEFINE(NEED_SETPWENT_R)
AC_SUBST(PASS_R_SET_RESULT)
AC_SUBST(PASS_R_SET_RETURN)
AC_CHECK_FUNC(getpwnam_r,,AC_DEFINE(NEED_GETPWNAM_R))
AC_CHECK_FUNC(getpwuid_r,,AC_DEFINE(NEED_GETPWUID_R))
AC_CHECK_FUNC(getservent_r,
getservent_r(struct servent *result, char *buffer, int buflen) {}
SERV_R_ARGS="#define SERV_R_ARGS char *buf, int buflen"
SERV_R_BAD="#define SERV_R_BAD NULL"
SERV_R_COPY="#define SERV_R_COPY buf, buflen"
SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS SERV_R_ARGS"
SERV_R_OK="#define SERV_R_OK sptr"
SERV_R_SETANSWER="#undef SERV_R_SETANSWER"
SERV_R_RETURN="#define SERV_R_RETURN struct servent *"
getservent_r (struct servent *, char *, size_t, struct servent **);
SERV_R_ARGS="#define SERV_R_ARGS char *buf, size_t buflen, struct servent **answerp"
SERV_R_BAD="#define SERV_R_BAD ERANGE"
SERV_R_COPY="#define SERV_R_COPY buf, buflen"
SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS char *buf, size_t buflen"
SERV_R_OK="#define SERV_R_OK (0)"
SERV_R_SETANSWER="#define SERV_R_SETANSWER 1"
SERV_R_RETURN="#define SERV_R_RETURN int"
getservent_r (struct servent *, struct servent_data *serv_data);
SERV_R_ARGS="#define SERV_R_ARGS struct servent_data *serv_data"
SERV_R_BAD="#define SERV_R_BAD (-1)"
SERV_R_COPY="#define SERV_R_COPY serv_data"
SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS struct servent_data *sdptr"
SERV_R_OK="#define SERV_R_OK (0)"
SERV_R_SETANSWER="#undef SERV_R_SETANSWER"
SERV_R_RETURN="#define SERV_R_RETURN int"
SERVENT_DATA="#define SERVENT_DATA 1"
SERV_R_ARGS="#define SERV_R_ARGS char *buf, int buflen"
SERV_R_BAD="#define SERV_R_BAD NULL"
SERV_R_COPY="#define SERV_R_COPY buf, buflen"
SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS SERV_R_ARGS"
SERV_R_OK="#define SERV_R_OK sptr"
SERV_R_SETANSWER="#undef SERV_R_SETANSWER"
SERV_R_RETURN="#define SERV_R_RETURN struct servent *"
AC_SUBST(SERV_R_COPY_ARGS)
AC_SUBST(SERV_R_SETANSWER)
AC_CHECK_FUNC(endservent_r,
SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/"
SERV_R_END_RETURN="#define SERV_R_END_RETURN void "
SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/"
SERV_R_ENT_UNUSED="#undef SERV_R_ENT_UNUSED /*empty*/"
void endservent_r(struct servent_data *serv_data);
SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/"
SERV_R_END_RETURN="#define SERV_R_END_RETURN void "
SERV_R_ENT_ARGS="#define SERV_R_ENT_ARGS struct servent_data *serv_data"
SERV_R_ENT_UNUSED="#define SERV_R_ENT_UNUSED UNUSED(serv_data)"
int endservent_r(struct servent_data *serv_data);
SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) return(x)"
SERV_R_END_RETURN="#define SERV_R_END_RETURN int "
SERV_R_ENT_ARGS="#define SERV_R_ENT_ARGS struct servent_data *serv_data"
SERV_R_ENT_UNUSED="#define SERV_R_ENT_UNUSED UNUSED(serv_data)"
SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/"
SERV_R_END_RETURN="#define SERV_R_END_RETURN void "
SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/"
SERV_R_ENT_UNUSED="#undef SERV_R_ENT_UNUSED /*empty*/"
AC_SUBST(SERV_R_END_RESULT)
AC_SUBST(SERV_R_END_RETURN)
AC_SUBST(SERV_R_ENT_ARGS)
AC_SUBST(SERV_R_ENT_UNUSED)
AC_CHECK_FUNC(setservent_r,
SERV_R_SET_RESULT="#undef SERV_R_SET_RESULT"
SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void"
int setservent_r(int, struct servent_data *);
SERV_R_SET_RESULT="#define SERV_R_SET_RESULT (0)"
SERV_R_SET_RETURN="#define SERV_R_SET_RETURN int"
SERV_R_SET_RESULT="#undef SERV_R_SET_RESULT"
SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void"
AC_SUBST(SERV_R_SET_RESULT)
AC_SUBST(SERV_R_SET_RETURN)
int innetgr(const char *netgroup, const char *host, const char *user, const char *domain);
INNETGR_ARGS="#undef INNETGR_ARGS"
int innetgr(char *netgroup, char *host, char *user, char *domain);
INNETGR_ARGS="#define INNETGR_ARGS char *netgroup, char *host, char *user, char *domain"
void setnetgrent(const char *);
SETNETGRENT_ARGS="#undef SETNETGRENT_ARGS"
void setnetgrent(char *);
SETNETGRENT_ARGS="#define SETNETGRENT_ARGS char *netgroup"
AC_SUBST(SETNETGRENT_ARGS)
# Random remaining OS-specific issues involving compiler warnings.
# XXXDCL print messages to indicate some compensation is being done?
BROKEN_IN6ADDR_INIT_MACROS="#undef BROKEN_IN6ADDR_INIT_MACROS"
hack_shutup_pthreadmutexinit=yes
hack_shutup_in6addr_init_macros=yes
hack_shutup_in6addr_init_macros=yes
hack_shutup_in6addr_init_macros=yes
hack_shutup_stdargcast=yes
hack_shutup_in6addr_init_macros=yes
hack_shutup_in6addr_init_macros=yes
hack_shutup_in6addr_init_macros=yes
hack_shutup_in6addr_init_macros=yes
hack_shutup_in6addr_init_macros=yes
case "$hack_shutup_pthreadmutexinit" in
# Shut up PTHREAD_MUTEX_INITIALIZER unbraced
AC_DEFINE(SHUTUP_MUTEX_INITIALIZER)
case "$hack_shutup_sigwait" in
# Shut up a -Wmissing-prototypes warning for sigwait().
AC_DEFINE(SHUTUP_SIGWAIT)
case "$hack_shutup_sputaux" in
# Shut up a -Wmissing-prototypes warning from <
stdio.h>.
AC_DEFINE(SHUTUP_SPUTAUX)
case "$hack_shutup_stdargcast" in
# Shut up a -Wcast-qual warning from va_start().
AC_DEFINE(SHUTUP_STDARG_CAST)
case "$hack_shutup_in6addr_init_macros" in
AC_DEFINE(BROKEN_IN6ADDR_INIT_MACROS, 1, [Defined if IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT need to be redefined.] )
AC_SUBST(BIND9_TOP_BUILDDIR)
AC_SUBST_FILE(BIND9_INCLUDES)
AC_SUBST_FILE(BIND9_MAKE_RULES)
BIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
AC_SUBST_FILE(LIBBIND_API)
# Tell Emacs to edit this file in shell mode.