configure.in revision c4157085cd215999883eb3de41bf16ce798379ce
07dcadc6e24f4572f2b7d7cae7d47d0f5256d129Andreas Gustafsson# Copyright (C) 1998-2001 Internet Software Consortium.
7c74e180c206e6ed99e8beb820da5f399d845c3eDavid Lawrence# Permission to use, copy, modify, and distribute this software for any
7c74e180c206e6ed99e8beb820da5f399d845c3eDavid Lawrence# purpose with or without fee is hereby granted, provided that the above
7c74e180c206e6ed99e8beb820da5f399d845c3eDavid Lawrence# copyright notice and this permission notice appear in all copies.
15a44745412679c30a6d022733925af70a38b715David Lawrence# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
15a44745412679c30a6d022733925af70a38b715David Lawrence# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
15a44745412679c30a6d022733925af70a38b715David Lawrence# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
15a44745412679c30a6d022733925af70a38b715David Lawrence# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
15a44745412679c30a6d022733925af70a38b715David Lawrence# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
15a44745412679c30a6d022733925af70a38b715David Lawrence# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
15a44745412679c30a6d022733925af70a38b715David Lawrence# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
15a44745412679c30a6d022733925af70a38b715David Lawrence# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
866d106459313499d0ca7bfccb4b2d23d5e4377cDavid LawrenceAC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
866d106459313499d0ca7bfccb4b2d23d5e4377cDavid Lawrenceesyscmd([sed "s/^/# /" COPYRIGHT])dnl
866d106459313499d0ca7bfccb4b2d23d5e4377cDavid LawrenceAC_DIVERT_POP()dnl
c4157085cd215999883eb3de41bf16ce798379ceAndreas GustafssonAC_REVISION($Revision: 1.307 $)
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob HalleyAC_PREREQ(2.13)
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob HalleyAC_CONFIG_HEADER(config.h)
be801b0fdbcf9b55b3a8cc6bf042ff6c86be6b11Mark AndrewsAC_CONFIG_SUBDIRS(lib/bind)
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob HalleyAC_CANONICAL_HOST
ccdac53c027e8964753b36c4d8c7b0e98af501c2Michael GraffAC_PROG_MAKE_SET
ccdac53c027e8964753b36c4d8c7b0e98af501c2Michael GraffAC_PROG_RANLIB
ccdac53c027e8964753b36c4d8c7b0e98af501c2Michael GraffAC_PROG_INSTALL
ccdac53c027e8964753b36c4d8c7b0e98af501c2Michael GraffAC_SUBST(STD_CINCLUDES)
ccdac53c027e8964753b36c4d8c7b0e98af501c2Michael GraffAC_SUBST(STD_CDEFINES)
ccdac53c027e8964753b36c4d8c7b0e98af501c2Michael GraffAC_SUBST(STD_CWARNINGS)
3d776d762914d1b675b4fd49728ce353ccf6f77eBrian WellingtonAC_SUBST(CCOPT)
75a4dd0d377dca2f85cea44e28bf110314c1fe8cDavid LawrenceAC_PATH_PROG(AR, ar)
75a4dd0d377dca2f85cea44e28bf110314c1fe8cDavid LawrenceARFLAGS="cruv"
75a4dd0d377dca2f85cea44e28bf110314c1fe8cDavid LawrenceAC_SUBST(ARFLAGS)
91306d962f9d147d94b82fb14edb28f8d907cae7Andreas Gustafsson# The POSIX ln(1) program. Non-POSIX systems may substitute
91306d962f9d147d94b82fb14edb28f8d907cae7Andreas Gustafsson# "copy" or something.
e893dce91279d7313a579f72caae3941f6dc5a27David Lawrence AC_MSG_ERROR([
e893dce91279d7313a579f72caae3941f6dc5a27David Lawrencear program not found. Please fix your PATH to include the directory in
e893dce91279d7313a579f72caae3941f6dc5a27David Lawrencewhich ar resides, or set AR in the environment with the full path to ar.
8e06cea14c857429ab7e7299af2dce5eeeaa5ff0Michael GraffAC_PATH_PROGS(ETAGS, etags emacs-etags)
3b77946b751f39bd4db5a7d1fe48a81e6b1e7a28Bob Halley# Some systems, e.g. RH7, have the Exuberant Ctags etags instead of
3b77946b751f39bd4db5a7d1fe48a81e6b1e7a28Bob Halley# GNU emacs etags, and it requires the -L flag.
3b77946b751f39bd4db5a7d1fe48a81e6b1e7a28Bob Halleyif test "X$ETAGS" != "X"; then
3b77946b751f39bd4db5a7d1fe48a81e6b1e7a28Bob Halley AC_MSG_CHECKING(for Exuberant Ctags etags)
3b77946b751f39bd4db5a7d1fe48a81e6b1e7a28Bob Halley if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then
3b77946b751f39bd4db5a7d1fe48a81e6b1e7a28Bob Halley AC_MSG_RESULT(yes)
3b77946b751f39bd4db5a7d1fe48a81e6b1e7a28Bob Halley ETAGS="$ETAGS -L"
3b77946b751f39bd4db5a7d1fe48a81e6b1e7a28Bob Halley AC_MSG_RESULT(no)
8e06cea14c857429ab7e7299af2dce5eeeaa5ff0Michael GraffAC_SUBST(ETAGS)
3ecf3394e37dc2848a09ffc643565d454e9e6974Andreas Gustafsson# Perl is optional; it is used only by some of the system test scripts.
3ecf3394e37dc2848a09ffc643565d454e9e6974Andreas GustafssonAC_PATH_PROGS(PERL, perl5 perl)
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# Special processing of paths depending on whether --prefix,
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# --sysconfdir or --localstatedir arguments were given. What's
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# desired is some compatability with the way previous versions
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# of BIND built; they defaulted to /usr/local for most parts of
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# the installation, but named.boot/named.conf was in /etc
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# So ... if none of --prefix, --sysconfdir or --localstatedir are
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# specified, set things up that way. If --prefix is given, use
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# it for sysconfdir and localstatedir the way configure normally
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# would. To change the prefix for everything but leave named.conf
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# in /etc or named.pid in /var/run, then do this the usual configure way:
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# ./configure --prefix=/somewhere --sysconfdir=/etc
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# ./configure --prefix=/somewhere --localstatedir=/var
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# To put named.conf and named.pid in /usr/local with everything else,
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# set the prefix explicitly to /usr/local even though that's the default:
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# ./configure --prefix=/usr/local
ae4cbb69eef32ced103fe4561e8d2031ee4c3497David Lawrencecase "$prefix" in
ae4cbb69eef32ced103fe4561e8d2031ee4c3497David Lawrence case "$sysconfdir" in
ae4cbb69eef32ced103fe4561e8d2031ee4c3497David Lawrence '${prefix}/etc')
ae4cbb69eef32ced103fe4561e8d2031ee4c3497David Lawrence sysconfdir=/etc
ae4cbb69eef32ced103fe4561e8d2031ee4c3497David Lawrence case "$localstatedir" in
ae4cbb69eef32ced103fe4561e8d2031ee4c3497David Lawrence '${prefix}/var')
ae4cbb69eef32ced103fe4561e8d2031ee4c3497David Lawrence localstatedir=/var
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# Make sure INSTALL uses an absolute path, else it will be wrong in all
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# Makefiles, since they use make/rules.in and INSTALL will be adjusted by
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# configure based on the location of the file where it is substituted.
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# subdirectory of install-sh, This relative path will be wrong for all
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# directories more than one level down from install-sh.
0293ad13207aa29bd5844cdc87d085ffc009d749David Lawrencecase "$INSTALL" in
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence # Not all systems have dirname.
0293ad13207aa29bd5844cdc87d085ffc009d749David Lawrence changequote({, })
0293ad13207aa29bd5844cdc87d085ffc009d749David Lawrence ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`"
0293ad13207aa29bd5844cdc87d085ffc009d749David Lawrence changequote([, ])
0293ad13207aa29bd5844cdc87d085ffc009d749David Lawrence ac_prog="`echo $INSTALL | sed 's%.*/%%'`"
0293ad13207aa29bd5844cdc87d085ffc009d749David Lawrence test "$ac_dir" = "$ac_prog" && ac_dir=.
0293ad13207aa29bd5844cdc87d085ffc009d749David Lawrence test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`"
0293ad13207aa29bd5844cdc87d085ffc009d749David Lawrence INSTALL="$ac_dir/$ac_prog"
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# On these hosts, we really want to use cc, not gcc, even if it is
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# found. The gcc that these systems have will not correctly handle
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# However, if the user sets $CC to be something, let that override
657ce0b9d84fbd66514df53d61a087e8f1161187Michael Graffif test "X$CC" = "X" ; then
657ce0b9d84fbd66514df53d61a087e8f1161187Michael Graff case "$host" in
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence # Use Sun's cc if it is available, but watch
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence # out for /usr/ucb/cc; it will never be the right
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence # compiler to use.
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence # If setting CC here fails, the AC_PROG_CC done
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence # below might still find gcc.
4bcaefbcd3ced942139fdc830e007c6ea2b8d2feDavid Lawrence IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4bcaefbcd3ced942139fdc830e007c6ea2b8d2feDavid Lawrence for ac_dir in $PATH; do
4bcaefbcd3ced942139fdc830e007c6ea2b8d2feDavid Lawrence test -z "$ac_dir" && ac_dir=.
4bcaefbcd3ced942139fdc830e007c6ea2b8d2feDavid Lawrence case "$ac_dir" in
4bcaefbcd3ced942139fdc830e007c6ea2b8d2feDavid Lawrence if test -f "$ac_dir/cc"; then
4bcaefbcd3ced942139fdc830e007c6ea2b8d2feDavid Lawrence IFS="$ac_save_ifs"
657ce0b9d84fbd66514df53d61a087e8f1161187Michael Graff mips-sgi-irix*)
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark AndrewsAC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/sysctl.h net/if6.h)
c654449ccf403ccd2b81be2038b1013d6fbb06ccMark AndrewsAC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME))
6fcb2f0faad67a6d2cb2e30ec57157d75fbfe58fAndreas Gustafsson# UnixWare 7.1.1 with the feature supplement to the UDK compiler
6fcb2f0faad67a6d2cb2e30ec57157d75fbfe58fAndreas Gustafsson# is reported to not support "static inline" (RT #1212).
6fcb2f0faad67a6d2cb2e30ec57157d75fbfe58fAndreas GustafssonAC_MSG_CHECKING(for static inline breakage)
47fd46791da765e3dbedd987e9b263b3bee25986Brian WellingtonAC_TRY_COMPILE(, [
47fd46791da765e3dbedd987e9b263b3bee25986Brian Wellington static inline int foo1() {
47fd46791da765e3dbedd987e9b263b3bee25986Brian Wellington static inline int foo2() {
47fd46791da765e3dbedd987e9b263b3bee25986Brian Wellington return foo1();
6fcb2f0faad67a6d2cb2e30ec57157d75fbfe58fAndreas Gustafsson [AC_MSG_RESULT(no)],
6fcb2f0faad67a6d2cb2e30ec57157d75fbfe58fAndreas Gustafsson [AC_MSG_RESULT(yes)
6fcb2f0faad67a6d2cb2e30ec57157d75fbfe58fAndreas Gustafsson AC_DEFINE(inline, )])
8f3dd8f8e73e4465221a5297819db70e6b383138Mark AndrewsAC_CHECK_TYPE(ssize_t, int)
754cca729dd82ae8363917dc00ad44f9d900635bMark AndrewsAC_MSG_CHECKING(for long long)
754cca729dd82ae8363917dc00ad44f9d900635bMark AndrewsAC_TRY_COMPILE([],[long long i = 0; return (0);],
754cca729dd82ae8363917dc00ad44f9d900635bMark Andrews [AC_MSG_RESULT(yes)
754cca729dd82ae8363917dc00ad44f9d900635bMark Andrews ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1"],
754cca729dd82ae8363917dc00ad44f9d900635bMark Andrews [AC_MSG_RESULT(no)
754cca729dd82ae8363917dc00ad44f9d900635bMark Andrews ISC_PLATFORM_HAVELONGLONG="#undef ISC_PLATFORM_HAVELONGLONG"])
754cca729dd82ae8363917dc00ad44f9d900635bMark AndrewsAC_SUBST(ISC_PLATFORM_HAVELONGLONG)
40dd9cb8cc240c33d820fe79f176ed51e4c06a1aMark Andrews# check if we have lifconf
40dd9cb8cc240c33d820fe79f176ed51e4c06a1aMark AndrewsAC_MSG_CHECKING(for struct lifconf)
40dd9cb8cc240c33d820fe79f176ed51e4c06a1aMark AndrewsAC_TRY_COMPILE([
40dd9cb8cc240c33d820fe79f176ed51e4c06a1aMark Andrewsstruct lifconf lifconf;
40dd9cb8cc240c33d820fe79f176ed51e4c06a1aMark Andrews [AC_MSG_RESULT(yes)
40dd9cb8cc240c33d820fe79f176ed51e4c06a1aMark Andrews ISC_PLATFORM_HAVELIFCONF="#define ISC_PLATFORM_HAVELIFCONF 1"],
40dd9cb8cc240c33d820fe79f176ed51e4c06a1aMark Andrews [AC_MSG_RESULT(no)
40dd9cb8cc240c33d820fe79f176ed51e4c06a1aMark Andrews ISC_PLATFORM_HAVELIFCONF="#undef ISC_PLATFORM_HAVELIFCONF"])
40dd9cb8cc240c33d820fe79f176ed51e4c06a1aMark AndrewsAC_SUBST(ISC_PLATFORM_HAVELIFCONF)
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas Gustafsson# check if we need to #include sys/select.h explicitly
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas Gustafssoncase $ac_cv_header_unistd_h in
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas GustafssonAC_MSG_CHECKING(if unistd.h defines fd_set)
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas GustafssonAC_TRY_COMPILE([
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas Gustafsson[fd_set read_set; return (0);],
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas Gustafsson [AC_MSG_RESULT(yes)
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas Gustafsson ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas Gustafsson LWRES_PLATFORM_NEEDSYSSELECTH="#undef LWRES_PLATFORM_NEEDSYSSELECTH"],
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas Gustafsson [AC_MSG_RESULT(no)
a1898260ad19d02e88ab76c1855d33c67add9defMark Andrews case $ac_cv_header_sys_select_h in
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas Gustafsson ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas Gustafsson LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas Gustafsson AC_MSG_ERROR([need either working unistd.h or sys/select.h])
a1898260ad19d02e88ab76c1855d33c67add9defMark Andrews case $ac_cv_header_sys_select_h in
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas Gustafsson ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas Gustafsson LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1"
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas Gustafsson AC_MSG_ERROR([need either unistd.h or sys/select.h])
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas GustafssonAC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH)
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas GustafssonAC_SUBST(LWRES_PLATFORM_NEEDSYSSELECTH)
90407942d3afe50f04ccea361de3b164a5a1702dMichael Graff# Find the machine's endian flavor.
90407942d3afe50f04ccea361de3b164a5a1702dMichael GraffAC_C_BIGENDIAN
13faa8b6a2d0d45e0659049983928366252ab3faMichael Graff# was --with-openssl specified?
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas GustafssonAC_MSG_CHECKING(for OpenSSL library)
13faa8b6a2d0d45e0659049983928366252ab3faMichael GraffAC_ARG_WITH(openssl,
61d5bfc06be978ea962b1c64309894ac80351771Mark Andrews[ --with-openssl[=PATH] Build with OpenSSL [yes|no|path].
61d5bfc06be978ea962b1c64309894ac80351771Mark Andrews (Required for DNSSEC)],
5f9e583552f53de12062bfff12e47250abce378fBrian Wellington use_openssl="$withval", use_openssl="no")
5f9e583552f53de12062bfff12e47250abce378fBrian Wellingtoncase "$use_openssl" in
3fcf6b956f47405750724bd84e1b2290b61c9186Brian Wellington AC_MSG_RESULT(no)
3fcf6b956f47405750724bd84e1b2290b61c9186Brian Wellington DST_OPENSSL_INC=""
3fcf6b956f47405750724bd84e1b2290b61c9186Brian Wellington USE_OPENSSL=""
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson if test "$use_openssl" = "yes"
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson # User did not specify a path - guess it
a0ad323da3597f942881eb2112a82c21450a9d0dBrian Wellington openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg"
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson for d in $openssldirs
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson use_openssl=$d
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson if test "$use_openssl" = "yes"
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson AC_MSG_RESULT(not found)
80f323528ac699026a609a5e3b765dc6e88fe37cAndreas Gustafsson[OpenSSL was not found in any of $openssldirs; use --with-openssl=/path])
3fcf6b956f47405750724bd84e1b2290b61c9186Brian Wellington USE_OPENSSL='-DOPENSSL'
e4c7b24ab12572b6781d5c545c7b7949cbd2a6f7Brian Wellington DST_OPENSSL_INC="-I$use_openssl/include"
5f9e583552f53de12062bfff12e47250abce378fBrian Wellington DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
5f9e583552f53de12062bfff12e47250abce378fBrian Wellington AC_MSG_RESULT(using openssl from $use_openssl/lib and $use_openssl/include)
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson AC_MSG_CHECKING(OpenSSL library version)
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson saved_cflags="$CFLAGS"
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson saved_libs="$LIBS"
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson CFLAGS="$CFLAGS $DST_OPENSSL_INC"
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson LIBS="$LIBS $DNS_OPENSSL_LIBS"
cb2a4cad76fbda226e7cd9dd3ca017b52521e3d1Andreas Gustafsson if (OPENSSL_VERSION_NUMBER >= 0x0090581fL)
bd1db480f30e025bba719799f910b34848a9a997Mark Andrews printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n",
bd1db480f30e025bba719799f910b34848a9a997Mark Andrews OPENSSL_VERSION_NUMBER);
bd1db480f30e025bba719799f910b34848a9a997Mark Andrews printf("Require OPENSSL_VERSION_NUMBER 0x0090581f or greater\n\n");
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson [AC_MSG_RESULT(ok)],
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson [AC_MSG_RESULT(not compatible)
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas Gustafsson AC_MSG_ERROR(you need OpenSSL 0.9.5a or newer)],
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas Gustafsson [AC_MSG_RESULT(assuming target platform has compatible version)])
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson CFLAGS="$saved_cflags"
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson LIBS="$saved_libs"
08a768e82ad64ede97f640c88e02984b59122753Michael Graff# This would include the system openssl path (and linker options to use
08a768e82ad64ede97f640c88e02984b59122753Michael Graff# it as needed) if it is found.
3fcf6b956f47405750724bd84e1b2290b61c9186Brian WellingtonAC_SUBST(DST_OPENSSL_INC)
08a768e82ad64ede97f640c88e02984b59122753Michael GraffAC_SUBST(DNS_OPENSSL_LIBS)
3fcf6b956f47405750724bd84e1b2290b61c9186Brian WellingtonAC_SUBST(USE_OPENSSL)
3ec6b563d7b6cb11a047f23faa2a0f206ccd93e7Brian Wellington# was --with-gssapi specified?
fee5012c43744322c1785e5c3e0c322443faa304Brian Wellington#AC_MSG_CHECKING(for GSSAPI library)
fee5012c43744322c1785e5c3e0c322443faa304Brian Wellington#AC_ARG_WITH(gssapi,
fee5012c43744322c1785e5c3e0c322443faa304Brian Wellington#[ --with-gssapi=PATH Specify path for system-supplied GSSAPI],
fee5012c43744322c1785e5c3e0c322443faa304Brian Wellington# use_gssapi="$withval", use_gssapi="no")
fee5012c43744322c1785e5c3e0c322443faa304Brian Wellington#case "$use_gssapi" in
fee5012c43744322c1785e5c3e0c322443faa304Brian Wellington# USE_GSSAPI=''
fee5012c43744322c1785e5c3e0c322443faa304Brian Wellington# DST_GSSAPI_INC=''
fee5012c43744322c1785e5c3e0c322443faa304Brian Wellington# DNS_GSSAPI_LIBS=''
fee5012c43744322c1785e5c3e0c322443faa304Brian Wellington# AC_MSG_RESULT(not specified)
fee5012c43744322c1785e5c3e0c322443faa304Brian Wellington# AC_MSG_ERROR([--with-gssapi must specify a path])
fee5012c43744322c1785e5c3e0c322443faa304Brian Wellington# USE_GSSAPI='-DGSSAPI'
fee5012c43744322c1785e5c3e0c322443faa304Brian Wellington# DST_GSSAPI_INC="-I$use_gssapi/include"
fee5012c43744322c1785e5c3e0c322443faa304Brian Wellington# DNS_GSSAPI_LIBS="-L$use_gssapi/lib -lgssapi_krb5"
fee5012c43744322c1785e5c3e0c322443faa304Brian Wellington# AC_MSG_RESULT(using gssapi from $use_gssapi/lib and $use_gssapi/include)
fee5012c43744322c1785e5c3e0c322443faa304Brian WellingtonDST_GSSAPI_INC=''
fee5012c43744322c1785e5c3e0c322443faa304Brian WellingtonDNS_GSSAPI_LIBS=''
3ec6b563d7b6cb11a047f23faa2a0f206ccd93e7Brian WellingtonAC_SUBST(USE_GSSAPI)
3ec6b563d7b6cb11a047f23faa2a0f206ccd93e7Brian WellingtonAC_SUBST(DST_GSSAPI_INC)
3ec6b563d7b6cb11a047f23faa2a0f206ccd93e7Brian WellingtonAC_SUBST(DNS_GSSAPI_LIBS)
a14613fce99dee3cad5bf842fd6be78f8e463582Brian Wellington# was --with-randomdev specified?
a14613fce99dee3cad5bf842fd6be78f8e463582Brian WellingtonAC_MSG_CHECKING(for random device)
a14613fce99dee3cad5bf842fd6be78f8e463582Brian WellingtonAC_ARG_WITH(randomdev,
a14613fce99dee3cad5bf842fd6be78f8e463582Brian Wellington[ --with-randomdev=PATH Specify path for random device],
a14613fce99dee3cad5bf842fd6be78f8e463582Brian Wellington use_randomdev="$withval", use_randomdev="unspec")
a14613fce99dee3cad5bf842fd6be78f8e463582Brian Wellingtoncase "$use_randomdev" in
a14613fce99dee3cad5bf842fd6be78f8e463582Brian Wellington case "$host" in
b495fd2992c63472b3ad2d9517ffe9b50118840aAndreas Gustafsson AC_MSG_RESULT($devrandom)
af5ad488cbf17988fbd36a25c908737412ccd382Brian Wellington AC_CHECK_FILE($devrandom,
f317c00e0d5978f29285ea062b34ec73dc419095Brian Wellington AC_DEFINE_UNQUOTED(PATH_RANDOMDEV,
f317c00e0d5978f29285ea062b34ec73dc419095Brian Wellington "$devrandom"),)
a14613fce99dee3cad5bf842fd6be78f8e463582Brian Wellington AC_MSG_ERROR([--with-randomdev must specify a path])
dee520f1be8c59e10a55b6995844395e811c310fBrian Wellington AC_MSG_RESULT(disabled)
529ff4b4959fb157194f985394951108ff5286e4Brian Wellington AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, "$use_randomdev")
a14613fce99dee3cad5bf842fd6be78f8e463582Brian Wellington AC_MSG_RESULT(using "$use_randomdev")
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence# Begin pthreads checking.
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence# First, decide whether to use multithreading or not.
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson# Enable multithreading by default on systems where it is known
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson# to work well, and where debugging of multithreaded programs
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson# is supported.
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas GustafssonAC_MSG_CHECKING(whether to build with thread support)
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson use_threads=true ;;
7f9bc71eca311843611a4b0cfdeb12eda324b689Mark Andrews[*-solaris2.[0-6]])
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson # Thread signals are broken on Solaris 2.6; they are sometimes
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson # delivered to the wrong thread.
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson use_threads=false ;;
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson use_threads=true ;;
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson use_threads=true ;;
6ef891fbe943d6776ed17439ccb8bbb8e314b7d8Andreas Gustafsson use_threads=false ;;
9d266ed4d7630d8366fea0a4a627d8c3873821c5Brian Wellington use_threads=true ;;
9d266ed4d7630d8366fea0a4a627d8c3873821c5Brian Wellington use_threads=true ;;
3fafd7c0c42134ff2964b74a31500465a96dee90Andreas Gustafsson*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson use_threads=false ;;
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson # Socket I/O optimizations introduced in 9.2 expose a
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson # bug in unproven-pthreads; see PR #12650
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson use_threads=false ;;
1c0ff8a9cc1e1edd55acff6802f8811966732653Brian Wellington # OpenBSD users have reported that named dumps core on
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson # startup when built with threads.
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson use_threads=false ;;
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson use_threads=false ;;
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson # Thread signals do not appear to work reliably on BSDI.
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson use_threads=false ;;
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson # Threads are disabled on Linux by default because most
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson # Linux kernels produce unusable core dumps from multithreaded
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson # programs, and because of limitations in setuid().
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson use_threads=false ;;
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson use_threads=false ;;
9a2574531e3d2ced31072200b416467fdee0c29cDavid LawrenceAC_ARG_ENABLE(threads,
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson [ --enable-threads enable multithreading])
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrencecase "$enable_threads" in
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence use_threads=true
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence use_threads=false
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson # Use system-dependent default
b6cb5907b2159b3e82bfd37d1818f327ca1e7ca0Mark Andrews AC_MSG_ERROR([--enable-threads takes yes or no])
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafssonif $use_threads
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson AC_MSG_RESULT(yes)
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson AC_MSG_RESULT(no)
9ce476812c93a1bb8b416adbe707ee5000a015f1Andreas Gustafssonif $use_threads
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # Search for / configure pthreads in a system-dependent fashion.
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson case "$host" in
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # NetBSD has multiple pthreads implementations. The
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # recommended one to use is "unproven-pthreads". The
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # older "mit-pthreads" may also work on some NetBSD
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # versions. The PTL2 thread library does not
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # currently work with bind9, but can be chosen with
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # the --with-ptl2 option for those who wish to
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # experiment with it.
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_MSG_CHECKING(which NetBSD thread library to use)
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_ARG_WITH(ptl2,
1706598239da403b86f4befa4c08175d9e101014Andreas Gustafsson[ --with-ptl2 on NetBSD, use the ptl2 thread library (experimental)],
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson use_ptl2="$withval", use_ptl2="no")
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson : ${LOCALBASE:=/usr/pkg}
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson if test "X$use_ptl2" = "Xyes"
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_MSG_RESULT(PTL2)
1706598239da403b86f4befa4c08175d9e101014Andreas Gustafsson[linking with PTL2 is highly experimental and not expected to work])
c356cd618dacb13d47ee9bee78d22a9802d4645eBrian Wellington AC_MSG_RESULT(none)
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson AC_MSG_ERROR("could not find thread libraries")
c356cd618dacb13d47ee9bee78d22a9802d4645eBrian Wellington if $use_threads
c356cd618dacb13d47ee9bee78d22a9802d4645eBrian Wellington AC_MSG_RESULT(mit-pthreads/unproven-pthreads)
c356cd618dacb13d47ee9bee78d22a9802d4645eBrian Wellington lib2="-lpthread -lm -lgcc -lpthread"
c356cd618dacb13d47ee9bee78d22a9802d4645eBrian Wellington LIBS="$lib1 $lib2 $LIBS"
c356cd618dacb13d47ee9bee78d22a9802d4645eBrian Wellington CPPFLAGS="$CPPFLAGS -I$pkg/include"
c356cd618dacb13d47ee9bee78d22a9802d4645eBrian Wellington STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include"
ce7994d137a013133e874b92604183923267fc94Brian Wellington AC_CHECK_LIB(pthread, pthread_create,,
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence AC_CHECK_LIB(pthread, __pthread_create,,
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence AC_CHECK_LIB(pthread, __pthread_create_system,,
ce7994d137a013133e874b92604183923267fc94Brian Wellington AC_CHECK_LIB(c_r, pthread_create,,
ce7994d137a013133e874b92604183923267fc94Brian Wellington AC_CHECK_LIB(c, pthread_create,,
e2b585787f4779f49bd0982562acbbb7d0b65a95Andreas Gustafsson AC_MSG_ERROR("could not find thread libraries"))))))
489b76292622f5bc18bf1a18845f8166a73bd797Brian Wellingtonif $use_threads
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # We'd like to use sigwait() too
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_CHECK_LIB(c, sigwait,
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_DEFINE(HAVE_SIGWAIT),
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_CHECK_LIB(pthread, sigwait,
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_DEFINE(HAVE_SIGWAIT),
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_CHECK_LIB(pthread, _Psigwait,
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_DEFINE(HAVE_SIGWAIT),))
489b76292622f5bc18bf1a18845f8166a73bd797Brian Wellington AC_CHECK_FUNC(pthread_attr_getstacksize,
489b76292622f5bc18bf1a18845f8166a73bd797Brian Wellington AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # Additional OS-specific issues related to pthreads and sigwait.
9ceaa92a8ca8a0270ba296d44599e94d95033759Andreas Gustafsson case "$host" in
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # One more place to look for sigwait.
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),)
fa280ff02ad0c29616a0c3a22ef02cbb3f6db7efDavid Lawrence # BSDI 3.0 through 4.0.1 needs pthread_init() to be
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # called before certain pthreads calls. This is deprecated
fa280ff02ad0c29616a0c3a22ef02cbb3f6db7efDavid Lawrence *-bsdi3.*|*-bsdi4.0*)
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_DEFINE(NEED_PTHREAD_INIT)
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # LinuxThreads requires some changes to the way we
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # deal with signals.
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_DEFINE(HAVE_LINUXTHREADS)
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # Ensure the right sigwait() semantics on Solaris and make
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # sure we call pthread_setconcurrency.
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_CHECK_FUNC(pthread_setconcurrency,
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_DEFINE(CALL_PTHREAD_SETCONCURRENCY))
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # UnixWare does things its own way.
3fafd7c0c42134ff2964b74a31500465a96dee90Andreas Gustafsson *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
aa30ee42c4b6da9bab4fb84d6cbbda6036a4d426Mark Andrews AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # Look for sysconf to allow detection of the number of processors.
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson if test "X$GCC" = "Xyes"; then
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson case "$host" in
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson CC="$CC -pthread"
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson CCOPT="$CCOPT -pthread"
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson CC="$CC -pthread"
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson CCOPT="$CCOPT -pthread"
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson LIBS="$LIBS -lthread"
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence CC="$CC -pthread"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence CCOPT="$CCOPT -pthread"
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson CCOPT="$CCOPT -mt"
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
3fafd7c0c42134ff2964b74a31500465a96dee90Andreas Gustafsson *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
aa30ee42c4b6da9bab4fb84d6cbbda6036a4d426Mark Andrews CC="$CC -Kthread"
aa30ee42c4b6da9bab4fb84d6cbbda6036a4d426Mark Andrews CCOPT="$CCOPT -Kthread"
620de5a4b1f23dc9b4ec30d30c0607ff389be0daBob Halley ALWAYS_DEFINES="-D_REENTRANT"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
fafb62400d2f1b1da4f3908447e1f3935fc5155bBrian Wellington thread_dir=pthreads
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS"
fafb62400d2f1b1da4f3908447e1f3935fc5155bBrian Wellington thread_dir=nothreads
620de5a4b1f23dc9b4ec30d30c0607ff389be0daBob Halley ALWAYS_DEFINES=""
620de5a4b1f23dc9b4ec30d30c0607ff389be0daBob HalleyAC_SUBST(ALWAYS_DEFINES)
9a2574531e3d2ced31072200b416467fdee0c29cDavid LawrenceAC_SUBST(ISC_PLATFORM_USETHREADS)
fafb62400d2f1b1da4f3908447e1f3935fc5155bBrian WellingtonISC_THREAD_DIR=$thread_dir
fafb62400d2f1b1da4f3908447e1f3935fc5155bBrian WellingtonAC_SUBST(ISC_THREAD_DIR)
3f123dcc2fe5d2cd08ca91b732741d86a4036906Brian Wellington# flockfile is usually provided by pthreads, but we may want to use it
64b92523f9333ba053f4b2860335583be455b0b3Brian Wellington# even if compiled with --disable-threads. getc_unlocked might also not
3f123dcc2fe5d2cd08ca91b732741d86a4036906Brian WellingtonAC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),)
64b92523f9333ba053f4b2860335583be455b0b3Brian WellingtonAC_CHECK_FUNC(getc_unlocked, AC_DEFINE(HAVE_GETCUNLOCKED),)
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence# Indicate what the final decision was regarding threads.
9a2574531e3d2ced31072200b416467fdee0c29cDavid LawrenceAC_MSG_CHECKING(whether to build with threads)
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrenceif $use_threads; then
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence AC_MSG_RESULT(yes)
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence AC_MSG_RESULT(no)
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence# End of pthreads stuff.
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence# Additional compiler settings.
9a2574531e3d2ced31072200b416467fdee0c29cDavid LawrenceMKDEPCFLAGS="-M"
9a2574531e3d2ced31072200b416467fdee0c29cDavid LawrenceIRIX_DNSSEC_WARNINGS_HACK=""
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrenceif test "X$GCC" = "Xyes"; then
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence case $host in
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence CC="$CC -std"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence CCOPT="$CCOPT -std"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence MKDEPCC="$CC"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence CC="$CC -Ae -z"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence # The version of the C compiler that constantly warns about
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence # 'const' as well as alignment issues is unfortunately not
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence # able to be discerned via the version of the operating
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence # system, nor does cc have a version flag.
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence case "`$CC +W 123 2>&1`" in
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence *Unknown?option*)
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence STD_CWARNINGS="+w1"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence # Turn off the pointlessly noisy warnings.
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence STD_CWARNINGS="+w1 +W 474,530"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence CCOPT="$CCOPT -Ae -z"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence LIBS="-Wl,+vnocompatwarnings $LIBS"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence STD_CWARNINGS="-fullwarn -woff 1209"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence # Silence more than 250 instances of
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence # "prototyped function redeclared without prototype"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence # and 11 instances of
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence # "variable ... was set but never used"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence MKDEPCFLAGS="-xM"
3fafd7c0c42134ff2964b74a31500465a96dee90Andreas Gustafsson *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
9a2574531e3d2ced31072200b416467fdee0c29cDavid LawrenceAC_SUBST(MKDEPCC)
9a2574531e3d2ced31072200b416467fdee0c29cDavid LawrenceAC_SUBST(MKDEPCFLAGS)
9a2574531e3d2ced31072200b416467fdee0c29cDavid LawrenceAC_SUBST(MKDEPPROG)
9a2574531e3d2ced31072200b416467fdee0c29cDavid LawrenceAC_SUBST(IRIX_DNSSEC_WARNINGS_HACK)
d8dcd6ad4617cc8d7df979bd62101fa9c4bac1bcBob HalleyAC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# -lxnet buys us one big porting headache... standards, gotta love 'em.
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# AC_CHECK_LIB(xnet, socket, ,
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# AC_CHECK_LIB(socket, socket)
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# AC_CHECK_LIB(nsl, inet_ntoa)
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# Use this for now, instead:
882350d11c90de9de6fc1cead25690c8114b0b95Michael Graffcase "$host" in
882350d11c90de9de6fc1cead25690c8114b0b95Michael Graff mips-sgi-irix*)
882350d11c90de9de6fc1cead25690c8114b0b95Michael Graff AC_CHECK_LIB(socket, socket)
882350d11c90de9de6fc1cead25690c8114b0b95Michael Graff AC_CHECK_LIB(nsl, inet_ntoa)
d901b2252d664a5b96bae117416f8ee822dc6691Stephen Jacob# Purify support
d901b2252d664a5b96bae117416f8ee822dc6691Stephen JacobAC_MSG_CHECKING(whether to use purify)
d901b2252d664a5b96bae117416f8ee822dc6691Stephen JacobAC_ARG_WITH(purify,
547f79ea44f0a91442fd942b04c11c1958f75136Andreas Gustafsson [ --with-purify[=PATH] use Rational purify],
d901b2252d664a5b96bae117416f8ee822dc6691Stephen Jacob use_purify="$withval", use_purify="no")
d901b2252d664a5b96bae117416f8ee822dc6691Stephen Jacobcase "$use_purify" in
d901b2252d664a5b96bae117416f8ee822dc6691Stephen Jacob AC_PATH_PROG(purify_path, purify, purify)
d901b2252d664a5b96bae117416f8ee822dc6691Stephen Jacob purify_path="$use_purify"
d901b2252d664a5b96bae117416f8ee822dc6691Stephen Jacobcase "$use_purify" in
d901b2252d664a5b96bae117416f8ee822dc6691Stephen Jacob AC_MSG_RESULT(no)
d901b2252d664a5b96bae117416f8ee822dc6691Stephen Jacob if test -f $purify_path || test $purify_path = purify; then
d901b2252d664a5b96bae117416f8ee822dc6691Stephen Jacob AC_MSG_RESULT($purify_path)
d901b2252d664a5b96bae117416f8ee822dc6691Stephen Jacob PURIFYFLAGS="`echo $PURIFYOPTIONS`"
d901b2252d664a5b96bae117416f8ee822dc6691Stephen Jacob PURIFY="$purify_path $PURIFYFLAGS"
d901b2252d664a5b96bae117416f8ee822dc6691Stephen Jacob AC_MSG_ERROR([$purify_path not found.
d901b2252d664a5b96bae117416f8ee822dc6691Stephen JacobPlease choose the proper path with the following command:
d901b2252d664a5b96bae117416f8ee822dc6691Stephen Jacob configure --with-purify=PATH
d901b2252d664a5b96bae117416f8ee822dc6691Stephen JacobAC_SUBST(PURIFY)
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# GNU libtool support
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob HalleyAC_ARG_WITH(libtool,
a5cf3cf61e96e0db9ffe433402783e1ddbb2fbc3Michael Graff [ --with-libtool use GNU libtool (following indented options supported)],
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley use_libtool="$withval", use_libtool="no")
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halleycase $use_libtool in
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley AM_PROG_LIBTOOL
c64aeaf419a7ef156b4aabfa2a913831e773157eBob Halley LIBTOOL_MKDEP_SED='s;\.o;\.lo;'
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley AC_SUBST(LIBTOOL)
c64aeaf419a7ef156b4aabfa2a913831e773157eBob Halley LIBTOOL_MKDEP_SED=
193738b819e3c699f9edd18864a6810fcfcec855Andreas Gustafsson# File name extension for static archive files, for those few places
193738b819e3c699f9edd18864a6810fcfcec855Andreas Gustafsson# where they are treated differently from dynamic ones.
c64aeaf419a7ef156b4aabfa2a913831e773157eBob HalleyAC_SUBST(LIBTOOL_MKDEP_SED)
9ed37e8b9ccd53bc37b546fffe487b9547dda3a0Mark Andrews# build libbind?
9ed37e8b9ccd53bc37b546fffe487b9547dda3a0Mark AndrewsAC_ARG_ENABLE(libbind,
9ed37e8b9ccd53bc37b546fffe487b9547dda3a0Mark Andrews [ --enable-libbind build libbind [default=no]])
9ed37e8b9ccd53bc37b546fffe487b9547dda3a0Mark Andrewscase "$enable_libbind" in
9ed37e8b9ccd53bc37b546fffe487b9547dda3a0Mark Andrews AC_SUBST(LIBBIND)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence# Here begins a very long section to determine the system's networking
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence# capabilities. The order of the tests is signficant.
7bb707a34778fc4bd9624d6c5de95675424ea59fDavid LawrenceAC_ARG_ENABLE(ipv6,
7bb707a34778fc4bd9624d6c5de95675424ea59fDavid Lawrence [ --enable-ipv6 use IPv6 [default=autodetect]])
4108eed5092156cf0407a97a9bd8ab7775164694Brian Wellingtoncase "$enable_ipv6" in
4108eed5092156cf0407a97a9bd8ab7775164694Brian Wellington yes|''|autodetect)
4108eed5092156cf0407a97a9bd8ab7775164694Brian Wellington AC_DEFINE(WANT_IPV6)
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# We do the IPv6 compilation checking after libtool so that we can put
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# the right suffix on the files.
4108eed5092156cf0407a97a9bd8ab7775164694Brian WellingtonAC_MSG_CHECKING(for IPv6 structures)
4108eed5092156cf0407a97a9bd8ab7775164694Brian WellingtonAC_TRY_COMPILE([
4108eed5092156cf0407a97a9bd8ab7775164694Brian Wellington[struct sockaddr_in6 sin6; return (0);],
4108eed5092156cf0407a97a9bd8ab7775164694Brian Wellington [AC_MSG_RESULT(yes)
4108eed5092156cf0407a97a9bd8ab7775164694Brian Wellington found_ipv6=yes],
4108eed5092156cf0407a97a9bd8ab7775164694Brian Wellington [AC_MSG_RESULT(no)
4108eed5092156cf0407a97a9bd8ab7775164694Brian Wellington found_ipv6=no])
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence# See whether IPv6 support is provided via a Kame add-on.
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence# This is done before other IPv6 linking tests to LIBS is properly set.
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid LawrenceAC_MSG_CHECKING(for Kame IPv6 support)
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid LawrenceAC_ARG_WITH(kame,
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence [ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]],
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence use_kame="$withval", use_kame="no")
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrencecase "$use_kame" in
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence kame_path="$use_kame"
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrencecase "$use_kame" in
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence AC_MSG_RESULT(no)
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence LIBS="-L$kame_path/lib -linet6 $LIBS"
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid LawrencePlease choose the proper path with the following command:
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence configure --with-kame=PATH
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence# Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence# Including it on Kame-using platforms is very bad, though, because
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence# Kame uses #error against direct inclusion. So include it on only
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence# This is done before the in6_pktinfo check because that's what
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence# netinet6/in6.h is needed for.
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrencechangequote({, })
dc97fe4ed08488d314ab5bc8e99ed839542cf411David Lawrencecase "$host" in
dc97fe4ed08488d314ab5bc8e99ed839542cf411David Lawrence*-bsdi4.[01]*)
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence LWRES_PLATFORM_NEEDNETINET6IN6H="#define LWRES_PLATFORM_NEEDNETINET6IN6H 1"
dc97fe4ed08488d314ab5bc8e99ed839542cf411David Lawrence isc_netinet6in6_hack="#include <netinet6/in6.h>"
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence LWRES_PLATFORM_NEEDNETINET6IN6H="#undef LWRES_PLATFORM_NEEDNETINET6IN6H"
dc97fe4ed08488d314ab5bc8e99ed839542cf411David Lawrence isc_netinet6in6_hack=""
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrencechangequote([, ])
dc97fe4ed08488d314ab5bc8e99ed839542cf411David Lawrence# This is similar to the netinet6/in6.h issue.
dc97fe4ed08488d314ab5bc8e99ed839542cf411David Lawrencecase "$host" in
3fafd7c0c42134ff2964b74a31500465a96dee90Andreas Gustafsson*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
aa30ee42c4b6da9bab4fb84d6cbbda6036a4d426Mark Andrews ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
aa30ee42c4b6da9bab4fb84d6cbbda6036a4d426Mark Andrews LWRES_PLATFORM_NEEDNETINETIN6H="#define LWRES_PLATFORM_NEEDNETINETIN6H 1"
aa30ee42c4b6da9bab4fb84d6cbbda6036a4d426Mark Andrews ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1"
aa30ee42c4b6da9bab4fb84d6cbbda6036a4d426Mark Andrews isc_netinetin6_hack="#include <netinet/in6.h>"
dc97fe4ed08488d314ab5bc8e99ed839542cf411David Lawrence ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H"
dc97fe4ed08488d314ab5bc8e99ed839542cf411David Lawrence LWRES_PLATFORM_NEEDNETINETIN6H="#undef LWRES_PLATFORM_NEEDNETINETIN6H"
e544b507b8019a62c5d2716281f6832519a8791dDavid Lawrence ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR"
dc97fe4ed08488d314ab5bc8e99ed839542cf411David Lawrence isc_netinetin6_hack=""
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence# Now delve deeper into the suitability of the IPv6 support.
7bb707a34778fc4bd9624d6c5de95675424ea59fDavid Lawrencecase "$found_ipv6" in
35c842e05dc6382ce1d9161a658d3ff4b2c3d4c9Bob Halley ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
35c842e05dc6382ce1d9161a658d3ff4b2c3d4c9Bob Halley LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1"
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews AC_MSG_CHECKING(for in6_addr)
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews AC_TRY_COMPILE([
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews$isc_netinetin6_hack
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews$isc_netinet6in6_hack
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews[struct in6_addr in6; return (0);],
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews [AC_MSG_RESULT(yes)
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6"
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews LWRES_PLATFORM_HAVEINADDR6="#undef LWRES_PLATFORM_HAVEINADDR6"
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews isc_in_addr6_hack=""],
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews [AC_MSG_RESULT(no)
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1"
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews LWRES_PLATFORM_HAVEINADDR6="#define LWRES_PLATFORM_HAVEINADDR6 1"
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews isc_in_addr6_hack="#define in6_addr in_addr6"])
435532822dc571a904207d8176e063cc8731eef5Bob Halley AC_MSG_CHECKING(for in6addr_any)
9ac79ef3f89b23d80f9649abf71fdc65bb7a8b62David Lawrence AC_TRY_LINK([
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews$isc_netinetin6_hack
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews$isc_netinet6in6_hack
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark Andrews$isc_in_addr6_hack
435532822dc571a904207d8176e063cc8731eef5Bob Halley [struct in6_addr in6; in6 = in6addr_any; return (0);],
435532822dc571a904207d8176e063cc8731eef5Bob Halley [AC_MSG_RESULT(yes)
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"],
435532822dc571a904207d8176e063cc8731eef5Bob Halley [AC_MSG_RESULT(no)
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence LWRES_PLATFORM_NEEDIN6ADDRANY="#define LWRES_PLATFORM_NEEDIN6ADDRANY 1"])
8313838954d67250d0ed7edf67fba5da0790d1a7Michael Graff AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
8313838954d67250d0ed7edf67fba5da0790d1a7Michael Graff AC_TRY_COMPILE([
8313838954d67250d0ed7edf67fba5da0790d1a7Michael Graff$isc_netinetin6_hack
8313838954d67250d0ed7edf67fba5da0790d1a7Michael Graff$isc_netinet6in6_hack
8313838954d67250d0ed7edf67fba5da0790d1a7Michael Graff [struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
8313838954d67250d0ed7edf67fba5da0790d1a7Michael Graff [AC_MSG_RESULT(yes)
8313838954d67250d0ed7edf67fba5da0790d1a7Michael Graff result="#define LWRES_HAVE_SIN6_SCOPE_ID 1"],
8313838954d67250d0ed7edf67fba5da0790d1a7Michael Graff [AC_MSG_RESULT(no)
8313838954d67250d0ed7edf67fba5da0790d1a7Michael Graff result="#undef LWRES_HAVE_SIN6_SCOPE_ID"])
8313838954d67250d0ed7edf67fba5da0790d1a7Michael Graff LWRES_HAVE_SIN6_SCOPE_ID="$result"
ece3d6c35693f9e2145434b0bf14e8b752cdeee8Michael Graff AC_MSG_CHECKING(for in6_pktinfo)
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid Lawrence AC_TRY_COMPILE([
dc97fe4ed08488d314ab5bc8e99ed839542cf411David Lawrence$isc_netinetin6_hack
dc97fe4ed08488d314ab5bc8e99ed839542cf411David Lawrence$isc_netinet6in6_hack
ece3d6c35693f9e2145434b0bf14e8b752cdeee8Michael Graff [struct in6_pktinfo xyzzy; return (0);],
ece3d6c35693f9e2145434b0bf14e8b752cdeee8Michael Graff [AC_MSG_RESULT(yes)
ece3d6c35693f9e2145434b0bf14e8b752cdeee8Michael Graff ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
ece3d6c35693f9e2145434b0bf14e8b752cdeee8Michael Graff [AC_MSG_RESULT(no -- disabling runtime ipv6 support)
ece3d6c35693f9e2145434b0bf14e8b752cdeee8Michael Graff ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
7bb707a34778fc4bd9624d6c5de95675424ea59fDavid Lawrence ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
35c842e05dc6382ce1d9161a658d3ff4b2c3d4c9Bob Halley LWRES_PLATFORM_HAVEIPV6="#undef LWRES_PLATFORM_HAVEIPV6"
9ac79ef3f89b23d80f9649abf71fdc65bb7a8b62David Lawrence ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"
ece3d6c35693f9e2145434b0bf14e8b752cdeee8Michael Graff ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
8313838954d67250d0ed7edf67fba5da0790d1a7Michael Graff LWRES_HAVE_SIN6_SCOPE_ID="#define LWRES_HAVE_SIN6_SCOPE_ID 1"
7bb707a34778fc4bd9624d6c5de95675424ea59fDavid Lawrence ISC_IPV6_O="ipv6.$O"
7bb707a34778fc4bd9624d6c5de95675424ea59fDavid Lawrence ISC_ISCIPV6_O="unix/ipv6.$O"
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob HalleyAC_SUBST(ISC_PLATFORM_HAVEIPV6)
35c842e05dc6382ce1d9161a658d3ff4b2c3d4c9Bob HalleyAC_SUBST(LWRES_PLATFORM_HAVEIPV6)
dc97fe4ed08488d314ab5bc8e99ed839542cf411David LawrenceAC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
dc97fe4ed08488d314ab5bc8e99ed839542cf411David LawrenceAC_SUBST(LWRES_PLATFORM_NEEDNETINETIN6H)
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid LawrenceAC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
0adde9f4f9369b23c67b9a29e824dda09b19022fDavid LawrenceAC_SUBST(LWRES_PLATFORM_NEEDNETINET6IN6H)
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark AndrewsAC_SUBST(ISC_PLATFORM_HAVEINADDR6)
19cfe6a53b6b932a375299ff8d82dbd66e54b5fdMark AndrewsAC_SUBST(LWRES_PLATFORM_HAVEINADDR6)
435532822dc571a904207d8176e063cc8731eef5Bob HalleyAC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David LawrenceAC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRANY)
ece3d6c35693f9e2145434b0bf14e8b752cdeee8Michael GraffAC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
e544b507b8019a62c5d2716281f6832519a8791dDavid LawrenceAC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
0fde58a7673f28fcc08eb8f597581247a4c2db20Bob HalleyAC_SUBST(ISC_IPV6_H)
0fde58a7673f28fcc08eb8f597581247a4c2db20Bob HalleyAC_SUBST(ISC_IPV6_O)
0fde58a7673f28fcc08eb8f597581247a4c2db20Bob HalleyAC_SUBST(ISC_ISCIPV6_O)
0fde58a7673f28fcc08eb8f597581247a4c2db20Bob HalleyAC_SUBST(ISC_IPV6_C)
8313838954d67250d0ed7edf67fba5da0790d1a7Michael GraffAC_SUBST(LWRES_HAVE_SIN6_SCOPE_ID)
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark AndrewsAC_MSG_CHECKING([for struct if_laddrreq])
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark AndrewsAC_TRY_LINK([
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark Andrews],[ struct if_laddrreq a; ],
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark Andrews [AC_MSG_RESULT(yes)
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark Andrews ISC_PLATFORM_HAVEIF_LADDRREQ="#define ISC_PLATFORM_HAVEIF_LADDRREQ 1"],
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark Andrews [AC_MSG_RESULT(no)
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark Andrews ISC_PLATFORM_HAVEIF_LADDRREQ="#undef ISC_PLATFORM_HAVEIF_LADDRREQ"])
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark AndrewsAC_SUBST(ISC_PLATFORM_HAVEIF_LADDRREQ)
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark AndrewsAC_MSG_CHECKING([for struct if_laddrconf])
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark AndrewsAC_TRY_LINK([
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark Andrews],[ struct if_laddrconf a; ],
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark Andrews [AC_MSG_RESULT(yes)
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark Andrews ISC_PLATFORM_HAVEIF_LADDRCONF="#define ISC_PLATFORM_HAVEIF_LADDRCONF 1"],
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark Andrews [AC_MSG_RESULT(no)
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark Andrews ISC_PLATFORM_HAVEIF_LADDRCONF="#undef ISC_PLATFORM_HAVEIF_LADDRCONF"])
31d3464c0c0a35236c7924f698c5a8a66a9ed534Mark AndrewsAC_SUBST(ISC_PLATFORM_HAVEIF_LADDRCONF)
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# Check for network functions that are often missing. We do this
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# after the libtool checking, so we can put the right suffix on
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence# the files. It also needs to come after checking for a Kame add-on,
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence# which provides some (all?) of the desired functions.
495c00c1c995c96587b38d2d5fa41f127869d5b8David LawrenceAC_MSG_CHECKING([for inet_ntop])
a2495a1323842d2f2c6269eea66a2ba7e0baffccDavid Lawrence [inet_ntop(0, 0, 0, 0); return (0);],
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence [AC_MSG_RESULT(yes)
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence [AC_MSG_RESULT(no)
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"])
41149b919e439a0551be66eabe76398ab493e436Andreas Gustafsson# On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
bddfe77128b0f16af263ff149db40f0d885f43d0Mark Andrews# addresses with less than four octets, like "1.2.3". Also leading
bddfe77128b0f16af263ff149db40f0d885f43d0Mark Andrews# zeros should also be rejected.
495c00c1c995c96587b38d2d5fa41f127869d5b8David LawrenceAC_MSG_CHECKING([for inet_pton])
bddfe77128b0f16af263ff149db40f0d885f43d0Mark Andrewsmain() { char a[4]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
bddfe77128b0f16af263ff149db40f0d885f43d0Mark Andrews inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : 0); }],
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence [AC_MSG_RESULT(yes)
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence [AC_MSG_RESULT(no)
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas Gustafsson ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas Gustafsson [AC_MSG_RESULT(assuming target platform has working inet_pton)
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas Gustafsson ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"])
495c00c1c995c96587b38d2d5fa41f127869d5b8David LawrenceAC_MSG_CHECKING([for inet_aton])
a2495a1323842d2f2c6269eea66a2ba7e0baffccDavid Lawrence [struct in_addr in; inet_aton(0, &in); return (0);],
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence [AC_MSG_RESULT(yes)
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON"],
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence [AC_MSG_RESULT(no)
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c"
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1"])
a59b51eb1d9a80d682efc669414e16dc8da47e95David LawrenceAC_SUBST(ISC_PLATFORM_NEEDNTOP)
a59b51eb1d9a80d682efc669414e16dc8da47e95David LawrenceAC_SUBST(ISC_PLATFORM_NEEDPTON)
a59b51eb1d9a80d682efc669414e16dc8da47e95David LawrenceAC_SUBST(ISC_PLATFORM_NEEDATON)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence# Look for a 4.4BSD-style sa_len member in struct sockaddr.
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrencecase "$host" in
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence # Turn on 4.4BSD style sa_len support.
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence AC_DEFINE(_SOCKADDR_LEN)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_MSG_CHECKING(for sa_len in struct sockaddr)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_TRY_COMPILE([
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence[struct sockaddr sa; sa.sa_len = 0; return (0);],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(yes)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1"
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence LWRES_PLATFORM_HAVESALEN="#define LWRES_PLATFORM_HAVESALEN 1"],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(no)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_PLATFORM_HAVESALEN="#undef ISC_PLATFORM_HAVESALEN"
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence LWRES_PLATFORM_HAVESALEN="#undef LWRES_PLATFORM_HAVESALEN"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(ISC_PLATFORM_HAVESALEN)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(LWRES_PLATFORM_HAVESALEN)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence# Look for a 4.4BSD or 4.3BSD struct msghdr
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_MSG_CHECKING(for struct msghdr flavor)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_TRY_COMPILE([
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence[struct msghdr msg; msg.msg_flags = 0; return (0);],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(4.4BSD)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(4.3BSD)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence# Look for in_port_t.
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_MSG_CHECKING(for type in_port_t)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_TRY_COMPILE([
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence[in_port_t port = 25; return (0);],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(yes)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(no)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(ISC_PLATFORM_NEEDPORTT)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence# Check for addrinfo
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_MSG_CHECKING(for struct addrinfo)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_TRY_COMPILE([
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence[struct addrinfo a; return (0);],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(yes)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO"
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence AC_DEFINE(HAVE_ADDRINFO)],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(no)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(ISC_LWRES_NEEDADDRINFO)
2449f41e75d3b3f1c0ec3f05b1603fd8f80d8ae0Mark Andrews# Check for rrsetinfo
2449f41e75d3b3f1c0ec3f05b1603fd8f80d8ae0Mark AndrewsAC_MSG_CHECKING(for struct rrsetinfo)
2449f41e75d3b3f1c0ec3f05b1603fd8f80d8ae0Mark AndrewsAC_TRY_COMPILE([
2449f41e75d3b3f1c0ec3f05b1603fd8f80d8ae0Mark Andrews[struct rrsetinfo r; return (0);],
2449f41e75d3b3f1c0ec3f05b1603fd8f80d8ae0Mark Andrews [AC_MSG_RESULT(yes)
c4157085cd215999883eb3de41bf16ce798379ceAndreas Gustafsson ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO"],
2449f41e75d3b3f1c0ec3f05b1603fd8f80d8ae0Mark Andrews [AC_MSG_RESULT(no)
2449f41e75d3b3f1c0ec3f05b1603fd8f80d8ae0Mark Andrews ISC_LWRES_NEEDRRSETINFO="#define ISC_LWRES_NEEDRRSETINFO 1"])
2449f41e75d3b3f1c0ec3f05b1603fd8f80d8ae0Mark AndrewsAC_SUBST(ISC_LWRES_NEEDRRSETINFO)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_MSG_CHECKING(for int sethostent)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_TRY_COMPILE([
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence[int i = sethostent(0); return(0);],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(yes)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1"],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(no)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_SETHOSTENTINT="#undef ISC_LWRES_SETHOSTENTINT"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(ISC_LWRES_SETHOSTENTINT)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_MSG_CHECKING(for int endhostent)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_TRY_COMPILE([
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence[int i = endhostent(); return(0);],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(yes)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(no)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(ISC_LWRES_ENDHOSTENTINT)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_MSG_CHECKING(for getnetbyaddr(in_addr_t, ...))
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_TRY_COMPILE([
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrencestruct netent *getnetbyaddr(in_addr_t, int);],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(yes)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1"],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(no)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_GETNETBYADDRINADDR="#undef ISC_LWRES_GETNETBYADDRINADDR"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(ISC_LWRES_GETNETBYADDRINADDR)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_MSG_CHECKING(for int setnetent)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_TRY_COMPILE([
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence[int i = setnetent(0); return(0);],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(yes)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(no)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(ISC_LWRES_SETNETENTINT)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_MSG_CHECKING(for int endnetent)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_TRY_COMPILE([
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence[int i = endnetent(); return(0);],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(yes)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(no)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(ISC_LWRES_ENDNETENTINT)
3aa5ecb8f7081d831bb267d45437e46c61a41f25Brian WellingtonAC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...))
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_TRY_COMPILE([
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrencestruct hostent *gethostbyaddr(const void *, size_t, int);],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(yes)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(no)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_MSG_CHECKING(for h_errno in netdb.h)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_TRY_COMPILE([
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence[h_errno = 1; return(0);],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(yes)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(no)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(ISC_LWRES_NEEDHERRNO)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_CHECK_FUNC(getipnodebyname,
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_CHECK_FUNC(getnameinfo,
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_CHECK_FUNC(getaddrinfo,
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence AC_DEFINE(HAVE_GETADDRINFO)],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])
703e1c0bb66f3cd3d300358ca0c1fdf3cb5fb1c5Brian WellingtonAC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(ISC_LWRES_GETIPNODEPROTO)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence# Look for a sysctl call to get the list of network interfaces.
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_MSG_CHECKING(for interface list sysctl)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_EGREP_CPP(found_rt_iflist, [
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence#ifdef NET_RT_IFLIST
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrencefound_rt_iflist
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(yes)
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence AC_DEFINE(HAVE_IFLIST_SYSCTL)],
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence [AC_MSG_RESULT(no)])
a59b51eb1d9a80d682efc669414e16dc8da47e95David Lawrence# Check for some other useful functions that are not ever-present.
1bb509f58b57f1d9ef413762fb9e3dd2bcaf7ed4Mark AndrewsAC_CHECK_FUNC(strsep,
1bb509f58b57f1d9ef413762fb9e3dd2bcaf7ed4Mark Andrews [ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
358628c8f4804a2db52be0f6d03a66137fab4884David Lawrence [ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
affd6c025b39ec89a91056efb084fff7239ad6e3Mark AndrewsAC_CHECK_FUNC(vsnprintf,
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob Halley [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"],
f7bf83d0cc099e754327f8da8c4d6d320da1de01Mark Andrews [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O"
f7bf83d0cc099e754327f8da8c4d6d320da1de01Mark Andrews ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS print.c"
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob Halley ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"])
51a659eb711eb6a17891675d3de6b8085a766ab2Mark AndrewsAC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob HalleyAC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
c654449ccf403ccd2b81be2038b1013d6fbb06ccMark AndrewsAC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR))
694c897b20f06f8a5349fd9ac5df93947f6f5a2aBob HalleyAC_SUBST(ISC_EXTRA_OBJS)
694c897b20f06f8a5349fd9ac5df93947f6f5a2aBob HalleyAC_SUBST(ISC_EXTRA_SRCS)
28a3d529046ec5536e1ea619454624b683509675Andreas Gustafsson# Determine the printf format characters to use when printing
28a3d529046ec5536e1ea619454624b683509675Andreas Gustafsson# values of type isc_int64_t. We make the assumption that platforms
28a3d529046ec5536e1ea619454624b683509675Andreas Gustafsson# where a "long long" is the same size as a "long" (e.g., Alpha/OSF1)
28a3d529046ec5536e1ea619454624b683509675Andreas Gustafsson# want "%ld" and everyone else can use "%lld". Win32 uses "%I64d",
28a3d529046ec5536e1ea619454624b683509675Andreas Gustafsson# but that's defined elsewhere since we don't use configure on Win32.
28a3d529046ec5536e1ea619454624b683509675Andreas GustafssonAC_MSG_CHECKING(printf format modifier for 64-bit integers)
8a1930d026517e4733d680ac51abeb01353332c4Mark AndrewsAC_TRY_RUN([main() { exit(!(sizeof(long long int) == sizeof(long int))); }],
28a3d529046ec5536e1ea619454624b683509675Andreas Gustafsson [AC_MSG_RESULT(l)
28a3d529046ec5536e1ea619454624b683509675Andreas Gustafsson ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'],
28a3d529046ec5536e1ea619454624b683509675Andreas Gustafsson [AC_MSG_RESULT(ll)
28a3d529046ec5536e1ea619454624b683509675Andreas Gustafsson ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'],
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas Gustafsson [AC_MSG_RESULT(assuming target platform uses ll)
28a3d529046ec5536e1ea619454624b683509675Andreas Gustafsson ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'])
28a3d529046ec5536e1ea619454624b683509675Andreas GustafssonAC_SUBST(ISC_PLATFORM_QUADFORMAT)
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# Security Stuff
5c00d1c90030a311d2700970fa7cffc8f828a48cBob HalleyAC_CHECK_FUNC(chroot, AC_DEFINE(HAVE_CHROOT))
e980502db40155234b4e8d320b748b34dbaba3a2Brian WellingtonAC_ARG_ENABLE(linux-caps,
e980502db40155234b4e8d320b748b34dbaba3a2Brian Wellington [ --disable-linux-caps disable linux capabilities])
e980502db40155234b4e8d320b748b34dbaba3a2Brian Wellingtoncase "$enable_linux_caps" in
e980502db40155234b4e8d320b748b34dbaba3a2Brian Wellington AC_CHECK_HEADERS(linux/capability.h)
f8727bd90366af835f551da1b5e1fdfcd2d3d01fBrian WellingtonAC_CHECK_HEADERS(sys/prctl.h)
17012a879742ceb6561dcc4ae3bcd4ff80dc9887David Lawrence# BSD/OS, and perhaps some others, don't define rlim_t.
17012a879742ceb6561dcc4ae3bcd4ff80dc9887David LawrenceAC_MSG_CHECKING(for type rlim_t)
17012a879742ceb6561dcc4ae3bcd4ff80dc9887David LawrenceAC_TRY_COMPILE([
17012a879742ceb6561dcc4ae3bcd4ff80dc9887David Lawrence[rlim_t rl = 19671212; return (0);],
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas Gustafsson[AC_MSG_RESULT(yes)
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas Gustafsson ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t"],
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas Gustafsson[AC_MSG_RESULT(no)
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas GustafssonAC_MSG_CHECKING(type of rlim_cur)
6ab3d08c1257efa6287d8ad7bb41d8fb99d5d6dfMark Andrewsmain() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}],
6ab3d08c1257efa6287d8ad7bb41d8fb99d5d6dfMark Andrews[AC_MSG_RESULT(int)
6ab3d08c1257efa6287d8ad7bb41d8fb99d5d6dfMark AndrewsISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"],
6ab3d08c1257efa6287d8ad7bb41d8fb99d5d6dfMark Andrewsmain() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}],
6ab3d08c1257efa6287d8ad7bb41d8fb99d5d6dfMark Andrews[AC_MSG_RESULT(long int)
6ab3d08c1257efa6287d8ad7bb41d8fb99d5d6dfMark AndrewsISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"],
6ab3d08c1257efa6287d8ad7bb41d8fb99d5d6dfMark Andrewsmain() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}],
6ab3d08c1257efa6287d8ad7bb41d8fb99d5d6dfMark Andrews[AC_MSG_RESULT(long long int)
6ab3d08c1257efa6287d8ad7bb41d8fb99d5d6dfMark AndrewsISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"],
6ab3d08c1257efa6287d8ad7bb41d8fb99d5d6dfMark Andrews[AC_MSG_ERROR([unable to determine sizeof rlim_cur])
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas Gustafsson],[AC_MSG_ERROR(this cannot happen)])
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas Gustafsson],[AC_MSG_ERROR(this cannot happen)])
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas Gustafsson],[AC_MSG_ERROR(cannot determine type of rlim_cur when cross compiling - define rlim_t)])
6ab3d08c1257efa6287d8ad7bb41d8fb99d5d6dfMark AndrewsAC_SUBST(ISC_PLATFORM_RLIMITTYPE)
37aa91031830d2fc428331378f089169eb3e6dc2David Lawrence# Microsoft has their own way of handling shared libraries that requires
37aa91031830d2fc428331378f089169eb3e6dc2David Lawrence# additional qualifiers on extern variables. Unix systems don't need it.
37aa91031830d2fc428331378f089169eb3e6dc2David LawrenceAC_SUBST(ISC_PLATFORM_USEDECLSPEC)
37aa91031830d2fc428331378f089169eb3e6dc2David LawrenceISC_PLATFORM_USEDECLSPEC="#undef ISC_PLATFORM_USEDECLSPEC"
073719ac7155ba72a353590190da58837bd590eaMark AndrewsAC_SUBST(LWRES_PLATFORM_USEDECLSPEC)
073719ac7155ba72a353590190da58837bd590eaMark AndrewsLWRES_PLATFORM_USEDECLSPEC="#undef LWRES_PLATFORM_USEDECLSPEC"
17012a879742ceb6561dcc4ae3bcd4ff80dc9887David Lawrence# Random remaining OS-specific issues involving compiler warnings.
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence# XXXDCL print messages to indicate some compensation is being done?
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David LawrenceAC_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT)
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David LawrenceISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT"
8b11f3debd9a9494d5aec60ea228ab393fbdc26eDavid Lawrencecase "$host" in
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence hack_shutup_sputaux=yes
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence hack_shutup_sigwait=yes
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence hack_shutup_sputaux=yes
9c9cf3a8d063b0255dbc8679dab588708e9b6f1cAndreas Gustafsson [*-bsdi4.[12]*])
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence hack_shutup_stdargcast=yes
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence *-solaris2.8)
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence hack_shutup_pthreadonceinit=yes
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrencecase "$hack_shutup_pthreadonceinit" in
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence # Shut up PTHREAD_ONCE_INIT unbraced initializer warnings.
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1"
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrencecase "$hack_shutup_sigwait" in
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence # Shut up a -Wmissing-prototypes warning for sigwait().
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence AC_DEFINE(SHUTUP_SIGWAIT)
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrencecase "$hack_shutup_sputaux" in
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence # Shut up a -Wmissing-prototypes warning from <stdio.h>.
8b11f3debd9a9494d5aec60ea228ab393fbdc26eDavid Lawrence AC_DEFINE(SHUTUP_SPUTAUX)
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrencecase "$hack_shutup_stdargcast" in
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence # Shut up a -Wcast-qual warning from va_start().
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence AC_DEFINE(SHUTUP_STDARG_CAST)
f252f91e2725f2b505d12da6c049896e1de74112Andreas Gustafsson# The following sections deal with tools used for formatting
f252f91e2725f2b505d12da6c049896e1de74112Andreas Gustafsson# the documentation. They are all optional, unless you are
f252f91e2725f2b505d12da6c049896e1de74112Andreas Gustafsson# a developer editing the documentation source.
45fca822d565a2c600b04330a1dd25a9db7e2974Andreas Gustafsson# Directory trees where SGML files are commonly found.
45fca822d565a2c600b04330a1dd25a9db7e2974Andreas Gustafssonsgmltrees="/usr/pkg/share/sgml /usr/local/share/sgml"
60084a1a5a9e570842b8147ff4c34b68ce4de7f8Andreas Gustafsson# Look for openjade. Plain jade is no longer supported.
60084a1a5a9e570842b8147ff4c34b68ce4de7f8Andreas GustafssonAC_PATH_PROGS(OPENJADE, openjade, openjade)
60084a1a5a9e570842b8147ff4c34b68ce4de7f8Andreas GustafssonAC_SUBST(OPENJADE)
f9f9c47053364ba915d3ef0dbb4f55bd202487daAndreas Gustafsson# Look for TeX.
f9f9c47053364ba915d3ef0dbb4f55bd202487daAndreas GustafssonAC_PATH_PROGS(JADETEX, jadetex, jadetex)
f9f9c47053364ba915d3ef0dbb4f55bd202487daAndreas GustafssonAC_SUBST(JADETEX)
f9f9c47053364ba915d3ef0dbb4f55bd202487daAndreas GustafssonAC_PATH_PROGS(PDFJADETEX, pdfjadetex, pdfjadetex)
f9f9c47053364ba915d3ef0dbb4f55bd202487daAndreas GustafssonAC_SUBST(PDFJADETEX)
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson# Subroutine for searching for an ordinary file (e.g., a stylesheet)
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson# in a number of directories:
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson# NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES)
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson# If the file FILENAME is found in one of the DIRECTORIES, the shell
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson# variable VARIABLE is defined to its absolute pathname. Otherwise,
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson# it is set to FILENAME, with no directory prefix (that's not terribly
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson# useful, but looks less confusing in substitutions than leaving it
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson# empty). The variable VARIABLE will be substituted into output files.
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas GustafssonAC_DEFUN(NOM_PATH_FILE, [
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas GustafssonAC_MSG_CHECKING(for $2)
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson AC_MSG_RESULT($f)
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafssonif test "X[$]$1" = "X"
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson AC_MSG_RESULT("not found");
45fca822d565a2c600b04330a1dd25a9db7e2974Andreas GustafssonNOM_PATH_FILE(SGMLCATALOG, catalog, $sgmltrees)
60084a1a5a9e570842b8147ff4c34b68ce4de7f8Andreas Gustafsson# Look for the HTML stylesheet html/docbook.dsl, used for
60084a1a5a9e570842b8147ff4c34b68ce4de7f8Andreas Gustafsson# formatting man pages in HTML. Its location varies,
60084a1a5a9e570842b8147ff4c34b68ce4de7f8Andreas Gustafsson# so far we have seen:
a737f45fbacf209ec75595c85447b2bfd264138bAndreas Gustafsson# NetBSD /usr/pkg/share/docbook/dsssl/modular/
a737f45fbacf209ec75595c85447b2bfd264138bAndreas Gustafsson# FreeBSD /usr/local/share/docbook/dsssl/modular/
45fca822d565a2c600b04330a1dd25a9db7e2974Andreas Gustafsson# Ditto for the print stylesheet print/docbook.dsl.
45fca822d565a2c600b04330a1dd25a9db7e2974Andreas Gustafssonfor d in $sgmltrees
f9f9c47053364ba915d3ef0dbb4f55bd202487daAndreas Gustafsson for s in docbook/dsssl/modular dsssl/docbook
45fca822d565a2c600b04330a1dd25a9db7e2974Andreas Gustafsson stylepath="$stylepath $d/$s"
45fca822d565a2c600b04330a1dd25a9db7e2974Andreas GustafssonNOM_PATH_FILE(HTMLSTYLE, html/docbook.dsl, $stylepath)
dc8f5b39e23f723c0a99657ce9768950042d7c1eAndreas GustafssonNOM_PATH_FILE(PRINTSTYLE, print/docbook.dsl, $stylepath)
60084a1a5a9e570842b8147ff4c34b68ce4de7f8Andreas Gustafsson# Look for XML declarations
45fca822d565a2c600b04330a1dd25a9db7e2974Andreas GustafssonNOM_PATH_FILE(XMLDCL, docbook/dsssl/modular/dtds/decls/xml.dcl, $sgmltrees)
45fca822d565a2c600b04330a1dd25a9db7e2974Andreas GustafssonNOM_PATH_FILE(DOCBOOK2MANSPEC, docbook2X/docbook2man-spec.pl, $sgmltrees)
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# Substitutions
6d5dcd0dc9bdbd679282b1ffc47987d24c3a1346Bob HalleyAC_SUBST(BIND9_TOP_BUILDDIR)
6d5dcd0dc9bdbd679282b1ffc47987d24c3a1346Bob HalleyBIND9_TOP_BUILDDIR=`pwd`
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob HalleyAC_SUBST(BIND9_ISC_BUILDINCLUDE)
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonAC_SUBST(BIND9_ISCCC_BUILDINCLUDE)
be7f27304337afbf078e8bd8db0f951a33abe33bAndreas GustafssonAC_SUBST(BIND9_ISCCFG_BUILDINCLUDE)
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob HalleyAC_SUBST(BIND9_DNS_BUILDINCLUDE)
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael GraffAC_SUBST(BIND9_LWRES_BUILDINCLUDE)
c2bc56dc65b4b103a5600565680eb5f33fa4c90bMark AndrewsAC_SUBST(BIND9_BIND9_BUILDINCLUDE)
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob Halleyif test "X$srcdir" != "X"; then
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob Halley BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include"
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington BIND9_ISCCC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccc/include"
be7f27304337afbf078e8bd8db0f951a33abe33bAndreas Gustafsson BIND9_ISCCFG_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccfg/include"
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob Halley BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include"
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff BIND9_LWRES_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/lwres/include"
c2bc56dc65b4b103a5600565680eb5f33fa4c90bMark Andrews BIND9_BIND9_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/bind9/include"
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob Halley BIND9_ISC_BUILDINCLUDE=""
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian Wellington BIND9_ISCCC_BUILDINCLUDE=""
be7f27304337afbf078e8bd8db0f951a33abe33bAndreas Gustafsson BIND9_ISCCFG_BUILDINCLUDE=""
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob Halley BIND9_DNS_BUILDINCLUDE=""
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff BIND9_LWRES_BUILDINCLUDE=""
c2bc56dc65b4b103a5600565680eb5f33fa4c90bMark Andrews BIND9_BIND9_BUILDINCLUDE=""
c2bc56dc65b4b103a5600565680eb5f33fa4c90bMark AndrewsAC_SUBST_FILE(BIND9_MAKE_INCLUDES)
c2bc56dc65b4b103a5600565680eb5f33fa4c90bMark AndrewsBIND9_MAKE_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob HalleyAC_SUBST_FILE(BIND9_MAKE_RULES)
2180f41c907e013715cbc54c64545b26fc3c0dbaMichael GraffBIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
2180f41c907e013715cbc54c64545b26fc3c0dbaMichael GraffAC_SUBST(BIND9_VERSION)
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob HalleyAC_SUBST_FILE(LIBISC_API)
1d92d8a2456b23842a649b6104c60a9d6ea25333Brian WellingtonAC_SUBST_FILE(LIBISCCC_API)
be7f27304337afbf078e8bd8db0f951a33abe33bAndreas GustafssonAC_SUBST_FILE(LIBISCCFG_API)
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob HalleyAC_SUBST_FILE(LIBDNS_API)
c2bc56dc65b4b103a5600565680eb5f33fa4c90bMark AndrewsAC_SUBST_FILE(LIBBIND9_API)
b2f85baf7905bad89781f8ef73003d4cfa955257Michael GraffAC_SUBST_FILE(LIBLWRES_API)
afbf0f0d778da7958bbd8d7d71614f32cdc9a9b0David Lawrence# Tell Emacs to edit this file in shell mode.
afbf0f0d778da7958bbd8d7d71614f32cdc9a9b0David Lawrence# Local Variables: