configure.in revision ec5347e2c775f027573ce5648b910361aa926c01
f36c85c3cee0b7022d6a99077fab2e5afc4e357dMark Andrews# Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# Copyright (C) 1998-2003 Internet Software Consortium.
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# Permission to use, copy, modify, and/or 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.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# PERFORMANCE OF THIS SOFTWARE.
74cb99072c4b0ebd2ccafcfa284288fa760f7a1aMark AndrewsAC_DIVERT_PUSH(1)dnl
866d106459313499d0ca7bfccb4b2d23d5e4377cDavid Lawrenceesyscmd([sed "s/^/# /" COPYRIGHT])dnl
866d106459313499d0ca7bfccb4b2d23d5e4377cDavid LawrenceAC_DIVERT_POP()dnl
ec5347e2c775f027573ce5648b910361aa926c01Automatic UpdaterAC_REVISION($Revision: 1.429 $)
03e200df5dc283f24a6a349f0b31d3eab26da893Mark AndrewsAC_PREREQ(2.59)
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)
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews# Make very sure that these are the first files processed by
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews# config.status, since we use the processed output as the input for
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews# AC_SUBST_FILE() subsitutions in other files.
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
b587e1d83f007ce68a9ae93097c461d8eb7aa373Mark Andrews# desired is some compatibility 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
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews case "$sysconfdir" in
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews '${prefix}/etc')
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews sysconfdir=/etc
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews case "$localstatedir" in
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews '${prefix}/var')
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews 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
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # Not all systems have dirname.
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews changequote({, })
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews changequote([, ])
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ac_prog="`echo $INSTALL | sed 's%.*/%%'`"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews test "$ac_dir" = "$ac_prog" && ac_dir=.
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews 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
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # Use Sun's cc if it is available, but watch
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # out for /usr/ucb/cc; it will never be the right
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # compiler to use.
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # If setting CC here fails, the AC_PROG_CC done
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # 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*)
641da3ca1184d9951d5cf91538524a345bf5f271Mark Andrews# gcc's optimiser is broken at -02 for ultrasparc
641da3ca1184d9951d5cf91538524a345bf5f271Mark Andrewsif test "$ac_env_CFLAGS_set" != set -a "X$GCC" = "Xyes"; then
641da3ca1184d9951d5cf91538524a345bf5f271Mark Andrews case "$host" in
641da3ca1184d9951d5cf91538524a345bf5f271Mark Andrews CCFLAGS="-g -O1"
774c3a62d9adca187b44fe90919bb409a43a2f2aMark Andrews# OS dependent CC flags
9fe28a624c659e380d47dbf45527637dab03b998Mark Andrewscase "$host" in
774c3a62d9adca187b44fe90919bb409a43a2f2aMark Andrews # OSF 5.0: recv/send are only avaliable with -D_POSIX_PII_SOCKET or
774c3a62d9adca187b44fe90919bb409a43a2f2aMark Andrews # -D_XOPEN_SOURCE_EXTENDED.
9fe28a624c659e380d47dbf45527637dab03b998Mark Andrews STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET"
9fe28a624c659e380d47dbf45527637dab03b998Mark Andrews CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
774c3a62d9adca187b44fe90919bb409a43a2f2aMark Andrews #HP-UX: need -D_XOPEN_SOURCE_EXTENDED and -lxnet for CMSG macros
774c3a62d9adca187b44fe90919bb409a43a2f2aMark Andrews STD_CDEFINES="$STD_CDEFINES -D_XOPEN_SOURCE_EXTENDED"
774c3a62d9adca187b44fe90919bb409a43a2f2aMark Andrews CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
774c3a62d9adca187b44fe90919bb409a43a2f2aMark Andrews LIBS="-lxnet $LIBS"
774c3a62d9adca187b44fe90919bb409a43a2f2aMark Andrews # Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
774c3a62d9adca187b44fe90919bb409a43a2f2aMark Andrews STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
774c3a62d9adca187b44fe90919bb409a43a2f2aMark Andrews CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
39b973d8873996c3bfb6e5b4cc69731f6c3b77b5Mark AndrewsAC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/param.h sys/sysctl.h net/if6.h,,,
6342df69b05f2f62d060fd4affdf536e51504084Mark Andrews[$ac_includes_default
6342df69b05f2f62d060fd4affdf536e51504084Mark Andrews#ifdef HAVE_SYS_PARAM_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)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_DEFINE(inline, )])
8f3dd8f8e73e4465221a5297819db70e6b383138Mark AndrewsAC_CHECK_TYPE(ssize_t, int)
6e9efadbea9febb0494e713e54dfea6f7ef70383Mark AndrewsAC_CHECK_TYPE(uintptr_t,unsigned long)
43fe2897fc80bbec2115310ca79d432a252f3ea4Mark AndrewsAC_CHECK_TYPE(socklen_t,
43fe2897fc80bbec2115310ca79d432a252f3ea4Mark Andrews[AC_DEFINE(ISC_SOCKADDR_LEN_T, socklen_t)],
43fe2897fc80bbec2115310ca79d432a252f3ea4Mark AndrewsAC_TRY_COMPILE(
43fe2897fc80bbec2115310ca79d432a252f3ea4Mark Andrewsint getsockname(int, struct sockaddr *, size_t *);
43fe2897fc80bbec2115310ca79d432a252f3ea4Mark Andrews[AC_DEFINE(ISC_SOCKADDR_LEN_T, size_t)],
43fe2897fc80bbec2115310ca79d432a252f3ea4Mark Andrews[AC_DEFINE(ISC_SOCKADDR_LEN_T, int)])
43fe2897fc80bbec2115310ca79d432a252f3ea4Mark AndrewsAC_SUBST(ISC_SOCKADDR_LEN_T)
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
963c48ba4d06a112c70d50328e827749e95f58dbMark AndrewsAC_MSG_CHECKING(if unistd.h or sys/types.h defines fd_set)
5ff133b82082d82f0ba89b7c999c6b62b6298e46Andreas GustafssonAC_TRY_COMPILE([
963c48ba4d06a112c70d50328e827749e95f58dbMark Andrews#include <sys/types.h> /* Ultrix */
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
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews 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
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews 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?
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsOPENSSL_WARNING=
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas GustafssonAC_MSG_CHECKING(for OpenSSL library)
13faa8b6a2d0d45e0659049983928366252ab3faMichael GraffAC_ARG_WITH(openssl,
61d5bfc06be978ea962b1c64309894ac80351771Mark Andrews[ --with-openssl[=PATH] Build with OpenSSL [yes|no|path].
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews (Required for DNSSEC)],
3d8dfd44a3be708f00380064411c16b2fa28303aMark Andrews use_openssl="$withval", use_openssl="auto")
4cf228853d658a742a826393f341e2486c629f7bMark Andrewsopenssldirs="/usr /usr/local /usr/local/ssl /usr/pkg /usr/sfw"
a53259c4cc558f86dd008eccc60cc89b6734a03cMark Andrewsif test "$use_openssl" = "auto"
a53259c4cc558f86dd008eccc60cc89b6734a03cMark Andrews for d in $openssldirs
a53259c4cc558f86dd008eccc60cc89b6734a03cMark Andrews use_openssl=$d
5f9e583552f53de12062bfff12e47250abce378fBrian Wellingtoncase "$use_openssl" in
3fcf6b956f47405750724bd84e1b2290b61c9186Brian Wellington AC_MSG_RESULT(no)
3fcf6b956f47405750724bd84e1b2290b61c9186Brian Wellington DST_OPENSSL_INC=""
3fcf6b956f47405750724bd84e1b2290b61c9186Brian Wellington USE_OPENSSL=""
a53259c4cc558f86dd008eccc60cc89b6734a03cMark Andrews DST_OPENSSL_INC=""
a53259c4cc558f86dd008eccc60cc89b6734a03cMark Andrews USE_OPENSSL=""
a53259c4cc558f86dd008eccc60cc89b6734a03cMark Andrews AC_MSG_RESULT(not found)
a53259c4cc558f86dd008eccc60cc89b6734a03cMark Andrews if test "$use_openssl" = "yes"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # User did not specify a path - guess it
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson for d in $openssldirs
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews use_openssl=$d
68f72235f8f41fa949823551d8e6476057ec5bd6Andreas Gustafsson if test "$use_openssl" = "yes"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_MSG_RESULT(not found)
80f323528ac699026a609a5e3b765dc6e88fe37cAndreas Gustafsson[OpenSSL was not found in any of $openssldirs; use --with-openssl=/path])
3fcf6b956f47405750724bd84e1b2290b61c9186Brian Wellington USE_OPENSSL='-DOPENSSL'
c5826852e6c789f59b301f8197e65a1dd4e09a44Mark Andrews if test "$use_openssl" = "/usr"
c5826852e6c789f59b301f8197e65a1dd4e09a44Mark Andrews DST_OPENSSL_INC=""
c5826852e6c789f59b301f8197e65a1dd4e09a44Mark Andrews DNS_OPENSSL_LIBS="-lcrypto"
c5826852e6c789f59b301f8197e65a1dd4e09a44Mark Andrews DST_OPENSSL_INC="-I$use_openssl/include"
c5826852e6c789f59b301f8197e65a1dd4e09a44Mark Andrews case $host in
c5826852e6c789f59b301f8197e65a1dd4e09a44Mark Andrews DNS_OPENSSL_LIBS="-L$use_openssl/lib -R$use_openssl/lib -lcrypto"
f8f65e2de40b1e9874b88f392f3abeb057ce6172Mark Andrews DNS_OPENSSL_LIBS="-L$use_openssl/lib -Wl,+b: -lcrypto"
c5826852e6c789f59b301f8197e65a1dd4e09a44Mark Andrews DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_MSG_RESULT(using OpenSSL from $use_openssl/lib and $use_openssl/include)
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson saved_cflags="$CFLAGS"
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson saved_libs="$LIBS"
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson CFLAGS="$CFLAGS $DST_OPENSSL_INC"
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson LIBS="$LIBS $DNS_OPENSSL_LIBS"
bc53aacc6e9302b1f8d01467fc39585584652782Andreas Gustafsson AC_MSG_CHECKING(whether linking with OpenSSL works)
bc53aacc6e9302b1f8d01467fc39585584652782Andreas Gustafsson ERR_clear_error();
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [AC_MSG_RESULT(yes)],
bc53aacc6e9302b1f8d01467fc39585584652782Andreas Gustafsson [AC_MSG_RESULT(no)
2995f8205eaa0d4bc3a57900a413b5cfdb83564fAndreas Gustafsson AC_MSG_ERROR(Could not run test program using OpenSSL from
2995f8205eaa0d4bc3a57900a413b5cfdb83564fAndreas Gustafsson$use_openssl/lib and $use_openssl/include.
2995f8205eaa0d4bc3a57900a413b5cfdb83564fAndreas GustafssonPlease check the argument to --with-openssl and your
2995f8205eaa0d4bc3a57900a413b5cfdb83564fAndreas Gustafssonshared library configuration (e.g., LD_LIBRARY_PATH).)],
bc53aacc6e9302b1f8d01467fc39585584652782Andreas Gustafsson [AC_MSG_RESULT(assuming it does work on target platform)])
d73de275987d29627dc11d5bd4a22874a29f7874Mark Andrews AC_MSG_CHECKING(whether linking with OpenSSL requires -ldl)
d73de275987d29627dc11d5bd4a22874a29f7874Mark Andrews AC_TRY_LINK([
d73de275987d29627dc11d5bd4a22874a29f7874Mark Andrews[ DSO_METHOD_dlfcn(); ],
d73de275987d29627dc11d5bd4a22874a29f7874Mark Andrews [AC_MSG_RESULT(no)],
d73de275987d29627dc11d5bd4a22874a29f7874Mark Andrews [LIBS="$LIBS -ldl"
d73de275987d29627dc11d5bd4a22874a29f7874Mark Andrews AC_TRY_LINK([
d73de275987d29627dc11d5bd4a22874a29f7874Mark Andrews],[ DSO_METHOD_dlfcn(); ],
d73de275987d29627dc11d5bd4a22874a29f7874Mark Andrews [AC_MSG_RESULT(yes)
d73de275987d29627dc11d5bd4a22874a29f7874Mark Andrews DNS_OPENSSL_LIBS="$DNS_OPENSSL_LIBS -ldl"
d73de275987d29627dc11d5bd4a22874a29f7874Mark Andrews [AC_MSG_RESULT(unknown)
d73de275987d29627dc11d5bd4a22874a29f7874Mark Andrews AC_MSG_ERROR(OpenSSL has unsupported dynamic loading)],
d73de275987d29627dc11d5bd4a22874a29f7874Mark Andrews [AC_MSG_RESULT(assuming it does work on target platform)])
d73de275987d29627dc11d5bd4a22874a29f7874Mark Andrews [AC_MSG_RESULT(assuming it does work on target platform)]
fda0a038810529d6e45b17822ddcc61d82964e83Mark AndrewsAC_ARG_ENABLE(openssl-version-check,
fda0a038810529d6e45b17822ddcc61d82964e83Mark Andrews[AC_HELP_STRING([--enable-openssl-version-check],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [Check OpenSSL Version @<:@default=yes@:>@])])
fda0a038810529d6e45b17822ddcc61d82964e83Mark Andrewscase "$enable_openssl_version_check" in
bc53aacc6e9302b1f8d01467fc39585584652782Andreas Gustafsson AC_MSG_CHECKING(OpenSSL library version)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews if ((OPENSSL_VERSION_NUMBER >= 0x009070cfL &&
6805e4e2c46ad3c5a4aa941b5e9a29d34579641eMark Andrews OPENSSL_VERSION_NUMBER < 0x00908000L) ||
fda0a038810529d6e45b17822ddcc61d82964e83Mark Andrews OPENSSL_VERSION_NUMBER >= 0x0090804fL)
bd1db480f30e025bba719799f910b34848a9a997Mark Andrews printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n",
bd1db480f30e025bba719799f910b34848a9a997Mark Andrews OPENSSL_VERSION_NUMBER);
fda0a038810529d6e45b17822ddcc61d82964e83Mark Andrews printf("Require OPENSSL_VERSION_NUMBER 0x009070cf or greater (0.9.7l)\n"
fda0a038810529d6e45b17822ddcc61d82964e83Mark Andrews "Require OPENSSL_VERSION_NUMBER 0x0090804f or greater (0.9.8d)\n\n");
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [AC_MSG_RESULT(ok)],
5989aea4bbe79e09290792f04aeb557e2b2da02eAndreas Gustafsson [AC_MSG_RESULT(not compatible)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews OPENSSL_WARNING=yes
fda0a038810529d6e45b17822ddcc61d82964e83Mark Andrews [AC_MSG_RESULT(assuming target platform has compatible version)])
fda0a038810529d6e45b17822ddcc61d82964e83Mark Andrews AC_MSG_RESULT(Skipped OpenSSL version check)
c0707105f60934d59321c2fccbc254f9e31ff28aMark Andrews AC_MSG_CHECKING(for OpenSSL DSA support)
c0707105f60934d59321c2fccbc254f9e31ff28aMark Andrews AC_DEFINE(HAVE_OPENSSL_DSA)
c0707105f60934d59321c2fccbc254f9e31ff28aMark Andrews AC_MSG_RESULT(yes)
c0707105f60934d59321c2fccbc254f9e31ff28aMark Andrews AC_MSG_RESULT(no)
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(USE_OPENSSL)
0e40083fdd5445703bd30e46e5bfe7d047bced12Brian WellingtonAC_SUBST(DST_OPENSSL_INC)
0e40083fdd5445703bd30e46e5bfe7d047bced12Brian WellingtonDNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DNS_OPENSSL_LIBS"
289ae548d52bc8f982d9823af64cafda7bd92232Mark AndrewsAC_MSG_CHECKING(for GSSAPI library)
289ae548d52bc8f982d9823af64cafda7bd92232Mark AndrewsAC_ARG_WITH(gssapi,
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews[ --with-gssapi=PATH Specify path for system-supplied GSSAPI],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews use_gssapi="$withval", use_gssapi="no")
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrewsgssapidirs="/usr/local /usr/pkg /usr/kerberos /usr"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrewsif test "$use_gssapi" = "yes"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews for d in $gssapidirs
65cfc4e0e3e24a7410d6fe8505455fc85f62215cMark Andrews if test -f $d/include/gssapi/gssapi.h -o -f $d/include/gssapi.h
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews use_gssapi=$d
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrewscase "$use_gssapi" in
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_MSG_RESULT(disabled)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews USE_GSSAPI=''
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_MSG_ERROR([--with-gssapi must specify a path])
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_MSG_RESULT(looking in $use_gssapi/lib)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews USE_GSSAPI='-DGSSAPI'
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews saved_cppflags="$CPPFLAGS"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews CPPFLAGS="-I$use_gssapi/include $CPPFLAGS"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [ISC_PLATFORM_GSSAPIHEADER="#define ISC_PLATFORM_GSSAPIHEADER <$ac_header>"])
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews if test "$ISC_PLATFORM_GSSAPIHEADER" = ""; then
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_MSG_ERROR([gssapi.h not found])
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews CPPFLAGS="$saved_cppflags"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # XXXDCL This probably doesn't work right on all systems.
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # It will need to be worked on as problems become evident.
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # Essentially the problems here relate to two different
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # areas. The first area is building with either KTH
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # or MIT Kerberos, particularly when both are present on
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # the machine. The other is static versus dynamic linking.
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # On the KTH vs MIT issue, Both have libkrb5 that can mess
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # up the works if one implementation ends up trying to
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # use the other's krb. This is unfortunately a situation
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # that very easily arises.
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # Dynamic linking when the dependency information is built
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # into MIT's libgssapi_krb5 or KTH's libgssapi magically makes
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # all such problems go away, but when that setup is not
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # present, because either the dynamic libraries lack
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # dependencies or static linking is being done, then the
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # problems start to show up.
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews saved_libs="$LIBS"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews for TRY_LIBS in \
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews "-lgssapi_krb5" \
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews "-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv" \
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews "-lgssapi" \
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews "-lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err" \
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews "-lgssapi -lkrb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err" \
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # Note that this does not include $saved_libs, because
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # on FreeBSD machines this configure script has added
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # -L/usr/local/lib to LIBS, which can make the
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # -lgssapi_krb5 test succeed with shared libraries even
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # when you are trying to build with KTH in /usr/lib.
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews LIBS="-L$use_gssapi/lib $TRY_LIBS"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_MSG_CHECKING(linking as $TRY_LIBS)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_TRY_LINK( , [gss_acquire_cred();],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews gssapi_linked=yes, gssapi_linked=no)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews case $gssapi_linked in
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews yes) AC_MSG_RESULT(yes); break ;;
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews no) AC_MSG_RESULT(no) ;;
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews case $gssapi_linked in
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews no) AC_MSG_ERROR(could not determine proper GSSAPI linkage) ;;
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # XXXDCL Major kludge. Tries to cope with KTH in /usr/lib
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # but MIT in /usr/local/lib and trying to build with KTH.
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # /usr/local/lib can end up earlier on the link lines.
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # Like most kludges, this one is not only inelegant it
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # is also likely to be the wrong thing to do at least as
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # many times as it is the right thing. Something better
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # needs to be done.
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews if test "$use_gssapi" = "/usr" -a \
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews FIX_KTH_VS_MIT=yes
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews case "$FIX_KTH_VS_MIT" in
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews case "$enable_static_linking" in
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews yes) gssapi_lib_suffix=".a" ;;
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews *) gssapi_lib_suffix=".so" ;;
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews for lib in $LIBS; do
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews case $lib in
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews new_lib=`echo $lib |
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews sed -e s%^-l%$use_gssapi/lib/lib% \
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews -e s%$%$gssapi_lib_suffix%`
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews NEW_LIBS="$NEW_LIBS $new_lib"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_MSG_ERROR([KTH vs MIT Kerberos confusion!])
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews LIBS="$NEW_LIBS"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews DST_GSSAPI_INC="-I$use_gssapi/include"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews DNS_GSSAPI_LIBS="$LIBS"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_MSG_RESULT(using GSSAPI from $use_gssapi/lib and $use_gssapi/include)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews LIBS="$saved_libs"
289ae548d52bc8f982d9823af64cafda7bd92232Mark AndrewsAC_SUBST(ISC_PLATFORM_HAVEGSSAPI)
289ae548d52bc8f982d9823af64cafda7bd92232Mark AndrewsAC_SUBST(ISC_PLATFORM_GSSAPIHEADER)
3ec6b563d7b6cb11a047f23faa2a0f206ccd93e7Brian WellingtonAC_SUBST(USE_GSSAPI)
3ec6b563d7b6cb11a047f23faa2a0f206ccd93e7Brian WellingtonAC_SUBST(DST_GSSAPI_INC)
289ae548d52bc8f982d9823af64cafda7bd92232Mark AndrewsAC_SUBST(DNS_GSSAPI_LIBS)
289ae548d52bc8f982d9823af64cafda7bd92232Mark AndrewsDNS_CRYPTO_LIBS="$DNS_GSSAPI_LIBS $DNS_CRYPTO_LIBS"
0e40083fdd5445703bd30e46e5bfe7d047bced12Brian Wellington# Applications linking with libdns also need to link with these libraries.
0e40083fdd5445703bd30e46e5bfe7d047bced12Brian WellingtonAC_SUBST(DNS_CRYPTO_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")
5b76a09697bfc76f5acefd65d5b37b1214d271a8Mark Andrews# Do we have arc4random() ?
5b76a09697bfc76f5acefd65d5b37b1214d271a8Mark AndrewsAC_CHECK_FUNC(arc4random, AC_DEFINE(HAVE_ARC4RANDOM))
489b76292622f5bc18bf1a18845f8166a73bd797Brian Wellingtonif $use_threads
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews if test "X$GCC" = "Xyes"; then
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews case "$host" in
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews CC="$CC -pthread"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews CCOPT="$CCOPT -pthread"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews CC="$CC -pthread"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews CCOPT="$CCOPT -pthread"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews LIBS="$LIBS -lthread"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews case $host in
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews CC="$CC -pthread"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews CCOPT="$CCOPT -pthread"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews CC="$CC -mt"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews CCOPT="$CCOPT -mt"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews *-sco-sysv*uw*|*-*-sysv*UnixWare*)
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews CC="$CC -Kthread"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews CCOPT="$CCOPT -Kthread"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews *-*-sysv*OpenUNIX*)
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews CC="$CC -Kpthread"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews CCOPT="$CCOPT -Kpthread"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews ALWAYS_DEFINES="-D_REENTRANT"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1"
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews thread_dir=pthreads
a1884b96ef53efc8b4e14be173aaee552ca0213aAndreas Gustafsson # We'd like to use sigwait() too
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews AC_CHECK_FUNC(sigwait,
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews AC_DEFINE(HAVE_SIGWAIT),
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews AC_CHECK_LIB(c, sigwait,
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews AC_DEFINE(HAVE_SIGWAIT),
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews AC_CHECK_LIB(pthread, sigwait,
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews AC_DEFINE(HAVE_SIGWAIT),
be515937febf025ec2a4c381bee58131ab0f32f4Mark Andrews AC_CHECK_LIB(pthread, _Psigwait,
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_DEFINE(HAVE_SIGWAIT),))))
489b76292622f5bc18bf1a18845f8166a73bd797Brian Wellington AC_CHECK_FUNC(pthread_attr_getstacksize,
489b76292622f5bc18bf1a18845f8166a73bd797Brian Wellington AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
3184ff5e45c8f821e5165ea60d674bfb87faf5b8Mark Andrews AC_CHECK_FUNC(pthread_attr_setstacksize,
3184ff5e45c8f821e5165ea60d674bfb87faf5b8Mark Andrews AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE),)
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),)
70e854766f5304f43e94212dc38ebaefe214148cMark Andrews case $host in
16ee4fe11bad616a76c79e9f626a7e04a88ef4abMark Andrews *-freebsd5.[[012]]|*-freebsd5.[[012]].*);;
16ee4fe11bad616a76c79e9f626a7e04a88ef4abMark Andrews *-freebsd5.[[3456789]]|*-freebsd5.[[3456789]].*)
16ee4fe11bad616a76c79e9f626a7e04a88ef4abMark Andrews AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
16ee4fe11bad616a76c79e9f626a7e04a88ef4abMark Andrews *-freebsd6.*)
70e854766f5304f43e94212dc38ebaefe214148cMark Andrews AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM)
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),)
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)
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrews# was --with-libxml2 specified?
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark AndrewsAC_MSG_CHECKING(for libxml2 library)
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark AndrewsAC_ARG_WITH(libxml2,
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrews[ --with-libxml2[=PATH] Build with libxml2 library [yes|no|path]],
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrews use_libxml2="$withval", use_libxml2="auto")
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrewscase "$use_libxml2" in
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrews DST_LIBXML2_INC=""
b7945d73bc42499d50d5c4af6a525fe56e4dfacaMark Andrews case X`(xml2-config --version) 2>/dev/null` in
b7945d73bc42499d50d5c4af6a525fe56e4dfacaMark Andrews libxml2_libs=`xml2-config --libs`
b7945d73bc42499d50d5c4af6a525fe56e4dfacaMark Andrews libxml2_cflags=`xml2-config --cflags`
b7945d73bc42499d50d5c4af6a525fe56e4dfacaMark Andrews libxml2_libs=
b7945d73bc42499d50d5c4af6a525fe56e4dfacaMark Andrews libxml2_cflags=
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrews if test -f "$use_libxml2/bin/xml2-config" ; then
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrews libxml2_libs=`$use_libxml2/bin/xml2-config --libs`
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrews libxml2_cflags=`$use_libxml2/bin/xml2-config --cflags`
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrewsif test "X$libxml2_libs" != "X"
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrews AC_MSG_RESULT(yes)
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrews CFLAGS="$CFLAGS $libxml2_cflags"
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrews LIBS="$LIBS $libxml2_libs"
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrews AC_DEFINE(HAVE_LIBXML2, 1, [Define if libxml2 was found])
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrews AC_MSG_RESULT(no)
23ac30603a7639bea1d331537634b079b046b122Mark Andrews# In solaris 10, SMF can manage named service
23ac30603a7639bea1d331537634b079b046b122Mark AndrewsAC_CHECK_LIB(scf, smf_enable_instance)
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.
03f4c76f95f75e2b0d1206e784e35bed6041305cBob HalleyAC_ARG_ENABLE(largefile, [ --enable-largefile 64-bit file support],
03f4c76f95f75e2b0d1206e784e35bed6041305cBob Halley want_largefile="yes", want_largefile="no")
03f4c76f95f75e2b0d1206e784e35bed6041305cBob Halleycase $want_largefile in
03f4c76f95f75e2b0d1206e784e35bed6041305cBob Halley ALWAYS_DEFINES="$ALWAYS_DEFINES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence# Additional compiler settings.
9a2574531e3d2ced31072200b416467fdee0c29cDavid LawrenceMKDEPCFLAGS="-M"
9a2574531e3d2ced31072200b416467fdee0c29cDavid LawrenceIRIX_DNSSEC_WARNINGS_HACK=""
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrenceif test "X$GCC" = "Xyes"; then
728156dfbdced7bc18b1f88227cced9d426a70e7Mark Andrews AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing)
728156dfbdced7bc18b1f88227cced9d426a70e7Mark Andrews SAVE_CFLAGS=$CFLAGS
728156dfbdced7bc18b1f88227cced9d426a70e7Mark Andrews CFLAGS=-fno-strict-aliasing
728156dfbdced7bc18b1f88227cced9d426a70e7Mark Andrews AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no])
728156dfbdced7bc18b1f88227cced9d426a70e7Mark Andrews CFLAGS=$SAVE_CFLAGS
728156dfbdced7bc18b1f88227cced9d426a70e7Mark Andrews if test "$FNOSTRICTALIASING" = "yes"; then
728156dfbdced7bc18b1f88227cced9d426a70e7Mark Andrews AC_MSG_RESULT(yes)
15bda409010cbf2d3e43baf10f28bae5f7b1abefMark Andrews STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing"
728156dfbdced7bc18b1f88227cced9d426a70e7Mark Andrews AC_MSG_RESULT(no)
728156dfbdced7bc18b1f88227cced9d426a70e7Mark Andrews STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith"
3ea6d4dc33482a752553c59ed94bcecd23d254b0Mark Andrews case "$host" in
8af4e7aa4e2a6fe84bf4ebe09ca1d4ef1d8ab593Mark Andrews LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
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
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # 'const' as well as alignment issues is unfortunately not
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # able to be discerned via the version of the operating
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews # 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.
16ee4fe11bad616a76c79e9f626a7e04a88ef4abMark Andrews STD_CWARNINGS="+w1 +W 474,530,2193,2236"
9a2574531e3d2ced31072200b416467fdee0c29cDavid Lawrence CCOPT="$CCOPT -Ae -z"
8af4e7aa4e2a6fe84bf4ebe09ca1d4ef1d8ab593Mark Andrews LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
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;'
74cb99072c4b0ebd2ccafcfa284288fa760f7a1aMark Andrews LIBTOOL_MODE_COMPILE='--mode=compile'
74cb99072c4b0ebd2ccafcfa284288fa760f7a1aMark Andrews LIBTOOL_MODE_INSTALL='--mode=install'
74cb99072c4b0ebd2ccafcfa284288fa760f7a1aMark Andrews LIBTOOL_MODE_LINK='--mode=link'
aceae69c7f3e76e8842de178851928619c65b61cMark Andrews case "$host" in
aceae69c7f3e76e8842de178851928619c65b61cMark Andrews *) LIBTOOL_ALLOW_UNDEFINED= ;;
6e1141e6e83b3907b8b187d97932f30fa82470efMark Andrews case "$host" in
6e1141e6e83b3907b8b187d97932f30fa82470efMark Andrews *-ibm-aix*) LIBTOOL_IN_MAIN="-Wl,-bI:T_testlist.imp" ;;
6e1141e6e83b3907b8b187d97932f30fa82470efMark Andrews *) LIBTOOL_IN_MAIN= ;;
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley AC_SUBST(LIBTOOL)
c64aeaf419a7ef156b4aabfa2a913831e773157eBob Halley LIBTOOL_MKDEP_SED=
74cb99072c4b0ebd2ccafcfa284288fa760f7a1aMark Andrews LIBTOOL_MODE_COMPILE=
74cb99072c4b0ebd2ccafcfa284288fa760f7a1aMark Andrews LIBTOOL_MODE_INSTALL=
74cb99072c4b0ebd2ccafcfa284288fa760f7a1aMark Andrews LIBTOOL_MODE_LINK=
aceae69c7f3e76e8842de178851928619c65b61cMark Andrews LIBTOOL_ALLOW_UNDEFINED=
6e1141e6e83b3907b8b187d97932f30fa82470efMark Andrews LIBTOOL_IN_MAIN=
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)
74cb99072c4b0ebd2ccafcfa284288fa760f7a1aMark AndrewsAC_SUBST(LIBTOOL_MODE_COMPILE)
74cb99072c4b0ebd2ccafcfa284288fa760f7a1aMark AndrewsAC_SUBST(LIBTOOL_MODE_INSTALL)
74cb99072c4b0ebd2ccafcfa284288fa760f7a1aMark AndrewsAC_SUBST(LIBTOOL_MODE_LINK)
aceae69c7f3e76e8842de178851928619c65b61cMark AndrewsAC_SUBST(LIBTOOL_ALLOW_UNDEFINED)
6e1141e6e83b3907b8b187d97932f30fa82470efMark AndrewsAC_SUBST(LIBTOOL_IN_MAIN)
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"
289ae548d52bc8f982d9823af64cafda7bd92232Mark 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"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews 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
7c014c5bf41dc38802e8889c0a9110204eb1a552Andreas Gustafsson [struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[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"])
9f6c66e1b3902b61256267d124f1b9cd61402e76Andreas Gustafsson AC_MSG_CHECKING(for in6addr_loopback)
9f6c66e1b3902b61256267d124f1b9cd61402e76Andreas Gustafsson$isc_netinetin6_hack
9f6c66e1b3902b61256267d124f1b9cd61402e76Andreas Gustafsson$isc_netinet6in6_hack
9f6c66e1b3902b61256267d124f1b9cd61402e76Andreas Gustafsson$isc_in_addr6_hack
7c014c5bf41dc38802e8889c0a9110204eb1a552Andreas Gustafsson [struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);],
9f6c66e1b3902b61256267d124f1b9cd61402e76Andreas Gustafsson [AC_MSG_RESULT(yes)
9f6c66e1b3902b61256267d124f1b9cd61402e76Andreas Gustafsson ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"
9f6c66e1b3902b61256267d124f1b9cd61402e76Andreas Gustafsson LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK"],
9f6c66e1b3902b61256267d124f1b9cd61402e76Andreas Gustafsson [AC_MSG_RESULT(no)
9f6c66e1b3902b61256267d124f1b9cd61402e76Andreas Gustafsson ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"
9f6c66e1b3902b61256267d124f1b9cd61402e76Andreas Gustafsson LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#define LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK 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)
6526fd032fc418411da3af4201214e95c113d3e2Mark Andrews ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
8313838954d67250d0ed7edf67fba5da0790d1a7Michael Graff result="#define LWRES_HAVE_SIN6_SCOPE_ID 1"],
8313838954d67250d0ed7edf67fba5da0790d1a7Michael Graff [AC_MSG_RESULT(no)
6526fd032fc418411da3af4201214e95c113d3e2Mark Andrews ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"
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"
6526fd032fc418411da3af4201214e95c113d3e2Mark Andrews ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 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)
2f330bed30b752451b8a5258c7551b22ba602337Andreas GustafssonAC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
2f330bed30b752451b8a5258c7551b22ba602337Andreas GustafssonAC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK)
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)
6526fd032fc418411da3af4201214e95c113d3e2Mark AndrewsAC_SUBST(ISC_PLATFORM_HAVESCOPEID)
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.
5f4098e478ae913cdc1bb8851599b8f2431050d3Mark AndrewsAC_MSG_CHECKING([for inet_ntop with IPv6 support])
5f4098e478ae913cdc1bb8851599b8f2431050d3Mark Andrewschar a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [AC_MSG_RESULT(yes)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [AC_MSG_RESULT(no)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [AC_MSG_RESULT(assuming inet_ntop needed)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews 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.
5f4098e478ae913cdc1bb8851599b8f2431050d3Mark AndrewsAC_MSG_CHECKING([for working inet_pton with IPv6 support])
5f4098e478ae913cdc1bb8851599b8f2431050d3Mark Andrewsmain() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 :
5f4098e478ae913cdc1bb8851599b8f2431050d3Mark Andrews inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 :
5f4098e478ae913cdc1bb8851599b8f2431050d3Mark Andrews (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [AC_MSG_RESULT(yes)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [AC_MSG_RESULT(no)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas Gustafsson [AC_MSG_RESULT(assuming target platform has working inet_pton)
9de05727e334336ceb0abcca404d770abd23b876Mark Andrews ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [AC_MSG_RESULT(assuming inet_pton needed)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [AC_MSG_RESULT(assuming target platform has working inet_pton)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"])
495c00c1c995c96587b38d2d5fa41f127869d5b8David LawrenceAC_MSG_CHECKING([for inet_aton])
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [struct in_addr in; inet_aton(0, &in); return (0);],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [AC_MSG_RESULT(yes)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON"],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [AC_MSG_RESULT(no)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews 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"],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [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,
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_CHECK_FUNC(getnameinfo,
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"])
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David LawrenceAC_CHECK_FUNC(getaddrinfo,
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence AC_DEFINE(HAVE_GETADDRINFO)],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [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)
8ca42f6318be756354b70260050132545aa680d3Mark AndrewsAC_ARG_ENABLE(getifaddrs,
8ca42f6318be756354b70260050132545aa680d3Mark Andrews[ --enable-getifaddrs Enable the use of getifaddrs() [[yes|no|glibc]].
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews glibc: Use getifaddrs() in glibc if you know it supports IPv6.],
8ca42f6318be756354b70260050132545aa680d3Mark Andrews want_getifaddrs="$enableval", want_getifaddrs="yes")
8ca42f6318be756354b70260050132545aa680d3Mark Andrewscase $want_getifaddrs in
8ca42f6318be756354b70260050132545aa680d3Mark Andrews# Do we have getifaddrs() ?
8ca42f6318be756354b70260050132545aa680d3Mark Andrewscase $host in
8ca42f6318be756354b70260050132545aa680d3Mark Andrews # Some recent versions of glibc support getifaddrs() which does not
8ca42f6318be756354b70260050132545aa680d3Mark Andrews # provide AF_INET6 addresses while the function provided by the USAGI
8ca42f6318be756354b70260050132545aa680d3Mark Andrews # project handles the AF_INET6 case correctly. We need to avoid
8ca42f6318be756354b70260050132545aa680d3Mark Andrews # using the former but prefer the latter unless overridden by
8ca42f6318be756354b70260050132545aa680d3Mark Andrews # --enable-getifaddrs=glibc.
fed3d5c2fc3fa8e1547e8b5c28c01f1095e17e5fMark Andrews if test $want_getifaddrs = glibc
8ca42f6318be756354b70260050132545aa680d3Mark Andrews AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
8ca42f6318be756354b70260050132545aa680d3Mark Andrews save_LIBS="$LIBS"
8ca42f6318be756354b70260050132545aa680d3Mark Andrews AC_CHECK_LIB(inet6, getifaddrs,
8ca42f6318be756354b70260050132545aa680d3Mark Andrews LIBS="$LIBS -linet6"
8ca42f6318be756354b70260050132545aa680d3Mark Andrews AC_DEFINE(HAVE_GETIFADDRS),
8ca42f6318be756354b70260050132545aa680d3Mark Andrews LIBS=${save_LIBS})
8ca42f6318be756354b70260050132545aa680d3Mark Andrews AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
905e0c15332d3209dd73ff8b2334f6b80f7fe3a6David Lawrence# Look for a sysctl call to get the list of network interfaces.
be0e075ac2c10ade3e80edef7fa14ac0fda92690Mark Andrewscase $ac_cv_header_sys_sysctl_h in
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.
ba1549060f6bc5750adc20ed9d695f8b2cc556d7Andreas Gustafsson# We test for strsep() using AC_TRY_LINK instead of AC_CHECK_FUNC
ba1549060f6bc5750adc20ed9d695f8b2cc556d7Andreas Gustafsson# because AIX 4.3.3 with patches for bos.adt.include to version 4.3.3.77
ba1549060f6bc5750adc20ed9d695f8b2cc556d7Andreas Gustafsson# reportedly defines strsep() without declaring it in <string.h> when
ba1549060f6bc5750adc20ed9d695f8b2cc556d7Andreas Gustafsson# -D_LINUX_SOURCE_COMPAT is not defined [RT #2190], and
ba1549060f6bc5750adc20ed9d695f8b2cc556d7Andreas Gustafsson# AC_CHECK_FUNC() incorrectly succeeds because it declares
ba1549060f6bc5750adc20ed9d695f8b2cc556d7Andreas Gustafsson# the function itself.
ba1549060f6bc5750adc20ed9d695f8b2cc556d7Andreas GustafssonAC_MSG_CHECKING(for correctly declared strsep())
ba1549060f6bc5750adc20ed9d695f8b2cc556d7Andreas GustafssonAC_TRY_LINK([#include <string.h>], [char *sp; char *foo = strsep(&sp, ".");],
ba1549060f6bc5750adc20ed9d695f8b2cc556d7Andreas Gustafsson [AC_MSG_RESULT(yes); ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
ba1549060f6bc5750adc20ed9d695f8b2cc556d7Andreas Gustafsson [AC_MSG_RESULT(no); ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
935000aa6e2b9d08f363b2e698a258a458a5a7cfMark AndrewsAC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
21f1794606dce19928cf455029e173321f166380Mark AndrewsAC_CHECK_FUNC(memmove,
21f1794606dce19928cf455029e173321f166380Mark Andrews [ISC_PLATFORM_NEEDMEMMOVE="#undef ISC_PLATFORM_NEEDMEMMOVE"],
21f1794606dce19928cf455029e173321f166380Mark Andrews [ISC_PLATFORM_NEEDMEMMOVE="#define ISC_PLATFORM_NEEDMEMMOVE 1"])
21f1794606dce19928cf455029e173321f166380Mark AndrewsAC_SUBST(ISC_PLATFORM_NEEDMEMMOVE)
21f1794606dce19928cf455029e173321f166380Mark AndrewsAC_CHECK_FUNC(strtoul,
e7fb847ed570dd8c1bcdacabb3d69bd81feb79aeMark Andrews [ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL"
ac124a78a097a0840992c5726cbbdaf1448b6ab3Mark Andrews LWRES_PLATFORM_NEEDSTRTOUL="#undef LWRES_PLATFORM_NEEDSTRTOUL"
e7fb847ed570dd8c1bcdacabb3d69bd81feb79aeMark Andrews GENRANDOMLIB=""],
e7fb847ed570dd8c1bcdacabb3d69bd81feb79aeMark Andrews [ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1"
ac124a78a097a0840992c5726cbbdaf1448b6ab3Mark Andrews LWRES_PLATFORM_NEEDSTRTOUL="#define LWRES_PLATFORM_NEEDSTRTOUL 1"
a34d19803a206febe10866394393ec1c09b28984Mark Andrews GENRANDOMLIB='${ISCLIBS}'])
21f1794606dce19928cf455029e173321f166380Mark AndrewsAC_SUBST(ISC_PLATFORM_NEEDSTRTOUL)
e7fb847ed570dd8c1bcdacabb3d69bd81feb79aeMark AndrewsAC_SUBST(LWRES_PLATFORM_NEEDSTRTOUL)
e7fb847ed570dd8c1bcdacabb3d69bd81feb79aeMark AndrewsAC_SUBST(GENRANDOMLIB)
935000aa6e2b9d08f363b2e698a258a458a5a7cfMark AndrewsAC_CHECK_FUNC(strlcpy,
935000aa6e2b9d08f363b2e698a258a458a5a7cfMark Andrews [ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY"],
935000aa6e2b9d08f363b2e698a258a458a5a7cfMark Andrews [ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1"])
935000aa6e2b9d08f363b2e698a258a458a5a7cfMark AndrewsAC_SUBST(ISC_PLATFORM_NEEDSTRLCPY)
935000aa6e2b9d08f363b2e698a258a458a5a7cfMark AndrewsAC_CHECK_FUNC(strlcat,
935000aa6e2b9d08f363b2e698a258a458a5a7cfMark Andrews [ISC_PLATFORM_NEEDSTRLCAT="#undef ISC_PLATFORM_NEEDSTRLCAT"],
935000aa6e2b9d08f363b2e698a258a458a5a7cfMark Andrews [ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1"])
935000aa6e2b9d08f363b2e698a258a458a5a7cfMark AndrewsAC_SUBST(ISC_PLATFORM_NEEDSTRLCAT)
f95231835fdcd8d5f58486c9f9993602f27fe157Mark AndrewsISC_PRINT_OBJS=
f95231835fdcd8d5f58486c9f9993602f27fe157Mark AndrewsISC_PRINT_SRCS=
f95231835fdcd8d5f58486c9f9993602f27fe157Mark AndrewsAC_MSG_CHECKING(sprintf)
f95231835fdcd8d5f58486c9f9993602f27fe157Mark AndrewsAC_TRY_COMPILE([
f95231835fdcd8d5f58486c9f9993602f27fe157Mark Andrews[ char buf[2]; return(*sprintf(buf,"x"));],
f95231835fdcd8d5f58486c9f9993602f27fe157Mark AndrewsISC_PRINT_OBJS="print.$O"
f95231835fdcd8d5f58486c9f9993602f27fe157Mark AndrewsISC_PRINT_SRCS="print.c"
f95231835fdcd8d5f58486c9f9993602f27fe157Mark AndrewsISC_PLATFORM_NEEDSPRINTF="#define ISC_PLATFORM_NEEDSPRINTF"
16a68807e13caea3183a41a5292f1b3f48b81a26Mark AndrewsLWRES_PLATFORM_NEEDSPRINTF="#define LWRES_PLATFORM_NEEDSPRINTF"
16a68807e13caea3183a41a5292f1b3f48b81a26Mark Andrews[ISC_PLATFORM_NEEDSPRINTF="#undef ISC_PLATFORM_NEEDSPRINTF"
16a68807e13caea3183a41a5292f1b3f48b81a26Mark Andrews LWRES_PLATFORM_NEEDSPRINTF="#undef LWRES_PLATFORM_NEEDSPRINTF"]
f95231835fdcd8d5f58486c9f9993602f27fe157Mark AndrewsAC_SUBST(ISC_PLATFORM_NEEDSPRINTF)
16a68807e13caea3183a41a5292f1b3f48b81a26Mark AndrewsAC_SUBST(LWRES_PLATFORM_NEEDSPRINTF)
affd6c025b39ec89a91056efb084fff7239ad6e3Mark AndrewsAC_CHECK_FUNC(vsnprintf,
16a68807e13caea3183a41a5292f1b3f48b81a26Mark Andrews [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"
16a68807e13caea3183a41a5292f1b3f48b81a26Mark Andrews LWRES_PLATFORM_NEEDVSNPRINTF="#undef LWRES_PLATFORM_NEEDVSNPRINTF"],
734b3777705434fedc7eb4b4c5f51e9a606d86b7Mark Andrews [ISC_PRINT_OBJS="print.$O"
734b3777705434fedc7eb4b4c5f51e9a606d86b7Mark Andrews ISC_PRINT_SRCS="print.c"
16a68807e13caea3183a41a5292f1b3f48b81a26Mark Andrews ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"
16a68807e13caea3183a41a5292f1b3f48b81a26Mark Andrews LWRES_PLATFORM_NEEDVSNPRINTF="#define LWRES_PLATFORM_NEEDVSNPRINTF 1"])
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob HalleyAC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
16a68807e13caea3183a41a5292f1b3f48b81a26Mark AndrewsAC_SUBST(LWRES_PLATFORM_NEEDVSNPRINTF)
f95231835fdcd8d5f58486c9f9993602f27fe157Mark AndrewsISC_EXTRA_OBJS="$ISC_EXTRA_OBJS $ISC_PRINT_OBJS"
f95231835fdcd8d5f58486c9f9993602f27fe157Mark AndrewsISC_EXTRA_SRCS="$ISC_EXTRA_SRCS $ISC_PRINT_SRCS"
c654449ccf403ccd2b81be2038b1013d6fbb06ccMark AndrewsAC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR))
694c897b20f06f8a5349fd9ac5df93947f6f5a2aBob HalleyAC_SUBST(ISC_EXTRA_OBJS)
694c897b20f06f8a5349fd9ac5df93947f6f5a2aBob HalleyAC_SUBST(ISC_EXTRA_SRCS)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews# Use our own SPNEGO implementation?
289ae548d52bc8f982d9823af64cafda7bd92232Mark AndrewsAC_ARG_ENABLE(isc-spnego,
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [ --disable-isc-spnego use SPNEGO from GSSAPI library])
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrewsif test -n "$USE_GSSAPI"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews case "$enable_isc_spnego" in
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews USE_ISC_SPNEGO='-DUSE_ISC_SPNEGO'
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews DST_EXTRA_OBJS="$DST_EXTRA_OBJS spnego.$O"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews DST_EXTRA_SRCS="$DST_EXTRA_SRCS spnego.c"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_MSG_RESULT(using SPNEGO from lib/dns)
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_MSG_RESULT(using SPNEGO from GSSAPI library)
289ae548d52bc8f982d9823af64cafda7bd92232Mark AndrewsAC_SUBST(USE_ISC_SPNEGO)
289ae548d52bc8f982d9823af64cafda7bd92232Mark AndrewsAC_SUBST(DST_EXTRA_OBJS)
289ae548d52bc8f982d9823af64cafda7bd92232Mark AndrewsAC_SUBST(DST_EXTRA_SRCS)
28a3d529046ec5536e1ea619454624b683509675Andreas Gustafsson# Determine the printf format characters to use when printing
9105a6a730bfb8472c48230629c5a0aebb88c422Mark Andrews# values of type isc_int64_t. This will normally be "ll", but where
9105a6a730bfb8472c48230629c5a0aebb88c422Mark Andrews# the compiler treats "long long" as a alias for "long" and printf
9105a6a730bfb8472c48230629c5a0aebb88c422Mark Andrews# doesn't know about "long long" use "l". Hopefully the sprintf
9105a6a730bfb8472c48230629c5a0aebb88c422Mark Andrews# will produce a inconsistant result in the later case. If the compiler
9105a6a730bfb8472c48230629c5a0aebb88c422Mark Andrews# fails due to seeing "%lld" we fall back to "l".
b4028939fdffc92cf659764deb9c6e3c805cc948Mark Andrews# Digital Unix 4.0 (gcc?) (long long) is 64 bits as is its long. It uses
b4028939fdffc92cf659764deb9c6e3c805cc948Mark Andrews# %ld even for (long long)/
9105a6a730bfb8472c48230629c5a0aebb88c422Mark Andrews# Win32 uses "%I64d", but that's defined elsewhere since we don't use
9105a6a730bfb8472c48230629c5a0aebb88c422Mark Andrews# configure on Win32.
28a3d529046ec5536e1ea619454624b683509675Andreas GustafssonAC_MSG_CHECKING(printf format modifier for 64-bit integers)
9105a6a730bfb8472c48230629c5a0aebb88c422Mark Andrews long long int j = 0;
9105a6a730bfb8472c48230629c5a0aebb88c422Mark Andrews char buf[100];
9105a6a730bfb8472c48230629c5a0aebb88c422Mark Andrews sprintf(buf, "%lld", j);
9105a6a730bfb8472c48230629c5a0aebb88c422Mark Andrews exit((sizeof(long long int) != sizeof(long int))? 0 :
9105a6a730bfb8472c48230629c5a0aebb88c422Mark Andrews (strcmp(buf, "0") != 0));
28a3d529046ec5536e1ea619454624b683509675Andreas Gustafsson [AC_MSG_RESULT(ll)
b4028939fdffc92cf659764deb9c6e3c805cc948Mark Andrews ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
b4028939fdffc92cf659764deb9c6e3c805cc948Mark Andrews LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'],
9105a6a730bfb8472c48230629c5a0aebb88c422Mark Andrews [AC_MSG_RESULT(l)
b4028939fdffc92cf659764deb9c6e3c805cc948Mark Andrews ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'
b4028939fdffc92cf659764deb9c6e3c805cc948Mark Andrews LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "l"'],
caa736a754e90f44bbc249e22f96bcbf4e04b849Andreas Gustafsson [AC_MSG_RESULT(assuming target platform uses ll)
b4028939fdffc92cf659764deb9c6e3c805cc948Mark Andrews ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'
b4028939fdffc92cf659764deb9c6e3c805cc948Mark Andrews LWRES_PLATFORM_QUADFORMAT='#define LWRES_PLATFORM_QUADFORMAT "ll"'])
28a3d529046ec5536e1ea619454624b683509675Andreas GustafssonAC_SUBST(ISC_PLATFORM_QUADFORMAT)
b4028939fdffc92cf659764deb9c6e3c805cc948Mark AndrewsAC_SUBST(LWRES_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)
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark AndrewsAC_CHECK_HEADERS(sys/un.h,
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark AndrewsISC_PLATFORM_HAVESYSUNH="#define ISC_PLATFORM_HAVESYSUNH 1"
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark AndrewsISC_PLATFORM_HAVESYSUNH="#undef ISC_PLATFORM_HAVESYSUNH"
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark AndrewsAC_SUBST(ISC_PLATFORM_HAVESYSUNH)
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrewscase "$host" in
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrews AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrews [Define if connect does not honour the permission on the UNIX domain socket.])
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrews AC_DEFINE(NEED_SECURE_DIRECTORY, 1,
4423c99613db1399dbb5c51e86ef0d351a1418c2Mark Andrews [Define if connect does not honour the permission on the UNIX domain socket.])
6286983c506433d642b23e64845c50be30f2a7f6Mark Andrews# Time Zone Stuff
6286983c506433d642b23e64845c50be30f2a7f6Mark AndrewsAC_CHECK_FUNC(tzset, AC_DEFINE(HAVE_TZSET))
e7fb847ed570dd8c1bcdacabb3d69bd81feb79aeMark AndrewsAC_MSG_CHECKING(for optarg decarartion)
e7fb847ed570dd8c1bcdacabb3d69bd81feb79aeMark AndrewsAC_TRY_COMPILE([
e7fb847ed570dd8c1bcdacabb3d69bd81feb79aeMark Andrews[optarg = 0;],
e7fb847ed570dd8c1bcdacabb3d69bd81feb79aeMark Andrews[AC_MSG_RESULT(yes)],
e7fb847ed570dd8c1bcdacabb3d69bd81feb79aeMark Andrews[AC_MSG_RESULT(no)
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark AndrewsGEN_NEED_OPTARG="-DNEED_OPTARG=1"
e7fb847ed570dd8c1bcdacabb3d69bd81feb79aeMark AndrewsAC_DEFINE(NEED_OPTARG, 1, [Defined if extern char *optarg is not declared.])])
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)])
9de05727e334336ceb0abcca404d770abd23b876Mark AndrewsISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"
9de05727e334336ceb0abcca404d770abd23b876Mark AndrewsAC_MSG_RESULT(cannot determine type of rlim_cur when cross compiling - assuming long long int)])
6ab3d08c1257efa6287d8ad7bb41d8fb99d5d6dfMark AndrewsAC_SUBST(ISC_PLATFORM_RLIMITTYPE)
e2cf63c5df79eb7c8b86b6278289883fa760cda5Mark Andrews# Compaq TruCluster requires more code for handling cluster IP aliases
e2cf63c5df79eb7c8b86b6278289883fa760cda5Mark Andrewscase "$host" in
e2cf63c5df79eb7c8b86b6278289883fa760cda5Mark Andrews AC_CHECK_LIB(clua, clua_getaliasaddress, LIBS="-lclua $LIBS")
e2cf63c5df79eb7c8b86b6278289883fa760cda5Mark Andrews AC_CHECK_FUNC(clua_getaliasaddress,
e2cf63c5df79eb7c8b86b6278289883fa760cda5Mark Andrews AC_DEFINE(HAVE_TRUCLUSTER, 1,
e2cf63c5df79eb7c8b86b6278289883fa760cda5Mark Andrews [Define if running under Compaq TruCluster]))
95b484c9580d06eb2f9735a22e9841389c2859baMark Andrews# Some hosts need msg_namelen to match the size of the socket structure.
43501e6570e9081d459fb5c1a81b73c2c53c5df0Mark Andrews# Some hosts don't set msg_namelen appropriately on return from recvmsg().
43501e6570e9081d459fb5c1a81b73c2c53c5df0Mark Andrewscase $host in
43501e6570e9081d459fb5c1a81b73c2c53c5df0Mark Andrews*os2*|*hp-mpeix*)
43501e6570e9081d459fb5c1a81b73c2c53c5df0Mark Andrews AC_DEFINE(BROKEN_RECVMSG, 1,
43501e6570e9081d459fb5c1a81b73c2c53c5df0Mark Andrews [Define if recvmsg() does not meet all of the BSD socket API specifications.])
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
1ad94515ee37580a2298b1484ddf44b52dc03a6aMark Andrews *-aix5.[[123]].*)
09ba9eacebdffc689da9851ce3bd932aedd1deddMark Andrews hack_shutup_pthreadonceinit=yes
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
b1070fe55c8864ef24a479a6c40d1776f35c2593Mark Andrews [*-solaris2.[89]])
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence hack_shutup_pthreadonceinit=yes
1672cc63c190e073706a742ebaabc20ac4d2c916Mark Andrews *-solaris2.10)
1672cc63c190e073706a742ebaabc20ac4d2c916Mark Andrews 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)
41f5cf4ac1728a1584b71085868962d977b6c4e5Mark Andrews# Check for if_nametoindex() for IPv6 scoped addresses support
41f5cf4ac1728a1584b71085868962d977b6c4e5Mark AndrewsAC_CHECK_FUNC(if_nametoindex, ac_cv_have_if_nametoindex=yes,
41f5cf4ac1728a1584b71085868962d977b6c4e5Mark Andrews ac_cv_have_if_nametoindex=no)
41f5cf4ac1728a1584b71085868962d977b6c4e5Mark Andrewscase $ac_cv_have_if_nametoindex in
41f5cf4ac1728a1584b71085868962d977b6c4e5Mark Andrews case "$host" in
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews AC_CHECK_LIB(ipv6, if_nametoindex,
41f5cf4ac1728a1584b71085868962d977b6c4e5Mark Andrews ac_cv_have_if_nametoindex=yes
41f5cf4ac1728a1584b71085868962d977b6c4e5Mark Andrews LIBS="-lipv6 $LIBS",)
41f5cf4ac1728a1584b71085868962d977b6c4e5Mark Andrewscase $ac_cv_have_if_nametoindex in
41f5cf4ac1728a1584b71085868962d977b6c4e5Mark Andrews ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1"
41f5cf4ac1728a1584b71085868962d977b6c4e5Mark Andrews ISC_PLATFORM_HAVEIFNAMETOINDEX="#undef ISC_PLATFORM_HAVEIFNAMETOINDEX"
41f5cf4ac1728a1584b71085868962d977b6c4e5Mark AndrewsAC_SUBST(ISC_PLATFORM_HAVEIFNAMETOINDEX)
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉# Machine architecture dependent features
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉AC_ARG_ENABLE(atomic,
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 [ --enable-atomic enable machine specific atomic operations
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [[default=autodetect]]],
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 enable_atomic="$enableval",
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 enable_atomic="autodetect")
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉case "$enable_atomic" in
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 yes|''|autodetect)
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 use_atomic=yes
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉ISC_PLATFORM_USEOSFASM="#undef ISC_PLATFORM_USEOSFASM"
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉if test "$use_atomic" = "yes"; then
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 AC_MSG_CHECKING([architecture type for atomic operations])
01b8bc018d83e757b0578723977b0a71e1e626f8Mark Andrews have_atomic=yes # set default
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 case "$host" in
01b8bc018d83e757b0578723977b0a71e1e626f8Mark Andrews [i[3456]86-*])
161835380928f2ff8abff8930078152a71340b65Tatuya JINMEI 神明達哉 # XXX: some old x86 architectures actually do not support
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 # (some of) these operations. Do we need stricter checks?
01b8bc018d83e757b0578723977b0a71e1e626f8Mark Andrews exit((sizeof(void *) == 8) ? 0 : 1);
01b8bc018d83e757b0578723977b0a71e1e626f8Mark Andrews [arch=x86_64],
9de05727e334336ceb0abcca404d770abd23b876Mark Andrews [arch=x86_32],
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews [arch=x86_32])
6672b3524c2305d8c66d8189c774f549be352ac0Mark Andrews arch=powerpc
5cc6a0f7dae472e5c2022b2cbb5343ec9f7f4942Mark Andrews mips-*|mipsel-*|mips64-*|mips64el-*)
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 have_atomic=no
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 AC_MSG_RESULT($arch)
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉if test "$have_atomic" = "yes"; then
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 AC_MSG_CHECKING([compiler support for inline assembly code])
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 compiler=generic
6672b3524c2305d8c66d8189c774f549be352ac0Mark Andrews # Check whether the compiler supports the assembly syntax we provide.
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 if test "X$GCC" = "Xyes"; then
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 # GCC's ASM extension always works
01b8bc018d83e757b0578723977b0a71e1e626f8Mark Andrews if test $arch = "x86_64"; then
01b8bc018d83e757b0578723977b0a71e1e626f8Mark Andrews # We can share the same code for gcc with x86_32
f31446e6b5925395fce4f62adf71f7ad70cea6ceMark Andrews if test $arch = "powerpc"; then
f31446e6b5925395fce4f62adf71f7ad70cea6ceMark Andrews # The MacOS (and maybe others) uses "r0" for register
f31446e6b5925395fce4f62adf71f7ad70cea6ceMark Andrews # zero. Under linux/ibm it is "0" for register 0.
f31446e6b5925395fce4f62adf71f7ad70cea6ceMark Andrews # Probe to see if we have a MacOS style assembler.
f31446e6b5925395fce4f62adf71f7ad70cea6ceMark Andrews AC_MSG_CHECKING([Checking for MacOS style assembler syntax])
f31446e6b5925395fce4f62adf71f7ad70cea6ceMark Andrews AC_TRY_COMPILE(, [
f31446e6b5925395fce4f62adf71f7ad70cea6ceMark Andrews __asm__ volatile ("li r0, 0x0\n"::);
f31446e6b5925395fce4f62adf71f7ad70cea6ceMark Andrews AC_MSG_RESULT(yes)
f31446e6b5925395fce4f62adf71f7ad70cea6ceMark Andrews compiler="mac"
f31446e6b5925395fce4f62adf71f7ad70cea6ceMark Andrews ISC_PLATFORM_USEMACASM="#define ISC_PLATFORM_USEMACASM 1"
f31446e6b5925395fce4f62adf71f7ad70cea6ceMark Andrews ], [AC_MSG_RESULT(no)])
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 case "$host" in
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 alpha*-dec-osf*)
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 # Tru64 compiler has its own syntax for inline
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 AC_TRY_COMPILE(, [
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉#error "unexpected compiler"
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 [compiler=osf],)
6672b3524c2305d8c66d8189c774f549be352ac0Mark Andrews powerpc-ibm-aix*)
6672b3524c2305d8c66d8189c774f549be352ac0Mark Andrews compiler=aix
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 case "$compiler" in
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 ISC_PLATFORM_USEGCCASM="#define ISC_PLATFORM_USEGCCASM 1"
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 ISC_PLATFORM_USEOSFASM="#define ISC_PLATFORM_USEOSFASM 1"
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 # See if the generic __asm function works. If not,
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 # we need to disable the atomic operations.
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 AC_TRY_LINK(, [
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 [compiler="standard"
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 ISC_PLATFORM_USESTDASM="#define ISC_PLATFORM_USESTDASM 1"],
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 [compiler="not supported (atomic operations disabled)"
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 have_atomic=no
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 arch=noatomic ]);
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉 AC_MSG_RESULT($compiler)
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉if test "$have_atomic" = "yes"; then
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 ISC_PLATFORM_HAVEXADD="#define ISC_PLATFORM_HAVEXADD 1"
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 ISC_PLATFORM_HAVECMPXCHG="#define ISC_PLATFORM_HAVECMPXCHG 1"
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 ISC_PLATFORM_HAVEATOMICSTORE="#define ISC_PLATFORM_HAVEATOMICSTORE 1"
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 ISC_PLATFORM_HAVEXADD="#undef ISC_PLATFORM_HAVEXADD"
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 ISC_PLATFORM_HAVECMPXCHG="#undef ISC_PLATFORM_HAVECMPXCHG"
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉 ISC_PLATFORM_HAVEATOMICSTORE="#undef ISC_PLATFORM_HAVEATOMICSTORE"
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉AC_SUBST(ISC_PLATFORM_HAVEXADD)
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉AC_SUBST(ISC_PLATFORM_HAVECMPXCHG)
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉AC_SUBST(ISC_PLATFORM_HAVEATOMICSTORE)
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉AC_SUBST(ISC_PLATFORM_USEGCCASM)
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉AC_SUBST(ISC_PLATFORM_USEOSFASM)
c528bd698637d84a0081d26a58813607c7f52bb7Tatuya JINMEI 神明達哉AC_SUBST(ISC_PLATFORM_USESTDASM)
f31446e6b5925395fce4f62adf71f7ad70cea6ceMark AndrewsAC_SUBST(ISC_PLATFORM_USEMACASM)
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉ISC_ARCH_DIR=$arch
5597be9bb88de138dfec9fa9176708443813925eTatuya JINMEI 神明達哉AC_SUBST(ISC_ARCH_DIR)
b2f160f266005ceaed77a3f575109f74cd13d548Mark Andrews# The following sets up how non-blocking i/o is established.
b2f160f266005ceaed77a3f575109f74cd13d548Mark Andrews# Sunos, cygwin and solaris 2.x (x<5) require special handling.
b2f160f266005ceaed77a3f575109f74cd13d548Mark Andrewscase "$host" in
b2f160f266005ceaed77a3f575109f74cd13d548Mark Andrews*-sunos*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
b2f160f266005ceaed77a3f575109f74cd13d548Mark Andrews*-cygwin*) AC_DEFINE(PORT_NONBLOCK, O_NDELAY);;
2e3203a08c2b8f305bac3519ea7cd9873b7fcd5aMark Andrews*-solaris2.[[01234]])
b2f160f266005ceaed77a3f575109f74cd13d548Mark Andrews AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK)
b2f160f266005ceaed77a3f575109f74cd13d548Mark Andrews AC_DEFINE(USE_FIONBIO_IOCTL, 1,
b2f160f266005ceaed77a3f575109f74cd13d548Mark Andrews [Defined if you need to use ioctl(FIONBIO) instead a fcntl call to make non-blocking.])
b2f160f266005ceaed77a3f575109f74cd13d548Mark Andrews*) AC_DEFINE(PORT_NONBLOCK, O_NONBLOCK,
b2f160f266005ceaed77a3f575109f74cd13d548Mark Andrews [Sets which flag to pass to open/fcntl to make non-blocking (O_NDELAY/O_NONBLOCK).])
2b66a51a7d72e9cc07917fb583ad528b0539d2a3Mark Andrews# Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket.
2b66a51a7d72e9cc07917fb583ad528b0539d2a3Mark Andrews# This prevents the source address being set.
2b66a51a7d72e9cc07917fb583ad528b0539d2a3Mark Andrewscase "$host" in
2b66a51a7d72e9cc07917fb583ad528b0539d2a3Mark Andrews*-solaris2.[[012345]]|*-solaris2.5.1)
2b66a51a7d72e9cc07917fb583ad528b0539d2a3Mark Andrews AC_DEFINE(BROKEN_TCP_BIND_BEFORE_CONNECT, 1,
2b66a51a7d72e9cc07917fb583ad528b0539d2a3Mark Andrews [Define if you cannot bind() before connect() for TCP sockets.])
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.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Look for TeX.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinAC_PATH_PROGS(LATEX, latex, latex)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinAC_SUBST(LATEX)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinAC_PATH_PROGS(PDFLATEX, pdflatex, pdflatex)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinAC_SUBST(PDFLATEX)
94a8c22d559fe1f977ed41d6fe0b2513ecee7ff9Rob Austein# Look for w3m
94a8c22d559fe1f977ed41d6fe0b2513ecee7ff9Rob AusteinAC_PATH_PROGS(W3M, w3m, w3m)
94a8c22d559fe1f977ed41d6fe0b2513ecee7ff9Rob AusteinAC_SUBST(W3M)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Look for xsltproc (libxslt)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinAC_PATH_PROG(XSLTPROC, xsltproc, xsltproc)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinAC_SUBST(XSLTPROC)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Look for xmllint (libxml2)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinAC_PATH_PROG(XMLLINT, xmllint, xmllint)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinAC_SUBST(XMLLINT)
29747dfe5e073a299b3681e01f5c55540f8bfed7Mark Andrews# Look for Doxygen
29747dfe5e073a299b3681e01f5c55540f8bfed7Mark AndrewsAC_PATH_PROG(DOXYGEN, doxygen, doxygen)
29747dfe5e073a299b3681e01f5c55540f8bfed7Mark AndrewsAC_SUBST(DOXYGEN)
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");
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Look for Docbook-XSL stylesheets. Location probably varies by
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# system. Guessing where it might be found, based on where SGML stuff
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# lives on some systems. FreeBSD is the only one I'm sure of at the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeindocbook_xsl_trees="/usr/pkg/share/xsl /usr/local/share/xsl /usr/share/xsl"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Look for stylesheets we need.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinNOM_PATH_FILE(XSLT_DOCBOOK_STYLE_HTML, docbook/html/docbook.xsl, $docbook_xsl_trees)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinNOM_PATH_FILE(XSLT_DOCBOOK_STYLE_XHTML, docbook/xhtml/docbook.xsl, $docbook_xsl_trees)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinNOM_PATH_FILE(XSLT_DOCBOOK_STYLE_MAN, docbook/manpages/docbook.xsl, $docbook_xsl_trees)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinNOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_HTML, docbook/html/chunk.xsl, $docbook_xsl_trees)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinNOM_PATH_FILE(XSLT_DOCBOOK_CHUNK_XHTML, docbook/xhtml/chunk.xsl, $docbook_xsl_trees)
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark AndrewsNOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_HTML, docbook/html/chunktoc.xsl, $docbook_xsl_trees)
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark AndrewsNOM_PATH_FILE(XSLT_DOCBOOK_CHUNKTOC_XHTML, docbook/xhtml/chunktoc.xsl, $docbook_xsl_trees)
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark AndrewsNOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_HTML, docbook/html/maketoc.xsl, $docbook_xsl_trees)
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark AndrewsNOM_PATH_FILE(XSLT_DOCBOOK_MAKETOC_XHTML, docbook/xhtml/maketoc.xsl, $docbook_xsl_trees)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Same dance for db2latex
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# No idea where this lives except on FreeBSD.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeindb2latex_xsl_trees="/usr/local/share"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Look for stylesheets we need.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinNOM_PATH_FILE(XSLT_DB2LATEX_STYLE, db2latex/xsl/docbook.xsl, $db2latex_xsl_trees)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Look for "admonition" image directory. Can't use NOM_PATH_FILE()
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# because it's a directory, so just do the same things, inline.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinAC_MSG_CHECKING(for db2latex/xsl/figures)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinfor d in $db2latex_xsl_trees
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein if test -d $dd
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein XSLT_DB2LATEX_ADMONITIONS=$dd
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein AC_MSG_RESULT($dd)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinif test "X$XSLT_DB2LATEX_ADMONITIONS" = "X"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein AC_MSG_RESULT(not found)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein XSLT_DB2LATEX_ADMONITIONS=db2latex/xsl/figures
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinAC_SUBST(XSLT_DB2LATEX_ADMONITIONS)
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews# IDN support
6cf369f528c4acd8182eada41ad83b8d97623db8Mark AndrewsAC_ARG_WITH(idn,
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews [ --with-idn[=MPREFIX] enable IDN support using idnkit [default PREFIX]],
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews use_idn="$withval", use_idn="no")
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrewscase "$use_idn" in
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews if test X$prefix = XNONE ; then
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews idn_path=$prefix
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews idn_path="$use_idn"
6cf369f528c4acd8182eada41ad83b8d97623db8Mark AndrewsAC_ARG_WITH(libiconv,
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews [ --with-libiconv[=IPREFIX] GNU libiconv are in IPREFIX [default PREFIX]],
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews use_libiconv="$withval", use_libiconv="no")
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrewscase "$use_libiconv" in
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews if test X$prefix = XNONE ; then
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews iconvlib="-L/usr/local/lib -R/usr/local/lib -liconv"
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews iconvlib="-L$use_libiconv/lib -R$use_libiconv/lib -liconv"
6cf369f528c4acd8182eada41ad83b8d97623db8Mark AndrewsAC_ARG_WITH(iconv,
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews [ --with-iconv[=LIBSPEC] specify iconv library [default -liconv]],
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews iconvlib="$withval")
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrewscase "$iconvlib" in
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews iconvlib=-liconv
6cf369f528c4acd8182eada41ad83b8d97623db8Mark AndrewsAC_ARG_WITH(idnlib,
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews [ --with-idnlib=ARG specify libidnkit],
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews idnlib="$withval", idnlib="no")
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrewsif test "$idnlib" = yes; then
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews AC_MSG_ERROR([You must specify ARG for --with-idnlib.])
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrewsif test "$use_idn" != no; then
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews AC_DEFINE(WITH_IDN, 1, [define if idnkit support is to be included.])
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews STD_CINCLUDES="$STD_CINCLUDES -I$idn_path/include"
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews if test "$idnlib" != no; then
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews IDNLIBS="$idnlib $iconvlib"
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews IDNLIBS="-L$idn_path/lib -lidnkit $iconvlib"
6cf369f528c4acd8182eada41ad83b8d97623db8Mark AndrewsAC_SUBST(IDNLIBS)
6cf369f528c4acd8182eada41ad83b8d97623db8Mark AndrewsAC_CHECK_HEADERS(locale.h)
6cf369f528c4acd8182eada41ad83b8d97623db8Mark AndrewsAC_CHECK_FUNCS(setlocale)
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)
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews# Configure any DLZ drivers.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews# If config.dlz.in selects one or more DLZ drivers, it will set
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews# USE_DLZ to a non-empty value, which will be our clue to
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews# enable the DLZ core functions.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews# This section has to come after the libtool stuff because it needs to
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews# know how to name the driver object files.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark AndrewsDLZ_DRIVER_INCLUDES=""
03e200df5dc283f24a6a349f0b31d3eab26da893Mark AndrewsDLZ_DRIVER_LIBS=""
03e200df5dc283f24a6a349f0b31d3eab26da893Mark AndrewsDLZ_DRIVER_SRCS=""
03e200df5dc283f24a6a349f0b31d3eab26da893Mark AndrewsDLZ_DRIVER_OBJS=""
03e200df5dc283f24a6a349f0b31d3eab26da893Mark AndrewsAC_MSG_CHECKING(for DLZ)
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrewsif test -n "$USE_DLZ"
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews AC_MSG_RESULT(yes)
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews USE_DLZ="-DDLZ $USE_DLZ"
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews AC_CONFIG_FILES([$DLZ_DRIVER_RULES])
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews AC_MSG_RESULT(no)
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews DLZ_DRIVER_RULES=/dev/null
03e200df5dc283f24a6a349f0b31d3eab26da893Mark AndrewsAC_SUBST(USE_DLZ)
03e200df5dc283f24a6a349f0b31d3eab26da893Mark AndrewsAC_SUBST(DLZ_DRIVER_INCLUDES)
03e200df5dc283f24a6a349f0b31d3eab26da893Mark AndrewsAC_SUBST(DLZ_DRIVER_LIBS)
03e200df5dc283f24a6a349f0b31d3eab26da893Mark AndrewsAC_SUBST(DLZ_DRIVER_SRCS)
03e200df5dc283f24a6a349f0b31d3eab26da893Mark AndrewsAC_SUBST(DLZ_DRIVER_OBJS)
03e200df5dc283f24a6a349f0b31d3eab26da893Mark AndrewsAC_SUBST_FILE(DLZ_DRIVER_RULES)
e560f615b2592deea69c49bfc74acbb56f4fd913Mark Andrewsif test "$cross_compiling" = "yes"; then
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark Andrews if test -z "$BUILD_CC"; then
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark Andrews AC_ERROR([BUILD_CC not set])
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark Andrews BUILD_CFLAGS="$BUILD_CFLAGS"
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark Andrews BUILD_CPPFLAGS="$BUILD_CPPFLAGS"
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark Andrews BUILD_LDFLAGS="$BUILD_LDFLAGS"
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark Andrews BUILD_LIBS="$BUILD_LIBS"
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark Andrews BUILD_CC="$CC"
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark Andrews BUILD_CFLAGS="$CFLAGS"
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark Andrews BUILD_CPPFLAGS="$CPPFLAGS $GEN_NEED_OPTARG"
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark Andrews BUILD_LDFLAGS="$LDFLAGS"
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark Andrews BUILD_LIBS="$LIBS"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrewsfor e in $BUILD_LDFLAGS ; do
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews case $host_os in
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews NEWFLAGS="$NEWFLAGS $e $ee"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews NEWFLAGS="$NEWFLAGS $e $ee"
7794a776e0c12bb5be0b813dfd7fa797358ff451Mark Andrews NEWFLAGS="$NEWFLAGS $e"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews NEWFLAGS="$NEWFLAGS $e"
289ae548d52bc8f982d9823af64cafda7bd92232Mark AndrewsBUILD_LDFLAGS="$NEWFLAGS"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrewsfor e in $DNS_GSSAPI_LIBS ; do
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews case $host_os in
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews NEWFLAGS="$NEWFLAGS $e $ee"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews NEWFLAGS="$NEWFLAGS $e $ee"
7794a776e0c12bb5be0b813dfd7fa797358ff451Mark Andrews NEWFLAGS="$NEWFLAGS $e"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews NEWFLAGS="$NEWFLAGS $e"
289ae548d52bc8f982d9823af64cafda7bd92232Mark AndrewsDNS_GSSAPI_LIBS="$NEWFLAGS"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrewsfor e in $DNS_CRYPTO_LIBS ; do
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews case $host_os in
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews NEWFLAGS="$NEWFLAGS $e $ee"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews ee=`echo $e | sed -e 's%^-L%-Wl,-rpath,%'`
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews NEWFLAGS="$NEWFLAGS $e $ee"
7794a776e0c12bb5be0b813dfd7fa797358ff451Mark Andrews NEWFLAGS="$NEWFLAGS $e"
289ae548d52bc8f982d9823af64cafda7bd92232Mark Andrews NEWFLAGS="$NEWFLAGS $e"
289ae548d52bc8f982d9823af64cafda7bd92232Mark AndrewsDNS_CRYPTO_LIBS="$NEWFLAGS"
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark AndrewsAC_SUBST(BUILD_CC)
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark AndrewsAC_SUBST(BUILD_CFLAGS)
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark AndrewsAC_SUBST(BUILD_CPPFLAGS)
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark AndrewsAC_SUBST(BUILD_LDFLAGS)
118394ef2ec7cef253c55359a3d70d202ddc2fa0Mark AndrewsAC_SUBST(BUILD_LIBS)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Commands to run at the end of config.status.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Don't just put these into configure, it won't work right if somebody
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# runs config.status directly (which autoconf allows).
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinAC_CONFIG_COMMANDS(
29747dfe5e073a299b3681e01f5c55540f8bfed7Mark Andrews [chmod a+x isc-config.sh doc/doxygen/doxygen-input-filter])
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews# Files to configure. These are listed here because we used to
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews# specify them as arguments to AC_OUTPUT. It's (now) ok to move these
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews# elsewhere if there's a good reason for doing so.
03e200df5dc283f24a6a349f0b31d3eab26da893Mark AndrewsAC_CONFIG_FILES([
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark Andrewsif test "X$OPENSSL_WARNING" != "X"; then
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING Your OpenSSL crypto library may be vulnerable to WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING one or more of the the following known security WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING flaws: WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING CAN-2002-0659, CAN-2006-4339, CVE-2006-2937 and WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING CVE-2006-2940. WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING It is recommended that you upgrade to OpenSSL WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING version 0.9.8d/0.9.7l (or greater). WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING You can disable this warning by specifying: WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING --disable-openssl-version-check WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
3ca0e71a863fe3fbb4f439e5d0bebfd7bd38fb16Mark AndrewsWARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
afbf0f0d778da7958bbd8d7d71614f32cdc9a9b0David Lawrence# Tell Emacs to edit this file in shell mode.
afbf0f0d778da7958bbd8d7d71614f32cdc9a9b0David Lawrence# Local Variables: