configure.in revision 143731
1135446Strhodes# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") 2135446Strhodes# Copyright (C) 1998-2003 Internet Software Consortium. 3135446Strhodes# 4135446Strhodes# Permission to use, copy, modify, and distribute this software for any 5135446Strhodes# purpose with or without fee is hereby granted, provided that the above 6135446Strhodes# copyright notice and this permission notice appear in all copies. 7135446Strhodes# 8135446Strhodes# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 9135446Strhodes# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 10135446Strhodes# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 11135446Strhodes# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 12135446Strhodes# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 13135446Strhodes# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 14135446Strhodes# PERFORMANCE OF THIS SOFTWARE. 15135446Strhodes 16135446Strhodesdnl 17135446StrhodesAC_DIVERT_PUSH(1)dnl 18135446Strhodesesyscmd([sed "s/^/# /" COPYRIGHT])dnl 19135446StrhodesAC_DIVERT_POP()dnl 20135446Strhodes 21143731SdougbAC_REVISION($Revision: 1.294.2.23.2.39 $) 22135446Strhodes 23135446StrhodesAC_INIT(lib/dns/name.c) 24135446StrhodesAC_PREREQ(2.13) 25135446Strhodes 26135446StrhodesAC_CONFIG_HEADER(config.h) 27135446StrhodesAC_CONFIG_SUBDIRS(lib/bind) 28135446Strhodes 29135446StrhodesAC_CANONICAL_HOST 30135446Strhodes 31135446StrhodesAC_PROG_MAKE_SET 32135446StrhodesAC_PROG_RANLIB 33135446StrhodesAC_PROG_INSTALL 34135446Strhodes 35135446StrhodesAC_SUBST(STD_CINCLUDES) 36135446StrhodesAC_SUBST(STD_CDEFINES) 37135446StrhodesAC_SUBST(STD_CWARNINGS) 38135446StrhodesAC_SUBST(CCOPT) 39135446Strhodes 40135446StrhodesAC_PATH_PROG(AR, ar) 41135446StrhodesARFLAGS="cruv" 42135446StrhodesAC_SUBST(AR) 43135446StrhodesAC_SUBST(ARFLAGS) 44135446Strhodes 45135446Strhodes# The POSIX ln(1) program. Non-POSIX systems may substitute 46135446Strhodes# "copy" or something. 47135446StrhodesLN=ln 48135446StrhodesAC_SUBST(LN) 49135446Strhodes 50135446Strhodescase "$AR" in 51135446Strhodes "") 52135446Strhodes AC_MSG_ERROR([ 53135446Strhodesar program not found. Please fix your PATH to include the directory in 54135446Strhodeswhich ar resides, or set AR in the environment with the full path to ar. 55135446Strhodes]) 56135446Strhodes 57135446Strhodes ;; 58135446Strhodesesac 59135446Strhodes 60135446Strhodes# 61135446Strhodes# Etags. 62135446Strhodes# 63135446StrhodesAC_PATH_PROGS(ETAGS, etags emacs-etags) 64135446Strhodes 65135446Strhodes# 66135446Strhodes# Some systems, e.g. RH7, have the Exuberant Ctags etags instead of 67135446Strhodes# GNU emacs etags, and it requires the -L flag. 68135446Strhodes# 69135446Strhodesif test "X$ETAGS" != "X"; then 70135446Strhodes AC_MSG_CHECKING(for Exuberant Ctags etags) 71135446Strhodes if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then 72135446Strhodes AC_MSG_RESULT(yes) 73135446Strhodes ETAGS="$ETAGS -L" 74135446Strhodes else 75135446Strhodes AC_MSG_RESULT(no) 76135446Strhodes fi 77135446Strhodesfi 78135446StrhodesAC_SUBST(ETAGS) 79135446Strhodes 80135446Strhodes# 81135446Strhodes# Perl is optional; it is used only by some of the system test scripts. 82135446Strhodes# 83135446StrhodesAC_PATH_PROGS(PERL, perl5 perl) 84135446StrhodesAC_SUBST(PERL) 85135446Strhodes 86135446Strhodes# 87135446Strhodes# Special processing of paths depending on whether --prefix, 88135446Strhodes# --sysconfdir or --localstatedir arguments were given. What's 89135446Strhodes# desired is some compatibility with the way previous versions 90135446Strhodes# of BIND built; they defaulted to /usr/local for most parts of 91135446Strhodes# the installation, but named.boot/named.conf was in /etc 92135446Strhodes# and named.pid was in /var/run. 93135446Strhodes# 94135446Strhodes# So ... if none of --prefix, --sysconfdir or --localstatedir are 95135446Strhodes# specified, set things up that way. If --prefix is given, use 96135446Strhodes# it for sysconfdir and localstatedir the way configure normally 97135446Strhodes# would. To change the prefix for everything but leave named.conf 98135446Strhodes# in /etc or named.pid in /var/run, then do this the usual configure way: 99135446Strhodes# ./configure --prefix=/somewhere --sysconfdir=/etc 100135446Strhodes# ./configure --prefix=/somewhere --localstatedir=/var 101135446Strhodes# 102135446Strhodes# To put named.conf and named.pid in /usr/local with everything else, 103135446Strhodes# set the prefix explicitly to /usr/local even though that's the default: 104135446Strhodes# ./configure --prefix=/usr/local 105135446Strhodes# 106135446Strhodescase "$prefix" in 107135446Strhodes NONE) 108135446Strhodes case "$sysconfdir" in 109135446Strhodes '${prefix}/etc') 110135446Strhodes sysconfdir=/etc 111135446Strhodes ;; 112135446Strhodes esac 113135446Strhodes case "$localstatedir" in 114135446Strhodes '${prefix}/var') 115135446Strhodes localstatedir=/var 116135446Strhodes ;; 117135446Strhodes esac 118135446Strhodes ;; 119135446Strhodesesac 120135446Strhodes 121135446Strhodes# 122135446Strhodes# Make sure INSTALL uses an absolute path, else it will be wrong in all 123135446Strhodes# Makefiles, since they use make/rules.in and INSTALL will be adjusted by 124135446Strhodes# configure based on the location of the file where it is substituted. 125135446Strhodes# Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate 126135446Strhodes# subdirectory of install-sh, This relative path will be wrong for all 127135446Strhodes# directories more than one level down from install-sh. 128135446Strhodes# 129135446Strhodescase "$INSTALL" in 130135446Strhodes /*) 131135446Strhodes ;; 132135446Strhodes *) 133135446Strhodes # 134135446Strhodes # Not all systems have dirname. 135135446Strhodes # 136135446Strhodes changequote({, }) 137135446Strhodes ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`" 138135446Strhodes changequote([, ]) 139135446Strhodes 140135446Strhodes ac_prog="`echo $INSTALL | sed 's%.*/%%'`" 141135446Strhodes test "$ac_dir" = "$ac_prog" && ac_dir=. 142135446Strhodes test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`" 143135446Strhodes INSTALL="$ac_dir/$ac_prog" 144135446Strhodes ;; 145135446Strhodesesac 146135446Strhodes 147135446Strhodes# 148135446Strhodes# On these hosts, we really want to use cc, not gcc, even if it is 149135446Strhodes# found. The gcc that these systems have will not correctly handle 150135446Strhodes# pthreads. 151135446Strhodes# 152135446Strhodes# However, if the user sets $CC to be something, let that override 153135446Strhodes# our change. 154135446Strhodes# 155135446Strhodesif test "X$CC" = "X" ; then 156135446Strhodes case "$host" in 157135446Strhodes *-dec-osf*) 158135446Strhodes CC="cc" 159135446Strhodes ;; 160135446Strhodes *-solaris*) 161135446Strhodes # Use Sun's cc if it is available, but watch 162135446Strhodes # out for /usr/ucb/cc; it will never be the right 163135446Strhodes # compiler to use. 164135446Strhodes # 165135446Strhodes # If setting CC here fails, the AC_PROG_CC done 166135446Strhodes # below might still find gcc. 167135446Strhodes IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 168135446Strhodes for ac_dir in $PATH; do 169135446Strhodes test -z "$ac_dir" && ac_dir=. 170135446Strhodes case "$ac_dir" in 171135446Strhodes /usr/ucb) 172135446Strhodes # exclude 173135446Strhodes ;; 174135446Strhodes *) 175135446Strhodes if test -f "$ac_dir/cc"; then 176135446Strhodes CC="$ac_dir/cc" 177135446Strhodes break 178135446Strhodes fi 179135446Strhodes ;; 180135446Strhodes esac 181135446Strhodes done 182135446Strhodes IFS="$ac_save_ifs" 183135446Strhodes ;; 184135446Strhodes *-hp-hpux*) 185135446Strhodes CC="cc" 186135446Strhodes ;; 187135446Strhodes mips-sgi-irix*) 188135446Strhodes CC="cc" 189135446Strhodes ;; 190135446Strhodes esac 191135446Strhodesfi 192135446Strhodes 193135446StrhodesAC_PROG_CC 194135446Strhodes 195135446Strhodes# 196135446Strhodes# gcc's optimiser is broken at -02 for ultrasparc 197135446Strhodes# 198135446Strhodesif test "$ac_env_CFLAGS_set" != set -a "X$GCC" = "Xyes"; then 199135446Strhodes case "$host" in 200135446Strhodes sparc-*) 201135446Strhodes CCFLAGS="-g -O1" 202135446Strhodes ;; 203135446Strhodes esac 204135446Strhodesfi 205135446Strhodes 206135446Strhodes# 207135446Strhodes# OS dependent CC flags 208135446Strhodes# 209135446Strhodescase "$host" in 210135446Strhodes # OSF 5.0: recv/send are only avaliable with -D_POSIX_PII_SOCKET or 211135446Strhodes # -D_XOPEN_SOURCE_EXTENDED. 212135446Strhodes *-dec-osf*) 213135446Strhodes STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET" 214135446Strhodes CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET" 215135446Strhodes ;; 216135446Strhodes #HP-UX: need -D_XOPEN_SOURCE_EXTENDED and -lxnet for CMSG macros 217135446Strhodes *-hp-hpux*) 218135446Strhodes STD_CDEFINES="$STD_CDEFINES -D_XOPEN_SOURCE_EXTENDED" 219135446Strhodes CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" 220135446Strhodes LIBS="-lxnet $LIBS" 221135446Strhodes ;; 222135446Strhodes # Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros 223135446Strhodes *-solaris*) 224135446Strhodes STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__" 225135446Strhodes CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__" 226135446Strhodes ;; 227135446Strhodesesac 228135446Strhodes 229135446StrhodesAC_HEADER_STDC 230135446Strhodes 231135446StrhodesAC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/param.h sys/sysctl.h net/if6.h,,, 232135446Strhodes[$ac_includes_default 233135446Strhodes#ifdef HAVE_SYS_PARAM_H 234135446Strhodes# include <sys/param.h> 235135446Strhodes#endif 236135446Strhodes]) 237135446Strhodes 238135446StrhodesAC_C_CONST 239135446StrhodesAC_C_INLINE 240135446StrhodesAC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME)) 241135446Strhodes 242135446Strhodes# 243135446Strhodes# UnixWare 7.1.1 with the feature supplement to the UDK compiler 244135446Strhodes# is reported to not support "static inline" (RT #1212). 245135446Strhodes# 246135446StrhodesAC_MSG_CHECKING(for static inline breakage) 247135446StrhodesAC_TRY_COMPILE(, [ 248135446Strhodes foo1(); 249135446Strhodes } 250135446Strhodes 251135446Strhodes static inline int foo1() { 252135446Strhodes return 0; 253135446Strhodes } 254135446Strhodes 255135446Strhodes static inline int foo2() { 256135446Strhodes return foo1(); 257135446Strhodes ], 258135446Strhodes [AC_MSG_RESULT(no)], 259135446Strhodes [AC_MSG_RESULT(yes) 260135446Strhodes AC_DEFINE(inline, )]) 261135446Strhodes 262135446StrhodesAC_TYPE_SIZE_T 263135446StrhodesAC_CHECK_TYPE(ssize_t, int) 264143731SdougbAC_CHECK_TYPE(socklen_t, 265143731Sdougb[AC_DEFINE(ISC_SOCKADDR_LEN_T, socklen_t)], 266143731Sdougb[ 267143731SdougbAC_TRY_COMPILE( 268143731Sdougb[ 269143731Sdougb#include <sys/types.h> 270143731Sdougb#include <sys/socket.h> 271143731Sdougbint getsockname(int, struct sockaddr *, size_t *); 272143731Sdougb],[], 273143731Sdougb[AC_DEFINE(ISC_SOCKADDR_LEN_T, size_t)], 274143731Sdougb[AC_DEFINE(ISC_SOCKADDR_LEN_T, int)]) 275143731Sdougb], 276143731Sdougb[ 277143731Sdougb#include <sys/types.h> 278143731Sdougb#include <sys/socket.h> 279143731Sdougb]) 280143731SdougbAC_SUBST(ISC_SOCKADDR_LEN_T) 281135446StrhodesAC_HEADER_TIME 282135446StrhodesAC_MSG_CHECKING(for long long) 283135446StrhodesAC_TRY_COMPILE([],[long long i = 0; return (0);], 284135446Strhodes [AC_MSG_RESULT(yes) 285135446Strhodes ISC_PLATFORM_HAVELONGLONG="#define ISC_PLATFORM_HAVELONGLONG 1"], 286135446Strhodes [AC_MSG_RESULT(no) 287135446Strhodes ISC_PLATFORM_HAVELONGLONG="#undef ISC_PLATFORM_HAVELONGLONG"]) 288135446StrhodesAC_SUBST(ISC_PLATFORM_HAVELONGLONG) 289135446Strhodes 290135446Strhodes# 291135446Strhodes# check if we have lifconf 292135446Strhodes# 293135446StrhodesAC_MSG_CHECKING(for struct lifconf) 294135446StrhodesAC_TRY_COMPILE([ 295135446Strhodes#include <sys/types.h> 296135446Strhodes#include <sys/socket.h> 297135446Strhodes#include <net/if.h> 298135446Strhodes], 299135446Strhodes[ 300135446Strhodesstruct lifconf lifconf; 301135446Strhodeslifconf.lifc_len = 0; 302135446Strhodes] 303135446Strhodes, 304135446Strhodes [AC_MSG_RESULT(yes) 305135446Strhodes ISC_PLATFORM_HAVELIFCONF="#define ISC_PLATFORM_HAVELIFCONF 1"], 306135446Strhodes [AC_MSG_RESULT(no) 307135446Strhodes ISC_PLATFORM_HAVELIFCONF="#undef ISC_PLATFORM_HAVELIFCONF"]) 308135446StrhodesAC_SUBST(ISC_PLATFORM_HAVELIFCONF) 309135446Strhodes 310135446Strhodes 311135446Strhodes# 312135446Strhodes# check if we need to #include sys/select.h explicitly 313135446Strhodes# 314135446Strhodescase $ac_cv_header_unistd_h in 315135446Strhodesyes) 316135446StrhodesAC_MSG_CHECKING(if unistd.h or sys/types.h defines fd_set) 317135446StrhodesAC_TRY_COMPILE([ 318135446Strhodes#include <sys/types.h> /* Ultrix */ 319135446Strhodes#include <unistd.h>], 320135446Strhodes[fd_set read_set; return (0);], 321135446Strhodes [AC_MSG_RESULT(yes) 322135446Strhodes ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH" 323135446Strhodes LWRES_PLATFORM_NEEDSYSSELECTH="#undef LWRES_PLATFORM_NEEDSYSSELECTH"], 324135446Strhodes [AC_MSG_RESULT(no) 325135446Strhodes case $ac_cv_header_sys_select_h in 326135446Strhodes yes) 327135446Strhodes ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1" 328135446Strhodes LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1" 329135446Strhodes ;; 330135446Strhodes no) 331135446Strhodes AC_MSG_ERROR([need either working unistd.h or sys/select.h]) 332135446Strhodes ;; 333135446Strhodes esac 334135446Strhodes ]) 335135446Strhodes ;; 336135446Strhodesno) 337135446Strhodes case $ac_cv_header_sys_select_h in 338135446Strhodes yes) 339135446Strhodes ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1" 340135446Strhodes LWRES_PLATFORM_NEEDSYSSELECTH="#define LWRES_PLATFORM_NEEDSYSSELECTH 1" 341135446Strhodes ;; 342135446Strhodes no) 343135446Strhodes AC_MSG_ERROR([need either unistd.h or sys/select.h]) 344135446Strhodes ;; 345135446Strhodes esac 346135446Strhodes ;; 347135446Strhodesesac 348135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH) 349135446StrhodesAC_SUBST(LWRES_PLATFORM_NEEDSYSSELECTH) 350135446Strhodes 351135446Strhodes# 352135446Strhodes# Find the machine's endian flavor. 353135446Strhodes# 354135446StrhodesAC_C_BIGENDIAN 355135446Strhodes 356135446Strhodes# 357135446Strhodes# was --with-openssl specified? 358135446Strhodes# 359135446StrhodesAC_MSG_CHECKING(for OpenSSL library) 360135446StrhodesAC_ARG_WITH(openssl, 361135446Strhodes[ --with-openssl[=PATH] Build with OpenSSL [yes|no|path]. 362135446Strhodes (Required for DNSSEC)], 363135446Strhodes use_openssl="$withval", use_openssl="auto") 364135446Strhodes 365143731Sdougbopenssldirs="/usr /usr/local /usr/local/ssl /usr/pkg" 366143731Sdougbif test "$use_openssl" = "auto" 367143731Sdougbthen 368143731Sdougb for d in $openssldirs 369143731Sdougb do 370143731Sdougb if test -f $d/include/openssl/opensslv.h 371143731Sdougb then 372143731Sdougb use_openssl=$d 373143731Sdougb break 374143731Sdougb fi 375143731Sdougb done 376143731Sdougbfi 377135446Strhodescase "$use_openssl" in 378135446Strhodes no) 379135446Strhodes AC_MSG_RESULT(no) 380135446Strhodes DST_OPENSSL_INC="" 381135446Strhodes USE_OPENSSL="" 382135446Strhodes ;; 383143731Sdougb auto) 384143731Sdougb DST_OPENSSL_INC="" 385143731Sdougb USE_OPENSSL="" 386143731Sdougb AC_MSG_RESULT(not found) 387143731Sdougb ;; 388135446Strhodes *) 389143731Sdougb if test "$use_openssl" = "yes" 390135446Strhodes then 391135446Strhodes # User did not specify a path - guess it 392135446Strhodes for d in $openssldirs 393135446Strhodes do 394135446Strhodes if test -f $d/include/openssl/opensslv.h 395135446Strhodes then 396135446Strhodes use_openssl=$d 397135446Strhodes break 398135446Strhodes fi 399135446Strhodes done 400135446Strhodes if test "$use_openssl" = "yes" 401135446Strhodes then 402135446Strhodes AC_MSG_RESULT(not found) 403135446Strhodes AC_MSG_ERROR( 404135446Strhodes[OpenSSL was not found in any of $openssldirs; use --with-openssl=/path]) 405135446Strhodes fi 406135446Strhodes fi 407135446Strhodes USE_OPENSSL='-DOPENSSL' 408135446Strhodes if test "$use_openssl" = "/usr" 409135446Strhodes then 410135446Strhodes DST_OPENSSL_INC="" 411135446Strhodes DNS_OPENSSL_LIBS="-lcrypto" 412135446Strhodes else 413135446Strhodes DST_OPENSSL_INC="-I$use_openssl/include" 414135446Strhodes case $host in 415135446Strhodes *-solaris*) 416135446Strhodes DNS_OPENSSL_LIBS="-L$use_openssl/lib -R$use_openssl/lib -lcrypto" 417135446Strhodes ;; 418135446Strhodes *) 419135446Strhodes DNS_OPENSSL_LIBS="-L$use_openssl/lib -lcrypto" 420135446Strhodes ;; 421135446Strhodes esac 422135446Strhodes fi 423135446Strhodes AC_MSG_RESULT(using openssl from $use_openssl/lib and $use_openssl/include) 424135446Strhodes 425135446Strhodes saved_cflags="$CFLAGS" 426135446Strhodes saved_libs="$LIBS" 427135446Strhodes CFLAGS="$CFLAGS $DST_OPENSSL_INC" 428135446Strhodes LIBS="$LIBS $DNS_OPENSSL_LIBS" 429135446Strhodes AC_MSG_CHECKING(whether linking with OpenSSL works) 430135446Strhodes AC_TRY_RUN([ 431135446Strhodes#include <openssl/err.h> 432135446Strhodesint main() { 433135446Strhodes ERR_clear_error(); 434135446Strhodes return (0); 435135446Strhodes} 436135446Strhodes], 437135446Strhodes [AC_MSG_RESULT(yes)], 438135446Strhodes [AC_MSG_RESULT(no) 439135446Strhodes AC_MSG_ERROR(Could not run test program using OpenSSL from 440135446Strhodes$use_openssl/lib and $use_openssl/include. 441135446StrhodesPlease check the argument to --with-openssl and your 442135446Strhodesshared library configuration (e.g., LD_LIBRARY_PATH).)], 443135446Strhodes [AC_MSG_RESULT(assuming it does work on target platform)]) 444135446Strhodes 445135446Strhodes AC_MSG_CHECKING(whether linking with OpenSSL requires -ldl) 446135446Strhodes AC_TRY_LINK([ 447135446Strhodes#include <openssl/err.h>], 448135446Strhodes[ DSO_METHOD_dlfcn(); ], 449135446Strhodes [AC_MSG_RESULT(no)], 450135446Strhodes [LIBS="$LIBS -ldl" 451135446Strhodes AC_TRY_LINK([ 452135446Strhodes#include <openssl/err.h> 453135446Strhodes],[ DSO_METHOD_dlfcn(); ], 454135446Strhodes [AC_MSG_RESULT(yes) 455135446Strhodes DNS_OPENSSL_LIBS="$DNS_OPENSSL_LIBS -ldl" 456135446Strhodes ], 457135446Strhodes [AC_MSG_RESULT(unknown) 458135446Strhodes AC_MSG_ERROR(OpenSSL has unsupported dynamic loading)], 459135446Strhodes [AC_MSG_RESULT(assuming it does work on target platform)]) 460135446Strhodes ], 461135446Strhodes [AC_MSG_RESULT(assuming it does work on target platform)] 462135446Strhodes ) 463135446Strhodes 464135446Strhodes# 465135446Strhodes# OpenSSLDie is new with CERT CS-2002-23. If we see it we have may 466135446Strhodes# have a patched library otherwise check that we are greater than 467135446Strhodes# the fixed versions 468135446Strhodes# 469135446Strhodes AC_CHECK_FUNC(OpenSSLDie, 470135446Strhodes AC_MSG_CHECKING(OpenSSL library version) 471135446Strhodes AC_TRY_RUN([ 472135446Strhodes#include <stdio.h> 473135446Strhodes#include <openssl/opensslv.h> 474135446Strhodesint main() { 475135446Strhodes if (OPENSSL_VERSION_NUMBER >= 0x0090581fL) 476135446Strhodes return (0); 477135446Strhodes printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n", 478135446Strhodes OPENSSL_VERSION_NUMBER); 479135446Strhodes printf("Require OPENSSL_VERSION_NUMBER 0x0090581f or greater\n\n"); 480135446Strhodes return (1); 481135446Strhodes} 482135446Strhodes], 483135446Strhodes [AC_MSG_RESULT(ok)], 484135446Strhodes [AC_MSG_RESULT(not compatible) 485135446Strhodes AC_MSG_ERROR(you need OpenSSL 0.9.5a or newer)], 486135446Strhodes [AC_MSG_RESULT(assuming target platform has compatible version)]) 487135446Strhodes , 488135446Strhodes AC_MSG_RESULT(did not find fixes for CERT CA-2002-23) 489135446Strhodes AC_MSG_CHECKING(OpenSSL library version) 490135446Strhodes AC_TRY_RUN([ 491135446Strhodes#include <stdio.h> 492135446Strhodes#include <openssl/opensslv.h> 493135446Strhodesint main() { 494135446Strhodes if ((OPENSSL_VERSION_NUMBER >= 0x0090605fL && 495135446Strhodes OPENSSL_VERSION_NUMBER < 0x009070000L) || 496135446Strhodes OPENSSL_VERSION_NUMBER >= 0x00907003L) 497135446Strhodes return (0); 498135446Strhodes printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n", 499135446Strhodes OPENSSL_VERSION_NUMBER); 500135446Strhodes printf("Require OPENSSL_VERSION_NUMBER 0x0090605f or greater (0.9.6e)\n" 501135446Strhodes "Require OPENSSL_VERSION_NUMBER 0x00907003 or greater (0.9.7-beta2)\n\n"); 502135446Strhodes return (1); 503135446Strhodes} 504135446Strhodes], 505135446Strhodes [AC_MSG_RESULT(ok)], 506135446Strhodes [AC_MSG_RESULT(not compatible) 507135446Strhodes AC_MSG_ERROR(you need OpenSSL 0.9.6e/0.9.7-beta2 (or newer): CERT CA-2002-23)], 508135446Strhodes [AC_MSG_RESULT(assuming target platform has compatible version)])) 509135446Strhodes AC_MSG_CHECKING(for OpenSSL DSA support) 510135446Strhodes if test -f $use_openssl/include/openssl/dsa.h 511135446Strhodes then 512135446Strhodes AC_DEFINE(HAVE_OPENSSL_DSA) 513135446Strhodes AC_MSG_RESULT(yes) 514135446Strhodes else 515135446Strhodes AC_MSG_RESULT(no) 516135446Strhodes fi 517135446Strhodes CFLAGS="$saved_cflags" 518135446Strhodes LIBS="$saved_libs" 519135446Strhodes ;; 520135446Strhodesesac 521135446Strhodes 522135446Strhodes# 523135446Strhodes# This would include the system openssl path (and linker options to use 524135446Strhodes# it as needed) if it is found. 525135446Strhodes# 526135446Strhodes 527135446StrhodesAC_SUBST(USE_OPENSSL) 528135446StrhodesAC_SUBST(DST_OPENSSL_INC) 529135446StrhodesDNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DNS_OPENSSL_LIBS" 530135446Strhodes 531135446Strhodes# 532135446Strhodes# was --with-gssapi specified? 533135446Strhodes# 534135446Strhodes#AC_MSG_CHECKING(for GSSAPI library) 535135446Strhodes#AC_ARG_WITH(gssapi, 536135446Strhodes#[ --with-gssapi=PATH Specify path for system-supplied GSSAPI], 537135446Strhodes# use_gssapi="$withval", use_gssapi="no") 538135446Strhodes# 539135446Strhodes#case "$use_gssapi" in 540135446Strhodes# no) 541135446Strhodes# USE_GSSAPI='' 542135446Strhodes# DST_GSSAPI_INC='' 543135446Strhodes# DNS_GSSAPI_LIBS='' 544135446Strhodes# AC_MSG_RESULT(not specified) 545135446Strhodes# ;; 546135446Strhodes# yes) 547135446Strhodes# AC_MSG_ERROR([--with-gssapi must specify a path]) 548135446Strhodes# ;; 549135446Strhodes# *) 550135446Strhodes# USE_GSSAPI='-DGSSAPI' 551135446Strhodes# DST_GSSAPI_INC="-I$use_gssapi/include" 552135446Strhodes# DNS_GSSAPI_LIBS="-L$use_gssapi/lib -lgssapi_krb5" 553135446Strhodes# AC_MSG_RESULT(using gssapi from $use_gssapi/lib and $use_gssapi/include) 554135446Strhodes# ;; 555135446Strhodes#esac 556135446Strhodes 557135446StrhodesUSE_GSSAPI='' 558135446StrhodesDST_GSSAPI_INC='' 559135446StrhodesDNS_GSSAPI_LIBS='' 560135446Strhodes 561135446StrhodesAC_SUBST(USE_GSSAPI) 562135446StrhodesAC_SUBST(DST_GSSAPI_INC) 563135446StrhodesDNS_CRYPTO_LIBS="$DNS_CRYPTO_LIBS $DNS_GSSAPI_LIBS" 564135446Strhodes 565135446Strhodes# 566135446Strhodes# Applications linking with libdns also need to link with these libraries. 567135446Strhodes# 568135446Strhodes 569135446StrhodesAC_SUBST(DNS_CRYPTO_LIBS) 570135446Strhodes 571135446Strhodes# 572135446Strhodes# was --with-randomdev specified? 573135446Strhodes# 574135446StrhodesAC_MSG_CHECKING(for random device) 575135446StrhodesAC_ARG_WITH(randomdev, 576135446Strhodes[ --with-randomdev=PATH Specify path for random device], 577135446Strhodes use_randomdev="$withval", use_randomdev="unspec") 578135446Strhodes 579135446Strhodescase "$use_randomdev" in 580135446Strhodes unspec) 581135446Strhodes case "$host" in 582135446Strhodes *-openbsd*) 583135446Strhodes devrandom=/dev/arandom 584135446Strhodes ;; 585135446Strhodes *) 586135446Strhodes devrandom=/dev/random 587135446Strhodes ;; 588135446Strhodes esac 589135446Strhodes AC_MSG_RESULT($devrandom) 590135446Strhodes AC_CHECK_FILE($devrandom, 591135446Strhodes AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, 592135446Strhodes "$devrandom"),) 593135446Strhodes ;; 594135446Strhodes yes) 595135446Strhodes AC_MSG_ERROR([--with-randomdev must specify a path]) 596135446Strhodes ;; 597135446Strhodes no) 598135446Strhodes AC_MSG_RESULT(disabled) 599135446Strhodes ;; 600135446Strhodes *) 601135446Strhodes AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, "$use_randomdev") 602135446Strhodes AC_MSG_RESULT(using "$use_randomdev") 603135446Strhodes ;; 604135446Strhodesesac 605135446Strhodes 606135446Strhodes# 607135446Strhodes# Do we have arc4random() ? 608135446Strhodes# 609135446StrhodesAC_CHECK_FUNC(arc4random, AC_DEFINE(HAVE_ARC4RANDOM)) 610135446Strhodes 611135446Strhodes# 612135446Strhodes# Begin pthreads checking. 613135446Strhodes# 614135446Strhodes# First, decide whether to use multithreading or not. 615135446Strhodes# 616135446Strhodes# Enable multithreading by default on systems where it is known 617135446Strhodes# to work well, and where debugging of multithreaded programs 618135446Strhodes# is supported. 619135446Strhodes# 620135446Strhodes 621135446StrhodesAC_MSG_CHECKING(whether to build with thread support) 622135446Strhodes 623135446Strhodescase $host in 624135446Strhodes*-dec-osf*) 625135446Strhodes use_threads=true ;; 626135446Strhodes[*-solaris2.[0-6]]) 627135446Strhodes # Thread signals are broken on Solaris 2.6; they are sometimes 628135446Strhodes # delivered to the wrong thread. 629135446Strhodes use_threads=false ;; 630135446Strhodes*-solaris*) 631135446Strhodes use_threads=true ;; 632135446Strhodes*-ibm-aix*) 633135446Strhodes use_threads=true ;; 634135446Strhodes*-hp-hpux10*) 635135446Strhodes use_threads=false ;; 636135446Strhodes*-hp-hpux11*) 637135446Strhodes use_threads=true ;; 638135446Strhodes*-sgi-irix*) 639135446Strhodes use_threads=true ;; 640135446Strhodes*-sco-sysv*uw*|*-*-sysv*UnixWare*) 641135446Strhodes # UnixWare 642135446Strhodes use_threads=false ;; 643135446Strhodes*-*-sysv*OpenUNIX*) 644135446Strhodes # UnixWare 645135446Strhodes use_threads=true ;; 646135446Strhodes*-netbsd*) 647135446Strhodes if test -r /usr/lib/libpthread.so ; then 648135446Strhodes use_threads=true 649135446Strhodes else 650135446Strhodes # Socket I/O optimizations introduced in 9.2 expose a 651135446Strhodes # bug in unproven-pthreads; see PR #12650 652135446Strhodes use_threads=false 653135446Strhodes fi 654135446Strhodes ;; 655135446Strhodes*-openbsd*) 656135446Strhodes # OpenBSD users have reported that named dumps core on 657135446Strhodes # startup when built with threads. 658135446Strhodes use_threads=false ;; 659135446Strhodes*-freebsd*) 660135446Strhodes use_threads=false ;; 661135446Strhodes*-bsdi[234]*) 662135446Strhodes # Thread signals do not work reliably on some versions of BSD/OS. 663135446Strhodes use_threads=false ;; 664135446Strhodes*-bsdi5*) 665135446Strhodes use_threads=true ;; 666135446Strhodes*-linux*) 667135446Strhodes # Threads are disabled on Linux by default because most 668135446Strhodes # Linux kernels produce unusable core dumps from multithreaded 669135446Strhodes # programs, and because of limitations in setuid(). 670135446Strhodes use_threads=false ;; 671135446Strhodes*) 672135446Strhodes use_threads=false ;; 673135446Strhodesesac 674135446Strhodes 675135446StrhodesAC_ARG_ENABLE(threads, 676135446Strhodes [ --enable-threads enable multithreading]) 677135446Strhodescase "$enable_threads" in 678135446Strhodes yes) 679135446Strhodes use_threads=true 680135446Strhodes ;; 681135446Strhodes no) 682135446Strhodes use_threads=false 683135446Strhodes ;; 684135446Strhodes '') 685135446Strhodes # Use system-dependent default 686135446Strhodes ;; 687135446Strhodes *) 688135446Strhodes AC_MSG_ERROR([--enable-threads takes yes or no]) 689135446Strhodes ;; 690135446Strhodesesac 691135446Strhodes 692135446Strhodesif $use_threads 693135446Strhodesthen 694135446Strhodes AC_MSG_RESULT(yes) 695135446Strhodeselse 696135446Strhodes AC_MSG_RESULT(no) 697135446Strhodesfi 698135446Strhodes 699135446Strhodesif $use_threads 700135446Strhodesthen 701135446Strhodes # 702135446Strhodes # Search for / configure pthreads in a system-dependent fashion. 703135446Strhodes # 704135446Strhodes case "$host" in 705135446Strhodes *-netbsd*) 706135446Strhodes # NetBSD has multiple pthreads implementations. The 707135446Strhodes # recommended one to use is "unproven-pthreads". The 708135446Strhodes # older "mit-pthreads" may also work on some NetBSD 709135446Strhodes # versions. The PTL2 thread library does not 710135446Strhodes # currently work with bind9, but can be chosen with 711135446Strhodes # the --with-ptl2 option for those who wish to 712135446Strhodes # experiment with it. 713135446Strhodes CC="gcc" 714135446Strhodes AC_MSG_CHECKING(which NetBSD thread library to use) 715135446Strhodes 716135446Strhodes AC_ARG_WITH(ptl2, 717135446Strhodes[ --with-ptl2 on NetBSD, use the ptl2 thread library (experimental)], 718135446Strhodes use_ptl2="$withval", use_ptl2="no") 719135446Strhodes 720135446Strhodes : ${LOCALBASE:=/usr/pkg} 721135446Strhodes 722135446Strhodes if test "X$use_ptl2" = "Xyes" 723135446Strhodes then 724135446Strhodes AC_MSG_RESULT(PTL2) 725135446Strhodes AC_MSG_WARN( 726135446Strhodes[linking with PTL2 is highly experimental and not expected to work]) 727135446Strhodes CC=ptlgcc 728135446Strhodes else 729135446Strhodes if test -r /usr/lib/libpthread.so 730135446Strhodes then 731135446Strhodes AC_MSG_RESULT(native) 732135446Strhodes LIBS="-lpthread $LIBS" 733135446Strhodes else 734135446Strhodes if test ! -d $LOCALBASE/pthreads 735135446Strhodes then 736135446Strhodes AC_MSG_RESULT(none) 737135446Strhodes AC_MSG_ERROR("could not find thread libraries") 738135446Strhodes fi 739135446Strhodes 740135446Strhodes if $use_threads 741135446Strhodes then 742135446Strhodes AC_MSG_RESULT(mit-pthreads/unproven-pthreads) 743135446Strhodes pkg="$LOCALBASE/pthreads" 744135446Strhodes lib1="-L$pkg/lib -Wl,-R$pkg/lib" 745135446Strhodes lib2="-lpthread -lm -lgcc -lpthread" 746135446Strhodes LIBS="$lib1 $lib2 $LIBS" 747135446Strhodes CPPFLAGS="$CPPFLAGS -I$pkg/include" 748135446Strhodes STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include" 749135446Strhodes fi 750135446Strhodes fi 751135446Strhodes fi 752135446Strhodes ;; 753135446Strhodes *) 754135446Strhodes AC_CHECK_LIB(pthread, pthread_create,, 755135446Strhodes AC_CHECK_LIB(pthread, __pthread_create,, 756135446Strhodes AC_CHECK_LIB(pthread, __pthread_create_system,, 757135446Strhodes AC_CHECK_LIB(c_r, pthread_create,, 758135446Strhodes AC_CHECK_LIB(c, pthread_create,, 759135446Strhodes AC_MSG_ERROR("could not find thread libraries")))))) 760135446Strhodes ;; 761135446Strhodes esac 762135446Strhodesfi 763135446Strhodes 764135446Strhodesif $use_threads 765135446Strhodesthen 766135446Strhodes # 767135446Strhodes # We'd like to use sigwait() too 768135446Strhodes # 769135446Strhodes AC_CHECK_LIB(c, sigwait, 770135446Strhodes AC_DEFINE(HAVE_SIGWAIT), 771135446Strhodes AC_CHECK_LIB(pthread, sigwait, 772135446Strhodes AC_DEFINE(HAVE_SIGWAIT), 773135446Strhodes AC_CHECK_LIB(pthread, _Psigwait, 774135446Strhodes AC_DEFINE(HAVE_SIGWAIT),)) 775135446Strhodes ) 776135446Strhodes 777135446Strhodes AC_CHECK_FUNC(pthread_attr_getstacksize, 778135446Strhodes AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),) 779135446Strhodes 780135446Strhodes AC_CHECK_FUNC(pthread_attr_setstacksize, 781135446Strhodes AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACKSIZE),) 782135446Strhodes 783135446Strhodes # 784135446Strhodes # Additional OS-specific issues related to pthreads and sigwait. 785135446Strhodes # 786135446Strhodes case "$host" in 787135446Strhodes # 788135446Strhodes # One more place to look for sigwait. 789135446Strhodes # 790135446Strhodes *-freebsd*) 791135446Strhodes AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),) 792143731Sdougb case $host in 793143731Sdougb *-freebsd5.3|*-freebsd5.3.*) 794143731Sdougb AC_DEFINE(NEED_PTHREAD_SCOPE_SYSTEM) 795143731Sdougb ;; 796143731Sdougb esac 797135446Strhodes ;; 798135446Strhodes # 799135446Strhodes # BSDI 3.0 through 4.0.1 needs pthread_init() to be 800135446Strhodes # called before certain pthreads calls. This is deprecated 801135446Strhodes # in BSD/OS 4.1. 802135446Strhodes # 803135446Strhodes *-bsdi3.*|*-bsdi4.0*) 804135446Strhodes AC_DEFINE(NEED_PTHREAD_INIT) 805135446Strhodes ;; 806135446Strhodes # 807135446Strhodes # LinuxThreads requires some changes to the way we 808135446Strhodes # deal with signals. 809135446Strhodes # 810135446Strhodes *-linux*) 811135446Strhodes AC_DEFINE(HAVE_LINUXTHREADS) 812135446Strhodes ;; 813135446Strhodes # 814135446Strhodes # Ensure the right sigwait() semantics on Solaris and make 815135446Strhodes # sure we call pthread_setconcurrency. 816135446Strhodes # 817135446Strhodes *-solaris*) 818135446Strhodes AC_DEFINE(_POSIX_PTHREAD_SEMANTICS) 819135446Strhodes AC_CHECK_FUNC(pthread_setconcurrency, 820135446Strhodes AC_DEFINE(CALL_PTHREAD_SETCONCURRENCY)) 821135446Strhodes ;; 822135446Strhodes # 823135446Strhodes # UnixWare does things its own way. 824135446Strhodes # 825135446Strhodes *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*) 826135446Strhodes AC_DEFINE(HAVE_UNIXWARE_SIGWAIT) 827135446Strhodes ;; 828135446Strhodes esac 829135446Strhodes 830135446Strhodes # 831135446Strhodes # Look for sysconf to allow detection of the number of processors. 832135446Strhodes # 833135446Strhodes AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),) 834135446Strhodes 835135446Strhodes if test "X$GCC" = "Xyes"; then 836135446Strhodes case "$host" in 837135446Strhodes *-freebsd*) 838135446Strhodes CC="$CC -pthread" 839135446Strhodes CCOPT="$CCOPT -pthread" 840135446Strhodes STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" 841135446Strhodes ;; 842135446Strhodes *-openbsd*) 843135446Strhodes CC="$CC -pthread" 844135446Strhodes CCOPT="$CCOPT -pthread" 845135446Strhodes ;; 846135446Strhodes *-solaris*) 847135446Strhodes LIBS="$LIBS -lthread" 848135446Strhodes ;; 849135446Strhodes *-ibm-aix*) 850135446Strhodes STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" 851135446Strhodes ;; 852135446Strhodes esac 853135446Strhodes else 854135446Strhodes case $host in 855135446Strhodes *-dec-osf*) 856135446Strhodes CC="$CC -pthread" 857135446Strhodes CCOPT="$CCOPT -pthread" 858135446Strhodes ;; 859135446Strhodes *-solaris*) 860135446Strhodes CC="$CC -mt" 861135446Strhodes CCOPT="$CCOPT -mt" 862135446Strhodes ;; 863135446Strhodes *-ibm-aix*) 864135446Strhodes STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE" 865135446Strhodes ;; 866135446Strhodes *-sco-sysv*uw*|*-*-sysv*UnixWare*) 867135446Strhodes CC="$CC -Kthread" 868135446Strhodes CCOPT="$CCOPT -Kthread" 869135446Strhodes ;; 870135446Strhodes *-*-sysv*OpenUNIX*) 871135446Strhodes CC="$CC -Kpthread" 872135446Strhodes CCOPT="$CCOPT -Kpthread" 873135446Strhodes ;; 874135446Strhodes esac 875135446Strhodes fi 876135446Strhodes ALWAYS_DEFINES="-D_REENTRANT" 877135446Strhodes ISC_PLATFORM_USETHREADS="#define ISC_PLATFORM_USETHREADS 1" 878135446Strhodes thread_dir=pthreads 879135446Strhodeselse 880135446Strhodes ISC_PLATFORM_USETHREADS="#undef ISC_PLATFORM_USETHREADS" 881135446Strhodes thread_dir=nothreads 882135446Strhodes ALWAYS_DEFINES="" 883135446Strhodesfi 884135446Strhodes 885135446StrhodesAC_SUBST(ALWAYS_DEFINES) 886135446StrhodesAC_SUBST(ISC_PLATFORM_USETHREADS) 887135446Strhodes 888135446StrhodesISC_THREAD_DIR=$thread_dir 889135446StrhodesAC_SUBST(ISC_THREAD_DIR) 890135446Strhodes 891135446Strhodes# 892135446Strhodes# In solaris 10, SMF can manage named service 893135446Strhodes# 894135446StrhodesAC_CHECK_LIB(scf, smf_enable_instance) 895135446Strhodes 896135446Strhodes# 897135446Strhodes# flockfile is usually provided by pthreads, but we may want to use it 898135446Strhodes# even if compiled with --disable-threads. getc_unlocked might also not 899135446Strhodes# be defined. 900135446Strhodes# 901135446StrhodesAC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),) 902135446StrhodesAC_CHECK_FUNC(getc_unlocked, AC_DEFINE(HAVE_GETCUNLOCKED),) 903135446Strhodes 904135446Strhodes# 905135446Strhodes# Indicate what the final decision was regarding threads. 906135446Strhodes# 907135446StrhodesAC_MSG_CHECKING(whether to build with threads) 908135446Strhodesif $use_threads; then 909135446Strhodes AC_MSG_RESULT(yes) 910135446Strhodeselse 911135446Strhodes AC_MSG_RESULT(no) 912135446Strhodesfi 913135446Strhodes 914135446Strhodes# 915135446Strhodes# End of pthreads stuff. 916135446Strhodes# 917135446Strhodes 918135446Strhodes# 919135446Strhodes# Large File 920135446Strhodes# 921135446StrhodesAC_ARG_ENABLE(largefile, [ --enable-largefile 64-bit file support], 922135446Strhodes want_largefile="yes", want_largefile="no") 923135446Strhodescase $want_largefile in 924135446Strhodes yes) 925135446Strhodes ALWAYS_DEFINES="$ALWAYS_DEFINES -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" 926135446Strhodes ;; 927135446Strhodes *) 928135446Strhodes ;; 929135446Strhodesesac 930135446Strhodes 931135446Strhodes# 932135446Strhodes# Additional compiler settings. 933135446Strhodes# 934135446StrhodesMKDEPCC="$CC" 935135446StrhodesMKDEPCFLAGS="-M" 936135446StrhodesIRIX_DNSSEC_WARNINGS_HACK="" 937135446Strhodes 938135446Strhodesif test "X$GCC" = "Xyes"; then 939135446Strhodes STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat" 940143731Sdougb case "$host" in 941143731Sdougb *-hp-hpux*) 942143731Sdougb LDFLAGS="-Wl,+vnocompatwarnings $LDFALGS" 943143731Sdougb ;; 944143731Sdougb esac 945135446Strhodeselse 946135446Strhodes case $host in 947135446Strhodes *-dec-osf*) 948135446Strhodes CC="$CC -std" 949135446Strhodes CCOPT="$CCOPT -std" 950135446Strhodes MKDEPCC="$CC" 951135446Strhodes ;; 952135446Strhodes *-hp-hpux*) 953135446Strhodes CC="$CC -Ae -z" 954135446Strhodes # The version of the C compiler that constantly warns about 955135446Strhodes # 'const' as well as alignment issues is unfortunately not 956135446Strhodes # able to be discerned via the version of the operating 957135446Strhodes # system, nor does cc have a version flag. 958135446Strhodes case "`$CC +W 123 2>&1`" in 959135446Strhodes *Unknown?option*) 960135446Strhodes STD_CWARNINGS="+w1" 961135446Strhodes ;; 962135446Strhodes *) 963135446Strhodes # Turn off the pointlessly noisy warnings. 964135446Strhodes STD_CWARNINGS="+w1 +W 474,530" 965135446Strhodes ;; 966135446Strhodes esac 967135446Strhodes CCOPT="$CCOPT -Ae -z" 968143731Sdougb LDFLAGS="-Wl,+vnocompatwarnings $LDFALGS" 969135446Strhodes MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP' 970135446Strhodes ;; 971135446Strhodes *-sgi-irix*) 972135446Strhodes STD_CWARNINGS="-fullwarn -woff 1209" 973135446Strhodes # 974135446Strhodes # Silence more than 250 instances of 975135446Strhodes # "prototyped function redeclared without prototype" 976135446Strhodes # and 11 instances of 977135446Strhodes # "variable ... was set but never used" 978135446Strhodes # from lib/dns/sec/openssl. 979135446Strhodes # 980135446Strhodes IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552" 981135446Strhodes ;; 982135446Strhodes *-solaris*) 983135446Strhodes MKDEPCFLAGS="-xM" 984135446Strhodes ;; 985135446Strhodes *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*) 986135446Strhodes # UnixWare 987135446Strhodes CC="$CC -w" 988135446Strhodes ;; 989135446Strhodes esac 990135446Strhodesfi 991135446Strhodes 992135446StrhodesAC_SUBST(MKDEPCC) 993135446StrhodesAC_SUBST(MKDEPCFLAGS) 994135446StrhodesAC_SUBST(MKDEPPROG) 995135446StrhodesAC_SUBST(IRIX_DNSSEC_WARNINGS_HACK) 996135446Strhodes 997135446Strhodes# 998135446Strhodes# NLS 999135446Strhodes# 1000135446StrhodesAC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),) 1001135446Strhodes 1002135446Strhodes# 1003135446Strhodes# -lxnet buys us one big porting headache... standards, gotta love 'em. 1004135446Strhodes# 1005135446Strhodes# AC_CHECK_LIB(xnet, socket, , 1006135446Strhodes# AC_CHECK_LIB(socket, socket) 1007135446Strhodes# AC_CHECK_LIB(nsl, inet_ntoa) 1008135446Strhodes# ) 1009135446Strhodes# 1010135446Strhodes# Use this for now, instead: 1011135446Strhodes# 1012135446Strhodescase "$host" in 1013135446Strhodes mips-sgi-irix*) 1014135446Strhodes ;; 1015135446Strhodes *) 1016135446Strhodes AC_CHECK_LIB(socket, socket) 1017135446Strhodes AC_CHECK_LIB(nsl, inet_ntoa) 1018135446Strhodes ;; 1019135446Strhodesesac 1020135446Strhodes 1021135446Strhodes# 1022135446Strhodes# Purify support 1023135446Strhodes# 1024135446StrhodesAC_MSG_CHECKING(whether to use purify) 1025135446StrhodesAC_ARG_WITH(purify, 1026135446Strhodes [ --with-purify[=PATH] use Rational purify], 1027135446Strhodes use_purify="$withval", use_purify="no") 1028135446Strhodes 1029135446Strhodescase "$use_purify" in 1030135446Strhodes no) 1031135446Strhodes ;; 1032135446Strhodes yes) 1033135446Strhodes AC_PATH_PROG(purify_path, purify, purify) 1034135446Strhodes ;; 1035135446Strhodes *) 1036135446Strhodes purify_path="$use_purify" 1037135446Strhodes ;; 1038135446Strhodesesac 1039135446Strhodes 1040135446Strhodescase "$use_purify" in 1041135446Strhodes no) 1042135446Strhodes AC_MSG_RESULT(no) 1043135446Strhodes PURIFY="" 1044135446Strhodes ;; 1045135446Strhodes *) 1046135446Strhodes if test -f $purify_path || test $purify_path = purify; then 1047135446Strhodes AC_MSG_RESULT($purify_path) 1048135446Strhodes PURIFYFLAGS="`echo $PURIFYOPTIONS`" 1049135446Strhodes PURIFY="$purify_path $PURIFYFLAGS" 1050135446Strhodes else 1051135446Strhodes AC_MSG_ERROR([$purify_path not found. 1052135446Strhodes 1053135446StrhodesPlease choose the proper path with the following command: 1054135446Strhodes 1055135446Strhodes configure --with-purify=PATH 1056135446Strhodes]) 1057135446Strhodes fi 1058135446Strhodes ;; 1059135446Strhodesesac 1060135446Strhodes 1061135446StrhodesAC_SUBST(PURIFY) 1062135446Strhodes 1063135446Strhodes# 1064135446Strhodes# GNU libtool support 1065135446Strhodes# 1066135446StrhodesAC_ARG_WITH(libtool, 1067135446Strhodes [ --with-libtool use GNU libtool (following indented options supported)], 1068135446Strhodes use_libtool="$withval", use_libtool="no") 1069135446Strhodes 1070135446Strhodescase $use_libtool in 1071135446Strhodes yes) 1072135446Strhodes AM_PROG_LIBTOOL 1073135446Strhodes O=lo 1074135446Strhodes A=la 1075135446Strhodes LIBTOOL_MKDEP_SED='s;\.o;\.lo;' 1076135446Strhodes LIBTOOL_MODE_COMPILE='--mode=compile' 1077135446Strhodes LIBTOOL_MODE_INSTALL='--mode=install' 1078135446Strhodes LIBTOOL_MODE_LINK='--mode=link' 1079143731Sdougb case "$host" in 1080143731Sdougb *) LIBTOOL_ALLOW_UNDEFINED= ;; 1081143731Sdougb esac 1082143731Sdougb case "$host" in 1083143731Sdougb *-ibm-aix*) LIBTOOL_IN_MAIN="-Wl,-bI:T_testlist.imp" ;; 1084143731Sdougb *) LIBTOOL_IN_MAIN= ;; 1085143731Sdougb esac; 1086135446Strhodes ;; 1087135446Strhodes *) 1088135446Strhodes O=o 1089135446Strhodes A=a 1090135446Strhodes LIBTOOL= 1091135446Strhodes AC_SUBST(LIBTOOL) 1092135446Strhodes LIBTOOL_MKDEP_SED= 1093135446Strhodes LIBTOOL_MODE_COMPILE= 1094135446Strhodes LIBTOOL_MODE_INSTALL= 1095135446Strhodes LIBTOOL_MODE_LINK= 1096143731Sdougb LIBTOOL_ALLOW_UNDEFINED= 1097143731Sdougb LIBTOOL_IN_MAIN= 1098135446Strhodes ;; 1099135446Strhodesesac 1100135446Strhodes 1101135446Strhodes# 1102135446Strhodes# File name extension for static archive files, for those few places 1103135446Strhodes# where they are treated differently from dynamic ones. 1104135446Strhodes# 1105135446StrhodesSA=a 1106135446Strhodes 1107135446StrhodesAC_SUBST(O) 1108135446StrhodesAC_SUBST(A) 1109135446StrhodesAC_SUBST(SA) 1110135446StrhodesAC_SUBST(LIBTOOL_MKDEP_SED) 1111135446StrhodesAC_SUBST(LIBTOOL_MODE_COMPILE) 1112135446StrhodesAC_SUBST(LIBTOOL_MODE_INSTALL) 1113135446StrhodesAC_SUBST(LIBTOOL_MODE_LINK) 1114143731SdougbAC_SUBST(LIBTOOL_ALLOW_UNDEFINED) 1115143731SdougbAC_SUBST(LIBTOOL_IN_MAIN) 1116135446Strhodes 1117135446Strhodes# 1118135446Strhodes# build libbind? 1119135446Strhodes# 1120135446StrhodesAC_ARG_ENABLE(libbind, 1121135446Strhodes [ --enable-libbind build libbind [default=no]]) 1122135446Strhodes 1123135446Strhodescase "$enable_libbind" in 1124135446Strhodes yes) 1125135446Strhodes LIBBIND=lib/bind 1126135446Strhodes AC_SUBST(LIBBIND) 1127135446Strhodes ;; 1128135446Strhodes no|'') 1129135446Strhodes ;; 1130135446Strhodesesac 1131135446Strhodes 1132135446Strhodes# 1133135446Strhodes# Here begins a very long section to determine the system's networking 1134135446Strhodes# capabilities. The order of the tests is signficant. 1135135446Strhodes# 1136135446Strhodes 1137135446Strhodes# 1138135446Strhodes# IPv6 1139135446Strhodes# 1140135446StrhodesAC_ARG_ENABLE(ipv6, 1141135446Strhodes [ --enable-ipv6 use IPv6 [default=autodetect]]) 1142135446Strhodes 1143135446Strhodescase "$enable_ipv6" in 1144135446Strhodes yes|''|autodetect) 1145135446Strhodes AC_DEFINE(WANT_IPV6) 1146135446Strhodes ;; 1147135446Strhodes no) 1148135446Strhodes ;; 1149135446Strhodesesac 1150135446Strhodes 1151135446Strhodes# 1152135446Strhodes# We do the IPv6 compilation checking after libtool so that we can put 1153135446Strhodes# the right suffix on the files. 1154135446Strhodes# 1155135446StrhodesAC_MSG_CHECKING(for IPv6 structures) 1156135446StrhodesAC_TRY_COMPILE([ 1157135446Strhodes#include <sys/types.h> 1158135446Strhodes#include <sys/socket.h> 1159135446Strhodes#include <netinet/in.h>], 1160135446Strhodes[struct sockaddr_in6 sin6; return (0);], 1161135446Strhodes [AC_MSG_RESULT(yes) 1162135446Strhodes found_ipv6=yes], 1163135446Strhodes [AC_MSG_RESULT(no) 1164135446Strhodes found_ipv6=no]) 1165135446Strhodes 1166135446Strhodes# 1167135446Strhodes# See whether IPv6 support is provided via a Kame add-on. 1168135446Strhodes# This is done before other IPv6 linking tests to LIBS is properly set. 1169135446Strhodes# 1170135446StrhodesAC_MSG_CHECKING(for Kame IPv6 support) 1171135446StrhodesAC_ARG_WITH(kame, 1172135446Strhodes [ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]], 1173135446Strhodes use_kame="$withval", use_kame="no") 1174135446Strhodes 1175135446Strhodescase "$use_kame" in 1176135446Strhodes no) 1177135446Strhodes ;; 1178135446Strhodes yes) 1179135446Strhodes kame_path=/usr/local/v6 1180135446Strhodes ;; 1181135446Strhodes *) 1182135446Strhodes kame_path="$use_kame" 1183135446Strhodes ;; 1184135446Strhodesesac 1185135446Strhodes 1186135446Strhodescase "$use_kame" in 1187135446Strhodes no) 1188135446Strhodes AC_MSG_RESULT(no) 1189135446Strhodes ;; 1190135446Strhodes *) 1191135446Strhodes if test -f $kame_path/lib/libinet6.a; then 1192135446Strhodes AC_MSG_RESULT($kame_path/lib/libinet6.a) 1193135446Strhodes LIBS="-L$kame_path/lib -linet6 $LIBS" 1194135446Strhodes else 1195135446Strhodes AC_MSG_ERROR([$kame_path/lib/libinet6.a not found. 1196135446Strhodes 1197135446StrhodesPlease choose the proper path with the following command: 1198135446Strhodes 1199135446Strhodes configure --with-kame=PATH 1200135446Strhodes]) 1201135446Strhodes fi 1202135446Strhodes ;; 1203135446Strhodesesac 1204135446Strhodes 1205135446Strhodes# 1206135446Strhodes# Whether netinet6/in6.h is needed has to be defined in isc/platform.h. 1207135446Strhodes# Including it on Kame-using platforms is very bad, though, because 1208135446Strhodes# Kame uses #error against direct inclusion. So include it on only 1209135446Strhodes# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1. 1210135446Strhodes# This is done before the in6_pktinfo check because that's what 1211135446Strhodes# netinet6/in6.h is needed for. 1212135446Strhodes# 1213135446Strhodeschangequote({, }) 1214135446Strhodescase "$host" in 1215135446Strhodes*-bsdi4.[01]*) 1216135446Strhodes ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1" 1217135446Strhodes LWRES_PLATFORM_NEEDNETINET6IN6H="#define LWRES_PLATFORM_NEEDNETINET6IN6H 1" 1218135446Strhodes isc_netinet6in6_hack="#include <netinet6/in6.h>" 1219135446Strhodes ;; 1220135446Strhodes*) 1221135446Strhodes ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H" 1222135446Strhodes LWRES_PLATFORM_NEEDNETINET6IN6H="#undef LWRES_PLATFORM_NEEDNETINET6IN6H" 1223135446Strhodes isc_netinet6in6_hack="" 1224135446Strhodes ;; 1225135446Strhodesesac 1226135446Strhodeschangequote([, ]) 1227135446Strhodes 1228135446Strhodes# 1229135446Strhodes# This is similar to the netinet6/in6.h issue. 1230135446Strhodes# 1231135446Strhodescase "$host" in 1232135446Strhodes*-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*) 1233135446Strhodes # UnixWare 1234135446Strhodes ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1" 1235135446Strhodes LWRES_PLATFORM_NEEDNETINETIN6H="#define LWRES_PLATFORM_NEEDNETINETIN6H 1" 1236135446Strhodes ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1" 1237135446Strhodes isc_netinetin6_hack="#include <netinet/in6.h>" 1238135446Strhodes ;; 1239135446Strhodes*) 1240135446Strhodes ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H" 1241135446Strhodes LWRES_PLATFORM_NEEDNETINETIN6H="#undef LWRES_PLATFORM_NEEDNETINETIN6H" 1242135446Strhodes ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR" 1243135446Strhodes isc_netinetin6_hack="" 1244135446Strhodes ;; 1245135446Strhodesesac 1246135446Strhodes 1247135446Strhodes# 1248135446Strhodes# Now delve deeper into the suitability of the IPv6 support. 1249135446Strhodes# 1250135446Strhodescase "$found_ipv6" in 1251135446Strhodes yes) 1252135446Strhodes ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1" 1253135446Strhodes LWRES_PLATFORM_HAVEIPV6="#define LWRES_PLATFORM_HAVEIPV6 1" 1254135446Strhodes 1255135446Strhodes AC_MSG_CHECKING(for in6_addr) 1256135446Strhodes AC_TRY_COMPILE([ 1257135446Strhodes#include <sys/types.h> 1258135446Strhodes#include <sys/socket.h> 1259135446Strhodes#include <netinet/in.h> 1260135446Strhodes$isc_netinetin6_hack 1261135446Strhodes$isc_netinet6in6_hack 1262135446Strhodes], 1263135446Strhodes[struct in6_addr in6; return (0);], 1264135446Strhodes [AC_MSG_RESULT(yes) 1265135446Strhodes ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6" 1266135446Strhodes LWRES_PLATFORM_HAVEINADDR6="#undef LWRES_PLATFORM_HAVEINADDR6" 1267135446Strhodes isc_in_addr6_hack=""], 1268135446Strhodes [AC_MSG_RESULT(no) 1269135446Strhodes ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1" 1270135446Strhodes LWRES_PLATFORM_HAVEINADDR6="#define LWRES_PLATFORM_HAVEINADDR6 1" 1271135446Strhodes isc_in_addr6_hack="#define in6_addr in_addr6"]) 1272135446Strhodes 1273135446Strhodes AC_MSG_CHECKING(for in6addr_any) 1274135446Strhodes AC_TRY_LINK([ 1275135446Strhodes#include <sys/types.h> 1276135446Strhodes#include <sys/socket.h> 1277135446Strhodes#include <netinet/in.h> 1278135446Strhodes$isc_netinetin6_hack 1279135446Strhodes$isc_netinet6in6_hack 1280135446Strhodes$isc_in_addr6_hack 1281135446Strhodes], 1282135446Strhodes [struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);], 1283135446Strhodes [AC_MSG_RESULT(yes) 1284135446Strhodes ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY" 1285135446Strhodes LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"], 1286135446Strhodes [AC_MSG_RESULT(no) 1287135446Strhodes ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1" 1288135446Strhodes LWRES_PLATFORM_NEEDIN6ADDRANY="#define LWRES_PLATFORM_NEEDIN6ADDRANY 1"]) 1289135446Strhodes 1290135446Strhodes AC_MSG_CHECKING(for in6addr_loopback) 1291135446Strhodes AC_TRY_LINK([ 1292135446Strhodes#include <sys/types.h> 1293135446Strhodes#include <sys/socket.h> 1294135446Strhodes#include <netinet/in.h> 1295135446Strhodes$isc_netinetin6_hack 1296135446Strhodes$isc_netinet6in6_hack 1297135446Strhodes$isc_in_addr6_hack 1298135446Strhodes], 1299135446Strhodes [struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);], 1300135446Strhodes [AC_MSG_RESULT(yes) 1301135446Strhodes ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK" 1302135446Strhodes LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK"], 1303135446Strhodes [AC_MSG_RESULT(no) 1304135446Strhodes ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1" 1305135446Strhodes LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#define LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK 1"]) 1306135446Strhodes 1307135446Strhodes AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6) 1308135446Strhodes AC_TRY_COMPILE([ 1309135446Strhodes#include <sys/types.h> 1310135446Strhodes#include <sys/socket.h> 1311135446Strhodes#include <netinet/in.h> 1312135446Strhodes$isc_netinetin6_hack 1313135446Strhodes$isc_netinet6in6_hack 1314135446Strhodes], 1315135446Strhodes [struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);], 1316135446Strhodes [AC_MSG_RESULT(yes) 1317135446Strhodes ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1" 1318135446Strhodes result="#define LWRES_HAVE_SIN6_SCOPE_ID 1"], 1319135446Strhodes [AC_MSG_RESULT(no) 1320135446Strhodes ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID" 1321135446Strhodes result="#undef LWRES_HAVE_SIN6_SCOPE_ID"]) 1322135446Strhodes LWRES_HAVE_SIN6_SCOPE_ID="$result" 1323135446Strhodes 1324135446Strhodes AC_MSG_CHECKING(for in6_pktinfo) 1325135446Strhodes AC_TRY_COMPILE([ 1326135446Strhodes#include <sys/types.h> 1327135446Strhodes#include <sys/socket.h> 1328135446Strhodes#include <netinet/in.h> 1329135446Strhodes$isc_netinetin6_hack 1330135446Strhodes$isc_netinet6in6_hack 1331135446Strhodes], 1332135446Strhodes [struct in6_pktinfo xyzzy; return (0);], 1333135446Strhodes [AC_MSG_RESULT(yes) 1334135446Strhodes ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"], 1335135446Strhodes [AC_MSG_RESULT(no -- disabling runtime ipv6 support) 1336135446Strhodes ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"]) 1337135446Strhodes ;; 1338135446Strhodes no) 1339135446Strhodes ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6" 1340135446Strhodes LWRES_PLATFORM_HAVEIPV6="#undef LWRES_PLATFORM_HAVEIPV6" 1341135446Strhodes ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY" 1342135446Strhodes LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY" 1343135446Strhodes ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO" 1344135446Strhodes LWRES_HAVE_SIN6_SCOPE_ID="#define LWRES_HAVE_SIN6_SCOPE_ID 1" 1345135446Strhodes ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1" 1346135446Strhodes ISC_IPV6_H="ipv6.h" 1347135446Strhodes ISC_IPV6_O="ipv6.$O" 1348135446Strhodes ISC_ISCIPV6_O="unix/ipv6.$O" 1349135446Strhodes ISC_IPV6_C="ipv6.c" 1350135446Strhodes ;; 1351135446Strhodesesac 1352135446Strhodes 1353135446StrhodesAC_SUBST(ISC_PLATFORM_HAVEIPV6) 1354135446StrhodesAC_SUBST(LWRES_PLATFORM_HAVEIPV6) 1355135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H) 1356135446StrhodesAC_SUBST(LWRES_PLATFORM_NEEDNETINETIN6H) 1357135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H) 1358135446StrhodesAC_SUBST(LWRES_PLATFORM_NEEDNETINET6IN6H) 1359135446StrhodesAC_SUBST(ISC_PLATFORM_HAVEINADDR6) 1360135446StrhodesAC_SUBST(LWRES_PLATFORM_HAVEINADDR6) 1361135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY) 1362135446StrhodesAC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRANY) 1363135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK) 1364135446StrhodesAC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK) 1365135446StrhodesAC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO) 1366135446StrhodesAC_SUBST(ISC_PLATFORM_FIXIN6ISADDR) 1367135446StrhodesAC_SUBST(ISC_IPV6_H) 1368135446StrhodesAC_SUBST(ISC_IPV6_O) 1369135446StrhodesAC_SUBST(ISC_ISCIPV6_O) 1370135446StrhodesAC_SUBST(ISC_IPV6_C) 1371135446StrhodesAC_SUBST(LWRES_HAVE_SIN6_SCOPE_ID) 1372135446StrhodesAC_SUBST(ISC_PLATFORM_HAVESCOPEID) 1373135446Strhodes 1374135446StrhodesAC_MSG_CHECKING([for struct if_laddrreq]) 1375135446StrhodesAC_TRY_LINK([ 1376135446Strhodes#include <sys/types.h> 1377135446Strhodes#include <net/if6.h> 1378135446Strhodes],[ struct if_laddrreq a; ], 1379135446Strhodes [AC_MSG_RESULT(yes) 1380135446Strhodes ISC_PLATFORM_HAVEIF_LADDRREQ="#define ISC_PLATFORM_HAVEIF_LADDRREQ 1"], 1381135446Strhodes [AC_MSG_RESULT(no) 1382135446Strhodes ISC_PLATFORM_HAVEIF_LADDRREQ="#undef ISC_PLATFORM_HAVEIF_LADDRREQ"]) 1383135446StrhodesAC_SUBST(ISC_PLATFORM_HAVEIF_LADDRREQ) 1384135446Strhodes 1385135446StrhodesAC_MSG_CHECKING([for struct if_laddrconf]) 1386135446StrhodesAC_TRY_LINK([ 1387135446Strhodes#include <sys/types.h> 1388135446Strhodes#include <net/if6.h> 1389135446Strhodes],[ struct if_laddrconf a; ], 1390135446Strhodes [AC_MSG_RESULT(yes) 1391135446Strhodes ISC_PLATFORM_HAVEIF_LADDRCONF="#define ISC_PLATFORM_HAVEIF_LADDRCONF 1"], 1392135446Strhodes [AC_MSG_RESULT(no) 1393135446Strhodes ISC_PLATFORM_HAVEIF_LADDRCONF="#undef ISC_PLATFORM_HAVEIF_LADDRCONF"]) 1394135446StrhodesAC_SUBST(ISC_PLATFORM_HAVEIF_LADDRCONF) 1395135446Strhodes 1396135446Strhodes# 1397135446Strhodes# Check for network functions that are often missing. We do this 1398135446Strhodes# after the libtool checking, so we can put the right suffix on 1399135446Strhodes# the files. It also needs to come after checking for a Kame add-on, 1400135446Strhodes# which provides some (all?) of the desired functions. 1401135446Strhodes# 1402135446Strhodes 1403135446StrhodesAC_MSG_CHECKING([for inet_ntop with IPv6 support]) 1404135446StrhodesAC_TRY_RUN([ 1405135446Strhodes#include <sys/types.h> 1406135446Strhodes#include <sys/socket.h> 1407135446Strhodes#include <netinet/in.h> 1408135446Strhodes#include <arpa/inet.h> 1409135446Strhodesmain() { 1410135446Strhodeschar a[16],b[64]; return(inet_ntop(AF_INET6, a, b, sizeof(b)) == (char*)0);}], 1411135446Strhodes [AC_MSG_RESULT(yes) 1412135446Strhodes ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"], 1413135446Strhodes 1414135446Strhodes [AC_MSG_RESULT(no) 1415135446Strhodes ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O" 1416135446Strhodes ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c" 1417135446Strhodes ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"]) 1418135446Strhodes 1419135446Strhodes 1420135446Strhodes# On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts 1421135446Strhodes# addresses with less than four octets, like "1.2.3". Also leading 1422135446Strhodes# zeros should also be rejected. 1423135446Strhodes 1424135446StrhodesAC_MSG_CHECKING([for working inet_pton with IPv6 support]) 1425135446StrhodesAC_TRY_RUN([ 1426135446Strhodes#include <sys/types.h> 1427135446Strhodes#include <sys/socket.h> 1428135446Strhodes#include <netinet/in.h> 1429135446Strhodes#include <arpa/inet.h> 1430135446Strhodesmain() { char a[16]; return (inet_pton(AF_INET, "1.2.3", a) == 1 ? 1 : 1431135446Strhodes inet_pton(AF_INET, "1.2.3.04", a) == 1 ? 1 : 1432135446Strhodes (inet_pton(AF_INET6, "::1.2.3.4", a) != 1)); }], 1433135446Strhodes [AC_MSG_RESULT(yes) 1434135446Strhodes ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"], 1435135446Strhodes [AC_MSG_RESULT(no) 1436135446Strhodes ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O" 1437135446Strhodes ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c" 1438135446Strhodes ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"], 1439135446Strhodes [AC_MSG_RESULT(assuming target platform has working inet_pton) 1440135446Strhodes ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"]) 1441135446Strhodes 1442135446StrhodesAC_MSG_CHECKING([for inet_aton]) 1443135446StrhodesAC_TRY_LINK([ 1444135446Strhodes#include <sys/types.h> 1445135446Strhodes#include <netinet/in.h> 1446135446Strhodes#include <arpa/inet.h>], 1447135446Strhodes [struct in_addr in; inet_aton(0, &in); return (0);], 1448135446Strhodes [AC_MSG_RESULT(yes) 1449135446Strhodes ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON"], 1450135446Strhodes 1451135446Strhodes [AC_MSG_RESULT(no) 1452135446Strhodes ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O" 1453135446Strhodes ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c" 1454135446Strhodes ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1"]) 1455135446Strhodes 1456135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDNTOP) 1457135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDPTON) 1458135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDATON) 1459135446Strhodes 1460135446Strhodes# 1461135446Strhodes# Look for a 4.4BSD-style sa_len member in struct sockaddr. 1462135446Strhodes# 1463135446Strhodescase "$host" in 1464135446Strhodes *-dec-osf*) 1465135446Strhodes # Turn on 4.4BSD style sa_len support. 1466135446Strhodes AC_DEFINE(_SOCKADDR_LEN) 1467135446Strhodes ;; 1468135446Strhodesesac 1469135446Strhodes 1470135446StrhodesAC_MSG_CHECKING(for sa_len in struct sockaddr) 1471135446StrhodesAC_TRY_COMPILE([ 1472135446Strhodes#include <sys/types.h> 1473135446Strhodes#include <sys/socket.h>], 1474135446Strhodes[struct sockaddr sa; sa.sa_len = 0; return (0);], 1475135446Strhodes [AC_MSG_RESULT(yes) 1476135446Strhodes ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1" 1477135446Strhodes LWRES_PLATFORM_HAVESALEN="#define LWRES_PLATFORM_HAVESALEN 1"], 1478135446Strhodes [AC_MSG_RESULT(no) 1479135446Strhodes ISC_PLATFORM_HAVESALEN="#undef ISC_PLATFORM_HAVESALEN" 1480135446Strhodes LWRES_PLATFORM_HAVESALEN="#undef LWRES_PLATFORM_HAVESALEN"]) 1481135446StrhodesAC_SUBST(ISC_PLATFORM_HAVESALEN) 1482135446StrhodesAC_SUBST(LWRES_PLATFORM_HAVESALEN) 1483135446Strhodes 1484135446Strhodes# 1485135446Strhodes# Look for a 4.4BSD or 4.3BSD struct msghdr 1486135446Strhodes# 1487135446StrhodesAC_MSG_CHECKING(for struct msghdr flavor) 1488135446StrhodesAC_TRY_COMPILE([ 1489135446Strhodes#include <sys/types.h> 1490135446Strhodes#include <sys/socket.h>], 1491135446Strhodes[struct msghdr msg; msg.msg_flags = 0; return (0);], 1492135446Strhodes [AC_MSG_RESULT(4.4BSD) 1493135446Strhodes ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"], 1494135446Strhodes [AC_MSG_RESULT(4.3BSD) 1495135446Strhodes ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"]) 1496135446StrhodesAC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR) 1497135446Strhodes 1498135446Strhodes# 1499135446Strhodes# Look for in_port_t. 1500135446Strhodes# 1501135446StrhodesAC_MSG_CHECKING(for type in_port_t) 1502135446StrhodesAC_TRY_COMPILE([ 1503135446Strhodes#include <sys/types.h> 1504135446Strhodes#include <netinet/in.h>], 1505135446Strhodes[in_port_t port = 25; return (0);], 1506135446Strhodes [AC_MSG_RESULT(yes) 1507135446Strhodes ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"], 1508135446Strhodes [AC_MSG_RESULT(no) 1509135446Strhodes ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"]) 1510135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDPORTT) 1511135446Strhodes 1512135446Strhodes# 1513135446Strhodes# Check for addrinfo 1514135446Strhodes# 1515135446StrhodesAC_MSG_CHECKING(for struct addrinfo) 1516135446StrhodesAC_TRY_COMPILE([ 1517135446Strhodes#include <netdb.h>], 1518135446Strhodes[struct addrinfo a; return (0);], 1519135446Strhodes [AC_MSG_RESULT(yes) 1520135446Strhodes ISC_LWRES_NEEDADDRINFO="#undef ISC_LWRES_NEEDADDRINFO" 1521135446Strhodes AC_DEFINE(HAVE_ADDRINFO)], 1522135446Strhodes [AC_MSG_RESULT(no) 1523135446Strhodes ISC_LWRES_NEEDADDRINFO="#define ISC_LWRES_NEEDADDRINFO 1"]) 1524135446StrhodesAC_SUBST(ISC_LWRES_NEEDADDRINFO) 1525135446Strhodes 1526135446Strhodes# 1527135446Strhodes# Check for rrsetinfo 1528135446Strhodes# 1529135446StrhodesAC_MSG_CHECKING(for struct rrsetinfo) 1530135446StrhodesAC_TRY_COMPILE([ 1531135446Strhodes#include <netdb.h>], 1532135446Strhodes[struct rrsetinfo r; return (0);], 1533135446Strhodes [AC_MSG_RESULT(yes) 1534135446Strhodes ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO"], 1535135446Strhodes [AC_MSG_RESULT(no) 1536135446Strhodes ISC_LWRES_NEEDRRSETINFO="#define ISC_LWRES_NEEDRRSETINFO 1"]) 1537135446StrhodesAC_SUBST(ISC_LWRES_NEEDRRSETINFO) 1538135446Strhodes 1539135446StrhodesAC_MSG_CHECKING(for int sethostent) 1540135446StrhodesAC_TRY_COMPILE([ 1541135446Strhodes#include <netdb.h>], 1542135446Strhodes[int i = sethostent(0); return(0);], 1543135446Strhodes [AC_MSG_RESULT(yes) 1544135446Strhodes ISC_LWRES_SETHOSTENTINT="#define ISC_LWRES_SETHOSTENTINT 1"], 1545135446Strhodes [AC_MSG_RESULT(no) 1546135446Strhodes ISC_LWRES_SETHOSTENTINT="#undef ISC_LWRES_SETHOSTENTINT"]) 1547135446StrhodesAC_SUBST(ISC_LWRES_SETHOSTENTINT) 1548135446Strhodes 1549135446StrhodesAC_MSG_CHECKING(for int endhostent) 1550135446StrhodesAC_TRY_COMPILE([ 1551135446Strhodes#include <netdb.h>], 1552135446Strhodes[int i = endhostent(); return(0);], 1553135446Strhodes [AC_MSG_RESULT(yes) 1554135446Strhodes ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"], 1555135446Strhodes [AC_MSG_RESULT(no) 1556135446Strhodes ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"]) 1557135446StrhodesAC_SUBST(ISC_LWRES_ENDHOSTENTINT) 1558135446Strhodes 1559135446StrhodesAC_MSG_CHECKING(for getnetbyaddr(in_addr_t, ...)) 1560135446StrhodesAC_TRY_COMPILE([ 1561135446Strhodes#include <netdb.h> 1562135446Strhodesstruct netent *getnetbyaddr(in_addr_t, int);], 1563135446Strhodes[], 1564135446Strhodes [AC_MSG_RESULT(yes) 1565135446Strhodes ISC_LWRES_GETNETBYADDRINADDR="#define ISC_LWRES_GETNETBYADDRINADDR 1"], 1566135446Strhodes [AC_MSG_RESULT(no) 1567135446Strhodes ISC_LWRES_GETNETBYADDRINADDR="#undef ISC_LWRES_GETNETBYADDRINADDR"]) 1568135446StrhodesAC_SUBST(ISC_LWRES_GETNETBYADDRINADDR) 1569135446Strhodes 1570135446StrhodesAC_MSG_CHECKING(for int setnetent) 1571135446StrhodesAC_TRY_COMPILE([ 1572135446Strhodes#include <netdb.h>], 1573135446Strhodes[int i = setnetent(0); return(0);], 1574135446Strhodes [AC_MSG_RESULT(yes) 1575135446Strhodes ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"], 1576135446Strhodes [AC_MSG_RESULT(no) 1577135446Strhodes ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"]) 1578135446StrhodesAC_SUBST(ISC_LWRES_SETNETENTINT) 1579135446Strhodes 1580135446StrhodesAC_MSG_CHECKING(for int endnetent) 1581135446StrhodesAC_TRY_COMPILE([ 1582135446Strhodes#include <netdb.h>], 1583135446Strhodes[int i = endnetent(); return(0);], 1584135446Strhodes [AC_MSG_RESULT(yes) 1585135446Strhodes ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"], 1586135446Strhodes [AC_MSG_RESULT(no) 1587135446Strhodes ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"]) 1588135446StrhodesAC_SUBST(ISC_LWRES_ENDNETENTINT) 1589135446Strhodes 1590135446StrhodesAC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...)) 1591135446StrhodesAC_TRY_COMPILE([ 1592135446Strhodes#include <netdb.h> 1593135446Strhodesstruct hostent *gethostbyaddr(const void *, size_t, int);], 1594135446Strhodes[return(0);], 1595135446Strhodes [AC_MSG_RESULT(yes) 1596135446Strhodes ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"], 1597135446Strhodes [AC_MSG_RESULT(no) 1598135446Strhodes ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"]) 1599135446StrhodesAC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID) 1600135446Strhodes 1601135446StrhodesAC_MSG_CHECKING(for h_errno in netdb.h) 1602135446StrhodesAC_TRY_COMPILE([ 1603135446Strhodes#include <netdb.h>], 1604135446Strhodes[h_errno = 1; return(0);], 1605135446Strhodes [AC_MSG_RESULT(yes) 1606135446Strhodes ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"], 1607135446Strhodes [AC_MSG_RESULT(no) 1608135446Strhodes ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1"]) 1609135446StrhodesAC_SUBST(ISC_LWRES_NEEDHERRNO) 1610135446Strhodes 1611135446StrhodesAC_CHECK_FUNC(getipnodebyname, 1612135446Strhodes [ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"], 1613135446Strhodes [ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"]) 1614135446StrhodesAC_CHECK_FUNC(getnameinfo, 1615135446Strhodes [ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"], 1616135446Strhodes [ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"]) 1617135446StrhodesAC_CHECK_FUNC(getaddrinfo, 1618135446Strhodes [ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO" 1619135446Strhodes AC_DEFINE(HAVE_GETADDRINFO)], 1620135446Strhodes [ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"]) 1621135446StrhodesAC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR)) 1622135446StrhodesAC_SUBST(ISC_LWRES_GETIPNODEPROTO) 1623135446StrhodesAC_SUBST(ISC_LWRES_GETADDRINFOPROTO) 1624135446StrhodesAC_SUBST(ISC_LWRES_GETNAMEINFOPROTO) 1625135446Strhodes 1626135446StrhodesAC_ARG_ENABLE(getifaddrs, 1627135446Strhodes[ --enable-getifaddrs Enable the use of getifaddrs() [[yes|no|glibc]]. 1628135446Strhodes glibc: Use getifaddrs() in glibc if you know it supports IPv6.], 1629135446Strhodes want_getifaddrs="$enableval", want_getifaddrs="yes") 1630135446Strhodes 1631135446Strhodescase $want_getifaddrs in 1632135446Strhodesyes|glibc) 1633135446Strhodes# 1634135446Strhodes# Do we have getifaddrs() ? 1635135446Strhodes# 1636135446Strhodescase $host in 1637135446Strhodes*-linux*) 1638135446Strhodes # Some recent versions of glibc support getifaddrs() which does not 1639135446Strhodes # provide AF_INET6 addresses while the function provided by the USAGI 1640135446Strhodes # project handles the AF_INET6 case correctly. We need to avoid 1641135446Strhodes # using the former but prefer the latter unless overridden by 1642135446Strhodes # --enable-getifaddrs=glibc. 1643143731Sdougb if test $want_getifaddrs = glibc 1644135446Strhodes then 1645135446Strhodes AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS)) 1646135446Strhodes else 1647135446Strhodes save_LIBS="$LIBS" 1648135446Strhodes LIBS="-L/usr/local/v6/lib $LIBS" 1649135446Strhodes AC_CHECK_LIB(inet6, getifaddrs, 1650135446Strhodes LIBS="$LIBS -linet6" 1651135446Strhodes AC_DEFINE(HAVE_GETIFADDRS), 1652135446Strhodes LIBS=${save_LIBS}) 1653135446Strhodes fi 1654135446Strhodes ;; 1655135446Strhodes*) 1656135446Strhodes AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS)) 1657135446Strhodes ;; 1658135446Strhodesesac 1659135446Strhodes;; 1660135446Strhodesno) 1661135446Strhodes;; 1662135446Strhodesesac 1663135446Strhodes 1664135446Strhodes# 1665135446Strhodes# Look for a sysctl call to get the list of network interfaces. 1666135446Strhodes# 1667135446Strhodescase $ac_cv_header_sys_sysctl_h in 1668135446Strhodesyes) 1669135446StrhodesAC_MSG_CHECKING(for interface list sysctl) 1670135446StrhodesAC_EGREP_CPP(found_rt_iflist, [ 1671135446Strhodes#include <sys/param.h> 1672135446Strhodes#include <sys/sysctl.h> 1673135446Strhodes#include <sys/socket.h> 1674135446Strhodes#ifdef NET_RT_IFLIST 1675135446Strhodesfound_rt_iflist 1676135446Strhodes#endif 1677135446Strhodes], 1678135446Strhodes [AC_MSG_RESULT(yes) 1679135446Strhodes AC_DEFINE(HAVE_IFLIST_SYSCTL)], 1680135446Strhodes [AC_MSG_RESULT(no)]) 1681135446Strhodes;; 1682135446Strhodesesac 1683135446Strhodes 1684135446Strhodes# 1685135446Strhodes# Check for some other useful functions that are not ever-present. 1686135446Strhodes# 1687135446Strhodes 1688135446Strhodes# We test for strsep() using AC_TRY_LINK instead of AC_CHECK_FUNC 1689135446Strhodes# because AIX 4.3.3 with patches for bos.adt.include to version 4.3.3.77 1690135446Strhodes# reportedly defines strsep() without declaring it in <string.h> when 1691135446Strhodes# -D_LINUX_SOURCE_COMPAT is not defined [RT #2190], and 1692135446Strhodes# AC_CHECK_FUNC() incorrectly succeeds because it declares 1693135446Strhodes# the function itself. 1694135446StrhodesAC_MSG_CHECKING(for correctly declared strsep()) 1695135446StrhodesAC_TRY_LINK([#include <string.h>], [char *sp; char *foo = strsep(&sp, ".");], 1696135446Strhodes [AC_MSG_RESULT(yes); ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"], 1697135446Strhodes [AC_MSG_RESULT(no); ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"]) 1698135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDSTRSEP) 1699135446Strhodes 1700135446StrhodesAC_CHECK_FUNC(memmove, 1701135446Strhodes [ISC_PLATFORM_NEEDMEMMOVE="#undef ISC_PLATFORM_NEEDMEMMOVE"], 1702135446Strhodes [ISC_PLATFORM_NEEDMEMMOVE="#define ISC_PLATFORM_NEEDMEMMOVE 1"]) 1703135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDMEMMOVE) 1704135446Strhodes 1705135446StrhodesAC_CHECK_FUNC(strtoul, 1706135446Strhodes [ISC_PLATFORM_NEEDSTRTOUL="#undef ISC_PLATFORM_NEEDSTRTOUL"], 1707135446Strhodes [ISC_PLATFORM_NEEDSTRTOUL="#define ISC_PLATFORM_NEEDSTRTOUL 1"]) 1708135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDSTRTOUL) 1709135446Strhodes 1710135446StrhodesAC_CHECK_FUNC(strlcpy, 1711135446Strhodes [ISC_PLATFORM_NEEDSTRLCPY="#undef ISC_PLATFORM_NEEDSTRLCPY"], 1712135446Strhodes [ISC_PLATFORM_NEEDSTRLCPY="#define ISC_PLATFORM_NEEDSTRLCPY 1"]) 1713135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDSTRLCPY) 1714135446Strhodes 1715135446StrhodesAC_CHECK_FUNC(strlcat, 1716135446Strhodes [ISC_PLATFORM_NEEDSTRLCAT="#undef ISC_PLATFORM_NEEDSTRLCAT"], 1717135446Strhodes [ISC_PLATFORM_NEEDSTRLCAT="#define ISC_PLATFORM_NEEDSTRLCAT 1"]) 1718135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDSTRLCAT) 1719135446Strhodes 1720135446StrhodesISC_PRINT_OBJS= 1721135446StrhodesISC_PRINT_SRCS= 1722135446StrhodesAC_MSG_CHECKING(sprintf) 1723135446StrhodesAC_TRY_COMPILE([ 1724135446Strhodes#include <stdio.h> 1725135446Strhodes], 1726135446Strhodes[ char buf[2]; return(*sprintf(buf,"x"));], 1727135446Strhodes[ 1728135446StrhodesISC_PRINT_OBJS="print.$O" 1729135446StrhodesISC_PRINT_SRCS="print.c" 1730135446StrhodesISC_PLATFORM_NEEDSPRINTF="#define ISC_PLATFORM_NEEDSPRINTF" 1731135446StrhodesLWRES_PLATFORM_NEEDSPRINTF="#define LWRES_PLATFORM_NEEDSPRINTF" 1732135446Strhodes], 1733135446Strhodes[ISC_PLATFORM_NEEDSPRINTF="#undef ISC_PLATFORM_NEEDSPRINTF" 1734135446Strhodes LWRES_PLATFORM_NEEDSPRINTF="#undef LWRES_PLATFORM_NEEDSPRINTF"] 1735135446Strhodes) 1736135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDSPRINTF) 1737135446StrhodesAC_SUBST(LWRES_PLATFORM_NEEDSPRINTF) 1738135446Strhodes 1739135446StrhodesAC_CHECK_FUNC(vsnprintf, 1740135446Strhodes [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF" 1741135446Strhodes LWRES_PLATFORM_NEEDVSNPRINTF="#undef LWRES_PLATFORM_NEEDVSNPRINTF"], 1742135446Strhodes [ISC_PRINT_OBJS="print.$O" 1743135446Strhodes ISC_PRINT_SRCS="print.c" 1744135446Strhodes ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1" 1745135446Strhodes LWRES_PLATFORM_NEEDVSNPRINTF="#define LWRES_PLATFORM_NEEDVSNPRINTF 1"]) 1746135446StrhodesAC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF) 1747135446StrhodesAC_SUBST(LWRES_PLATFORM_NEEDVSNPRINTF) 1748135446StrhodesISC_EXTRA_OBJS="$ISC_EXTRA_OBJS $ISC_PRINT_OBJS" 1749135446StrhodesISC_EXTRA_SRCS="$ISC_EXTRA_SRCS $ISC_PRINT_SRCS" 1750135446Strhodes 1751135446StrhodesAC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR)) 1752135446Strhodes 1753135446StrhodesAC_SUBST(ISC_EXTRA_OBJS) 1754135446StrhodesAC_SUBST(ISC_EXTRA_SRCS) 1755135446Strhodes 1756135446Strhodes# Determine the printf format characters to use when printing 1757135446Strhodes# values of type isc_int64_t. This will normally be "ll", but where 1758135446Strhodes# the compiler treats "long long" as a alias for "long" and printf 1759135446Strhodes# doesn't know about "long long" use "l". Hopefully the sprintf 1760135446Strhodes# will produce a inconsistant result in the later case. If the compiler 1761135446Strhodes# fails due to seeing "%lld" we fall back to "l". 1762135446Strhodes# 1763135446Strhodes# Win32 uses "%I64d", but that's defined elsewhere since we don't use 1764135446Strhodes# configure on Win32. 1765135446Strhodes# 1766135446StrhodesAC_MSG_CHECKING(printf format modifier for 64-bit integers) 1767135446StrhodesAC_TRY_RUN([ 1768135446Strhodes#include <stdio.h> 1769135446Strhodesmain() { 1770135446Strhodes long long int j = 0; 1771135446Strhodes char buf[100]; 1772135446Strhodes buf[0] = 0; 1773135446Strhodes sprintf(buf, "%lld", j); 1774135446Strhodes exit((sizeof(long long int) != sizeof(long int))? 0 : 1775135446Strhodes (strcmp(buf, "0") != 0)); 1776135446Strhodes} 1777135446Strhodes], 1778135446Strhodes [AC_MSG_RESULT(ll) 1779135446Strhodes ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'], 1780135446Strhodes [AC_MSG_RESULT(l) 1781135446Strhodes ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'], 1782135446Strhodes [AC_MSG_RESULT(assuming target platform uses ll) 1783135446Strhodes ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"']) 1784135446StrhodesAC_SUBST(ISC_PLATFORM_QUADFORMAT) 1785135446Strhodes 1786135446Strhodes# 1787135446Strhodes# Security Stuff 1788135446Strhodes# 1789135446StrhodesAC_CHECK_FUNC(chroot, AC_DEFINE(HAVE_CHROOT)) 1790135446StrhodesAC_ARG_ENABLE(linux-caps, 1791135446Strhodes [ --disable-linux-caps disable linux capabilities]) 1792135446Strhodescase "$enable_linux_caps" in 1793135446Strhodes yes|'') 1794135446Strhodes AC_CHECK_HEADERS(linux/capability.h) 1795135446Strhodes ;; 1796135446Strhodes no) 1797135446Strhodes ;; 1798135446Strhodesesac 1799135446StrhodesAC_CHECK_HEADERS(sys/prctl.h) 1800135446Strhodes 1801135446Strhodes# 1802135446Strhodes# Time Zone Stuff 1803135446Strhodes# 1804135446StrhodesAC_CHECK_FUNC(tzset, AC_DEFINE(HAVE_TZSET)) 1805135446Strhodes 1806135446Strhodes# 1807135446Strhodes# BSD/OS, and perhaps some others, don't define rlim_t. 1808135446Strhodes# 1809135446StrhodesAC_MSG_CHECKING(for type rlim_t) 1810135446StrhodesAC_TRY_COMPILE([ 1811135446Strhodes#include <sys/types.h> 1812135446Strhodes#include <sys/time.h> 1813135446Strhodes#include <sys/resource.h>], 1814135446Strhodes[rlim_t rl = 19671212; return (0);], 1815135446Strhodes[AC_MSG_RESULT(yes) 1816135446Strhodes ISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE rlim_t"], 1817135446Strhodes[AC_MSG_RESULT(no) 1818135446Strhodes 1819135446StrhodesAC_MSG_CHECKING(type of rlim_cur) 1820135446StrhodesAC_TRY_RUN([ 1821135446Strhodes#include <sys/types.h> 1822135446Strhodes#include <sys/time.h> 1823135446Strhodes#include <sys/resource.h> 1824135446Strhodesmain() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(int)));}], 1825135446Strhodes[AC_MSG_RESULT(int) 1826135446StrhodesISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE int"], 1827135446Strhodes[ 1828135446StrhodesAC_TRY_RUN([ 1829135446Strhodes#include <sys/types.h> 1830135446Strhodes#include <sys/time.h> 1831135446Strhodes#include <sys/resource.h> 1832135446Strhodesmain() { struct rlimit r; exit(!(sizeof(r.rlim_cur) == sizeof(long int)));}], 1833135446Strhodes[AC_MSG_RESULT(long int) 1834135446StrhodesISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long int"], 1835135446Strhodes[ 1836135446StrhodesAC_TRY_RUN([ 1837135446Strhodes#include <sys/types.h> 1838135446Strhodes#include <sys/time.h> 1839135446Strhodes#include <sys/resource.h> 1840135446Strhodesmain() { struct rlimit r; exit((!sizeof(r.rlim_cur) == sizeof(long long int)));}], 1841135446Strhodes[AC_MSG_RESULT(long long int) 1842135446StrhodesISC_PLATFORM_RLIMITTYPE="#define ISC_PLATFORM_RLIMITTYPE long long int"], 1843135446Strhodes[AC_MSG_ERROR([unable to determine sizeof rlim_cur]) 1844135446Strhodes],[AC_MSG_ERROR(this cannot happen)]) 1845135446Strhodes],[AC_MSG_ERROR(this cannot happen)]) 1846135446Strhodes],[AC_MSG_ERROR(cannot determine type of rlim_cur when cross compiling - define rlim_t)]) 1847135446Strhodes]) 1848135446StrhodesAC_SUBST(ISC_PLATFORM_RLIMITTYPE) 1849135446Strhodes 1850135446Strhodes# 1851135446Strhodes# Compaq TruCluster requires more code for handling cluster IP aliases 1852135446Strhodes# 1853135446Strhodescase "$host" in 1854135446Strhodes *-dec-osf*) 1855135446Strhodes AC_CHECK_LIB(clua, clua_getaliasaddress, LIBS="-lclua $LIBS") 1856135446Strhodes AC_CHECK_FUNC(clua_getaliasaddress, 1857135446Strhodes AC_DEFINE(HAVE_TRUCLUSTER, 1, 1858135446Strhodes [Define if running under Compaq TruCluster])) 1859135446Strhodes ;; 1860135446Strhodes *) 1861135446Strhodes ;; 1862135446Strhodesesac 1863135446Strhodes 1864135446Strhodes# 1865135446Strhodes# Microsoft has their own way of handling shared libraries that requires 1866135446Strhodes# additional qualifiers on extern variables. Unix systems don't need it. 1867135446Strhodes# 1868135446StrhodesAC_SUBST(ISC_PLATFORM_USEDECLSPEC) 1869135446StrhodesISC_PLATFORM_USEDECLSPEC="#undef ISC_PLATFORM_USEDECLSPEC" 1870135446StrhodesAC_SUBST(LWRES_PLATFORM_USEDECLSPEC) 1871135446StrhodesLWRES_PLATFORM_USEDECLSPEC="#undef LWRES_PLATFORM_USEDECLSPEC" 1872135446Strhodes 1873135446Strhodes# 1874135446Strhodes# Random remaining OS-specific issues involving compiler warnings. 1875135446Strhodes# XXXDCL print messages to indicate some compensation is being done? 1876135446Strhodes# 1877135446StrhodesAC_SUBST(ISC_PLATFORM_BRACEPTHREADONCEINIT) 1878135446StrhodesISC_PLATFORM_BRACEPTHREADONCEINIT="#undef ISC_PLATFORM_BRACEPTHREADONCEINIT" 1879135446Strhodes 1880135446Strhodescase "$host" in 1881143731Sdougb *-aix5.1.*) 1882143731Sdougb hack_shutup_pthreadonceinit=yes 1883143731Sdougb ;; 1884135446Strhodes *-bsdi3.1*) 1885135446Strhodes hack_shutup_sputaux=yes 1886135446Strhodes ;; 1887135446Strhodes *-bsdi4.0*) 1888135446Strhodes hack_shutup_sigwait=yes 1889135446Strhodes hack_shutup_sputaux=yes 1890135446Strhodes ;; 1891135446Strhodes [*-bsdi4.[12]*]) 1892135446Strhodes hack_shutup_stdargcast=yes 1893135446Strhodes ;; 1894135446Strhodes [*-solaris2.[89]]) 1895135446Strhodes hack_shutup_pthreadonceinit=yes 1896135446Strhodes ;; 1897135446Strhodesesac 1898135446Strhodes 1899135446Strhodescase "$hack_shutup_pthreadonceinit" in 1900135446Strhodes yes) 1901135446Strhodes # 1902135446Strhodes # Shut up PTHREAD_ONCE_INIT unbraced initializer warnings. 1903135446Strhodes # 1904135446Strhodes ISC_PLATFORM_BRACEPTHREADONCEINIT="#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" 1905135446Strhodes ;; 1906135446Strhodesesac 1907135446Strhodes 1908135446Strhodescase "$hack_shutup_sigwait" in 1909135446Strhodes yes) 1910135446Strhodes # 1911135446Strhodes # Shut up a -Wmissing-prototypes warning for sigwait(). 1912135446Strhodes # 1913135446Strhodes AC_DEFINE(SHUTUP_SIGWAIT) 1914135446Strhodes ;; 1915135446Strhodesesac 1916135446Strhodes 1917135446Strhodescase "$hack_shutup_sputaux" in 1918135446Strhodes yes) 1919135446Strhodes # 1920135446Strhodes # Shut up a -Wmissing-prototypes warning from <stdio.h>. 1921135446Strhodes # 1922135446Strhodes AC_DEFINE(SHUTUP_SPUTAUX) 1923135446Strhodes ;; 1924135446Strhodesesac 1925135446Strhodes 1926135446Strhodescase "$hack_shutup_stdargcast" in 1927135446Strhodes yes) 1928135446Strhodes # 1929135446Strhodes # Shut up a -Wcast-qual warning from va_start(). 1930135446Strhodes # 1931135446Strhodes AC_DEFINE(SHUTUP_STDARG_CAST) 1932135446Strhodes ;; 1933135446Strhodesesac 1934135446Strhodes 1935135446Strhodes# 1936135446Strhodes# Check for if_nametoindex() for IPv6 scoped addresses support 1937135446Strhodes# 1938135446StrhodesAC_CHECK_FUNC(if_nametoindex, ac_cv_have_if_nametoindex=yes, 1939135446Strhodes ac_cv_have_if_nametoindex=no) 1940135446Strhodescase $ac_cv_have_if_nametoindex in 1941135446Strhodesno) 1942135446Strhodes case "$host" in 1943135446Strhodes *-hp-hpux*) 1944135446Strhodes AC_CHECK_LIB(ipv6, if_nametoindex, 1945135446Strhodes ac_cv_have_if_nametoindex=yes 1946135446Strhodes LIBS="-lipv6 $LIBS",) 1947135446Strhodes ;; 1948135446Strhodes esac 1949135446Strhodesesac 1950135446Strhodescase $ac_cv_have_if_nametoindex in 1951135446Strhodesyes) 1952135446Strhodes ISC_PLATFORM_HAVEIFNAMETOINDEX="#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" 1953135446Strhodes ;; 1954135446Strhodes*) 1955135446Strhodes ISC_PLATFORM_HAVEIFNAMETOINDEX="#undef ISC_PLATFORM_HAVEIFNAMETOINDEX" 1956135446Strhodes ;; 1957135446Strhodesesac 1958135446StrhodesAC_SUBST(ISC_PLATFORM_HAVEIFNAMETOINDEX) 1959135446Strhodes 1960135446Strhodes# 1961135446Strhodes# The following sections deal with tools used for formatting 1962135446Strhodes# the documentation. They are all optional, unless you are 1963135446Strhodes# a developer editing the documentation source. 1964135446Strhodes# 1965135446Strhodes 1966135446Strhodes# Directory trees where SGML files are commonly found. 1967135446Strhodessgmltrees="/usr/pkg/share/sgml /usr/local/share/sgml /usr/share/sgml" 1968135446Strhodes 1969135446Strhodes# 1970135446Strhodes# Look for openjade. Plain jade is no longer supported. 1971135446Strhodes# 1972135446Strhodes 1973135446StrhodesAC_PATH_PROGS(OPENJADE, openjade, openjade) 1974135446StrhodesAC_SUBST(OPENJADE) 1975135446Strhodes 1976135446Strhodes# 1977135446Strhodes# Look for TeX. 1978135446Strhodes# 1979135446Strhodes 1980135446StrhodesAC_PATH_PROGS(JADETEX, jadetex, jadetex) 1981135446StrhodesAC_SUBST(JADETEX) 1982135446Strhodes 1983135446StrhodesAC_PATH_PROGS(PDFJADETEX, pdfjadetex, pdfjadetex) 1984135446StrhodesAC_SUBST(PDFJADETEX) 1985135446Strhodes 1986135446Strhodes# 1987135446Strhodes# Subroutine for searching for an ordinary file (e.g., a stylesheet) 1988135446Strhodes# in a number of directories: 1989135446Strhodes# 1990135446Strhodes# NOM_PATH_FILE(VARIABLE, FILENAME, DIRECTORIES) 1991135446Strhodes# 1992135446Strhodes# If the file FILENAME is found in one of the DIRECTORIES, the shell 1993135446Strhodes# variable VARIABLE is defined to its absolute pathname. Otherwise, 1994135446Strhodes# it is set to FILENAME, with no directory prefix (that's not terribly 1995135446Strhodes# useful, but looks less confusing in substitutions than leaving it 1996135446Strhodes# empty). The variable VARIABLE will be substituted into output files. 1997135446Strhodes# 1998135446Strhodes 1999135446StrhodesAC_DEFUN(NOM_PATH_FILE, [ 2000135446Strhodes$1="" 2001135446StrhodesAC_MSG_CHECKING(for $2) 2002135446Strhodesfor d in $3 2003135446Strhodesdo 2004135446Strhodes f=$d/$2 2005135446Strhodes if test -f $f 2006135446Strhodes then 2007135446Strhodes $1=$f 2008135446Strhodes AC_MSG_RESULT($f) 2009135446Strhodes break 2010135446Strhodes fi 2011135446Strhodesdone 2012135446Strhodesif test "X[$]$1" = "X" 2013135446Strhodesthen 2014135446Strhodes AC_MSG_RESULT("not found"); 2015135446Strhodes $1=$2 2016135446Strhodesfi 2017135446StrhodesAC_SUBST($1) 2018135446Strhodes]) 2019135446Strhodes 2020135446Strhodes# 2021135446Strhodes# Look for the SGML catalog. 2022135446Strhodes# Its location varies, so far we have seen: 2023135446Strhodes# 2024135446Strhodes# NetBSD /usr/pkg/share/sgml/docbook/catalog 2025135446Strhodes# FreeBSD /usr/local/share/sgml/docbook/catalog 2026135446Strhodes# Linux /usr/local/share/dsssl/docbook/catalog 2027135446Strhodes# /usr/share/sgml/docbook/dsssl-stylesheets/catalog 2028135446Strhodes# 2029135446Strhodescatalogpath="" 2030135446Strhodesfor d in $sgmltrees 2031135446Strhodesdo 2032135446Strhodes catalogpath="$catalogpath $d" 2033135446Strhodes for s in docbook/dsssl-stylesheets 2034135446Strhodes do 2035135446Strhodes catalogpath="$catalogpath $d/$s" 2036135446Strhodes done 2037135446Strhodesdone 2038135446StrhodesNOM_PATH_FILE(SGMLCATALOG, catalog, $catalogpath) 2039135446Strhodes 2040135446Strhodes# 2041135446Strhodes# Look for the HTML stylesheet html/docbook.dsl, used for 2042135446Strhodes# formatting man pages in HTML. Its location varies, 2043135446Strhodes# so far we have seen: 2044135446Strhodes# 2045135446Strhodes# NetBSD /usr/pkg/share/sgml/docbook/dsssl/modular/ 2046135446Strhodes# FreeBSD /usr/local/share/sgml/docbook/dsssl/modular/ 2047135446Strhodes# Linux /usr/local/share/dsssl/docbook/ 2048135446Strhodes# /usr/share/sgml/docbook/dsssl-stylesheets/ 2049135446Strhodes# 2050135446Strhodes# Ditto for the print stylesheet print/docbook.dsl. 2051135446Strhodes# 2052135446Strhodes 2053135446Strhodesstylepath="" 2054135446Strhodesfor d in $sgmltrees 2055135446Strhodesdo 2056135446Strhodes for s in docbook/dsssl/modular dsssl/docbook docbook/dsssl-stylesheets 2057135446Strhodes do 2058135446Strhodes stylepath="$stylepath $d/$s" 2059135446Strhodes done 2060135446Strhodesdone 2061135446StrhodesNOM_PATH_FILE(HTMLSTYLE, html/docbook.dsl, $stylepath) 2062135446StrhodesNOM_PATH_FILE(PRINTSTYLE, print/docbook.dsl, $stylepath) 2063135446Strhodes 2064135446Strhodes# 2065135446Strhodes# Look for XML declarations. 2066135446Strhodes# Its location varies, so far we have seen: 2067135446Strhodes# 2068135446Strhodes# NetBSD /usr/pkg/share/sgml/docbook/dsssl/modular/dtds/decls/ 2069135446Strhodes# FreeBSD /usr/local/share/sgml/docbook/dsssl/modular/dtds/decls/ 2070135446Strhodes# Linux /usr/local/share/dsssl/docbook/dtds/decls/ 2071135446Strhodes# /usr/share/sgml/docbook/dsssl-stylesheets/dtds/decls/ 2072135446Strhodes# 2073135446Strhodes 2074135446Strhodesxmlpath="" 2075135446Strhodesfor d in $sgmltrees 2076135446Strhodesdo 2077135446Strhodes for s in docbook/dsssl/modular dsssl/docbook docbook/dsssl-stylesheets 2078135446Strhodes do 2079135446Strhodes xmlpath="$xmlpath $d/$s" 2080135446Strhodes done 2081135446Strhodesdone 2082135446StrhodesNOM_PATH_FILE(XMLDCL, dtds/decls/xml.dcl, $xmlpath) 2083135446Strhodes 2084135446Strhodes# 2085135446Strhodes# Look for docbook2man-spec.pl 2086135446Strhodes# 2087135446Strhodes 2088135446StrhodesNOM_PATH_FILE(DOCBOOK2MANSPEC, docbook2X/docbook2man-spec.pl, $sgmltrees) 2089135446Strhodes 2090135446Strhodes# 2091135446Strhodes# Substitutions 2092135446Strhodes# 2093135446StrhodesAC_SUBST(BIND9_TOP_BUILDDIR) 2094135446StrhodesBIND9_TOP_BUILDDIR=`pwd` 2095135446Strhodes 2096135446StrhodesAC_SUBST(BIND9_ISC_BUILDINCLUDE) 2097135446StrhodesAC_SUBST(BIND9_ISCCC_BUILDINCLUDE) 2098135446StrhodesAC_SUBST(BIND9_ISCCFG_BUILDINCLUDE) 2099135446StrhodesAC_SUBST(BIND9_DNS_BUILDINCLUDE) 2100135446StrhodesAC_SUBST(BIND9_LWRES_BUILDINCLUDE) 2101135446StrhodesAC_SUBST(BIND9_BIND9_BUILDINCLUDE) 2102135446Strhodesif test "X$srcdir" != "X"; then 2103135446Strhodes BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include" 2104135446Strhodes BIND9_ISCCC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccc/include" 2105135446Strhodes BIND9_ISCCFG_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isccfg/include" 2106135446Strhodes BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include" 2107135446Strhodes BIND9_LWRES_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/lwres/include" 2108135446Strhodes BIND9_BIND9_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/bind9/include" 2109135446Strhodeselse 2110135446Strhodes BIND9_ISC_BUILDINCLUDE="" 2111135446Strhodes BIND9_ISCCC_BUILDINCLUDE="" 2112135446Strhodes BIND9_ISCCFG_BUILDINCLUDE="" 2113135446Strhodes BIND9_DNS_BUILDINCLUDE="" 2114135446Strhodes BIND9_LWRES_BUILDINCLUDE="" 2115135446Strhodes BIND9_BIND9_BUILDINCLUDE="" 2116135446Strhodesfi 2117135446Strhodes 2118135446StrhodesAC_SUBST_FILE(BIND9_MAKE_INCLUDES) 2119135446StrhodesBIND9_MAKE_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes 2120135446Strhodes 2121135446StrhodesAC_SUBST_FILE(BIND9_MAKE_RULES) 2122135446StrhodesBIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules 2123135446Strhodes 2124135446Strhodes. $srcdir/version 2125135446StrhodesBIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}" 2126135446StrhodesAC_SUBST(BIND9_VERSION) 2127135446Strhodes 2128135446StrhodesAC_SUBST_FILE(LIBISC_API) 2129135446StrhodesLIBISC_API=$srcdir/lib/isc/api 2130135446Strhodes 2131135446StrhodesAC_SUBST_FILE(LIBISCCC_API) 2132135446StrhodesLIBISCCC_API=$srcdir/lib/isccc/api 2133135446Strhodes 2134135446StrhodesAC_SUBST_FILE(LIBISCCFG_API) 2135135446StrhodesLIBISCCFG_API=$srcdir/lib/isccfg/api 2136135446Strhodes 2137135446StrhodesAC_SUBST_FILE(LIBDNS_API) 2138135446StrhodesLIBDNS_API=$srcdir/lib/dns/api 2139135446Strhodes 2140135446StrhodesAC_SUBST_FILE(LIBBIND9_API) 2141135446StrhodesLIBBIND9_API=$srcdir/lib/bind9/api 2142135446Strhodes 2143135446StrhodesAC_SUBST_FILE(LIBLWRES_API) 2144135446StrhodesLIBLWRES_API=$srcdir/lib/lwres/api 2145135446Strhodes 2146135446StrhodesAC_OUTPUT( 2147135446Strhodes make/rules 2148135446Strhodes make/includes 2149135446Strhodes Makefile 2150135446Strhodes make/Makefile 2151135446Strhodes make/mkdep 2152135446Strhodes lib/Makefile 2153135446Strhodes lib/isc/Makefile 2154135446Strhodes lib/isc/include/Makefile 2155135446Strhodes lib/isc/include/isc/Makefile 2156135446Strhodes lib/isc/include/isc/platform.h 2157135446Strhodes lib/isc/unix/Makefile 2158135446Strhodes lib/isc/unix/include/Makefile 2159135446Strhodes lib/isc/unix/include/isc/Makefile 2160135446Strhodes lib/isc/nls/Makefile 2161135446Strhodes lib/isc/$thread_dir/Makefile 2162135446Strhodes lib/isc/$thread_dir/include/Makefile 2163135446Strhodes lib/isc/$thread_dir/include/isc/Makefile 2164135446Strhodes lib/isccc/Makefile 2165135446Strhodes lib/isccc/include/Makefile 2166135446Strhodes lib/isccc/include/isccc/Makefile 2167135446Strhodes lib/isccfg/Makefile 2168135446Strhodes lib/isccfg/include/Makefile 2169135446Strhodes lib/isccfg/include/isccfg/Makefile 2170135446Strhodes lib/dns/Makefile 2171135446Strhodes lib/dns/include/Makefile 2172135446Strhodes lib/dns/include/dns/Makefile 2173143731Sdougb lib/dns/include/dst/Makefile 2174135446Strhodes lib/bind9/Makefile 2175135446Strhodes lib/bind9/include/Makefile 2176135446Strhodes lib/bind9/include/bind9/Makefile 2177135446Strhodes lib/lwres/Makefile 2178135446Strhodes lib/lwres/include/Makefile 2179135446Strhodes lib/lwres/include/lwres/Makefile 2180135446Strhodes lib/lwres/include/lwres/netdb.h 2181135446Strhodes lib/lwres/include/lwres/platform.h 2182135446Strhodes lib/lwres/man/Makefile 2183135446Strhodes lib/lwres/unix/Makefile 2184135446Strhodes lib/lwres/unix/include/Makefile 2185135446Strhodes lib/lwres/unix/include/lwres/Makefile 2186135446Strhodes lib/tests/Makefile 2187135446Strhodes lib/tests/include/Makefile 2188135446Strhodes lib/tests/include/tests/Makefile 2189135446Strhodes bin/Makefile 2190135446Strhodes bin/check/Makefile 2191135446Strhodes bin/named/Makefile 2192135446Strhodes bin/named/unix/Makefile 2193135446Strhodes bin/rndc/Makefile 2194135446Strhodes bin/rndc/unix/Makefile 2195135446Strhodes bin/dig/Makefile 2196135446Strhodes bin/nsupdate/Makefile 2197135446Strhodes bin/tests/Makefile 2198135446Strhodes bin/tests/names/Makefile 2199135446Strhodes bin/tests/master/Makefile 2200135446Strhodes bin/tests/rbt/Makefile 2201135446Strhodes bin/tests/db/Makefile 2202135446Strhodes bin/tests/tasks/Makefile 2203135446Strhodes bin/tests/timers/Makefile 2204135446Strhodes bin/tests/dst/Makefile 2205135446Strhodes bin/tests/mem/Makefile 2206135446Strhodes bin/tests/net/Makefile 2207135446Strhodes bin/tests/sockaddr/Makefile 2208135446Strhodes bin/tests/system/Makefile 2209135446Strhodes bin/tests/system/conf.sh 2210135446Strhodes bin/tests/system/lwresd/Makefile 2211135446Strhodes bin/tests/system/tkey/Makefile 2212135446Strhodes bin/tests/headerdep_test.sh 2213135446Strhodes bin/dnssec/Makefile 2214135446Strhodes doc/Makefile 2215135446Strhodes doc/arm/Makefile 2216135446Strhodes doc/arm/nominum-docbook-html.dsl 2217135446Strhodes doc/arm/nominum-docbook-print.dsl 2218135446Strhodes doc/arm/validate.sh 2219135446Strhodes doc/misc/Makefile 2220135446Strhodes docutil/docbook2man-wrapper.sh 2221135446Strhodes isc-config.sh 2222135446Strhodes) 2223135446Strhodeschmod a+x isc-config.sh 2224135446Strhodes 2225135446Strhodes# Tell Emacs to edit this file in shell mode. 2226135446Strhodes# Local Variables: 2227135446Strhodes# mode: sh 2228135446Strhodes# End: 2229