171 lines
3.7 KiB
Plaintext
171 lines
3.7 KiB
Plaintext
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.
|
|
|
|
AC_REVISION($Revision: 1.19 $)
|
|
|
|
AC_INIT(lib/dns/name.c)
|
|
AC_CONFIG_HEADER(config.h)
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
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
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)
|
|
|
|
AC_C_CONST
|
|
AC_C_INLINE
|
|
AC_TYPE_SIZE_T
|
|
AC_HEADER_TIME
|
|
|
|
AC_CHECK_LIB(pthread, pthread_create,,
|
|
AC_CHECK_LIB(pthread, __pthread_create)
|
|
AC_CHECK_LIB(pthread, __pthread_create_system)
|
|
)
|
|
|
|
dnl
|
|
dnl -lxnet buys us one big porting headache... standards, gotta love 'em.
|
|
dnl
|
|
dnl AC_CHECK_LIB(xnet, socket, ,
|
|
dnl AC_CHECK_LIB(socket, socket)
|
|
dnl AC_CHECK_LIB(nsl, inet_ntoa)
|
|
dnl )
|
|
dnl
|
|
dnl Use this for now, instead:
|
|
dnl
|
|
case "$host" in
|
|
mips-sgi-irix*)
|
|
;;
|
|
*)
|
|
AC_CHECK_LIB(socket, socket)
|
|
AC_CHECK_LIB(nsl, inet_ntoa)
|
|
;;
|
|
esac
|
|
|
|
AC_CHECK_FUNC(inet_ntop, ,
|
|
[ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.o"
|
|
AC_SUBST(ISC_EXTRA_OBJS)
|
|
AC_DEFINE(NEED_INET_NTOP)]
|
|
)
|
|
AC_CHECK_FUNC(inet_pton, ,
|
|
[ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.o"
|
|
AC_SUBST(ISC_EXTRA_OBJS)
|
|
AC_DEFINE(NEED_INET_PTON)]
|
|
)
|
|
AC_CHECK_FUNC(inet_aton, ,
|
|
[ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.o"
|
|
AC_SUBST(ISC_EXTRA_OBJS)
|
|
AC_DEFINE(NEED_INET_ATON)]
|
|
)
|
|
|
|
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)
|
|
if test "X$GCC" = "Xyes"; then
|
|
STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes"
|
|
case "$host" in
|
|
*-sun-solaris*)
|
|
LIBS="$LIBS -lthread"
|
|
;;
|
|
esac
|
|
else
|
|
case "$host" in
|
|
*-dec-osf*)
|
|
CC="$CC -pthread"
|
|
;;
|
|
*-sun-solaris*)
|
|
CC="$CC -mt"
|
|
;;
|
|
*-hp-hpux*)
|
|
CC="$CC"
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
dnl
|
|
dnl Networking specifics.
|
|
dnl
|
|
case "$host" in
|
|
*-sun-solaris*)
|
|
AC_DEFINE(NEED_AF_INET6)
|
|
;;
|
|
*-hp-hpux*)
|
|
AC_DEFINE(NEED_AF_INET6)
|
|
;;
|
|
esac
|
|
|
|
AC_SUBST(BIND9_TOP_BUILDDIR)
|
|
BIND9_TOP_BUILDDIR=`pwd`
|
|
|
|
AC_SUBST_FILE(BIND9_MAKE_RULES)
|
|
BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
|
|
|
|
AC_SUBST_FILE(BIND9_VERSION)
|
|
BIND9_VERSION=$srcdir/version
|
|
|
|
AC_OUTPUT(
|
|
make/rules
|
|
Makefile
|
|
make/Makefile
|
|
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
|
|
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
|
|
bin/Makefile
|
|
bin/tests/Makefile
|
|
bin/named/Makefile
|
|
)
|