1 # Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
2 # Copyright (C) 2001, 2003 Internet Software Consortium.
4 # Permission to use, copy, modify, and/or distribute this software for any
5 # purpose with or without fee is hereby granted, provided that the above
6 # copyright notice and this permission notice appear in all copies.
8 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 # PERFORMANCE OF THIS SOFTWARE.
16 AC_REVISION(Revision: 1.145)
18 AC_INIT(resolv/herror.c)
21 AC_CONFIG_HEADER(config.h)
29 AC_SUBST(STD_CINCLUDES)
30 AC_SUBST(STD_CDEFINES)
31 AC_SUBST(STD_CWARNINGS)
39 AC_PATH_PROG(TBL, tbl)
42 AC_PATH_PROG(NROFF, nroff)
45 AC_PATH_PROG(SED, sed)
51 # The POSIX ln(1) program. Non-POSIX systems may substitute
52 # "copy" or something.
59 ar program not found. Please fix your PATH to include the directory in
60 which ar resides, or set AR in the environment with the full path to ar.
69 AC_PATH_PROGS(ETAGS, etags emacs-etags)
72 # Some systems, e.g. RH7, have the Exuberant Ctags etags instead of
73 # GNU emacs etags, and it requires the -L flag.
75 if test "X$ETAGS" != "X"; then
76 AC_MSG_CHECKING(for Exuberant Ctags etags)
77 if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then
87 # Perl is optional; it is used only by some of the system test scripts.
89 AC_PATH_PROGS(PERL, perl5 perl)
93 # isc/list.h and others clash with BIND 9 and system header files.
94 # Install into non-shared directory.
98 includedir='${prefix}/include/bind'
102 # -lbind can clash with system version. Install into non-shared directory.
106 libdir='${prefix}/lib/bind'
111 # Make sure INSTALL uses an absolute path, else it will be wrong in all
112 # Makefiles, since they use make/rules.in and INSTALL will be adjusted by
113 # configure based on the location of the file where it is substituted.
114 # Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate
115 # subdirectory of install-sh, This relative path will be wrong for all
116 # directories more than one level down from install-sh.
123 # Not all systems have dirname.
126 ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`"
129 ac_prog="`echo $INSTALL | sed 's%.*/%%'`"
130 test "$ac_dir" = "$ac_prog" && ac_dir=.
131 test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`"
132 INSTALL="$ac_dir/$ac_prog"
137 # On these hosts, we really want to use cc, not gcc, even if it is
138 # found. The gcc that these systems have will not correctly handle
141 # However, if the user sets $CC to be something, let that override
144 if test "X$CC" = "X" ; then
150 # Use Sun's cc if it is available, but watch
151 # out for /usr/ucb/cc; it will never be the right
154 # If setting CC here fails, the AC_PROG_CC done
155 # below might still find gcc.
156 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
157 for ac_dir in $PATH; do
158 test -z "$ac_dir" && ac_dir=.
164 if test -f "$ac_dir/cc"; then
187 AC_CHECK_HEADERS(fcntl.h db.h paths.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/timers.h stropts.h memory.h)
192 AC_CHECK_TYPE(ssize_t,signed)
193 AC_CHECK_TYPE(uintptr_t,unsigned long)
197 # check for clock_gettime() in librt
199 AC_CHECK_LIB(rt, clock_gettime)
202 # check for MD5Init() in libmd5
204 AC_CHECK_LIB(md5, MD5Init)
207 # check if we need to #include sys/select.h explicitly
209 case $ac_cv_header_unistd_h in
211 AC_MSG_CHECKING(if unistd.h defines fd_set)
213 #include <unistd.h>],
214 [fd_set read_set; return (0);],
216 ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"
219 case ac_cv_header_sys_select_h in
221 ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
224 AC_MSG_ERROR([need either working unistd.h or sys/select.h])
230 case ac_cv_header_sys_select_h in
232 ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
235 AC_MSG_ERROR([need either unistd.h or sys/select.h])
240 AC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH)
243 # Find the machine's endian flavor.
247 AC_ARG_WITH(irs-gr,[ --with-irs-gr Build with WANT_IRS_GR],
248 want_irs_gr="$withval", want_irs_gr="no")
249 case "$want_irs_gr" in
250 yes) WANT_IRS_GR="#define WANT_IRS_GR 1"
251 WANT_IRS_GR_OBJS="\${WANT_IRS_GR_OBJS}"
253 *) WANT_IRS_GR="#undef WANT_IRS_GR" WANT_IRS_GR_OBJS="";;
255 AC_SUBST(WANT_IRS_GR)
256 AC_SUBST(WANT_IRS_GR_OBJS)
258 AC_ARG_WITH(irs-pw,[ --with-irs-pw Build with WANT_IRS_PW],
259 want_irs_pw="$withval", want_irs_pw="no")
260 case "$want_irs_pw" in
261 yes) WANT_IRS_PW="#define WANT_IRS_PW 1"
262 WANT_IRS_PW_OBJS="\${WANT_IRS_PW_OBJS}";;
263 *) WANT_IRS_PW="#undef WANT_IRS_PW" WANT_IRS_PW_OBJS="";;
265 AC_SUBST(WANT_IRS_PW)
266 AC_SUBST(WANT_IRS_PW_OBJS)
268 AC_ARG_WITH(irs-nis,[ --with-irs-nis Build with WANT_IRS_NIS],
269 want_irs_nis="$withval", want_irs_nis="no")
270 case "$want_irs_nis" in
272 WANT_IRS_NIS="#define WANT_IRS_NIS 1"
273 WANT_IRS_NIS_OBJS="\${WANT_IRS_NIS_OBJS}"
274 case "$want_irs_gr" in
276 WANT_IRS_NISGR_OBJS="\${WANT_IRS_NISGR_OBJS}";;
278 WANT_IRS_NISGR_OBJS="";;
280 case "$want_irs_pw" in
282 WANT_IRS_NISPW_OBJS="\${WANT_IRS_NISPW_OBJS}";;
284 WANT_IRS_NISPW_OBJS="";;
288 WANT_IRS_NIS="#undef WANT_IRS_NIS"
290 WANT_IRS_NISGR_OBJS=""
291 WANT_IRS_NISPW_OBJS="";;
293 AC_SUBST(WANT_IRS_NIS)
294 AC_SUBST(WANT_IRS_NIS_OBJS)
295 AC_SUBST(WANT_IRS_NISGR_OBJS)
296 AC_SUBST(WANT_IRS_NISPW_OBJS)
303 main() { return(!have_db_h); }
305 WANT_IRS_DBPW_OBJS="\${WANT_IRS_DBPW_OBJS}"
307 WANT_IRS_DBPW_OBJS=""
309 WANT_IRS_DBPW_OBJS=""
311 AC_SUBST(WANT_IRS_DBPW_OBJS)
314 # was --with-randomdev specified?
316 AC_MSG_CHECKING(for random device)
317 AC_ARG_WITH(randomdev,
318 [ --with-randomdev=PATH Specify path for random device],
319 use_randomdev="$withval", use_randomdev="unspec")
321 case "$use_randomdev" in
325 devrandom=/dev/srandom
328 devrandom=/dev/random
331 AC_MSG_RESULT($devrandom)
332 AC_CHECK_FILE($devrandom,
333 AC_DEFINE_UNQUOTED(PATH_RANDOMDEV,
337 AC_MSG_ERROR([--with-randomdev must specify a path])
340 AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, "$use_randomdev")
341 AC_MSG_RESULT(using "$use_randomdev")
345 sinclude(./config.threads.in)dnl
349 if test "X$GCC" = "Xyes"; then
353 CCOPT="$CCOPT -pthread"
354 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
358 CCOPT="$CCOPT -pthread"
361 LIBS="$LIBS -lthread"
364 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
371 CCOPT="$CCOPT -pthread"
378 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
382 CCOPT="$CCOPT -Kthread"
386 AC_DEFINE(_REENTRANT)
387 ALWAYS_DEFINES="-D_REENTRANT"
388 DO_PTHREADS="#define DO_PTHREADS 1"
389 WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}"
390 WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}"
393 WANT_IRS_THREADS_OBJS="";;
395 WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}";;
397 WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}"
401 # We'd like to use sigwait() too
403 AC_CHECK_FUNC(sigwait,
404 AC_DEFINE(HAVE_SIGWAIT),
405 AC_CHECK_LIB(c, sigwait,
406 AC_DEFINE(HAVE_SIGWAIT),
407 AC_CHECK_LIB(pthread, sigwait,
408 AC_DEFINE(HAVE_SIGWAIT),
409 AC_CHECK_LIB(pthread, _Psigwait,
410 AC_DEFINE(HAVE_SIGWAIT),))))
412 AC_CHECK_FUNC(pthread_attr_getstacksize,
413 AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
416 # Additional OS-specific issues related to pthreads and sigwait.
420 # One more place to look for sigwait.
423 AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),)
426 # BSDI 3.0 through 4.0.1 needs pthread_init() to be
427 # called before certain pthreads calls. This is deprecated
430 *-bsdi3.*|*-bsdi4.0*)
431 AC_DEFINE(NEED_PTHREAD_INIT)
434 # LinuxThreads requires some changes to the way we
438 AC_DEFINE(HAVE_LINUXTHREADS)
441 # Ensure the right sigwait() semantics on Solaris and make
442 # sure we call pthread_setconcurrency.
445 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
446 AC_CHECK_FUNC(pthread_setconcurrency,
447 AC_DEFINE(CALL_PTHREAD_SETCONCURRENCY))
448 AC_DEFINE(POSIX_GETPWUID_R)
449 AC_DEFINE(POSIX_GETPWNAM_R)
450 AC_DEFINE(POSIX_GETGRGID_R)
451 AC_DEFINE(POSIX_GETGRNAM_R)
454 AC_DEFINE(NEED_ENDNETGRENT_R)
455 AC_DEFINE(_PTHREADS_DRAFT4)
458 # UnixWare does things its own way.
461 AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
466 # Look for sysconf to allow detection of the number of processors.
468 AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
472 DO_PTHREADS="#undef DO_PTHREADS"
473 WANT_IRS_THREADSGR_OBJS=""
474 WANT_IRS_THREADSPW_OBJS=""
475 WANT_IRS_THREADS_OBJS=""
480 AC_SUBST(ALWAYS_DEFINES)
481 AC_SUBST(DO_PTHREADS)
482 AC_SUBST(WANT_IRS_THREADSGR_OBJS)
483 AC_SUBST(WANT_IRS_THREADSPW_OBJS)
484 AC_SUBST(WANT_IRS_THREADS_OBJS)
485 AC_SUBST(WANT_THREADS_OBJS)
487 AC_CHECK_FUNC(strlcat, AC_DEFINE(HAVE_STRLCAT))
488 AC_CHECK_FUNC(memmove, AC_DEFINE(HAVE_MEMMOVE))
489 AC_CHECK_FUNC(memchr, AC_DEFINE(HAVE_MEMCHR))
490 AC_CHECK_FUNC(strtoul, , AC_DEFINE(NEED_STRTOUL))
492 AC_CHECK_FUNC(if_nametoindex,
493 [USE_IFNAMELINKID="#define USE_IFNAMELINKID 1"],
494 [USE_IFNAMELINKID="#undef USE_IFNAMELINKID"])
495 AC_SUBST(USE_IFNAMELINKID)
497 ISC_THREAD_DIR=$thread_dir
498 AC_SUBST(ISC_THREAD_DIR)
500 AC_CHECK_FUNC(daemon,
501 [DAEMON_OBJS="" NEED_DAEMON="#undef NEED_DAEMON"]
503 [DAEMON_OBJS="\${DAEMON_OBJS}" NEED_DAEMON="#define NEED_DAEMON 1"]
505 AC_SUBST(DAEMON_OBJS)
506 AC_SUBST(NEED_DAEMON)
508 AC_CHECK_FUNC(strsep,
509 [STRSEP_OBJS="" NEED_STRSEP="#undef NEED_STRSEP"]
511 [STRSEP_OBJS="\${STRSEP_OBJS}" NEED_STRSEP="#define NEED_STRSEP 1"]
513 AC_SUBST(STRSEP_OBJS)
514 AC_SUBST(NEED_STRSEP)
516 AC_CHECK_FUNC(strerror, [NEED_STRERROR="#undef NEED_STRERROR"],
517 [NEED_STRERROR="#define NEED_STRERROR 1"])
518 AC_SUBST(NEED_STRERROR)
520 if test -n "$NEED_STRERROR"
522 AC_MSG_CHECKING([for extern char * sys_errlist[]])
523 AC_TRY_LINK([ extern int sys_nerr; extern char *sys_errlist[]; ],
524 [ const char *p = sys_errlist[0]; ],
526 AC_DEFINE(USE_SYSERROR_LIST),
531 # flockfile is usually provided by pthreads, but we may want to use it
532 # even if compiled with --disable-threads.
534 AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),)
537 # Indicate what the final decision was regarding threads.
539 AC_MSG_CHECKING(whether to build with threads)
540 if $use_threads; then
547 # End of pthreads stuff.
551 # Additional compiler settings.
555 IRIX_DNSSEC_WARNINGS_HACK=""
557 if test "X$GCC" = "Xyes"; then
558 AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing)
560 CFLAGS=-fno-strict-aliasing
561 AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no])
563 if test "$FNOSTRICTALIASING" = "yes"; then
565 STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing"
568 STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith"
579 # The version of the C compiler that constantly warns about
580 # 'const' as well as alignment issues is unfortunately not
581 # able to be discerned via the version of the operating
582 # system, nor does cc have a version flag.
583 case "`$CC +W 123 2>&1`" in
588 # Turn off the pointlessly noisy warnings.
589 STD_CWARNINGS="+w1 +W 474,530,2193,2236"
592 CCOPT="$CCOPT -Ae -z"
593 LIBS="-Wl,+vnocompatwarnings $LIBS"
594 MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>&1 | awk '"'"'BEGIN {colon=0; rec="";} { for (i = 0 ; i < NF; i++) { if (colon && a[$i]) continue; if ($i == "\\") continue; if (!colon) { rec = $i continue; } if ($i == ":") { rec = rec " :" colon = 1 continue; } if (length(rec $i) > 76) { print rec " \\"; rec = "\t" $i; a[$i] = 1; } else { rec = rec " " $i a[$i] = 1; } } } END {print rec}'"'"' >>$TMP'
595 MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
598 STD_CWARNINGS="-fullwarn -woff 1209"
600 # Silence more than 250 instances of
601 # "prototyped function redeclared without prototype"
602 # and 11 instances of
603 # "variable ... was set but never used"
604 # from lib/dns/sec/openssl.
606 IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552"
618 # _GNU_SOURCE is needed to access the fd_bits field of struct fd_set, which
619 # is supposed to be opaque.
623 STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE"
628 AC_SUBST(MKDEPCFLAGS)
630 AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK)
635 AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
638 # -lxnet buys us one big porting headache... standards, gotta love 'em.
640 # AC_CHECK_LIB(xnet, socket, ,
641 # AC_CHECK_LIB(socket, socket)
642 # AC_CHECK_LIB(nsl, inet_ntoa)
645 # Use this for now, instead:
651 AC_CHECK_LIB(socket, socket)
652 AC_CHECK_LIB(nsl, inet_ntoa)
655 AC_CHECK_LIB(d4r, gethostbyname_r)
656 AC_CHECK_LIB(socket, socket)
657 AC_CHECK_FUNC(inet_ntoa, [], AC_CHECK_LIB(nsl, inet_ntoa))
664 AC_MSG_CHECKING(whether to use purify)
666 [ --with-purify[=PATH] use Rational purify],
667 use_purify="$withval", use_purify="no")
669 case "$use_purify" in
673 AC_PATH_PROG(purify_path, purify, purify)
676 purify_path="$use_purify"
680 case "$use_purify" in
686 if test -f $purify_path || test $purify_path = purify; then
687 AC_MSG_RESULT($purify_path)
688 PURIFYFLAGS="`echo $PURIFYOPTIONS`"
689 PURIFY="$purify_path $PURIFYFLAGS"
691 AC_MSG_ERROR([$purify_path not found.
693 Please choose the proper path with the following command:
695 configure --with-purify=PATH
704 # GNU libtool support
708 # Just set the maximum command line length for sunos as it otherwise
709 # takes a exceptionally long time to work it out. Required for libtool.
710 lt_cv_sys_max_cmd_len=4096;
715 [ --with-libtool use GNU libtool (following indented options supported)],
716 use_libtool="$withval", use_libtool="no")
723 LIBTOOL_MKDEP_SED='s;\.o;\.lo;'
724 LIBTOOL_MODE_COMPILE='--mode=compile'
725 LIBTOOL_MODE_INSTALL='--mode=install'
726 LIBTOOL_MODE_LINK='--mode=link'
734 LIBTOOL_MODE_COMPILE=
735 LIBTOOL_MODE_INSTALL=
741 # File name extension for static archive files, for those few places
742 # where they are treated differently from dynamic ones.
749 AC_SUBST(LIBTOOL_MKDEP_SED)
750 AC_SUBST(LIBTOOL_MODE_COMPILE)
751 AC_SUBST(LIBTOOL_MODE_INSTALL)
752 AC_SUBST(LIBTOOL_MODE_LINK)
755 # Here begins a very long section to determine the system's networking
756 # capabilities. The order of the tests is signficant.
763 [ --enable-ipv6 use IPv6 [default=autodetect]])
765 case "$enable_ipv6" in
774 # We do the IPv6 compilation checking after libtool so that we can put
775 # the right suffix on the files.
777 AC_MSG_CHECKING(for IPv6 structures)
779 #include <sys/types.h>
780 #include <sys/socket.h>
781 #include <netinet/in.h>],
782 [struct sockaddr_in6 sin6; return (0);],
789 # See whether IPv6 support is provided via a Kame add-on.
790 # This is done before other IPv6 linking tests to LIBS is properly set.
792 AC_MSG_CHECKING(for Kame IPv6 support)
794 [ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]],
795 use_kame="$withval", use_kame="no")
801 kame_path=/usr/local/v6
804 kame_path="$use_kame"
813 if test -f $kame_path/lib/libinet6.a; then
814 AC_MSG_RESULT($kame_path/lib/libinet6.a)
815 LIBS="-L$kame_path/lib -linet6 $LIBS"
817 AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
819 Please choose the proper path with the following command:
821 configure --with-kame=PATH
828 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
829 # Including it on Kame-using platforms is very bad, though, because
830 # Kame uses #error against direct inclusion. So include it on only
831 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
832 # This is done before the in6_pktinfo check because that's what
833 # netinet6/in6.h is needed for.
838 ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
839 isc_netinet6in6_hack="#include <netinet6/in6.h>"
842 ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
843 isc_netinet6in6_hack=""
849 # This is similar to the netinet6/in6.h issue.
853 ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
854 ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1"
855 isc_netinetin6_hack="#include <netinet/in6.h>"
858 ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H"
859 ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR"
860 isc_netinetin6_hack=""
865 # Now delve deeper into the suitability of the IPv6 support.
867 case "$found_ipv6" in
869 HAS_INET6_STRUCTS="#define HAS_INET6_STRUCTS 1"
871 AC_MSG_CHECKING(for in6_addr)
873 #include <sys/types.h>
874 #include <sys/socket.h>
875 #include <netinet/in.h>
877 $isc_netinet6in6_hack
879 [struct in6_addr in6; return (0);],
881 HAS_IN_ADDR6="#undef HAS_IN_ADDR6"
882 isc_in_addr6_hack=""],
884 HAS_IN_ADDR6="#define HAS_IN_ADDR6 1"
885 isc_in_addr6_hack="#define in6_addr in_addr6"])
887 AC_MSG_CHECKING(for in6addr_any)
889 #include <sys/types.h>
890 #include <sys/socket.h>
891 #include <netinet/in.h>
893 $isc_netinet6in6_hack
896 [struct in6_addr in6; in6 = in6addr_any; return (0);],
898 NEED_IN6ADDR_ANY="#undef NEED_IN6ADDR_ANY"],
900 NEED_IN6ADDR_ANY="#define NEED_IN6ADDR_ANY 1"])
902 AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
904 #include <sys/types.h>
905 #include <sys/socket.h>
906 #include <netinet/in.h>
908 $isc_netinet6in6_hack
910 [struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
912 result="#define HAVE_SIN6_SCOPE_ID 1"],
914 result="#undef HAVE_SIN6_SCOPE_ID"])
915 HAVE_SIN6_SCOPE_ID="$result"
917 AC_MSG_CHECKING(for in6_pktinfo)
919 #include <sys/types.h>
920 #include <sys/socket.h>
921 #include <netinet/in.h>
923 $isc_netinet6in6_hack
925 [struct in6_pktinfo xyzzy; return (0);],
927 ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
928 [AC_MSG_RESULT(no -- disabling runtime ipv6 support)
929 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
932 HAS_INET6_STRUCTS="#undef HAS_INET6_STRUCTS"
933 NEED_IN6ADDR_ANY="#undef NEED_IN6ADDR_ANY"
934 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
935 HAVE_SIN6_SCOPE_ID="#define HAVE_SIN6_SCOPE_ID 1"
938 ISC_ISCIPV6_O="unix/ipv6.$O"
943 AC_MSG_CHECKING(for sockaddr_storage)
945 #include <sys/types.h>
946 #include <sys/socket.h>
947 #include <netinet/in.h>
949 [struct sockaddr_storage xyzzy; return (0);],
951 HAVE_SOCKADDR_STORAGE="#define HAVE_SOCKADDR_STORAGE 1"],
953 HAVE_SOCKADDR_STORAGE="#undef HAVE_SOCKADDR_STORAGE"])
955 AC_SUBST(HAS_INET6_STRUCTS)
956 AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
957 AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
958 AC_SUBST(HAS_IN_ADDR6)
959 AC_SUBST(NEED_IN6ADDR_ANY)
960 AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
961 AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
964 AC_SUBST(ISC_ISCIPV6_O)
966 AC_SUBST(HAVE_SIN6_SCOPE_ID)
967 AC_SUBST(HAVE_SOCKADDR_STORAGE)
970 # Check for network functions that are often missing. We do this
971 # after the libtool checking, so we can put the right suffix on
972 # the files. It also needs to come after checking for a Kame add-on,
973 # which provides some (all?) of the desired functions.
975 AC_MSG_CHECKING([for inet_ntop])
977 #include <sys/types.h>
978 #include <netinet/in.h>
979 #include <arpa/inet.h>],
980 [inet_ntop(0, 0, 0, 0); return (0);],
982 ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
985 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
986 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
987 ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"])
988 AC_MSG_CHECKING([for inet_pton])
990 #include <sys/types.h>
991 #include <netinet/in.h>
992 #include <arpa/inet.h>],
993 [inet_pton(0, 0, 0); return (0);],
995 ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
998 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
999 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
1000 ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"])
1001 AC_MSG_CHECKING([for inet_aton])
1003 #include <sys/types.h>
1004 #include <netinet/in.h>
1005 #include <arpa/inet.h>],
1006 [struct in_addr in; inet_aton(0, &in); return (0);],
1008 ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON"],
1011 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
1012 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c"
1013 ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1"])
1015 AC_SUBST(ISC_PLATFORM_NEEDNTOP)
1016 AC_SUBST(ISC_PLATFORM_NEEDPTON)
1017 AC_SUBST(ISC_PLATFORM_NEEDATON)
1020 # Look for a 4.4BSD-style sa_len member in struct sockaddr.
1024 # Tru64 broke send() by defining it to send_OBSOLETE
1025 AC_DEFINE(REENABLE_SEND)
1026 # Turn on 4.4BSD style sa_len support.
1027 AC_DEFINE(_SOCKADDR_LEN)
1031 AC_MSG_CHECKING(for sa_len in struct sockaddr)
1033 #include <sys/types.h>
1034 #include <sys/socket.h>],
1035 [struct sockaddr sa; sa.sa_len = 0; return (0);],
1037 HAVE_SA_LEN="#define HAVE_SA_LEN 1"],
1039 HAVE_SA_LEN="#undef HAVE_SA_LEN"])
1040 AC_SUBST(HAVE_SA_LEN)
1042 # HAVE_MINIMUM_IFREQ
1045 *-bsdi[2345]*) have_minimum_ifreq=yes;;
1046 *-darwin*) have_minimum_ifreq=yes;;
1047 *-freebsd*) have_minimum_ifreq=yes;;
1048 *-lynxos*) have_minimum_ifreq=yes;;
1049 *-netbsd*) have_minimum_ifreq=yes;;
1050 *-next*) have_minimum_ifreq=yes;;
1051 *-openbsd*) have_minimum_ifreq=yes;;
1052 *-rhapsody*) have_minimum_ifreq=yes;;
1055 case "$have_minimum_ifreq" in
1057 HAVE_MINIMUM_IFREQ="#define HAVE_MINIMUM_IFREQ 1";;
1059 HAVE_MINIMUM_IFREQ="#undef HAVE_MINIMUM_IFREQ";;
1061 HAVE_MINIMUM_IFREQ="#undef HAVE_MINIMUM_IFREQ";;
1063 AC_SUBST(HAVE_MINIMUM_IFREQ)
1066 PORT_DIR=port/unknown
1067 SOLARIS_BITTYPES="#undef NEED_SOLARIS_BITTYPES"
1068 BSD_COMP="#undef BSD_COMP"
1069 USE_FIONBIO_IOCTL="#undef USE_FIONBIO_IOCTL"
1070 PORT_NONBLOCK="#define PORT_NONBLOCK O_NONBLOCK"
1071 HAVE_MD5="#undef HAVE_MD5"
1072 USE_POLL="#undef HAVE_POLL"
1073 SOLARIS2="#undef SOLARIS2"
1075 *aix3.2*) PORT_DIR="port/aix32";;
1076 *aix4*) PORT_DIR="port/aix4";;
1077 *aix5*) PORT_DIR="port/aix5";;
1078 *aux3*) PORT_DIR="port/aux3";;
1079 *-bsdi2*) PORT_DIR="port/bsdos2";;
1080 *-bsdi*) PORT_DIR="port/bsdos";;
1082 PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
1083 PORT_DIR="port/cygwin";;
1084 *-darwin*) PORT_DIR="port/darwin";;
1085 *-dragonfly*) PORT_DIR="port/dragonfly";;
1086 *-osf*) PORT_DIR="port/decunix";;
1087 *-freebsd*) PORT_DIR="port/freebsd";;
1088 *-hpux9*) PORT_DIR="port/hpux9";;
1089 *-hpux10*) PORT_DIR="port/hpux10";;
1090 *-hpux11*) PORT_DIR="port/hpux";;
1091 *-irix*) PORT_DIR="port/irix";;
1092 *-linux*) PORT_DIR="port/linux";;
1093 *-lynxos*) PORT_DIR="port/lynxos";;
1094 *-mpe*) PORT_DIR="port/mpe";;
1095 *-netbsd*) PORT_DIR="port/netbsd";;
1096 *-next*) PORT_DIR="port/next";;
1097 *-openbsd*) PORT_DIR="port/openbsd";;
1098 *-qnx*) PORT_DIR="port/qnx";;
1099 *-rhapsody*) PORT_DIR="port/rhapsody";;
1101 AC_DEFINE(NEED_SUN4PROTOS)
1102 PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
1103 PORT_DIR="port/sunos";;
1104 *-solaris2.[[01234]])
1105 BSD_COMP="#define BSD_COMP 1"
1106 SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
1107 USE_FIONBIO_IOCTL="#define USE_FIONBIO_IOCTL 1"
1108 SOLARIS2="#define SOLARIS2 1"
1109 PORT_DIR="port/solaris";;
1111 BSD_COMP="#define BSD_COMP 1"
1112 SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
1113 SOLARIS2="#define SOLARIS2 1"
1114 PORT_DIR="port/solaris";;
1116 BSD_COMP="#define BSD_COMP 1"
1117 SOLARIS2="#define SOLARIS2 1"
1118 PORT_DIR="port/solaris";;
1119 *-solaris2*) BSD_COMP="#define BSD_COMP 1"
1120 USE_POLL="#define USE_POLL 1"
1121 HAVE_MD5="#define HAVE_MD5 1"
1122 SOLARIS2="#define SOLARIS2 1"
1123 PORT_DIR="port/solaris";;
1124 *-ultrix*) PORT_DIR="port/ultrix";;
1125 *-sco-sysv*uw2.0*) PORT_DIR="port/unixware20";;
1126 *-sco-sysv*uw2.1.2*) PORT_DIR="port/unixware212";;
1127 *-sco-sysv*uw7*) PORT_DIR="port/unixware7";;
1131 AC_SUBST(SOLARIS_BITTYPES)
1132 AC_SUBST(USE_FIONBIO_IOCTL)
1133 AC_SUBST(PORT_NONBLOCK)
1138 PORT_INCLUDE=${PORT_DIR}/include
1139 AC_SUBST(PORT_INCLUDE)
1142 # Look for a 4.4BSD or 4.3BSD struct msghdr
1144 AC_MSG_CHECKING(for struct msghdr flavor)
1146 #include <sys/types.h>
1147 #include <sys/socket.h>],
1148 [struct msghdr msg; msg.msg_flags = 0; return (0);],
1149 [AC_MSG_RESULT(4.4BSD)
1150 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"],
1151 [AC_MSG_RESULT(4.3BSD)
1152 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])
1153 AC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)
1156 # Look for in_port_t.
1158 AC_MSG_CHECKING(for type in_port_t)
1160 #include <sys/types.h>
1161 #include <netinet/in.h>],
1162 [in_port_t port = 25; return (0);],
1164 ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"],
1166 ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])
1167 AC_SUBST(ISC_PLATFORM_NEEDPORTT)
1169 AC_MSG_CHECKING(for struct timespec)
1171 #include <sys/types.h>
1173 [struct timespec ts = { 0, 0 }; return (0);],
1175 ISC_PLATFORM_NEEDTIMESPEC="#undef ISC_PLATFORM_NEEDTIMESPEC"],
1177 ISC_PLATFORM_NEEDTIMESPEC="#define ISC_PLATFORM_NEEDTIMESPEC 1"])
1178 AC_SUBST(ISC_PLATFORM_NEEDTIMESPEC)
1181 # Check for addrinfo
1183 AC_MSG_CHECKING(for struct addrinfo)
1185 #include <netdb.h>],
1186 [struct addrinfo a; return (0);],
1188 AC_DEFINE(HAVE_ADDRINFO)],
1189 [AC_MSG_RESULT(no)])
1191 AC_MSG_CHECKING(for int sethostent)
1193 #include <netdb.h>],
1194 [int i = sethostent(0); return(0);],
1195 [AC_MSG_RESULT(yes)],
1196 [AC_MSG_RESULT(no)])
1198 AC_MSG_CHECKING(for int endhostent)
1200 #include <netdb.h>],
1201 [int i = endhostent(); return(0);],
1203 ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"],
1205 ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"])
1206 AC_SUBST(ISC_LWRES_ENDHOSTENTINT)
1208 AC_MSG_CHECKING(for int setnetent)
1210 #include <netdb.h>],
1211 [int i = setnetent(0); return(0);],
1213 ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"],
1215 ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"])
1216 AC_SUBST(ISC_LWRES_SETNETENTINT)
1218 AC_MSG_CHECKING(for int endnetent)
1220 #include <netdb.h>],
1221 [int i = endnetent(); return(0);],
1223 ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"],
1225 ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"])
1226 AC_SUBST(ISC_LWRES_ENDNETENTINT)
1228 AC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...))
1231 struct hostent *gethostbyaddr(const void *, size_t, int);],
1234 ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"],
1236 ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"])
1237 AC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID)
1239 AC_MSG_CHECKING(for h_errno in netdb.h)
1241 #include <netdb.h>],
1242 [h_errno = 1; return(0);],
1244 ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"],
1246 ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1"])
1247 AC_SUBST(ISC_LWRES_NEEDHERRNO)
1249 AC_CHECK_FUNC(getipnodebyname,
1250 [ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
1251 [ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
1252 AC_CHECK_FUNC(getnameinfo,
1253 [ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"],
1254 [ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"])
1255 AC_CHECK_FUNC(getaddrinfo,
1256 [ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"
1257 AC_DEFINE(HAVE_GETADDRINFO)],
1258 [ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])
1259 AC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))
1260 AC_SUBST(ISC_LWRES_GETIPNODEPROTO)
1261 AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
1262 AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)
1263 AC_CHECK_FUNC(pselect,
1264 [NEED_PSELECT="#undef NEED_PSELECT"],
1265 [NEED_PSELECT="#define NEED_PSELECT"])
1266 AC_SUBST(NEED_PSELECT)
1267 AC_CHECK_FUNC(gettimeofday,
1268 [NEED_GETTIMEOFDAY="#undef NEED_GETTIMEOFDAY"],
1269 [NEED_GETTIMEOFDAY="#define NEED_GETTIMEOFDAY 1"])
1270 AC_SUBST(NEED_GETTIMEOFDAY)
1271 AC_CHECK_FUNC(strndup,
1272 [HAVE_STRNDUP="#define HAVE_STRNDUP 1"],
1273 [HAVE_STRNDUP="#undef HAVE_STRNDUP"])
1274 AC_SUBST(HAVE_STRNDUP)
1277 # Look for a sysctl call to get the list of network interfaces.
1279 AC_MSG_CHECKING(for interface list sysctl)
1280 AC_EGREP_CPP(found_rt_iflist, [
1281 #include <sys/param.h>
1282 #include <sys/sysctl.h>
1283 #include <sys/socket.h>
1284 #ifdef NET_RT_IFLIST
1289 AC_DEFINE(HAVE_IFLIST_SYSCTL)],
1290 [AC_MSG_RESULT(no)])
1293 # Check for some other useful functions that are not ever-present.
1295 AC_CHECK_FUNC(strsep,
1296 [ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
1297 [ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
1300 AC_MSG_CHECKING(for char *sprintf)
1304 [ char buf[2]; return(*sprintf(buf,"x"));],
1305 AC_DEFINE(SPRINTF_CHAR)
1311 AC_MSG_CHECKING(for char *vsprintf)
1313 *sunos4*) # not decared in any header file.
1314 AC_DEFINE(VSPRINTF_CHAR)
1321 [ char buf[2]; return(*vsprintf(buf,"x"));],
1322 AC_DEFINE(VSPRINTF_CHAR)
1330 AC_CHECK_FUNC(vsnprintf,
1331 [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"],
1332 [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O"
1333 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS print.c"
1334 ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"])
1335 AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
1336 AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
1338 AC_SUBST(ISC_EXTRA_OBJS)
1339 AC_SUBST(ISC_EXTRA_SRCS)
1341 # Determine the printf format characters to use when printing
1342 # values of type isc_int64_t. We make the assumption that platforms
1343 # where a "long long" is the same size as a "long" (e.g., Alpha/OSF1)
1344 # want "%ld" and everyone else can use "%lld". Win32 uses "%I64d",
1345 # but that's defined elsewhere since we don't use configure on Win32.
1347 AC_MSG_CHECKING(printf format modifier for 64-bit integers)
1348 AC_TRY_RUN([main() { exit(!(sizeof(long long int) == sizeof(long int))); }],
1350 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'],
1352 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'],
1353 [AC_MSG_RESULT(default ll)
1354 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'])
1355 AC_SUBST(ISC_PLATFORM_QUADFORMAT)
1360 AC_CHECK_FUNC(chroot, AC_DEFINE(HAVE_CHROOT))
1363 # for accept, recvfrom, getpeername etc.
1365 AC_MSG_CHECKING(for socket length type)
1367 #include <sys/types.h>
1368 #include <sys/socket.h>
1369 int accept(int, struct sockaddr *, socklen_t *);
1371 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T socklen_t"
1372 AC_MSG_RESULT(socklen_t)]
1375 #include <sys/types.h>
1376 #include <sys/socket.h>
1377 int accept(int, struct sockaddr *, unsigned int *);
1379 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T unsigned int"
1380 AC_MSG_RESULT(unsigned int)]
1383 #include <sys/types.h>
1384 #include <sys/socket.h>
1385 int accept(int, struct sockaddr *, unsigned long *);
1387 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T unsigned long"
1388 AC_MSG_RESULT(unsigned long)]
1391 #include <sys/types.h>
1392 #include <sys/socket.h>
1393 int accept(int, struct sockaddr *, long *);
1395 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T long"
1396 AC_MSG_RESULT(long)]
1398 ISC_SOCKLEN_T="#define ISC_SOCKLEN_T int"
1401 AC_SUBST(ISC_SOCKLEN_T)
1403 AC_CHECK_FUNC(getgrouplist,
1405 [#include <unistd.h>
1407 getgrouplist(const char *name, int basegid, int *groups, int *ngroups) {
1411 GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, int basegid, int *groups, int *ngroups"
1413 GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups"
1415 GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups"
1416 AC_DEFINE(NEED_GETGROUPLIST)
1418 AC_SUBST(GETGROUPLIST_ARGS)
1420 AC_CHECK_FUNC(setgroupent,,AC_DEFINE(NEED_SETGROUPENT))
1426 AC_CHECK_FUNC(getnetbyaddr_r,
1436 getnetbyaddr_r(long net, int type, struct netent *result, char *buffer,
1441 NET_R_ARGS="#define NET_R_ARGS char *buf, int buflen"
1442 NET_R_BAD="#define NET_R_BAD NULL"
1443 NET_R_COPY="#define NET_R_COPY buf, buflen"
1444 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS NET_R_ARGS"
1445 NET_R_OK="#define NET_R_OK nptr"
1446 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1447 NET_R_RETURN="#define NET_R_RETURN struct netent *"
1448 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
1449 NETENT_DATA="#undef NETENT_DATA"
1459 int getnetbyaddr_r (unsigned long int, int, struct netent *,
1460 char *, size_t, struct netent **, int *);
1464 NET_R_ARGS="#define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop"
1465 NET_R_BAD="#define NET_R_BAD ERANGE"
1466 NET_R_COPY="#define NET_R_COPY buf, buflen"
1467 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS char *buf, size_t buflen"
1468 NET_R_OK="#define NET_R_OK 0"
1469 NET_R_SETANSWER="#define NET_R_SETANSWER 1"
1470 NET_R_RETURN="#define NET_R_RETURN int"
1471 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T unsigned long int"
1472 NETENT_DATA="#undef NETENT_DATA"
1482 extern int getnetbyaddr_r(int, int, struct netent *, struct netent_data *);
1486 NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"
1487 NET_R_BAD="#define NET_R_BAD (-1)"
1488 NET_R_COPY="#define NET_R_COPY ndptr"
1489 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"
1490 NET_R_OK="#define NET_R_OK 0"
1491 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1492 NET_R_RETURN="#define NET_R_RETURN int"
1493 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T int"
1494 NETENT_DATA="#define NETENT_DATA 1"
1500 int getnetbyaddr_r (in_addr_t, int, struct netent *, struct netent_data *);
1504 NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"
1505 NET_R_BAD="#define NET_R_BAD (-1)"
1506 NET_R_COPY="#define NET_R_COPY ndptr"
1507 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"
1508 NET_R_OK="#define NET_R_OK 0"
1509 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1510 NET_R_RETURN="#define NET_R_RETURN int"
1511 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
1512 NETENT_DATA="#define NETENT_DATA 1"
1518 int getnetbyaddr_r (long, int, struct netent *, struct netent_data *);
1522 NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"
1523 NET_R_BAD="#define NET_R_BAD (-1)"
1524 NET_R_COPY="#define NET_R_COPY ndptr"
1525 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"
1526 NET_R_OK="#define NET_R_OK 0"
1527 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1528 NET_R_RETURN="#define NET_R_RETURN int"
1529 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
1530 NETENT_DATA="#define NETENT_DATA 1"
1536 int getnetbyaddr_r (uint32_t, int, struct netent *,
1537 char *, size_t, struct netent **, int *);
1541 NET_R_ARGS="#define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop"
1542 NET_R_BAD="#define NET_R_BAD ERANGE"
1543 NET_R_COPY="#define NET_R_COPY buf, buflen"
1544 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS char *buf, size_t buflen"
1545 NET_R_OK="#define NET_R_OK 0"
1546 NET_R_SETANSWER="#define NET_R_SETANSWER 1"
1547 NET_R_RETURN="#define NET_R_RETURN int"
1548 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T unsigned long int"
1549 NETENT_DATA="#undef NETENT_DATA"
1558 NET_R_ARGS="#define NET_R_ARGS char *buf, int buflen"
1559 NET_R_BAD="#define NET_R_BAD NULL"
1560 NET_R_COPY="#define NET_R_COPY buf, buflen"
1561 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS NET_R_ARGS"
1562 NET_R_OK="#define NET_R_OK nptr"
1563 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1564 NET_R_RETURN="#define NET_R_RETURN struct netent *"
1565 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
1566 NETENT_DATA="#undef NETENT_DATA"
1571 *dec-osf*) GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T int" ;;
1573 AC_SUBST(NET_R_ARGS)
1575 AC_SUBST(NET_R_COPY)
1576 AC_SUBST(NET_R_COPY_ARGS)
1578 AC_SUBST(NET_R_SETANSWER)
1579 AC_SUBST(NET_R_RETURN)
1580 AC_SUBST(GETNETBYADDR_ADDR_T)
1581 AC_SUBST(NETENT_DATA)
1583 AC_CHECK_FUNC(setnetent_r,
1589 void setnetent_r (int);
1591 NET_R_ENT_ARGS="#undef NET_R_ENT_ARGS /*empty*/"
1592 NET_R_SET_RESULT="#undef NET_R_SET_RESULT /*empty*/"
1593 NET_R_SET_RETURN="#define NET_R_SET_RETURN void"
1601 extern int setnetent_r(int, struct netent_data *);
1603 NET_R_ENT_ARGS="#define NET_R_ENT_ARGS struct netent_data *ndptr"
1604 NET_R_SET_RESULT="#define NET_R_SET_RESULT NET_R_OK"
1605 NET_R_SET_RETURN="#define NET_R_SET_RETURN int"
1610 NET_R_ENT_ARGS="#undef NET_R_ENT_ARGS /*empty*/"
1611 NET_R_SET_RESULT="#undef NET_R_SET_RESULT /*empty*/"
1612 NET_R_SET_RETURN="#define NET_R_SET_RETURN void"
1614 AC_SUBST(NET_R_ENT_ARGS)
1615 AC_SUBST(NET_R_SET_RESULT)
1616 AC_SUBST(NET_R_SET_RETURN)
1623 AC_CHECK_FUNC(endnetent_r,
1631 void endnetent_r (void);
1633 NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
1634 NET_R_END_RETURN="#define NET_R_END_RETURN void"
1643 extern int endnetent_r(struct netent_data *);
1645 NET_R_END_RESULT="#define NET_R_END_RESULT(x) return (x)"
1646 NET_R_END_RETURN="#define NET_R_END_RETURN int"
1655 extern void endnetent_r(struct netent_data *);
1657 NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
1658 NET_R_END_RETURN="#define NET_R_END_RETURN void"
1664 NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
1665 NET_R_END_RETURN="#define NET_R_END_RETURN void"
1668 AC_SUBST(NET_R_END_RESULT)
1669 AC_SUBST(NET_R_END_RETURN)
1671 AC_CHECK_FUNC(getgrnam_r,,AC_DEFINE(NEED_GETGRNAM_R))
1672 AC_CHECK_FUNC(getgrgid_r,,AC_DEFINE(NEED_GETGRGID_R))
1674 AC_CHECK_FUNC(getgrent_r,
1678 struct group *getgrent_r(struct group *grp, char *buffer,
1681 GROUP_R_ARGS="#define GROUP_R_ARGS char *buf, int buflen"
1682 GROUP_R_BAD="#define GROUP_R_BAD NULL"
1683 GROUP_R_OK="#define GROUP_R_OK gptr"
1684 GROUP_R_RETURN="#define GROUP_R_RETURN struct group *"
1688 GROUP_R_ARGS="#define GROUP_R_ARGS char *buf, int buflen"
1689 GROUP_R_BAD="#define GROUP_R_BAD NULL"
1690 GROUP_R_OK="#define GROUP_R_OK gptr"
1691 GROUP_R_RETURN="#define GROUP_R_RETURN struct group *"
1692 AC_DEFINE(NEED_GETGRENT_R)
1694 AC_SUBST(GROUP_R_ARGS)
1695 AC_SUBST(GROUP_R_BAD)
1696 AC_SUBST(GROUP_R_OK)
1697 AC_SUBST(GROUP_R_RETURN)
1699 AC_CHECK_FUNC(endgrent_r,
1701 GROUP_R_END_RESULT="#define GROUP_R_END_RESULT(x) /*empty*/"
1702 GROUP_R_END_RETURN="#define GROUP_R_END_RETURN void"
1703 GROUP_R_ENT_ARGS="#define GROUP_R_ENT_ARGS void"
1704 AC_DEFINE(NEED_ENDGRENT_R)
1706 AC_SUBST(GROUP_R_END_RESULT)
1707 AC_SUBST(GROUP_R_END_RETURN)
1708 AC_SUBST(GROUP_R_ENT_ARGS)
1710 AC_CHECK_FUNC(setgrent_r,
1712 GROUP_R_SET_RESULT="#undef GROUP_R_SET_RESULT /*empty*/"
1713 GROUP_R_SET_RETURN="#define GROUP_R_SET_RETURN void"
1714 AC_DEFINE(NEED_SETGRENT_R)
1716 AC_SUBST(GROUP_R_SET_RESULT)
1717 AC_SUBST(GROUP_R_SET_RETURN)
1724 AC_CHECK_FUNC(gethostbyname_r,
1730 struct hostent *gethostbyname_r
1731 (const char *name, struct hostent *hp, char *buf, int len, int *h_errnop) {}
1735 HOST_R_ARGS="#define HOST_R_ARGS char *buf, int buflen, int *h_errnop"
1736 HOST_R_BAD="#define HOST_R_BAD NULL"
1737 HOST_R_COPY="#define HOST_R_COPY buf, buflen"
1738 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
1739 HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
1740 HOST_R_OK="#define HOST_R_OK hptr"
1741 HOST_R_RETURN="#define HOST_R_RETURN struct hostent *"
1742 HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
1743 HOSTENT_DATA="#undef HOSTENT_DATA"
1750 int gethostbyname_r(const char *name,
1751 struct hostent *result,
1752 struct hostent_data *hdptr);
1754 HOST_R_ARGS="#define HOST_R_ARGS struct hostent_data *hdptr"
1755 HOST_R_BAD="#define HOST_R_BAD (-1)"
1756 HOST_R_COPY="#define HOST_R_COPY hdptr"
1757 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS HOST_R_ARGS"
1758 HOST_R_ERRNO="#undef HOST_R_ERRNO"
1759 HOST_R_OK="#define HOST_R_OK 0"
1760 HOST_R_RETURN="#define HOST_R_RETURN int"
1761 HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
1762 HOSTENT_DATA="#define HOSTENT_DATA 1"
1768 extern int gethostbyname_r (const char *,
1774 HOST_R_ARGS="#define HOST_R_ARGS char *buf, size_t buflen, struct hostent **answerp, int *h_errnop"
1775 HOST_R_BAD="#define HOST_R_BAD ERANGE"
1776 HOST_R_COPY="#define HOST_R_COPY buf, buflen"
1777 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
1778 HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
1779 HOST_R_OK="#define HOST_R_OK 0"
1780 HOST_R_RETURN="#define HOST_R_RETURN int"
1781 HOST_R_SETANSWER="#define HOST_R_SETANSWER 1"
1782 HOSTENT_DATA="#undef HOSTENT_DATA"
1786 HOST_R_ARGS="#define HOST_R_ARGS char *buf, int buflen, int *h_errnop"
1787 HOST_R_BAD="#define HOST_R_BAD NULL"
1788 HOST_R_COPY="#define HOST_R_COPY buf, buflen"
1789 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
1790 HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
1791 HOST_R_OK="#define HOST_R_OK hptr"
1792 HOST_R_RETURN="#define HOST_R_RETURN struct hostent *"
1793 HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
1794 HOSTENT_DATA="#undef HOSTENT_DATA"
1797 AC_SUBST(HOST_R_ARGS)
1798 AC_SUBST(HOST_R_BAD)
1799 AC_SUBST(HOST_R_COPY)
1800 AC_SUBST(HOST_R_COPY_ARGS)
1801 AC_SUBST(HOST_R_ERRNO)
1803 AC_SUBST(HOST_R_RETURN)
1804 AC_SUBST(HOST_R_SETANSWER)
1805 AC_SUBST(HOSTENT_DATA)
1811 AC_CHECK_FUNC(endhostent_r,
1818 int endhostent_r(struct hostent_data *buffer);
1820 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) return (x)"
1821 HOST_R_END_RETURN="#define HOST_R_END_RETURN int"
1822 HOST_R_ENT_ARGS="#define HOST_R_ENT_ARGS struct hostent_data *hdptr"
1830 extern void endhostent_r(struct hostent_data *ht_data);
1832 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x)"
1833 HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
1834 HOST_R_ENT_ARGS="#define HOST_R_ENT_ARGS struct hostent_data *hdptr"
1842 extern void endhostent_r(void);
1844 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) /*empty*/"
1845 HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
1846 HOST_R_ENT_ARGS="#undef HOST_R_ENT_ARGS /*empty*/"
1852 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) /*empty*/"
1853 HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
1854 HOST_R_ENT_ARGS="#undef HOST_R_ENT_ARGS /*empty*/"
1857 AC_SUBST(HOST_R_END_RESULT)
1858 AC_SUBST(HOST_R_END_RETURN)
1859 AC_SUBST(HOST_R_ENT_ARGS)
1865 AC_CHECK_FUNC(sethostent_r,
1872 extern void sethostent_r(int flag, struct hostent_data *ht_data);],[],
1873 [HOST_R_SET_RESULT="#undef HOST_R_SET_RESULT /*empty*/"
1874 HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"],
1881 extern int sethostent_r(int flag, struct hostent_data *ht_data);],[],
1882 [HOST_R_SET_RESULT="#define HOST_R_SET_RESULT 0"
1883 HOST_R_SET_RETURN="#define HOST_R_SET_RETURN int"],
1890 void sethostent_r (int);],[],
1891 [HOST_R_SET_RESULT="#undef HOST_R_SET_RESULT"
1892 HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"],
1897 HOST_R_SET_RESULT="#undef HOST_R_SET_RESULT"
1898 HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"
1901 AC_SUBST(HOST_R_SET_RESULT)
1902 AC_SUBST(HOST_R_SET_RETURN)
1905 AC_MSG_CHECKING(struct passwd element pw_class)
1907 #include <sys/types.h>
1909 ],[struct passwd *pw; pw->pw_class = "";],
1911 AC_DEFINE(HAS_PW_CLASS)
1917 #include <sys/types.h>
1923 SETPWENT_VOID="#define SETPWENT_VOID 1"
1925 SETPWENT_VOID="#undef SETPWENT_VOID"
1927 AC_SUBST(SETPWENT_VOID)
1930 #include <sys/types.h>
1936 SETGRENT_VOID="#define SETGRENT_VOID 1"
1938 SETGRENT_VOID="#undef SETGRENT_VOID"
1940 AC_SUBST(SETGRENT_VOID)
1944 NGR_R_CONST="#define NGR_R_CONST"
1948 # HPUX doesn't have a prototype for getnetgrent_r().
1950 NGR_R_CONST="#define NGR_R_CONST"
1951 NGR_R_ARGS="#define NGR_R_ARGS char *buf, int buflen"
1952 NGR_R_BAD="#define NGR_R_BAD (0)"
1953 NGR_R_COPY="#define NGR_R_COPY buf, buflen"
1954 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
1955 NGR_R_OK="#define NGR_R_OK 1"
1956 NGR_R_RETURN="#define NGR_R_RETURN int"
1960 AC_CHECK_FUNC(getnetgrent_r,
1969 int getnetgrent_r(char **m, char **u, char **d, char *b, int l) {}
1974 NGR_R_CONST="#define NGR_R_CONST"
1975 NGR_R_ARGS="#define NGR_R_ARGS char *buf, int buflen"
1976 NGR_R_BAD="#define NGR_R_BAD (0)"
1977 NGR_R_COPY="#define NGR_R_COPY buf, buflen"
1978 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
1979 NGR_R_OK="#define NGR_R_OK 1"
1980 NGR_R_RETURN="#define NGR_R_RETURN int"
1991 int getnetgrent_r(char **m, char **u, char **d, char *b, size_t l) {}
1996 NGR_R_CONST="#define NGR_R_CONST"
1997 NGR_R_ARGS="#define NGR_R_ARGS char *buf, size_t buflen"
1998 NGR_R_BAD="#define NGR_R_BAD (0)"
1999 NGR_R_COPY="#define NGR_R_COPY buf, buflen"
2000 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
2001 NGR_R_OK="#define NGR_R_OK 1"
2002 NGR_R_RETURN="#define NGR_R_RETURN int"
2013 extern int getnetgrent_r(char **, char **, char **, void **);
2018 NGR_R_CONST="#define NGR_R_CONST"
2019 NGR_R_ARGS="#define NGR_R_ARGS void **buf"
2020 NGR_R_BAD="#define NGR_R_BAD (0)"
2021 NGR_R_COPY="#define NGR_R_COPY buf"
2022 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
2023 NGR_R_OK="#define NGR_R_OK 1"
2024 NGR_R_RETURN="#define NGR_R_RETURN int"
2025 NGR_R_PRIVATE="#define NGR_R_PRIVATE 1"
2036 extern int getnetgrent_r(const char **, const char **, const char **, void *);
2041 NGR_R_CONST="#define NGR_R_CONST const"
2042 NGR_R_ARGS="#define NGR_R_ARGS void *buf"
2043 NGR_R_BAD="#define NGR_R_BAD (0)"
2044 NGR_R_COPY="#define NGR_R_COPY buf"
2045 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
2046 NGR_R_OK="#define NGR_R_OK 1"
2047 NGR_R_RETURN="#define NGR_R_RETURN int"
2048 NGR_R_PRIVATE="#define NGR_R_PRIVATE 2"
2056 NGR_R_CONST="#define NGR_R_CONST"
2057 NGR_R_ARGS="#define NGR_R_ARGS char *buf, int buflen"
2058 NGR_R_BAD="#define NGR_R_BAD (0)"
2059 NGR_R_COPY="#define NGR_R_COPY buf, buflen"
2060 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
2061 NGR_R_OK="#define NGR_R_OK 1"
2062 NGR_R_RETURN="#define NGR_R_RETURN int"
2065 AC_SUBST(NGR_R_CONST)
2066 AC_SUBST(NGR_R_ARGS)
2068 AC_SUBST(NGR_R_COPY)
2069 AC_SUBST(NGR_R_COPY_ARGS)
2071 AC_SUBST(NGR_R_RETURN)
2072 AC_SUBST(NGR_R_PRIVATE)
2074 AC_CHECK_FUNC(endnetgrent_r,
2083 void endnetgrent_r(void **ptr);
2089 NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /* empty */"
2090 NGR_R_END_RETURN="#define NGR_R_END_RETURN void"
2091 NGR_R_END_ARGS="#define NGR_R_END_ARGS NGR_R_ARGS"
2102 void endnetgrent_r(void *ptr);
2108 NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /* empty */"
2109 NGR_R_END_RETURN="#define NGR_R_END_RETURN void"
2110 NGR_R_END_ARGS="#define NGR_R_END_ARGS void *buf"
2114 NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) return (x)"
2115 NGR_R_END_RETURN="#define NGR_R_END_RETURN int"
2116 NGR_R_END_ARGS="#define NGR_R_END_ARGS NGR_R_ARGS"
2121 NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /*empty*/"
2122 NGR_R_END_RETURN="#define NGR_R_END_RETURN void"
2123 NGR_R_END_ARGS="#undef NGR_R_END_ARGS /*empty*/"
2124 AC_DEFINE(NEED_ENDNETGRENT_R)
2126 AC_SUBST(NGR_R_END_RESULT)
2127 AC_SUBST(NGR_R_END_RETURN)
2128 AC_SUBST(NGR_R_END_ARGS)
2130 AC_CHECK_FUNC(setnetgrent_r,
2137 NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /*empty*/"
2138 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
2139 NGR_R_SET_ARGS="#define NGR_R_SET_ARGS NGR_R_ARGS"
2140 NGR_R_SET_CONST="#define NGR_R_SET_CONST"
2146 NGR_R_SET_RESULT="#define NGR_R_SET_RESULT NGR_R_OK"
2147 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN int"
2148 NGR_R_SET_ARGS="#undef NGR_R_SET_ARGS /* empty */"
2149 NGR_R_SET_CONST="#define NGR_R_SET_CONST"
2160 void setnetgrent_r(void **ptr);
2166 NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /* empty */"
2167 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
2168 NGR_R_SET_ARGS="#define NGR_R_SET_ARGS void **buf"
2169 NGR_R_SET_CONST="#define NGR_R_SET_CONST"
2180 extern int setnetgrent_r(char *, void **);
2186 NGR_R_SET_RESULT="#define NGR_R_SET_RESULT NGR_R_OK"
2187 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN int"
2188 NGR_R_SET_ARGS="#define NGR_R_SET_ARGS void **buf"
2189 NGR_R_SET_CONST="#define NGR_R_SET_CONST"
2193 NGR_R_SET_RESULT="#define NGR_R_SET_RESULT NGR_R_OK"
2194 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN int"
2195 NGR_R_SET_ARGS="#undef NGR_R_SET_ARGS"
2196 NGR_R_SET_CONST="#define NGR_R_SET_CONST const"
2203 NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /*empty*/"
2204 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
2205 NGR_R_SET_ARGS="#undef NGR_R_SET_ARGS"
2206 NGR_R_SET_CONST="#define NGR_R_SET_CONST const"
2209 AC_SUBST(NGR_R_SET_RESULT)
2210 AC_SUBST(NGR_R_SET_RETURN)
2211 AC_SUBST(NGR_R_SET_ARGS)
2212 AC_SUBST(NGR_R_SET_CONST)
2214 AC_CHECK_FUNC(innetgr_r,,AC_DEFINE(NEED_INNETGR_R))
2220 AC_CHECK_FUNC(getprotoent_r,
2226 struct protoent *getprotoent_r(struct protoent *result,
2227 char *buffer, int buflen) {}
2233 PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen"
2234 PROTO_R_BAD="#define PROTO_R_BAD NULL"
2235 PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
2236 PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS"
2237 PROTO_R_OK="#define PROTO_R_OK pptr"
2238 PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER"
2239 PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *"
2240 PROTOENT_DATA="#undef PROTOENT_DATA"
2248 int getprotoent_r (struct protoent *, char *, size_t, struct protoent **);
2255 PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, size_t buflen, struct protoent **answerp"
2256 PROTO_R_BAD="#define PROTO_R_BAD ERANGE"
2257 PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
2258 PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS char *buf, size_t buflen"
2259 PROTO_R_OK="#define PROTO_R_OK 0"
2260 PROTO_R_SETANSWER="#define PROTO_R_SETANSWER 1"
2261 PROTO_R_RETURN="#define PROTO_R_RETURN int"
2262 PROTOENT_DATA="#undef PROTOENT_DATA"
2270 int getprotoent_r (struct protoent *, struct protoent_data *prot_data);
2277 PROTO_R_ARGS="#define PROTO_R_ARGS struct protoent_data *prot_data"
2278 PROTO_R_BAD="#define PROTO_R_BAD (-1)"
2279 PROTO_R_COPY="#define PROTO_R_COPY prot_data"
2280 PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS struct protoent_data *pdptr"
2281 PROTO_R_OK="#define PROTO_R_OK 0"
2282 PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER"
2283 PROTO_R_RETURN="#define PROTO_R_RETURN int"
2284 PROTOENT_DATA="#define PROTOENT_DATA 1"
2291 PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen"
2292 PROTO_R_BAD="#define PROTO_R_BAD NULL"
2293 PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
2294 PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS"
2295 PROTO_R_OK="#define PROTO_R_OK pptr"
2296 PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER"
2297 PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *"
2298 PROTOENT_DATA="#undef PROTOENT_DATA"
2302 AC_SUBST(PROTO_R_ARGS)
2303 AC_SUBST(PROTO_R_BAD)
2304 AC_SUBST(PROTO_R_COPY)
2305 AC_SUBST(PROTO_R_COPY_ARGS)
2306 AC_SUBST(PROTO_R_OK)
2307 AC_SUBST(PROTO_R_SETANSWER)
2308 AC_SUBST(PROTO_R_RETURN)
2309 AC_SUBST(PROTOENT_DATA)
2315 AC_CHECK_FUNC(endprotoent_r,
2323 void endprotoent_r(void);
2327 PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/"
2328 PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void"
2329 PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS"
2330 PROTO_R_ENT_UNUSED="#undef PROTO_R_ENT_UNUSED"
2340 void endprotoent_r(struct protoent_data *);
2344 PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/"
2345 PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void"
2346 PROTO_R_ENT_ARGS="#define PROTO_R_ENT_ARGS struct protoent_data *proto_data"
2347 PROTO_R_ENT_UNUSED="#define PROTO_R_ENT_UNUSED UNUSED(proto_data)"
2357 int endprotoent_r(struct protoent_data *);
2361 PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) return(0)"
2362 PROTO_R_END_RETURN="#define PROTO_R_END_RETURN int"
2363 PROTO_R_ENT_ARGS="#define PROTO_R_ENT_ARGS struct protoent_data *proto_data"
2364 PROTO_R_ENT_UNUSED="#define PROTO_R_ENT_UNUSED UNUSED(proto_data)"
2371 PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/"
2372 PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void"
2373 PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS /*empty*/"
2374 PROTO_R_ENT_UNUSED="#undef PROTO_R_ENT_UNUSED"
2377 AC_SUBST(PROTO_R_END_RESULT)
2378 AC_SUBST(PROTO_R_END_RETURN)
2379 AC_SUBST(PROTO_R_ENT_ARGS)
2380 AC_SUBST(PROTO_R_ENT_UNUSED)
2386 AC_CHECK_FUNC(setprotoent_r,
2394 void setprotoent_r __P((int));
2396 PROTO_R_SET_RESULT="#undef PROTO_R_SET_RESULT"
2397 PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void"
2406 int setprotoent_r (int, struct protoent_data *);
2408 PROTO_R_SET_RESULT="#define PROTO_R_SET_RESULT (0)"
2409 PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN int"
2414 PROTO_R_SET_RESULT="#undef PROTO_R_SET_RESULT"
2415 PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void"
2418 AC_SUBST(PROTO_R_SET_RESULT)
2419 AC_SUBST(PROTO_R_SET_RETURN)
2421 AC_CHECK_FUNC(getpwent_r,
2424 #include <sys/types.h>
2427 getpwent_r(struct passwd *pwptr, char *buf, int buflen) {}
2432 PASS_R_ARGS="#define PASS_R_ARGS char *buf, int buflen"
2433 PASS_R_BAD="#define PASS_R_BAD NULL"
2434 PASS_R_COPY="#define PASS_R_COPY buf, buflen"
2435 PASS_R_COPY_ARGS="#define PASS_R_COPY_ARGS PASS_R_ARGS"
2436 PASS_R_OK="#define PASS_R_OK pwptr"
2437 PASS_R_RETURN="#define PASS_R_RETURN struct passwd *"
2441 PASS_R_ARGS="#define PASS_R_ARGS char *buf, int buflen"
2442 PASS_R_BAD="#define PASS_R_BAD NULL"
2443 PASS_R_COPY="#define PASS_R_COPY buf, buflen"
2444 PASS_R_COPY_ARGS="#define PASS_R_COPY_ARGS PASS_R_ARGS"
2445 PASS_R_OK="#define PASS_R_OK pwptr"
2446 PASS_R_RETURN="#define PASS_R_RETURN struct passwd *"
2447 AC_DEFINE(NEED_GETPWENT_R)
2449 AC_SUBST(PASS_R_ARGS)
2450 AC_SUBST(PASS_R_BAD)
2451 AC_SUBST(PASS_R_COPY)
2452 AC_SUBST(PASS_R_COPY_ARGS)
2454 AC_SUBST(PASS_R_RETURN)
2456 AC_CHECK_FUNC(endpwent_r,
2460 void endpwent_r(FILE **pwfp);
2462 PASS_R_END_RESULT="#define PASS_R_END_RESULT(x) /*empty*/"
2463 PASS_R_END_RETURN="#define PASS_R_END_RETURN void"
2464 PASS_R_ENT_ARGS="#define PASS_R_ENT_ARGS FILE **pwptr"
2468 PASS_R_END_RESULT="#define PASS_R_END_RESULT(x) /*empty*/"
2469 PASS_R_END_RETURN="#define PASS_R_END_RETURN void"
2470 PASS_R_ENT_ARGS="#undef PASS_R_ENT_ARGS"
2471 AC_DEFINE(NEED_ENDPWENT_R)
2473 AC_SUBST(PASS_R_END_RESULT)
2474 AC_SUBST(PASS_R_END_RETURN)
2475 AC_SUBST(PASS_R_ENT_ARGS)
2476 AC_CHECK_FUNC(setpassent_r,,AC_DEFINE(NEED_SETPASSENT_R))
2477 AC_CHECK_FUNC(setpassent,,AC_DEFINE(NEED_SETPASSENT))
2479 AC_CHECK_FUNC(setpwent_r,
2482 void setpwent_r(FILE **pwfp);
2484 PASS_R_SET_RESULT="#undef PASS_R_SET_RESULT /* empty */"
2485 PASS_R_SET_RETURN="#define PASS_R_SET_RETURN int"
2489 int setpwent_r(FILE **pwfp);
2491 PASS_R_SET_RESULT="#define PASS_R_SET_RESULT 0"
2492 PASS_R_SET_RETURN="#define PASS_R_SET_RETURN int"
2497 PASS_R_SET_RESULT="#undef PASS_R_SET_RESULT /*empty*/"
2498 PASS_R_SET_RETURN="#define PASS_R_SET_RETURN void"
2499 AC_DEFINE(NEED_SETPWENT_R)
2501 AC_SUBST(PASS_R_SET_RESULT)
2502 AC_SUBST(PASS_R_SET_RETURN)
2504 AC_CHECK_FUNC(getpwnam_r,,AC_DEFINE(NEED_GETPWNAM_R))
2505 AC_CHECK_FUNC(getpwuid_r,,AC_DEFINE(NEED_GETPWUID_R))
2511 AC_CHECK_FUNC(getservent_r,
2517 getservent_r(struct servent *result, char *buffer, int buflen) {}
2520 SERV_R_ARGS="#define SERV_R_ARGS char *buf, int buflen"
2521 SERV_R_BAD="#define SERV_R_BAD NULL"
2522 SERV_R_COPY="#define SERV_R_COPY buf, buflen"
2523 SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS SERV_R_ARGS"
2524 SERV_R_OK="#define SERV_R_OK sptr"
2525 SERV_R_SETANSWER="#undef SERV_R_SETANSWER"
2526 SERV_R_RETURN="#define SERV_R_RETURN struct servent *"
2534 getservent_r (struct servent *, char *, size_t, struct servent **);
2537 SERV_R_ARGS="#define SERV_R_ARGS char *buf, size_t buflen, struct servent **answerp"
2538 SERV_R_BAD="#define SERV_R_BAD ERANGE"
2539 SERV_R_COPY="#define SERV_R_COPY buf, buflen"
2540 SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS char *buf, size_t buflen"
2541 SERV_R_OK="#define SERV_R_OK (0)"
2542 SERV_R_SETANSWER="#define SERV_R_SETANSWER 1"
2543 SERV_R_RETURN="#define SERV_R_RETURN int"
2551 getservent_r (struct servent *, struct servent_data *serv_data);
2554 SERV_R_ARGS="#define SERV_R_ARGS struct servent_data *serv_data"
2555 SERV_R_BAD="#define SERV_R_BAD (-1)"
2556 SERV_R_COPY="#define SERV_R_COPY serv_data"
2557 SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS struct servent_data *sdptr"
2558 SERV_R_OK="#define SERV_R_OK (0)"
2559 SERV_R_SETANSWER="#undef SERV_R_SETANSWER"
2560 SERV_R_RETURN="#define SERV_R_RETURN int"
2561 SERVENT_DATA="#define SERVENT_DATA 1"
2568 SERV_R_ARGS="#define SERV_R_ARGS char *buf, int buflen"
2569 SERV_R_BAD="#define SERV_R_BAD NULL"
2570 SERV_R_COPY="#define SERV_R_COPY buf, buflen"
2571 SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS SERV_R_ARGS"
2572 SERV_R_OK="#define SERV_R_OK sptr"
2573 SERV_R_SETANSWER="#undef SERV_R_SETANSWER"
2574 SERV_R_RETURN="#define SERV_R_RETURN struct servent *"
2577 AC_SUBST(SERV_R_ARGS)
2578 AC_SUBST(SERV_R_BAD)
2579 AC_SUBST(SERV_R_COPY)
2580 AC_SUBST(SERV_R_COPY_ARGS)
2582 AC_SUBST(SERV_R_SETANSWER)
2583 AC_SUBST(SERV_R_RETURN)
2584 AC_SUBST(SERVENT_DATA)
2590 AC_CHECK_FUNC(endservent_r,
2598 void endservent_r(void);
2603 SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/"
2604 SERV_R_END_RETURN="#define SERV_R_END_RETURN void "
2605 SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/"
2606 SERV_R_ENT_UNUSED="#undef SERV_R_ENT_UNUSED /*empty*/"
2616 void endservent_r(struct servent_data *serv_data);
2621 SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/"
2622 SERV_R_END_RETURN="#define SERV_R_END_RETURN void "
2623 SERV_R_ENT_ARGS="#define SERV_R_ENT_ARGS struct servent_data *serv_data"
2624 SERV_R_ENT_UNUSED="#define SERV_R_ENT_UNUSED UNUSED(serv_data)"
2634 int endservent_r(struct servent_data *serv_data);
2639 SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) return(x)"
2640 SERV_R_END_RETURN="#define SERV_R_END_RETURN int "
2641 SERV_R_ENT_ARGS="#define SERV_R_ENT_ARGS struct servent_data *serv_data"
2642 SERV_R_ENT_UNUSED="#define SERV_R_ENT_UNUSED UNUSED(serv_data)"
2649 SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/"
2650 SERV_R_END_RETURN="#define SERV_R_END_RETURN void "
2651 SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/"
2652 SERV_R_ENT_UNUSED="#undef SERV_R_ENT_UNUSED /*empty*/"
2655 AC_SUBST(SERV_R_END_RESULT)
2656 AC_SUBST(SERV_R_END_RETURN)
2657 AC_SUBST(SERV_R_ENT_ARGS)
2658 AC_SUBST(SERV_R_ENT_UNUSED)
2664 AC_CHECK_FUNC(setservent_r,
2672 void setservent_r(int);
2676 SERV_R_SET_RESULT="#undef SERV_R_SET_RESULT"
2677 SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void"
2687 int setservent_r(int, struct servent_data *);
2691 SERV_R_SET_RESULT="#define SERV_R_SET_RESULT (0)"
2692 SERV_R_SET_RETURN="#define SERV_R_SET_RETURN int"
2698 SERV_R_SET_RESULT="#undef SERV_R_SET_RESULT"
2699 SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void"
2702 AC_SUBST(SERV_R_SET_RESULT)
2703 AC_SUBST(SERV_R_SET_RETURN)
2713 int innetgr(const char *netgroup, const char *host, const char *user, const char *domain);
2717 INNETGR_ARGS="#undef INNETGR_ARGS"
2728 int innetgr(char *netgroup, char *host, char *user, char *domain);
2732 INNETGR_ARGS="#define INNETGR_ARGS char *netgroup, char *host, char *user, char *domain"
2745 void setnetgrent(const char *);
2749 SETNETGRENT_ARGS="#undef SETNETGRENT_ARGS"
2760 void setnetgrent(char *);
2764 SETNETGRENT_ARGS="#define SETNETGRENT_ARGS char *netgroup"
2768 AC_SUBST(SETNETGRENT_ARGS)
2769 AC_SUBST(INNETGR_ARGS)
2772 # Random remaining OS-specific issues involving compiler warnings.
2773 # XXXDCL print messages to indicate some compensation is being done?
2775 BROKEN_IN6ADDR_INIT_MACROS="#undef BROKEN_IN6ADDR_INIT_MACROS"
2779 hack_shutup_pthreadmutexinit=yes
2780 hack_shutup_in6addr_init_macros=yes
2783 hack_shutup_in6addr_init_macros=yes
2786 hack_shutup_sputaux=yes
2789 hack_shutup_sigwait=yes
2790 hack_shutup_sputaux=yes
2791 hack_shutup_in6addr_init_macros=yes
2794 hack_shutup_stdargcast=yes
2797 hack_shutup_in6addr_init_macros=yes
2800 hack_shutup_in6addr_init_macros=yes
2803 hack_shutup_in6addr_init_macros=yes
2806 hack_shutup_in6addr_init_macros=yes
2808 *-solaris2.1[[0-9]])
2809 hack_shutup_in6addr_init_macros=yes
2813 case "$hack_shutup_pthreadmutexinit" in
2816 # Shut up PTHREAD_MUTEX_INITIALIZER unbraced
2817 # initializer warnings.
2819 AC_DEFINE(SHUTUP_MUTEX_INITIALIZER)
2823 case "$hack_shutup_sigwait" in
2826 # Shut up a -Wmissing-prototypes warning for sigwait().
2828 AC_DEFINE(SHUTUP_SIGWAIT)
2832 case "$hack_shutup_sputaux" in
2835 # Shut up a -Wmissing-prototypes warning from <stdio.h>.
2837 AC_DEFINE(SHUTUP_SPUTAUX)
2841 case "$hack_shutup_stdargcast" in
2844 # Shut up a -Wcast-qual warning from va_start().
2846 AC_DEFINE(SHUTUP_STDARG_CAST)
2850 case "$hack_shutup_in6addr_init_macros" in
2852 AC_DEFINE(BROKEN_IN6ADDR_INIT_MACROS, 1, [Defined if IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT need to be redefined.] )
2859 AC_SUBST(BIND9_TOP_BUILDDIR)
2860 BIND9_TOP_BUILDDIR=`pwd`
2862 AC_SUBST_FILE(BIND9_INCLUDES)
2863 BIND9_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
2865 AC_SUBST_FILE(BIND9_MAKE_RULES)
2866 BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
2868 AC_SUBST_FILE(LIBBIND_API)
2869 LIBBIND_API=$srcdir/api
2888 ${PORT_DIR}/Makefile
2889 ${PORT_INCLUDE}/Makefile
2890 include/isc/platform.h
2894 # Tell Emacs to edit this file in shell mode.