1 # Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
2 # Copyright (C) 2001 Internet Software Consortium.
4 # Permission to use, copy, modify, and 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.22 $)
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(uintptr_t,unsigned long)
180 # check if we need to #include sys/select.h explicitly
182 case $ac_cv_header_unistd_h in
184 AC_MSG_CHECKING(if unistd.h defines fd_set)
186 #include <unistd.h>],
187 [fd_set read_set; return (0);],
189 ISC_PLATFORM_NEEDSYSSELECTH="#undef ISC_PLATFORM_NEEDSYSSELECTH"
192 case ac_cv_header_sys_select_h in
194 ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
197 AC_MSG_ERROR([need either working unistd.h or sys/select.h])
203 case ac_cv_header_sys_select_h in
205 ISC_PLATFORM_NEEDSYSSELECTH="#define ISC_PLATFORM_NEEDSYSSELECTH 1"
208 AC_MSG_ERROR([need either unistd.h or sys/select.h])
213 AC_SUBST(ISC_PLATFORM_NEEDSYSSELECTH)
216 # Find the machine's endian flavor.
220 AC_ARG_WITH(irs-gr,[ --with-irs-gr Build ....],
221 want_irs_gr="$withval", want_irs_gr="no")
222 case "$want_irs_gr" in
223 yes) WANT_IRS_GR="#define WANT_IRS_GR 1"
224 WANT_IRS_GR_OBJS="\${WANT_IRS_GR_OBJS}"
226 *) WANT_IRS_GR="#undef WANT_IRS_GR" WANT_IRS_GR_OBJS="";;
228 AC_SUBST(WANT_IRS_GR)
229 AC_SUBST(WANT_IRS_GR_OBJS)
231 AC_ARG_WITH(irs-pw,[ --with-irs-pw Build ....],
232 want_irs_pw="$withval", want_irs_pw="no")
233 case "$want_irs_pw" in
234 yes) WANT_IRS_PW="#define WANT_IRS_PW 1"
235 WANT_IRS_PW_OBJS="\${WANT_IRS_PW_OBJS}";;
236 *) WANT_IRS_PW="#undef WANT_IRS_PW" WANT_IRS_PW_OBJS="";;
238 AC_SUBST(WANT_IRS_PW)
239 AC_SUBST(WANT_IRS_PW_OBJS)
241 AC_ARG_WITH(irs-nis,[ --with-irs-nis Build ....],
242 want_irs_nis="$withval", want_irs_nis="no")
243 case "$want_irs_nis" in
245 WANT_IRS_NIS="#define WANT_IRS_NIS 1"
246 WANT_IRS_NIS_OBJS="\${WANT_IRS_NIS_OBJS}"
247 case "$want_irs_gr" in
249 WANT_IRS_NISGR_OBJS="\${WANT_IRS_NISGR_OBJS}";;
251 WANT_IRS_NISGR_OBJS="";;
253 case "$want_irs_pw" in
255 WANT_IRS_NISPW_OBJS="\${WANT_IRS_NISPW_OBJS}";;
257 WANT_IRS_NISPW_OBJS="";;
261 WANT_IRS_NIS="#undef WANT_IRS_NIS"
263 WANT_IRS_NISGR_OBJS=""
264 WANT_IRS_NISPW_OBJS="";;
266 AC_SUBST(WANT_IRS_NIS)
267 AC_SUBST(WANT_IRS_NIS_OBJS)
268 AC_SUBST(WANT_IRS_NISGR_OBJS)
269 AC_SUBST(WANT_IRS_NISPW_OBJS)
276 main() { return(!have_db_h); }
278 WANT_IRS_DBPW_OBJS="\${WANT_IRS_DBPW_OBJS}"
280 WANT_IRS_DBPW_OBJS=""
282 WANT_IRS_DBPW_OBJS=""
284 AC_SUBST(WANT_IRS_DBPW_OBJS)
287 # was --with-randomdev specified?
289 AC_MSG_CHECKING(for random device)
290 AC_ARG_WITH(randomdev,
291 [ --with-randomdev=PATH Specify path for random device],
292 use_randomdev="$withval", use_randomdev="unspec")
294 case "$use_randomdev" in
298 devrandom=/dev/srandom
301 devrandom=/dev/random
304 AC_MSG_RESULT($devrandom)
305 AC_CHECK_FILE($devrandom,
306 AC_DEFINE_UNQUOTED(PATH_RANDOMDEV,
310 AC_MSG_ERROR([--with-randomdev must specify a path])
313 AC_DEFINE_UNQUOTED(PATH_RANDOMDEV, "$use_randomdev")
314 AC_MSG_RESULT(using "$use_randomdev")
318 sinclude(../../config.threads.in)dnl
323 # We'd like to use sigwait() too
325 AC_CHECK_LIB(c, sigwait,
326 AC_DEFINE(HAVE_SIGWAIT),
327 AC_CHECK_LIB(pthread, sigwait,
328 AC_DEFINE(HAVE_SIGWAIT),
329 AC_CHECK_LIB(pthread, _Psigwait,
330 AC_DEFINE(HAVE_SIGWAIT),))
333 AC_CHECK_FUNC(pthread_attr_getstacksize,
334 AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
337 # Additional OS-specific issues related to pthreads and sigwait.
341 # One more place to look for sigwait.
344 AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),)
347 # BSDI 3.0 through 4.0.1 needs pthread_init() to be
348 # called before certain pthreads calls. This is deprecated
351 *-bsdi3.*|*-bsdi4.0*)
352 AC_DEFINE(NEED_PTHREAD_INIT)
355 # LinuxThreads requires some changes to the way we
359 AC_DEFINE(HAVE_LINUXTHREADS)
362 # Ensure the right sigwait() semantics on Solaris and make
363 # sure we call pthread_setconcurrency.
366 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
367 AC_CHECK_FUNC(pthread_setconcurrency,
368 AC_DEFINE(CALL_PTHREAD_SETCONCURRENCY))
369 AC_DEFINE(POSIX_GETPWUID_R)
370 AC_DEFINE(POSIX_GETPWNAM_R)
371 AC_DEFINE(POSIX_GETGRGID_R)
372 AC_DEFINE(POSIX_GETGRNAM_R)
375 AC_DEFINE(NEED_ENDNETGRENT_R)
376 AC_DEFINE(_PTHREADS_DRAFT4)
379 # UnixWare does things its own way.
382 AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
387 # Look for sysconf to allow detection of the number of processors.
389 AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
391 if test "X$GCC" = "Xyes"; then
395 CCOPT="$CCOPT -pthread"
396 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
400 CCOPT="$CCOPT -pthread"
403 LIBS="$LIBS -lthread"
406 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
413 CCOPT="$CCOPT -pthread"
420 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
424 CCOPT="$CCOPT -Kthread"
428 AC_DEFINE(_REENTRANT)
429 ALWAYS_DEFINES="-D_REENTRANT"
430 DO_PTHREADS="#define DO_PTHREADS 1"
431 WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}"
432 WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}"
435 WANT_IRS_THREADS_OBJS="";;
437 WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}";;
439 WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}"
443 DO_PTHREADS="#undef DO_PTHREADS"
444 WANT_IRS_THREADSGR_OBJS=""
445 WANT_IRS_THREADSPW_OBJS=""
446 WANT_IRS_THREADS_OBJS=""
451 AC_SUBST(ALWAYS_DEFINES)
452 AC_SUBST(DO_PTHREADS)
453 AC_SUBST(WANT_IRS_THREADSGR_OBJS)
454 AC_SUBST(WANT_IRS_THREADSPW_OBJS)
455 AC_SUBST(WANT_IRS_THREADS_OBJS)
456 AC_SUBST(WANT_THREADS_OBJS)
458 AC_CHECK_FUNC(strlcat, AC_DEFINE(HAVE_STRLCAT))
460 AC_CHECK_FUNC(if_nametoindex,
461 [USE_IFNAMELINKID="#define USE_IFNAMELINKID 1"],
462 [USE_IFNAMELINKID="#undef USE_IFNAMELINKID"])
463 AC_SUBST(USE_IFNAMELINKID)
465 ISC_THREAD_DIR=$thread_dir
466 AC_SUBST(ISC_THREAD_DIR)
468 AC_CHECK_FUNC(daemon,
469 [DAEMON_OBJS="" NEED_DAEMON="#undef NEED_DAEMON"]
471 [DAEMON_OBJS="\${DAEMON_OBJS}" NEED_DAEMON="#define NEED_DAEMON 1"]
473 AC_SUBST(DAEMON_OBJS)
474 AC_SUBST(NEED_DAEMON)
476 AC_CHECK_FUNC(strsep,
477 [STRSEP_OBJS="" NEED_STRSEP="#undef NEED_STRSEP"]
479 [STRSEP_OBJS="\${STRSEP_OBJS}" NEED_STRSEP="#define NEED_STRSEP 1"]
481 AC_SUBST(STRSEP_OBJS)
482 AC_SUBST(NEED_STRSEP)
484 AC_CHECK_FUNC(strerror, [NEED_STRERROR="#undef NEED_STRERROR"],
485 [NEED_STRERROR="#define NEED_STRERROR 1"])
486 AC_SUBST(NEED_STRERROR)
489 # flockfile is usually provided by pthreads, but we may want to use it
490 # even if compiled with --disable-threads.
492 AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),)
495 # Indicate what the final decision was regarding threads.
497 AC_MSG_CHECKING(whether to build with threads)
498 if $use_threads; then
505 # End of pthreads stuff.
509 # Additional compiler settings.
513 IRIX_DNSSEC_WARNINGS_HACK=""
515 if test "X$GCC" = "Xyes"; then
516 STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings"
526 # The version of the C compiler that constantly warns about
527 # 'const' as well as alignment issues is unfortunately not
528 # able to be discerned via the version of the operating
529 # system, nor does cc have a version flag.
530 case "`$CC +W 123 2>&1`" in
535 # Turn off the pointlessly noisy warnings.
536 STD_CWARNINGS="+w1 +W 474,530,2193,2236"
539 CCOPT="$CCOPT -Ae -z"
540 LIBS="-Wl,+vnocompatwarnings $LIBS"
541 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'
542 MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
545 STD_CWARNINGS="-fullwarn -woff 1209"
547 # Silence more than 250 instances of
548 # "prototyped function redeclared without prototype"
549 # and 11 instances of
550 # "variable ... was set but never used"
551 # from lib/dns/sec/openssl.
553 IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552"
565 # _GNU_SOURCE is needed to access the fd_bits field of struct fd_set, which
566 # is supposed to be opaque.
570 STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE"
575 AC_SUBST(MKDEPCFLAGS)
577 AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK)
582 AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
585 # -lxnet buys us one big porting headache... standards, gotta love 'em.
587 # AC_CHECK_LIB(xnet, socket, ,
588 # AC_CHECK_LIB(socket, socket)
589 # AC_CHECK_LIB(nsl, inet_ntoa)
592 # Use this for now, instead:
598 AC_CHECK_LIB(socket, socket)
599 AC_CHECK_LIB(nsl, inet_ntoa)
602 AC_CHECK_LIB(d4r, gethostbyname_r)
603 AC_CHECK_LIB(socket, socket)
604 AC_CHECK_LIB(nsl, inet_ntoa)
611 AC_MSG_CHECKING(whether to use purify)
613 [ --with-purify[=PATH] use Rational purify],
614 use_purify="$withval", use_purify="no")
616 case "$use_purify" in
620 AC_PATH_PROG(purify_path, purify, purify)
623 purify_path="$use_purify"
627 case "$use_purify" in
633 if test -f $purify_path || test $purify_path = purify; then
634 AC_MSG_RESULT($purify_path)
635 PURIFYFLAGS="`echo $PURIFYOPTIONS`"
636 PURIFY="$purify_path $PURIFYFLAGS"
638 AC_MSG_ERROR([$purify_path not found.
640 Please choose the proper path with the following command:
642 configure --with-purify=PATH
651 # GNU libtool support
654 [ --with-libtool use GNU libtool (following indented options supported)],
655 use_libtool="$withval", use_libtool="no")
662 LIBTOOL_MKDEP_SED='s;\.o;\.lo;'
663 LIBTOOL_MODE_COMPILE='--mode=compile'
664 LIBTOOL_MODE_INSTALL='--mode=install'
665 LIBTOOL_MODE_LINK='--mode=link'
673 LIBTOOL_MODE_COMPILE=
674 LIBTOOL_MODE_INSTALL=
680 # File name extension for static archive files, for those few places
681 # where they are treated differently from dynamic ones.
688 AC_SUBST(LIBTOOL_MKDEP_SED)
689 AC_SUBST(LIBTOOL_MODE_COMPILE)
690 AC_SUBST(LIBTOOL_MODE_INSTALL)
691 AC_SUBST(LIBTOOL_MODE_LINK)
694 # Here begins a very long section to determine the system's networking
695 # capabilities. The order of the tests is signficant.
702 [ --enable-ipv6 use IPv6 [default=autodetect]])
704 case "$enable_ipv6" in
713 # We do the IPv6 compilation checking after libtool so that we can put
714 # the right suffix on the files.
716 AC_MSG_CHECKING(for IPv6 structures)
718 #include <sys/types.h>
719 #include <sys/socket.h>
720 #include <netinet/in.h>],
721 [struct sockaddr_in6 sin6; return (0);],
728 # See whether IPv6 support is provided via a Kame add-on.
729 # This is done before other IPv6 linking tests to LIBS is properly set.
731 AC_MSG_CHECKING(for Kame IPv6 support)
733 [ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]],
734 use_kame="$withval", use_kame="no")
740 kame_path=/usr/local/v6
743 kame_path="$use_kame"
752 if test -f $kame_path/lib/libinet6.a; then
753 AC_MSG_RESULT($kame_path/lib/libinet6.a)
754 LIBS="-L$kame_path/lib -linet6 $LIBS"
756 AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
758 Please choose the proper path with the following command:
760 configure --with-kame=PATH
767 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
768 # Including it on Kame-using platforms is very bad, though, because
769 # Kame uses #error against direct inclusion. So include it on only
770 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
771 # This is done before the in6_pktinfo check because that's what
772 # netinet6/in6.h is needed for.
777 ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
778 isc_netinet6in6_hack="#include <netinet6/in6.h>"
781 ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
782 isc_netinet6in6_hack=""
788 # This is similar to the netinet6/in6.h issue.
792 ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
793 ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1"
794 isc_netinetin6_hack="#include <netinet/in6.h>"
797 ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H"
798 ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR"
799 isc_netinetin6_hack=""
804 # Now delve deeper into the suitability of the IPv6 support.
806 case "$found_ipv6" in
808 HAS_INET6_STRUCTS="#define HAS_INET6_STRUCTS 1"
810 AC_MSG_CHECKING(for in6_addr)
812 #include <sys/types.h>
813 #include <sys/socket.h>
814 #include <netinet/in.h>
816 $isc_netinet6in6_hack
818 [struct in6_addr in6; return (0);],
820 HAS_IN_ADDR6="#undef HAS_IN_ADDR6"
821 isc_in_addr6_hack=""],
823 HAS_IN_ADDR6="#define HAS_IN_ADDR6 1"
824 isc_in_addr6_hack="#define in6_addr in_addr6"])
826 AC_MSG_CHECKING(for in6addr_any)
828 #include <sys/types.h>
829 #include <sys/socket.h>
830 #include <netinet/in.h>
832 $isc_netinet6in6_hack
835 [struct in6_addr in6; in6 = in6addr_any; return (0);],
837 NEED_IN6ADDR_ANY="#undef NEED_IN6ADDR_ANY"],
839 NEED_IN6ADDR_ANY="#define NEED_IN6ADDR_ANY 1"])
841 AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
843 #include <sys/types.h>
844 #include <sys/socket.h>
845 #include <netinet/in.h>
847 $isc_netinet6in6_hack
849 [struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
851 result="#define HAVE_SIN6_SCOPE_ID 1"],
853 result="#undef HAVE_SIN6_SCOPE_ID"])
854 HAVE_SIN6_SCOPE_ID="$result"
856 AC_MSG_CHECKING(for in6_pktinfo)
858 #include <sys/types.h>
859 #include <sys/socket.h>
860 #include <netinet/in.h>
862 $isc_netinet6in6_hack
864 [struct in6_pktinfo xyzzy; return (0);],
866 ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
867 [AC_MSG_RESULT(no -- disabling runtime ipv6 support)
868 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
870 AC_MSG_CHECKING(for sockaddr_storage)
872 #include <sys/types.h>
873 #include <sys/socket.h>
874 #include <netinet/in.h>
876 $isc_netinet6in6_hack
878 [struct sockaddr_storage xyzzy; return (0);],
880 HAVE_SOCKADDR_STORAGE="#define HAVE_SOCKADDR_STORAGE 1"],
882 HAVE_SOCKADDR_STORAGE="#undef HAVE_SOCKADDR_STORAGE"])
885 HAS_INET6_STRUCTS="#undef HAS_INET6_STRUCTS"
886 NEED_IN6ADDR_ANY="#undef NEED_IN6ADDR_ANY"
887 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
888 HAVE_SIN6_SCOPE_ID="#define HAVE_SIN6_SCOPE_ID 1"
889 HAVE_SOCKADDR_STORAGE="#undef HAVE_SOCKADDR_STORAGE"
892 ISC_ISCIPV6_O="unix/ipv6.$O"
897 AC_SUBST(HAS_INET6_STRUCTS)
898 AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
899 AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
900 AC_SUBST(HAS_IN_ADDR6)
901 AC_SUBST(NEED_IN6ADDR_ANY)
902 AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
903 AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
906 AC_SUBST(ISC_ISCIPV6_O)
908 AC_SUBST(HAVE_SIN6_SCOPE_ID)
909 AC_SUBST(HAVE_SOCKADDR_STORAGE)
912 # Check for network functions that are often missing. We do this
913 # after the libtool checking, so we can put the right suffix on
914 # the files. It also needs to come after checking for a Kame add-on,
915 # which provides some (all?) of the desired functions.
917 AC_MSG_CHECKING([for inet_ntop])
919 #include <sys/types.h>
920 #include <netinet/in.h>
921 #include <arpa/inet.h>],
922 [inet_ntop(0, 0, 0, 0); return (0);],
924 ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
927 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
928 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
929 ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"])
930 AC_MSG_CHECKING([for inet_pton])
932 #include <sys/types.h>
933 #include <netinet/in.h>
934 #include <arpa/inet.h>],
935 [inet_pton(0, 0, 0); return (0);],
937 ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
940 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
941 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
942 ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"])
943 AC_MSG_CHECKING([for inet_aton])
945 #include <sys/types.h>
946 #include <netinet/in.h>
947 #include <arpa/inet.h>],
948 [struct in_addr in; inet_aton(0, &in); return (0);],
950 ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON"],
953 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
954 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c"
955 ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1"])
957 AC_SUBST(ISC_PLATFORM_NEEDNTOP)
958 AC_SUBST(ISC_PLATFORM_NEEDPTON)
959 AC_SUBST(ISC_PLATFORM_NEEDATON)
962 # Look for a 4.4BSD-style sa_len member in struct sockaddr.
966 # Turn on 4.4BSD style sa_len support.
967 AC_DEFINE(_SOCKADDR_LEN)
971 AC_MSG_CHECKING(for sa_len in struct sockaddr)
973 #include <sys/types.h>
974 #include <sys/socket.h>],
975 [struct sockaddr sa; sa.sa_len = 0; return (0);],
977 HAVE_SA_LEN="#define HAVE_SA_LEN 1"],
979 HAVE_SA_LEN="#undef HAVE_SA_LEN"])
980 AC_SUBST(HAVE_SA_LEN)
985 *-bsdi[2345]*) have_minimum_ifreq=yes;;
986 *-darwin*) have_minimum_ifreq=yes;;
987 *-freebsd*) have_minimum_ifreq=yes;;
988 *-lynxos*) have_minimum_ifreq=yes;;
989 *-netbsd*) have_minimum_ifreq=yes;;
990 *-next*) have_minimum_ifreq=yes;;
991 *-openbsd*) have_minimum_ifreq=yes;;
992 *-rhapsody*) have_minimum_ifreq=yes;;
995 case "$have_minimum_ifreq" in
997 HAVE_MINIMUM_IFREQ="#define HAVE_MINIMUM_IFREQ 1";;
999 HAVE_MINIMUM_IFREQ="#undef HAVE_MINIMUM_IFREQ";;
1001 HAVE_MINIMUM_IFREQ="#undef HAVE_MINIMUM_IFREQ";;
1003 AC_SUBST(HAVE_MINIMUM_IFREQ)
1006 PORT_DIR=port/unknown
1007 SOLARIS_BITTYPES="#undef NEED_SOLARIS_BITTYPES"
1008 BSD_COMP="#undef BSD_COMP"
1009 USE_FIONBIO_IOCTL="#undef USE_FIONBIO_IOCTL"
1010 PORT_NONBLOCK="#define PORT_NONBLOCK O_NONBLOCK"
1011 HAVE_MD5="#undef HAVE_MD5"
1012 USE_POLL="#undef HAVE_POLL"
1013 SOLARIS2="#undef SOLARIS2"
1015 *aix3.2*) PORT_DIR="port/aix32";;
1016 *aix4*) PORT_DIR="port/aix4";;
1017 *aix5*) PORT_DIR="port/aix5";;
1018 *aux3*) PORT_DIR="port/aux3";;
1019 *-bsdi2*) PORT_DIR="port/bsdos2";;
1020 *-bsdi*) PORT_DIR="port/bsdos";;
1022 PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
1023 PORT_DIR="port/cygwin";;
1024 *-darwin*) PORT_DIR="port/darwin";;
1025 *-osf*) PORT_DIR="port/decunix";;
1026 *-freebsd*) PORT_DIR="port/freebsd";;
1027 *-hpux9*) PORT_DIR="port/hpux9";;
1028 *-hpux10*) PORT_DIR="port/hpux10";;
1029 *-hpux11*) PORT_DIR="port/hpux";;
1030 *-irix*) PORT_DIR="port/irix";;
1031 *-linux*) PORT_DIR="port/linux";;
1032 *-lynxos*) PORT_DIR="port/lynxos";;
1033 *-mpe*) PORT_DIR="port/mpe";;
1034 *-netbsd*) PORT_DIR="port/netbsd";;
1035 *-next*) PORT_DIR="port/next";;
1036 *-openbsd*) PORT_DIR="port/openbsd";;
1037 *-qnx*) PORT_DIR="port/qnx";;
1038 *-rhapsody*) PORT_DIR="port/rhapsody";;
1040 PORT_NONBLOCK="#define PORT_NONBLOCK O_NDELAY"
1041 PORT_DIR="port/sunos";;
1042 *-solaris2.[[01234]])
1043 BSD_COMP="#define BSD_COMP 1"
1044 SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
1045 USE_FIONBIO_IOCTL="#define USE_FIONBIO_IOCTL 1"
1046 SOLARIS2="#define SOLARIS2 1"
1047 PORT_DIR="port/solaris";;
1049 BSD_COMP="#define BSD_COMP 1"
1050 SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
1051 SOLARIS2="#define SOLARIS2 1"
1052 PORT_DIR="port/solaris";;
1054 BSD_COMP="#define BSD_COMP 1"
1055 SOLARIS2="#define SOLARIS2 1"
1056 PORT_DIR="port/solaris";;
1057 *-solaris2*) BSD_COMP="#define BSD_COMP 1"
1058 USE_POLL="#define USE_POLL 1"
1059 HAVE_MD5="#define HAVE_MD5 1"
1060 SOLARIS2="#define SOLARIS2 1"
1061 PORT_DIR="port/solaris";;
1062 *-ultrix*) PORT_DIR="port/ultrix";;
1063 *-sco-sysv*uw2.0*) PORT_DIR="port/unixware20";;
1064 *-sco-sysv*uw2.1.2*) PORT_DIR="port/unixware212";;
1065 *-sco-sysv*uw7*) PORT_DIR="port/unixware7";;
1069 AC_SUBST(SOLARIS_BITTYPES)
1070 AC_SUBST(USE_FIONBIO_IOCTL)
1071 AC_SUBST(PORT_NONBLOCK)
1076 PORT_INCLUDE=${PORT_DIR}/include
1077 AC_SUBST(PORT_INCLUDE)
1080 # Look for a 4.4BSD or 4.3BSD struct msghdr
1082 AC_MSG_CHECKING(for struct msghdr flavor)
1084 #include <sys/types.h>
1085 #include <sys/socket.h>],
1086 [struct msghdr msg; msg.msg_flags = 0; return (0);],
1087 [AC_MSG_RESULT(4.4BSD)
1088 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"],
1089 [AC_MSG_RESULT(4.3BSD)
1090 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])
1091 AC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)
1094 # Look for in_port_t.
1096 AC_MSG_CHECKING(for type in_port_t)
1098 #include <sys/types.h>
1099 #include <netinet/in.h>],
1100 [in_port_t port = 25; return (0);],
1102 ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"],
1104 ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])
1105 AC_SUBST(ISC_PLATFORM_NEEDPORTT)
1108 # Check for addrinfo
1110 AC_MSG_CHECKING(for struct addrinfo)
1112 #include <netdb.h>],
1113 [struct addrinfo a; return (0);],
1115 AC_DEFINE(HAVE_ADDRINFO)],
1116 [AC_MSG_RESULT(no)])
1118 AC_MSG_CHECKING(for int sethostent)
1120 #include <netdb.h>],
1121 [int i = sethostent(0); return(0);],
1122 [AC_MSG_RESULT(yes)],
1123 [AC_MSG_RESULT(no)])
1125 AC_MSG_CHECKING(for int endhostent)
1127 #include <netdb.h>],
1128 [int i = endhostent(); return(0);],
1130 ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"],
1132 ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"])
1133 AC_SUBST(ISC_LWRES_ENDHOSTENTINT)
1135 AC_MSG_CHECKING(for int setnetent)
1137 #include <netdb.h>],
1138 [int i = setnetent(0); return(0);],
1140 ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"],
1142 ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"])
1143 AC_SUBST(ISC_LWRES_SETNETENTINT)
1145 AC_MSG_CHECKING(for int endnetent)
1147 #include <netdb.h>],
1148 [int i = endnetent(); return(0);],
1150 ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"],
1152 ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"])
1153 AC_SUBST(ISC_LWRES_ENDNETENTINT)
1155 AC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...))
1158 struct hostent *gethostbyaddr(const void *, size_t, int);],
1161 ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"],
1163 ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"])
1164 AC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID)
1166 AC_MSG_CHECKING(for h_errno in netdb.h)
1168 #include <netdb.h>],
1169 [h_errno = 1; return(0);],
1171 ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"],
1173 ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1"])
1174 AC_SUBST(ISC_LWRES_NEEDHERRNO)
1176 AC_CHECK_FUNC(getipnodebyname,
1177 [ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
1178 [ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
1179 AC_CHECK_FUNC(getnameinfo,
1180 [ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"],
1181 [ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"])
1182 AC_CHECK_FUNC(getaddrinfo,
1183 [ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"
1184 AC_DEFINE(HAVE_GETADDRINFO)],
1185 [ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])
1186 AC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))
1187 AC_SUBST(ISC_LWRES_GETIPNODEPROTO)
1188 AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
1189 AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)
1190 AC_CHECK_FUNC(pselect,
1191 [NEED_PSELECT="#undef NEED_PSELECT"],
1192 [NEED_PSELECT="#define NEED_PSELECT"])
1193 AC_SUBST(NEED_PSELECT)
1194 AC_CHECK_FUNC(gettimeofday,
1195 [NEED_GETTIMEOFDAY="#undef NEED_GETTIMEOFDAY"],
1196 [NEED_GETTIMEOFDAY="#define NEED_GETTIMEOFDAY 1"])
1197 AC_SUBST(NEED_GETTIMEOFDAY)
1198 AC_CHECK_FUNC(strndup,
1199 [HAVE_STRNDUP="#define HAVE_STRNDUP 1"],
1200 [HAVE_STRNDUP="#undef HAVE_STRNDUP"])
1201 AC_SUBST(HAVE_STRNDUP)
1204 # Look for a sysctl call to get the list of network interfaces.
1206 AC_MSG_CHECKING(for interface list sysctl)
1207 AC_EGREP_CPP(found_rt_iflist, [
1208 #include <sys/param.h>
1209 #include <sys/sysctl.h>
1210 #include <sys/socket.h>
1211 #ifdef NET_RT_IFLIST
1216 AC_DEFINE(HAVE_IFLIST_SYSCTL)],
1217 [AC_MSG_RESULT(no)])
1220 # Check for some other useful functions that are not ever-present.
1222 AC_CHECK_FUNC(strsep,
1223 [ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
1224 [ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
1225 AC_CHECK_FUNC(vsnprintf,
1226 [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"],
1227 [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O"
1228 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS print.c"
1229 ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"])
1230 AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
1231 AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
1233 AC_SUBST(ISC_EXTRA_OBJS)
1234 AC_SUBST(ISC_EXTRA_SRCS)
1235 AC_CHECK_FUNC(strerror,
1236 [USE_SYSERROR_LIST="#undef USE_SYSERROR_LIST"],
1237 [USE_SYSERROR_LIST="#define USE_SYSERROR_LIST 1"])
1238 AC_SUBST(USE_SYSERROR_LIST)
1241 # Determine the printf format characters to use when printing
1242 # values of type isc_int64_t. We make the assumption that platforms
1243 # where a "long long" is the same size as a "long" (e.g., Alpha/OSF1)
1244 # want "%ld" and everyone else can use "%lld". Win32 uses "%I64d",
1245 # but that's defined elsewhere since we don't use configure on Win32.
1247 AC_MSG_CHECKING(printf format modifier for 64-bit integers)
1248 AC_TRY_RUN([main() { exit(!(sizeof(long long int) == sizeof(long int))); }],
1250 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'],
1252 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'],
1253 [AC_MSG_RESULT(default ll)
1254 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'])
1255 AC_SUBST(ISC_PLATFORM_QUADFORMAT)
1260 AC_CHECK_FUNC(chroot, AC_DEFINE(HAVE_CHROOT))
1263 # for accept, recvfrom, getpeername etc.
1265 AC_MSG_CHECKING(for socket length type)
1267 #include <sys/types.h>
1268 #include <sys/socket.h>
1269 int accept(int, struct sockaddr *, socklen_t *);
1271 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T socklen_t"
1272 AC_MSG_RESULT(socklen_t)]
1275 #include <sys/types.h>
1276 #include <sys/socket.h>
1277 int accept(int, struct sockaddr *, unsigned int *);
1279 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T unsigned int"
1280 AC_MSG_RESULT(unsigned int)]
1283 #include <sys/types.h>
1284 #include <sys/socket.h>
1285 int accept(int, struct sockaddr *, unsigned long *);
1287 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T unsigned long"
1288 AC_MSG_RESULT(unsigned long)]
1291 #include <sys/types.h>
1292 #include <sys/socket.h>
1293 int accept(int, struct sockaddr *, long *);
1295 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T long"
1296 AC_MSG_RESULT(long)]
1298 ISC_SOCKLEN_T="#define ISC_SOCKLEN_T int"
1301 AC_SUBST(ISC_SOCKLEN_T)
1303 AC_CHECK_FUNC(getgrouplist,
1305 [#include <unistd.h>
1307 getgrouplist(const char *name, int basegid, int *groups, int *ngroups) {
1311 GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, int basegid, int *groups, int *ngroups"
1313 GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups"
1315 GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups"
1316 AC_DEFINE(NEED_GETGROUPLIST)
1318 AC_SUBST(GETGROUPLIST_ARGS)
1320 AC_CHECK_FUNC(setgroupent,,AC_DEFINE(NEED_SETGROUPENT))
1326 AC_CHECK_FUNC(getnetbyaddr_r,
1336 getnetbyaddr_r(long net, int type, struct netent *result, char *buffer,
1341 NET_R_ARGS="#define NET_R_ARGS char *buf, int buflen"
1342 NET_R_BAD="#define NET_R_BAD NULL"
1343 NET_R_COPY="#define NET_R_COPY buf, buflen"
1344 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS NET_R_ARGS"
1345 NET_R_OK="#define NET_R_OK nptr"
1346 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1347 NET_R_RETURN="#define NET_R_RETURN struct netent *"
1348 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
1349 NETENT_DATA="#undef NETENT_DATA"
1359 int getnetbyaddr_r (unsigned long int, int, struct netent *,
1360 char *, size_t, struct netent **, int *);
1364 NET_R_ARGS="#define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop"
1365 NET_R_BAD="#define NET_R_BAD ERANGE"
1366 NET_R_COPY="#define NET_R_COPY buf, buflen"
1367 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS char *buf, size_t buflen"
1368 NET_R_OK="#define NET_R_OK 0"
1369 NET_R_SETANSWER="#define NET_R_SETANSWER 1"
1370 NET_R_RETURN="#define NET_R_RETURN int"
1371 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T unsigned long int"
1372 NETENT_DATA="#undef NETENT_DATA"
1382 extern int getnetbyaddr_r(int, int, struct netent *, struct netent_data *);
1386 NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"
1387 NET_R_BAD="#define NET_R_BAD (-1)"
1388 NET_R_COPY="#define NET_R_COPY ndptr"
1389 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"
1390 NET_R_OK="#define NET_R_OK 0"
1391 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1392 NET_R_RETURN="#define NET_R_RETURN int"
1393 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T int"
1394 NETENT_DATA="#define NETENT_DATA 1"
1400 int getnetbyaddr_r (long, int, struct netent *, struct netent_data *);
1404 NET_R_ARGS="#define NET_R_ARGS struct netent_data *ndptr"
1405 NET_R_BAD="#define NET_R_BAD (-1)"
1406 NET_R_COPY="#define NET_R_COPY ndptr"
1407 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS struct netent_data *ndptr"
1408 NET_R_OK="#define NET_R_OK 0"
1409 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1410 NET_R_RETURN="#define NET_R_RETURN int"
1411 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
1412 NETENT_DATA="#define NETENT_DATA 1"
1418 int getnetbyaddr_r (uint32_t, int, struct netent *,
1419 char *, size_t, struct netent **, int *);
1423 NET_R_ARGS="#define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop"
1424 NET_R_BAD="#define NET_R_BAD ERANGE"
1425 NET_R_COPY="#define NET_R_COPY buf, buflen"
1426 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS char *buf, size_t buflen"
1427 NET_R_OK="#define NET_R_OK 0"
1428 NET_R_SETANSWER="#define NET_R_SETANSWER 1"
1429 NET_R_RETURN="#define NET_R_RETURN int"
1430 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T unsigned long int"
1431 NETENT_DATA="#undef NETENT_DATA"
1439 NET_R_ARGS="#define NET_R_ARGS char *buf, int buflen"
1440 NET_R_BAD="#define NET_R_BAD NULL"
1441 NET_R_COPY="#define NET_R_COPY buf, buflen"
1442 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS NET_R_ARGS"
1443 NET_R_OK="#define NET_R_OK nptr"
1444 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1445 NET_R_RETURN="#define NET_R_RETURN struct netent *"
1446 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
1447 NETENT_DATA="#undef NETENT_DATA"
1452 *dec-osf*) GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T int" ;;
1454 AC_SUBST(NET_R_ARGS)
1456 AC_SUBST(NET_R_COPY)
1457 AC_SUBST(NET_R_COPY_ARGS)
1459 AC_SUBST(NET_R_SETANSWER)
1460 AC_SUBST(NET_R_RETURN)
1461 AC_SUBST(GETNETBYADDR_ADDR_T)
1462 AC_SUBST(NETENT_DATA)
1464 AC_CHECK_FUNC(setnetent_r,
1470 void setnetent_r (int);
1472 NET_R_ENT_ARGS="#undef NET_R_ENT_ARGS /*empty*/"
1473 NET_R_SET_RESULT="#undef NET_R_SET_RESULT /*empty*/"
1474 NET_R_SET_RETURN="#define NET_R_SET_RETURN void"
1482 extern int setnetent_r(int, struct netent_data *);
1484 NET_R_ENT_ARGS="#define NET_R_ENT_ARGS struct netent_data *ndptr"
1485 NET_R_SET_RESULT="#define NET_R_SET_RESULT NET_R_OK"
1486 NET_R_SET_RETURN="#define NET_R_SET_RETURN int"
1491 NET_R_ENT_ARGS="#undef NET_R_ENT_ARGS /*empty*/"
1492 NET_R_SET_RESULT="#undef NET_R_SET_RESULT /*empty*/"
1493 NET_R_SET_RETURN="#define NET_R_SET_RETURN void"
1495 AC_SUBST(NET_R_ENT_ARGS)
1496 AC_SUBST(NET_R_SET_RESULT)
1497 AC_SUBST(NET_R_SET_RETURN)
1504 AC_CHECK_FUNC(endnetent_r,
1512 void endnetent_r (void);
1514 NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
1515 NET_R_END_RETURN="#define NET_R_END_RETURN void"
1524 extern int endnetent_r(struct netent_data *);
1526 NET_R_END_RESULT="#define NET_R_END_RESULT(x) return (x)"
1527 NET_R_END_RETURN="#define NET_R_END_RETURN int"
1536 extern void endnetent_r(struct netent_data *);
1538 NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
1539 NET_R_END_RETURN="#define NET_R_END_RETURN void"
1545 NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
1546 NET_R_END_RETURN="#define NET_R_END_RETURN void"
1549 AC_SUBST(NET_R_END_RESULT)
1550 AC_SUBST(NET_R_END_RETURN)
1552 AC_CHECK_FUNC(getgrnam_r,,AC_DEFINE(NEED_GETGRNAM_R))
1553 AC_CHECK_FUNC(getgrgid_r,,AC_DEFINE(NEED_GETGRGID_R))
1555 AC_CHECK_FUNC(getgrent_r,
1559 struct group *getgrent_r(struct group *grp, char *buffer,
1562 GROUP_R_ARGS="#define GROUP_R_ARGS char *buf, int buflen"
1563 GROUP_R_BAD="#define GROUP_R_BAD NULL"
1564 GROUP_R_OK="#define GROUP_R_OK gptr"
1565 GROUP_R_RETURN="#define GROUP_R_RETURN struct group *"
1569 GROUP_R_ARGS="#define GROUP_R_ARGS char *buf, int buflen"
1570 GROUP_R_BAD="#define GROUP_R_BAD NULL"
1571 GROUP_R_OK="#define GROUP_R_OK gptr"
1572 GROUP_R_RETURN="#define GROUP_R_RETURN struct group *"
1573 AC_DEFINE(NEED_GETGRENT_R)
1575 AC_SUBST(GROUP_R_ARGS)
1576 AC_SUBST(GROUP_R_BAD)
1577 AC_SUBST(GROUP_R_OK)
1578 AC_SUBST(GROUP_R_RETURN)
1580 AC_CHECK_FUNC(endgrent_r,
1582 GROUP_R_END_RESULT="#define GROUP_R_END_RESULT(x) /*empty*/"
1583 GROUP_R_END_RETURN="#define GROUP_R_END_RETURN void"
1584 GROUP_R_ENT_ARGS="#define GROUP_R_ENT_ARGS void"
1585 AC_DEFINE(NEED_ENDGRENT_R)
1587 AC_SUBST(GROUP_R_END_RESULT)
1588 AC_SUBST(GROUP_R_END_RETURN)
1589 AC_SUBST(GROUP_R_ENT_ARGS)
1591 AC_CHECK_FUNC(setgrent_r,
1593 GROUP_R_SET_RESULT="#undef GROUP_R_SET_RESULT /*empty*/"
1594 GROUP_R_SET_RETURN="#define GROUP_R_SET_RETURN void"
1595 AC_DEFINE(NEED_SETGRENT_R)
1597 AC_SUBST(GROUP_R_SET_RESULT)
1598 AC_SUBST(GROUP_R_SET_RETURN)
1605 AC_CHECK_FUNC(gethostbyname_r,
1611 struct hostent *gethostbyname_r
1612 (const char *name, struct hostent *hp, char *buf, int len, int *h_errnop) {}
1616 HOST_R_ARGS="#define HOST_R_ARGS char *buf, int buflen, int *h_errnop"
1617 HOST_R_BAD="#define HOST_R_BAD NULL"
1618 HOST_R_COPY="#define HOST_R_COPY buf, buflen"
1619 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
1620 HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
1621 HOST_R_OK="#define HOST_R_OK hptr"
1622 HOST_R_RETURN="#define HOST_R_RETURN struct hostent *"
1623 HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
1624 HOSTENT_DATA="#undef HOSTENT_DATA"
1631 int gethostbyname_r(const char *name,
1632 struct hostent *result,
1633 struct hostent_data *hdptr);
1635 HOST_R_ARGS="#define HOST_R_ARGS struct hostent_data *hdptr"
1636 HOST_R_BAD="#define HOST_R_BAD (-1)"
1637 HOST_R_COPY="#define HOST_R_COPY hdptr"
1638 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS HOST_R_ARGS"
1639 HOST_R_ERRNO="#undef HOST_R_ERRNO"
1640 HOST_R_OK="#define HOST_R_OK 0"
1641 HOST_R_RETURN="#define HOST_R_RETURN int"
1642 HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
1643 HOSTENT_DATA="#define HOSTENT_DATA 1"
1649 extern int gethostbyname_r (const char *,
1655 HOST_R_ARGS="#define HOST_R_ARGS char *buf, size_t buflen, struct hostent **answerp, int *h_errnop"
1656 HOST_R_BAD="#define HOST_R_BAD ERANGE"
1657 HOST_R_COPY="#define HOST_R_COPY buf, buflen"
1658 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
1659 HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
1660 HOST_R_OK="#define HOST_R_OK 0"
1661 HOST_R_RETURN="#define HOST_R_RETURN int"
1662 HOST_R_SETANSWER="#define HOST_R_SETANSWER 1"
1663 HOSTENT_DATA="#undef HOSTENT_DATA"
1667 HOST_R_ARGS="#define HOST_R_ARGS char *buf, int buflen, int *h_errnop"
1668 HOST_R_BAD="#define HOST_R_BAD NULL"
1669 HOST_R_COPY="#define HOST_R_COPY buf, buflen"
1670 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
1671 HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
1672 HOST_R_OK="#define HOST_R_OK hptr"
1673 HOST_R_RETURN="#define HOST_R_RETURN struct hostent *"
1674 HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
1675 HOSTENT_DATA="#undef HOSTENT_DATA"
1678 AC_SUBST(HOST_R_ARGS)
1679 AC_SUBST(HOST_R_BAD)
1680 AC_SUBST(HOST_R_COPY)
1681 AC_SUBST(HOST_R_COPY_ARGS)
1682 AC_SUBST(HOST_R_ERRNO)
1684 AC_SUBST(HOST_R_RETURN)
1685 AC_SUBST(HOST_R_SETANSWER)
1686 AC_SUBST(HOSTENT_DATA)
1692 AC_CHECK_FUNC(endhostent_r,
1699 int endhostent_r(struct hostent_data *buffer);
1701 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) return (x)"
1702 HOST_R_END_RETURN="#define HOST_R_END_RETURN int"
1703 HOST_R_ENT_ARGS="#define HOST_R_ENT_ARGS struct hostent_data *hdptr"
1711 extern void endhostent_r(struct hostent_data *ht_data);
1713 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x)"
1714 HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
1715 HOST_R_ENT_ARGS="#define HOST_R_ENT_ARGS struct hostent_data *hdptr"
1723 extern void endhostent_r(void);
1725 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) /*empty*/"
1726 HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
1727 HOST_R_ENT_ARGS="#undef HOST_R_ENT_ARGS /*empty*/"
1733 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) /*empty*/"
1734 HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
1735 HOST_R_ENT_ARGS="#undef HOST_R_ENT_ARGS /*empty*/"
1738 AC_SUBST(HOST_R_END_RESULT)
1739 AC_SUBST(HOST_R_END_RETURN)
1740 AC_SUBST(HOST_R_ENT_ARGS)
1746 AC_CHECK_FUNC(sethostent_r,
1753 extern void sethostent_r(int flag, struct hostent_data *ht_data);],[],
1754 [HOST_R_SET_RESULT="#undef HOST_R_SET_RESULT /*empty*/"
1755 HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"],
1762 extern int sethostent_r(int flag, struct hostent_data *ht_data);],[],
1763 [HOST_R_SET_RESULT="#define HOST_R_SET_RESULT 0"
1764 HOST_R_SET_RETURN="#define HOST_R_SET_RETURN int"],
1771 void sethostent_r (int);],[],
1772 [HOST_R_SET_RESULT="#undef HOST_R_SET_RESULT"
1773 HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"],
1778 HOST_R_SET_RESULT="#undef HOST_R_SET_RESULT"
1779 HOST_R_SET_RETURN="#define HOST_R_SET_RETURN void"
1782 AC_SUBST(HOST_R_SET_RESULT)
1783 AC_SUBST(HOST_R_SET_RETURN)
1786 AC_MSG_CHECKING(struct passwd element pw_class)
1788 #include <sys/types.h>
1790 ],[struct passwd *pw; pw->pw_class = "";],
1792 AC_DEFINE(HAS_PW_CLASS)
1798 #include <sys/types.h>
1804 SETPWENT_VOID="#define SETPWENT_VOID 1"
1806 SETPWENT_VOID="#undef SETPWENT_VOID"
1808 AC_SUBST(SETPWENT_VOID)
1811 #include <sys/types.h>
1817 SETGRENT_VOID="#define SETGRENT_VOID 1"
1819 SETGRENT_VOID="#undef SETGRENT_VOID"
1821 AC_SUBST(SETGRENT_VOID)
1827 AC_CHECK_FUNC(getnetgrent_r,
1833 int getnetgrent_r(char **m, char **u, char **d, char *b, int l) {}
1838 NGR_R_ARGS="#define NGR_R_ARGS char *buf, int buflen"
1839 NGR_R_BAD="#define NGR_R_BAD (0)"
1840 NGR_R_COPY="#define NGR_R_COPY buf, buflen"
1841 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
1842 NGR_R_OK="#define NGR_R_OK 1"
1843 NGR_R_RETURN="#define NGR_R_RETURN int"
1851 int getnetgrent_r(char **m, char **u, char **d, char *b, size_t l) {}
1856 NGR_R_ARGS="#define NGR_R_ARGS char *buf, size_t buflen"
1857 NGR_R_BAD="#define NGR_R_BAD (0)"
1858 NGR_R_COPY="#define NGR_R_COPY buf, buflen"
1859 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
1860 NGR_R_OK="#define NGR_R_OK 1"
1861 NGR_R_RETURN="#define NGR_R_RETURN int"
1869 extern int getnetgrent_r( char **, char **, char **, void **);
1874 NGR_R_ARGS="#define NGR_R_ARGS void **buf"
1875 NGR_R_BAD="#define NGR_R_BAD (0)"
1876 NGR_R_COPY="#define NGR_R_COPY buf"
1877 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
1878 NGR_R_OK="#define NGR_R_OK 1"
1879 NGR_R_RETURN="#define NGR_R_RETURN int"
1880 NGR_R_PRIVATE="#define NGR_R_PRIVATE 1"
1887 NGR_R_ARGS="#define NGR_R_ARGS char *buf, int buflen"
1888 NGR_R_BAD="#define NGR_R_BAD (0)"
1889 NGR_R_COPY="#define NGR_R_COPY buf, buflen"
1890 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
1891 NGR_R_OK="#define NGR_R_OK 1"
1892 NGR_R_RETURN="#define NGR_R_RETURN int"
1895 AC_SUBST(NGR_R_ARGS)
1897 AC_SUBST(NGR_R_COPY)
1898 AC_SUBST(NGR_R_COPY_ARGS)
1900 AC_SUBST(NGR_R_RETURN)
1901 AC_SUBST(NGR_R_PRIVATE)
1903 AC_CHECK_FUNC(endnetgrent_r,
1904 NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) return (x)"
1905 NGR_R_END_RETURN="#define NGR_R_END_RETURN int"
1906 NGR_R_ENT_ARGS="#define NGR_R_ENT_ARGS NGR_R_ARGS"
1908 NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /*empty*/"
1909 NGR_R_END_RETURN="#define NGR_R_END_RETURN void"
1910 NGR_R_ENT_ARGS="#undef NGR_R_ENT_ARGS /*empty*/"
1911 AC_DEFINE(NEED_ENDNETGRENT_R)
1913 AC_SUBST(NGR_R_END_RESULT)
1914 AC_SUBST(NGR_R_END_RETURN)
1915 AC_SUBST(NGR_R_ENT_ARGS)
1917 AC_CHECK_FUNC(setnetgrent_r,
1921 NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /*empty*/"
1922 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
1925 NGR_R_SET_RESULT="#define NGR_R_SET_RESULT NGR_R_OK"
1926 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN int"
1931 NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /*empty*/"
1932 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
1934 AC_SUBST(NGR_R_SET_RESULT)
1935 AC_SUBST(NGR_R_SET_RETURN)
1937 AC_CHECK_FUNC(innetgr_r,,AC_DEFINE(NEED_INNETGR_R))
1943 AC_CHECK_FUNC(getprotoent_r,
1949 struct protoent *getprotoent_r(struct protoent *result,
1950 char *buffer, int buflen) {}
1956 PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen"
1957 PROTO_R_BAD="#define PROTO_R_BAD NULL"
1958 PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
1959 PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS"
1960 PROTO_R_OK="#define PROTO_R_OK pptr"
1961 PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER"
1962 PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *"
1970 int getprotoent_r (struct protoent *, char *, size_t, struct protoent **);
1977 PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, size_t buflen, struct protoent **answerp"
1978 PROTO_R_BAD="#define PROTO_R_BAD ERANGE"
1979 PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
1980 PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS char *buf, size_t buflen"
1981 PROTO_R_OK="#define PROTO_R_OK 0"
1982 PROTO_R_SETANSWER="#define PROTO_R_SETANSWER 1"
1983 PROTO_R_RETURN="#define PROTO_R_RETURN int"
1989 PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen"
1990 PROTO_R_BAD="#define PROTO_R_BAD NULL"
1991 PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
1992 PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS"
1993 PROTO_R_OK="#define PROTO_R_OK pptr"
1994 PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER"
1995 PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *"
1998 AC_SUBST(PROTO_R_ARGS)
1999 AC_SUBST(PROTO_R_BAD)
2000 AC_SUBST(PROTO_R_COPY)
2001 AC_SUBST(PROTO_R_COPY_ARGS)
2002 AC_SUBST(PROTO_R_OK)
2003 AC_SUBST(PROTO_R_SETANSWER)
2004 AC_SUBST(PROTO_R_RETURN)
2010 AC_CHECK_FUNC(endprotoent_r,
2018 void endprotoent_r(void);
2022 PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/"
2023 PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void"
2024 PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS"
2029 PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/"
2030 PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void"
2031 PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS /*empty*/"
2034 AC_SUBST(PROTO_R_END_RESULT)
2035 AC_SUBST(PROTO_R_END_RETURN)
2036 AC_SUBST(PROTO_R_ENT_ARGS)
2042 AC_CHECK_FUNC(setprotoent_r,
2050 void setprotoent_r __P((int));
2052 PROTO_R_SET_RESULT="#undef PROTO_R_SET_RESULT"
2053 PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void"
2057 PROTO_R_SET_RESULT="#undef PROTO_R_SET_RESULT"
2058 PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void"
2061 AC_SUBST(PROTO_R_SET_RESULT)
2062 AC_SUBST(PROTO_R_SET_RETURN)
2064 AC_CHECK_FUNC(getpwent_r,
2067 #include <sys/types.h>
2070 getpwent_r(struct passwd *pwptr, char *buf, int buflen) {}
2075 PASS_R_ARGS="#define PASS_R_ARGS char *buf, int buflen"
2076 PASS_R_BAD="#define PASS_R_BAD NULL"
2077 PASS_R_COPY="#define PASS_R_COPY buf, buflen"
2078 PASS_R_COPY_ARGS="#define PASS_R_COPY_ARGS PASS_R_ARGS"
2079 PASS_R_OK="#define PASS_R_OK pwptr"
2080 PASS_R_RETURN="#define PASS_R_RETURN struct passwd *"
2084 PASS_R_ARGS="#define PASS_R_ARGS char *buf, int buflen"
2085 PASS_R_BAD="#define PASS_R_BAD NULL"
2086 PASS_R_COPY="#define PASS_R_COPY buf, buflen"
2087 PASS_R_COPY_ARGS="#define PASS_R_COPY_ARGS PASS_R_ARGS"
2088 PASS_R_OK="#define PASS_R_OK pwptr"
2089 PASS_R_RETURN="#define PASS_R_RETURN struct passwd *"
2090 AC_DEFINE(NEED_GETPWENT_R)
2092 AC_SUBST(PASS_R_ARGS)
2093 AC_SUBST(PASS_R_BAD)
2094 AC_SUBST(PASS_R_COPY)
2095 AC_SUBST(PASS_R_COPY_ARGS)
2097 AC_SUBST(PASS_R_RETURN)
2099 AC_CHECK_FUNC(endpwent_r,
2103 void endpwent_r(FILE **pwfp);
2105 PASS_R_END_RESULT="#define PASS_R_END_RESULT(x) /*empty*/"
2106 PASS_R_END_RETURN="#define PASS_R_END_RETURN void"
2107 PASS_R_ENT_ARGS="#define PASS_R_ENT_ARGS FILE **pwptr"
2111 PASS_R_END_RESULT="#define PASS_R_END_RESULT(x) /*empty*/"
2112 PASS_R_END_RETURN="#define PASS_R_END_RETURN void"
2113 PASS_R_ENT_ARGS="#undef PASS_R_ENT_ARGS"
2114 AC_DEFINE(NEED_ENDPWENT_R)
2116 AC_SUBST(PASS_R_END_RESULT)
2117 AC_SUBST(PASS_R_END_RETURN)
2118 AC_SUBST(PASS_R_ENT_ARGS)
2119 AC_CHECK_FUNC(setpassent_r,,AC_DEFINE(NEED_SETPASSENT_R))
2120 AC_CHECK_FUNC(setpassent,,AC_DEFINE(NEED_SETPASSENT))
2122 AC_CHECK_FUNC(setpwent_r,
2125 void setpwent_r(FILE **pwfp);
2127 PASS_R_SET_RESULT="#undef PASS_R_SET_RESULT /* empty */"
2128 PASS_R_SET_RETURN="#define PASS_R_SET_RETURN int"
2132 int setpwent_r(FILE **pwfp);
2134 PASS_R_SET_RESULT="#define PASS_R_SET_RESULT 0"
2135 PASS_R_SET_RETURN="#define PASS_R_SET_RETURN int"
2140 PASS_R_SET_RESULT="#undef PASS_R_SET_RESULT /*empty*/"
2141 PASS_R_SET_RETURN="#define PASS_R_SET_RETURN void"
2142 AC_DEFINE(NEED_SETPWENT_R)
2144 AC_SUBST(PASS_R_SET_RESULT)
2145 AC_SUBST(PASS_R_SET_RETURN)
2147 AC_CHECK_FUNC(getpwnam_r,,AC_DEFINE(NEED_GETPWNAM_R))
2148 AC_CHECK_FUNC(getpwuid_r,,AC_DEFINE(NEED_GETPWUID_R))
2154 AC_CHECK_FUNC(getservent_r,
2160 getservent_r(struct servent *result, char *buffer, int buflen) {}
2163 SERV_R_ARGS="#define SERV_R_ARGS char *buf, int buflen"
2164 SERV_R_BAD="#define SERV_R_BAD NULL"
2165 SERV_R_COPY="#define SERV_R_COPY buf, buflen"
2166 SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS SERV_R_ARGS"
2167 SERV_R_OK="#define SERV_R_OK sptr"
2168 SERV_R_SETANSWER="#undef SERV_R_SETANSWER"
2169 SERV_R_RETURN="#define SERV_R_RETURN struct servent *"
2177 getservent_r (struct servent *, char *, size_t, struct servent **);
2180 SERV_R_ARGS="#define SERV_R_ARGS char *buf, size_t buflen, struct servent **answerp"
2181 SERV_R_BAD="#define SERV_R_BAD ERANGE"
2182 SERV_R_COPY="#define SERV_R_COPY buf, buflen"
2183 SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS char *buf, size_t buflen"
2184 SERV_R_OK="#define SERV_R_OK (0)"
2185 SERV_R_SETANSWER="#define SERV_R_SETANSWER 1"
2186 SERV_R_RETURN="#define SERV_R_RETURN int"
2192 SERV_R_ARGS="#define SERV_R_ARGS char *buf, int buflen"
2193 SERV_R_BAD="#define SERV_R_BAD NULL"
2194 SERV_R_COPY="#define SERV_R_COPY buf, buflen"
2195 SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS SERV_R_ARGS"
2196 SERV_R_OK="#define SERV_R_OK sptr"
2197 SERV_R_SETANSWER="#undef SERV_R_SETANSWER"
2198 SERV_R_RETURN="#define SERV_R_RETURN struct servent *"
2201 AC_SUBST(SERV_R_ARGS)
2202 AC_SUBST(SERV_R_BAD)
2203 AC_SUBST(SERV_R_COPY)
2204 AC_SUBST(SERV_R_COPY_ARGS)
2206 AC_SUBST(SERV_R_SETANSWER)
2207 AC_SUBST(SERV_R_RETURN)
2213 AC_CHECK_FUNC(endservent_r,
2221 void endservent_r(void);
2226 SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/"
2227 SERV_R_END_RETURN="#define SERV_R_END_RETURN void "
2228 SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/"
2233 SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/"
2234 SERV_R_END_RETURN="#define SERV_R_END_RETURN void "
2235 SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/"
2238 AC_SUBST(SERV_R_END_RESULT)
2239 AC_SUBST(SERV_R_END_RETURN)
2240 AC_SUBST(SERV_R_ENT_ARGS)
2246 AC_CHECK_FUNC(setservent_r,
2254 void setservent_r(int);
2258 SERV_R_SET_RESULT="#undef SERV_R_SET_RESULT"
2259 SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void"
2264 SERV_R_SET_RESULT="#undef SERV_R_SET_RESULT"
2265 SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void"
2268 AC_SUBST(SERV_R_SET_RESULT)
2269 AC_SUBST(SERV_R_SET_RETURN)
2279 int innetgr(const char *netgroup, const char *host, const char *user, const char *domain);
2283 INNETGR_ARGS="#undef INNETGR_ARGS"
2294 int innetgr(char *netgroup, char *host, char *user, char *domain);
2298 INNETGR_ARGS="#define INNETGR_ARGS char *netgroup, char *host, char *user, char *domain"
2311 void setnetgrent(const char *);
2315 SETNETGRENT_ARGS="#undef SETNETGRENT_ARGS"
2326 void setnetgrent(char *);
2330 SETNETGRENT_ARGS="#define SETNETGRENT_ARGS char *netgroup"
2334 AC_SUBST(SETNETGRENT_ARGS)
2335 AC_SUBST(INNETGR_ARGS)
2338 # Random remaining OS-specific issues involving compiler warnings.
2339 # XXXDCL print messages to indicate some compensation is being done?
2341 BROKEN_IN6ADDR_INIT_MACROS="#undef BROKEN_IN6ADDR_INIT_MACROS"
2345 hack_shutup_pthreadmutexinit=yes
2346 hack_shutup_in6addr_init_macros=yes
2349 hack_shutup_sputaux=yes
2352 hack_shutup_sigwait=yes
2353 hack_shutup_sputaux=yes
2354 hack_shutup_in6addr_init_macros=yes
2357 hack_shutup_stdargcast=yes
2360 hack_shutup_in6addr_init_macros=yes
2363 hack_shutup_in6addr_init_macros=yes
2366 hack_shutup_in6addr_init_macros=yes
2369 hack_shutup_in6addr_init_macros=yes
2373 case "$hack_shutup_pthreadmutexinit" in
2376 # Shut up PTHREAD_MUTEX_INITIALIZER unbraced
2377 # initializer warnings.
2379 AC_DEFINE(SHUTUP_MUTEX_INITIALIZER)
2383 case "$hack_shutup_sigwait" in
2386 # Shut up a -Wmissing-prototypes warning for sigwait().
2388 AC_DEFINE(SHUTUP_SIGWAIT)
2392 case "$hack_shutup_sputaux" in
2395 # Shut up a -Wmissing-prototypes warning from <stdio.h>.
2397 AC_DEFINE(SHUTUP_SPUTAUX)
2401 case "$hack_shutup_stdargcast" in
2404 # Shut up a -Wcast-qual warning from va_start().
2406 AC_DEFINE(SHUTUP_STDARG_CAST)
2410 case "$hack_shutup_in6addr_init_macros" in
2412 AC_DEFINE(BROKEN_IN6ADDR_INIT_MACROS)
2419 AC_SUBST(BIND9_TOP_BUILDDIR)
2420 BIND9_TOP_BUILDDIR=`pwd`
2422 AC_SUBST_FILE(BIND9_INCLUDES)
2423 BIND9_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
2425 AC_SUBST_FILE(BIND9_MAKE_RULES)
2426 BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
2428 . $srcdir/../../version
2429 BIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
2430 AC_SUBST(BIND9_VERSION)
2432 AC_SUBST_FILE(LIBBIND_API)
2433 LIBBIND_API=$srcdir/api
2451 ${PORT_DIR}/Makefile
2452 ${PORT_INCLUDE}/Makefile
2455 # Tell Emacs to edit this file in shell mode.