configure.in revision 33cad139b5ebbceef1b418921933074204521195
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl Copyright (C) 1998, 1999 Internet Software Consortium.
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halleydnl
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.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
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
15a44745412679c30a6d022733925af70a38b715David Lawrencednl SOFTWARE.
15a44745412679c30a6d022733925af70a38b715David Lawrence
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_REVISION($Revision: 1.68 $)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
b7e031d5173476224027407d8e23eaa7557fc396Andreas GustafssonAC_PREREQ(2.13)
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_INIT(lib/dns/name.c)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_CONFIG_HEADER(config.h)
593cb00bd17e5e2ab0dcb7c635a9a81082dc5d0eAndreas Gustafsson
593cb00bd17e5e2ab0dcb7c635a9a81082dc5d0eAndreas GustafssonAC_CANONICAL_HOST
3e14b69d196a3ebeecc4662c426344dcfd7db678Andreas Gustafsson
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_PROG_MAKE_SET
d8e34837cd6c88c42b3ecdb9107a43ecf8252e79David LawrenceAC_PROG_RANLIB
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_PROG_INSTALL
364a82f7c25b62967678027043425201a5e5171aBob Halley
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 Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_PATH_PROG(AR, ar)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonARFLAGS="cruv"
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_SUBST(AR)
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_SUBST(ARFLAGS)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
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 pthreads.
600cfa2ba4c50017581b6c14e3a688a82ecebbe0David Lawrencednl
600cfa2ba4c50017581b6c14e3a688a82ecebbe0David Lawrencednl However, if the user sets $CC to be something, let that override
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl our change.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonif test "X$CC" = "X" ; then
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson case "$host" in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson *-dec-osf*)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson CC="cc"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ;;
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 /usr/ucb)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson # exclude
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ;;
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson *)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson if test -f "$ac_dir/cc"; then
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence CC="$ac_dir/cc"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson break
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson fi
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ;;
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson esac
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence done
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson IFS="$ac_save_ifs"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ;;
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence *-hp-hpux*)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson CC="cc"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ;;
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson mips-sgi-irix*)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson CC="cc"
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence ;;
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson esac
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrencefi
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
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 Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssoncase "$host" in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson *-netbsd*)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson CC="gcc"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_MSG_CHECKING(which thread library to use)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
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
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
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
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson case "$use_mit_pthreads+$use_ptl2" in
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence no+no)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson if test -d /usr/pkg/pthreads
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson then
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson use_mit_pthreads="yes"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson fi
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson if test -d /usr/pkg/PTL
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson then
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson use_ptl2="yes"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson fi
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ;;
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson esac
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas Gustafsson case "$use_mit_pthreads+$use_ptl2" in
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas Gustafsson yes+no)
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas Gustafsson AC_MSG_RESULT(mit-pthreads)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson pkg="/usr/pkg/pthreads"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib1="-L$pkg/lib -Wl,-R$pkg/lib"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib2="-lpthread -lm -lgcc -lpthread"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson LIBS="$lib1 $lib2 $LIBS"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson STD_CINCLUDES="-I$pkg/include"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ;;
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson no+yes)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_MSG_RESULT(PTL2)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl pkg="/usr/pkg/PTL"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl LIBS="-L/usr/pkg/lib -lPTL $LIBS"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl STD_CINCLUDES="-nostdinc -idirafter $pkg/include"
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence CC=ptlgcc
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ;;
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson *)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_MSG_ERROR([no thread library.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonPlease choose a thread library using one of
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson configure --with-mit-pthreads
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson configure --with-ptl2
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson])
7bf91d95eb5a49117d5080bbd03839b9de5c8423Andreas Gustafsson ;;
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian Wellington esac
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian Wellington ;;
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian Wellingtonesac
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian Wellington
7bf91d95eb5a49117d5080bbd03839b9de5c8423Andreas GustafssonAC_PROG_CC
7bf91d95eb5a49117d5080bbd03839b9de5c8423Andreas GustafssonAC_PROG_YACC
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian Wellington
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian WellingtonAC_HEADER_STDC
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian WellingtonAC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h)
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian Wellington
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian WellingtonAC_C_CONST
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian WellingtonAC_C_INLINE
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian WellingtonAC_TYPE_SIZE_T
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian WellingtonAC_HEADER_TIME
19f4d25fd5b35b1375b0b9f13b66770ee4a66154Brian Wellington
7bf91d95eb5a49117d5080bbd03839b9de5c8423Andreas GustafssonAC_CHECK_LIB(pthread, pthread_create,,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_CHECK_LIB(pthread, __pthread_create)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_CHECK_LIB(pthread, __pthread_create_system)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
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 Gustafssonfi
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl We'd like to use sigwait() too
68e4926b2262571e004b4be00b905ec776c01d9cMichael Graffdnl
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),)
7ab0e69f61e61e81d489c95c7ebd981e74e7ef16Andreas Gustafsson)
7ab0e69f61e61e81d489c95c7ebd981e74e7ef16Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrencednl Make sure we get the right sigwait() semantics...
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssoncase "$host" in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson *-sun-solaris*)
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
42a5f9c8f535fb2a6d1cbfaa38533176e1f1667aBob Halley ;;
42a5f9c8f535fb2a6d1cbfaa38533176e1f1667aBob Halleyesac
42a5f9c8f535fb2a6d1cbfaa38533176e1f1667aBob Halley
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl NLS
544f5611e1fc84597db819d111c8fd98bb719de6Bob Halleydnl
544f5611e1fc84597db819d111c8fd98bb719de6Bob HalleyAC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
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 Gustafssondnl signals.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssoncase "$host" in
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence *-bsdi3.1*)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_DEFINE(NEED_PTHREAD_INIT)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ;;
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson *-linux*)
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence AC_DEFINE(HAVE_LINUXTHREADS)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ;;
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graffesac
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrencednl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl -lxnet buys us one big porting headache... standards, gotta love 'em.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl AC_CHECK_LIB(xnet, socket, ,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl AC_CHECK_LIB(socket, socket)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl AC_CHECK_LIB(nsl, inet_ntoa)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl )
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl Use this for now, instead:
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssoncase "$host" in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson mips-sgi-irix*)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ;;
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson *)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_CHECK_LIB(socket, socket)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_CHECK_LIB(nsl, inet_ntoa)
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence ;;
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonesac
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonMKDEPCC="$CC"
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 ;;
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson esac
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonelse
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson case "$host" in
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence *-dec-osf*)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson CC="$CC -pthread"
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson MKDEPCC="$CC"
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff ;;
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson *-sun-solaris*)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson CC="$CC -mt"
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff MKDEPCC="$CC"
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence MKDEPCFLAGS="-xM"
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff ;;
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence *-hp-hpux*)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson CC="$CC -Ae -z +w1"
ec7493d8d1966a3dc5f5306fc0a96519e0de6dceAndreas Gustafsson MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
ec7493d8d1966a3dc5f5306fc0a96519e0de6dceAndreas Gustafsson ;;
ec7493d8d1966a3dc5f5306fc0a96519e0de6dceAndreas Gustafsson esac
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrencefi
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(MKDEPCC)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(MKDEPCFLAGS)
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_SUBST(MKDEPPROG)
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrencednl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl Networking specifics.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssoncase "$host" in
42a5f9c8f535fb2a6d1cbfaa38533176e1f1667aBob Halley *-dec-osf*)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson dnl Turn on 4.4BSD style sa_len support.
c801dd02ed98321f3ccab93c159a1dce61961c58Bob Halley AC_DEFINE(_SOCKADDR_LEN)
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence ;;
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrenceesac
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
2e715dbdc263f859c01b57a9d733c1dfbf28b90eBob Halleydnl Look for a 4.4BSD-style sa_len member in struct sockaddr.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_MSG_CHECKING(for sa_len in struct sockaddr)
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David LawrenceAC_TRY_COMPILE([
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson#include <sys/types.h>
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson#include <sys/socket.h>],
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 Graff
2e715dbdc263f859c01b57a9d733c1dfbf28b90eBob Halleydnl
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graffdnl Look for a 4.4BSD or 4.3BSD struct msghdr
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence
6e49e91bd08778d7eae45a2229dcf41ed97cc636David LawrenceAC_MSG_CHECKING(for struct msghdr flavor)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_TRY_COMPILE([
2e715dbdc263f859c01b57a9d733c1dfbf28b90eBob Halley#include <sys/types.h>
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson#include <sys/socket.h>],
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)
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas Gustafsson
ec7493d8d1966a3dc5f5306fc0a96519e0de6dceAndreas Gustafssondnl
ec7493d8d1966a3dc5f5306fc0a96519e0de6dceAndreas Gustafssondnl Look for in_port_t.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrencednl
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael GraffAC_MSG_CHECKING(for type in_port_t)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_TRY_COMPILE([
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson#include <sys/types.h>
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson#include <netinet/in.h>],
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 Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl Look for a sysctl call to get the list of network interfaces.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_MSG_CHECKING(for interface list sysctl)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_EGREP_CPP(found_rt_iflist, [
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson#include <sys/param.h>
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson#include <sys/sysctl.h>
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff#include <sys/socket.h>
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson#ifdef NET_RT_IFLIST
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonfound_rt_iflist
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson#endif
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson],
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [AC_MSG_RESULT(yes)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AC_DEFINE(HAVE_IFLIST_SYSCTL)],
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff [AC_MSG_RESULT(no)])
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl GNU libtool support
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David LawrenceAC_ARG_WITH(libtool,
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson [ --with-libtool use GNU libtool],
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence use_libtool="$withval", use_libtool="no")
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graffcase $use_libtool in
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson yes)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson AM_PROG_LIBTOOL
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson O=lo
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson A=la
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ;;
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson *)
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence O=o
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence A=a
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence LIBTOOL=
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence AC_SUBST(LIBTOOL)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson ;;
c801dd02ed98321f3ccab93c159a1dce61961c58Bob Halleyesac
c801dd02ed98321f3ccab93c159a1dce61961c58Bob HalleyAC_SUBST(O)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(A)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl IPv6
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl We do this checking after libtool so that we can put
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl the right suffix on the files.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_MSG_CHECKING(for IPv6 structures)
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_TRY_COMPILE([
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#include <sys/types.h>
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson#include <sys/socket.h>
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson#include <netinet/in.h>],
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_H="ipv6.h"
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 Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
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
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl the files.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
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"]
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson)
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 Gustafsson)
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"]
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff)
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 Gustafsson
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl Security Stuff
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_CHECK_FUNC(chroot, AC_DEFINE(HAVE_CHROOT))
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_CHECK_HEADERS(linux/capability.h)
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl Substitutions
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssondnl
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST(BIND9_TOP_BUILDDIR)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonBIND9_TOP_BUILDDIR=`pwd`
0c8649cea98afc061dd2938fd315df53b8fc35caAndreas Gustafsson
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"
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrenceelse
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson BIND9_ISC_BUILDINCLUDE=""
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff BIND9_DNS_BUILDINCLUDE=""
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson BIND9_OMAPI_BUILDINCLUDE=""
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonfi
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST_FILE(BIND9_INCLUDES)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonBIND9_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael GraffAC_SUBST_FILE(BIND9_MAKE_RULES)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonBIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST_FILE(BIND9_VERSION)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonBIND9_VERSION=$srcdir/version
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST_FILE(LIBISC_API)
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David LawrenceLIBISC_API=$srcdir/lib/isc/api
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST_FILE(LIBDNS_API)
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David LawrenceLIBDNS_API=$srcdir/lib/dns/api
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_SUBST_FILE(LIBOMAPI_API)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonLIBOMAPI_API=$srcdir/lib/omapi/api
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas GustafssonAC_OUTPUT(
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff make/rules
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson make/includes
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson make/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson make/mkdep
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/isc/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/isc/include/Makefile
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff lib/isc/include/isc/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/isc/include/isc/platform.h
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/isc/unix/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/isc/unix/include/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/isc/unix/include/isc/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/isc/nls/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/isc/pthreads/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/isc/pthreads/include/Makefile
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff lib/isc/pthreads/include/isc/Makefile
c801dd02ed98321f3ccab93c159a1dce61961c58Bob Halley lib/dns/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/dns/include/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/dns/include/dns/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/dns/sec/Makefile
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff lib/dns/sec/openssl/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/dns/sec/openssl/include/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/dns/sec/openssl/include/openssl/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/dns/sec/dnssafe/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/dns/sec/dst/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/dns/sec/dst/include/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/dns/sec/dst/include/dst/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/dns/config/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/omapi/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/omapi/include/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/omapi/include/omapi/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/tests/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/tests/include/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson lib/tests/include/tests/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson bin/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson bin/named/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson bin/named/unix/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson bin/tests/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson bin/tests/names/Makefile
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff bin/tests/master/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson bin/tests/rbt/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson bin/tests/db/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson bin/tests/tasks/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson bin/tests/timers/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson bin/tests/dst/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson bin/tests/mem/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson bin/tests/sockaddr/Makefile
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson)
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson