1 # Copyright (C) 2004 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.10 $)
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)
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")
319 # Begin pthreads checking.
321 # First, decide whether to use multithreading or not.
323 AC_MSG_CHECKING(whether to look for thread support)
324 AC_ARG_ENABLE(threads,
325 [ --disable-threads disable multithreading])
326 case "$enable_threads" in
336 AC_MSG_ERROR([--enable-threads takes yes or no])
343 # Search for / configure pthreads in a system-dependent fashion.
347 # NetBSD has multiple pthreads implementations. The
348 # recommended one to use is "unproven-pthreads". The
349 # older "mit-pthreads" may also work on some NetBSD
350 # versions. The PTL2 thread library does not
351 # currently work with bind9, but can be chosen with
352 # the --with-ptl2 option for those who wish to
353 # experiment with it.
355 AC_MSG_CHECKING(which NetBSD thread library to use)
358 [ --with-ptl2 on NetBSD, use the ptl2 thread library (experimental)],
359 use_ptl2="$withval", use_ptl2="no")
361 : ${LOCALBASE:=/usr/pkg}
363 if test "X$use_ptl2" = "Xyes"
367 [linking with PTL2 is highly experimental and not expected to work])
370 if test ! -d $LOCALBASE/pthreads
378 AC_MSG_RESULT(mit-pthreads/unproven-pthreads)
379 pkg="$LOCALBASE/pthreads"
380 lib1="-L$pkg/lib -Wl,-R$pkg/lib"
381 lib2="-lpthread -lm -lgcc -lpthread"
382 LIBS="$lib1 $lib2 $LIBS"
383 CPPFLAGS="$CPPFLAGS -I$pkg/include"
384 STD_CINCLUDES="$STD_CINCLUDES -I$pkg/include"
389 AC_CHECK_LIB(pthread, pthread_create,,
390 AC_CHECK_LIB(pthread, __pthread_create,,
391 AC_CHECK_LIB(pthread, __pthread_create_system,,
392 AC_CHECK_LIB(c_r, pthread_create,,
393 AC_CHECK_LIB(c, pthread_create,,
394 use_threads=false)))))
402 # We'd like to use sigwait() too
404 AC_CHECK_LIB(c, sigwait,
405 AC_DEFINE(HAVE_SIGWAIT),
406 AC_CHECK_LIB(pthread, sigwait,
407 AC_DEFINE(HAVE_SIGWAIT),
408 AC_CHECK_LIB(pthread, _Psigwait,
409 AC_DEFINE(HAVE_SIGWAIT),))
412 AC_CHECK_FUNC(pthread_attr_getstacksize,
413 AC_DEFINE(HAVE_PTHREAD_ATTR_GETSTACKSIZE),)
416 # Additional OS-specific issues related to pthreads and sigwait.
420 # One more place to look for sigwait.
423 AC_CHECK_LIB(c_r, sigwait, AC_DEFINE(HAVE_SIGWAIT),)
426 # BSDI 3.0 through 4.0.1 needs pthread_init() to be
427 # called before certain pthreads calls. This is deprecated
430 *-bsdi3.*|*-bsdi4.0*)
431 AC_DEFINE(NEED_PTHREAD_INIT)
434 # LinuxThreads requires some changes to the way we
438 AC_DEFINE(HAVE_LINUXTHREADS)
441 # Ensure the right sigwait() semantics on Solaris and make
442 # sure we call pthread_setconcurrency.
445 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS)
446 AC_CHECK_FUNC(pthread_setconcurrency,
447 AC_DEFINE(CALL_PTHREAD_SETCONCURRENCY))
448 AC_DEFINE(POSIX_GETPWUID_R)
449 AC_DEFINE(POSIX_GETPWNAM_R)
450 AC_DEFINE(POSIX_GETGRGID_R)
451 AC_DEFINE(POSIX_GETGRNAM_R)
454 AC_DEFINE(_PTHREADS_DRAFT4)
457 # UnixWare does things its own way.
460 AC_DEFINE(HAVE_UNIXWARE_SIGWAIT)
465 # Look for sysconf to allow detection of the number of processors.
467 AC_CHECK_FUNC(sysconf, AC_DEFINE(HAVE_SYSCONF),)
469 if test "X$GCC" = "Xyes"; then
473 CCOPT="$CCOPT -pthread"
474 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
478 CCOPT="$CCOPT -pthread"
481 LIBS="$LIBS -lthread"
484 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
491 CCOPT="$CCOPT -pthread"
498 STD_CDEFINES="$STD_CDEFINES -D_THREAD_SAFE"
502 CCOPT="$CCOPT -Kthread"
506 ALWAYS_DEFINES="-D_REENTRANT"
507 DO_PTHREADS="#define DO_PTHREADS 1"
508 WANT_IRS_THREADSGR_OBJS="\${WANT_IRS_THREADSGR_OBJS}"
509 WANT_IRS_THREADSPW_OBJS="\${WANT_IRS_THREADSPW_OBJS}"
510 WANT_IRS_THREADS_OBJS="\${WANT_IRS_THREADS_OBJS}"
511 WANT_THREADS_OBJS="\${WANT_THREADS_OBJS}"
515 DO_PTHREADS="#undef DO_PTHREADS"
516 WANT_IRS_THREADSGR_OBJS=""
517 WANT_IRS_THREADSPW_OBJS=""
518 WANT_IRS_THREADS_OBJS=""
523 AC_CHECK_FUNC(strlcat, AC_DEFINE(HAVE_STRLCAT))
525 AC_SUBST(ALWAYS_DEFINES)
526 AC_SUBST(DO_PTHREADS)
527 AC_SUBST(WANT_IRS_THREADSGR_OBJS)
528 AC_SUBST(WANT_IRS_THREADSPW_OBJS)
529 AC_SUBST(WANT_IRS_THREADS_OBJS)
530 AC_SUBST(WANT_THREADS_OBJS)
532 AC_CHECK_FUNC(if_nametoindex,
533 [USE_IFNAMELINKID="#define USE_IFNAMELINKID 1"],
534 [USE_IFNAMELINKID="#undef USE_IFNAMELINKID"])
535 AC_SUBST(USE_IFNAMELINKID)
537 ISC_THREAD_DIR=$thread_dir
538 AC_SUBST(ISC_THREAD_DIR)
540 AC_CHECK_FUNC(daemon,
541 [DAEMON_OBJS="" NEED_DAEMON="#undef NEED_DAEMON"]
543 [DAEMON_OBJS="\${DAEMON_OBJS}" NEED_DAEMON="#define NEED_DAEMON 1"]
545 AC_SUBST(DAEMON_OBJS)
546 AC_SUBST(NEED_DAEMON)
548 AC_CHECK_FUNC(strsep,
549 [STRSEP_OBJS="" NEED_STRSEP="#undef NEED_STRSEP"]
551 [STRSEP_OBJS="\${STRSEP_OBJS}" NEED_STRSEP="#define NEED_STRSEP 1"]
553 AC_SUBST(STRSEP_OBJS)
554 AC_SUBST(NEED_STRSEP)
556 AC_CHECK_FUNC(strerror, [NEED_STRERROR="#undef NEED_STRERROR"],
557 [NEED_STRERROR="#define NEED_STRERROR 1"])
558 AC_SUBST(NEED_STRERROR)
561 # flockfile is usually provided by pthreads, but we may want to use it
562 # even if compiled with --disable-threads.
564 AC_CHECK_FUNC(flockfile, AC_DEFINE(HAVE_FLOCKFILE),)
567 # Indicate what the final decision was regarding threads.
569 AC_MSG_CHECKING(whether to build with threads)
570 if $use_threads; then
577 # End of pthreads stuff.
581 # Additional compiler settings.
585 IRIX_DNSSEC_WARNINGS_HACK=""
587 if test "X$GCC" = "Xyes"; then
588 STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings"
598 # The version of the C compiler that constantly warns about
599 # 'const' as well as alignment issues is unfortunately not
600 # able to be discerned via the version of the operating
601 # system, nor does cc have a version flag.
602 case "`$CC +W 123 2>&1`" in
607 # Turn off the pointlessly noisy warnings.
608 STD_CWARNINGS="+w1 +W 474,530"
611 CCOPT="$CCOPT -Ae -z"
612 LIBS="-Wl,+vnocompatwarnings $LIBS"
613 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'
614 MKDEPPROG='cc -Ae -E -Wp,-M >/dev/null 2>>$TMP'
617 STD_CWARNINGS="-fullwarn -woff 1209"
619 # Silence more than 250 instances of
620 # "prototyped function redeclared without prototype"
621 # and 11 instances of
622 # "variable ... was set but never used"
623 # from lib/dns/sec/openssl.
625 IRIX_DNSSEC_WARNINGS_HACK="-woff 1692,1552"
637 # _GNU_SOURCE is needed to access the fd_bits field of struct fd_set, which
638 # is supposed to be opaque.
642 STD_CDEFINES="$STD_CDEFINES -D_GNU_SOURCE"
647 AC_SUBST(MKDEPCFLAGS)
649 AC_SUBST(IRIX_DNSSEC_WARNINGS_HACK)
654 AC_CHECK_FUNC(catgets, AC_DEFINE(HAVE_CATGETS),)
657 # -lxnet buys us one big porting headache... standards, gotta love 'em.
659 # AC_CHECK_LIB(xnet, socket, ,
660 # AC_CHECK_LIB(socket, socket)
661 # AC_CHECK_LIB(nsl, inet_ntoa)
664 # Use this for now, instead:
670 AC_CHECK_LIB(d4r, gethostbyname_r)
671 AC_CHECK_LIB(socket, socket)
672 AC_CHECK_LIB(nsl, inet_ntoa)
679 AC_MSG_CHECKING(whether to use purify)
681 [ --with-purify[=PATH] use Rational purify],
682 use_purify="$withval", use_purify="no")
684 case "$use_purify" in
688 AC_PATH_PROG(purify_path, purify, purify)
691 purify_path="$use_purify"
695 case "$use_purify" in
701 if test -f $purify_path || test $purify_path = purify; then
702 AC_MSG_RESULT($purify_path)
703 PURIFYFLAGS="`echo $PURIFYOPTIONS`"
704 PURIFY="$purify_path $PURIFYFLAGS"
706 AC_MSG_ERROR([$purify_path not found.
708 Please choose the proper path with the following command:
710 configure --with-purify=PATH
719 # GNU libtool support
722 [ --with-libtool use GNU libtool (following indented options supported)],
723 use_libtool="$withval", use_libtool="no")
730 LIBTOOL_MKDEP_SED='s;\.o;\.lo;'
731 LIBTOOL_MODE_COMPILE='--mode=compile'
732 LIBTOOL_MODE_INSTALL='--mode=install'
733 LIBTOOL_MODE_LINK='--mode=link'
741 LIBTOOL_MODE_COMPILE=
742 LIBTOOL_MODE_INSTALL=
748 # File name extension for static archive files, for those few places
749 # where they are treated differently from dynamic ones.
756 AC_SUBST(LIBTOOL_MKDEP_SED)
757 AC_SUBST(LIBTOOL_MODE_COMPILE)
758 AC_SUBST(LIBTOOL_MODE_INSTALL)
759 AC_SUBST(LIBTOOL_MODE_LINK)
762 # Here begins a very long section to determine the system's networking
763 # capabilities. The order of the tests is signficant.
770 [ --enable-ipv6 use IPv6 [default=autodetect]])
772 case "$enable_ipv6" in
781 # We do the IPv6 compilation checking after libtool so that we can put
782 # the right suffix on the files.
784 AC_MSG_CHECKING(for IPv6 structures)
786 #include <sys/types.h>
787 #include <sys/socket.h>
788 #include <netinet/in.h>],
789 [struct sockaddr_in6 sin6; return (0);],
796 # See whether IPv6 support is provided via a Kame add-on.
797 # This is done before other IPv6 linking tests to LIBS is properly set.
799 AC_MSG_CHECKING(for Kame IPv6 support)
801 [ --with-kame[=PATH] use Kame IPv6 [default path /usr/local/v6]],
802 use_kame="$withval", use_kame="no")
808 kame_path=/usr/local/v6
811 kame_path="$use_kame"
820 if test -f $kame_path/lib/libinet6.a; then
821 AC_MSG_RESULT($kame_path/lib/libinet6.a)
822 LIBS="-L$kame_path/lib -linet6 $LIBS"
824 AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
826 Please choose the proper path with the following command:
828 configure --with-kame=PATH
835 # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
836 # Including it on Kame-using platforms is very bad, though, because
837 # Kame uses #error against direct inclusion. So include it on only
838 # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
839 # This is done before the in6_pktinfo check because that's what
840 # netinet6/in6.h is needed for.
845 ISC_PLATFORM_NEEDNETINET6IN6H="#define ISC_PLATFORM_NEEDNETINET6IN6H 1"
846 isc_netinet6in6_hack="#include <netinet6/in6.h>"
849 ISC_PLATFORM_NEEDNETINET6IN6H="#undef ISC_PLATFORM_NEEDNETINET6IN6H"
850 isc_netinet6in6_hack=""
856 # This is similar to the netinet6/in6.h issue.
860 ISC_PLATFORM_NEEDNETINETIN6H="#define ISC_PLATFORM_NEEDNETINETIN6H 1"
861 ISC_PLATFORM_FIXIN6ISADDR="#define ISC_PLATFORM_FIXIN6ISADDR 1"
862 isc_netinetin6_hack="#include <netinet/in6.h>"
865 ISC_PLATFORM_NEEDNETINETIN6H="#undef ISC_PLATFORM_NEEDNETINETIN6H"
866 ISC_PLATFORM_FIXIN6ISADDR="#undef ISC_PLATFORM_FIXIN6ISADDR"
867 isc_netinetin6_hack=""
872 # Now delve deeper into the suitability of the IPv6 support.
874 case "$found_ipv6" in
876 HAS_INET6_STRUCTS="#define HAS_INET6_STRUCTS 1"
878 AC_MSG_CHECKING(for in6_addr)
880 #include <sys/types.h>
881 #include <sys/socket.h>
882 #include <netinet/in.h>
884 $isc_netinet6in6_hack
886 [struct in6_addr in6; return (0);],
888 HAS_IN_ADDR6="#undef HAS_IN_ADDR6"
889 isc_in_addr6_hack=""],
891 HAS_IN_ADDR6="#define HAS_IN_ADDR6 1"
892 isc_in_addr6_hack="#define in6_addr in_addr6"])
894 AC_MSG_CHECKING(for in6addr_any)
896 #include <sys/types.h>
897 #include <sys/socket.h>
898 #include <netinet/in.h>
900 $isc_netinet6in6_hack
903 [struct in6_addr in6; in6 = in6addr_any; return (0);],
905 NEED_IN6ADDR_ANY="#undef NEED_IN6ADDR_ANY"],
907 NEED_IN6ADDR_ANY="#define NEED_IN6ADDR_ANY 1"])
909 AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
911 #include <sys/types.h>
912 #include <sys/socket.h>
913 #include <netinet/in.h>
915 $isc_netinet6in6_hack
917 [struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
919 result="#define HAVE_SIN6_SCOPE_ID 1"],
921 result="#undef HAVE_SIN6_SCOPE_ID"])
922 HAVE_SIN6_SCOPE_ID="$result"
924 AC_MSG_CHECKING(for in6_pktinfo)
926 #include <sys/types.h>
927 #include <sys/socket.h>
928 #include <netinet/in.h>
930 $isc_netinet6in6_hack
932 [struct in6_pktinfo xyzzy; return (0);],
934 ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
935 [AC_MSG_RESULT(no -- disabling runtime ipv6 support)
936 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
938 AC_MSG_CHECKING(for sockaddr_storage)
940 #include <sys/types.h>
941 #include <sys/socket.h>
942 #include <netinet/in.h>
944 $isc_netinet6in6_hack
946 [struct sockaddr_storage xyzzy; return (0);],
948 HAVE_SOCKADDR_STORAGE="#define HAVE_SOCKADDR_STORAGE 1"],
950 HAVE_SOCKADDR_STORAGE="#undef HAVE_SOCKADDR_STORAGE"])
953 HAS_INET6_STRUCTS="#undef HAS_INET6_STRUCTS"
954 NEED_IN6ADDR_ANY="#undef NEED_IN6ADDR_ANY"
955 ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
956 HAVE_SIN6_SCOPE_ID="#define HAVE_SIN6_SCOPE_ID 1"
957 HAVE_SOCKADDR_STORAGE="#undef HAVE_SOCKADDR_STORAGE"
960 ISC_ISCIPV6_O="unix/ipv6.$O"
965 AC_SUBST(HAS_INET6_STRUCTS)
966 AC_SUBST(ISC_PLATFORM_NEEDNETINETIN6H)
967 AC_SUBST(ISC_PLATFORM_NEEDNETINET6IN6H)
968 AC_SUBST(HAS_IN_ADDR6)
969 AC_SUBST(NEED_IN6ADDR_ANY)
970 AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
971 AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
974 AC_SUBST(ISC_ISCIPV6_O)
976 AC_SUBST(HAVE_SIN6_SCOPE_ID)
977 AC_SUBST(HAVE_SOCKADDR_STORAGE)
980 # Check for network functions that are often missing. We do this
981 # after the libtool checking, so we can put the right suffix on
982 # the files. It also needs to come after checking for a Kame add-on,
983 # which provides some (all?) of the desired functions.
985 AC_MSG_CHECKING([for inet_ntop])
987 #include <sys/types.h>
988 #include <netinet/in.h>
989 #include <arpa/inet.h>],
990 [inet_ntop(0, 0, 0, 0); return (0);],
992 ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"],
995 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
996 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
997 ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"])
998 AC_MSG_CHECKING([for inet_pton])
1000 #include <sys/types.h>
1001 #include <netinet/in.h>
1002 #include <arpa/inet.h>],
1003 [inet_pton(0, 0, 0); return (0);],
1005 ISC_PLATFORM_NEEDPTON="#undef ISC_PLATFORM_NEEDPTON"],
1008 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_pton.$O"
1009 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_pton.c"
1010 ISC_PLATFORM_NEEDPTON="#define ISC_PLATFORM_NEEDPTON 1"])
1011 AC_MSG_CHECKING([for inet_aton])
1013 #include <sys/types.h>
1014 #include <netinet/in.h>
1015 #include <arpa/inet.h>],
1016 [struct in_addr in; inet_aton(0, &in); return (0);],
1018 ISC_PLATFORM_NEEDATON="#undef ISC_PLATFORM_NEEDATON"],
1021 ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O"
1022 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c"
1023 ISC_PLATFORM_NEEDATON="#define ISC_PLATFORM_NEEDATON 1"])
1025 AC_SUBST(ISC_PLATFORM_NEEDNTOP)
1026 AC_SUBST(ISC_PLATFORM_NEEDPTON)
1027 AC_SUBST(ISC_PLATFORM_NEEDATON)
1030 # Look for a 4.4BSD-style sa_len member in struct sockaddr.
1034 # Turn on 4.4BSD style sa_len support.
1035 AC_DEFINE(_SOCKADDR_LEN)
1039 AC_MSG_CHECKING(for sa_len in struct sockaddr)
1041 #include <sys/types.h>
1042 #include <sys/socket.h>],
1043 [struct sockaddr sa; sa.sa_len = 0; return (0);],
1045 HAVE_SA_LEN="#define HAVE_SA_LEN 1"],
1047 HAVE_SA_LEN="#undef HAVE_SA_LEN"])
1048 AC_SUBST(HAVE_SA_LEN)
1050 # HAVE_MINIMUM_IFREQ
1053 *-bsdi[2345]*) have_minimum_ifreq=yes;;
1054 *-darwin*) have_minimum_ifreq=yes;;
1055 *-freebsd*) have_minimum_ifreq=yes;;
1056 *-lynxos*) have_minimum_ifreq=yes;;
1057 *-netbsd*) have_minimum_ifreq=yes;;
1058 *-next*) have_minimum_ifreq=yes;;
1059 *-openbsd*) have_minimum_ifreq=yes;;
1060 *-rhapsody*) have_minimum_ifreq=yes;;
1063 case "$have_minimum_ifreq" in
1065 HAVE_MINIMUM_IFREQ="#define HAVE_MINIMUM_IFREQ 1";;
1067 HAVE_MINIMUM_IFREQ="#undef HAVE_MINIMUM_IFREQ";;
1069 HAVE_MINIMUM_IFREQ="#undef HAVE_MINIMUM_IFREQ";;
1071 AC_SUBST(HAVE_MINIMUM_IFREQ)
1074 PORT_DIR=port/unknown
1075 SOLARIS_BITTYPES="#undef NEED_SOLARIS_BITTYPES"
1076 BSD_COMP="#undef BSD_COMP"
1077 USE_FIONBIO_IOCTL="#undef USE_FIONBIO_IOCTL"
1079 *aix3.2*) PORT_DIR="port/aix32";;
1080 *aix4*) PORT_DIR="port/aix4";;
1081 *aix5*) PORT_DIR="port/aix5";;
1082 *aux3*) PORT_DIR="port/aux3";;
1083 *-bsdi2*) PORT_DIR="port/bsdos2";;
1084 *-bsdi*) PORT_DIR="port/bsdos";;
1085 *-cygwin*) PORT_DIR="port/cygwin";;
1086 *-darwin*) PORT_DIR="port/darwin";;
1087 *-osf*) PORT_DIR="port/decunix";;
1088 *-freebsd*) PORT_DIR="port/freebsd";;
1089 *-hpux9*) PORT_DIR="port/hpux9";;
1090 *-hpux10*) PORT_DIR="port/hpux10";;
1091 *-hpux11*) PORT_DIR="port/hpux";;
1092 *-irix*) PORT_DIR="port/irix";;
1093 *-linux*) PORT_DIR="port/linux";;
1094 *-lynxos*) PORT_DIR="port/lynxos";;
1095 *-mpe*) PORT_DIR="port/mpe";;
1096 *-netbsd*) PORT_DIR="port/netbsd";;
1097 *-next*) PORT_DIR="port/next";;
1098 *-openbsd*) PORT_DIR="port/openbsd";;
1099 *-qnx*) PORT_DIR="port/qnx";;
1100 *-rhapsody*) PORT_DIR="port/rhapsody";;
1101 *-solaris2.[[01234]]*)
1102 BSD_COMP="#define BSD_COMP 1"
1103 SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
1104 USE_FIONBIO_IOCTL="#define USE_FIONBIO_IOCTL 1"
1105 PORT_DIR="port/solaris";;
1107 BSD_COMP="#define BSD_COMP 1"
1108 SOLARIS_BITTYPES="#define NEED_SOLARIS_BITTYPES 1"
1109 PORT_DIR="port/solaris";;
1110 *-solaris2*) BSD_COMP="#define BSD_COMP 1"
1111 PORT_DIR="port/solaris";;
1112 *-ultrix*) PORT_DIR="port/ultrix";;
1113 *-sco-sysv*uw2.0*) PORT_DIR="port/unixware20";;
1114 *-sco-sysv*uw2.1.2*) PORT_DIR="port/unixware212";;
1115 *-sco-sysv*uw7*) PORT_DIR="port/unixware7";;
1118 AC_SUBST(SOLARIS_BITTYPES)
1119 AC_SUBST(USE_FIONBIO_IOCTL)
1121 PORT_INCLUDE=${PORT_DIR}/include
1122 AC_SUBST(PORT_INCLUDE)
1126 # Look for a 4.4BSD or 4.3BSD struct msghdr
1128 AC_MSG_CHECKING(for struct msghdr flavor)
1130 #include <sys/types.h>
1131 #include <sys/socket.h>],
1132 [struct msghdr msg; msg.msg_flags = 0; return (0);],
1133 [AC_MSG_RESULT(4.4BSD)
1134 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD44MSGHDR 1"],
1135 [AC_MSG_RESULT(4.3BSD)
1136 ISC_PLATFORM_MSGHDRFLAVOR="#define ISC_NET_BSD43MSGHDR 1"])
1137 AC_SUBST(ISC_PLATFORM_MSGHDRFLAVOR)
1140 # Look for in_port_t.
1142 AC_MSG_CHECKING(for type in_port_t)
1144 #include <sys/types.h>
1145 #include <netinet/in.h>],
1146 [in_port_t port = 25; return (0);],
1148 ISC_PLATFORM_NEEDPORTT="#undef ISC_PLATFORM_NEEDPORTT"],
1150 ISC_PLATFORM_NEEDPORTT="#define ISC_PLATFORM_NEEDPORTT 1"])
1151 AC_SUBST(ISC_PLATFORM_NEEDPORTT)
1154 # Check for addrinfo
1156 AC_MSG_CHECKING(for struct addrinfo)
1158 #include <netdb.h>],
1159 [struct addrinfo a; return (0);],
1161 AC_DEFINE(HAVE_ADDRINFO)],
1162 [AC_MSG_RESULT(no)])
1164 AC_MSG_CHECKING(for int sethostent)
1166 #include <netdb.h>],
1167 [int i = sethostent(0); return(0);],
1168 [AC_MSG_RESULT(yes)],
1169 [AC_MSG_RESULT(no)])
1171 AC_MSG_CHECKING(for int endhostent)
1173 #include <netdb.h>],
1174 [int i = endhostent(); return(0);],
1176 ISC_LWRES_ENDHOSTENTINT="#define ISC_LWRES_ENDHOSTENTINT 1"],
1178 ISC_LWRES_ENDHOSTENTINT="#undef ISC_LWRES_ENDHOSTENTINT"])
1179 AC_SUBST(ISC_LWRES_ENDHOSTENTINT)
1181 AC_MSG_CHECKING(for int setnetent)
1183 #include <netdb.h>],
1184 [int i = setnetent(0); return(0);],
1186 ISC_LWRES_SETNETENTINT="#define ISC_LWRES_SETNETENTINT 1"],
1188 ISC_LWRES_SETNETENTINT="#undef ISC_LWRES_SETNETENTINT"])
1189 AC_SUBST(ISC_LWRES_SETNETENTINT)
1191 AC_MSG_CHECKING(for int endnetent)
1193 #include <netdb.h>],
1194 [int i = endnetent(); return(0);],
1196 ISC_LWRES_ENDNETENTINT="#define ISC_LWRES_ENDNETENTINT 1"],
1198 ISC_LWRES_ENDNETENTINT="#undef ISC_LWRES_ENDNETENTINT"])
1199 AC_SUBST(ISC_LWRES_ENDNETENTINT)
1201 AC_MSG_CHECKING(for gethostbyaddr(const void *, size_t, ...))
1204 struct hostent *gethostbyaddr(const void *, size_t, int);],
1207 ISC_LWRES_GETHOSTBYADDRVOID="#define ISC_LWRES_GETHOSTBYADDRVOID 1"],
1209 ISC_LWRES_GETHOSTBYADDRVOID="#undef ISC_LWRES_GETHOSTBYADDRVOID"])
1210 AC_SUBST(ISC_LWRES_GETHOSTBYADDRVOID)
1212 AC_MSG_CHECKING(for h_errno in netdb.h)
1214 #include <netdb.h>],
1215 [h_errno = 1; return(0);],
1217 ISC_LWRES_NEEDHERRNO="#undef ISC_LWRES_NEEDHERRNO"],
1219 ISC_LWRES_NEEDHERRNO="#define ISC_LWRES_NEEDHERRNO 1"])
1220 AC_SUBST(ISC_LWRES_NEEDHERRNO)
1222 AC_CHECK_FUNC(getipnodebyname,
1223 [ISC_LWRES_GETIPNODEPROTO="#undef ISC_LWRES_GETIPNODEPROTO"],
1224 [ISC_LWRES_GETIPNODEPROTO="#define ISC_LWRES_GETIPNODEPROTO 1"])
1225 AC_CHECK_FUNC(getnameinfo,
1226 [ISC_LWRES_GETNAMEINFOPROTO="#undef ISC_LWRES_GETNAMEINFOPROTO"],
1227 [ISC_LWRES_GETNAMEINFOPROTO="#define ISC_LWRES_GETNAMEINFOPROTO 1"])
1228 AC_CHECK_FUNC(getaddrinfo,
1229 [ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"
1230 AC_DEFINE(HAVE_GETADDRINFO)],
1231 [ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])
1232 AC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))
1233 AC_SUBST(ISC_LWRES_GETIPNODEPROTO)
1234 AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
1235 AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)
1236 AC_CHECK_FUNC(pselect,
1237 [NEED_PSELECT="#undef NEED_PSELECT"],
1238 [NEED_PSELECT="#define NEED_PSELECT"])
1239 AC_SUBST(NEED_PSELECT)
1240 AC_CHECK_FUNC(gettimeofday,
1241 [NEED_GETTIMEOFDAY="#undef NEED_GETTIMEOFDAY"],
1242 [NEED_GETTIMEOFDAY="#define NEED_GETTIMEOFDAY 1"])
1243 AC_SUBST(NEED_GETTIMEOFDAY)
1244 AC_CHECK_FUNC(strndup,
1245 [HAVE_STRNDUP="#define HAVE_STRNDUP 1"],
1246 [HAVE_STRNDUP="#undef HAVE_STRNDUP"])
1247 AC_SUBST(HAVE_STRNDUP)
1250 # Look for a sysctl call to get the list of network interfaces.
1252 AC_MSG_CHECKING(for interface list sysctl)
1253 AC_EGREP_CPP(found_rt_iflist, [
1254 #include <sys/param.h>
1255 #include <sys/sysctl.h>
1256 #include <sys/socket.h>
1257 #ifdef NET_RT_IFLIST
1262 AC_DEFINE(HAVE_IFLIST_SYSCTL)],
1263 [AC_MSG_RESULT(no)])
1266 # Check for some other useful functions that are not ever-present.
1268 AC_CHECK_FUNC(strsep,
1269 [ISC_PLATFORM_NEEDSTRSEP="#undef ISC_PLATFORM_NEEDSTRSEP"],
1270 [ISC_PLATFORM_NEEDSTRSEP="#define ISC_PLATFORM_NEEDSTRSEP 1"])
1271 AC_CHECK_FUNC(vsnprintf,
1272 [ISC_PLATFORM_NEEDVSNPRINTF="#undef ISC_PLATFORM_NEEDVSNPRINTF"],
1273 [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS print.$O"
1274 ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS print.c"
1275 ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"])
1276 AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
1277 AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
1279 AC_SUBST(ISC_EXTRA_OBJS)
1280 AC_SUBST(ISC_EXTRA_SRCS)
1281 AC_CHECK_FUNC(strerror,
1282 [USE_SYSERROR_LIST="#undef USE_SYSERROR_LIST"],
1283 [USE_SYSERROR_LIST="#define USE_SYSERROR_LIST 1"])
1284 AC_SUBST(USE_SYSERROR_LIST)
1287 # Determine the printf format characters to use when printing
1288 # values of type isc_int64_t. We make the assumption that platforms
1289 # where a "long long" is the same size as a "long" (e.g., Alpha/OSF1)
1290 # want "%ld" and everyone else can use "%lld". Win32 uses "%I64d",
1291 # but that's defined elsewhere since we don't use configure on Win32.
1293 AC_MSG_CHECKING(printf format modifier for 64-bit integers)
1294 AC_TRY_RUN([main() { exit(!(sizeof(long long int) == sizeof(long int))); }],
1296 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "l"'],
1298 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'],
1299 [AC_MSG_RESULT(default ll)
1300 ISC_PLATFORM_QUADFORMAT='#define ISC_PLATFORM_QUADFORMAT "ll"'])
1301 AC_SUBST(ISC_PLATFORM_QUADFORMAT)
1306 AC_CHECK_FUNC(chroot, AC_DEFINE(HAVE_CHROOT))
1309 # for accept, recvfrom, getpeername etc.
1311 AC_MSG_CHECKING(for socket length type)
1313 #include <sys/types.h>
1314 #include <sys/socket.h>
1315 int accept(int, struct sockaddr *, socklen_t *);
1317 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T socklen_t"
1318 AC_MSG_RESULT(socklen_t)]
1321 #include <sys/types.h>
1322 #include <sys/socket.h>
1323 int accept(int, struct sockaddr *, unsigned int *);
1325 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T unsigned int"
1326 AC_MSG_RESULT(unsigned int)]
1329 #include <sys/types.h>
1330 #include <sys/socket.h>
1331 int accept(int, struct sockaddr *, unsigned long *);
1333 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T unsigned long"
1334 AC_MSG_RESULT(unsigned long)]
1337 #include <sys/types.h>
1338 #include <sys/socket.h>
1339 int accept(int, struct sockaddr *, long *);
1341 [ISC_SOCKLEN_T="#define ISC_SOCKLEN_T long"
1342 AC_MSG_RESULT(long)]
1344 ISC_SOCKLEN_T="#define ISC_SOCKLEN_T int"
1347 AC_SUBST(ISC_SOCKLEN_T)
1349 AC_CHECK_FUNC(getgrouplist,
1351 [#include <unistd.h>
1353 getgrouplist(const char *name, int basegid, int *groups, int *ngroups) {
1357 GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, int basegid, int *groups, int *ngroups"
1359 GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups"
1361 GETGROUPLIST_ARGS="#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups"
1362 AC_DEFINE(NEED_GETGROUPLIST)
1364 AC_SUBST(GETGROUPLIST_ARGS)
1366 AC_CHECK_FUNC(setgroupent,,AC_DEFINE(NEED_SETGROUPENT))
1368 AC_CHECK_FUNC(getnetbyaddr_r,
1378 getnetbyaddr_r(long net, int type, struct netent *result, char *buffer,
1383 NET_R_ARGS="#define NET_R_ARGS char *buf, int buflen"
1384 NET_R_BAD="#define NET_R_BAD NULL"
1385 NET_R_COPY="#define NET_R_COPY buf, buflen"
1386 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS NET_R_ARGS"
1387 NET_R_OK="#define NET_R_OK nptr"
1388 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1389 NET_R_RETURN="#define NET_R_RETURN struct netent *"
1390 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
1391 NETENT_DATA="#undef NETENT_DATA"
1401 int getnetbyaddr_r (unsigned long int, int, struct netent *,
1402 char *, size_t, struct netent **, int *);
1406 NET_R_ARGS="#define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop"
1407 NET_R_BAD="#define NET_R_BAD ERANGE"
1408 NET_R_COPY="#define NET_R_COPY buf, buflen"
1409 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS char *buf, size_t buflen"
1410 NET_R_OK="#define NET_R_OK 0"
1411 NET_R_SETANSWER="#define NET_R_SETANSWER 1"
1412 NET_R_RETURN="#define NET_R_RETURN int"
1413 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T unsigned long int"
1414 NETENT_DATA="#undef NETENT_DATA"
1424 extern int getnetbyaddr_r(int, 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 int"
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"
1461 NET_R_ARGS="#define NET_R_ARGS char *buf, int buflen"
1462 NET_R_BAD="#define NET_R_BAD NULL"
1463 NET_R_COPY="#define NET_R_COPY buf, buflen"
1464 NET_R_COPY_ARGS="#define NET_R_COPY_ARGS NET_R_ARGS"
1465 NET_R_OK="#define NET_R_OK nptr"
1466 NET_R_SETANSWER="#undef NET_R_SETANSWER"
1467 NET_R_RETURN="#define NET_R_RETURN struct netent *"
1468 GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T long"
1469 NETENT_DATA="#undef NETENT_DATA"
1472 *dec-osf*) GETNETBYADDR_ADDR_T="#define GETNETBYADDR_ADDR_T int" ;;
1474 AC_SUBST(NET_R_ARGS)
1476 AC_SUBST(NET_R_COPY)
1477 AC_SUBST(NET_R_COPY_ARGS)
1479 AC_SUBST(NET_R_SETANSWER)
1480 AC_SUBST(NET_R_RETURN)
1481 AC_SUBST(GETNETBYADDR_ADDR_T)
1482 AC_SUBST(NETENT_DATA)
1484 AC_CHECK_FUNC(setnetent_r,
1490 void setnetent_r (int);
1492 NET_R_ENT_ARGS="#undef NET_R_ENT_ARGS /*empty*/"
1493 NET_R_SET_RESULT="#undef NET_R_SET_RESULT /*empty*/"
1494 NET_R_SET_RETURN="#define NET_R_SET_RETURN void"
1502 extern int setnetent_r(int, struct netent_data *);
1504 NET_R_ENT_ARGS="#define NET_R_ENT_ARGS struct netent_data *ndptr"
1505 NET_R_SET_RESULT="#define NET_R_SET_RESULT NET_R_OK"
1506 NET_R_SET_RETURN="#define NET_R_SET_RETURN int"
1511 NET_R_ENT_ARGS="#undef NET_R_ENT_ARGS /*empty*/"
1512 NET_R_SET_RESULT="#undef NET_R_SET_RESULT /*empty*/"
1513 NET_R_SET_RETURN="#define NET_R_SET_RETURN void"
1515 AC_SUBST(NET_R_ENT_ARGS)
1516 AC_SUBST(NET_R_SET_RESULT)
1517 AC_SUBST(NET_R_SET_RETURN)
1519 AC_CHECK_FUNC(endnetent_r,
1527 void endnetent_r (void);
1529 NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
1530 NET_R_END_RETURN="#define NET_R_END_RETURN void"
1539 extern int endnetent_r(struct netent_data *);
1541 NET_R_END_RESULT="#define NET_R_END_RESULT(x) return (x)"
1542 NET_R_END_RETURN="#define NET_R_END_RETURN int"
1551 extern void endnetent_r(struct netent_data *);
1553 NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
1554 NET_R_END_RETURN="#define NET_R_END_RETURN void"
1560 NET_R_END_RESULT="#define NET_R_END_RESULT(x) /*empty*/"
1561 NET_R_END_RETURN="#define NET_R_END_RETURN void"
1563 AC_SUBST(NET_R_END_RESULT)
1564 AC_SUBST(NET_R_END_RETURN)
1566 AC_CHECK_FUNC(getgrnam_r,,AC_DEFINE(NEED_GETGRNAM_R))
1567 AC_CHECK_FUNC(getgrgid_r,,AC_DEFINE(NEED_GETGRGID_R))
1569 AC_CHECK_FUNC(getgrent_r,
1573 struct group *getgrent_r(struct group *grp, char *buffer,
1576 GROUP_R_ARGS="#define GROUP_R_ARGS char *buf, int buflen"
1577 GROUP_R_BAD="#define GROUP_R_BAD NULL"
1578 GROUP_R_OK="#define GROUP_R_OK gptr"
1579 GROUP_R_RETURN="#define GROUP_R_RETURN struct group *"
1583 GROUP_R_ARGS="#define GROUP_R_ARGS char *buf, int buflen"
1584 GROUP_R_BAD="#define GROUP_R_BAD NULL"
1585 GROUP_R_OK="#define GROUP_R_OK gptr"
1586 GROUP_R_RETURN="#define GROUP_R_RETURN struct group *"
1587 AC_DEFINE(NEED_GETGRENT_R)
1589 AC_SUBST(GROUP_R_ARGS)
1590 AC_SUBST(GROUP_R_BAD)
1591 AC_SUBST(GROUP_R_OK)
1592 AC_SUBST(GROUP_R_RETURN)
1594 AC_CHECK_FUNC(endgrent_r,
1596 GROUP_R_END_RESULT="#define GROUP_R_END_RESULT(x) /*empty*/"
1597 GROUP_R_END_RETURN="#define GROUP_R_END_RETURN void"
1598 GROUP_R_ENT_ARGS="#define GROUP_R_ENT_ARGS void"
1599 AC_DEFINE(NEED_ENDGRENT_R)
1601 AC_SUBST(GROUP_R_END_RESULT)
1602 AC_SUBST(GROUP_R_END_RETURN)
1603 AC_SUBST(GROUP_R_ENT_ARGS)
1605 AC_CHECK_FUNC(setgrent_r,
1607 GROUP_R_SET_RESULT="#undef GROUP_R_SET_RESULT /*empty*/"
1608 GROUP_R_SET_RETURN="#define GROUP_R_SET_RETURN void"
1609 AC_DEFINE(NEED_SETGRENT_R)
1611 AC_SUBST(GROUP_R_SET_RESULT)
1612 AC_SUBST(GROUP_R_SET_RETURN)
1615 AC_CHECK_FUNC(gethostbyname_r,
1621 struct hostent *gethostbyname_r
1622 (const char *name, struct hostent *hp, char *buf, int len, int *h_errnop) {}
1626 HOST_R_ARGS="#define HOST_R_ARGS char *buf, int buflen, int *h_errnop"
1627 HOST_R_BAD="#define HOST_R_BAD NULL"
1628 HOST_R_COPY="#define HOST_R_COPY buf, buflen"
1629 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
1630 HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
1631 HOST_R_OK="#define HOST_R_OK hptr"
1632 HOST_R_RETURN="#define HOST_R_RETURN struct hostent *"
1633 HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
1634 HOSTENT_DATA="#undef HOSTENT_DATA"
1641 int gethostbyname_r(const char *name,
1642 struct hostent *result,
1643 struct hostent_data *hdptr);
1645 HOST_R_ARGS="#define HOST_R_ARGS struct hostent_data *hdptr"
1646 HOST_R_BAD="#define HOST_R_BAD (-1)"
1647 HOST_R_COPY="#define HOST_R_COPY hdptr"
1648 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS HOST_R_ARGS"
1649 HOST_R_ERRNO="#define HOST_R_ERRNO NULL"
1650 HOST_R_OK="#define HOST_R_OK 0"
1651 HOST_R_RETURN="#define HOST_R_RETURN int"
1652 HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
1653 HOSTENT_DATA="#define HOSTENT_DATA 1"
1659 extern int gethostbyname_r (const char *,
1665 HOST_R_ARGS="#define HOST_R_ARGS char *buf, size_t buflen, struct hostent **answerp, int *h_errnop"
1666 HOST_R_BAD="#define HOST_R_BAD ERANGE"
1667 HOST_R_COPY="#define HOST_R_COPY buf, buflen"
1668 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
1669 HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
1670 HOST_R_OK="#define HOST_R_OK 0"
1671 HOST_R_RETURN="#define HOST_R_RETURN int"
1672 HOST_R_SETANSWER="#define HOST_R_SETANSWER 1"
1673 HOSTENT_DATA="#undef HOSTENT_DATA"
1677 HOST_R_ARGS="#define HOST_R_ARGS char *buf, int buflen, int *h_errnop"
1678 HOST_R_BAD="#define HOST_R_BAD NULL"
1679 HOST_R_COPY="#define HOST_R_COPY buf, buflen"
1680 HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen"
1681 HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno"
1682 HOST_R_OK="#define HOST_R_OK hptr"
1683 HOST_R_RETURN="#define HOST_R_RETURN struct hostent *"
1684 HOST_R_SETANSWER="#undef HOST_R_SETANSWER"
1685 HOSTENT_DATA="#undef HOSTENT_DATA"
1687 AC_SUBST(HOST_R_ARGS)
1688 AC_SUBST(HOST_R_BAD)
1689 AC_SUBST(HOST_R_COPY)
1690 AC_SUBST(HOST_R_COPY_ARGS)
1691 AC_SUBST(HOST_R_ERRNO)
1693 AC_SUBST(HOST_R_RETURN)
1694 AC_SUBST(HOST_R_SETANSWER)
1695 AC_SUBST(HOSTENT_DATA)
1697 AC_CHECK_FUNC(endhostent_r,
1704 int endhostent_r(struct hostent_data *buffer);
1706 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) return (x)"
1707 HOST_R_END_RETURN="#define HOST_R_END_RETURN int"
1708 HOST_R_ENT_ARGS="#define HOST_R_ENT_ARGS struct hostent_data *hdptr"
1716 extern void endhostent_r(struct hostent_data *ht_data);
1718 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x)"
1719 HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
1720 HOST_R_ENT_ARGS="#define HOST_R_ENT_ARGS struct hostent_data *hdptr"
1728 extern void endhostent_r(void);
1730 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) /*empty*/"
1731 HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
1732 HOST_R_ENT_ARGS="#undef HOST_R_ENT_ARGS /*empty*/"
1738 HOST_R_END_RESULT="#define HOST_R_END_RESULT(x) /*empty*/"
1739 HOST_R_END_RETURN="#define HOST_R_END_RETURN void"
1740 HOST_R_ENT_ARGS="#undef HOST_R_ENT_ARGS /*empty*/"
1742 AC_SUBST(HOST_R_END_RESULT)
1743 AC_SUBST(HOST_R_END_RETURN)
1744 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"
1781 AC_SUBST(HOST_R_SET_RESULT)
1782 AC_SUBST(HOST_R_SET_RETURN)
1785 AC_MSG_CHECKING(struct passwd element pw_class)
1787 #include <sys/types.h>
1789 ],[struct passwd *pw; pw->pw_class = "";],
1791 AC_DEFINE(HAS_PW_CLASS)
1797 #include <sys/types.h>
1803 SETPWENT_VOID="#define SETPWENT_VOID 1"
1805 SETPWENT_VOID="#undef SETPWENT_VOID"
1807 AC_SUBST(SETPWENT_VOID)
1810 #include <sys/types.h>
1816 SETGRENT_VOID="#define SETGRENT_VOID 1"
1818 SETGRENT_VOID="#undef SETGRENT_VOID"
1820 AC_SUBST(SETGRENT_VOID)
1822 AC_CHECK_FUNC(getnetgrent_r,
1828 int getnetgrent_r(char **m, char **u, char **d, char *b, int l) {}
1833 NGR_R_ARGS="#define NGR_R_ARGS char *buf, int buflen"
1834 NGR_R_BAD="#define NGR_R_BAD (0)"
1835 NGR_R_COPY="#define NGR_R_COPY buf, buflen"
1836 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
1837 NGR_R_OK="#define NGR_R_OK 1"
1838 NGR_R_RETURN="#define NGR_R_RETURN int"
1846 int getnetgrent_r(char **m, char **u, char **d, char *b, size_t l) {}
1851 NGR_R_ARGS="#define NGR_R_ARGS char *buf, size_t buflen"
1852 NGR_R_BAD="#define NGR_R_BAD (0)"
1853 NGR_R_COPY="#define NGR_R_COPY buf, buflen"
1854 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
1855 NGR_R_OK="#define NGR_R_OK 1"
1856 NGR_R_RETURN="#define NGR_R_RETURN int"
1864 extern int getnetgrent_r( char **, char **, char **, void **);
1869 NGR_R_ARGS="#define NGR_R_ARGS void **buf"
1870 NGR_R_BAD="#define NGR_R_BAD (0)"
1871 NGR_R_COPY="#define NGR_R_COPY buf"
1872 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
1873 NGR_R_OK="#define NGR_R_OK 1"
1874 NGR_R_RETURN="#define NGR_R_RETURN int"
1875 NGR_R_PRIVATE="#define NGR_R_PRIVATE 1"
1882 NGR_R_ARGS="#define NGR_R_ARGS char *buf, int buflen"
1883 NGR_R_BAD="#define NGR_R_BAD (0)"
1884 NGR_R_COPY="#define NGR_R_COPY buf, buflen"
1885 NGR_R_COPY_ARGS="#define NGR_R_COPY_ARGS NGR_R_ARGS"
1886 NGR_R_OK="#define NGR_R_OK 1"
1887 NGR_R_RETURN="#define NGR_R_RETURN int"
1889 AC_SUBST(NGR_R_ARGS)
1891 AC_SUBST(NGR_R_COPY)
1892 AC_SUBST(NGR_R_COPY_ARGS)
1894 AC_SUBST(NGR_R_RETURN)
1895 AC_SUBST(NGR_R_PRIVATE)
1897 AC_CHECK_FUNC(endnetgrent_r,
1898 NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) return (x)"
1899 NGR_R_END_RETURN="#define NGR_R_END_RETURN int"
1900 NGR_R_ENT_ARGS="#define NGR_R_ENT_ARGS NGR_R_ARGS"
1902 NGR_R_END_RESULT="#define NGR_R_END_RESULT(x) /*empty*/"
1903 NGR_R_END_RETURN="#define NGR_R_END_RETURN void"
1904 NGR_R_ENT_ARGS="#undef NGR_R_ENT_ARGS /*empty*/"
1905 AC_DEFINE(NEED_ENDNETGRENT_R)
1907 AC_SUBST(NGR_R_END_RESULT)
1908 AC_SUBST(NGR_R_END_RETURN)
1909 AC_SUBST(NGR_R_ENT_ARGS)
1911 AC_CHECK_FUNC(setnetgrent_r,
1915 NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /*empty*/"
1916 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
1919 NGR_R_SET_RESULT="#define NGR_R_SET_RESULT NGR_R_OK"
1920 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN int"
1925 NGR_R_SET_RESULT="#undef NGR_R_SET_RESULT /*empty*/"
1926 NGR_R_SET_RETURN="#define NGR_R_SET_RETURN void"
1928 AC_SUBST(NGR_R_SET_RESULT)
1929 AC_SUBST(NGR_R_SET_RETURN)
1931 AC_CHECK_FUNC(innetgr_r,,AC_DEFINE(NEED_INNETGR_R))
1933 AC_CHECK_FUNC(getprotoent_r,
1939 struct protoent *getprotoent_r(struct protoent *result,
1940 char *buffer, int buflen) {}
1946 PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen"
1947 PROTO_R_BAD="#define PROTO_R_BAD NULL"
1948 PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
1949 PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS"
1950 PROTO_R_OK="#define PROTO_R_OK pptr"
1951 PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER"
1952 PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *"
1960 int getprotoent_r (struct protoent *, char *, size_t, struct protoent **);
1967 PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, size_t buflen, struct protoent **answerp"
1968 PROTO_R_BAD="#define PROTO_R_BAD ERANGE"
1969 PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
1970 PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS char *buf, size_t buflen"
1971 PROTO_R_OK="#define PROTO_R_OK 0"
1972 PROTO_R_SETANSWER="#define PROTO_R_SETANSWER 1"
1973 PROTO_R_RETURN="#define PROTO_R_RETURN int"
1979 PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen"
1980 PROTO_R_BAD="#define PROTO_R_BAD NULL"
1981 PROTO_R_COPY="#define PROTO_R_COPY buf, buflen"
1982 PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS"
1983 PROTO_R_OK="#define PROTO_R_OK pptr"
1984 PROTO_R_SETANSWER="#undef PROTO_R_SETANSWER"
1985 PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *"
1987 AC_SUBST(PROTO_R_ARGS)
1988 AC_SUBST(PROTO_R_BAD)
1989 AC_SUBST(PROTO_R_COPY)
1990 AC_SUBST(PROTO_R_COPY_ARGS)
1991 AC_SUBST(PROTO_R_OK)
1992 AC_SUBST(PROTO_R_SETANSWER)
1993 AC_SUBST(PROTO_R_RETURN)
1995 AC_CHECK_FUNC(endprotoent_r,
2003 void endprotoent_r(void);
2007 PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/"
2008 PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void"
2009 PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS"
2014 PROTO_R_END_RESULT="#define PROTO_R_END_RESULT(x) /*empty*/"
2015 PROTO_R_END_RETURN="#define PROTO_R_END_RETURN void"
2016 PROTO_R_ENT_ARGS="#undef PROTO_R_ENT_ARGS /*empty*/"
2018 AC_SUBST(PROTO_R_END_RESULT)
2019 AC_SUBST(PROTO_R_END_RETURN)
2020 AC_SUBST(PROTO_R_ENT_ARGS)
2022 AC_CHECK_FUNC(setprotoent_r,
2030 void setprotoent_r __P((int));
2032 PROTO_R_SET_RESULT="#undef PROTO_R_SET_RESULT"
2033 PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void"
2037 PROTO_R_SET_RESULT="#undef PROTO_R_SET_RESULT"
2038 PROTO_R_SET_RETURN="#define PROTO_R_SET_RETURN void"
2040 AC_SUBST(PROTO_R_SET_RESULT)
2041 AC_SUBST(PROTO_R_SET_RETURN)
2043 AC_CHECK_FUNC(getpwent_r,
2046 #include <sys/types.h>
2049 getpwent_r(struct passwd *pwptr, char *buf, int buflen) {}
2054 PASS_R_ARGS="#define PASS_R_ARGS char *buf, int buflen"
2055 PASS_R_BAD="#define PASS_R_BAD NULL"
2056 PASS_R_COPY="#define PASS_R_COPY buf, buflen"
2057 PASS_R_COPY_ARGS="#define PASS_R_COPY_ARGS PASS_R_ARGS"
2058 PASS_R_OK="#define PASS_R_OK pwptr"
2059 PASS_R_RETURN="#define PASS_R_RETURN struct passwd *"
2063 PASS_R_ARGS="#define PASS_R_ARGS char *buf, int buflen"
2064 PASS_R_BAD="#define PASS_R_BAD NULL"
2065 PASS_R_COPY="#define PASS_R_COPY buf, buflen"
2066 PASS_R_COPY_ARGS="#define PASS_R_COPY_ARGS PASS_R_ARGS"
2067 PASS_R_OK="#define PASS_R_OK pwptr"
2068 PASS_R_RETURN="#define PASS_R_RETURN struct passwd *"
2069 AC_DEFINE(NEED_GETPWENT_R)
2071 AC_SUBST(PASS_R_ARGS)
2072 AC_SUBST(PASS_R_BAD)
2073 AC_SUBST(PASS_R_COPY)
2074 AC_SUBST(PASS_R_COPY_ARGS)
2076 AC_SUBST(PASS_R_RETURN)
2078 AC_CHECK_FUNC(endpwent_r,
2082 void endpwent_r(FILE **pwfp);
2084 PASS_R_END_RESULT="#define PASS_R_END_RESULT(x) /*empty*/"
2085 PASS_R_END_RETURN="#define PASS_R_END_RETURN void"
2086 PASS_R_ENT_ARGS="#define PASS_R_ENT_ARGS FILE **pwptr"
2090 PASS_R_END_RESULT="#define PASS_R_END_RESULT(x) /*empty*/"
2091 PASS_R_END_RETURN="#define PASS_R_END_RETURN void"
2092 PASS_R_ENT_ARGS="#undef PASS_R_ENT_ARGS"
2093 AC_DEFINE(NEED_ENDPWENT_R)
2095 AC_SUBST(PASS_R_END_RESULT)
2096 AC_SUBST(PASS_R_END_RETURN)
2097 AC_SUBST(PASS_R_ENT_ARGS)
2098 AC_CHECK_FUNC(setpassent_r,,AC_DEFINE(NEED_SETPASSENT_R))
2099 AC_CHECK_FUNC(setpassent,,AC_DEFINE(NEED_SETPASSENT))
2101 AC_CHECK_FUNC(setpwent_r,
2104 void setpwent_r(FILE **pwfp);
2106 PASS_R_SET_RESULT="#undef PASS_R_SET_RESULT /* empty */"
2107 PASS_R_SET_RETURN="#define PASS_R_SET_RETURN int"
2111 int setpwent_r(FILE **pwfp);
2113 PASS_R_SET_RESULT="#define PASS_R_SET_RESULT 0"
2114 PASS_R_SET_RETURN="#define PASS_R_SET_RETURN int"
2119 PASS_R_SET_RESULT="#undef PASS_R_SET_RESULT /*empty*/"
2120 PASS_R_SET_RETURN="#define PASS_R_SET_RETURN void"
2121 AC_DEFINE(NEED_SETPWENT_R)
2123 AC_SUBST(PASS_R_SET_RESULT)
2124 AC_SUBST(PASS_R_SET_RETURN)
2126 AC_CHECK_FUNC(getpwnam_r,,AC_DEFINE(NEED_GETPWNAM_R))
2127 AC_CHECK_FUNC(getpwuid_r,,AC_DEFINE(NEED_GETPWUID_R))
2129 AC_CHECK_FUNC(getservent_r,
2135 getservent_r(struct servent *result, char *buffer, int buflen) {}
2138 SERV_R_ARGS="#define SERV_R_ARGS char *buf, int buflen"
2139 SERV_R_BAD="#define SERV_R_BAD NULL"
2140 SERV_R_COPY="#define SERV_R_COPY buf, buflen"
2141 SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS SERV_R_ARGS"
2142 SERV_R_OK="#define SERV_R_OK sptr"
2143 SERV_R_SETANSWER="#undef SERV_R_SETANSWER"
2144 SERV_R_RETURN="#define SERV_R_RETURN struct servent *"
2152 getservent_r (struct servent *, char *, size_t, struct servent **);
2155 SERV_R_ARGS="#define SERV_R_ARGS char *buf, size_t buflen, struct servent **answerp"
2156 SERV_R_BAD="#define SERV_R_BAD ERANGE"
2157 SERV_R_COPY="#define SERV_R_COPY buf, buflen"
2158 SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS char *buf, size_t buflen"
2159 SERV_R_OK="#define SERV_R_OK (0)"
2160 SERV_R_SETANSWER="#define SERV_R_SETANSWER 1"
2161 SERV_R_RETURN="#define SERV_R_RETURN int"
2167 SERV_R_ARGS="#define SERV_R_ARGS char *buf, int buflen"
2168 SERV_R_BAD="#define SERV_R_BAD NULL"
2169 SERV_R_COPY="#define SERV_R_COPY buf, buflen"
2170 SERV_R_COPY_ARGS="#define SERV_R_COPY_ARGS SERV_R_ARGS"
2171 SERV_R_OK="#define SERV_R_OK sptr"
2172 SERV_R_SETANSWER="#undef SERV_R_SETANSWER"
2173 SERV_R_RETURN="#define SERV_R_RETURN struct servent *"
2175 AC_SUBST(SERV_R_ARGS)
2176 AC_SUBST(SERV_R_BAD)
2177 AC_SUBST(SERV_R_COPY)
2178 AC_SUBST(SERV_R_COPY_ARGS)
2180 AC_SUBST(SERV_R_SETANSWER)
2181 AC_SUBST(SERV_R_RETURN)
2183 AC_CHECK_FUNC(endservent_r,
2191 void endservent_r(void);
2196 SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/"
2197 SERV_R_END_RETURN="#define SERV_R_END_RETURN void "
2198 SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/"
2203 SERV_R_END_RESULT="#define SERV_R_END_RESULT(x) /*empty*/"
2204 SERV_R_END_RETURN="#define SERV_R_END_RETURN void "
2205 SERV_R_ENT_ARGS="#undef SERV_R_ENT_ARGS /*empty*/"
2207 AC_SUBST(SERV_R_END_RESULT)
2208 AC_SUBST(SERV_R_END_RETURN)
2209 AC_SUBST(SERV_R_ENT_ARGS)
2211 AC_CHECK_FUNC(setservent_r,
2219 void setservent_r(int);
2223 SERV_R_SET_RESULT="#undef SERV_R_SET_RESULT"
2224 SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void"
2229 SERV_R_SET_RESULT="#undef SERV_R_SET_RESULT"
2230 SERV_R_SET_RETURN="#define SERV_R_SET_RETURN void"
2232 AC_SUBST(SERV_R_SET_RESULT)
2233 AC_SUBST(SERV_R_SET_RETURN)
2243 int innetgr(const char *netgroup, const char *host, const char *user, const char *domain);
2247 INNETGR_ARGS="#undef INNETGR_ARGS"
2258 int innetgr(char *netgroup, char *host, char *user, char *domain);
2262 INNETGR_ARGS="#define INNETGR_ARGS char *netgroup, char *host, char *user, char *domain"
2275 void setnetgrent(const char *);
2279 SETNETGRENT_ARGS="#undef SETNETGRENT_ARGS"
2290 void setnetgrent(char *);
2294 SETNETGRENT_ARGS="#define SETNETGRENT_ARGS char *netgroup"
2298 AC_SUBST(SETNETGRENT_ARGS)
2299 AC_SUBST(INNETGR_ARGS)
2302 # Random remaining OS-specific issues involving compiler warnings.
2303 # XXXDCL print messages to indicate some compensation is being done?
2305 BROKEN_IN6ADDR_INIT_MACROS="#undef BROKEN_IN6ADDR_INIT_MACROS"
2309 hack_shutup_pthreadmutexinit=yes
2310 hack_shutup_in6addr_init_macros=yes
2313 hack_shutup_sputaux=yes
2316 hack_shutup_sigwait=yes
2317 hack_shutup_sputaux=yes
2318 hack_shutup_in6addr_init_macros=yes
2321 hack_shutup_stdargcast=yes
2324 hack_shutup_in6addr_init_macros=yes
2327 hack_shutup_in6addr_init_macros=yes
2330 hack_shutup_pthreadmutexinit=yes
2331 hack_shutup_in6addr_init_macros=yes
2334 hack_shutup_in6addr_init_macros=yes
2338 case "$hack_shutup_pthreadmutexinit" in
2341 # Shut up PTHREAD_MUTEX_INITIALIZER unbraced
2342 # initializer warnings.
2344 AC_DEFINE(SHUTUP_MUTEX_INITIALIZER)
2348 case "$hack_shutup_sigwait" in
2351 # Shut up a -Wmissing-prototypes warning for sigwait().
2353 AC_DEFINE(SHUTUP_SIGWAIT)
2357 case "$hack_shutup_sputaux" in
2360 # Shut up a -Wmissing-prototypes warning from <stdio.h>.
2362 AC_DEFINE(SHUTUP_SPUTAUX)
2366 case "$hack_shutup_stdargcast" in
2369 # Shut up a -Wcast-qual warning from va_start().
2371 AC_DEFINE(SHUTUP_STDARG_CAST)
2375 case "$hack_shutup_in6addr_init_macros" in
2377 AC_DEFINE(BROKEN_IN6ADDR_INIT_MACROS)
2384 AC_SUBST(BIND9_TOP_BUILDDIR)
2385 BIND9_TOP_BUILDDIR=`pwd`
2387 AC_SUBST_FILE(BIND9_INCLUDES)
2388 BIND9_INCLUDES=$BIND9_TOP_BUILDDIR/make/includes
2390 AC_SUBST_FILE(BIND9_MAKE_RULES)
2391 BIND9_MAKE_RULES=$BIND9_TOP_BUILDDIR/make/rules
2393 . $srcdir/../../version
2394 BIND9_VERSION="VERSION=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
2395 AC_SUBST(BIND9_VERSION)
2397 AC_SUBST_FILE(LIBBIND_API)
2398 LIBBIND_API=$srcdir/api
2416 ${PORT_DIR}/Makefile
2417 ${PORT_INCLUDE}/Makefile
2420 # Tell Emacs to edit this file in shell mode.