1 # Copyright (C) 2004-2008 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.83.2.5.2.38.2.1 $)
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 # The POSIX ln(1) program. Non-POSIX systems may substitute
40 # "copy" or something.
47 ar program not found. Please fix your PATH to include the directory in
48 which ar resides, or set AR in the environment with the full path to ar.
57 AC_PATH_PROGS(ETAGS, etags emacs-etags)
60 # Some systems, e.g. RH7, have the Exuberant Ctags etags instead of
61 # GNU emacs etags, and it requires the -L flag.
63 if test "X$ETAGS" != "X"; then
64 AC_MSG_CHECKING(for Exuberant Ctags etags)
65 if $ETAGS --version 2>&1 | grep 'Exuberant Ctags' >/dev/null 2>&1; then
75 # Perl is optional; it is used only by some of the system test scripts.
77 AC_PATH_PROGS(PERL, perl5 perl)
81 # isc/list.h and others clash with the rest of BIND 9
85 includedir='${prefix}/bind/include'
90 libdir='${prefix}/bind/lib'
95 # Make sure INSTALL uses an absolute path, else it will be wrong in all
96 # Makefiles, since they use make/rules.in and INSTALL will be adjusted by
97 # configure based on the location of the file where it is substituted.
98 # Since in BIND9 INSTALL is only substituted into make/rules.in, an immediate
99 # subdirectory of install-sh, This relative path will be wrong for all
100 # directories more than one level down from install-sh.
107 # Not all systems have dirname.
110 ac_dir="`echo $INSTALL | sed 's%/[^/]*$%%'`"
113 ac_prog="`echo $INSTALL | sed 's%.*/%%'`"
114 test "$ac_dir" = "$ac_prog" && ac_dir=.
115 test -d "$ac_dir" && ac_dir="`(cd \"$ac_dir\" && pwd)`"
116 INSTALL="$ac_dir/$ac_prog"
121 # On these hosts, we really want to use cc, not gcc, even if it is
122 # found. The gcc that these systems have will not correctly handle
125 # However, if the user sets $CC to be something, let that override
128 if test "X$CC" = "X" ; then
134 # Use Sun's cc if it is available, but watch
135 # out for /usr/ucb/cc; it will never be the right
138 # If setting CC here fails, the AC_PROG_CC done
139 # below might still find gcc.
140 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
141 for ac_dir in $PATH; do
142 test -z "$ac_dir" && ac_dir=.
148 if test -f "$ac_dir/cc"; then
172 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)
177 AC_CHECK_TYPE(ssize_t,signed)
178 AC_CHECK_TYPE(uintptr_t,unsigned long)
181 # check if we need to #include sys/select.h explicitly
183 case $ac_cv_header_unistd_h in
185 AC_MSG_CHECKING(if unistd.h defines fd_set)
187 #include <unistd.h>],
188 [fd_set read_set; return (0);],
190 ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"
193 case ac_cv_header_sys_select_h in
195 ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
198 AC_MSG_ERROR([need either working unistd.h or sys/select.h])
204 case ac_cv_header_sys_select_h in
206 ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
209 AC_MSG_ERROR([need either unistd.h or sys/select.h])
214 AC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH)
217 # Find the machine's endian flavor.
221 AC_ARG_WITH(irs-gr,[ --with-irs-gr Build ....],
222 want_irs_gr="$withval", want_irs_gr="no")
223 case "$want_irs_gr" in
224 yes) WANT_IRS_GR="#define WANT_IRS_GR 1"
225 WANT_IRS_GR_OBJS="\${WANT_IRS_GR_OBJS}"
227 *) WANT_IRS_GR="#undef WANT_IRS_GR" WANT_IRS_GR_OBJS="";;
229 AC_SUBST(WANT_IRS_GR)
230 AC_SUBST(WANT_IRS_GR_OBJS)
232 AC_ARG_WITH(irs-pw,[ --with-irs-pw Build ....],
233 want_irs_pw="$withval", want_irs_pw="no")
234 case "$want_irs_pw" in
235 yes) WANT_IRS_PW="#define WANT_IRS_PW 1"
236 WANT_IRS_PW_OBJS="\${WANT_IRS_PW_OBJS}";;
237 *) WANT_IRS_PW="#undef WANT_IRS_PW" WANT_IRS_PW_OBJS="";;
239 AC_SUBST(WANT_IRS_PW)
240 AC_SUBST(WANT_IRS_PW_OBJS)
242 AC_ARG_WITH(irs-nis,[ --with-irs-nis Build ....],
243 want_irs_nis="$withval", want_irs_nis="no")
244 case "$want_irs_nis" in
246 WANT_IRS_NIS="#define WANT_IRS_NIS 1"
247 WANT_IRS_NIS_OBJS="\${WANT_IRS_NIS_OBJS}"
248 case "$want_irs_gr" in
250 WANT_IRS_NISGR_OBJS="\${WANT_IRS_NISGR_OBJS}";;
252 WANT_IRS_NISGR_OBJS="";;
254 case "$want_irs_pw" in
256 WANT_IRS_NISPW_OBJS="\${WANT_IRS_NISPW_OBJS}";;
258 WANT_IRS_NISPW_OBJS="";;
262 WANT_IRS_NIS="#undef WANT_IRS_NIS"
264 WANT_IRS_NISGR_OBJS=""
265 WANT_IRS_NISPW_OBJS="";;
267 AC_SUBST(WANT_IRS_NIS)
268 AC_SUBST(WANT_IRS_NIS_OBJS)
269 AC_SUBST(WANT_IRS_NISGR_OBJS)
270 AC_SUBST(WANT_IRS_NISPW_OBJS)
277 main() { return(!have_db_h); }
279 WANT_IRS_DBPW_OBJS="\${WANT_IRS_DBPW_OBJS}"
281 WANT_IRS_DBPW_OBJS=""
283 WANT_IRS_DBPW_OBJS=""
285 AC_SUBST(WANT_IRS_DBPW_OBJS)
288 # was --with-randomdev specified?
290 AC_MSG_CHECKING(for random device)
291 AC_ARG_WITH(randomdev,
292 [ --with-randomdev=PATH Specify path for random device],
293 use_randomdev="$withval", use_randomdev="unspec")
295 case "$use_randomdev" in
299 devrandom=/dev/srandom
302 devrandom=/dev/random
305 AC_MSG_RESULT($devrandom)
306 AC_CHECK_FILE($devrandom,
307 AC_DEFINE_UNQUOTED(PATH_RANDOMDEV,
311 AC_MSG_ERROR([--with-randomdev must specify a path])
314 AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, "$use_randomdev")
315 AC_MSG_RESULT(using "$use_randomdev")
319 sinclude(../../config.threads.in)dnl
323 if test "X$GCC" = "Xyes"; then
327 CCOPT="$CCOPT -pthread"
328 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
332 CCOPT="$CCOPT -pthread"
335 LIBS="$LIBS -lthread"
338 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
345 CCOPT="$CCOPT -pthread"
352 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
356 CCOPT="$CCOPT -Kthread"
360 AC_DEFINE(_REENTRANT)
361 ALWAYS_DEFINES="-D_REENTRANT"
362 DO_PTHREADS="#define DO_PTHREADS 1"
363 WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}"
364 WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}"
367 WANT_IRS_THREADS_OBJS="";;
369 WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}";;
371 WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}"
375 # We'd like to use sigwait() too
377 AC_CHECK_FUNC(sigwait,
378 AC_DEFINE(HAVE_SIGWAIT),
379 AC_CHECK_LIB(c, sigwait,
380 AC_DEFINE(HAVE_SIGWAIT),
381 AC_CHECK_LIB(pthread, sigwait,
382 AC_DEFINE(HAVE_SIGWAIT),
383 AC_CHECK_LIB(pthread, _Psigwait,
384 AC_DEFINE(HAVE_SIGWAIT),))))
386 AC_CHECK_FUNC(pthread_attr_getstacksize,
387 AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
390 # Additional OS-specific issues related to pthreads and sigwait.
394 # One more place to look for sigwait.
397 AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),)
400 # BSDI 3.0 through 4.0.1 needs pthread_init() to be
401 # called before certain pthreads calls. This is deprecated
404 *-bsdi3.*|*-bsdi4.0*)
405 AC_DEFINE(NEED_PTHREAD_INIT)
408 # LinuxThreads requires some changes to the way we
412 AC_DEFINE(HAVE_LINUXTHREADS)
415 # Ensure the right sigwait() semantics on Solaris and make
416 # sure we call pthread_setconcurrency.
419 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
420 AC_CHECK_FUNC(pthread_setconcurrency,
421 AC_DEFINE(CALL_PTHREAD_SETCONCURRENCY))
422 AC_DEFINE(POSIX_GETPWUID_R)
423 AC_DEFINE(POSIX_GETPWNAM_R)
424 AC_DEFINE(POSIX_GETGRGID_R)
425 AC_DEFINE(POSIX_GETGRNAM_R)
428 AC_DEFINE(NEED_ENDNETGRENT_R)
429 AC_DEFINE(_PTHREADS_DRAFT4)
432 # UnixWare does things its own way.
435 AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
440 # Look for sysconf to allow detection of the number of processors.
442 AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
446 DO_PTHREADS="#undef DO_PTHREADS"
447 WANT_IRS_THREADSGR_OBJS=""
448 WANT_IRS_THREADSPW_OBJS=""
449 WANT_IRS_THREADS_OBJS=""
454 AC_SUBST(ALWAYS_DEFINES)
455 AC_SUBST(DO_PTHREADS)
456 AC_SUBST(WANT_IRS_THREADSGR_OBJS)
457 AC_SUBST(WANT_IRS_THREADSPW_OBJS)
458 AC_SUBST(WANT_IRS_THREADS_OBJS)
459 AC_SUBST(WANT_THREADS_OBJS)
461 AC_CHECK_FUNC(strlcat, AC_DEFINE(HAVE_STRLCAT))
462 AC_CHECK_FUNC(memmove, AC_DEFINE(HAVE_MEMMOVE))
463 AC_CHECK_FUNC(memchr, AC_DEFINE(HAVE_MEMCHR))
465 AC_CHECK_FUNC(if_nametoindex,
466 [USE_IFNAMELINKID="#define USE_IFNAMELINKID 1"],
467 [USE_IFNAMELINKID="#undef USE_IFNAMELINKID"])
468 AC_SUBST(USE_IFNAMELINKID)
470 ISC_THREAD_DIR=$thread_dir
471 AC_SUBST(ISC_THREAD_DIR)
473 AC_CHECK_FUNC(daemon,
474 [DAEMON_OBJS="" NEED_DAEMON="#undef NEED_DAEMON"]
476 [DAEMON_OBJS="\${DAEMON_OBJS}" NEED_DAEMON="#define NEED_DAEMON 1"]
478 AC_SUBST(DAEMON_OBJS)
479 AC_SUBST(NEED_DAEMON)
481 AC_CHECK_FUNC(strsep,
482 [STRSEP_OBJS="" NEED_STRSEP="#undef NEED_STRSEP"]
484 [STRSEP_OBJS="\${STRSEP_OBJS}" NEED_STRSEP="#define NEED_STRSEP 1"]
486 AC_SUBST(STRSEP_OBJS)
487 AC_SUBST(NEED_STRSEP)
489 AC_CHECK_FUNC(strerror, [NEED_STRERROR="#undef NEED_STRERROR"],
490 [NEED_STRERROR="#define NEED_STRERROR 1"])
491 AC_SUBST(NEED_STRERROR)
494 # flockfile is usually provided by pthreads, but we may want to use it
495 # even if compiled with --disable-threads.
497 AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),)
500 # Indicate what the final decision was regarding threads.
502 AC_MSG_CHECKING(whether to build with threads)
503 if $use_threads; then
510 # End of pthreads stuff.
514 # Additional compiler settings.
518 IRIX_DNSSEC_WARNINGS_HACK=""
520 if test "X$GCC" = "Xyes"; then
521 AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing)
523 CFLAGS=-fno-strict-aliasing
524 AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no])
526 if test "$FNOSTRICTALIASING" = "yes"; then
528 STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing"
531 STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith"
542 # The version of the C compiler that constantly warns about
543 # 'const' as well as alignment issues is unfortunately not
544 # able to be discerned via the version of the operating
545 # system, nor does cc have a version flag.
546 case "`$CC +W 123 2>&1`" in
551 # Turn off the pointlessly noisy warnings.
552 STD_CWARNINGS="+w1 +W 474,530,2193,2236"
555 CCOPT="$CCOPT -Ae -z"
556 LIBS="-Wl,+vnocompatwarnings $LIBS"
557 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'
558 MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
561 STD_CWARNINGS="-fullwarn -woff 1209"
563 # Silence more than 250 instances of
564 # "prototyped function redeclared without prototype"
565 # and 11 instances of
566 # "variable ... was set but never used"
567 # from lib/dns/sec/openssl.
569 IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552"
581 # _GNU_SOURCE is needed to access the fd_bits field of struct fd_set, which
582 # is supposed to be opaque.
586 STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE"
591 AC_SUBST(MKDEPCFLAGS)
593 AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK)
598 AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
601 # -lxnet buys us one big porting headache... standards, gotta love 'em.
603 # AC_CHECK_LIB(xnet, socket, ,
604 # AC_CHECK_LIB(socket, socket)
605 # AC_CHECK_LIB(nsl, inet_ntoa)
608 # Use this for now, instead:
614 AC_CHECK_LIB(socket, socket)
615 AC_CHECK_LIB(nsl, inet_ntoa)
618 AC_CHECK_LIB(d4r, gethostbyname_r)
619 AC_CHECK_LIB(socket, socket)
620 AC_CHECK_LIB(nsl, inet_ntoa)
627 AC_MSG_CHECKING(whether to use purify)
629 [ --with-purify[=PATH] use Rational purify],
630 use_purify="$withval", use_purify="no")
632 case "$use_purify" in
636 AC_PATH_PROG(purify_path, purify, purify)
639 purify_path="$use_purify"
643 case "$use_purify" in
649 if test -f $purify_path || test $purify_path = purify; then
650 AC_MSG_RESULT($purify_path)
651 PURIFYFLAGS="`echo $PURIFYOPTIONS`"
652 PURIFY="$purify_path $PURIFYFLAGS"
654 AC_MSG_ERROR([$purify_path not found.
656 Please choose the proper path with the following command:
658 configure --with-purify=PATH
667 # GNU libtool support
670 [ --with-libtool use GNU libtool (following indented options supported)],
671 use_libtool="$withval", use_libtool="no")
678 LIBTOOL_MKDEP_SED='s;\.o;\.lo;'
679 LIBTOOL_MODE_COMPILE='--mode=compile'
680 LIBTOOL_MODE_INSTALL='--mode=install'
681 LIBTOOL_MODE_LINK='--mode=link'
689 LIBTOOL_MODE_COMPILE=
690 LIBTOOL_MODE_INSTALL=
696 # File name extension for static archive files, for those few places
697 # where they are treated differently from dynamic ones.
704 AC_SUBST(LIBTOOL_MKDEP_SED)
705 AC_SUBST(LIBTOOL_MODE_COMPILE)
706 AC_SUBST(LIBTOOL_MODE_INSTALL)
707 AC_SUBST(LIBTOOL_MODE_LINK)
710 # Here begins a very long section to determine the system's networking
711 # capabilities. The order of the tests is signficant.
718 [ --enable-ipv6 use IPv6 [default=autodetect]])
720 case "$enable_ipv6" in
729 # We do the IPv6 compilation checking after libtool so that we can put
730 # the right suffix on the files.
732 AC_MSG_CHECKING(for IPv6 structures)
734 #include <sys/types.h>
735 #include <sys/socket.h>
736 #include <netinet/in.h>],
737 [struct sockaddr_in6 sin6; return (0);],
744 # See whether IPv6 support is provided via a Kame add-on.
745 # This is done before other IPv6 linking tests to LIBS is properly set.
747 AC_MSG_CHECKING(for Kame IPv6 support)
749 [ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]],
750 use_kame="$withval", use_kame="no")
756 kame_path=/usr/local/v6
759 kame_path="$use_kame"
768 if test -f $kame_path/lib/libinet6.a; then
769 AC_MSG_RESULT($kame_path/lib/libinet6.a)
770 LIBS="-L$kame_path/lib -linet6 $LIBS"
772 AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
774 Please choose the proper path with the following command:
776 configure --with-kame=PATH
783 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
784 # Including it on Kame-using platforms is very bad, though, because
785 # Kame uses #error against direct inclusion. So include it on only
786 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
787 # This is done before the in6_pktinfo check because that's what
788 # netinet6/in6.h is needed for.
793 ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
794 isc_netinet6in6_hack="#include <netinet6/in6.h>"
797 ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
798 isc_netinet6in6_hack=""
804 # This is similar to the netinet6/in6.h issue.
808 ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
809 ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1"
810 isc_netinetin6_hack="#include <netinet/in6.h>"
813 ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H"
814 ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR"
815 isc_netinetin6_hack=""
820 # Now delve deeper into the suitability of the IPv6 support.
822 case "$found_ipv6" in
824 HAS_INET6_STRUCTS="#define HAS_INET6_STRUCTS 1"
826 AC_MSG_CHECKING(for in6_addr)
828 #include <sys/types.h>
829 #include <sys/socket.h>
830 #include <netinet/in.h>
832 $isc_netinet6in6_hack
834 [struct in6_addr in6; return (0);],
836 HAS_IN_ADDR6="#undef HAS_IN_ADDR6"
837 isc_in_addr6_hack=""],
839 HAS_IN_ADDR6="#define HAS_IN_ADDR6 1"
840 isc_in_addr6_hack="#define in6_addr in_addr6"])
842 AC_MSG_CHECKING(for in6addr_any)
844 #include <sys/types.h>
845 #include <sys/socket.h>
846 #include <netinet/in.h>
848 $isc_netinet6in6_hack
851 [struct in6_addr in6; in6 = in6addr_any; return (0);],
853 NEED_IN6ADDR_ANY="#undef NEED_IN6ADDR_ANY"],
855 NEED_IN6ADDR_ANY="#define NEED_IN6ADDR_ANY 1"])
857 AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
859 #include <sys/types.h>
860 #include <sys/socket.h>
861 #include <netinet/in.h>
863 $isc_netinet6in6_hack
865 [struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
867 result="#define HAVE_SIN6_SCOPE_ID 1"],
869 result="#undef HAVE_SIN6_SCOPE_ID"])
870 HAVE_SIN6_SCOPE_ID="$result"
872 AC_MSG_CHECKING(for in6_pktinfo)
874 #include <sys/types.h>
875 #include <sys/socket.h>
876 #include <netinet/in.h>
878 $isc_netinet6in6_hack
880 [struct in6_pktinfo xyzzy; return (0);],
882 ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
883 [AC_MSG_RESULT(no -- disabling runtime ipv6 support)
884 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
887 HAS_INET6_STRUCTS="#undef HAS_INET6_STRUCTS"
888 NEED_IN6ADDR_ANY="#undef NEED_IN6ADDR_ANY"
889 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
890 HAVE_SIN6_SCOPE_ID="#define HAVE_SIN6_SCOPE_ID 1"
893 ISC_ISCIPV6_O="unix/ipv6.$O"
898 AC_MSG_CHECKING(for sockaddr_storage)
900 #include <sys/types.h>
901 #include <sys/socket.h>
902 #include <netinet/in.h>
904 [struct sockaddr_storage xyzzy; return (0);],
906 HAVE_SOCKADDR_STORAGE="#define HAVE_SOCKADDR_STORAGE 1"],
908 HAVE_SOCKADDR_STORAGE="#undef HAVE_SOCKADDR_STORAGE"])
910 AC_SUBST(HAS_INET6_STRUCTS)
911 AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
912 AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
913 AC_SUBST(HAS_IN_ADDR6)
914 AC_SUBST(NEED_IN6ADDR_ANY)
915 AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
916 AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
919 AC_SUBST(ISC_ISCIPV6_O)
921 AC_SUBST(HAVE_SIN6_SCOPE_ID)
922 AC_SUBST(HAVE_SOCKADDR_STORAGE)
925 # Check for network functions that are often missing. We do this
926 # after the libtool checking, so we can put the right suffix on
927 # the files. It also needs to come after checking for a Kame add-on,
928 # which provides some (all?) of the desired functions.
930 AC_MSG_CHECKING([for inet_ntop])
932 #include <sys/types.h>
933 #include <netinet/in.h>
934 #include <arpa/inet.h>],
935 [inet_ntop(0, 0, 0, 0); return (0);],
937 ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
940 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
941 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
942 ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"])
943 AC_MSG_CHECKING([for inet_pton])
945 #include <sys/types.h>
946 #include <netinet/in.h>
947 #include <arpa/inet.h>],
948 [inet_pton(0, 0, 0); return (0);],
950 ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
953 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
954 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
955 ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"])
956 AC_MSG_CHECKING([for inet_aton])
958 #include <sys/types.h>
959 #include <netinet/in.h>
960 #include <arpa/inet.h>],
961 [struct in_addr in; inet_aton(0, &in); return (0);],
963 ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON"],
966 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
967 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c"
968 ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1"])
970 AC_SUBST(ISC_PLATFORM_NEEDNTOP)
971 AC_SUBST(ISC_PLATFORM_NEEDPTON)
972 AC_SUBST(ISC_PLATFORM_NEEDATON)
975 # Look for a 4.4BSD-style sa_len member in struct sockaddr.
979 # Turn on 4.4BSD style sa_len support.
980 AC_DEFINE(_SOCKADDR_LEN)
984 AC_MSG_CHECKING(for sa_len in struct sockaddr)
986 #include <sys/types.h>
987 #include <sys/socket.h>],
988 [struct sockaddr sa; sa.sa_len = 0; return (0);],
990 HAVE_SA_LEN="#define HAVE_SA_LEN 1"],
992 HAVE_SA_LEN="#undef HAVE_SA_LEN"])
993 AC_SUBST(HAVE_SA_LEN)
998 *-bsdi[2345]*) have_minimum_ifreq=yes;;
999 *-darwin*) have_minimum_ifreq=yes;;
1000 *-freebsd*) have_minimum_ifreq=yes;;
1001 *-lynxos*) have_minimum_ifreq=yes;;
1002 *-netbsd*) have_minimum_ifreq=yes;;
1003 *-next*) have_minimum_ifreq=yes;;
1004 *-openbsd*) have_minimum_ifreq=yes;;
1005 *-rhapsody*) have_minimum_ifreq=yes;;
1008 case "$have_minimum_ifreq" in
1010 HAVE_MINIMUM_IFREQ="#define HAVE_MINIMUM_IFREQ 1";;
1012 HAVE_MINIMUM_IFREQ="#undef HAVE_MINIMUM_IFREQ";;
1014 HAVE_MINIMUM_IFREQ="#undef HAVE_MINIMUM_IFREQ";;
1016 AC_SUBST(HAVE_MINIMUM_IFREQ)
1019 PORT_DIR=port/unknown
1020 SOLARIS_BITTYPES="#undef NEED_SOLARIS_BITTYPES"
1021 BSD_COMP="#undef BSD_COMP"
1022 USE_FIONBIO_IOCTL="#undef USE_FIONBIO_IOCTL"
1023 PORT_NONBLOCK="#define PORT_NONBLOCK O_NONBLOCK"
1024 HAVE_MD5="#undef HAVE_MD5"
1025 USE_POLL="#undef HAVE_POLL"
1026 SOLARIS2="#undef SOLARIS2"
1028 *aix3.2*) PORT_DIR="port/aix32";;
1029 *aix4*) PORT_DIR="port/aix4";;
1030 *aix5*) PORT_DIR="port/aix5";;
1031 *aux3*) PORT_DIR="port/aux3";;
1032 *-bsdi2*) PORT_DIR="port/bsdos2";;
1033 *-bsdi*) PORT_DIR="port/bsdos";;
1035 PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
1036 PORT_DIR="port/cygwin";;
1037 *-darwin*) PORT_DIR="port/darwin";;
1038 *-osf*) PORT_DIR="port/decunix";;
1039 *-freebsd*) PORT_DIR="port/freebsd";;
1040 *-hpux9*) PORT_DIR="port/hpux9";;
1041 *-hpux10*) PORT_DIR="port/hpux10";;
1042 *-hpux11*) PORT_DIR="port/hpux";;
1043 *-irix*) PORT_DIR="port/irix";;
1044 *-linux*) PORT_DIR="port/linux";;
1045 *-lynxos*) PORT_DIR="port/lynxos";;
1046 *-mpe*) PORT_DIR="port/mpe";;
1047 *-netbsd*) PORT_DIR="port/netbsd";;
1048 *-next*) PORT_DIR="port/next";;
1049 *-openbsd*) PORT_DIR="port/openbsd";;
1050 *-qnx*) PORT_DIR="port/qnx";;
1051 *-rhapsody*) PORT_DIR="port/rhapsody";;
1053 PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
1054 PORT_DIR="port/sunos";;
1055 *-solaris2.[[01234]])
1056 BSD_COMP="#define BSD_COMP 1"
1057 SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
1058 USE_FIONBIO_IOCTL="#define USE_FIONBIO_IOCTL 1"
1059 SOLARIS2="#define SOLARIS2 1"
1060 PORT_DIR="port/solaris";;
1062 BSD_COMP="#define BSD_COMP 1"
1063 SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
1064 SOLARIS2="#define SOLARIS2 1"
1065 PORT_DIR="port/solaris";;
1067 BSD_COMP="#define BSD_COMP 1"
1068 SOLARIS2="#define SOLARIS2 1"
1069 PORT_DIR="port/solaris";;
1070 *-solaris2*) BSD_COMP="#define BSD_COMP 1"
1071 USE_POLL="#define USE_POLL 1"
1072 HAVE_MD5="#define HAVE_MD5 1"
1073 SOLARIS2="#define SOLARIS2 1"
1074 PORT_DIR="port/solaris";;
1075 *-ultrix*) PORT_DIR="port/ultrix";;
1076 *-sco-sysv*uw2.0*) PORT_DIR="port/unixware20";;
1077 *-sco-sysv*uw2.1.2*) PORT_DIR="port/unixware212";;
1078 *-sco-sysv*uw7*) PORT_DIR="port/unixware7";;
1082 AC_SUBST(SOLARIS_BITTYPES)
1083 AC_SUBST(USE_FIONBIO_IOCTL)
1084 AC_SUBST(PORT_NONBLOCK)
1089 PORT_INCLUDE=${PORT_DIR}/include
1090 AC_SUBST(PORT_INCLUDE)
1093 # Look for a 4.4BSD or 4.3BSD struct msghdr
1095 AC_MSG_CHECKING(for struct msghdr flavor)
1097 #include <sys/types.h>
1098 #include <sys/socket.h>],
1099 [struct msghdr msg; msg.msg_flags = 0; return (0);],
1100 [AC_MSG_RESULT(4.4BSD)
1101 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"],
1102 [AC_MSG_RESULT(4.3BSD)
1103 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])
1104 AC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)
1107 # Look for in_port_t.
1109 AC_MSG_CHECKING(for type in_port_t)
1111 #include <sys/types.h>
1112 #include <netinet/in.h>],
1113 [in_port_t port = 25; return (0);],
1115 ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"],
1117 ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])
1118 AC_SUBST(ISC_PLATFORM_NEEDPORTT)
1120 AC_MSG_CHECKING(for struct timespec)
1122 #include <sys/types.h>
1124 [struct timespec ts = { 0, 0 }; return (0);],
1126 ISC_PLATFORM_NEEDTIMESPEC="#undef ISC_PLATFORM_NEEDTIMESPEC"],
1128 ISC_PLATFORM_NEEDTIMESPEC="#define ISC_PLATFORM_NEEDTIMESPEC 1"])
1129 AC_SUBST(ISC_PLATFORM_NEEDTIMESPEC)
1132 # Check for addrinfo
1134 AC_MSG_CHECKING(for struct addrinfo)
1136 #include <netdb.h>],
1137 [struct addrinfo a; return (0);],
1139 AC_DEFINE(HAVE_ADDRINFO)],
1140 [AC_MSG_RESULT(no)])
1142 AC_MSG_CHECKING(for int sethostent)
1144 #include <netdb.h>],
1145 [int i = sethostent(0); return(0);],
1146 [AC_MSG_RESULT(yes)],
1147 [AC_MSG_RESULT(no)])
1149 AC_MSG_CHECKING(for int endhostent)
1151 #include <netdb.h>],
1152 [int i = endhostent(); return(0);],
1154 ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"],
1156 ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"])
1157 AC_SUBST(ISC_LWRES_ENDHOSTENTINT)
1159 AC_MSG_CHECKING(for int setnetent)
1161 #include <netdb.h>],
1162 [int i = setnetent(0); return(0);],
1164 ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"],
1166 ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"])
1167 AC_SUBST(ISC_LWRES_SETNETENTINT)
1169 AC_MSG_CHECKING(for int endnetent)
1171 #include <netdb.h>],
1172 [int i = endnetent(); return(0);],
1174 ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"],
1176 ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"])
1177 AC_SUBST(ISC_LWRES_ENDNETENTINT)
1179 AC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...))
1182 struct hostent *gethostbyaddr(const void *, size_t, int);],
1185 ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"],
1187 ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"])
1188 AC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID)
1190 AC_MSG_CHECKING(for h_errno in netdb.h)
1192 #include <netdb.h>],
1193 [h_errno = 1; return(0);],
1195 ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"],
1197 ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1"])
1198 AC_SUBST(ISC_LWRES_NEEDHERRNO)
1200 AC_CHECK_FUNC(getipnodebyname,
1201 [ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
1202 [ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
1203 AC_CHECK_FUNC(getnameinfo,
1204 [ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"],
1205 [ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"])
1206 AC_CHECK_FUNC(getaddrinfo,
1207 [ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"
1208 AC_DEFINE(HAVE_GETADDRINFO)],
1209 [ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])
1210 AC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))
1211 AC_SUBST(ISC_LWRES_GETIPNODEPROTO)
1212 AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
1213 AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)
1214 AC_CHECK_FUNC(pselect,
1215 [NEED_PSELECT="#undef NEED_PSELECT"],
1216 [NEED_PSELECT="#define NEED_PSELECT"])
1217 AC_SUBST(NEED_PSELECT)
1218 AC_CHECK_FUNC(gettimeofday,
1219 [NEED_GETTIMEOFDAY="#undef NEED_GETTIMEOFDAY"],
1220 [NEED_GETTIMEOFDAY="#define NEED_GETTIMEOFDAY 1"])
1221 AC_SUBST(NEED_GETTIMEOFDAY)
1222 AC_CHECK_FUNC(strndup,
1223 [HAVE_STRNDUP="#define HAVE_STRNDUP 1"],
1224 [HAVE_STRNDUP="#undef HAVE_STRNDUP"])
1225 AC_SUBST(HAVE_STRNDUP)
1228 # Look for a sysctl call to get the list of network interfaces.
1230 AC_MSG_CHECKING(for interface list sysctl)
1231 AC_EGREP_CPP(found_rt_iflist, [
1232 #include <sys/param.h>
1233 #include <sys/sysctl.h>
1234 #include <sys/socket.h>
1235 #ifdef NET_RT_IFLIST
1240 AC_DEFINE(HAVE_IFLIST_SYSCTL)],
1241 [AC_MSG_RESULT(no)])
1244 # Check for some other useful functions that are not ever-present.
1246 AC_CHECK_FUNC(strsep,
1247 [ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
1248 [ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
1249 AC_CHECK_FUNC(vsnprintf,
1250 [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"],
1251 [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O"
1252 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS print.c"
1253 ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"])
1254 AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
1255 AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
1257 AC_SUBST(ISC_EXTRA_OBJS)
1258 AC_SUBST(ISC_EXTRA_SRCS)
1259 AC_CHECK_FUNC(strerror,
1260 [USE_SYSERROR_LIST="#undef USE_SYSERROR_LIST"],
1261 [USE_SYSERROR_LIST="#define USE_SYSERROR_LIST 1"])
1262 AC_SUBST(USE_SYSERROR_LIST)
1265 # Determine the printf format characters to use when printing
1266 # values of type isc_int64_t. We make the assumption that platforms
1267 # where a "long long" is the same size as a "long" (e.g., Alpha/OSF1)
1268 # want "%ld" and everyone else can use "%lld". Win32 uses "%I64d",
1269 # but that's defined elsewhere since we don't use configure on Win32.
1271 AC_MSG_CHECKING(printf format modifier for 64-bit integers)
1272 AC_TRY_RUN([main() { exit(!(sizeof(long long int) == sizeof(long int))); }],
1274 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'],
1276 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'],
1277 [AC_MSG_RESULT(default ll)
1278 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'])
1279 AC_SUBST(ISC_PLATFORM_QUADFORMAT)
1284 AC_CHECK_FUNC(chroot, AC_DEFINE(HAVE_CHROOT))
1287 # for accept, recvfrom, getpeername etc.
1289 AC_MSG_CHECKING(for socket length type)
1291 #include <sys/types.h>
1292 #include <sys/socket.h>
1293 int accept(int, struct sockaddr *, socklen_t *);
1295 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T socklen_t"
1296 AC_MSG_RESULT(socklen_t)]
1299 #include <sys/types.h>
1300 #include <sys/socket.h>
1301 int accept(int, struct sockaddr *, unsigned int *);
1303 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T unsigned int"
1304 AC_MSG_RESULT(unsigned int)]
1307 #include <sys/types.h>
1308 #include <sys/socket.h>
1309 int accept(int, struct sockaddr *, unsigned long *);
1311 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T unsigned long"
1312 AC_MSG_RESULT(unsigned long)]
1315 #include <sys/types.h>
1316 #include <sys/socket.h>
1317 int accept(int, struct sockaddr *, long *);
1319 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T long"
1320 AC_MSG_RESULT(long)]
1322 ISC_SOCKLEN_T="#define ISC_SOCKLEN_T int"
1325 AC_SUBST(ISC_SOCKLEN_T)
1327 AC_CHECK_FUNC(getgrouplist,
1329 [#include <unistd.h>
1331 getgrouplist(const char *name, int basegid, int *groups, int *ngroups) {
1335 GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, int basegid, int *groups, int *ngroups"
1337 GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups"
1339 GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups"
1340 AC_DEFINE(NEED_GETGROUPLIST)
1342 AC_SUBST(GETGROUPLIST_ARGS)
1344 AC_CHECK_FUNC(setgroupent,,AC_DEFINE(NEED_SETGROUPENT))
1350 AC_CHECK_FUNC(getnetbyaddr_r,
1360 getnetbyaddr_r(long net, int type, struct netent *result, char *buffer,
1365 NET_R_ARGS="#define NET_R_ARGS char *buf, int buflen"
1366 NET_R_BAD="#define NET_R_BAD NULL"
1367 NET_R_COPY="#define NET_R_COPY buf, buflen"
1368 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS NET_R_ARGS"
1369 NET_R_OK="#define NET_R_OK nptr"
1370 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1371 NET_R_RETURN="#define NET_R_RETURN struct netent *"
1372 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
1373 NETENT_DATA="#undef NETENT_DATA"
1383 int getnetbyaddr_r (unsigned long int, int, struct netent *,
1384 char *, size_t, struct netent **, int *);
1388 NET_R_ARGS="#define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop"
1389 NET_R_BAD="#define NET_R_BAD ERANGE"
1390 NET_R_COPY="#define NET_R_COPY buf, buflen"
1391 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS char *buf, size_t buflen"
1392 NET_R_OK="#define NET_R_OK 0"
1393 NET_R_SETANSWER="#define NET_R_SETANSWER 1"
1394 NET_R_RETURN="#define NET_R_RETURN int"
1395 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T unsigned long int"
1396 NETENT_DATA="#undef NETENT_DATA"
1406 extern int getnetbyaddr_r(int, int, struct netent *, struct netent_data *);
1410 NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"
1411 NET_R_BAD="#define NET_R_BAD (-1)"
1412 NET_R_COPY="#define NET_R_COPY ndptr"
1413 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"
1414 NET_R_OK="#define NET_R_OK 0"
1415 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1416 NET_R_RETURN="#define NET_R_RETURN int"
1417 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T int"
1418 NETENT_DATA="#define NETENT_DATA 1"
1424 int getnetbyaddr_r (in_addr_t, int, struct netent *, struct netent_data *);
1428 NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"
1429 NET_R_BAD="#define NET_R_BAD (-1)"
1430 NET_R_COPY="#define NET_R_COPY ndptr"
1431 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"
1432 NET_R_OK="#define NET_R_OK 0"
1433 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1434 NET_R_RETURN="#define NET_R_RETURN int"
1435 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
1436 NETENT_DATA="#define NETENT_DATA 1"
1442 int getnetbyaddr_r (long, int, struct netent *, struct netent_data *);
1446 NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"
1447 NET_R_BAD="#define NET_R_BAD (-1)"
1448 NET_R_COPY="#define NET_R_COPY ndptr"
1449 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"
1450 NET_R_OK="#define NET_R_OK 0"
1451 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1452 NET_R_RETURN="#define NET_R_RETURN int"
1453 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
1454 NETENT_DATA="#define NETENT_DATA 1"
1460 int getnetbyaddr_r (uint32_t, int, struct netent *,
1461 char *, size_t, struct netent **, int *);
1465 NET_R_ARGS="#define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop"
1466 NET_R_BAD="#define NET_R_BAD ERANGE"
1467 NET_R_COPY="#define NET_R_COPY buf, buflen"
1468 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS char *buf, size_t buflen"
1469 NET_R_OK="#define NET_R_OK 0"
1470 NET_R_SETANSWER="#define NET_R_SETANSWER 1"
1471 NET_R_RETURN="#define NET_R_RETURN int"
1472 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T unsigned long int"
1473 NETENT_DATA="#undef NETENT_DATA"
1482 NET_R_ARGS="#define NET_R_ARGS char *buf, int buflen"
1483 NET_R_BAD="#define NET_R_BAD NULL"
1484 NET_R_COPY="#define NET_R_COPY buf, buflen"
1485 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS NET_R_ARGS"
1486 NET_R_OK="#define NET_R_OK nptr"
1487 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1488 NET_R_RETURN="#define NET_R_RETURN struct netent *"
1489 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
1490 NETENT_DATA="#undef NETENT_DATA"
1495 *dec-osf*) GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T int" ;;
1497 AC_SUBST(NET_R_ARGS)
1499 AC_SUBST(NET_R_COPY)
1500 AC_SUBST(NET_R_COPY_ARGS)
1502 AC_SUBST(NET_R_SETANSWER)
1503 AC_SUBST(NET_R_RETURN)
1504 AC_SUBST(GETNETBYADDR_ADDR_T)
1505 AC_SUBST(NETENT_DATA)
1507 AC_CHECK_FUNC(setnetent_r,
1513 void setnetent_r (int);
1515 NET_R_ENT_ARGS="#undef NET_R_ENT_ARGS /*empty*/"
1516 NET_R_SET_RESULT="#undef NET_R_SET_RESULT /*empty*/"
1517 NET_R_SET_RETURN="#define NET_R_SET_RETURN void"
1525 extern int setnetent_r(int, struct netent_data *);
1527 NET_R_ENT_ARGS="#define NET_R_ENT_ARGS struct netent_data *ndptr"
1528 NET_R_SET_RESULT="#define NET_R_SET_RESULT NET_R_OK"
1529 NET_R_SET_RETURN="#define NET_R_SET_RETURN int"
1534 NET_R_ENT_ARGS="#undef NET_R_ENT_ARGS /*empty*/"
1535 NET_R_SET_RESULT="#undef NET_R_SET_RESULT /*empty*/"
1536 NET_R_SET_RETURN="#define NET_R_SET_RETURN void"
1538 AC_SUBST(NET_R_ENT_ARGS)
1539 AC_SUBST(NET_R_SET_RESULT)
1540 AC_SUBST(NET_R_SET_RETURN)
1547 AC_CHECK_FUNC(endnetent_r,
1555 void endnetent_r (void);
1557 NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
1558 NET_R_END_RETURN="#define NET_R_END_RETURN void"
1567 extern int endnetent_r(struct netent_data *);
1569 NET_R_END_RESULT="#define NET_R_END_RESULT(x) return (x)"
1570 NET_R_END_RETURN="#define NET_R_END_RETURN int"
1579 extern void endnetent_r(struct netent_data *);
1581 NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
1582 NET_R_END_RETURN="#define NET_R_END_RETURN void"
1588 NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
1589 NET_R_END_RETURN="#define NET_R_END_RETURN void"
1592 AC_SUBST(NET_R_END_RESULT)
1593 AC_SUBST(NET_R_END_RETURN)
1595 AC_CHECK_FUNC(getgrnam_r,,AC_DEFINE(NEED_GETGRNAM_R))
1596 AC_CHECK_FUNC(getgrgid_r,,AC_DEFINE(NEED_GETGRGID_R))
1598 AC_CHECK_FUNC(getgrent_r,
1602 struct group *getgrent_r(struct group *grp, char *buffer,
1605 GROUP_R_ARGS="#define GROUP_R_ARGS char *buf, int buflen"
1606 GROUP_R_BAD="#define GROUP_R_BAD NULL"
1607 GROUP_R_OK="#define GROUP_R_OK gptr"
1608 GROUP_R_RETURN="#define GROUP_R_RETURN struct group *"
1612 GROUP_R_ARGS="#define GROUP_R_ARGS char *buf, int buflen"
1613 GROUP_R_BAD="#define GROUP_R_BAD NULL"
1614 GROUP_R_OK="#define GROUP_R_OK gptr"
1615 GROUP_R_RETURN="#define GROUP_R_RETURN struct group *"
1616 AC_DEFINE(NEED_GETGRENT_R)
1618 AC_SUBST(GROUP_R_ARGS)
1619 AC_SUBST(GROUP_R_BAD)
1620 AC_SUBST(GROUP_R_OK)
1621 AC_SUBST(GROUP_R_RETURN)
1623 AC_CHECK_FUNC(endgrent_r,
1625 GROUP_R_END_RESULT="#define GROUP_R_END_RESULT(x) /*empty*/"
1626 GROUP_R_END_RETURN="#define GROUP_R_END_RETURN void"
1627 GROUP_R_ENT_ARGS="#define GROUP_R_ENT_ARGS void"
1628 AC_DEFINE(NEED_ENDGRENT_R)
1630 AC_SUBST(GROUP_R_END_RESULT)
1631 AC_SUBST(GROUP_R_END_RETURN)
1632 AC_SUBST(GROUP_R_ENT_ARGS)
1634 AC_CHECK_FUNC(setgrent_r,
1636 GROUP_R_SET_RESULT="#undef GROUP_R_SET_RESULT /*empty*/"
1637 GROUP_R_SET_RETURN="#define GROUP_R_SET_RETURN void"
1638 AC_DEFINE(NEED_SETGRENT_R)
1640 AC_SUBST(GROUP_R_SET_RESULT)
1641 AC_SUBST(GROUP_R_SET_RETURN)
1648 AC_CHECK_FUNC(gethostbyname_r,
1654 struct hostent *gethostbyname_r
1655 (const char *name, struct hostent *hp, char *buf, int len, int *h_errnop) {}
1659 HOST_R_ARGS="#define HOST_R_ARGS char *buf, int buflen, int *h_errnop"
1660 HOST_R_BAD="#define HOST_R_BAD NULL"
1661 HOST_R_COPY="#define HOST_R_COPY buf, buflen"
1662 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
1663 HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
1664 HOST_R_OK="#define HOST_R_OK hptr"
1665 HOST_R_RETURN="#define HOST_R_RETURN struct hostent *"
1666 HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
1667 HOSTENT_DATA="#undef HOSTENT_DATA"
1674 int gethostbyname_r(const char *name,
1675 struct hostent *result,
1676 struct hostent_data *hdptr);
1678 HOST_R_ARGS="#define HOST_R_ARGS struct hostent_data *hdptr"
1679 HOST_R_BAD="#define HOST_R_BAD (-1)"
1680 HOST_R_COPY="#define HOST_R_COPY hdptr"
1681 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS HOST_R_ARGS"
1682 HOST_R_ERRNO="#undef HOST_R_ERRNO"
1683 HOST_R_OK="#define HOST_R_OK 0"
1684 HOST_R_RETURN="#define HOST_R_RETURN int"
1685 HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
1686 HOSTENT_DATA="#define HOSTENT_DATA 1"
1692 extern int gethostbyname_r (const char *,
1698 HOST_R_ARGS="#define HOST_R_ARGS char *buf, size_t buflen, struct hostent **answerp, int *h_errnop"
1699 HOST_R_BAD="#define HOST_R_BAD ERANGE"
1700 HOST_R_COPY="#define HOST_R_COPY buf, buflen"
1701 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
1702 HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
1703 HOST_R_OK="#define HOST_R_OK 0"
1704 HOST_R_RETURN="#define HOST_R_RETURN int"
1705 HOST_R_SETANSWER="#define HOST_R_SETANSWER 1"
1706 HOSTENT_DATA="#undef HOSTENT_DATA"
1710 HOST_R_ARGS="#define HOST_R_ARGS char *buf, int buflen, int *h_errnop"
1711 HOST_R_BAD="#define HOST_R_BAD NULL"
1712 HOST_R_COPY="#define HOST_R_COPY buf, buflen"
1713 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
1714 HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
1715 HOST_R_OK="#define HOST_R_OK hptr"
1716 HOST_R_RETURN="#define HOST_R_RETURN struct hostent *"
1717 HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
1718 HOSTENT_DATA="#undef HOSTENT_DATA"
1721 AC_SUBST(HOST_R_ARGS)
1722 AC_SUBST(HOST_R_BAD)
1723 AC_SUBST(HOST_R_COPY)
1724 AC_SUBST(HOST_R_COPY_ARGS)
1725 AC_SUBST(HOST_R_ERRNO)
1727 AC_SUBST(HOST_R_RETURN)
1728 AC_SUBST(HOST_R_SETANSWER)
1729 AC_SUBST(HOSTENT_DATA)
1735 AC_CHECK_FUNC(endhostent_r,
1742 int endhostent_r(struct hostent_data *buffer);
1744 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) return (x)"
1745 HOST_R_END_RETURN="#define HOST_R_END_RETURN int"
1746 HOST_R_ENT_ARGS="#define HOST_R_ENT_ARGS struct hostent_data *hdptr"
1754 extern void endhostent_r(struct hostent_data *ht_data);
1756 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x)"
1757 HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
1758 HOST_R_ENT_ARGS="#define HOST_R_ENT_ARGS struct hostent_data *hdptr"
1766 extern void endhostent_r(void);
1768 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) /*empty*/"
1769 HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
1770 HOST_R_ENT_ARGS="#undef HOST_R_ENT_ARGS /*empty*/"
1776 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) /*empty*/"
1777 HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
1778 HOST_R_ENT_ARGS="#undef HOST_R_ENT_ARGS /*empty*/"
1781 AC_SUBST(HOST_R_END_RESULT)
1782 AC_SUBST(HOST_R_END_RETURN)
1783 AC_SUBST(HOST_R_ENT_ARGS)
1789 AC_CHECK_FUNC(sethostent_r,
1796 extern void sethostent_r(int flag, struct hostent_data *ht_data);],[],
1797 [HOST_R_SET_RESULT="#undef HOST_R_SET_RESULT /*empty*/"
1798 HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"],
1805 extern int sethostent_r(int flag, struct hostent_data *ht_data);],[],
1806 [HOST_R_SET_RESULT="#define HOST_R_SET_RESULT 0"
1807 HOST_R_SET_RETURN="#define HOST_R_SET_RETURN int"],
1814 void sethostent_r (int);],[],
1815 [HOST_R_SET_RESULT="#undef HOST_R_SET_RESULT"
1816 HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"],
1821 HOST_R_SET_RESULT="#undef HOST_R_SET_RESULT"
1822 HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"
1825 AC_SUBST(HOST_R_SET_RESULT)
1826 AC_SUBST(HOST_R_SET_RETURN)
1829 AC_MSG_CHECKING(struct passwd element pw_class)
1831 #include <sys/types.h>
1833 ],[struct passwd *pw; pw->pw_class = "";],
1835 AC_DEFINE(HAS_PW_CLASS)
1841 #include <sys/types.h>
1847 SETPWENT_VOID="#define SETPWENT_VOID 1"
1849 SETPWENT_VOID="#undef SETPWENT_VOID"
1851 AC_SUBST(SETPWENT_VOID)
1854 #include <sys/types.h>
1860 SETGRENT_VOID="#define SETGRENT_VOID 1"
1862 SETGRENT_VOID="#undef SETGRENT_VOID"
1864 AC_SUBST(SETGRENT_VOID)
1870 AC_CHECK_FUNC(getnetgrent_r,
1876 int getnetgrent_r(char **m, char **u, char **d, char *b, int l) {}
1881 NGR_R_ARGS="#define NGR_R_ARGS char *buf, int buflen"
1882 NGR_R_BAD="#define NGR_R_BAD (0)"
1883 NGR_R_COPY="#define NGR_R_COPY buf, buflen"
1884 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
1885 NGR_R_OK="#define NGR_R_OK 1"
1886 NGR_R_RETURN="#define NGR_R_RETURN int"
1894 int getnetgrent_r(char **m, char **u, char **d, char *b, size_t l) {}
1899 NGR_R_ARGS="#define NGR_R_ARGS char *buf, size_t buflen"
1900 NGR_R_BAD="#define NGR_R_BAD (0)"
1901 NGR_R_COPY="#define NGR_R_COPY buf, buflen"
1902 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
1903 NGR_R_OK="#define NGR_R_OK 1"
1904 NGR_R_RETURN="#define NGR_R_RETURN int"
1912 extern int getnetgrent_r( char **, char **, char **, void **);
1917 NGR_R_ARGS="#define NGR_R_ARGS void **buf"
1918 NGR_R_BAD="#define NGR_R_BAD (0)"
1919 NGR_R_COPY="#define NGR_R_COPY buf"
1920 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
1921 NGR_R_OK="#define NGR_R_OK 1"
1922 NGR_R_RETURN="#define NGR_R_RETURN int"
1923 NGR_R_PRIVATE="#define NGR_R_PRIVATE 1"
1930 NGR_R_ARGS="#define NGR_R_ARGS char *buf, int buflen"
1931 NGR_R_BAD="#define NGR_R_BAD (0)"
1932 NGR_R_COPY="#define NGR_R_COPY buf, buflen"
1933 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
1934 NGR_R_OK="#define NGR_R_OK 1"
1935 NGR_R_RETURN="#define NGR_R_RETURN int"
1938 AC_SUBST(NGR_R_ARGS)
1940 AC_SUBST(NGR_R_COPY)
1941 AC_SUBST(NGR_R_COPY_ARGS)
1943 AC_SUBST(NGR_R_RETURN)
1944 AC_SUBST(NGR_R_PRIVATE)
1946 AC_CHECK_FUNC(endnetgrent_r,
1952 void endnetgrent_r(void **ptr);
1958 NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /* empty */"
1959 NGR_R_END_RETURN="#define NGR_R_END_RETURN void"
1960 NGR_R_ENT_ARGS="#define NGR_R_ENT_ARGS NGR_R_ARGS"
1964 NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) return (x)"
1965 NGR_R_END_RETURN="#define NGR_R_END_RETURN int"
1966 NGR_R_ENT_ARGS="#define NGR_R_ENT_ARGS NGR_R_ARGS"
1970 NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /*empty*/"
1971 NGR_R_END_RETURN="#define NGR_R_END_RETURN void"
1972 NGR_R_ENT_ARGS="#undef NGR_R_ENT_ARGS /*empty*/"
1973 AC_DEFINE(NEED_ENDNETGRENT_R)
1975 AC_SUBST(NGR_R_END_RESULT)
1976 AC_SUBST(NGR_R_END_RETURN)
1977 AC_SUBST(NGR_R_ENT_ARGS)
1979 AC_CHECK_FUNC(setnetgrent_r,
1983 NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /*empty*/"
1984 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
1987 NGR_R_SET_RESULT="#define NGR_R_SET_RESULT NGR_R_OK"
1988 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN int"
1993 NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /*empty*/"
1994 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
1996 AC_SUBST(NGR_R_SET_RESULT)
1997 AC_SUBST(NGR_R_SET_RETURN)
1999 AC_CHECK_FUNC(innetgr_r,,AC_DEFINE(NEED_INNETGR_R))
2005 AC_CHECK_FUNC(getprotoent_r,
2011 struct protoent *getprotoent_r(struct protoent *result,
2012 char *buffer, int buflen) {}
2018 PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen"
2019 PROTO_R_BAD="#define PROTO_R_BAD NULL"
2020 PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
2021 PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS"
2022 PROTO_R_OK="#define PROTO_R_OK pptr"
2023 PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER"
2024 PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *"
2025 PROTOENT_DATA="#undef PROTOENT_DATA"
2033 int getprotoent_r (struct protoent *, char *, size_t, struct protoent **);
2040 PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, size_t buflen, struct protoent **answerp"
2041 PROTO_R_BAD="#define PROTO_R_BAD ERANGE"
2042 PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
2043 PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS char *buf, size_t buflen"
2044 PROTO_R_OK="#define PROTO_R_OK 0"
2045 PROTO_R_SETANSWER="#define PROTO_R_SETANSWER 1"
2046 PROTO_R_RETURN="#define PROTO_R_RETURN int"
2047 PROTOENT_DATA="#undef PROTOENT_DATA"
2055 int getprotoent_r (struct protoent *, struct protoent_data *prot_data);
2062 PROTO_R_ARGS="#define PROTO_R_ARGS struct protoent_data *prot_data"
2063 PROTO_R_BAD="#define PROTO_R_BAD (-1)"
2064 PROTO_R_COPY="#define PROTO_R_COPY prot_data"
2065 PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS struct protoent_data *pdptr"
2066 PROTO_R_OK="#define PROTO_R_OK 0"
2067 PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER"
2068 PROTO_R_RETURN="#define PROTO_R_RETURN int"
2069 PROTOENT_DATA="#define PROTOENT_DATA 1"
2076 PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen"
2077 PROTO_R_BAD="#define PROTO_R_BAD NULL"
2078 PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
2079 PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS"
2080 PROTO_R_OK="#define PROTO_R_OK pptr"
2081 PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER"
2082 PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *"
2083 PROTOENT_DATA="#undef PROTOENT_DATA"
2087 AC_SUBST(PROTO_R_ARGS)
2088 AC_SUBST(PROTO_R_BAD)
2089 AC_SUBST(PROTO_R_COPY)
2090 AC_SUBST(PROTO_R_COPY_ARGS)
2091 AC_SUBST(PROTO_R_OK)
2092 AC_SUBST(PROTO_R_SETANSWER)
2093 AC_SUBST(PROTO_R_RETURN)
2094 AC_SUBST(PROTOENT_DATA)
2100 AC_CHECK_FUNC(endprotoent_r,
2108 void endprotoent_r(void);
2112 PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/"
2113 PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void"
2114 PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS"
2115 PROTO_R_ENT_UNUSED="#undef PROTO_R_ENT_UNUSED"
2125 void endprotoent_r(struct protoent_data *);
2129 PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/"
2130 PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void"
2131 PROTO_R_ENT_ARGS="#define PROTO_R_ENT_ARGS struct protoent_data *proto_data"
2132 PROTO_R_ENT_UNUSED="#define PROTO_R_ENT_UNUSED UNUSED(proto_data)"
2142 int endprotoent_r(struct protoent_data *);
2146 PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) return(0)"
2147 PROTO_R_END_RETURN="#define PROTO_R_END_RETURN int"
2148 PROTO_R_ENT_ARGS="#define PROTO_R_ENT_ARGS struct protoent_data *proto_data"
2149 PROTO_R_ENT_UNUSED="#define PROTO_R_ENT_UNUSED UNUSED(proto_data)"
2156 PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/"
2157 PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void"
2158 PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS /*empty*/"
2159 PROTO_R_ENT_UNUSED="#undef PROTO_R_ENT_UNUSED"
2162 AC_SUBST(PROTO_R_END_RESULT)
2163 AC_SUBST(PROTO_R_END_RETURN)
2164 AC_SUBST(PROTO_R_ENT_ARGS)
2165 AC_SUBST(PROTO_R_ENT_UNUSED)
2171 AC_CHECK_FUNC(setprotoent_r,
2179 void setprotoent_r __P((int));
2181 PROTO_R_SET_RESULT="#undef PROTO_R_SET_RESULT"
2182 PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void"
2191 int setprotoent_r (int, struct protoent_data *);
2193 PROTO_R_SET_RESULT="#define PROTO_R_SET_RESULT (0)"
2194 PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN int"
2199 PROTO_R_SET_RESULT="#undef PROTO_R_SET_RESULT"
2200 PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void"
2203 AC_SUBST(PROTO_R_SET_RESULT)
2204 AC_SUBST(PROTO_R_SET_RETURN)
2206 AC_CHECK_FUNC(getpwent_r,
2209 #include <sys/types.h>
2212 getpwent_r(struct passwd *pwptr, char *buf, int buflen) {}
2217 PASS_R_ARGS="#define PASS_R_ARGS char *buf, int buflen"
2218 PASS_R_BAD="#define PASS_R_BAD NULL"
2219 PASS_R_COPY="#define PASS_R_COPY buf, buflen"
2220 PASS_R_COPY_ARGS="#define PASS_R_COPY_ARGS PASS_R_ARGS"
2221 PASS_R_OK="#define PASS_R_OK pwptr"
2222 PASS_R_RETURN="#define PASS_R_RETURN struct passwd *"
2226 PASS_R_ARGS="#define PASS_R_ARGS char *buf, int buflen"
2227 PASS_R_BAD="#define PASS_R_BAD NULL"
2228 PASS_R_COPY="#define PASS_R_COPY buf, buflen"
2229 PASS_R_COPY_ARGS="#define PASS_R_COPY_ARGS PASS_R_ARGS"
2230 PASS_R_OK="#define PASS_R_OK pwptr"
2231 PASS_R_RETURN="#define PASS_R_RETURN struct passwd *"
2232 AC_DEFINE(NEED_GETPWENT_R)
2234 AC_SUBST(PASS_R_ARGS)
2235 AC_SUBST(PASS_R_BAD)
2236 AC_SUBST(PASS_R_COPY)
2237 AC_SUBST(PASS_R_COPY_ARGS)
2239 AC_SUBST(PASS_R_RETURN)
2241 AC_CHECK_FUNC(endpwent_r,
2245 void endpwent_r(FILE **pwfp);
2247 PASS_R_END_RESULT="#define PASS_R_END_RESULT(x) /*empty*/"
2248 PASS_R_END_RETURN="#define PASS_R_END_RETURN void"
2249 PASS_R_ENT_ARGS="#define PASS_R_ENT_ARGS FILE **pwptr"
2253 PASS_R_END_RESULT="#define PASS_R_END_RESULT(x) /*empty*/"
2254 PASS_R_END_RETURN="#define PASS_R_END_RETURN void"
2255 PASS_R_ENT_ARGS="#undef PASS_R_ENT_ARGS"
2256 AC_DEFINE(NEED_ENDPWENT_R)
2258 AC_SUBST(PASS_R_END_RESULT)
2259 AC_SUBST(PASS_R_END_RETURN)
2260 AC_SUBST(PASS_R_ENT_ARGS)
2261 AC_CHECK_FUNC(setpassent_r,,AC_DEFINE(NEED_SETPASSENT_R))
2262 AC_CHECK_FUNC(setpassent,,AC_DEFINE(NEED_SETPASSENT))
2264 AC_CHECK_FUNC(setpwent_r,
2267 void setpwent_r(FILE **pwfp);
2269 PASS_R_SET_RESULT="#undef PASS_R_SET_RESULT /* empty */"
2270 PASS_R_SET_RETURN="#define PASS_R_SET_RETURN int"
2274 int setpwent_r(FILE **pwfp);
2276 PASS_R_SET_RESULT="#define PASS_R_SET_RESULT 0"
2277 PASS_R_SET_RETURN="#define PASS_R_SET_RETURN int"
2282 PASS_R_SET_RESULT="#undef PASS_R_SET_RESULT /*empty*/"
2283 PASS_R_SET_RETURN="#define PASS_R_SET_RETURN void"
2284 AC_DEFINE(NEED_SETPWENT_R)
2286 AC_SUBST(PASS_R_SET_RESULT)
2287 AC_SUBST(PASS_R_SET_RETURN)
2289 AC_CHECK_FUNC(getpwnam_r,,AC_DEFINE(NEED_GETPWNAM_R))
2290 AC_CHECK_FUNC(getpwuid_r,,AC_DEFINE(NEED_GETPWUID_R))
2296 AC_CHECK_FUNC(getservent_r,
2302 getservent_r(struct servent *result, char *buffer, int buflen) {}
2305 SERV_R_ARGS="#define SERV_R_ARGS char *buf, int buflen"
2306 SERV_R_BAD="#define SERV_R_BAD NULL"
2307 SERV_R_COPY="#define SERV_R_COPY buf, buflen"
2308 SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS SERV_R_ARGS"
2309 SERV_R_OK="#define SERV_R_OK sptr"
2310 SERV_R_SETANSWER="#undef SERV_R_SETANSWER"
2311 SERV_R_RETURN="#define SERV_R_RETURN struct servent *"
2319 getservent_r (struct servent *, char *, size_t, struct servent **);
2322 SERV_R_ARGS="#define SERV_R_ARGS char *buf, size_t buflen, struct servent **answerp"
2323 SERV_R_BAD="#define SERV_R_BAD ERANGE"
2324 SERV_R_COPY="#define SERV_R_COPY buf, buflen"
2325 SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS char *buf, size_t buflen"
2326 SERV_R_OK="#define SERV_R_OK (0)"
2327 SERV_R_SETANSWER="#define SERV_R_SETANSWER 1"
2328 SERV_R_RETURN="#define SERV_R_RETURN int"
2336 getservent_r (struct servent *, struct servent_data *serv_data);
2339 SERV_R_ARGS="#define SERV_R_ARGS struct servent_data *serv_data"
2340 SERV_R_BAD="#define SERV_R_BAD (-1)"
2341 SERV_R_COPY="#define SERV_R_COPY serv_data"
2342 SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS struct servent_data *sdptr"
2343 SERV_R_OK="#define SERV_R_OK (0)"
2344 SERV_R_SETANSWER="#undef SERV_R_SETANSWER"
2345 SERV_R_RETURN="#define SERV_R_RETURN int"
2346 SERVENT_DATA="#define SERVENT_DATA 1"
2353 SERV_R_ARGS="#define SERV_R_ARGS char *buf, int buflen"
2354 SERV_R_BAD="#define SERV_R_BAD NULL"
2355 SERV_R_COPY="#define SERV_R_COPY buf, buflen"
2356 SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS SERV_R_ARGS"
2357 SERV_R_OK="#define SERV_R_OK sptr"
2358 SERV_R_SETANSWER="#undef SERV_R_SETANSWER"
2359 SERV_R_RETURN="#define SERV_R_RETURN struct servent *"
2362 AC_SUBST(SERV_R_ARGS)
2363 AC_SUBST(SERV_R_BAD)
2364 AC_SUBST(SERV_R_COPY)
2365 AC_SUBST(SERV_R_COPY_ARGS)
2367 AC_SUBST(SERV_R_SETANSWER)
2368 AC_SUBST(SERV_R_RETURN)
2369 AC_SUBST(SERVENT_DATA)
2375 AC_CHECK_FUNC(endservent_r,
2383 void endservent_r(void);
2388 SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/"
2389 SERV_R_END_RETURN="#define SERV_R_END_RETURN void "
2390 SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/"
2391 SERV_R_ENT_UNUSED="#undef SERV_R_ENT_UNUSED /*empty*/"
2401 void endservent_r(struct servent_data *serv_data);
2406 SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/"
2407 SERV_R_END_RETURN="#define SERV_R_END_RETURN void "
2408 SERV_R_ENT_ARGS="#define SERV_R_ENT_ARGS struct servent_data *serv_data"
2409 SERV_R_ENT_UNUSED="#define SERV_R_ENT_UNUSED UNUSED(serv_data)"
2419 int endservent_r(struct servent_data *serv_data);
2424 SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) return(x)"
2425 SERV_R_END_RETURN="#define SERV_R_END_RETURN int "
2426 SERV_R_ENT_ARGS="#define SERV_R_ENT_ARGS struct servent_data *serv_data"
2427 SERV_R_ENT_UNUSED="#define SERV_R_ENT_UNUSED UNUSED(serv_data)"
2434 SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/"
2435 SERV_R_END_RETURN="#define SERV_R_END_RETURN void "
2436 SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/"
2437 SERV_R_ENT_UNUSED="#undef SERV_R_ENT_UNUSED /*empty*/"
2440 AC_SUBST(SERV_R_END_RESULT)
2441 AC_SUBST(SERV_R_END_RETURN)
2442 AC_SUBST(SERV_R_ENT_ARGS)
2443 AC_SUBST(SERV_R_ENT_UNUSED)
2449 AC_CHECK_FUNC(setservent_r,
2457 void setservent_r(int);
2461 SERV_R_SET_RESULT="#undef SERV_R_SET_RESULT"
2462 SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void"
2472 int setservent_r(int, struct servent_data *);
2476 SERV_R_SET_RESULT="#define SERV_R_SET_RESULT (0)"
2477 SERV_R_SET_RETURN="#define SERV_R_SET_RETURN int"
2483 SERV_R_SET_RESULT="#undef SERV_R_SET_RESULT"
2484 SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void"
2487 AC_SUBST(SERV_R_SET_RESULT)
2488 AC_SUBST(SERV_R_SET_RETURN)
2498 int innetgr(const char *netgroup, const char *host, const char *user, const char *domain);
2502 INNETGR_ARGS="#undef INNETGR_ARGS"
2513 int innetgr(char *netgroup, char *host, char *user, char *domain);
2517 INNETGR_ARGS="#define INNETGR_ARGS char *netgroup, char *host, char *user, char *domain"
2530 void setnetgrent(const char *);
2534 SETNETGRENT_ARGS="#undef SETNETGRENT_ARGS"
2545 void setnetgrent(char *);
2549 SETNETGRENT_ARGS="#define SETNETGRENT_ARGS char *netgroup"
2553 AC_SUBST(SETNETGRENT_ARGS)
2554 AC_SUBST(INNETGR_ARGS)
2557 # Random remaining OS-specific issues involving compiler warnings.
2558 # XXXDCL print messages to indicate some compensation is being done?
2560 BROKEN_IN6ADDR_INIT_MACROS="#undef BROKEN_IN6ADDR_INIT_MACROS"
2564 hack_shutup_pthreadmutexinit=yes
2565 hack_shutup_in6addr_init_macros=yes
2568 hack_shutup_in6addr_init_macros=yes
2571 hack_shutup_sputaux=yes
2574 hack_shutup_sigwait=yes
2575 hack_shutup_sputaux=yes
2576 hack_shutup_in6addr_init_macros=yes
2579 hack_shutup_stdargcast=yes
2582 hack_shutup_in6addr_init_macros=yes
2585 hack_shutup_in6addr_init_macros=yes
2588 hack_shutup_in6addr_init_macros=yes
2591 hack_shutup_in6addr_init_macros=yes
2594 hack_shutup_in6addr_init_macros=yes
2598 case "$hack_shutup_pthreadmutexinit" in
2601 # Shut up PTHREAD_MUTEX_INITIALIZER unbraced
2602 # initializer warnings.
2604 AC_DEFINE(SHUTUP_MUTEX_INITIALIZER)
2608 case "$hack_shutup_sigwait" in
2611 # Shut up a -Wmissing-prototypes warning for sigwait().
2613 AC_DEFINE(SHUTUP_SIGWAIT)
2617 case "$hack_shutup_sputaux" in
2620 # Shut up a -Wmissing-prototypes warning from <stdio.h>.
2622 AC_DEFINE(SHUTUP_SPUTAUX)
2626 case "$hack_shutup_stdargcast" in
2629 # Shut up a -Wcast-qual warning from va_start().
2631 AC_DEFINE(SHUTUP_STDARG_CAST)
2635 case "$hack_shutup_in6addr_init_macros" in
2637 AC_DEFINE(BROKEN_IN6ADDR_INIT_MACROS, 1, [Defined if IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT need to be redefined.] )
2644 AC_SUBST(BIND9_TOP_BUILDDIR)
2645 BIND9_TOP_BUILDDIR=`pwd`
2647 AC_SUBST_FILE(BIND9_INCLUDES)
2648 BIND9_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
2650 AC_SUBST_FILE(BIND9_MAKE_RULES)
2651 BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
2653 . $srcdir/../../version
2654 BIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
2655 AC_SUBST(BIND9_VERSION)
2657 AC_SUBST_FILE(LIBBIND_API)
2658 LIBBIND_API=$srcdir/api
2676 ${PORT_DIR}/Makefile
2677 ${PORT_INCLUDE}/Makefile
2678 include/isc/platform.h
2681 # Tell Emacs to edit this file in shell mode.