configure.in revision 33cad139b5ebbceef1b418921933074204521195
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl Copyright (C) 1998, 1999 Internet Software Consortium.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrencednl Permission to use, copy, modify, and distribute this software for any
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl purpose with or without fee is hereby granted, provided that the above
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl copyright notice and this permission notice appear in all copies.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrencednl THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
15a44745412679c30a6d022733925af70a38b715David Lawrencednl ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
15a44745412679c30a6d022733925af70a38b715David Lawrencednl OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
15a44745412679c30a6d022733925af70a38b715David Lawrencednl CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
15a44745412679c30a6d022733925af70a38b715David Lawrencednl DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15a44745412679c30a6d022733925af70a38b715David Lawrencednl PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
15a44745412679c30a6d022733925af70a38b715David Lawrencednl ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_REVISION($Revision: 1.68 $)
b7e031d5173476224027407d8e23eaa7557fc396Andreas GustafssonAC_PREREQ(2.13)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_CONFIG_HEADER(config.h)
593cb00bd17e5e2ab0dcb7c635a9a81082dc5d0eAndreas GustafssonAC_CANONICAL_HOST
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_PROG_MAKE_SET
d8e34837cd6c88c42b3ecdb9107a43ecf8252e79David LawrenceAC_PROG_RANLIB
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_PROG_INSTALL
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonSTD_CINCLUDES=""
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceSTD_CDEFINES=""
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceSTD_CWARNINGS=""
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(STD_CINCLUDES)
3e14b69d196a3ebeecc4662c426344dcfd7db678Andreas GustafssonAC_SUBST(STD_CDEFINES)
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_SUBST(STD_CWARNINGS)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_PATH_PROG(AR, ar)
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_SUBST(ARFLAGS)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl On these hosts, we really want to use cc, not gcc, even if it is
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl found. The gcc that these systems have will not correctly handle
600cfa2ba4c50017581b6c14e3a688a82ecebbe0David Lawrencednl However, if the user sets $CC to be something, let that override
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl our change.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonif test "X$CC" = "X" ; then
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson case "$host" in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson *-sun-solaris*)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson for ac_dir in $PATH; do
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson test -z "$ac_dir" && ac_dir=.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson case "$ac_dir" in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson if test -f "$ac_dir/cc"; then
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson IFS="$ac_save_ifs"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson mips-sgi-irix*)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl NetBSD has two alternative pthreads implementations. Make the
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl user choose one by saying --with-mit-pthreads or --with-ptl2
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl if necessary.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssoncase "$host" in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_MSG_CHECKING(which thread library to use)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_ARG_WITH(mit-pthreads,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [ --with-mit-pthreads use the mit-pthreads thread library],
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson use_mit_pthreads="$withval", use_mit_pthreads="no")
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_ARG_WITH(ptl2,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [ --with-ptl2 use the ptl2 thread library],
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence use_ptl2="$withval", use_ptl2="no")
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson dnl If user did not choose a thread library explicitly,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson dnl try to choose one automatically. This will work when
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson dnl exactly one library is installed.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson case "$use_mit_pthreads+$use_ptl2" in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson use_mit_pthreads="yes"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson use_ptl2="yes"
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas Gustafsson case "$use_mit_pthreads+$use_ptl2" in
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas Gustafsson AC_MSG_RESULT(mit-pthreads)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib2="-lpthread -lm -lgcc -lpthread"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson LIBS="$lib1 $lib2 $LIBS"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson STD_CINCLUDES="-I$pkg/include"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_MSG_RESULT(PTL2)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl LIBS="-L/usr/pkg/lib -lPTL $LIBS"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl STD_CINCLUDES="-nostdinc -idirafter $pkg/include"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_MSG_ERROR([no thread library.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonPlease choose a thread library using one of
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson configure --with-mit-pthreads
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson configure --with-ptl2
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian WellingtonAC_HEADER_STDC
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian WellingtonAC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h)
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian WellingtonAC_TYPE_SIZE_T
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian WellingtonAC_HEADER_TIME
7bf91d95eb5a49117d5080bbd03839b9de5c8423Andreas GustafssonAC_CHECK_LIB(pthread, pthread_create,,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_CHECK_LIB(pthread, __pthread_create)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_CHECK_LIB(pthread, __pthread_create_system)
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrencednl For FreeBSD which has no libpthread but instead libc_r
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonif test "$ac_cv_lib_pthread" != "yes"; then
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_CHECK_LIB(c_r, pthread_create)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl We'd like to use sigwait() too
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_CHECK_LIB(pthread, sigwait,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_DEFINE(HAVE_SIGWAIT),
68e4926b2262571e004b4be00b905ec776c01d9cMichael Graff AC_CHECK_LIB(pthread, _Psigwait,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_DEFINE(HAVE_SIGWAIT),)
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrencednl Make sure we get the right sigwait() semantics...
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssoncase "$host" in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson *-sun-solaris*)
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
544f5611e1fc84597db819d111c8fd98bb719de6Bob HalleyAC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl BSDI 3.1 needs pthread_init() to be called before certain pthreads
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl calls. LinuxThreads requires some changes to the way we deal with
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssoncase "$host" in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_DEFINE(NEED_PTHREAD_INIT)
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence AC_DEFINE(HAVE_LINUXTHREADS)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl -lxnet buys us one big porting headache... standards, gotta love 'em.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl AC_CHECK_LIB(xnet, socket, ,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl AC_CHECK_LIB(socket, socket)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl AC_CHECK_LIB(nsl, inet_ntoa)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl Use this for now, instead:
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssoncase "$host" in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson mips-sgi-irix*)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_CHECK_LIB(socket, socket)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_CHECK_LIB(nsl, inet_ntoa)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonMKDEPCFLAGS="-M"
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrenceif test "X$GCC" = "Xyes"; then
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson case "$host" in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson *-sun-solaris*)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson LIBS="$LIBS -lthread"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson case "$host" in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson CC="$CC -pthread"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson *-sun-solaris*)
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff MKDEPCC="$CC"
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence MKDEPCFLAGS="-xM"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson CC="$CC -Ae -z +w1"
ec7493d8d1966a3dc5f5306fc0a96519e0de6dceAndreas Gustafsson MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(MKDEPCC)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(MKDEPCFLAGS)
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_SUBST(MKDEPPROG)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl Networking specifics.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssoncase "$host" in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson dnl Turn on 4.4BSD style sa_len support.
c801dd02ed98321f3ccab93c159a1dce61961c58Bob Halley AC_DEFINE(_SOCKADDR_LEN)
2e715dbdc263f859c01b57a9d733c1dfbf28b90eBob Halleydnl Look for a 4.4BSD-style sa_len member in struct sockaddr.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_MSG_CHECKING(for sa_len in struct sockaddr)
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David LawrenceAC_TRY_COMPILE([
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff[struct sockaddr sa; sa.sa_len = 0; return (0);],
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence [AC_MSG_RESULT(yes)
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence ISC_PLATFORM_HAVESALEN="#define ISC_PLATFORM_HAVESALEN 1"],
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [AC_MSG_RESULT(no)
2e715dbdc263f859c01b57a9d733c1dfbf28b90eBob Halley ISC_PLATFORM_HAVESALEN="#undef ISC_PLATFORM_HAVESALEN"])
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(ISC_PLATFORM_HAVESALEN)
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graffdnl Look for a 4.4BSD or 4.3BSD struct msghdr
6e49e91bd08778d7eae45a2229dcf41ed97cc636David LawrenceAC_MSG_CHECKING(for struct msghdr flavor)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_TRY_COMPILE([
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson[struct msghdr msg; msg.msg_flags = 0; return (0);],
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas Gustafsson [AC_MSG_RESULT(4.4BSD)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"],
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas Gustafsson [AC_MSG_RESULT(4.3BSD)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)
ec7493d8d1966a3dc5f5306fc0a96519e0de6dceAndreas Gustafssondnl Look for in_port_t.
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael GraffAC_MSG_CHECKING(for type in_port_t)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_TRY_COMPILE([
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson[in_port_t port = 25; return (0);],
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [AC_MSG_RESULT(yes)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"],
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff [AC_MSG_RESULT(no)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(ISC_PLATFORM_NEEDPORTT)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl Look for a sysctl call to get the list of network interfaces.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_MSG_CHECKING(for interface list sysctl)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_EGREP_CPP(found_rt_iflist, [
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson#ifdef NET_RT_IFLIST
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonfound_rt_iflist
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [AC_MSG_RESULT(yes)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_DEFINE(HAVE_IFLIST_SYSCTL)],
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff [AC_MSG_RESULT(no)])
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl GNU libtool support
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David LawrenceAC_ARG_WITH(libtool,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [ --with-libtool use GNU libtool],
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence use_libtool="$withval", use_libtool="no")
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graffcase $use_libtool in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AM_PROG_LIBTOOL
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence AC_SUBST(LIBTOOL)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl We do this checking after libtool so that we can put
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl the right suffix on the files.
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_MSG_CHECKING(for IPv6 structures)
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_TRY_COMPILE([
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson[struct sockaddr_in6 sin6; return (0);],
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [AC_MSG_RESULT(yes)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"],
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [AC_MSG_RESULT(no)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ISC_IPV6_O="ipv6.$O"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ISC_ISCIPV6_O="unix/ipv6.$O"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ISC_IPV6_C="ipv6.c"])
6e49e91bd08778d7eae45a2229dcf41ed97cc636David LawrenceAC_SUBST(ISC_PLATFORM_HAVEIPV6)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(ISC_IPV6_H)
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael GraffAC_SUBST(ISC_IPV6_O)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(ISC_ISCIPV6_O)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(ISC_IPV6_C)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl Check for network functions that are often missing. We do this
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrencednl after the libtool checking, so we can put the right suffix on
c801dd02ed98321f3ccab93c159a1dce61961c58Bob HalleyAC_CHECK_FUNC(inet_ntop,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"]
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_CHECK_FUNC(inet_pton,
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence [ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"]
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_CHECK_FUNC(inet_aton,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON"],
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
c801dd02ed98321f3ccab93c159a1dce61961c58Bob Halley ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c"
c801dd02ed98321f3ccab93c159a1dce61961c58Bob Halley ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1"]
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_CHECK_FUNC(vsnprintf,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"],
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS print.c"
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"])
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_SUBST(ISC_PLATFORM_NEEDNTOP)
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_SUBST(ISC_PLATFORM_NEEDPTON)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(ISC_PLATFORM_NEEDATON)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(ISC_EXTRA_OBJS)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(ISC_EXTRA_SRCS)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl Security Stuff
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_CHECK_FUNC(chroot, AC_DEFINE(HAVE_CHROOT))
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_CHECK_HEADERS(linux/capability.h)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl Substitutions
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(BIND9_TOP_BUILDDIR)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonBIND9_TOP_BUILDDIR=`pwd`
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas GustafssonAC_SUBST(BIND9_ISC_BUILDINCLUDE)
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas GustafssonAC_SUBST(BIND9_DNS_BUILDINCLUDE)
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas GustafssonAC_SUBST(BIND9_OMAPI_BUILDINCLUDE)
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas Gustafssonif test "X$srcdir" != "X"; then
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas Gustafsson BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include"
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas Gustafsson BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson BIND9_OMAPI_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/omapi/include"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson BIND9_ISC_BUILDINCLUDE=""
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff BIND9_DNS_BUILDINCLUDE=""
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson BIND9_OMAPI_BUILDINCLUDE=""
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST_FILE(BIND9_INCLUDES)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonBIND9_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael GraffAC_SUBST_FILE(BIND9_MAKE_RULES)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonBIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST_FILE(BIND9_VERSION)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST_FILE(LIBISC_API)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST_FILE(LIBDNS_API)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST_FILE(LIBOMAPI_API)