/contrib/ntp/configure.ac
https://bitbucket.org/freebsd/freebsd-head/ · m4 · 4667 lines · 3824 code · 400 blank · 443 comment · 0 complexity · 6632014c43722c45fffbcdf4bfaef288 MD5 · raw file
Large files are truncated click here to view the full file
- dnl -*-fundamental-*-
- dnl Process this file with autoconf to produce a configure script.
- m4_include([version.m4])
- AC_INIT(ntp, VERSION_NUMBER)
- AM_INIT_AUTOMAKE
- AC_CANONICAL_HOST
- dnl the 'build' machine is where we run configure and compile
- dnl the 'host' machine is where the resulting stuff runs.
- AC_DEFINE_UNQUOTED(STR_SYSTEM, "$host", [canonical system (cpu-vendor-os) of where we should run])
- AM_CONFIG_HEADER([config.h])
- dnl AC_ARG_PROGRAM
- AC_PREREQ(2.53)
- ac_cv_var_atom_ok=no
- ac_cv_var_oncore_ok=no
- ac_cv_var_parse_ok=no
- ac_cv_var_ripe_ncc_ok=no
- ac_cv_var_jupiter_ok=no
- dnl Grab any initial CFLAGS so we can pick better defaults.
- iCFLAGS="$CFLAGS"
- dnl check these early to avoid autoconf warnings
- AC_AIX
- AC_MINIX
- # So far, the only shared library we might use is libopts.
- # It's a small library - we might as well use a static version of it.
- AC_DISABLE_SHARED
- dnl we need to check for cross compile tools for vxWorks here
- AC_PROG_CC
- # Ralf Wildenhues: With per-target flags we need CC_C_O
- # AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
- AM_PROG_CC_C_O
- AC_PROG_CC_STDC
- AC_PROG_CPP
- # HMS: These need to be moved to AM_CPPFLAGS and/or AM_CFLAGS
- case "$host" in
- *-*-amigaos)
- CFLAGS="$CFLAGS -Dfork=vfork -DSYS_AMIGA"
- ;;
- *-*-hpux10.*) # at least for hppa2.0-hp-hpux10.20
- case "$GCC" in
- yes)
- ;;
- *) CFLAGS="$CFLAGS -Wp,-H18816"
- ;;
- esac
- ;;
- *-pc-cygwin*)
- CFLAGS="$CFLAGS -DSYS_CYGWIN32"
- ;;
- i386-sequent-sysv4)
- case "$CC" in
- cc)
- CFLAGS="$CFLAGS -Wc,+abi-socket"
- ;;
- esac
- ;;
- *-*-mpeix*)
- CPPFLAGS="$CPPFLAGS -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB"
- LDFLAGS="$LDFLAGS -L/SYSLOG/PUB"
- LIBS="$LIBS -lcurses"
- ;;
- *-*-solaris*)
- # see "man standards".
- # -D_XOPEN_SOURCE=500 is probably OK for c89 and before
- # -D_XOPEN_SOURCE=600 seems OK for c99
- #CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
- CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
- libxnet=-lxnet
- ;;
- esac
- AMU_OS_CFLAGS
- # NTP has (so far) been relying on leading-edge autogen.
- # Therefore, by default:
- # - use the version we ship with
- # - do not install it
- # - build a static copy (AC_DISABLE_SHARED - done earlier)
- case "${enable_local_libopts+set}" in
- set) ;;
- *) enable_local_libopts=yes ;;
- esac
- case "${enable_libopts_install+set}" in
- set) ;;
- *) enable_libopts_install=no ;;
- esac
- LIBOPTS_CHECK(libopts)
- AC_CACHE_CHECK(
- [if $CC can handle @%:@warning],
- ac_cv_cpp_warning,
- [
- AC_COMPILE_IFELSE(
- AC_LANG_PROGRAM([], [#warning foo]),
- [ac_cv_cpp_warning=yes],
- [ac_cv_cpp_warning=no],
- )
- ]
- )
- case "$ac_cv_cpp_warning" in
- no)
- AC_DEFINE([NO_OPTION_NAME_WARNINGS], [1], [Should we avoid @%:@warning on option name collisions?])
- esac
- case "$GCC" in
- yes)
- SAVED_CFLAGS_AC="$CFLAGS"
- CFLAGS="$CFLAGS -Wstrict-overflow"
- AC_CACHE_CHECK(
- [if $CC can handle -Wstrict-overflow],
- ac_cv_gcc_Wstrict_overflow,
- [
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([], [])],
- [ac_cv_gcc_Wstrict_overflow=yes],
- [ac_cv_gcc_Wstrict_overflow=no]
- )
- ]
- )
- CFLAGS="$SAVED_CFLAGS_AC"
- unset SAVED_CFLAGS_AC
- #
- # $ac_cv_gcc_Wstrict_overflow is tested later to add the
- # flag to CFLAGS.
- #
- esac
- case "$GCC" in
- yes)
- SAVED_CFLAGS_AC="$CFLAGS"
- CFLAGS="$CFLAGS -Winit-self"
- AC_CACHE_CHECK(
- [if $CC can handle -Winit-self],
- ac_cv_gcc_Winit_self,
- [
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([], [])],
- [ac_cv_gcc_Winit_self=yes],
- [ac_cv_gcc_Winit_self=no]
- )
- ]
- )
- CFLAGS="$SAVED_CFLAGS_AC"
- unset SAVED_CFLAGS_AC
- #
- # $ac_cv_gcc_Winit_self is tested later to add the
- # flag to CFLAGS.
- #
- esac
- AC_MSG_CHECKING([for bin subdirectory])
- AC_ARG_WITH(binsubdir,
- AC_HELP_STRING([--with-binsubdir], [bin ={bin,sbin}]),
- use_binsubdir="$withval", use_binsubdir="bin")
- case "$use_binsubdir" in
- bin)
- ;;
- sbin)
- ;;
- *)
- AC_MSG_ERROR([<$use_binsubdir> is illegal - must be "bin" or "sbin"])
- ;;
- esac
- AC_MSG_RESULT($use_binsubdir)
- BINSUBDIR=$use_binsubdir
- AC_SUBST(BINSUBDIR)
- AC_MSG_CHECKING([if we want to use arlib])
- AC_ARG_WITH(arlib,
- AC_HELP_STRING([--with-arlib], [- Compile the async resolver library?]),
- [ans=$withval], [ans=no])
- AC_MSG_RESULT([$ans])
- if test -d $srcdir/arlib
- then
- case "$ans" in
- yes)
- ARLIB_DIR=arlib
- AC_CONFIG_SUBDIRS(arlib)
- ;;
- esac
- fi
- AC_SUBST(ARLIB_DIR)
- AC_ARG_WITH(rpath,
- AC_HELP_STRING([--without-rpath], [s Disable auto-added -R linker paths]),
- [ans=$withval], [ans=x])
- case "$ans" in
- no)
- need_dash_r=
- ;;
- yes)
- need_dash_r=1
- ;;
- esac
- # HMS: Why isn't this $build?
- # Well, that depends on if we need this for the build toolchain or
- # for info in the host executable...
- # I still have no idea which way this should go, but nobody has complained.
- case "$host" in
- *-*-netbsd*)
- case "$need_dash_r" in
- no) ;;
- *) need_dash_r=1
- ;;
- esac
- ;;
- *-*-solaris*)
- case "$need_dash_r" in
- no) ;;
- *) need_dash_r=1
- ;;
- esac
- ;;
- esac
- case "$build" in
- $host)
- ;;
- *) case "$host" in
- *-*-vxworks*)
- # Quick and dirty sanity check
- case "$VX_KERNEL" in
- '') AC_MSG_ERROR(Please follow the directions in html/build/hints/vxworks.html!)
- ;;
- esac
- CFLAGS="$CFLAGS -DSYS_VXWORKS"
- ;;
- esac
- ;;
- esac
- dnl we need to check for cross compile tools for vxWorks here
- AC_PROG_AWK
- AC_PROG_MAKE_SET
- rm -f conftest*
- case "$GCC" in
- yes)
- CFLAGS="$CFLAGS -Wall"
- # CFLAGS="$CFLAGS -Wcast-align"
- CFLAGS="$CFLAGS -Wcast-qual"
- # CFLAGS="$CFLAGS -Wconversion"
- # CFLAGS="$CFLAGS -Werror"
- # CFLAGS="$CFLAGS -Wextra"
- # CFLAGS="$CFLAGS -Wfloat-equal"
- CFLAGS="$CFLAGS -Wmissing-prototypes"
- CFLAGS="$CFLAGS -Wpointer-arith"
- CFLAGS="$CFLAGS -Wshadow"
- #
- # OpenSSL has a number of callback prototypes
- # inside other function prototypes which trigger
- # warnings with -Wstrict-prototypes, such as:
- #
- # int i2d_RSA_NET(const RSA *a, unsigned char **pp,
- # int (*cb)(), int sgckey);
- # ^^^^^^^^^^^
- #
- CFLAGS="$CFLAGS -Wno-strict-prototypes"
- # CFLAGS="$CFLAGS -Wtraditional"
- # CFLAGS="$CFLAGS -Wwrite-strings"
- case "$ac_cv_gcc_Winit_self" in
- yes)
- CFLAGS="$CFLAGS -Winit-self"
- esac
- case "$ac_cv_gcc_Wstrict_overflow" in
- yes)
- #not yet: CFLAGS="$CFLAGS -Wstrict-overflow"
- esac
- ;;
- esac
- case "$host" in
- *-next-nextstep3)
- CFLAGS="$CFLAGS -posix"
- ;;
- dnl This is currently commented out by bor.
- dnl The new versions of ReliantUNIX round adjtime() interval down
- dnl to 1/100s (system tick). This makes tickadj actually useless.
- dnl So, I'd better not use additional flags.
- dnl I leave it here just in case anybody has better idea
- dnl mips-sni-sysv4* )
- dnl #
- dnl # Add flags for 64 bit file access to enable tickadj to access /dev/kmem
- dnl #
- dnl if getconf _LFS_CFLAGS > /dev/null 2>&1 ; then
- dnl CFLAGS="$CFLAGS `getconf _LFS_CFLAGS`"
- dnl fi
- dnl ;;
- esac
- ac_busted_vpath_in_make=no
- case "$build" in
- *-*-irix6.1*) # 64 bit only
- # busted vpath?
- ;;
- *-*-irix6*) # 6.2 (and later?)
- ac_busted_vpath_in_make=yes
- ;;
- *-*-solaris2.5.1)
- ac_busted_vpath_in_make=yes
- ;;
- *-*-unicosmp*)
- ac_busted_vpath_in_make=yes
- ;;
- esac
- case "$ac_busted_vpath_in_make$srcdir" in
- no*) ;;
- yes.) ;;
- *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | sed -e 's/GNU Make version \(1-9.]*\).*/\1/' -e q`" in
- '')
- AC_MSG_ERROR([building outside of the main directory requires GNU make])
- ;;
- *) ;;
- esac
- ;;
- esac
- AC_SUBST(CFLAGS)dnl
- AC_SUBST(LDFLAGS)dnl
- m4_defun([_LT_AC_LANG_CXX_CONFIG], [:])
- m4_defun([_LT_AC_LANG_F77_CONFIG], [:])
- AC_PROG_LIBTOOL
- AC_PROG_LN_S
- AC_PROG_GCC_TRADITIONAL
- AC_C_VOLATILE
- AC_ISC_POSIX
- AC_PATH_PROG(PATH_SH, sh)
- AC_PATH_PROG(PATH_PERL, perl)
- hs_ULONG_CONST # remove for 4.2.5
- case "$host" in
- *-*-vxworks*)
- ac_link="$ac_link $VX_KERNEL"
- ;;
- esac
- AC_PROG_INSTALL
- case "$host" in
- *-pc-cygwin*)
- AC_CHECK_LIB(advapi32, main)
- ;;
- esac
- AC_CHECK_FUNC([gethostent], ,
- AC_SEARCH_LIBS([gethostent], [nsl], , , [$libxnet -lsocket]))
- AC_CHECK_FUNC([openlog], ,
- AC_SEARCH_LIBS([openlog], [gen], ,
- AC_SEARCH_LIBS([openlog], [syslog], , , [$libxnet -lsocket])))
- AC_SEARCH_LIBS([MD5Init], [md5 md])
- AC_CHECK_FUNCS(MD5Init)
- # following block becomes on 4.2.5: NTP_LINEEDITLIBS
- dnl HMS: What a hack...
- AC_CHECK_HEADERS(readline/history.h readline/readline.h)
- case "$ac_cv_header_readline_history_h$ac_cv_header_readline_readline_h" in
- *no*) ;;
- *) save_LIBS=$LIBS
- LIBS=
- # Ralf Wildenhues: either unset ... or cache READLINE_LIBS
- unset ac_cv_lib_readline_readline
- AC_CHECK_LIB(readline, readline, ,
- AC_MSG_NOTICE([Trying again with -lcurses])
- unset ac_cv_lib_readline_readline
- AC_CHECK_LIB(readline, readline,
- LIBS="-lreadline -lcurses $LIBS"
- AC_DEFINE(HAVE_LIBREADLINE)
- AC_DEFINE(HAVE_LIBCURSES, , [Do we have the curses library?]),
- AC_CHECK_LIB(edit, readline,
- LIBS="-ledit -lcurses"
- AC_DEFINE(HAVE_LIBEDIT, , [Do we have the edit library?])
- AC_DEFINE(HAVE_LIBCURSES, , [Do we have the curses library?])
- , , -lcurses)
- , -lcurses))
- READLINE_LIBS=$LIBS
- AC_SUBST(READLINE_LIBS)
- LIBS=$save_LIBS
- ;;
- esac
- dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt
- dnl Solaris 2.6 only has -lposix4; in Solaris 7, this is a symlink to -lrt,
- dnl so only use one of them. Linux (glibc-2.1.2 and -2.2.2, at least)
- dnl does Strange Things with extra processes using the Posix-compatibility
- dnl real-time library, so we don't want to use it.
- case "$host" in
- *-*-*linux*) ;;
- *)
- AC_CHECK_LIB(rt, sched_setscheduler, ,
- AC_CHECK_LIB(posix4, sched_setscheduler))
- ;;
- esac
- AC_CHECK_FUNC(setsockopt, ,
- [AC_SEARCH_LIBS([setsockopt], [socket xnet])])
- AC_HEADER_STDC
- AC_CHECK_HEADERS(bstring.h)
- AC_CHECK_HEADER(dns_sd.h,
- [AC_CHECK_LIB(dns_sd,
- DNSServiceRegister,
- [AC_DEFINE(HAVE_DNSREGISTRATION, 1,
- [Use Rendezvous/DNS-SD registration])])])
- case "$ac_cv_lib_dns_sd_DNSServiceRegister" in
- yes) LIBS="-ldns_sd $LIBS" ;;
- esac
- AC_CHECK_HEADERS(errno.h fcntl.h ieeefp.h math.h)
- # HMS: Lame, but fast.
- if test -f /etc/redhat-release
- then
- :
- else
- AC_CHECK_HEADERS(md5.h, [], [],
- [#if HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
- ])
- fi
- AC_CHECK_HEADERS(memory.h netdb.h poll.h)
- AC_CHECK_HEADERS(sched.h sgtty.h stdlib.h string.h termio.h)
- AC_CHECK_HEADERS(termios.h timepps.h timex.h unistd.h)
- case "$host" in
- *-*-aix*)
- AC_CHECK_HEADERS(utmpx.h)
- case "$ac_cv_header_utmpx_h" in
- yes) ;;
- *) AC_CHECK_HEADERS(utmp.h) ;;
- esac
- ;;
- *) AC_CHECK_HEADERS(utmp.h utmpx.h) ;;
- esac
- AC_CHECK_HEADERS(arpa/nameser.h)
- AC_CHECK_HEADERS(sys/socket.h)
- AC_CHECK_HEADERS(net/if.h, [], [],
- [#if HAVE_SYS_SOCKET_H
- #include <sys/socket.h>
- #endif
- ])
- AC_CHECK_HEADERS(net/if6.h)
- AC_CHECK_HEADERS(net/route.h, [], [], [
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <net/if.h>
- ])
- AC_CHECK_HEADERS(netinet/in_system.h netinet/in_systm.h)
- AC_CHECK_HEADERS(netinet/in.h)
- AC_CHECK_HEADERS(netinet/ip.h, [], [],
- [#if HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
- #if HAVE_NETINET_IN_H
- #include <netinet/in.h>
- #endif
- #if HAVE_NETINET_IN_SYSTM_H
- #include <netinet/in_systm.h>
- #endif
- ])
- # Check for IPTOS_PREC
- AC_CACHE_CHECK(
- [IPPROTO_IP IP_TOS IPTOS_LOWDELAY],
- ac_cv_ip_tos,
- [
- AC_EGREP_CPP(
- [yes],
- [
- #if HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
- #if HAVE_NETINET_IP_H
- #include <netinet/in.h>
- #include <netinet/ip.h>
- #endif
- #if defined(IPPROTO_IP) && defined(IP_TOS) && defined(IPTOS_LOWDELAY)
- yes
- #endif
- ],
- [ac_cv_ip_tos=yes],
- [ac_cv_ip_tos=no]
- )
- ]
- )
- case "$ac_cv_ip_tos" in
- yes)
- AC_DEFINE(HAVE_IPTOS_SUPPORT, 1, [Do we have IPTOS support?])
- esac
- AC_CHECK_HEADERS(netinfo/ni.h, [AC_DEFINE(HAVE_NETINFO, 1, [NetInfo support?])])
- AC_CHECK_HEADERS(sun/audioio.h sys/audioio.h)
- dnl AC_CHECK_HEADERS(sys/chudefs.h)
- AC_CHECK_HEADERS(sys/clkdefs.h sys/file.h)
- case "$host" in
- *-*-sunos4*) ;;
- *) AC_CHECK_HEADERS(sys/ioctl.h)
- ;;
- esac
- AC_CHECK_HEADERS(sys/ipc.h)
- AC_CHECK_HEADERS(sys/lock.h sys/mman.h sys/modem.h sys/param.h sys/ppsclock.h)
- # HMS: Check sys/proc.h and sys/resource.h after some others
- AC_CHECK_HEADERS(sys/ppstime.h)
- case "$ac_cv_header_sched_h" in
- yes) ;;
- *) AC_CHECK_HEADERS(sys/sched.h) ;;
- esac
- case "$host" in
- *-*-sco*)
- AC_CHECK_HEADERS(sys/sio.h)
- ;;
- esac
- # HMS: Check sys/shm.h after some others
- AC_CHECK_HEADERS(sys/select.h sys/signal.h sys/sockio.h)
- # HMS: Checked sys/socket.h earlier
- case "$host" in
- *-*-netbsd*) ;;
- *) AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h)
- ;;
- esac
- AC_CHECK_HEADERS(sys/stat.h sys/stream.h)
- AC_CHECK_HEADERS(sys/stropts.h sys/sysctl.h sys/syssgi.h sys/systune.h)
- AC_CHECK_HEADERS(sys/termios.h sys/time.h sys/signal.h)
- AC_EGREP_CPP(yes,
- [#if HAVE_SYS_TIME_H
- # include <sys/time.h>
- #endif
- #if HAVE_ERRNO_H
- # include <errno.h>
- #endif
- #include <sys/timepps.h>
- #ifdef PPS_API_VERS_1
- yes
- #endif
- ], [AC_CHECK_HEADERS(sys/timepps.h, [], [],
- [#if HAVE_SYS_TIME_H
- # include <sys/time.h>
- #endif
- #if HAVE_ERRNO_H
- # include <errno.h>
- #endif
- ])
- ])
- AC_CHECK_HEADERS(sys/timers.h sys/tpro.h sys/types.h sys/wait.h)
- AC_HEADER_TIME
- case "$host" in
- *-convex-*)
- AC_CHECK_HEADERS(/sys/sync/queue.h /sys/sync/sema.h)
- ;;
- *-*-bsdi*)
- AC_CHECK_HEADERS(machine/inline.h sys/pcl720.h sys/i8253.h)
- ;;
- esac
- case "$host" in
- *-*-*linux*)
- AC_CHECK_FUNCS(__adjtimex __ntp_gettime)
- ;;
- esac
- case "$ac_cv_func___adjtimex" in
- yes) ;;
- *)
- AC_CHECK_LIB(elf, nlist) dnl Only needed for tickadj...
- dnl AC_CHECK_LIB(kvm, main, , , -lelf)
- AC_CHECK_LIB(kvm, main) dnl We already know about -lelf here...
- AC_CHECK_LIB(ld, nlist)
- AC_CHECK_LIB(mld, nlist)
- AC_CHECK_HEADER(nlist.h,
- [AC_DEFINE(NLIST_STRUCT, 1, [nlist stuff])
- AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
- [AC_TRY_COMPILE([#include <nlist.h>],
- [struct nlist n; n.n_un.n_name = 0;],
- ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
- if test $ac_cv_struct_nlist_n_un = yes; then
- AC_DEFINE(NLIST_NAME_UNION, 1, [does struct nlist use a name union?])
- fi
- ])dnl
- ;;
- esac
- dnl AC_CHECK_HEADERS(net/if.h, [], [],
- dnl [#if HAVE_SYS_TYPES_H
- dnl # include <sys/types.h>
- dnl #endif
- dnl #if HAVE_SYS_SOCKET_H
- dnl # include <sys/socket.h>
- dnl #endif
- dnl ])
- AC_CHECK_HEADERS(sys/proc.h, [], [],
- [#if HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #if HAVE_SYS_TIME_H
- # include <sys/time.h>
- #endif
- ])
- AC_CHECK_HEADERS(sys/resource.h, [], [],
- [#if HAVE_SYS_TIME_H
- # include <sys/time.h>
- #endif
- ])
- AC_CHECK_HEADERS(sys/shm.h, [], [],
- [#if HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #if HAVE_SYS_IPC_H
- # include <sys/ipc.h>
- #endif
- ])
- AC_CHECK_HEADERS(sys/timex.h, [], [],
- [#if HAVE_SYS_TIME_H
- # include <sys/time.h>
- #endif
- ])
- AC_CHECK_HEADERS(resolv.h, [], [],
- [#if HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
- #if HAVE_NETINET_IN_H
- #include <netinet/in.h>
- #endif
- #if HAVE_ARPA_NAMESER_H
- #include <arpa/nameser.h>
- #endif
- ])
- AC_CACHE_CHECK([for basic volatile support], ac_cv_c_volatile,
- [AC_TRY_COMPILE([],[
- volatile int x;],
- ac_cv_c_volatile=yes,
- ac_cv_c_volatile=no)
- ])
- case "$ac_cv_c_volatile" in
- yes)
- ;;
- *) AC_DEFINE(volatile, , [Does the compiler like "volatile"?])
- ;;
- esac
- #
- # following block goes away in 4.2.5
- #
- # AM_C_PROTOTYPES gives us ansi2knr
- case "$build" in
- *-*-solaris2*)
- # Assume that solaris2 is Ansi C...
- ;;
- *)
- AM_C_PROTOTYPES
- ;;
- esac
- AC_CACHE_CHECK(if C compiler permits function prototypes, ac_cv_have_prototypes,
- [AC_TRY_COMPILE([
- extern int foo (short);
- int foo(short i) { return i; }],[
- int i;], ac_cv_have_prototypes=yes, ac_cv_have_prototypes=no)
- ])
- if test "$ac_cv_have_prototypes" = yes; then
- AC_DEFINE(HAVE_PROTOTYPES, 1, [Are function prototypes OK?])
- fi
- #
- # end block
- #
- AC_C_CONST
- AC_C_BIGENDIAN
- AC_TYPE_SIGNAL
- AC_TYPE_OFF_T
- AC_TYPE_SIZE_T
- AC_CHECK_TYPE(time_t, long)
- AC_CHECK_SIZEOF(time_t)
- AC_CHECK_TYPES(uintptr_t)
-
- AH_VERBATIM([TYPEDEF_UINTPTR_T],
- [/* Provide a typedef for uintptr_t? */
- #ifndef HAVE_UINTPTR_T
- typedef unsigned int uintptr_t;
- #define HAVE_UINTPTR_T 1
- #endif])
- AC_STRUCT_TM
- AC_CACHE_CHECK([for u_int8_t], ac_cv_type_u_int8_t,
- [AC_TRY_COMPILE([#include <sys/types.h>],
- [u_int8_t len = 42; return 0;],
- ac_cv_type_u_int8_t=yes,
- ac_cv_type_u_int8_t=no)
- ])
- if test $ac_cv_type_u_int8_t = yes; then
- AC_DEFINE(HAVE_TYPE_U_INT8_T, 1, [Does u_int8_t exist?])
- fi
- AC_CACHE_CHECK([for u_int64_t], ac_cv_type_u_int64_t,
- [AC_TRY_COMPILE([#include <sys/types.h>],
- [u_int64_t len = 42; return 0;],
- ac_cv_type_u_int64_t=yes,
- ac_cv_type_u_int64_t=no)
- ])
- if test $ac_cv_type_u_int64_t = yes; then
- AC_DEFINE(HAVE_TYPE_U_INT64_T, 1, [Does u_int64_t exist?])
- fi
- #
- # Look for in_port_t.
- #
- AC_MSG_CHECKING([for in_port_t])
- AC_TRY_COMPILE([
- #include <sys/types.h>
- #include <netinet/in.h>],
- [in_port_t port = 25; return (0);],
- [AC_MSG_RESULT(yes)
- ],
- [AC_MSG_RESULT(no)
- AC_DEFINE(ISC_PLATFORM_NEEDPORTT, 1, [Do we need our own in_port_t?])
- ])
- AC_CACHE_CHECK([for a fallback value for HZ], ac_cv_var_default_hz,
- [ac_cv_var_default_hz=100
- case "$host" in
- alpha*-dec-osf4*|alpha*-dec-osf5*)
- ac_cv_var_default_hz=1024
- ;;
- mips-dec-ultrix4*)
- ac_cv_var_default_hz=256
- ;;
- esac])
- AC_DEFINE_UNQUOTED(DEFAULT_HZ, $ac_cv_var_default_hz, [What is the fallback value for HZ?])
- AC_CACHE_CHECK([if we need to override the system's value for HZ], ac_cv_var_override_hz,
- [ac_cv_var_override_hz=no
- case "$host" in
- alpha*-dec-osf4*|alpha*-dec-osf5*)
- ac_cv_var_override_hz=yes
- ;;
- mips-dec-ultrix4*)
- ac_cv_var_override_hz=yes
- ;;
- *-*-freebsd*)
- ac_cv_var_override_hz=yes
- ;;
- *-*-sunos4*)
- ac_cv_var_override_hz=yes
- ;;
- esac])
- case "$ac_cv_var_override_hz" in
- yes)
- AC_DEFINE(OVERRIDE_HZ, 1, [Do we need to override the system's idea of HZ?])
- ;;
- esac
- dnl AC_CACHE_CHECK(ut_host in struct utmp, ac_cv_func_ut_host_in_utmp,
- dnl [AC_TRY_LINK([#include <sys/types.h>
- dnl #include <utmp.h>], [struct utmp ut; ut.ut_host;],
- dnl ac_cv_func_ut_host_in_utmp=yes, ac_cv_func_ut_host_in_utmp=no)])
- dnl if test $su_cv_func_ut_host_in_utmp = yes; then
- dnl AC_DEFINE(HAVE_UT_HOST)
- dnl fi
- dnl AC_MSG_CHECKING(if we can get the system boot time)
- dnl AC_CACHE_VAL(su_cv_have_boot_time,
- dnl [AC_EGREP_CPP(yes,
- dnl [#ifdef HAVE_UTMPX_H
- dnl #include <utmpx.h>
- dnl #else
- dnl #include <utmp.h>
- dnl #endif
- dnl #ifdef BOOT_TIME
- dnl yes
- dnl #endif
- dnl ], su_cv_have_boot_time=yes, su_cv_have_boot_time=no)])
- dnl AC_MSG_RESULT($su_cv_have_boot_time)
- AC_CACHE_CHECK([for struct rt_msghdr], ac_cv_struct_rt_msghdr,
- [AC_TRY_COMPILE([
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <net/if.h>
- #include <net/route.h>],
- [struct rt_msghdr p;],
- ac_cv_struct_rt_msghdr=yes,
- ac_cv_struct_rt_msghdr=no)
- ])
- if test $ac_cv_struct_rt_msghdr = yes; then
- AC_DEFINE(HAS_ROUTING_SOCKET, 1, [Do we have a routing socket (struct rt_msghdr)?])
- fi
- AC_CACHE_CHECK(
- [struct sigaction for sa_sigaction],
- ac_cv_struct_sigaction_has_sa_sigaction,
- [
- AC_TRY_COMPILE(
- [#include <signal.h>],
- [struct sigaction act; act.sa_sigaction = 0;],
- ac_cv_struct_sigaction_has_sa_sigaction=yes,
- ac_cv_struct_sigaction_has_sa_sigaction=no
- )
- ]
- )
- if test $ac_cv_struct_sigaction_has_sa_sigaction = yes; then
- AC_DEFINE(HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION, 1, [Obvious...])
- fi
- AC_CACHE_CHECK([for struct ppsclockev], ac_cv_struct_ppsclockev,
- [AC_TRY_COMPILE([
- #include <sys/types.h>
- #ifdef HAVE_SYS_TERMIOS_H
- # include <sys/termios.h>
- #endif
- #ifdef HAVE_SYS_TIME_H
- # include <sys/time.h>
- #endif
- #ifdef HAVE_SYS_PPSCLOCK_H
- # include <sys/ppsclock.h>
- #endif],[
- extern struct ppsclockev *pce;
- return pce->serial;],
- ac_cv_struct_ppsclockev=yes,
- ac_cv_struct_ppsclockev=no)
- ])
- if test $ac_cv_struct_ppsclockev = yes; then
- AC_DEFINE(HAVE_STRUCT_PPSCLOCKEV, 1, [Does a system header define struct ppsclockev?])
- fi
- AC_CACHE_CHECK([struct sockaddr for sa_len], ac_cv_struct_sockaddr_has_sa_len,
- [AC_TRY_COMPILE([
- #include <sys/types.h>
- #include <sys/socket.h>],[
- extern struct sockaddr *ps;
- return ps->sa_len;],
- ac_cv_struct_sockaddr_has_sa_len=yes,
- ac_cv_struct_sockaddr_has_sa_len=no)
- ])
- if test $ac_cv_struct_sockaddr_has_sa_len = yes; then
- AC_DEFINE(HAVE_SA_LEN_IN_STRUCT_SOCKADDR, 1, [Should be obvious...])
- fi
- AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage,
- [AC_TRY_COMPILE([
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- ],[
- struct sockaddr_storage n;],
- ac_cv_struct_sockaddr_storage=yes,
- ac_cv_struct_sockaddr_storage=no)
- ])
- if test $ac_cv_struct_sockaddr_storage = yes; then
- AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1, [Does a system header define struct sockaddr_storage?])
- fi
- AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
- ac_cv_have_ss_family_in_struct_ss, [
- AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- #include <sys/socket.h>
- ],
- [ struct sockaddr_storage s; s.ss_family = 1; ],
- [ ac_cv_have_ss_family_in_struct_ss="yes" ],
- [ ac_cv_have_ss_family_in_struct_ss="no" ],
- )
- ])
- if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
- AC_DEFINE(HAVE_SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have ss_family?])
- else
- # Hack around a problem...
- # HMS: This is $host because we need the -D if we are building *for* it.
- # HMS: 061029: Now that we separate the ss_* checks this is causing
- # a problem - disable it until we get to the bottom of it.
- case "$host" in
- XXX*-*-hpux11.11) CPPFLAGS="$CPPFLAGS -D_NETINET_IN6_H"
- ;;
- esac
- fi
- AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
- ac_cv_have___ss_family_in_struct_ss, [
- AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- #include <sys/socket.h>
- ],
- [ struct sockaddr_storage s; s.__ss_family = 1; ],
- [ ac_cv_have___ss_family_in_struct_ss="yes" ],
- [ ac_cv_have___ss_family_in_struct_ss="no" ]
- )
- ])
- if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
- AC_DEFINE(HAVE___SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have __ss_family?])
- fi
- AH_VERBATIM([X_HAVE_SS_FAMILY_IN_SS],
- [/* Handle ss_family */
- #if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS)
- # define ss_family __ss_family
- #endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */])
- AC_CACHE_CHECK([for ss_len field in struct sockaddr_storage],
- ac_cv_have_ss_len_in_struct_ss, [
- AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- #include <sys/socket.h>
- ],
- [ struct sockaddr_storage s; s.ss_len = 1; ],
- [ ac_cv_have_ss_len_in_struct_ss="yes" ],
- [ ac_cv_have_ss_len_in_struct_ss="no" ],
- )
- ])
- if test "x$ac_cv_have_ss_len_in_struct_ss" = "xyes" ; then
- AC_DEFINE(HAVE_SS_LEN_IN_SS, 1, [Does struct sockaddr_storage have ss_len?])
- fi
- AC_CACHE_CHECK([for __ss_len field in struct sockaddr_storage],
- ac_cv_have___ss_len_in_struct_ss, [
- AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- #include <sys/socket.h>
- ],
- [ struct sockaddr_storage s; s.__ss_len = 1; ],
- [ ac_cv_have___ss_len_in_struct_ss="yes" ],
- [ ac_cv_have___ss_len_in_struct_ss="no" ]
- )
- ])
- if test "x$ac_cv_have___ss_len_in_struct_ss" = "xyes" ; then
- AC_DEFINE(HAVE___SS_LEN_IN_SS, 1, [Does struct sockaddr_storage have __ss_len?])
- fi
- AH_VERBATIM([X_HAVE_SS_LEN_IN_SS],
- [/* Handle ss_len */
- #if !defined(HAVE_SS_LEN_IN_SS) && defined(HAVE___SS_LEN_IN_SS)
- # define ss_len __ss_len
- #endif /* !defined(HAVE_SS_LEN_IN_SS) && defined(HAVE_SA_LEN_IN_SS) */])
- case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
- *yes*)
- AC_CACHE_CHECK([for struct snd_size], ac_cv_struct_snd_size,
- [AC_TRY_COMPILE([
- #ifdef HAVE_MACHINE_SOUNDCARD_H
- # include <machine/soundcard.h>
- #endif
- #ifdef HAVE_SYS_SOUNDCARD_H
- # include <sys/soundcard.h>
- #endif],[
- extern struct snd_size *ss;
- return ss->rec_size;],
- ac_cv_struct_snd_size=yes,
- ac_cv_struct_snd_size=no)
- ])
- case "$ac_cv_struct_snd_size" in
- yes) AC_DEFINE(HAVE_STRUCT_SND_SIZE, 1,[Do we have struct snd_size?]) ;;
- esac
- ;;
- esac
- AC_CACHE_CHECK([struct clockinfo for hz], ac_cv_struct_clockinfo_has_hz,
- [AC_TRY_COMPILE([
- #include <sys/time.h>],[
- extern struct clockinfo *pc;
- return pc->hz;],
- ac_cv_struct_clockinfo_has_hz=yes,
- ac_cv_struct_clockinfo_has_hz=no)
- ])
- if test $ac_cv_struct_clockinfo_has_hz = yes; then
- AC_DEFINE(HAVE_HZ_IN_STRUCT_CLOCKINFO, 1, [Obvious...])
- fi
- AC_CACHE_CHECK([struct clockinfo for tickadj], ac_cv_struct_clockinfo_has_tickadj,
- [AC_TRY_COMPILE([
- #include <sys/time.h>],[
- extern struct clockinfo *pc;
- return pc->tickadj;],
- ac_cv_struct_clockinfo_has_tickadj=yes,
- ac_cv_struct_clockinfo_has_tickadj=no)
- ])
- if test $ac_cv_struct_clockinfo_has_tickadj = yes; then
- AC_DEFINE(HAVE_TICKADJ_IN_STRUCT_CLOCKINFO, 1, [Obvious...])
- fi
- AC_CACHE_CHECK([for struct timespec], ac_cv_struct_timespec,
- [AC_TRY_COMPILE([
- #include <sys/time.h>
- /* Under SunOS, timespec is in sys/timepps.h, which needs errno.h and FRAC */
- #ifdef HAVE_ERRNO_H
- # include <errno.h>
- #endif
- #ifdef HAVE_SYS_TIMEPPS_H
- # define FRAC 4294967296
- # include <sys/timepps.h>
- #endif],
- [struct timespec n;],
- ac_cv_struct_timespec=yes, ac_cv_struct_timespec=no)])
- if test $ac_cv_struct_timespec = yes; then
- AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1, [Do we have struct timespec?])
- fi
- AC_CACHE_CHECK([for struct ntptimeval], ac_cv_struct_ntptimeval,
- [AC_TRY_COMPILE([
- #include <sys/time.h>
- #include <sys/timex.h>],
- [struct ntptimeval n;],
- ac_cv_struct_ntptimeval=yes, ac_cv_struct_ntptimeval=no)])
- if test $ac_cv_struct_ntptimeval = yes; then
- AC_DEFINE(HAVE_STRUCT_NTPTIMEVAL, 1, [Do we have struct ntptimeval?])
- fi
- AC_CHECK_MEMBERS([struct ntptimeval.time.tv_nsec], , ,
- [#ifdef HAVE_SYS_TIME_H
- #include <sys/time.h>
- #else
- # ifdef HAVE_TIME_H
- # include <time.h>
- # endif
- #endif
- #ifdef HAVE_SYS_TIMEX_H
- #include <sys/timex.h>
- #else
- # ifdef HAVE_TIMEX_H
- # include <timex.h>
- # endif
- #endif])
- AC_C_INLINE
- case "$ac_cv_c_inline" in
- '')
- ;;
- *)
- AC_DEFINE(HAVE_INLINE,1,[inline keyword or macro available])
- AC_SUBST(HAVE_INLINE)
- esac
- AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE?
- AC_CHECK_SIZEOF(signed char)
- AC_CHECK_SIZEOF(int)
- AC_CHECK_SIZEOF(long)
- AC_CHECK_TYPES([s_char])
- case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
- *yes)
- # We have a typedef for s_char. Might as well believe it...
- ;;
- no0no)
- # We have signed chars, can't say 'signed char', no s_char typedef.
- AC_DEFINE(NEED_S_CHAR_TYPEDEF, 1, [Do we need an s_char typedef?])
- ;;
- no1no)
- # We have signed chars, can say 'signed char', no s_char typedef.
- AC_DEFINE(NEED_S_CHAR_TYPEDEF)
- ;;
- yes0no)
- # We have unsigned chars, can't say 'signed char', no s_char typedef.
- AC_MSG_ERROR(No way to specify a signed character!)
- ;;
- yes1no)
- # We have unsigned chars, can say 'signed char', no s_char typedef.
- AC_DEFINE(NEED_S_CHAR_TYPEDEF)
- ;;
- esac
- AC_TYPE_UID_T
- case "$host" in
- *-*-aix[[456]]*)
- # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
- # (returning ENOSYS). I didn't check 4.2. If, in the future,
- # IBM pulls its thumbs out long enough to implement clock_settime,
- # this conditional will need to change. Maybe use AC_TRY_RUN
- # instead to try to set the time to itself and check errno.
- ;;
- *) AC_CHECK_FUNCS(clock_gettime clock_settime)
- ;;
- esac
- AC_CHECK_FUNCS(daemon)
- AC_CHECK_FUNCS(finite, ,
- [AC_CHECK_FUNCS(isfinite, ,
- [AC_MSG_CHECKING([for isfinite with <math.h>])
- _libs=$LIBS
- LIBS="$LIBS -lm"
- AC_TRY_LINK([#include <math.h>], [float f = 0.0; isfinite(f)],
- [AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_ISFINITE)],
- AC_MSG_RESULT(no))
- LIBS=$_libs])])
- AC_CHECK_FUNCS(getbootfile getclock getdtablesize)
- AC_ARG_ENABLE(getifaddrs,
- AC_HELP_STRING([--enable-getifaddrs],
- [s Enable the use of getifaddrs() [[yes|no|glibc]].
- glibc: Use getifaddrs() in glibc if you know it supports IPv6.]),
- want_getifaddrs="$enableval", want_getifaddrs="yes")
- case $want_getifaddrs in
- yes|glibc)
- #
- # Do we have getifaddrs() ?
- #
- case $host in
- *-*linux*)
- # Some recent versions of glibc support getifaddrs() which does not
- # provide AF_INET6 addresses while the function provided by the USAGI
- # project handles the AF_INET6 case correctly. We need to avoid
- # using the former but prefer the latter unless overridden by
- # --enable-getifaddrs=glibc.
- if test $want_getifaddrs = glibc
- then
- AC_CHECK_FUNCS(getifaddrs)
- else
- save_LIBS="$LIBS"
- LIBS="-L/usr/local/v6/lib $LIBS"
- AC_CHECK_LIB(inet6, getifaddrs,
- LIBS="$LIBS -linet6"
- AC_DEFINE(HAVE_GETIFADDRS),
- LIBS=${save_LIBS})
- fi
- ;;
- *)
- AC_CHECK_FUNCS(getifaddrs)
- ;;
- esac
- ;;
- no)
- ;;
- esac
- AC_MSG_CHECKING([type of socklen arg for getsockname()])
- AC_CACHE_VAL(ac_cv_func_getsockname_arg2,dnl
- [AC_CACHE_VAL(ac_cv_func_getsockname_socklen_type,dnl
- [for ac_cv_func_getsockname_arg2 in 'struct sockaddr *' 'void *'; do
- for ac_cv_func_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
- AC_TRY_COMPILE(dnl
- [#ifdef HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- #include <sys/socket.h>
- #endif
- extern getsockname (int, $ac_cv_func_getsockname_arg2, $ac_cv_func_getsockname_socklen_type *);],,dnl
- [ac_not_found=no ; break 2], ac_not_found=yes)
- done
- done
- ])dnl AC_CACHE_VAL
- ])dnl AC_CACHE_VAL
- if test "$ac_not_found" = yes; then
- ac_cv_func_getsockname_socklen_type='socklen_t'
- fi
- AC_MSG_RESULT([$ac_cv_func_getsockname_socklen_type])
- AC_DEFINE_UNQUOTED([GETSOCKNAME_SOCKLEN_TYPE],
- $ac_cv_func_getsockname_socklen_type,
- [What is getsockname()'s socklen type?])
- AC_CHECK_FUNCS(getrusage)
- AC_CHECK_FUNC(gettimeofday, ,[
- case "$host" in
- *-*-mpeix*) ac_cv_func_gettimeofday=yes
- ;;
- esac])
- case "$host" in
- *-pc-cygwin*)
- ;;
- *) AC_CHECK_FUNCS(getuid)
- ;;
- esac
- AC_CHECK_FUNCS(hstrerror)
- #
- # Check for if_nametoindex() for IPv6 scoped addresses support
- #
- AC_CHECK_FUNC(if_nametoindex, ac_cv_have_if_nametoindex=yes,
- ac_cv_have_if_nametoindex=no)
- case $ac_cv_have_if_nametoindex in
- no)
- case "$host" in
- *-hp-hpux*)
- AC_CHECK_LIB(ipv6, if_nametoindex,
- ac_cv_have_if_nametoindex=yes
- LIBS="-lipv6 $LIBS",)
- ;;
- esac
- esac
- case $ac_cv_have_if_nametoindex in
- yes)
- AC_DEFINE(ISC_PLATFORM_HAVEIFNAMETOINDEX, 1, [ISC: do we have if_nametoindex()?])
- ;;
- esac
- AC_CHECK_FUNC(inet_ntop, [], [AC_DEFINE(ISC_PLATFORM_NEEDNTOP, 1, [ISC: provide inet_ntop()])])
- AC_CHECK_FUNC(inet_pton, [], [AC_DEFINE(ISC_PLATFORM_NEEDPTON, 1, [ISC: provide inet_pton()])])
- AC_CHECK_FUNC(inet_aton, [], [AC_DEFINE(ISC_PLATFORM_NEEDATON, 1, [ISC: provide inet_aton()])])
- AC_CHECK_FUNCS(K_open kvm_open memcpy memmove memset)
- case "$host" in
- *-*-sco3.2v5.0.*)
- # Just stubs. Idiots.
- ;;
- *) AC_CHECK_FUNCS(mkstemp)
- ;;
- esac
- AC_CHECK_FUNCS(mktime)
- case "$host" in
- *-*-aix[[456]]*)
- # Just a stub. Idiots.
- ;;
- *-*-irix[[45]]*)
- # Just a stub in "old" Irix. Idiots.
- ;;
- *-*-*linux*)
- # there, but more trouble than it is worth for now (resolver problems)
- ;;
- *-*-qnx*)
- # Apparently there but not working in QNX. Idiots?
- ;;
- *-*-sco3.2v5.0.*)
- # Just a stub. Idiots.
- ;;
- alpha*-dec-osf4*|alpha*-dec-osf5*)
- # mlockall is there, as a #define calling memlk via <sys/mman.h>
- # Not easy to test for - cheat.
- AC_CHECK_FUNCS(memlk, [ac_cv_func_mlockall='yes'])
- AC_CHECK_FUNCS(mlockall)
- ;;
- *) AC_CHECK_FUNCS(mlockall)
- ;;
- esac
- AC_CHECK_FUNCS(nice nlist)
- case "$host" in
- *-*-solaris2.6)
- # Broken...
- ;;
- *) AC_CHECK_FUNCS(ntp_adjtime ntp_gettime)
- ;;
- esac
- AC_CHECK_FUNCS(plock pututline pututxline readlink recvmsg rtprio)
- case "$host" in
- *-*-aix[[456]]*)
- # Just a stub in AIX 4. Idiots.
- ;;
- *-*-solaris2.5*)
- # Just stubs in solaris2.5. Idiots.
- ;;
- *) AC_CHECK_FUNCS(sched_setscheduler)
- ;;
- esac
- AC_CHECK_FUNCS(setlinebuf setpgid setpriority setsid)
- AC_CHECK_FUNCS(setrlimit)
- AC_CHECK_FUNCS(settimeofday, ,[
- case "$host" in
- *-*-mpeix*) ac_cv_func_settimeofday=yes
- ;;
- esac])
- AC_CHECK_FUNCS(setvbuf sigaction)
- AC_CHECK_FUNCS(sigvec sigset sigsuspend stime strchr sysconf sysctl)
- AC_CHECK_FUNCS(snprintf strdup strerror strstr)
- AC_CHECK_FUNCS(timegm)
- case "$host" in
- *-*-aix[[456]]*)
- # Just stubs. Idiots.
- ;;
- *-*-netbsd1*)
- # Just stubs. Idiots.
- ;;
- *-*-netbsdelf1*)
- # Just stubs. Idiots.
- ;;
- *-*-openbsd*)
- # Just stubs. Idiots.
- ;;
- *) AC_CHECK_FUNCS(timer_create timer_settime)
- ;;
- esac
- case "$host" in
- *-pc-cygwin*)
- # I have no idea...
- ;;
- *) AC_CHECK_FUNCS(umask)
- ;;
- esac
- AC_CHECK_FUNCS(uname updwtmp updwtmpx vsnprintf vsprintf)
- ###
- # http://bugs.ntp.org/737
- case "$ac_cv_func_recvmsg" in
- yes)
- AC_MSG_CHECKING([if we need extra help to define struct iovec])
- AC_CACHE_VAL(ac_cv_struct_iovec_help,dnl
- [for ac_cv_struct_iovec_help in '0' '1'; do
- AC_TRY_COMPILE(dnl
- [#ifdef HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- #include <sys/socket.h>
- #endif
- #if $ac_cv_struct_iovec_help
- #include <sys/uio.h>
- #endif
- void foo();
- void foo() {
- ssize_t x;
- int s = 0;
- struct iovec iov;
- struct msghdr mh;
- int flags = 0;
- mh.msg_iov = &iov;
- x = recvmsg(s, &mh, flags);
- }],,dnl
- [ac_worked=yes ; break 1], ac_worked=no)
- done
- ])dnl AC_CACHE_VAL
- case "$ac_worked$ac_cv_struct_iovec_help" in
- yes1)
- AC_DEFINE(HAVE_SYS_UIO_H, 1, [Use sys/uio.h for struct iovec help])
- ans=yes
- ;;
- *) ans=no
- esac
- AC_MSG_RESULT([$ans])
- ;;
- esac
- case "$host" in
- *-*-sunos4*)
- AC_DEFINE(SPRINTF_CHAR, 1, [*s*printf() functions are char*])
- ;;
- esac
- AC_CACHE_CHECK([number of arguments to gettimeofday()], ac_cv_func_Xettimeofday_nargs,
- [AC_TRY_COMPILE([#include <sys/time.h>],[
- gettimeofday((struct timeval*)0,(struct timezone*)0);
- settimeofday((struct timeval*)0,(struct timezone*)0);
- ],
- ac_cv_func_Xettimeofday_nargs=2, ac_cv_func_Xettimeofday_nargs=1)
- ])
- if test $ac_cv_func_Xettimeofday_nargs = 1; then
- AC_DEFINE(SYSV_TIMEOFDAY, 1, [Does Xettimeofday take 1 arg?])
- fi
- AC_CACHE_CHECK([number of arguments taken by setpgrp()], ac_cv_func_setpgrp_nargs,
- [AC_TRY_COMPILE([
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_UNISTD_H
- # include <unistd.h>
- #endif
- ],[setpgrp(0,0);],
- ac_cv_func_setpgrp_nargs=2, ac_cv_func_setpgrp_nargs=0)
- ])
- if test $ac_cv_func_setpgrp_nargs = 0; then
- AC_DEFINE(HAVE_SETPGRP_0, 1, [define if setpgrp takes 0 arguments])
- fi
- save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -I$srcdir/include"
- AC_CACHE_CHECK([argument pointer type of qsort()'s compare function and base],
- ac_cv_func_qsort_argtype,
- [AC_TRY_COMPILE([
- #include "l_stdlib.h"
- #ifdef HAVE_PROTOTYPES
- #define P(x) x
- #else
- #define P(x) ()
- #endif
- extern void *base;
- extern sortfunc P((const void *, const void *));
- int sortfunc(a, b)
- const void *a;
- const void *b; { return 0; }
- ],[
- qsort(base, 2, sizeof(char *), sortfunc);
- ],
- ac_cv_func_qsort_argtype=void, ac_cv_func_qsort_argtype=char)
- ])
- case "$ac_cv_func_qsort_argtype" in
- void)
- AC_DEFINE(QSORT_USES_VOID_P, 1, [Does qsort expect to work on "void *" stuff?])
- ;;
- esac
- CFLAGS=$save_CFLAGS
- AC_CACHE_CHECK([if we need to declare 'errno'], ac_cv_decl_errno,
- [AC_TRY_COMPILE([#ifdef HAVE_ERRNO_H
- #include <errno.h>
- #endif],
- [errno = 0;],
- ac_cv_decl_errno=no, ac_cv_decl_errno=yes)])
- case "$ac_cv_decl_errno" in
- yes) AC_DEFINE(DECL_ERRNO, 1, [Declare errno?]) ;;
- esac
- dnl FIXME: from ntpd/ntp_intres.c, but there's no info which header produces
- dnl the clash. <resolv.h> isn't currently used.
- dnl
- dnl (prr) aix 4.3 defines h_errno as (*(int *)h_errno_which()) for
- dnl MT purposes. This makes the line "extern int h_errno" choke
- dnl the compiler. Hopefully adding !defined(h_errno) fixes this
- dnl without breaking any other platforms.
- dnl
- AC_CACHE_CHECK([if we may declare 'h_errno'], ac_cv_decl_h_errno,
- [AC_TRY_COMPILE([#include <sys/types.h>
- #ifdef HAVE_NETINET_IN_H
- #include <netinet/in.h>
- #endif
- #ifdef HAVE_ARPA_NAMESER_H
- #include <arpa/nameser.h>
- #endif
- #ifdef HAVE_NETDB_H
- #include <netdb.h>
- #endif
- #ifdef HAVE_RESOLV_H
- #include <resolv.h>
- #endif],
- [extern int h_errno;],
- ac_cv_decl_h_errno=yes, ac_cv_decl_h_errno=no)])
- case "$ac_cv_decl_h_errno" in
- yes) AC_DEFINE(DECL_H_ERRNO, 1, [Declare h_errno?]) ;;
- esac
- dnl See if char *sys_errlist[] is OK.
- AC_CACHE_CHECK([[if declaring 'char *sys_errlist[]' is ok]], ac_cv_decl_sys_errlist,
- [AC_TRY_COMPILE([#include <stdio.h>
- #ifdef HAVE_ERRNO_H
- #include <errno.h>
- #endif],
- [extern char *sys_errlist[];
- ],
- ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)])
- case "$ac_cv_decl_sys_errlist" in
- yes) AC_DEFINE(CHAR_SYS_ERRLIST, 1, [Declare char *sys_errlist array]) ;;
- esac
- AC_CACHE_CHECK([if declaring 'syscall()' is ok], ac_cv_decl_syscall,
- [AC_TRY_COMPILE([
- #ifdef HAVE_SYS_TYPES_H
- # include <sys/types.h>
- #endif
- #ifdef HAVE_UNISTD_H
- # include <unistd.h>
- #endif
- #ifdef HAVE_PROTOTYPES
- #define P(x) x
- #else
- #define P(x) ()
- #endif
- ],
- [extern int syscall P((int, ...));],
- ac_cv_decl_syscall=yes, ac_cv_decl_syscall=no)])
- case "$ac_cv_decl_syscall" in
- yes) AC_DEFINE(DECL_SYSCALL, 1, [Declare syscall()?]) ;;
- esac
- case "$host" in
- *-*-aix4.3.*)
- AC_DEFINE(DECL_HSTRERROR_0, 1, [Declaration style]) # Needed for XLC under AIX 4.3.2
- ;;
- *-*-mpeix*)
- AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
- AC_DEFINE(DECL_INET_NTOA_0, 1, [Declaration style])
- AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
- AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
- AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
- AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
- ;;
- *-*-osf[[45]]*)
- AC_DEFINE(DECL_PLOCK_0, 1, [Declaration style])
- AC_DEFINE(DECL_STIME_1, 1, [Declaration style])
- ;;
- *-*-qnx*)
- AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
- ;;
- *-*-riscos4*)
- AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
- AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
- AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
- AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
- AC_DEFINE(DECL_MEMMOVE_0, 1, [Declaration style])
- AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
- AC_DEFINE(DECL_RENAME_0, 1, [Declaration style])
- AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
- AC_DEFINE(DECL_STDIO_0, 1, [Declaration style])
- AC_DEFINE(DECL_STRTOL_0, 1, [Declaration style])
- AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
- AC_DEFINE(DECL_TIME_0, 1, [Declaration style])
- AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
- AC_DEFINE(DECL_TOLOWER_0, 1, [Declaration style])
- ;;
- *-*-solaris2*)
- AC_DEFINE(DECL_MKSTEMP_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETPRIORITY_1, 1, [Declaration style])
- case "$host" in
- *-*-solaris2.4)
- AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
- ;;
- esac
- ;;
- *-*-sunos4*)
- AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
- AC_DEFINE(DECL_BCOPY_0, 1, [Declaration style])
- AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
- AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
- AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
- AC_DEFINE(DECL_MEMMOVE_0, 1, [Declaration style])
- AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
- AC_DEFINE(DECL_MKSTEMP_0, 1, [Declaration style])
- AC_DEFINE(DECL_RENAME_0, 1, [Declaration style])
- AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
- AC_DEFINE(DECL_SIGVEC_0, 1, [Declaration style])
- case "`basename $ac_cv_prog_CC`" in
- acc*) ;;
- *) AC_DEFINE(DECL_STDIO_0, 1, [Declaration style])
- ;;
- esac
- AC_DEFINE(DECL_STRTOL_0, 1, [Declaration style])
- AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
- AC_DEFINE(DECL_TIME_0, 1, [Declaration style])
- AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
- AC_DEFINE(DECL_TOLOWER_0, 1, [Declaration style])
- AC_DEFINE(DECL_TOUPPER_0, 1, [Declaration style])
- AC_DEFINE(DECL_STRERROR_0, 1, [Declaration style])
- ;;
- *-*-ultrix4*)
- AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
- AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
- AC_DEFINE(DECL_CFSETISPEED_0, 1, [Declaration style])
- AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
- AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
- AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
- AC_DEFINE(DECL_NLIST_0, 1, [Declaration style])
- AC_DEFINE(DECL_PLOCK_0, 1, [Declaration style])
- AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
- AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
- AC_DEFINE(DECL_STIME_0, 1, [Declaration style])
- AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
- AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
- ;;
- esac
- case "$host" in
- *-*-sco3.2*)
- AC_DEFINE(TERMIOS_NEEDS__SVID3, 1, [Do we need to #define _SVID3 when we #include <termios.h>?])
- ;;
- esac
- AC_CACHE_CHECK([if we need extra room for SO_RCVBUF], ac_cv_var_rcvbuf_slop,
- [ans=no
- case "$host" in
- *-*-hpux[[567]]*)
- ans=yes
- ;;
- esac
- ac_cv_var_rcvbuf_slop=$ans])
- case "$ac_cv_var_rcvbuf_slop" in
- yes) AC_DEFINE(NEED_RCVBUF_SLOP, 1, [Do we need extra room for SO_RCVBUF? (HPUX <8)]) ;;
- esac
- AC_CACHE_CHECK([if we will open the broadcast socket], ac_cv_var_open_bcast_socket,
- [ans=yes
- case "$host" in
- *-*-domainos)
- ans=no
- ;;
- esac
- ac_cv_var_open_bcast_socket=$ans])
- case "$ac_cv_var_open_bcast_socket" in
- yes) AC_DEFINE(OPEN_BCAST_SOCKET, 1, [Should we open the broadcast socket?]) ;;
- esac
- AC_CACHE_CHECK([if we want the HPUX version of FindConfig()], ac_cv_var_hpux_findconfig,
- [ans=no
- case "$host" in
- *-*-hpux*)
- ans=yes
- ;;
- esac
- ac_cv_var_hpux_findconfig=$ans])
- case "$ac_cv_var_hpux_findconfig" in
- yes) AC_DEFINE(NEED_HPUX_FINDCONFIG, 1, [Do we want the HPUX FindConfig()?]) ;;
- esac
- AC_CACHE_CHECK([if process groups are set with -pid], ac_cv_arg_setpgrp_negpid,
- [case "$host" in
- *-*-hpux[[567]]*)
- ans=no
- ;;
- *-*-hpux*)
- ans=yes
- ;;
- *-*-*linux*)
- ans=yes
- ;;
- *-*-sunos3*)
- ans=yes
- ;;
- *-*-ultrix2*)
- ans=yes
- ;;
- *)
- ans=no
- ;;
- esac
- ac_cv_arg_setpgrp_negpid=$ans])
- case "$ac_cv_arg_setpgrp_negpid" in
- yes) AC_DEFINE(UDP_BACKWARDS_SETOWN, 1, [Do we set process groups with -pid?]) ;;
- esac
- AC_CACHE_CHECK([if we need a ctty for F_SETOWN], ac_cv_func_ctty_for_f_setown,
- [[case "$host" in
- *-*-bsdi[23]*)
- ans=yes
- ;;
- *-*-freebsd*)
- ans=yes
- ;;
- *-*-netbsd*3.[0-8]*|*-*-netbsd*[0-2].*|*-*-netbsd*3.99.[0-7])
- ans=yes
- ;;
- *-*-openbsd*)
- ans=yes
- ;;
- *-*-osf*)
- ans=yes
- ;;
- *-*-darwin*)
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
- ac_cv_func_ctty_for_f_setown=$ans]])
- case "$ac_cv_func_ctty_for_f_setown" in
- yes) AC_DEFINE(USE_FSETOWNCTTY, 1, [Must we have a CTTY for fsetown?]) ;;
- esac
- AC_CACHE_CHECK([if the OS fails to clear cached routes when more specific routes become available], ac_cv_os_routeupdates,
- [[case "$host" in
- *-*-netbsd*)
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
- ac_cv_os_routeupdates=$ans]])
- case "$ac_cv_os_routeupdates" in
- yes) AC_DEFINE(OS_MISSES_SPECIFIC_ROUTE_UPDATES, 1, [need to recreate sockets on changed routing?]) ;;
- esac
- AC_CACHE_CHECK([if the OS needs the wildcard socket set to REUSEADDR for binding interface addresses], ac_cv_os_wildcardreuse,
- [[case "$host" in
- *-*-*linux*)
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
- ac_cv_os_wildcardreuse=$ans]])
- case "$ac_cv_os_wildcardreuse" in
- yes) AC_DEFINE(OS_NEEDS_REUSEADDR_FOR_IFADDRBIND, 1, [wildcard socket needs to set REUSEADDR when binding to interface addresses]) ;;
- esac
- ntp_warning='GRONK'
- AC_MSG_CHECKING([if we'll use clock_settime or settimeofday or stime])
- case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
- yes*)
- ntp_warning=''
- ans='clock_settime()'
- ;;
- noyes*)
- ntp_warning='But clock_settime() would be better (if we had it)'
- ans='settimeofday()'
- ;;
- nonoyes)
- ntp_warning='Which is the worst of the three'
- ans='stime()'
- ;;
- *)
- case "$build" in
- $host) ntp_warning='Which leaves us with nothing to use!'
- ans=none
- ;;
- esac
- esac
- AC_MSG_RESULT([$ans])
- case "$ntp_warning" in
- '') ;;
- *) AC_MSG_WARN([*** $ntp_warning ***])
- ;;
- esac
- AC_CACHE_CHECK([if we have a losing syscall()], ac_cv_var_syscall_bug,
- [case "$host" in
- *-*-solaris2.4*)
- ans=yes
- ;;
- *) ans=no
- ;;
- esac
- ac_cv_var_syscall_bug=$ans])
- case "$ac_cv_var_syscall_bug" in
- yes) AC_DEFINE(SYSCALL_BUG, 1, [Buggy syscall() (Solaris2.4)?]) ;;
- esac
- AC_CACHE_CHECK([for SIGIO], ac_cv_hdr_def_sigio,
- AC_EGREP_CPP(yes,
- [#include <signal.h>
- #ifdef SIGIO
- yes
- #endif
- ], ac_cv_hdr_def_sigio=yes, ac_cv_hdr_def_sigio=no))
- dnl Override those system that have a losing SIGIO
- AC_CACHE_CHECK([if we want to use signalled IO], ac_cv_var_signalled_io,
- [ans=no
- case "$ac_cv_hdr_def_sigio" in
- yes)
- ans=yes
- case "$host" in
- alpha*-dec-osf4*|alpha*-dec-osf5*)
- ans=no
- ;;
- *-convex-*)
- ans=no
- ;;
- *-dec-*)
- ans=no
- ;;
- *-pc-cygwin*)
- ans=no
- ;;
- *-sni-sysv*)
- ans=no
- ;;
- *-univel-sysv*)
- ans=no
- ;;
- *-*-irix6*)
- ans=no
- ;;
- *-*-freebsd*)
- ans=no
- ;;
- *-*-*linux*)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- esac
- ;;
- esac
- ac_cv_var_signalled_io=$ans])
- case "$ac_cv_var_signalled_io" in
- yes) AC_DEFINE(HAVE_SIGNALED_IO, 1, [Can we use SIGIO for tcp and udp IO?]) ;;
- esac
- AC_CACHE_CHECK([for SIGPOLL], ac_cv_hdr_def_sigpoll,
- AC_EGREP_CPP(yes,
- [#include <signal.h>
- #ifdef SIGPOLL
- yes
- #endif
- ], ac_cv_hdr_def_sigpoll=yes, ac_cv_hdr_def_sigpoll=no))
- AC_CACHE_CHECK([for SIGSYS], ac_cv_hdr_def_sigsys,
- AC_EGREP_CPP(yes,
- [#include <signal.h>
- #ifdef SIGSYS
- yes
- #endif
- ], ac_cv_hdr_def_sigsys=yes, ac_cv_hdr_def_sigsys=no))
- AC_CACHE_CHECK([if we can use SIGPOLL for UDP I/O], ac_cv_var_use_udp_sigpoll,
- [ans=no
- case "$ac_cv_hdr_def_sigpoll" in
- yes)
- case "$host" in
- mips-sgi-irix*)
- ans=no
- ;;
- vax-dec-bsd)
- ans=no
- ;;
- *-pc-cygwin*)
- ans=no
- ;;
- *-sni-sysv*)
- ans=no
- ;;
- *-*-aix[[456]]*)
- ans=no
- ;;
- *-*-hpux*)
- ans=no
- ;;
- *-*-*linux*)
- ans=no
- ;;
- *-*-osf*)
- ans=no
- ;;
- *-*-qnx*)
- ans=no
- ;;
- *-*-sunos*)
- ans=no
- ;;
- *-*-solaris*)
- ans=no
- ;;
- *-*-ultrix*)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- *) ans=yes
- ;;
- esac
- ;;
- esac
- ac_cv_var_use_udp_sigpoll=$ans])
- case "$ac_cv_var_use_udp_sigpoll" in
- yes) AC_DEFINE(USE_UDP_SIGPOLL, 1, [Can we use SIGPOLL for UDP?]) ;;
- esac
- AC_CACHE_CHECK([if we can use SIGPOLL for TTY I/O], ac_cv_var_use_tty_sigpoll,
- [ans=no
- case "$ac_cv_hdr_def_sigpoll" in
- yes)
- case "$host" in
- mips-sgi-irix*)
- ans=no
- ;;
- vax-dec-bsd)
- ans=no
- ;;
- *-pc-cygwin*)
- ans=no
- ;;
- *-sni-sysv*)
- ans=no
- ;;
- *-*-aix[[456]]*)
- ans=no
- ;;
- *-*-hpux*)
- ans=no
- ;;
- *-*-*linux*)
- ans=no
- ;;
- *-*-osf*)
- ans=no
- ;;
- *-*-sunos*)
- ans=no
- ;;
- *-*-ultrix*)
- ans=no
- ;;
- *-*-qnx*)
- ans=no
- ;;
- *-*-unicosmp*)
- ans=no
- ;;
- *) ans=yes
- ;;
- esac
- ;;
- esac
- ac_cv_var_use_tty_sigpoll=$ans])
- case "$ac_cv_var_use_tty_sigpoll" in
- yes) AC_DEFINE(USE_TTY_SIGPOLL, 1, [Can we use SIGPOLL for tty IO?]) ;;
- esac
- case "$ac_cv_header_sys_sio_h" in
- yes)
- AC_CACHE_CHECK([sys/sio.h for TIOCDCDTIMESTAMP], ac_cv_hdr_def_tiocdcdtimestamp,
- AC_EGREP_CPP(yes,
- [#include <sys/sio.h>
- #ifdef TIOCDCDTIMESTAMP
- yes
- #endif
- ], ac_cv_hdr_def_tiocdcdtimestamp=yes, ac_cv_hdr_def_tiocdcdtimestamp=no))
- ;;
- esac
- case "$ac_cv_hdr_def_tiocdcdtimestamp" in
- yes)
- ac_cv_var_oncore_ok=yes
- ;;
- esac
- AC_CACHE_CHECK([if nlist() values might require extra indirection],
- ac_cv_var_nlist_extra_indirection,
- [ans=no
- case "$host" in
- *-*-aix*)
- ans=yes
- ;;
- esac
- ac_cv_var_nlist_extra_indirection=$ans])
- case "$ac_cv_var_nlist_extra_indirection" in
- yes) AC_DEFINE(NLIST_EXTRA_INDIRECTION, 1, [Might nlist() values require an extra level of indirection (AIX)?]) ;;
- esac
- AC_CACHE_CHECK([for a minimum recommended value of tickadj],
- ac_cv_var_min_rec_tickadj,
- [ans=no
- case "$host" in
- *-*-aix*)
- ans=40
- ;;
- esac
- ac_cv_var_min_rec_tickadj=$ans])
- case "$ac_cv_var_min_rec_tickadj" in
- ''|no) ;;
- *) AC_DEFINE_UNQUOTED(MIN_REC_TICKADJ, $ac_cv_var_min_rec_tickadj, [Should we recommend a minimum value for tickadj?]) ;;
- esac
- AC_CACHE_CHECK([if the TTY code permits PARENB and IGNPAR],
- ac_cv_var_no_parenb_ignpar,
- [ans=no
- case "$host" in
- i?86-*-*linux*)
- ans=yes
- ;;
- mips-sgi-irix*)
- ans=yes
- ;;
- i?86-*-freebsd[[123]].*)
- ;;
- i?86-*-freebsd*)
- ans=yes
- ;;
- *-*-unicosmp*)
- ans=yes
- ;;
- esac
- ac_cv_var_no_parenb_ignpar=$ans])
- case "$ac_cv_var_no_parenb_ignpar" in
- yes) AC_DEFINE(NO_PARENB_IGNPAR, 1, [Is there a problem using PARENB and IGNPAR (IRIX)?]) ;;
- esac
- AC_MSG_CHECKING([if we're including debugging code])
- AC_ARG_ENABLE(debugging,
- AC_HELP_STRING([--enable-debugging], [+ include debugging code]),
- [ntp_ok=$enableval], [ntp_ok=yes])
- if test "$ntp_ok" = "yes"; then
- AC_DEFINE(DEBUG, 1, [Enable debugging?])
- fi
- AC_MSG_RESULT($ntp_ok)
- AC_MSG_CHECKING([if we including processing time debugging code])
- AC_ARG_ENABLE(debug-timing,
- AC_HELP_STRING([--enable-debug-timing], [- include processing time debugging code (costs performance)]),
- [ntp_ok=$enableval], [ntp_ok=no])
- if test "$ntp_ok" = "yes"; then
- AC_DEFINE(DEBUG_TIMING, 1, [Enable processing time debugging?])
- fi
- AC_MSG_RESULT($ntp_ok)
- AC_MSG_C…