configure.in revision e91cd8b6ce6ba79d9b3ddd13494b6f9a89351428
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# Copyright (C) 1998-2000 Internet Software Consortium.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# purpose with or without fee is hereby granted, provided that the above
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# copyright notice and this permission notice appear in all copies.
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
135bcc2e42a94543f11af2a4196b13552ab46d89Automatic Updater# OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein# CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence# PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceAC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrenceesyscmd([sed "s/^/# /" COPYRIGHT])dnl
f44202ab640d22e17b4c74bdad7817622918bd27Mark AndrewsAC_DIVERT_POP()dnl
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian WellingtonAC_REVISION($Revision: 1.166 $)
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian WellingtonAC_PREREQ(2.13)
7dde2780aeae0da4e965d823578a604d8ce1215fAndreas GustafssonAC_CONFIG_HEADER(config.h)
f5862b6f22761d83c230e17f7d443211df19e52cBrian WellingtonAC_CANONICAL_HOST
9259fed3d8ac5d1efa9b5a647969e40c9c934484Andreas GustafssonAC_PROG_MAKE_SET
45e1bd63587102c3bb361eaca42ee7b714fb3542Mark AndrewsAC_PROG_INSTALL
45e1bd63587102c3bb361eaca42ee7b714fb3542Mark AndrewsAC_SUBST(STD_CINCLUDES)
c6d4f781529d2f28693546b25b2967d44ec89e60Mark AndrewsAC_SUBST(STD_CDEFINES)
45e1bd63587102c3bb361eaca42ee7b714fb3542Mark AndrewsAC_SUBST(STD_CWARNINGS)
45e1bd63587102c3bb361eaca42ee7b714fb3542Mark AndrewsAC_SUBST(CCOPT)
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonAC_PATH_PROG(AR, ar)
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonAC_SUBST(ARFLAGS)
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews# The POSIX ln(1) program. Non-POSIX systems may substitute
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# "copy" or something.
45e1bd63587102c3bb361eaca42ee7b714fb3542Mark Andrews AC_MSG_ERROR([
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafssonar program not found. Please fix your PATH to include the directory in
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellingtonwhich ar resides, or set AR in the environment with the full path to ar.
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas GustafssonAC_PATH_PROGS(ETAGS, etags emacs-etags)
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian WellingtonAC_SUBST(ETAGS)
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# Perl is optional; it is used only by some of the system test scripts.
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian WellingtonAC_PATH_PROGS(PERL, perl5 perl)
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian WellingtonAC_SUBST(PERL)
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence# Special processing of paths depending on whether --prefix,
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence# --sysconfdir or --localstatedir arguments were given. What's
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence# desired is some compatability with the way previous versions
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington# of BIND built; they defaulted to /usr/local for most parts of
6f7abb89ec22aef5eda40ed60fcf605a42b78d4dMark Andrews# the installation, but named.boot/named.conf was in /etc
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# So ... if none of --prefix, --sysconfdir or --localstatedir are
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉# specified, set things up that way. If --prefix is given, use
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# it for sysconfdir and localstatedir the way configure normally
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# would. To change the prefix for everything but leave named.conf
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# in /etc or named.pid in /var/run, then do this the usual configure way:
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence# ./configure --prefix=/somewhere --sysconfdir=/etc
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence# ./configure --prefix=/somewhere --localstatedir=/var
fb64c9cf757422c5473764521ffc7c6111b8c821Brian Wellington# To put named.conf and named.pid in /usr/local with everything else,
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews# set the prefix explicitly to /usr/local even though that's the default:
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews# ./configure --prefix=/usr/local
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrewscase "$prefix" in
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington case "$sysconfdir" in
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington '${prefix}/etc')
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson sysconfdir=/etc
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington case "$localstatedir" in
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson '${prefix}/var')
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson localstatedir=/var
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# Make sure INSTALL uses an absolute path, else it will be wrong in all
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence# Makefiles, since they use make/rules.in and INSTALL will be adjusted by
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# configure based on the location of the file where it is substituted.
fb01226bcd598c36b5edc566489c890c39f03ed3Brian Wellington# Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate
7a184cd4e5a54a4e530f9bff8a4e46be392d0b52Brian Wellington# subdirectory of install-sh, This relative path will be wrong for all
fb01226bcd598c36b5edc566489c890c39f03ed3Brian Wellington# directories more than one level down from install-sh.
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafssoncase "$INSTALL" in
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews # Not all systems have dirname.
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews changequote({, })
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`"
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson changequote([, ])
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson ac_prog="`echo $INSTALL | sed 's%.*/%%'`"
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson test "$ac_dir" = "$ac_prog" && ac_dir=.
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`"
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington INSTALL="$ac_dir/$ac_prog"
9df7d74e421cf715c6e3cbbad2aba6d33a5d1c9bBrian Wellington# On these hosts, we really want to use cc, not gcc, even if it is
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# found. The gcc that these systems have will not correctly handle
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson# However, if the user sets $CC to be something, let that override
45e1bd63587102c3bb361eaca42ee7b714fb3542Mark Andrews# our change.
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafssonif test "X$CC" = "X" ; then
45e1bd63587102c3bb361eaca42ee7b714fb3542Mark Andrews case "$host" in
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington # Use Sun's cc if it is available, but watch
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt # out for /usr/ucb/cc; it will never be the right
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt # compiler to use.
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington # If setting CC here fails, the AC_PROG_CC done
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington # below might still find gcc.
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington for ac_dir in $PATH; do
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington test -z "$ac_dir" && ac_dir=.
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson case "$ac_dir" in
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington if test -f "$ac_dir/cc"; then
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian Wellington IFS="$ac_save_ifs"
f93d33e24fdf76eb2558168f018b8992bcfc5681Andreas Gustafsson mips-sgi-irix*)
DST_OPENSSL_INC='-I${srcdir}/../openssl/include'
# DNS_OPENSSL_LIBS="-L/usr/pkg/lib -lssl -lcrypto"
# DST_OPENSSL_INC='-I/usr/pkg/include'
: ${LOCALBASE:=/usr/pkg}
AC_MSG_RESULT(mit-pthreads/unproven-pthreads)
if test ! -d $LOCALBASE/pthreads
Please install the devel/unproven-pthreads package and rerun configure.
pkg="$LOCALBASE/pthreads"
CPPFLAGS="$CPPFLAGS -I$pkg/include"
STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include"
# certain pthreads calls. This is deprecated in BSD/OS 4.1.
MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
# from lib/dns/sec/{dnssafe,openssl}.
#include <sys/types.h>
#include <sys/socket.h>],
[struct sockaddr sa; sa.sa_len = 0; return (0);],
#include <sys/types.h>
#include <sys/socket.h>],
[struct msghdr msg; msg.msg_flags = 0; return (0);],
#include <sys/types.h>
#include <netinet/in.h>],
#include <netdb.h>],
#include <netdb.h>],
#include <netdb.h>],
#include <netdb.h>
#include <netdb.h>],
#include <netdb.h>],
#include <netdb.h>
AC_MSG_CHECKING(for h_errno in netdb.h)
#include <netdb.h>],
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>],
[ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]],
kame_path=/usr/local/v6
if test -f $kame_path/lib/libinet6.a; then
AC_MSG_RESULT($kame_path/lib/libinet6.a)
LIBS="-L$kame_path/lib -linet6 $LIBS"
AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
# netinet6/in6.h is needed for.
isc_netinet6in6_hack="#include <netinet6/in6.h>"
# This is similar to the netinet6/in6.h issue.
isc_netinetin6_hack="#include <netinet/in6.h>"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
[struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
ISC_IPV6_H="ipv6.h"
ISC_ISCIPV6_O="unix/ipv6.$O"
ISC_IPV6_C="ipv6.c"
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>],
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>],
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>],
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c"
ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS print.c"
AC_CHECK_HEADERS(linux/capability.h)
AC_CHECK_HEADERS(linux/prctl.h)
# Shut up a -Wmissing-prototypes warning from <stdio.h>.
BIND9_ISC_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/isc/include"
BIND9_DNS_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/dns/include"
BIND9_OMAPI_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/omapi/include"
BIND9_LWRES_BUILDINCLUDE="-I${BIND9_TOP_BUILDDIR}/lib/lwres/include"
BIND9_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
LIBISC_API=$srcdir/lib/isc/api
LIBDNS_API=$srcdir/lib/dns/api
LIBLWRES_API=$srcdir/lib/lwres/api
LIBOMAPI_API=$srcdir/lib/omapi/api
chmod a+x isc-config.sh