1999-03-06 03:55:54 +00:00
|
|
|
dnl Copyright (C) 1998, 1999 Internet Software Consortium.
|
|
|
|
dnl
|
|
|
|
dnl Permission to use, copy, modify, and distribute this software for any
|
|
|
|
dnl purpose with or without fee is hereby granted, provided that the above
|
|
|
|
dnl copyright notice and this permission notice appear in all copies.
|
|
|
|
dnl
|
|
|
|
dnl THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
|
|
|
dnl ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
|
|
|
dnl OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
|
|
|
dnl CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
|
|
dnl DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
|
|
dnl PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
|
|
|
dnl ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
|
|
dnl SOFTWARE.
|
1998-12-11 20:10:26 +00:00
|
|
|
|
1999-06-28 18:54:27 +00:00
|
|
|
AC_REVISION($Revision: 1.31 $)
|
1999-05-12 05:34:59 +00:00
|
|
|
|
|
|
|
AC_PREREQ(2.12)
|
1998-12-11 20:10:26 +00:00
|
|
|
|
|
|
|
AC_INIT(lib/dns/name.c)
|
|
|
|
AC_CONFIG_HEADER(config.h)
|
|
|
|
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
1999-04-29 05:19:29 +00:00
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
|
|
STD_CINCLUDES=""
|
|
|
|
STD_CDEFINES=""
|
|
|
|
STD_CWARNINGS=""
|
|
|
|
AC_SUBST(STD_CINCLUDES)
|
|
|
|
AC_SUBST(STD_CDEFINES)
|
|
|
|
AC_SUBST(STD_CWARNINGS)
|
|
|
|
|
1999-02-04 22:49:00 +00:00
|
|
|
dnl
|
|
|
|
dnl On these hosts, we really want to use cc, not gcc, even if it is
|
|
|
|
dnl found. The gcc that these systems have will not correctly handle
|
|
|
|
dnl pthreads.
|
|
|
|
dnl
|
|
|
|
dnl However, if the user sets $CC to be something, let that override
|
|
|
|
dnl our change.
|
|
|
|
dnl
|
|
|
|
if test "X$CC" = "X" ; then
|
|
|
|
case "$host" in
|
|
|
|
*-dec-osf*)
|
|
|
|
CC="cc"
|
|
|
|
;;
|
|
|
|
*-sun-solaris*)
|
|
|
|
CC="cc"
|
|
|
|
;;
|
|
|
|
*-hp-hpux*)
|
|
|
|
CC="cc"
|
|
|
|
;;
|
|
|
|
mips-sgi-irix*)
|
|
|
|
CC="cc"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
1999-05-12 05:34:59 +00:00
|
|
|
dnl
|
|
|
|
dnl NetBSD has two alternative pthreads implementations. Make the
|
|
|
|
dnl user choose one by saying --with-mit-pthreads or --with-ptl2
|
|
|
|
dnl if necessary.
|
|
|
|
dnl
|
|
|
|
|
|
|
|
case "$host" in
|
|
|
|
*-netbsd*)
|
|
|
|
CC="gcc"
|
|
|
|
AC_MSG_CHECKING(which thread library to use)
|
|
|
|
|
|
|
|
AC_ARG_WITH(mit-pthreads,
|
|
|
|
[ --with-mit-pthreads use the mit-pthreads thread library],
|
|
|
|
use_mit_pthreads="$withval", use_mit_pthreads="no")
|
|
|
|
|
|
|
|
AC_ARG_WITH(ptl2,
|
|
|
|
[ --with-ptl2 use the ptl2 thread library],
|
|
|
|
use_ptl2="$withval", use_ptl2="no")
|
|
|
|
|
|
|
|
dnl If user did not choose a thread library explicitly,
|
|
|
|
dnl try to choose one automatically. This will work when
|
|
|
|
dnl exactly one library is installed.
|
|
|
|
|
|
|
|
case "$use_mit_pthreads+$use_ptl2" in
|
|
|
|
no+no)
|
|
|
|
if test -d /usr/pkg/pthreads
|
|
|
|
then
|
|
|
|
use_mit_pthreads="yes"
|
|
|
|
fi
|
|
|
|
if test -d /usr/pkg/PTL
|
|
|
|
then
|
|
|
|
use_ptl2="yes"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$use_mit_pthreads+$use_ptl2" in
|
|
|
|
yes+no)
|
|
|
|
AC_MSG_RESULT(mit-pthreads)
|
|
|
|
pkg="/usr/pkg/pthreads"
|
|
|
|
lib1="-L$pkg/lib -Wl,-R$pkg/lib"
|
|
|
|
lib2="-lpthread -lm -lgcc -lpthread"
|
|
|
|
LIBS="$lib1 $lib2 $LIBS"
|
|
|
|
STD_CINCLUDES="-I$pkg/include"
|
|
|
|
;;
|
|
|
|
no+yes)
|
|
|
|
AC_MSG_RESULT(PTL2)
|
1999-05-22 10:38:10 +00:00
|
|
|
dnl pkg="/usr/pkg/PTL"
|
|
|
|
dnl LIBS="-L/usr/pkg/lib -lPTL $LIBS"
|
|
|
|
dnl STD_CINCLUDES="-nostdinc -idirafter $pkg/include"
|
|
|
|
CC=ptlgcc
|
1999-05-12 05:34:59 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_ERROR([no thread library.
|
|
|
|
|
|
|
|
Please choose a thread library using one of
|
|
|
|
|
|
|
|
configure --with-mit-pthreads
|
|
|
|
configure --with-ptl2
|
|
|
|
])
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
1998-12-11 20:10:26 +00:00
|
|
|
AC_PROG_CC
|
1999-06-08 12:47:36 +00:00
|
|
|
AC_PROG_YACC
|
1998-12-11 20:10:26 +00:00
|
|
|
|
|
|
|
AC_HEADER_STDC
|
1999-06-28 18:27:48 +00:00
|
|
|
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h)
|
1998-12-11 20:10:26 +00:00
|
|
|
|
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_HEADER_TIME
|
|
|
|
|
1998-12-14 20:15:05 +00:00
|
|
|
AC_CHECK_LIB(pthread, pthread_create,,
|
|
|
|
AC_CHECK_LIB(pthread, __pthread_create)
|
1999-02-02 01:17:05 +00:00
|
|
|
AC_CHECK_LIB(pthread, __pthread_create_system)
|
1998-12-14 20:15:05 +00:00
|
|
|
)
|
1999-02-06 08:48:08 +00:00
|
|
|
|
1999-06-08 12:47:36 +00:00
|
|
|
|
|
|
|
dnl For FreeBSD which has no libpthread but instead libc_r
|
|
|
|
if test "$ac_cv_lib_pthread" != "yes"; then
|
1999-06-23 02:51:39 +00:00
|
|
|
AC_CHECK_LIB(c_r, pthread_create)
|
1999-06-08 12:47:36 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
1999-05-12 09:46:24 +00:00
|
|
|
dnl
|
|
|
|
dnl We'd like to use sigwait() too
|
|
|
|
dnl
|
|
|
|
AC_CHECK_LIB(pthread, sigwait,
|
|
|
|
AC_DEFINE(HAVE_SIGWAIT),
|
|
|
|
AC_CHECK_LIB(pthread, _Psigwait,
|
|
|
|
AC_DEFINE(HAVE_SIGWAIT),)
|
|
|
|
)
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Make sure we get the right sigwait() semantics...
|
|
|
|
dnl
|
|
|
|
case "$host" in
|
|
|
|
*-sun-solaris*)
|
|
|
|
AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
1999-06-23 02:51:39 +00:00
|
|
|
dnl
|
|
|
|
dnl NLS
|
|
|
|
dnl
|
|
|
|
AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
|
|
|
|
|
1999-05-12 22:35:40 +00:00
|
|
|
dnl
|
1999-05-12 09:46:24 +00:00
|
|
|
dnl BSDI 3.1 needs pthread_init() to be called before certain pthreads
|
1999-05-12 22:35:40 +00:00
|
|
|
dnl calls. LinuxThreads requires some changes to the way we deal with
|
|
|
|
dnl signals.
|
1999-05-12 09:46:24 +00:00
|
|
|
dnl
|
|
|
|
case "$host" in
|
|
|
|
*-bsdi3.1*)
|
|
|
|
AC_DEFINE(NEED_PTHREAD_INIT)
|
|
|
|
;;
|
1999-05-12 22:35:40 +00:00
|
|
|
*-linux*)
|
|
|
|
AC_DEFINE(HAVE_LINUXTHREADS)
|
|
|
|
;;
|
1999-05-12 09:46:24 +00:00
|
|
|
esac
|
|
|
|
|
1999-02-06 08:48:08 +00:00
|
|
|
dnl
|
1999-06-08 12:47:36 +00:00
|
|
|
|
1999-02-06 08:52:38 +00:00
|
|
|
dnl -lxnet buys us one big porting headache... standards, gotta love 'em.
|
1999-02-06 08:48:08 +00:00
|
|
|
dnl
|
1999-02-06 08:52:38 +00:00
|
|
|
dnl AC_CHECK_LIB(xnet, socket, ,
|
|
|
|
dnl AC_CHECK_LIB(socket, socket)
|
|
|
|
dnl AC_CHECK_LIB(nsl, inet_ntoa)
|
|
|
|
dnl )
|
1999-02-06 08:48:08 +00:00
|
|
|
dnl
|
1999-02-06 08:52:38 +00:00
|
|
|
dnl Use this for now, instead:
|
|
|
|
dnl
|
1999-02-11 06:38:12 +00:00
|
|
|
case "$host" in
|
|
|
|
mips-sgi-irix*)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_CHECK_LIB(socket, socket)
|
|
|
|
AC_CHECK_LIB(nsl, inet_ntoa)
|
|
|
|
;;
|
|
|
|
esac
|
1999-01-22 04:35:11 +00:00
|
|
|
|
|
|
|
AC_CHECK_FUNC(inet_ntop, ,
|
|
|
|
[ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.o"
|
|
|
|
AC_SUBST(ISC_EXTRA_OBJS)
|
|
|
|
AC_DEFINE(NEED_INET_NTOP)]
|
|
|
|
)
|
1999-02-02 00:38:23 +00:00
|
|
|
AC_CHECK_FUNC(inet_pton, ,
|
|
|
|
[ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.o"
|
|
|
|
AC_SUBST(ISC_EXTRA_OBJS)
|
|
|
|
AC_DEFINE(NEED_INET_PTON)]
|
|
|
|
)
|
1999-01-30 04:27:48 +00:00
|
|
|
AC_CHECK_FUNC(inet_aton, ,
|
|
|
|
[ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.o"
|
|
|
|
AC_SUBST(ISC_EXTRA_OBJS)
|
|
|
|
AC_DEFINE(NEED_INET_ATON)]
|
|
|
|
)
|
1999-01-22 04:35:11 +00:00
|
|
|
|
1998-12-11 20:10:26 +00:00
|
|
|
if test "X$GCC" = "Xyes"; then
|
1999-02-06 08:48:08 +00:00
|
|
|
STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes"
|
1998-12-12 01:34:50 +00:00
|
|
|
case "$host" in
|
|
|
|
*-sun-solaris*)
|
|
|
|
LIBS="$LIBS -lthread"
|
|
|
|
;;
|
|
|
|
esac
|
1998-12-11 20:10:26 +00:00
|
|
|
else
|
|
|
|
case "$host" in
|
1998-12-14 20:15:05 +00:00
|
|
|
*-dec-osf*)
|
1998-12-16 01:54:36 +00:00
|
|
|
CC="$CC -pthread"
|
1998-12-11 20:10:26 +00:00
|
|
|
;;
|
1998-12-12 01:34:50 +00:00
|
|
|
*-sun-solaris*)
|
|
|
|
CC="$CC -mt"
|
|
|
|
;;
|
1999-02-02 01:17:05 +00:00
|
|
|
*-hp-hpux*)
|
|
|
|
CC="$CC"
|
|
|
|
;;
|
1998-12-11 20:10:26 +00:00
|
|
|
esac
|
|
|
|
fi
|
1999-02-06 08:48:08 +00:00
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Networking specifics.
|
|
|
|
dnl
|
1999-02-02 00:38:23 +00:00
|
|
|
case "$host" in
|
|
|
|
*-sun-solaris*)
|
|
|
|
AC_DEFINE(NEED_AF_INET6)
|
|
|
|
;;
|
1999-02-02 01:17:05 +00:00
|
|
|
*-hp-hpux*)
|
|
|
|
AC_DEFINE(NEED_AF_INET6)
|
|
|
|
;;
|
1999-05-12 05:34:59 +00:00
|
|
|
*-dec-osf*)
|
1999-05-20 17:55:10 +00:00
|
|
|
dnl Turn on 4.4BSD style sa_len support.
|
|
|
|
dnl (Disabled for now because it is incompatible
|
|
|
|
dnl with the use of send() and recv()).
|
|
|
|
dnl AC_DEFINE(_SOCKADDR_LEN)
|
1999-05-12 05:34:59 +00:00
|
|
|
;;
|
1999-02-02 00:38:23 +00:00
|
|
|
esac
|
1998-12-11 20:10:26 +00:00
|
|
|
|
1999-05-12 05:34:59 +00:00
|
|
|
dnl Look for a 4.4BSD-style sa_len member in struct sockaddr.
|
1999-06-28 18:54:27 +00:00
|
|
|
dnl Note: the test used when cross-compiling usually works, but can
|
|
|
|
dnl have false positives (which is why we AC_TRY_RUN).
|
1999-05-12 05:34:59 +00:00
|
|
|
|
1999-05-04 05:06:28 +00:00
|
|
|
AC_MSG_CHECKING(for sa_len in struct sockaddr)
|
1999-06-28 18:54:27 +00:00
|
|
|
AC_TRY_RUN([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
int main() { struct sockaddr sa; sa.sa_len = 0; return (0); }],
|
1999-05-04 05:06:28 +00:00
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_SA_LEN)],
|
1999-06-28 18:54:27 +00:00
|
|
|
AC_MSG_RESULT(no),
|
|
|
|
AC_EGREP_HEADER([sa_len[^a-z0-9_]], sys/socket.h,
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_SA_LEN)],
|
|
|
|
[AC_MSG_RESULT(no)]))
|
1999-05-04 05:06:28 +00:00
|
|
|
|
1999-02-18 01:24:32 +00:00
|
|
|
AC_SUBST(BIND9_TOP_BUILDDIR)
|
|
|
|
BIND9_TOP_BUILDDIR=`pwd`
|
|
|
|
|
1998-12-11 20:10:26 +00:00
|
|
|
AC_SUBST_FILE(BIND9_MAKE_RULES)
|
1999-02-18 01:24:32 +00:00
|
|
|
BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
|
1998-12-11 20:10:26 +00:00
|
|
|
|
|
|
|
AC_SUBST_FILE(BIND9_VERSION)
|
|
|
|
BIND9_VERSION=$srcdir/version
|
|
|
|
|
|
|
|
AC_OUTPUT(
|
1998-12-12 01:34:50 +00:00
|
|
|
make/rules
|
1998-12-11 20:10:26 +00:00
|
|
|
Makefile
|
1998-12-12 01:34:50 +00:00
|
|
|
make/Makefile
|
1998-12-11 20:10:26 +00:00
|
|
|
lib/Makefile
|
|
|
|
lib/isc/Makefile
|
|
|
|
lib/isc/include/Makefile
|
|
|
|
lib/isc/include/isc/Makefile
|
|
|
|
lib/isc/unix/Makefile
|
|
|
|
lib/isc/unix/include/Makefile
|
|
|
|
lib/isc/unix/include/isc/Makefile
|
1999-06-23 02:51:39 +00:00
|
|
|
lib/isc/nls/Makefile
|
1998-12-11 20:10:26 +00:00
|
|
|
lib/isc/pthreads/Makefile
|
|
|
|
lib/isc/pthreads/include/Makefile
|
|
|
|
lib/isc/pthreads/include/isc/Makefile
|
|
|
|
lib/dns/Makefile
|
|
|
|
lib/dns/include/Makefile
|
|
|
|
lib/dns/include/dns/Makefile
|
1999-05-01 01:41:14 +00:00
|
|
|
lib/tests/Makefile
|
|
|
|
lib/tests/include/Makefile
|
|
|
|
lib/tests/include/tests/Makefile
|
1998-12-11 20:10:26 +00:00
|
|
|
bin/Makefile
|
1999-01-19 19:43:25 +00:00
|
|
|
bin/named/Makefile
|
1999-05-01 01:41:14 +00:00
|
|
|
bin/tests/Makefile
|
|
|
|
bin/tests/names/Makefile
|
|
|
|
bin/tests/master/Makefile
|
|
|
|
bin/tests/rbt/Makefile
|
1998-12-11 20:10:26 +00:00
|
|
|
)
|