PageRenderTime 78ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 1ms

/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
Possible License(s): MPL-2.0-no-copyleft-exception, BSD-3-Clause, LGPL-2.0, LGPL-2.1, BSD-2-Clause, 0BSD, JSON, AGPL-1.0, GPL-2.0
  1. dnl -*-fundamental-*-
  2. dnl Process this file with autoconf to produce a configure script.
  3. m4_include([version.m4])
  4. AC_INIT(ntp, VERSION_NUMBER)
  5. AM_INIT_AUTOMAKE
  6. AC_CANONICAL_HOST
  7. dnl the 'build' machine is where we run configure and compile
  8. dnl the 'host' machine is where the resulting stuff runs.
  9. AC_DEFINE_UNQUOTED(STR_SYSTEM, "$host", [canonical system (cpu-vendor-os) of where we should run])
  10. AM_CONFIG_HEADER([config.h])
  11. dnl AC_ARG_PROGRAM
  12. AC_PREREQ(2.53)
  13. ac_cv_var_atom_ok=no
  14. ac_cv_var_oncore_ok=no
  15. ac_cv_var_parse_ok=no
  16. ac_cv_var_ripe_ncc_ok=no
  17. ac_cv_var_jupiter_ok=no
  18. dnl Grab any initial CFLAGS so we can pick better defaults.
  19. iCFLAGS="$CFLAGS"
  20. dnl check these early to avoid autoconf warnings
  21. AC_AIX
  22. AC_MINIX
  23. # So far, the only shared library we might use is libopts.
  24. # It's a small library - we might as well use a static version of it.
  25. AC_DISABLE_SHARED
  26. dnl we need to check for cross compile tools for vxWorks here
  27. AC_PROG_CC
  28. # Ralf Wildenhues: With per-target flags we need CC_C_O
  29. # AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
  30. AM_PROG_CC_C_O
  31. AC_PROG_CC_STDC
  32. AC_PROG_CPP
  33. # HMS: These need to be moved to AM_CPPFLAGS and/or AM_CFLAGS
  34. case "$host" in
  35. *-*-amigaos)
  36. CFLAGS="$CFLAGS -Dfork=vfork -DSYS_AMIGA"
  37. ;;
  38. *-*-hpux10.*) # at least for hppa2.0-hp-hpux10.20
  39. case "$GCC" in
  40. yes)
  41. ;;
  42. *) CFLAGS="$CFLAGS -Wp,-H18816"
  43. ;;
  44. esac
  45. ;;
  46. *-pc-cygwin*)
  47. CFLAGS="$CFLAGS -DSYS_CYGWIN32"
  48. ;;
  49. i386-sequent-sysv4)
  50. case "$CC" in
  51. cc)
  52. CFLAGS="$CFLAGS -Wc,+abi-socket"
  53. ;;
  54. esac
  55. ;;
  56. *-*-mpeix*)
  57. CPPFLAGS="$CPPFLAGS -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB"
  58. LDFLAGS="$LDFLAGS -L/SYSLOG/PUB"
  59. LIBS="$LIBS -lcurses"
  60. ;;
  61. *-*-solaris*)
  62. # see "man standards".
  63. # -D_XOPEN_SOURCE=500 is probably OK for c89 and before
  64. # -D_XOPEN_SOURCE=600 seems OK for c99
  65. #CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
  66. CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
  67. libxnet=-lxnet
  68. ;;
  69. esac
  70. AMU_OS_CFLAGS
  71. # NTP has (so far) been relying on leading-edge autogen.
  72. # Therefore, by default:
  73. # - use the version we ship with
  74. # - do not install it
  75. # - build a static copy (AC_DISABLE_SHARED - done earlier)
  76. case "${enable_local_libopts+set}" in
  77. set) ;;
  78. *) enable_local_libopts=yes ;;
  79. esac
  80. case "${enable_libopts_install+set}" in
  81. set) ;;
  82. *) enable_libopts_install=no ;;
  83. esac
  84. LIBOPTS_CHECK(libopts)
  85. AC_CACHE_CHECK(
  86. [if $CC can handle @%:@warning],
  87. ac_cv_cpp_warning,
  88. [
  89. AC_COMPILE_IFELSE(
  90. AC_LANG_PROGRAM([], [#warning foo]),
  91. [ac_cv_cpp_warning=yes],
  92. [ac_cv_cpp_warning=no],
  93. )
  94. ]
  95. )
  96. case "$ac_cv_cpp_warning" in
  97. no)
  98. AC_DEFINE([NO_OPTION_NAME_WARNINGS], [1], [Should we avoid @%:@warning on option name collisions?])
  99. esac
  100. case "$GCC" in
  101. yes)
  102. SAVED_CFLAGS_AC="$CFLAGS"
  103. CFLAGS="$CFLAGS -Wstrict-overflow"
  104. AC_CACHE_CHECK(
  105. [if $CC can handle -Wstrict-overflow],
  106. ac_cv_gcc_Wstrict_overflow,
  107. [
  108. AC_COMPILE_IFELSE(
  109. [AC_LANG_PROGRAM([], [])],
  110. [ac_cv_gcc_Wstrict_overflow=yes],
  111. [ac_cv_gcc_Wstrict_overflow=no]
  112. )
  113. ]
  114. )
  115. CFLAGS="$SAVED_CFLAGS_AC"
  116. unset SAVED_CFLAGS_AC
  117. #
  118. # $ac_cv_gcc_Wstrict_overflow is tested later to add the
  119. # flag to CFLAGS.
  120. #
  121. esac
  122. case "$GCC" in
  123. yes)
  124. SAVED_CFLAGS_AC="$CFLAGS"
  125. CFLAGS="$CFLAGS -Winit-self"
  126. AC_CACHE_CHECK(
  127. [if $CC can handle -Winit-self],
  128. ac_cv_gcc_Winit_self,
  129. [
  130. AC_COMPILE_IFELSE(
  131. [AC_LANG_PROGRAM([], [])],
  132. [ac_cv_gcc_Winit_self=yes],
  133. [ac_cv_gcc_Winit_self=no]
  134. )
  135. ]
  136. )
  137. CFLAGS="$SAVED_CFLAGS_AC"
  138. unset SAVED_CFLAGS_AC
  139. #
  140. # $ac_cv_gcc_Winit_self is tested later to add the
  141. # flag to CFLAGS.
  142. #
  143. esac
  144. AC_MSG_CHECKING([for bin subdirectory])
  145. AC_ARG_WITH(binsubdir,
  146. AC_HELP_STRING([--with-binsubdir], [bin ={bin,sbin}]),
  147. use_binsubdir="$withval", use_binsubdir="bin")
  148. case "$use_binsubdir" in
  149. bin)
  150. ;;
  151. sbin)
  152. ;;
  153. *)
  154. AC_MSG_ERROR([<$use_binsubdir> is illegal - must be "bin" or "sbin"])
  155. ;;
  156. esac
  157. AC_MSG_RESULT($use_binsubdir)
  158. BINSUBDIR=$use_binsubdir
  159. AC_SUBST(BINSUBDIR)
  160. AC_MSG_CHECKING([if we want to use arlib])
  161. AC_ARG_WITH(arlib,
  162. AC_HELP_STRING([--with-arlib], [- Compile the async resolver library?]),
  163. [ans=$withval], [ans=no])
  164. AC_MSG_RESULT([$ans])
  165. if test -d $srcdir/arlib
  166. then
  167. case "$ans" in
  168. yes)
  169. ARLIB_DIR=arlib
  170. AC_CONFIG_SUBDIRS(arlib)
  171. ;;
  172. esac
  173. fi
  174. AC_SUBST(ARLIB_DIR)
  175. AC_ARG_WITH(rpath,
  176. AC_HELP_STRING([--without-rpath], [s Disable auto-added -R linker paths]),
  177. [ans=$withval], [ans=x])
  178. case "$ans" in
  179. no)
  180. need_dash_r=
  181. ;;
  182. yes)
  183. need_dash_r=1
  184. ;;
  185. esac
  186. # HMS: Why isn't this $build?
  187. # Well, that depends on if we need this for the build toolchain or
  188. # for info in the host executable...
  189. # I still have no idea which way this should go, but nobody has complained.
  190. case "$host" in
  191. *-*-netbsd*)
  192. case "$need_dash_r" in
  193. no) ;;
  194. *) need_dash_r=1
  195. ;;
  196. esac
  197. ;;
  198. *-*-solaris*)
  199. case "$need_dash_r" in
  200. no) ;;
  201. *) need_dash_r=1
  202. ;;
  203. esac
  204. ;;
  205. esac
  206. case "$build" in
  207. $host)
  208. ;;
  209. *) case "$host" in
  210. *-*-vxworks*)
  211. # Quick and dirty sanity check
  212. case "$VX_KERNEL" in
  213. '') AC_MSG_ERROR(Please follow the directions in html/build/hints/vxworks.html!)
  214. ;;
  215. esac
  216. CFLAGS="$CFLAGS -DSYS_VXWORKS"
  217. ;;
  218. esac
  219. ;;
  220. esac
  221. dnl we need to check for cross compile tools for vxWorks here
  222. AC_PROG_AWK
  223. AC_PROG_MAKE_SET
  224. rm -f conftest*
  225. case "$GCC" in
  226. yes)
  227. CFLAGS="$CFLAGS -Wall"
  228. # CFLAGS="$CFLAGS -Wcast-align"
  229. CFLAGS="$CFLAGS -Wcast-qual"
  230. # CFLAGS="$CFLAGS -Wconversion"
  231. # CFLAGS="$CFLAGS -Werror"
  232. # CFLAGS="$CFLAGS -Wextra"
  233. # CFLAGS="$CFLAGS -Wfloat-equal"
  234. CFLAGS="$CFLAGS -Wmissing-prototypes"
  235. CFLAGS="$CFLAGS -Wpointer-arith"
  236. CFLAGS="$CFLAGS -Wshadow"
  237. #
  238. # OpenSSL has a number of callback prototypes
  239. # inside other function prototypes which trigger
  240. # warnings with -Wstrict-prototypes, such as:
  241. #
  242. # int i2d_RSA_NET(const RSA *a, unsigned char **pp,
  243. # int (*cb)(), int sgckey);
  244. # ^^^^^^^^^^^
  245. #
  246. CFLAGS="$CFLAGS -Wno-strict-prototypes"
  247. # CFLAGS="$CFLAGS -Wtraditional"
  248. # CFLAGS="$CFLAGS -Wwrite-strings"
  249. case "$ac_cv_gcc_Winit_self" in
  250. yes)
  251. CFLAGS="$CFLAGS -Winit-self"
  252. esac
  253. case "$ac_cv_gcc_Wstrict_overflow" in
  254. yes)
  255. #not yet: CFLAGS="$CFLAGS -Wstrict-overflow"
  256. esac
  257. ;;
  258. esac
  259. case "$host" in
  260. *-next-nextstep3)
  261. CFLAGS="$CFLAGS -posix"
  262. ;;
  263. dnl This is currently commented out by bor.
  264. dnl The new versions of ReliantUNIX round adjtime() interval down
  265. dnl to 1/100s (system tick). This makes tickadj actually useless.
  266. dnl So, I'd better not use additional flags.
  267. dnl I leave it here just in case anybody has better idea
  268. dnl mips-sni-sysv4* )
  269. dnl #
  270. dnl # Add flags for 64 bit file access to enable tickadj to access /dev/kmem
  271. dnl #
  272. dnl if getconf _LFS_CFLAGS > /dev/null 2>&1 ; then
  273. dnl CFLAGS="$CFLAGS `getconf _LFS_CFLAGS`"
  274. dnl fi
  275. dnl ;;
  276. esac
  277. ac_busted_vpath_in_make=no
  278. case "$build" in
  279. *-*-irix6.1*) # 64 bit only
  280. # busted vpath?
  281. ;;
  282. *-*-irix6*) # 6.2 (and later?)
  283. ac_busted_vpath_in_make=yes
  284. ;;
  285. *-*-solaris2.5.1)
  286. ac_busted_vpath_in_make=yes
  287. ;;
  288. *-*-unicosmp*)
  289. ac_busted_vpath_in_make=yes
  290. ;;
  291. esac
  292. case "$ac_busted_vpath_in_make$srcdir" in
  293. no*) ;;
  294. yes.) ;;
  295. *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | sed -e 's/GNU Make version \(1-9.]*\).*/\1/' -e q`" in
  296. '')
  297. AC_MSG_ERROR([building outside of the main directory requires GNU make])
  298. ;;
  299. *) ;;
  300. esac
  301. ;;
  302. esac
  303. AC_SUBST(CFLAGS)dnl
  304. AC_SUBST(LDFLAGS)dnl
  305. m4_defun([_LT_AC_LANG_CXX_CONFIG], [:])
  306. m4_defun([_LT_AC_LANG_F77_CONFIG], [:])
  307. AC_PROG_LIBTOOL
  308. AC_PROG_LN_S
  309. AC_PROG_GCC_TRADITIONAL
  310. AC_C_VOLATILE
  311. AC_ISC_POSIX
  312. AC_PATH_PROG(PATH_SH, sh)
  313. AC_PATH_PROG(PATH_PERL, perl)
  314. hs_ULONG_CONST # remove for 4.2.5
  315. case "$host" in
  316. *-*-vxworks*)
  317. ac_link="$ac_link $VX_KERNEL"
  318. ;;
  319. esac
  320. AC_PROG_INSTALL
  321. case "$host" in
  322. *-pc-cygwin*)
  323. AC_CHECK_LIB(advapi32, main)
  324. ;;
  325. esac
  326. AC_CHECK_FUNC([gethostent], ,
  327. AC_SEARCH_LIBS([gethostent], [nsl], , , [$libxnet -lsocket]))
  328. AC_CHECK_FUNC([openlog], ,
  329. AC_SEARCH_LIBS([openlog], [gen], ,
  330. AC_SEARCH_LIBS([openlog], [syslog], , , [$libxnet -lsocket])))
  331. AC_SEARCH_LIBS([MD5Init], [md5 md])
  332. AC_CHECK_FUNCS(MD5Init)
  333. # following block becomes on 4.2.5: NTP_LINEEDITLIBS
  334. dnl HMS: What a hack...
  335. AC_CHECK_HEADERS(readline/history.h readline/readline.h)
  336. case "$ac_cv_header_readline_history_h$ac_cv_header_readline_readline_h" in
  337. *no*) ;;
  338. *) save_LIBS=$LIBS
  339. LIBS=
  340. # Ralf Wildenhues: either unset ... or cache READLINE_LIBS
  341. unset ac_cv_lib_readline_readline
  342. AC_CHECK_LIB(readline, readline, ,
  343. AC_MSG_NOTICE([Trying again with -lcurses])
  344. unset ac_cv_lib_readline_readline
  345. AC_CHECK_LIB(readline, readline,
  346. LIBS="-lreadline -lcurses $LIBS"
  347. AC_DEFINE(HAVE_LIBREADLINE)
  348. AC_DEFINE(HAVE_LIBCURSES, , [Do we have the curses library?]),
  349. AC_CHECK_LIB(edit, readline,
  350. LIBS="-ledit -lcurses"
  351. AC_DEFINE(HAVE_LIBEDIT, , [Do we have the edit library?])
  352. AC_DEFINE(HAVE_LIBCURSES, , [Do we have the curses library?])
  353. , , -lcurses)
  354. , -lcurses))
  355. READLINE_LIBS=$LIBS
  356. AC_SUBST(READLINE_LIBS)
  357. LIBS=$save_LIBS
  358. ;;
  359. esac
  360. dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt
  361. dnl Solaris 2.6 only has -lposix4; in Solaris 7, this is a symlink to -lrt,
  362. dnl so only use one of them. Linux (glibc-2.1.2 and -2.2.2, at least)
  363. dnl does Strange Things with extra processes using the Posix-compatibility
  364. dnl real-time library, so we don't want to use it.
  365. case "$host" in
  366. *-*-*linux*) ;;
  367. *)
  368. AC_CHECK_LIB(rt, sched_setscheduler, ,
  369. AC_CHECK_LIB(posix4, sched_setscheduler))
  370. ;;
  371. esac
  372. AC_CHECK_FUNC(setsockopt, ,
  373. [AC_SEARCH_LIBS([setsockopt], [socket xnet])])
  374. AC_HEADER_STDC
  375. AC_CHECK_HEADERS(bstring.h)
  376. AC_CHECK_HEADER(dns_sd.h,
  377. [AC_CHECK_LIB(dns_sd,
  378. DNSServiceRegister,
  379. [AC_DEFINE(HAVE_DNSREGISTRATION, 1,
  380. [Use Rendezvous/DNS-SD registration])])])
  381. case "$ac_cv_lib_dns_sd_DNSServiceRegister" in
  382. yes) LIBS="-ldns_sd $LIBS" ;;
  383. esac
  384. AC_CHECK_HEADERS(errno.h fcntl.h ieeefp.h math.h)
  385. # HMS: Lame, but fast.
  386. if test -f /etc/redhat-release
  387. then
  388. :
  389. else
  390. AC_CHECK_HEADERS(md5.h, [], [],
  391. [#if HAVE_SYS_TYPES_H
  392. #include <sys/types.h>
  393. #endif
  394. ])
  395. fi
  396. AC_CHECK_HEADERS(memory.h netdb.h poll.h)
  397. AC_CHECK_HEADERS(sched.h sgtty.h stdlib.h string.h termio.h)
  398. AC_CHECK_HEADERS(termios.h timepps.h timex.h unistd.h)
  399. case "$host" in
  400. *-*-aix*)
  401. AC_CHECK_HEADERS(utmpx.h)
  402. case "$ac_cv_header_utmpx_h" in
  403. yes) ;;
  404. *) AC_CHECK_HEADERS(utmp.h) ;;
  405. esac
  406. ;;
  407. *) AC_CHECK_HEADERS(utmp.h utmpx.h) ;;
  408. esac
  409. AC_CHECK_HEADERS(arpa/nameser.h)
  410. AC_CHECK_HEADERS(sys/socket.h)
  411. AC_CHECK_HEADERS(net/if.h, [], [],
  412. [#if HAVE_SYS_SOCKET_H
  413. #include <sys/socket.h>
  414. #endif
  415. ])
  416. AC_CHECK_HEADERS(net/if6.h)
  417. AC_CHECK_HEADERS(net/route.h, [], [], [
  418. #include <sys/types.h>
  419. #include <sys/socket.h>
  420. #include <net/if.h>
  421. ])
  422. AC_CHECK_HEADERS(netinet/in_system.h netinet/in_systm.h)
  423. AC_CHECK_HEADERS(netinet/in.h)
  424. AC_CHECK_HEADERS(netinet/ip.h, [], [],
  425. [#if HAVE_SYS_TYPES_H
  426. #include <sys/types.h>
  427. #endif
  428. #if HAVE_NETINET_IN_H
  429. #include <netinet/in.h>
  430. #endif
  431. #if HAVE_NETINET_IN_SYSTM_H
  432. #include <netinet/in_systm.h>
  433. #endif
  434. ])
  435. # Check for IPTOS_PREC
  436. AC_CACHE_CHECK(
  437. [IPPROTO_IP IP_TOS IPTOS_LOWDELAY],
  438. ac_cv_ip_tos,
  439. [
  440. AC_EGREP_CPP(
  441. [yes],
  442. [
  443. #if HAVE_SYS_TYPES_H
  444. #include <sys/types.h>
  445. #endif
  446. #if HAVE_NETINET_IP_H
  447. #include <netinet/in.h>
  448. #include <netinet/ip.h>
  449. #endif
  450. #if defined(IPPROTO_IP) && defined(IP_TOS) && defined(IPTOS_LOWDELAY)
  451. yes
  452. #endif
  453. ],
  454. [ac_cv_ip_tos=yes],
  455. [ac_cv_ip_tos=no]
  456. )
  457. ]
  458. )
  459. case "$ac_cv_ip_tos" in
  460. yes)
  461. AC_DEFINE(HAVE_IPTOS_SUPPORT, 1, [Do we have IPTOS support?])
  462. esac
  463. AC_CHECK_HEADERS(netinfo/ni.h, [AC_DEFINE(HAVE_NETINFO, 1, [NetInfo support?])])
  464. AC_CHECK_HEADERS(sun/audioio.h sys/audioio.h)
  465. dnl AC_CHECK_HEADERS(sys/chudefs.h)
  466. AC_CHECK_HEADERS(sys/clkdefs.h sys/file.h)
  467. case "$host" in
  468. *-*-sunos4*) ;;
  469. *) AC_CHECK_HEADERS(sys/ioctl.h)
  470. ;;
  471. esac
  472. AC_CHECK_HEADERS(sys/ipc.h)
  473. AC_CHECK_HEADERS(sys/lock.h sys/mman.h sys/modem.h sys/param.h sys/ppsclock.h)
  474. # HMS: Check sys/proc.h and sys/resource.h after some others
  475. AC_CHECK_HEADERS(sys/ppstime.h)
  476. case "$ac_cv_header_sched_h" in
  477. yes) ;;
  478. *) AC_CHECK_HEADERS(sys/sched.h) ;;
  479. esac
  480. case "$host" in
  481. *-*-sco*)
  482. AC_CHECK_HEADERS(sys/sio.h)
  483. ;;
  484. esac
  485. # HMS: Check sys/shm.h after some others
  486. AC_CHECK_HEADERS(sys/select.h sys/signal.h sys/sockio.h)
  487. # HMS: Checked sys/socket.h earlier
  488. case "$host" in
  489. *-*-netbsd*) ;;
  490. *) AC_CHECK_HEADERS(machine/soundcard.h sys/soundcard.h)
  491. ;;
  492. esac
  493. AC_CHECK_HEADERS(sys/stat.h sys/stream.h)
  494. AC_CHECK_HEADERS(sys/stropts.h sys/sysctl.h sys/syssgi.h sys/systune.h)
  495. AC_CHECK_HEADERS(sys/termios.h sys/time.h sys/signal.h)
  496. AC_EGREP_CPP(yes,
  497. [#if HAVE_SYS_TIME_H
  498. # include <sys/time.h>
  499. #endif
  500. #if HAVE_ERRNO_H
  501. # include <errno.h>
  502. #endif
  503. #include <sys/timepps.h>
  504. #ifdef PPS_API_VERS_1
  505. yes
  506. #endif
  507. ], [AC_CHECK_HEADERS(sys/timepps.h, [], [],
  508. [#if HAVE_SYS_TIME_H
  509. # include <sys/time.h>
  510. #endif
  511. #if HAVE_ERRNO_H
  512. # include <errno.h>
  513. #endif
  514. ])
  515. ])
  516. AC_CHECK_HEADERS(sys/timers.h sys/tpro.h sys/types.h sys/wait.h)
  517. AC_HEADER_TIME
  518. case "$host" in
  519. *-convex-*)
  520. AC_CHECK_HEADERS(/sys/sync/queue.h /sys/sync/sema.h)
  521. ;;
  522. *-*-bsdi*)
  523. AC_CHECK_HEADERS(machine/inline.h sys/pcl720.h sys/i8253.h)
  524. ;;
  525. esac
  526. case "$host" in
  527. *-*-*linux*)
  528. AC_CHECK_FUNCS(__adjtimex __ntp_gettime)
  529. ;;
  530. esac
  531. case "$ac_cv_func___adjtimex" in
  532. yes) ;;
  533. *)
  534. AC_CHECK_LIB(elf, nlist) dnl Only needed for tickadj...
  535. dnl AC_CHECK_LIB(kvm, main, , , -lelf)
  536. AC_CHECK_LIB(kvm, main) dnl We already know about -lelf here...
  537. AC_CHECK_LIB(ld, nlist)
  538. AC_CHECK_LIB(mld, nlist)
  539. AC_CHECK_HEADER(nlist.h,
  540. [AC_DEFINE(NLIST_STRUCT, 1, [nlist stuff])
  541. AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
  542. [AC_TRY_COMPILE([#include <nlist.h>],
  543. [struct nlist n; n.n_un.n_name = 0;],
  544. ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
  545. if test $ac_cv_struct_nlist_n_un = yes; then
  546. AC_DEFINE(NLIST_NAME_UNION, 1, [does struct nlist use a name union?])
  547. fi
  548. ])dnl
  549. ;;
  550. esac
  551. dnl AC_CHECK_HEADERS(net/if.h, [], [],
  552. dnl [#if HAVE_SYS_TYPES_H
  553. dnl # include <sys/types.h>
  554. dnl #endif
  555. dnl #if HAVE_SYS_SOCKET_H
  556. dnl # include <sys/socket.h>
  557. dnl #endif
  558. dnl ])
  559. AC_CHECK_HEADERS(sys/proc.h, [], [],
  560. [#if HAVE_SYS_TYPES_H
  561. # include <sys/types.h>
  562. #endif
  563. #if HAVE_SYS_TIME_H
  564. # include <sys/time.h>
  565. #endif
  566. ])
  567. AC_CHECK_HEADERS(sys/resource.h, [], [],
  568. [#if HAVE_SYS_TIME_H
  569. # include <sys/time.h>
  570. #endif
  571. ])
  572. AC_CHECK_HEADERS(sys/shm.h, [], [],
  573. [#if HAVE_SYS_TYPES_H
  574. # include <sys/types.h>
  575. #endif
  576. #if HAVE_SYS_IPC_H
  577. # include <sys/ipc.h>
  578. #endif
  579. ])
  580. AC_CHECK_HEADERS(sys/timex.h, [], [],
  581. [#if HAVE_SYS_TIME_H
  582. # include <sys/time.h>
  583. #endif
  584. ])
  585. AC_CHECK_HEADERS(resolv.h, [], [],
  586. [#if HAVE_SYS_TYPES_H
  587. #include <sys/types.h>
  588. #endif
  589. #if HAVE_NETINET_IN_H
  590. #include <netinet/in.h>
  591. #endif
  592. #if HAVE_ARPA_NAMESER_H
  593. #include <arpa/nameser.h>
  594. #endif
  595. ])
  596. AC_CACHE_CHECK([for basic volatile support], ac_cv_c_volatile,
  597. [AC_TRY_COMPILE([],[
  598. volatile int x;],
  599. ac_cv_c_volatile=yes,
  600. ac_cv_c_volatile=no)
  601. ])
  602. case "$ac_cv_c_volatile" in
  603. yes)
  604. ;;
  605. *) AC_DEFINE(volatile, , [Does the compiler like "volatile"?])
  606. ;;
  607. esac
  608. #
  609. # following block goes away in 4.2.5
  610. #
  611. # AM_C_PROTOTYPES gives us ansi2knr
  612. case "$build" in
  613. *-*-solaris2*)
  614. # Assume that solaris2 is Ansi C...
  615. ;;
  616. *)
  617. AM_C_PROTOTYPES
  618. ;;
  619. esac
  620. AC_CACHE_CHECK(if C compiler permits function prototypes, ac_cv_have_prototypes,
  621. [AC_TRY_COMPILE([
  622. extern int foo (short);
  623. int foo(short i) { return i; }],[
  624. int i;], ac_cv_have_prototypes=yes, ac_cv_have_prototypes=no)
  625. ])
  626. if test "$ac_cv_have_prototypes" = yes; then
  627. AC_DEFINE(HAVE_PROTOTYPES, 1, [Are function prototypes OK?])
  628. fi
  629. #
  630. # end block
  631. #
  632. AC_C_CONST
  633. AC_C_BIGENDIAN
  634. AC_TYPE_SIGNAL
  635. AC_TYPE_OFF_T
  636. AC_TYPE_SIZE_T
  637. AC_CHECK_TYPE(time_t, long)
  638. AC_CHECK_SIZEOF(time_t)
  639. AC_CHECK_TYPES(uintptr_t)
  640. AH_VERBATIM([TYPEDEF_UINTPTR_T],
  641. [/* Provide a typedef for uintptr_t? */
  642. #ifndef HAVE_UINTPTR_T
  643. typedef unsigned int uintptr_t;
  644. #define HAVE_UINTPTR_T 1
  645. #endif])
  646. AC_STRUCT_TM
  647. AC_CACHE_CHECK([for u_int8_t], ac_cv_type_u_int8_t,
  648. [AC_TRY_COMPILE([#include <sys/types.h>],
  649. [u_int8_t len = 42; return 0;],
  650. ac_cv_type_u_int8_t=yes,
  651. ac_cv_type_u_int8_t=no)
  652. ])
  653. if test $ac_cv_type_u_int8_t = yes; then
  654. AC_DEFINE(HAVE_TYPE_U_INT8_T, 1, [Does u_int8_t exist?])
  655. fi
  656. AC_CACHE_CHECK([for u_int64_t], ac_cv_type_u_int64_t,
  657. [AC_TRY_COMPILE([#include <sys/types.h>],
  658. [u_int64_t len = 42; return 0;],
  659. ac_cv_type_u_int64_t=yes,
  660. ac_cv_type_u_int64_t=no)
  661. ])
  662. if test $ac_cv_type_u_int64_t = yes; then
  663. AC_DEFINE(HAVE_TYPE_U_INT64_T, 1, [Does u_int64_t exist?])
  664. fi
  665. #
  666. # Look for in_port_t.
  667. #
  668. AC_MSG_CHECKING([for in_port_t])
  669. AC_TRY_COMPILE([
  670. #include <sys/types.h>
  671. #include <netinet/in.h>],
  672. [in_port_t port = 25; return (0);],
  673. [AC_MSG_RESULT(yes)
  674. ],
  675. [AC_MSG_RESULT(no)
  676. AC_DEFINE(ISC_PLATFORM_NEEDPORTT, 1, [Do we need our own in_port_t?])
  677. ])
  678. AC_CACHE_CHECK([for a fallback value for HZ], ac_cv_var_default_hz,
  679. [ac_cv_var_default_hz=100
  680. case "$host" in
  681. alpha*-dec-osf4*|alpha*-dec-osf5*)
  682. ac_cv_var_default_hz=1024
  683. ;;
  684. mips-dec-ultrix4*)
  685. ac_cv_var_default_hz=256
  686. ;;
  687. esac])
  688. AC_DEFINE_UNQUOTED(DEFAULT_HZ, $ac_cv_var_default_hz, [What is the fallback value for HZ?])
  689. AC_CACHE_CHECK([if we need to override the system's value for HZ], ac_cv_var_override_hz,
  690. [ac_cv_var_override_hz=no
  691. case "$host" in
  692. alpha*-dec-osf4*|alpha*-dec-osf5*)
  693. ac_cv_var_override_hz=yes
  694. ;;
  695. mips-dec-ultrix4*)
  696. ac_cv_var_override_hz=yes
  697. ;;
  698. *-*-freebsd*)
  699. ac_cv_var_override_hz=yes
  700. ;;
  701. *-*-sunos4*)
  702. ac_cv_var_override_hz=yes
  703. ;;
  704. esac])
  705. case "$ac_cv_var_override_hz" in
  706. yes)
  707. AC_DEFINE(OVERRIDE_HZ, 1, [Do we need to override the system's idea of HZ?])
  708. ;;
  709. esac
  710. dnl AC_CACHE_CHECK(ut_host in struct utmp, ac_cv_func_ut_host_in_utmp,
  711. dnl [AC_TRY_LINK([#include <sys/types.h>
  712. dnl #include <utmp.h>], [struct utmp ut; ut.ut_host;],
  713. dnl ac_cv_func_ut_host_in_utmp=yes, ac_cv_func_ut_host_in_utmp=no)])
  714. dnl if test $su_cv_func_ut_host_in_utmp = yes; then
  715. dnl AC_DEFINE(HAVE_UT_HOST)
  716. dnl fi
  717. dnl AC_MSG_CHECKING(if we can get the system boot time)
  718. dnl AC_CACHE_VAL(su_cv_have_boot_time,
  719. dnl [AC_EGREP_CPP(yes,
  720. dnl [#ifdef HAVE_UTMPX_H
  721. dnl #include <utmpx.h>
  722. dnl #else
  723. dnl #include <utmp.h>
  724. dnl #endif
  725. dnl #ifdef BOOT_TIME
  726. dnl yes
  727. dnl #endif
  728. dnl ], su_cv_have_boot_time=yes, su_cv_have_boot_time=no)])
  729. dnl AC_MSG_RESULT($su_cv_have_boot_time)
  730. AC_CACHE_CHECK([for struct rt_msghdr], ac_cv_struct_rt_msghdr,
  731. [AC_TRY_COMPILE([
  732. #include <sys/types.h>
  733. #include <sys/socket.h>
  734. #include <net/if.h>
  735. #include <net/route.h>],
  736. [struct rt_msghdr p;],
  737. ac_cv_struct_rt_msghdr=yes,
  738. ac_cv_struct_rt_msghdr=no)
  739. ])
  740. if test $ac_cv_struct_rt_msghdr = yes; then
  741. AC_DEFINE(HAS_ROUTING_SOCKET, 1, [Do we have a routing socket (struct rt_msghdr)?])
  742. fi
  743. AC_CACHE_CHECK(
  744. [struct sigaction for sa_sigaction],
  745. ac_cv_struct_sigaction_has_sa_sigaction,
  746. [
  747. AC_TRY_COMPILE(
  748. [#include <signal.h>],
  749. [struct sigaction act; act.sa_sigaction = 0;],
  750. ac_cv_struct_sigaction_has_sa_sigaction=yes,
  751. ac_cv_struct_sigaction_has_sa_sigaction=no
  752. )
  753. ]
  754. )
  755. if test $ac_cv_struct_sigaction_has_sa_sigaction = yes; then
  756. AC_DEFINE(HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION, 1, [Obvious...])
  757. fi
  758. AC_CACHE_CHECK([for struct ppsclockev], ac_cv_struct_ppsclockev,
  759. [AC_TRY_COMPILE([
  760. #include <sys/types.h>
  761. #ifdef HAVE_SYS_TERMIOS_H
  762. # include <sys/termios.h>
  763. #endif
  764. #ifdef HAVE_SYS_TIME_H
  765. # include <sys/time.h>
  766. #endif
  767. #ifdef HAVE_SYS_PPSCLOCK_H
  768. # include <sys/ppsclock.h>
  769. #endif],[
  770. extern struct ppsclockev *pce;
  771. return pce->serial;],
  772. ac_cv_struct_ppsclockev=yes,
  773. ac_cv_struct_ppsclockev=no)
  774. ])
  775. if test $ac_cv_struct_ppsclockev = yes; then
  776. AC_DEFINE(HAVE_STRUCT_PPSCLOCKEV, 1, [Does a system header define struct ppsclockev?])
  777. fi
  778. AC_CACHE_CHECK([struct sockaddr for sa_len], ac_cv_struct_sockaddr_has_sa_len,
  779. [AC_TRY_COMPILE([
  780. #include <sys/types.h>
  781. #include <sys/socket.h>],[
  782. extern struct sockaddr *ps;
  783. return ps->sa_len;],
  784. ac_cv_struct_sockaddr_has_sa_len=yes,
  785. ac_cv_struct_sockaddr_has_sa_len=no)
  786. ])
  787. if test $ac_cv_struct_sockaddr_has_sa_len = yes; then
  788. AC_DEFINE(HAVE_SA_LEN_IN_STRUCT_SOCKADDR, 1, [Should be obvious...])
  789. fi
  790. AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_struct_sockaddr_storage,
  791. [AC_TRY_COMPILE([
  792. #include <sys/types.h>
  793. #include <sys/socket.h>
  794. #include <netinet/in.h>
  795. ],[
  796. struct sockaddr_storage n;],
  797. ac_cv_struct_sockaddr_storage=yes,
  798. ac_cv_struct_sockaddr_storage=no)
  799. ])
  800. if test $ac_cv_struct_sockaddr_storage = yes; then
  801. AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1, [Does a system header define struct sockaddr_storage?])
  802. fi
  803. AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
  804. ac_cv_have_ss_family_in_struct_ss, [
  805. AC_TRY_COMPILE(
  806. [
  807. #include <sys/types.h>
  808. #include <sys/socket.h>
  809. ],
  810. [ struct sockaddr_storage s; s.ss_family = 1; ],
  811. [ ac_cv_have_ss_family_in_struct_ss="yes" ],
  812. [ ac_cv_have_ss_family_in_struct_ss="no" ],
  813. )
  814. ])
  815. if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
  816. AC_DEFINE(HAVE_SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have ss_family?])
  817. else
  818. # Hack around a problem...
  819. # HMS: This is $host because we need the -D if we are building *for* it.
  820. # HMS: 061029: Now that we separate the ss_* checks this is causing
  821. # a problem - disable it until we get to the bottom of it.
  822. case "$host" in
  823. XXX*-*-hpux11.11) CPPFLAGS="$CPPFLAGS -D_NETINET_IN6_H"
  824. ;;
  825. esac
  826. fi
  827. AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
  828. ac_cv_have___ss_family_in_struct_ss, [
  829. AC_TRY_COMPILE(
  830. [
  831. #include <sys/types.h>
  832. #include <sys/socket.h>
  833. ],
  834. [ struct sockaddr_storage s; s.__ss_family = 1; ],
  835. [ ac_cv_have___ss_family_in_struct_ss="yes" ],
  836. [ ac_cv_have___ss_family_in_struct_ss="no" ]
  837. )
  838. ])
  839. if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
  840. AC_DEFINE(HAVE___SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have __ss_family?])
  841. fi
  842. AH_VERBATIM([X_HAVE_SS_FAMILY_IN_SS],
  843. [/* Handle ss_family */
  844. #if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS)
  845. # define ss_family __ss_family
  846. #endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */])
  847. AC_CACHE_CHECK([for ss_len field in struct sockaddr_storage],
  848. ac_cv_have_ss_len_in_struct_ss, [
  849. AC_TRY_COMPILE(
  850. [
  851. #include <sys/types.h>
  852. #include <sys/socket.h>
  853. ],
  854. [ struct sockaddr_storage s; s.ss_len = 1; ],
  855. [ ac_cv_have_ss_len_in_struct_ss="yes" ],
  856. [ ac_cv_have_ss_len_in_struct_ss="no" ],
  857. )
  858. ])
  859. if test "x$ac_cv_have_ss_len_in_struct_ss" = "xyes" ; then
  860. AC_DEFINE(HAVE_SS_LEN_IN_SS, 1, [Does struct sockaddr_storage have ss_len?])
  861. fi
  862. AC_CACHE_CHECK([for __ss_len field in struct sockaddr_storage],
  863. ac_cv_have___ss_len_in_struct_ss, [
  864. AC_TRY_COMPILE(
  865. [
  866. #include <sys/types.h>
  867. #include <sys/socket.h>
  868. ],
  869. [ struct sockaddr_storage s; s.__ss_len = 1; ],
  870. [ ac_cv_have___ss_len_in_struct_ss="yes" ],
  871. [ ac_cv_have___ss_len_in_struct_ss="no" ]
  872. )
  873. ])
  874. if test "x$ac_cv_have___ss_len_in_struct_ss" = "xyes" ; then
  875. AC_DEFINE(HAVE___SS_LEN_IN_SS, 1, [Does struct sockaddr_storage have __ss_len?])
  876. fi
  877. AH_VERBATIM([X_HAVE_SS_LEN_IN_SS],
  878. [/* Handle ss_len */
  879. #if !defined(HAVE_SS_LEN_IN_SS) && defined(HAVE___SS_LEN_IN_SS)
  880. # define ss_len __ss_len
  881. #endif /* !defined(HAVE_SS_LEN_IN_SS) && defined(HAVE_SA_LEN_IN_SS) */])
  882. case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
  883. *yes*)
  884. AC_CACHE_CHECK([for struct snd_size], ac_cv_struct_snd_size,
  885. [AC_TRY_COMPILE([
  886. #ifdef HAVE_MACHINE_SOUNDCARD_H
  887. # include <machine/soundcard.h>
  888. #endif
  889. #ifdef HAVE_SYS_SOUNDCARD_H
  890. # include <sys/soundcard.h>
  891. #endif],[
  892. extern struct snd_size *ss;
  893. return ss->rec_size;],
  894. ac_cv_struct_snd_size=yes,
  895. ac_cv_struct_snd_size=no)
  896. ])
  897. case "$ac_cv_struct_snd_size" in
  898. yes) AC_DEFINE(HAVE_STRUCT_SND_SIZE, 1,[Do we have struct snd_size?]) ;;
  899. esac
  900. ;;
  901. esac
  902. AC_CACHE_CHECK([struct clockinfo for hz], ac_cv_struct_clockinfo_has_hz,
  903. [AC_TRY_COMPILE([
  904. #include <sys/time.h>],[
  905. extern struct clockinfo *pc;
  906. return pc->hz;],
  907. ac_cv_struct_clockinfo_has_hz=yes,
  908. ac_cv_struct_clockinfo_has_hz=no)
  909. ])
  910. if test $ac_cv_struct_clockinfo_has_hz = yes; then
  911. AC_DEFINE(HAVE_HZ_IN_STRUCT_CLOCKINFO, 1, [Obvious...])
  912. fi
  913. AC_CACHE_CHECK([struct clockinfo for tickadj], ac_cv_struct_clockinfo_has_tickadj,
  914. [AC_TRY_COMPILE([
  915. #include <sys/time.h>],[
  916. extern struct clockinfo *pc;
  917. return pc->tickadj;],
  918. ac_cv_struct_clockinfo_has_tickadj=yes,
  919. ac_cv_struct_clockinfo_has_tickadj=no)
  920. ])
  921. if test $ac_cv_struct_clockinfo_has_tickadj = yes; then
  922. AC_DEFINE(HAVE_TICKADJ_IN_STRUCT_CLOCKINFO, 1, [Obvious...])
  923. fi
  924. AC_CACHE_CHECK([for struct timespec], ac_cv_struct_timespec,
  925. [AC_TRY_COMPILE([
  926. #include <sys/time.h>
  927. /* Under SunOS, timespec is in sys/timepps.h, which needs errno.h and FRAC */
  928. #ifdef HAVE_ERRNO_H
  929. # include <errno.h>
  930. #endif
  931. #ifdef HAVE_SYS_TIMEPPS_H
  932. # define FRAC 4294967296
  933. # include <sys/timepps.h>
  934. #endif],
  935. [struct timespec n;],
  936. ac_cv_struct_timespec=yes, ac_cv_struct_timespec=no)])
  937. if test $ac_cv_struct_timespec = yes; then
  938. AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1, [Do we have struct timespec?])
  939. fi
  940. AC_CACHE_CHECK([for struct ntptimeval], ac_cv_struct_ntptimeval,
  941. [AC_TRY_COMPILE([
  942. #include <sys/time.h>
  943. #include <sys/timex.h>],
  944. [struct ntptimeval n;],
  945. ac_cv_struct_ntptimeval=yes, ac_cv_struct_ntptimeval=no)])
  946. if test $ac_cv_struct_ntptimeval = yes; then
  947. AC_DEFINE(HAVE_STRUCT_NTPTIMEVAL, 1, [Do we have struct ntptimeval?])
  948. fi
  949. AC_CHECK_MEMBERS([struct ntptimeval.time.tv_nsec], , ,
  950. [#ifdef HAVE_SYS_TIME_H
  951. #include <sys/time.h>
  952. #else
  953. # ifdef HAVE_TIME_H
  954. # include <time.h>
  955. # endif
  956. #endif
  957. #ifdef HAVE_SYS_TIMEX_H
  958. #include <sys/timex.h>
  959. #else
  960. # ifdef HAVE_TIMEX_H
  961. # include <timex.h>
  962. # endif
  963. #endif])
  964. AC_C_INLINE
  965. case "$ac_cv_c_inline" in
  966. '')
  967. ;;
  968. *)
  969. AC_DEFINE(HAVE_INLINE,1,[inline keyword or macro available])
  970. AC_SUBST(HAVE_INLINE)
  971. esac
  972. AC_C_CHAR_UNSIGNED dnl CROSS_COMPILE?
  973. AC_CHECK_SIZEOF(signed char)
  974. AC_CHECK_SIZEOF(int)
  975. AC_CHECK_SIZEOF(long)
  976. AC_CHECK_TYPES([s_char])
  977. case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
  978. *yes)
  979. # We have a typedef for s_char. Might as well believe it...
  980. ;;
  981. no0no)
  982. # We have signed chars, can't say 'signed char', no s_char typedef.
  983. AC_DEFINE(NEED_S_CHAR_TYPEDEF, 1, [Do we need an s_char typedef?])
  984. ;;
  985. no1no)
  986. # We have signed chars, can say 'signed char', no s_char typedef.
  987. AC_DEFINE(NEED_S_CHAR_TYPEDEF)
  988. ;;
  989. yes0no)
  990. # We have unsigned chars, can't say 'signed char', no s_char typedef.
  991. AC_MSG_ERROR(No way to specify a signed character!)
  992. ;;
  993. yes1no)
  994. # We have unsigned chars, can say 'signed char', no s_char typedef.
  995. AC_DEFINE(NEED_S_CHAR_TYPEDEF)
  996. ;;
  997. esac
  998. AC_TYPE_UID_T
  999. case "$host" in
  1000. *-*-aix[[456]]*)
  1001. # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
  1002. # (returning ENOSYS). I didn't check 4.2. If, in the future,
  1003. # IBM pulls its thumbs out long enough to implement clock_settime,
  1004. # this conditional will need to change. Maybe use AC_TRY_RUN
  1005. # instead to try to set the time to itself and check errno.
  1006. ;;
  1007. *) AC_CHECK_FUNCS(clock_gettime clock_settime)
  1008. ;;
  1009. esac
  1010. AC_CHECK_FUNCS(daemon)
  1011. AC_CHECK_FUNCS(finite, ,
  1012. [AC_CHECK_FUNCS(isfinite, ,
  1013. [AC_MSG_CHECKING([for isfinite with <math.h>])
  1014. _libs=$LIBS
  1015. LIBS="$LIBS -lm"
  1016. AC_TRY_LINK([#include <math.h>], [float f = 0.0; isfinite(f)],
  1017. [AC_MSG_RESULT(yes)
  1018. AC_DEFINE(HAVE_ISFINITE)],
  1019. AC_MSG_RESULT(no))
  1020. LIBS=$_libs])])
  1021. AC_CHECK_FUNCS(getbootfile getclock getdtablesize)
  1022. AC_ARG_ENABLE(getifaddrs,
  1023. AC_HELP_STRING([--enable-getifaddrs],
  1024. [s Enable the use of getifaddrs() [[yes|no|glibc]].
  1025. glibc: Use getifaddrs() in glibc if you know it supports IPv6.]),
  1026. want_getifaddrs="$enableval", want_getifaddrs="yes")
  1027. case $want_getifaddrs in
  1028. yes|glibc)
  1029. #
  1030. # Do we have getifaddrs() ?
  1031. #
  1032. case $host in
  1033. *-*linux*)
  1034. # Some recent versions of glibc support getifaddrs() which does not
  1035. # provide AF_INET6 addresses while the function provided by the USAGI
  1036. # project handles the AF_INET6 case correctly. We need to avoid
  1037. # using the former but prefer the latter unless overridden by
  1038. # --enable-getifaddrs=glibc.
  1039. if test $want_getifaddrs = glibc
  1040. then
  1041. AC_CHECK_FUNCS(getifaddrs)
  1042. else
  1043. save_LIBS="$LIBS"
  1044. LIBS="-L/usr/local/v6/lib $LIBS"
  1045. AC_CHECK_LIB(inet6, getifaddrs,
  1046. LIBS="$LIBS -linet6"
  1047. AC_DEFINE(HAVE_GETIFADDRS),
  1048. LIBS=${save_LIBS})
  1049. fi
  1050. ;;
  1051. *)
  1052. AC_CHECK_FUNCS(getifaddrs)
  1053. ;;
  1054. esac
  1055. ;;
  1056. no)
  1057. ;;
  1058. esac
  1059. AC_MSG_CHECKING([type of socklen arg for getsockname()])
  1060. AC_CACHE_VAL(ac_cv_func_getsockname_arg2,dnl
  1061. [AC_CACHE_VAL(ac_cv_func_getsockname_socklen_type,dnl
  1062. [for ac_cv_func_getsockname_arg2 in 'struct sockaddr *' 'void *'; do
  1063. for ac_cv_func_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
  1064. AC_TRY_COMPILE(dnl
  1065. [#ifdef HAVE_SYS_TYPES_H
  1066. #include <sys/types.h>
  1067. #endif
  1068. #ifdef HAVE_SYS_SOCKET_H
  1069. #include <sys/socket.h>
  1070. #endif
  1071. extern getsockname (int, $ac_cv_func_getsockname_arg2, $ac_cv_func_getsockname_socklen_type *);],,dnl
  1072. [ac_not_found=no ; break 2], ac_not_found=yes)
  1073. done
  1074. done
  1075. ])dnl AC_CACHE_VAL
  1076. ])dnl AC_CACHE_VAL
  1077. if test "$ac_not_found" = yes; then
  1078. ac_cv_func_getsockname_socklen_type='socklen_t'
  1079. fi
  1080. AC_MSG_RESULT([$ac_cv_func_getsockname_socklen_type])
  1081. AC_DEFINE_UNQUOTED([GETSOCKNAME_SOCKLEN_TYPE],
  1082. $ac_cv_func_getsockname_socklen_type,
  1083. [What is getsockname()'s socklen type?])
  1084. AC_CHECK_FUNCS(getrusage)
  1085. AC_CHECK_FUNC(gettimeofday, ,[
  1086. case "$host" in
  1087. *-*-mpeix*) ac_cv_func_gettimeofday=yes
  1088. ;;
  1089. esac])
  1090. case "$host" in
  1091. *-pc-cygwin*)
  1092. ;;
  1093. *) AC_CHECK_FUNCS(getuid)
  1094. ;;
  1095. esac
  1096. AC_CHECK_FUNCS(hstrerror)
  1097. #
  1098. # Check for if_nametoindex() for IPv6 scoped addresses support
  1099. #
  1100. AC_CHECK_FUNC(if_nametoindex, ac_cv_have_if_nametoindex=yes,
  1101. ac_cv_have_if_nametoindex=no)
  1102. case $ac_cv_have_if_nametoindex in
  1103. no)
  1104. case "$host" in
  1105. *-hp-hpux*)
  1106. AC_CHECK_LIB(ipv6, if_nametoindex,
  1107. ac_cv_have_if_nametoindex=yes
  1108. LIBS="-lipv6 $LIBS",)
  1109. ;;
  1110. esac
  1111. esac
  1112. case $ac_cv_have_if_nametoindex in
  1113. yes)
  1114. AC_DEFINE(ISC_PLATFORM_HAVEIFNAMETOINDEX, 1, [ISC: do we have if_nametoindex()?])
  1115. ;;
  1116. esac
  1117. AC_CHECK_FUNC(inet_ntop, [], [AC_DEFINE(ISC_PLATFORM_NEEDNTOP, 1, [ISC: provide inet_ntop()])])
  1118. AC_CHECK_FUNC(inet_pton, [], [AC_DEFINE(ISC_PLATFORM_NEEDPTON, 1, [ISC: provide inet_pton()])])
  1119. AC_CHECK_FUNC(inet_aton, [], [AC_DEFINE(ISC_PLATFORM_NEEDATON, 1, [ISC: provide inet_aton()])])
  1120. AC_CHECK_FUNCS(K_open kvm_open memcpy memmove memset)
  1121. case "$host" in
  1122. *-*-sco3.2v5.0.*)
  1123. # Just stubs. Idiots.
  1124. ;;
  1125. *) AC_CHECK_FUNCS(mkstemp)
  1126. ;;
  1127. esac
  1128. AC_CHECK_FUNCS(mktime)
  1129. case "$host" in
  1130. *-*-aix[[456]]*)
  1131. # Just a stub. Idiots.
  1132. ;;
  1133. *-*-irix[[45]]*)
  1134. # Just a stub in "old" Irix. Idiots.
  1135. ;;
  1136. *-*-*linux*)
  1137. # there, but more trouble than it is worth for now (resolver problems)
  1138. ;;
  1139. *-*-qnx*)
  1140. # Apparently there but not working in QNX. Idiots?
  1141. ;;
  1142. *-*-sco3.2v5.0.*)
  1143. # Just a stub. Idiots.
  1144. ;;
  1145. alpha*-dec-osf4*|alpha*-dec-osf5*)
  1146. # mlockall is there, as a #define calling memlk via <sys/mman.h>
  1147. # Not easy to test for - cheat.
  1148. AC_CHECK_FUNCS(memlk, [ac_cv_func_mlockall='yes'])
  1149. AC_CHECK_FUNCS(mlockall)
  1150. ;;
  1151. *) AC_CHECK_FUNCS(mlockall)
  1152. ;;
  1153. esac
  1154. AC_CHECK_FUNCS(nice nlist)
  1155. case "$host" in
  1156. *-*-solaris2.6)
  1157. # Broken...
  1158. ;;
  1159. *) AC_CHECK_FUNCS(ntp_adjtime ntp_gettime)
  1160. ;;
  1161. esac
  1162. AC_CHECK_FUNCS(plock pututline pututxline readlink recvmsg rtprio)
  1163. case "$host" in
  1164. *-*-aix[[456]]*)
  1165. # Just a stub in AIX 4. Idiots.
  1166. ;;
  1167. *-*-solaris2.5*)
  1168. # Just stubs in solaris2.5. Idiots.
  1169. ;;
  1170. *) AC_CHECK_FUNCS(sched_setscheduler)
  1171. ;;
  1172. esac
  1173. AC_CHECK_FUNCS(setlinebuf setpgid setpriority setsid)
  1174. AC_CHECK_FUNCS(setrlimit)
  1175. AC_CHECK_FUNCS(settimeofday, ,[
  1176. case "$host" in
  1177. *-*-mpeix*) ac_cv_func_settimeofday=yes
  1178. ;;
  1179. esac])
  1180. AC_CHECK_FUNCS(setvbuf sigaction)
  1181. AC_CHECK_FUNCS(sigvec sigset sigsuspend stime strchr sysconf sysctl)
  1182. AC_CHECK_FUNCS(snprintf strdup strerror strstr)
  1183. AC_CHECK_FUNCS(timegm)
  1184. case "$host" in
  1185. *-*-aix[[456]]*)
  1186. # Just stubs. Idiots.
  1187. ;;
  1188. *-*-netbsd1*)
  1189. # Just stubs. Idiots.
  1190. ;;
  1191. *-*-netbsdelf1*)
  1192. # Just stubs. Idiots.
  1193. ;;
  1194. *-*-openbsd*)
  1195. # Just stubs. Idiots.
  1196. ;;
  1197. *) AC_CHECK_FUNCS(timer_create timer_settime)
  1198. ;;
  1199. esac
  1200. case "$host" in
  1201. *-pc-cygwin*)
  1202. # I have no idea...
  1203. ;;
  1204. *) AC_CHECK_FUNCS(umask)
  1205. ;;
  1206. esac
  1207. AC_CHECK_FUNCS(uname updwtmp updwtmpx vsnprintf vsprintf)
  1208. ###
  1209. # http://bugs.ntp.org/737
  1210. case "$ac_cv_func_recvmsg" in
  1211. yes)
  1212. AC_MSG_CHECKING([if we need extra help to define struct iovec])
  1213. AC_CACHE_VAL(ac_cv_struct_iovec_help,dnl
  1214. [for ac_cv_struct_iovec_help in '0' '1'; do
  1215. AC_TRY_COMPILE(dnl
  1216. [#ifdef HAVE_SYS_TYPES_H
  1217. #include <sys/types.h>
  1218. #endif
  1219. #ifdef HAVE_SYS_SOCKET_H
  1220. #include <sys/socket.h>
  1221. #endif
  1222. #if $ac_cv_struct_iovec_help
  1223. #include <sys/uio.h>
  1224. #endif
  1225. void foo();
  1226. void foo() {
  1227. ssize_t x;
  1228. int s = 0;
  1229. struct iovec iov;
  1230. struct msghdr mh;
  1231. int flags = 0;
  1232. mh.msg_iov = &iov;
  1233. x = recvmsg(s, &mh, flags);
  1234. }],,dnl
  1235. [ac_worked=yes ; break 1], ac_worked=no)
  1236. done
  1237. ])dnl AC_CACHE_VAL
  1238. case "$ac_worked$ac_cv_struct_iovec_help" in
  1239. yes1)
  1240. AC_DEFINE(HAVE_SYS_UIO_H, 1, [Use sys/uio.h for struct iovec help])
  1241. ans=yes
  1242. ;;
  1243. *) ans=no
  1244. esac
  1245. AC_MSG_RESULT([$ans])
  1246. ;;
  1247. esac
  1248. case "$host" in
  1249. *-*-sunos4*)
  1250. AC_DEFINE(SPRINTF_CHAR, 1, [*s*printf() functions are char*])
  1251. ;;
  1252. esac
  1253. AC_CACHE_CHECK([number of arguments to gettimeofday()], ac_cv_func_Xettimeofday_nargs,
  1254. [AC_TRY_COMPILE([#include <sys/time.h>],[
  1255. gettimeofday((struct timeval*)0,(struct timezone*)0);
  1256. settimeofday((struct timeval*)0,(struct timezone*)0);
  1257. ],
  1258. ac_cv_func_Xettimeofday_nargs=2, ac_cv_func_Xettimeofday_nargs=1)
  1259. ])
  1260. if test $ac_cv_func_Xettimeofday_nargs = 1; then
  1261. AC_DEFINE(SYSV_TIMEOFDAY, 1, [Does Xettimeofday take 1 arg?])
  1262. fi
  1263. AC_CACHE_CHECK([number of arguments taken by setpgrp()], ac_cv_func_setpgrp_nargs,
  1264. [AC_TRY_COMPILE([
  1265. #ifdef HAVE_SYS_TYPES_H
  1266. # include <sys/types.h>
  1267. #endif
  1268. #ifdef HAVE_UNISTD_H
  1269. # include <unistd.h>
  1270. #endif
  1271. ],[setpgrp(0,0);],
  1272. ac_cv_func_setpgrp_nargs=2, ac_cv_func_setpgrp_nargs=0)
  1273. ])
  1274. if test $ac_cv_func_setpgrp_nargs = 0; then
  1275. AC_DEFINE(HAVE_SETPGRP_0, 1, [define if setpgrp takes 0 arguments])
  1276. fi
  1277. save_CFLAGS=$CFLAGS
  1278. CFLAGS="$CFLAGS -I$srcdir/include"
  1279. AC_CACHE_CHECK([argument pointer type of qsort()'s compare function and base],
  1280. ac_cv_func_qsort_argtype,
  1281. [AC_TRY_COMPILE([
  1282. #include "l_stdlib.h"
  1283. #ifdef HAVE_PROTOTYPES
  1284. #define P(x) x
  1285. #else
  1286. #define P(x) ()
  1287. #endif
  1288. extern void *base;
  1289. extern sortfunc P((const void *, const void *));
  1290. int sortfunc(a, b)
  1291. const void *a;
  1292. const void *b; { return 0; }
  1293. ],[
  1294. qsort(base, 2, sizeof(char *), sortfunc);
  1295. ],
  1296. ac_cv_func_qsort_argtype=void, ac_cv_func_qsort_argtype=char)
  1297. ])
  1298. case "$ac_cv_func_qsort_argtype" in
  1299. void)
  1300. AC_DEFINE(QSORT_USES_VOID_P, 1, [Does qsort expect to work on "void *" stuff?])
  1301. ;;
  1302. esac
  1303. CFLAGS=$save_CFLAGS
  1304. AC_CACHE_CHECK([if we need to declare 'errno'], ac_cv_decl_errno,
  1305. [AC_TRY_COMPILE([#ifdef HAVE_ERRNO_H
  1306. #include <errno.h>
  1307. #endif],
  1308. [errno = 0;],
  1309. ac_cv_decl_errno=no, ac_cv_decl_errno=yes)])
  1310. case "$ac_cv_decl_errno" in
  1311. yes) AC_DEFINE(DECL_ERRNO, 1, [Declare errno?]) ;;
  1312. esac
  1313. dnl FIXME: from ntpd/ntp_intres.c, but there's no info which header produces
  1314. dnl the clash. <resolv.h> isn't currently used.
  1315. dnl
  1316. dnl (prr) aix 4.3 defines h_errno as (*(int *)h_errno_which()) for
  1317. dnl MT purposes. This makes the line "extern int h_errno" choke
  1318. dnl the compiler. Hopefully adding !defined(h_errno) fixes this
  1319. dnl without breaking any other platforms.
  1320. dnl
  1321. AC_CACHE_CHECK([if we may declare 'h_errno'], ac_cv_decl_h_errno,
  1322. [AC_TRY_COMPILE([#include <sys/types.h>
  1323. #ifdef HAVE_NETINET_IN_H
  1324. #include <netinet/in.h>
  1325. #endif
  1326. #ifdef HAVE_ARPA_NAMESER_H
  1327. #include <arpa/nameser.h>
  1328. #endif
  1329. #ifdef HAVE_NETDB_H
  1330. #include <netdb.h>
  1331. #endif
  1332. #ifdef HAVE_RESOLV_H
  1333. #include <resolv.h>
  1334. #endif],
  1335. [extern int h_errno;],
  1336. ac_cv_decl_h_errno=yes, ac_cv_decl_h_errno=no)])
  1337. case "$ac_cv_decl_h_errno" in
  1338. yes) AC_DEFINE(DECL_H_ERRNO, 1, [Declare h_errno?]) ;;
  1339. esac
  1340. dnl See if char *sys_errlist[] is OK.
  1341. AC_CACHE_CHECK([[if declaring 'char *sys_errlist[]' is ok]], ac_cv_decl_sys_errlist,
  1342. [AC_TRY_COMPILE([#include <stdio.h>
  1343. #ifdef HAVE_ERRNO_H
  1344. #include <errno.h>
  1345. #endif],
  1346. [extern char *sys_errlist[];
  1347. ],
  1348. ac_cv_decl_sys_errlist=yes, ac_cv_decl_sys_errlist=no)])
  1349. case "$ac_cv_decl_sys_errlist" in
  1350. yes) AC_DEFINE(CHAR_SYS_ERRLIST, 1, [Declare char *sys_errlist array]) ;;
  1351. esac
  1352. AC_CACHE_CHECK([if declaring 'syscall()' is ok], ac_cv_decl_syscall,
  1353. [AC_TRY_COMPILE([
  1354. #ifdef HAVE_SYS_TYPES_H
  1355. # include <sys/types.h>
  1356. #endif
  1357. #ifdef HAVE_UNISTD_H
  1358. # include <unistd.h>
  1359. #endif
  1360. #ifdef HAVE_PROTOTYPES
  1361. #define P(x) x
  1362. #else
  1363. #define P(x) ()
  1364. #endif
  1365. ],
  1366. [extern int syscall P((int, ...));],
  1367. ac_cv_decl_syscall=yes, ac_cv_decl_syscall=no)])
  1368. case "$ac_cv_decl_syscall" in
  1369. yes) AC_DEFINE(DECL_SYSCALL, 1, [Declare syscall()?]) ;;
  1370. esac
  1371. case "$host" in
  1372. *-*-aix4.3.*)
  1373. AC_DEFINE(DECL_HSTRERROR_0, 1, [Declaration style]) # Needed for XLC under AIX 4.3.2
  1374. ;;
  1375. *-*-mpeix*)
  1376. AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
  1377. AC_DEFINE(DECL_INET_NTOA_0, 1, [Declaration style])
  1378. AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
  1379. AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
  1380. AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
  1381. AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
  1382. AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
  1383. ;;
  1384. *-*-osf[[45]]*)
  1385. AC_DEFINE(DECL_PLOCK_0, 1, [Declaration style])
  1386. AC_DEFINE(DECL_STIME_1, 1, [Declaration style])
  1387. ;;
  1388. *-*-qnx*)
  1389. AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
  1390. ;;
  1391. *-*-riscos4*)
  1392. AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
  1393. AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
  1394. AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
  1395. AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
  1396. AC_DEFINE(DECL_MEMMOVE_0, 1, [Declaration style])
  1397. AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
  1398. AC_DEFINE(DECL_RENAME_0, 1, [Declaration style])
  1399. AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
  1400. AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
  1401. AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
  1402. AC_DEFINE(DECL_STDIO_0, 1, [Declaration style])
  1403. AC_DEFINE(DECL_STRTOL_0, 1, [Declaration style])
  1404. AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
  1405. AC_DEFINE(DECL_TIME_0, 1, [Declaration style])
  1406. AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
  1407. AC_DEFINE(DECL_TOLOWER_0, 1, [Declaration style])
  1408. ;;
  1409. *-*-solaris2*)
  1410. AC_DEFINE(DECL_MKSTEMP_0, 1, [Declaration style])
  1411. AC_DEFINE(DECL_SETPRIORITY_1, 1, [Declaration style])
  1412. case "$host" in
  1413. *-*-solaris2.4)
  1414. AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
  1415. ;;
  1416. esac
  1417. ;;
  1418. *-*-sunos4*)
  1419. AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
  1420. AC_DEFINE(DECL_BCOPY_0, 1, [Declaration style])
  1421. AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
  1422. AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
  1423. AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
  1424. AC_DEFINE(DECL_MEMMOVE_0, 1, [Declaration style])
  1425. AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
  1426. AC_DEFINE(DECL_MKSTEMP_0, 1, [Declaration style])
  1427. AC_DEFINE(DECL_RENAME_0, 1, [Declaration style])
  1428. AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
  1429. AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
  1430. AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
  1431. AC_DEFINE(DECL_SIGVEC_0, 1, [Declaration style])
  1432. case "`basename $ac_cv_prog_CC`" in
  1433. acc*) ;;
  1434. *) AC_DEFINE(DECL_STDIO_0, 1, [Declaration style])
  1435. ;;
  1436. esac
  1437. AC_DEFINE(DECL_STRTOL_0, 1, [Declaration style])
  1438. AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
  1439. AC_DEFINE(DECL_TIME_0, 1, [Declaration style])
  1440. AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
  1441. AC_DEFINE(DECL_TOLOWER_0, 1, [Declaration style])
  1442. AC_DEFINE(DECL_TOUPPER_0, 1, [Declaration style])
  1443. AC_DEFINE(DECL_STRERROR_0, 1, [Declaration style])
  1444. ;;
  1445. *-*-ultrix4*)
  1446. AC_DEFINE(DECL_ADJTIME_0, 1, [Declaration style])
  1447. AC_DEFINE(DECL_BZERO_0, 1, [Declaration style])
  1448. AC_DEFINE(DECL_CFSETISPEED_0, 1, [Declaration style])
  1449. AC_DEFINE(DECL_IOCTL_0, 1, [Declaration style])
  1450. AC_DEFINE(DECL_IPC_0, 1, [Declaration style])
  1451. AC_DEFINE(DECL_MKTEMP_0, 1, [Declaration style])
  1452. AC_DEFINE(DECL_NLIST_0, 1, [Declaration style])
  1453. AC_DEFINE(DECL_PLOCK_0, 1, [Declaration style])
  1454. AC_DEFINE(DECL_SELECT_0, 1, [Declaration style])
  1455. AC_DEFINE(DECL_SETITIMER_0, 1, [Declaration style])
  1456. AC_DEFINE(DECL_SETPRIORITY_0, 1, [Declaration style])
  1457. AC_DEFINE(DECL_STIME_0, 1, [Declaration style])
  1458. AC_DEFINE(DECL_SYSLOG_0, 1, [Declaration style])
  1459. AC_DEFINE(DECL_TIMEOFDAY_0, 1, [Declaration style])
  1460. ;;
  1461. esac
  1462. case "$host" in
  1463. *-*-sco3.2*)
  1464. AC_DEFINE(TERMIOS_NEEDS__SVID3, 1, [Do we need to #define _SVID3 when we #include <termios.h>?])
  1465. ;;
  1466. esac
  1467. AC_CACHE_CHECK([if we need extra room for SO_RCVBUF], ac_cv_var_rcvbuf_slop,
  1468. [ans=no
  1469. case "$host" in
  1470. *-*-hpux[[567]]*)
  1471. ans=yes
  1472. ;;
  1473. esac
  1474. ac_cv_var_rcvbuf_slop=$ans])
  1475. case "$ac_cv_var_rcvbuf_slop" in
  1476. yes) AC_DEFINE(NEED_RCVBUF_SLOP, 1, [Do we need extra room for SO_RCVBUF? (HPUX <8)]) ;;
  1477. esac
  1478. AC_CACHE_CHECK([if we will open the broadcast socket], ac_cv_var_open_bcast_socket,
  1479. [ans=yes
  1480. case "$host" in
  1481. *-*-domainos)
  1482. ans=no
  1483. ;;
  1484. esac
  1485. ac_cv_var_open_bcast_socket=$ans])
  1486. case "$ac_cv_var_open_bcast_socket" in
  1487. yes) AC_DEFINE(OPEN_BCAST_SOCKET, 1, [Should we open the broadcast socket?]) ;;
  1488. esac
  1489. AC_CACHE_CHECK([if we want the HPUX version of FindConfig()], ac_cv_var_hpux_findconfig,
  1490. [ans=no
  1491. case "$host" in
  1492. *-*-hpux*)
  1493. ans=yes
  1494. ;;
  1495. esac
  1496. ac_cv_var_hpux_findconfig=$ans])
  1497. case "$ac_cv_var_hpux_findconfig" in
  1498. yes) AC_DEFINE(NEED_HPUX_FINDCONFIG, 1, [Do we want the HPUX FindConfig()?]) ;;
  1499. esac
  1500. AC_CACHE_CHECK([if process groups are set with -pid], ac_cv_arg_setpgrp_negpid,
  1501. [case "$host" in
  1502. *-*-hpux[[567]]*)
  1503. ans=no
  1504. ;;
  1505. *-*-hpux*)
  1506. ans=yes
  1507. ;;
  1508. *-*-*linux*)
  1509. ans=yes
  1510. ;;
  1511. *-*-sunos3*)
  1512. ans=yes
  1513. ;;
  1514. *-*-ultrix2*)
  1515. ans=yes
  1516. ;;
  1517. *)
  1518. ans=no
  1519. ;;
  1520. esac
  1521. ac_cv_arg_setpgrp_negpid=$ans])
  1522. case "$ac_cv_arg_setpgrp_negpid" in
  1523. yes) AC_DEFINE(UDP_BACKWARDS_SETOWN, 1, [Do we set process groups with -pid?]) ;;
  1524. esac
  1525. AC_CACHE_CHECK([if we need a ctty for F_SETOWN], ac_cv_func_ctty_for_f_setown,
  1526. [[case "$host" in
  1527. *-*-bsdi[23]*)
  1528. ans=yes
  1529. ;;
  1530. *-*-freebsd*)
  1531. ans=yes
  1532. ;;
  1533. *-*-netbsd*3.[0-8]*|*-*-netbsd*[0-2].*|*-*-netbsd*3.99.[0-7])
  1534. ans=yes
  1535. ;;
  1536. *-*-openbsd*)
  1537. ans=yes
  1538. ;;
  1539. *-*-osf*)
  1540. ans=yes
  1541. ;;
  1542. *-*-darwin*)
  1543. ans=yes
  1544. ;;
  1545. *) ans=no
  1546. ;;
  1547. esac
  1548. ac_cv_func_ctty_for_f_setown=$ans]])
  1549. case "$ac_cv_func_ctty_for_f_setown" in
  1550. yes) AC_DEFINE(USE_FSETOWNCTTY, 1, [Must we have a CTTY for fsetown?]) ;;
  1551. esac
  1552. AC_CACHE_CHECK([if the OS fails to clear cached routes when more specific routes become available], ac_cv_os_routeupdates,
  1553. [[case "$host" in
  1554. *-*-netbsd*)
  1555. ans=yes
  1556. ;;
  1557. *) ans=no
  1558. ;;
  1559. esac
  1560. ac_cv_os_routeupdates=$ans]])
  1561. case "$ac_cv_os_routeupdates" in
  1562. yes) AC_DEFINE(OS_MISSES_SPECIFIC_ROUTE_UPDATES, 1, [need to recreate sockets on changed routing?]) ;;
  1563. esac
  1564. AC_CACHE_CHECK([if the OS needs the wildcard socket set to REUSEADDR for binding interface addresses], ac_cv_os_wildcardreuse,
  1565. [[case "$host" in
  1566. *-*-*linux*)
  1567. ans=yes
  1568. ;;
  1569. *) ans=no
  1570. ;;
  1571. esac
  1572. ac_cv_os_wildcardreuse=$ans]])
  1573. case "$ac_cv_os_wildcardreuse" in
  1574. yes) AC_DEFINE(OS_NEEDS_REUSEADDR_FOR_IFADDRBIND, 1, [wildcard socket needs to set REUSEADDR when binding to interface addresses]) ;;
  1575. esac
  1576. ntp_warning='GRONK'
  1577. AC_MSG_CHECKING([if we'll use clock_settime or settimeofday or stime])
  1578. case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
  1579. yes*)
  1580. ntp_warning=''
  1581. ans='clock_settime()'
  1582. ;;
  1583. noyes*)
  1584. ntp_warning='But clock_settime() would be better (if we had it)'
  1585. ans='settimeofday()'
  1586. ;;
  1587. nonoyes)
  1588. ntp_warning='Which is the worst of the three'
  1589. ans='stime()'
  1590. ;;
  1591. *)
  1592. case "$build" in
  1593. $host) ntp_warning='Which leaves us with nothing to use!'
  1594. ans=none
  1595. ;;
  1596. esac
  1597. esac
  1598. AC_MSG_RESULT([$ans])
  1599. case "$ntp_warning" in
  1600. '') ;;
  1601. *) AC_MSG_WARN([*** $ntp_warning ***])
  1602. ;;
  1603. esac
  1604. AC_CACHE_CHECK([if we have a losing syscall()], ac_cv_var_syscall_bug,
  1605. [case "$host" in
  1606. *-*-solaris2.4*)
  1607. ans=yes
  1608. ;;
  1609. *) ans=no
  1610. ;;
  1611. esac
  1612. ac_cv_var_syscall_bug=$ans])
  1613. case "$ac_cv_var_syscall_bug" in
  1614. yes) AC_DEFINE(SYSCALL_BUG, 1, [Buggy syscall() (Solaris2.4)?]) ;;
  1615. esac
  1616. AC_CACHE_CHECK([for SIGIO], ac_cv_hdr_def_sigio,
  1617. AC_EGREP_CPP(yes,
  1618. [#include <signal.h>
  1619. #ifdef SIGIO
  1620. yes
  1621. #endif
  1622. ], ac_cv_hdr_def_sigio=yes, ac_cv_hdr_def_sigio=no))
  1623. dnl Override those system that have a losing SIGIO
  1624. AC_CACHE_CHECK([if we want to use signalled IO], ac_cv_var_signalled_io,
  1625. [ans=no
  1626. case "$ac_cv_hdr_def_sigio" in
  1627. yes)
  1628. ans=yes
  1629. case "$host" in
  1630. alpha*-dec-osf4*|alpha*-dec-osf5*)
  1631. ans=no
  1632. ;;
  1633. *-convex-*)
  1634. ans=no
  1635. ;;
  1636. *-dec-*)
  1637. ans=no
  1638. ;;
  1639. *-pc-cygwin*)
  1640. ans=no
  1641. ;;
  1642. *-sni-sysv*)
  1643. ans=no
  1644. ;;
  1645. *-univel-sysv*)
  1646. ans=no
  1647. ;;
  1648. *-*-irix6*)
  1649. ans=no
  1650. ;;
  1651. *-*-freebsd*)
  1652. ans=no
  1653. ;;
  1654. *-*-*linux*)
  1655. ans=no
  1656. ;;
  1657. *-*-unicosmp*)
  1658. ans=no
  1659. ;;
  1660. esac
  1661. ;;
  1662. esac
  1663. ac_cv_var_signalled_io=$ans])
  1664. case "$ac_cv_var_signalled_io" in
  1665. yes) AC_DEFINE(HAVE_SIGNALED_IO, 1, [Can we use SIGIO for tcp and udp IO?]) ;;
  1666. esac
  1667. AC_CACHE_CHECK([for SIGPOLL], ac_cv_hdr_def_sigpoll,
  1668. AC_EGREP_CPP(yes,
  1669. [#include <signal.h>
  1670. #ifdef SIGPOLL
  1671. yes
  1672. #endif
  1673. ], ac_cv_hdr_def_sigpoll=yes, ac_cv_hdr_def_sigpoll=no))
  1674. AC_CACHE_CHECK([for SIGSYS], ac_cv_hdr_def_sigsys,
  1675. AC_EGREP_CPP(yes,
  1676. [#include <signal.h>
  1677. #ifdef SIGSYS
  1678. yes
  1679. #endif
  1680. ], ac_cv_hdr_def_sigsys=yes, ac_cv_hdr_def_sigsys=no))
  1681. AC_CACHE_CHECK([if we can use SIGPOLL for UDP I/O], ac_cv_var_use_udp_sigpoll,
  1682. [ans=no
  1683. case "$ac_cv_hdr_def_sigpoll" in
  1684. yes)
  1685. case "$host" in
  1686. mips-sgi-irix*)
  1687. ans=no
  1688. ;;
  1689. vax-dec-bsd)
  1690. ans=no
  1691. ;;
  1692. *-pc-cygwin*)
  1693. ans=no
  1694. ;;
  1695. *-sni-sysv*)
  1696. ans=no
  1697. ;;
  1698. *-*-aix[[456]]*)
  1699. ans=no
  1700. ;;
  1701. *-*-hpux*)
  1702. ans=no
  1703. ;;
  1704. *-*-*linux*)
  1705. ans=no
  1706. ;;
  1707. *-*-osf*)
  1708. ans=no
  1709. ;;
  1710. *-*-qnx*)
  1711. ans=no
  1712. ;;
  1713. *-*-sunos*)
  1714. ans=no
  1715. ;;
  1716. *-*-solaris*)
  1717. ans=no
  1718. ;;
  1719. *-*-ultrix*)
  1720. ans=no
  1721. ;;
  1722. *-*-unicosmp*)
  1723. ans=no
  1724. ;;
  1725. *) ans=yes
  1726. ;;
  1727. esac
  1728. ;;
  1729. esac
  1730. ac_cv_var_use_udp_sigpoll=$ans])
  1731. case "$ac_cv_var_use_udp_sigpoll" in
  1732. yes) AC_DEFINE(USE_UDP_SIGPOLL, 1, [Can we use SIGPOLL for UDP?]) ;;
  1733. esac
  1734. AC_CACHE_CHECK([if we can use SIGPOLL for TTY I/O], ac_cv_var_use_tty_sigpoll,
  1735. [ans=no
  1736. case "$ac_cv_hdr_def_sigpoll" in
  1737. yes)
  1738. case "$host" in
  1739. mips-sgi-irix*)
  1740. ans=no
  1741. ;;
  1742. vax-dec-bsd)
  1743. ans=no
  1744. ;;
  1745. *-pc-cygwin*)
  1746. ans=no
  1747. ;;
  1748. *-sni-sysv*)
  1749. ans=no
  1750. ;;
  1751. *-*-aix[[456]]*)
  1752. ans=no
  1753. ;;
  1754. *-*-hpux*)
  1755. ans=no
  1756. ;;
  1757. *-*-*linux*)
  1758. ans=no
  1759. ;;
  1760. *-*-osf*)
  1761. ans=no
  1762. ;;
  1763. *-*-sunos*)
  1764. ans=no
  1765. ;;
  1766. *-*-ultrix*)
  1767. ans=no
  1768. ;;
  1769. *-*-qnx*)
  1770. ans=no
  1771. ;;
  1772. *-*-unicosmp*)
  1773. ans=no
  1774. ;;
  1775. *) ans=yes
  1776. ;;
  1777. esac
  1778. ;;
  1779. esac
  1780. ac_cv_var_use_tty_sigpoll=$ans])
  1781. case "$ac_cv_var_use_tty_sigpoll" in
  1782. yes) AC_DEFINE(USE_TTY_SIGPOLL, 1, [Can we use SIGPOLL for tty IO?]) ;;
  1783. esac
  1784. case "$ac_cv_header_sys_sio_h" in
  1785. yes)
  1786. AC_CACHE_CHECK([sys/sio.h for TIOCDCDTIMESTAMP], ac_cv_hdr_def_tiocdcdtimestamp,
  1787. AC_EGREP_CPP(yes,
  1788. [#include <sys/sio.h>
  1789. #ifdef TIOCDCDTIMESTAMP
  1790. yes
  1791. #endif
  1792. ], ac_cv_hdr_def_tiocdcdtimestamp=yes, ac_cv_hdr_def_tiocdcdtimestamp=no))
  1793. ;;
  1794. esac
  1795. case "$ac_cv_hdr_def_tiocdcdtimestamp" in
  1796. yes)
  1797. ac_cv_var_oncore_ok=yes
  1798. ;;
  1799. esac
  1800. AC_CACHE_CHECK([if nlist() values might require extra indirection],
  1801. ac_cv_var_nlist_extra_indirection,
  1802. [ans=no
  1803. case "$host" in
  1804. *-*-aix*)
  1805. ans=yes
  1806. ;;
  1807. esac
  1808. ac_cv_var_nlist_extra_indirection=$ans])
  1809. case "$ac_cv_var_nlist_extra_indirection" in
  1810. yes) AC_DEFINE(NLIST_EXTRA_INDIRECTION, 1, [Might nlist() values require an extra level of indirection (AIX)?]) ;;
  1811. esac
  1812. AC_CACHE_CHECK([for a minimum recommended value of tickadj],
  1813. ac_cv_var_min_rec_tickadj,
  1814. [ans=no
  1815. case "$host" in
  1816. *-*-aix*)
  1817. ans=40
  1818. ;;
  1819. esac
  1820. ac_cv_var_min_rec_tickadj=$ans])
  1821. case "$ac_cv_var_min_rec_tickadj" in
  1822. ''|no) ;;
  1823. *) AC_DEFINE_UNQUOTED(MIN_REC_TICKADJ, $ac_cv_var_min_rec_tickadj, [Should we recommend a minimum value for tickadj?]) ;;
  1824. esac
  1825. AC_CACHE_CHECK([if the TTY code permits PARENB and IGNPAR],
  1826. ac_cv_var_no_parenb_ignpar,
  1827. [ans=no
  1828. case "$host" in
  1829. i?86-*-*linux*)
  1830. ans=yes
  1831. ;;
  1832. mips-sgi-irix*)
  1833. ans=yes
  1834. ;;
  1835. i?86-*-freebsd[[123]].*)
  1836. ;;
  1837. i?86-*-freebsd*)
  1838. ans=yes
  1839. ;;
  1840. *-*-unicosmp*)
  1841. ans=yes
  1842. ;;
  1843. esac
  1844. ac_cv_var_no_parenb_ignpar=$ans])
  1845. case "$ac_cv_var_no_parenb_ignpar" in
  1846. yes) AC_DEFINE(NO_PARENB_IGNPAR, 1, [Is there a problem using PARENB and IGNPAR (IRIX)?]) ;;
  1847. esac
  1848. AC_MSG_CHECKING([if we're including debugging code])
  1849. AC_ARG_ENABLE(debugging,
  1850. AC_HELP_STRING([--enable-debugging], [+ include debugging code]),
  1851. [ntp_ok=$enableval], [ntp_ok=yes])
  1852. if test "$ntp_ok" = "yes"; then
  1853. AC_DEFINE(DEBUG, 1, [Enable debugging?])
  1854. fi
  1855. AC_MSG_RESULT($ntp_ok)
  1856. AC_MSG_CHECKING([if we including processing time debugging code])
  1857. AC_ARG_ENABLE(debug-timing,
  1858. AC_HELP_STRING([--enable-debug-timing], [- include processing time debugging code (costs performance)]),
  1859. [ntp_ok=$enableval], [ntp_ok=no])
  1860. if test "$ntp_ok" = "yes"; then
  1861. AC_DEFINE(DEBUG_TIMING, 1, [Enable processing time debugging?])
  1862. fi
  1863. AC_MSG_RESULT($ntp_ok)
  1864. AC_MSG_CHECKING([[for a the number of minutes in a DST adjustment]])
  1865. AC_ARG_ENABLE(
  1866. [dst_minutes],
  1867. AS_HELP_STRING(
  1868. [--enable-dst-minutes],
  1869. [n minutes per DST adjustment @<:@60@:>@] dnl @<:@ is [
  1870. ),
  1871. [ans=$enableval],
  1872. [ans=60]
  1873. )
  1874. AC_DEFINE_UNQUOTED(DSTMINUTES, $ans, [The number of minutes in a DST adjustment])
  1875. AC_MSG_RESULT([$ans])
  1876. AC_MSG_CHECKING([[if ntpd will retry on permanent DNS errors]])
  1877. AC_ARG_ENABLE(
  1878. [ignore-dns-errors],
  1879. AS_HELP_STRING(
  1880. [--enable-ignore-dns-errors],
  1881. [- retry DNS queries on any error]
  1882. ),
  1883. [ans=$enableval],
  1884. [ans=no]
  1885. )
  1886. case "$ans" in
  1887. yes)
  1888. AC_DEFINE(IGNORE_DNS_ERRORS, 1, [[Retry queries on _any_ DNS error?]])
  1889. esac
  1890. AC_MSG_RESULT([$ans])
  1891. AC_CACHE_CHECK([if we have the tty_clk line discipline/streams module],
  1892. ac_cv_var_tty_clk,
  1893. [case "$ac_cv_header_sys_clkdefs_h$ac_cv_hdr_def_tiocdcdtimestamp" in
  1894. *yes*) ac_cv_var_tty_clk=yes ;;
  1895. *) ac_cv_var_tty_clk=no ;;
  1896. esac])
  1897. case "$ac_cv_var_tty_clk" in
  1898. yes) AC_DEFINE(TTYCLK, 1, [Do we have the tty_clk line discipline/streams module?]) ;;
  1899. esac
  1900. AC_CACHE_CHECK([for the ppsclock streams module],
  1901. ac_cv_var_ppsclock,
  1902. ac_cv_var_ppsclock=$ac_cv_struct_ppsclockev)
  1903. case "$ac_cv_var_ppsclock" in
  1904. yes) AC_DEFINE(PPS, 1, [Do we have the ppsclock streams module?]) ;;
  1905. esac
  1906. AC_CACHE_CHECK([for kernel multicast support], ac_cv_var_mcast,
  1907. [ac_cv_var_mcast=no
  1908. case "$host" in
  1909. i386-sequent-sysv4) ;;
  1910. *) AC_EGREP_CPP(yes,
  1911. [#include <netinet/in.h>
  1912. #ifdef IP_ADD_MEMBERSHIP
  1913. yes
  1914. #endif
  1915. ], ac_cv_var_mcast=yes) ;;
  1916. esac])
  1917. case "$ac_cv_var_mcast" in
  1918. yes)
  1919. AC_DEFINE(MCAST, 1, [Does the kernel support multicasting IP?])
  1920. AC_CACHE_CHECK([[arg type needed for IP*_MULTICAST_LOOP for setsockopt()]],
  1921. ac_cv_var_typeof_ip_multicast_loop,
  1922. [case "$host" in
  1923. *-*-netbsd*|*-*-*linux*)
  1924. ac_cv_var_typeof_ip_multicast_loop=u_int
  1925. ;;
  1926. *-*-winnt*)
  1927. ac_cv_var_typeof_ip_multicast_loop=BOOL
  1928. ;;
  1929. *) ac_cv_var_typeof_ip_multicast_loop=u_char
  1930. ;;
  1931. esac])
  1932. AC_DEFINE_UNQUOTED(TYPEOF_IP_MULTICAST_LOOP,
  1933. $ac_cv_var_typeof_ip_multicast_loop,
  1934. [What type to use for setsockopt])
  1935. ;;
  1936. esac
  1937. AC_CACHE_CHECK([[availability of ntp_{adj,get}time()]], ac_cv_var_ntp_syscalls,
  1938. [ac_cv_var_ntp_syscalls=no
  1939. case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime$ac_cv_func___adjtimex" in
  1940. yesyes*)
  1941. ac_cv_var_ntp_syscalls=libc
  1942. ;;
  1943. *yes)
  1944. ac_cv_var_ntp_syscalls=inline
  1945. ;;
  1946. *) AC_EGREP_CPP(yes,
  1947. [#include <sys/syscall.h>
  1948. #if defined(SYS_ntp_gettime) && defined(SYS_ntp_adjtime)
  1949. yes
  1950. #endif
  1951. ], ac_cv_var_ntp_syscalls=kernel)
  1952. ;;
  1953. esac])
  1954. case "$ac_cv_var_ntp_syscalls" in
  1955. libc)
  1956. AC_DEFINE(NTP_SYSCALLS_LIBC, 1, [Do we have ntp_{adj,get}time in libc?])
  1957. ;;
  1958. kernel)
  1959. AC_DEFINE(NTP_SYSCALLS_STD, 1, [Do we have ntp_{adj,get}time in the kernel?])
  1960. ;;
  1961. *)
  1962. ;;
  1963. esac
  1964. AC_CACHE_CHECK(if sys/timex.h has STA_FLL, ac_cv_var_sta_fll,
  1965. [AC_EGREP_CPP(yes,
  1966. [#include <sys/timex.h>
  1967. #ifdef STA_FLL
  1968. yes
  1969. #endif
  1970. ], ac_cv_var_sta_fll=yes, ac_cv_var_sta_fll=no)])
  1971. AC_CACHE_CHECK(if we have kernel PLL support, ac_cv_var_kernel_pll,
  1972. [dnl ac_cv_var_ntp_syscalls is {no,libc,kernel}
  1973. case "$ac_cv_header_sys_timex_h$ac_cv_struct_ntptimeval$ac_cv_var_sta_fll$ac_cv_var_ntp_syscalls" in
  1974. *no*)
  1975. ac_cv_var_kernel_pll=no
  1976. ;;
  1977. *) ac_cv_var_kernel_pll=yes
  1978. ;;
  1979. esac])
  1980. case "$ac_cv_var_kernel_pll" in
  1981. yes)
  1982. AC_DEFINE(KERNEL_PLL, 1, [Does the kernel support precision time discipline?])
  1983. ;;
  1984. esac
  1985. AC_CACHE_CHECK(if SIOCGIFCONF returns buffer size in the buffer, ac_cv_var_size_returned_in_buffer,
  1986. [ans=no
  1987. case "$host" in
  1988. *-fujitsu-uxp*)
  1989. ans=yes
  1990. ;;
  1991. *-ncr-sysv4*)
  1992. ans=yes
  1993. ;;
  1994. *-univel-sysv*)
  1995. ans=yes
  1996. ;;
  1997. esac
  1998. ac_cv_var_size_returned_in_buffer=$ans])
  1999. case "$ac_cv_var_size_returned_in_buffer" in
  2000. yes) AC_DEFINE(SIZE_RETURNED_IN_BUFFER, 1, [Does SIOCGIFCONF return size in the buffer?]) ;;
  2001. esac
  2002. dnl vvvvv-- this is wrong, if you re-enable the switch do not cache the result
  2003. dnl AC_CACHE_CHECK(if we want GDT surveying code, ac_cv_var_gdt_surveying,
  2004. dnl [AC_ARG_ENABLE(gdt-surveying, [ --enable-gdt-surveying - include GDT survey code],
  2005. dnl [ans=$enableval], [ans=no])
  2006. dnl ac_cv_var_gdt_surveying=$ans])
  2007. dnl case "$ac_cv_var_gdt_surveying" in
  2008. dnl yes) AC_DEFINE(GDT_SURVEYING, 1, [Include the GDT Surveying code?]) ;;
  2009. dnl esac
  2010. # Check for ioctls TIOCGPPSEV
  2011. AC_MSG_CHECKING(ioctl TIOCGPPSEV)
  2012. if test "$ac_cv_header_termios_h" = "yes"; then
  2013. AC_EGREP_CPP(yes,
  2014. [#include <termios.h>
  2015. #ifdef TIOCGPPSEV
  2016. yes
  2017. #endif
  2018. ], ntp_ok=yes, ntp_ok=no)
  2019. else
  2020. ntp_ok=no
  2021. fi
  2022. if test "$ntp_ok" = "yes"; then
  2023. AC_DEFINE(HAVE_TIOCGPPSEV, 1, [Do we have the TIOCGPPSEV ioctl (Solaris)?])
  2024. ac_cv_var_oncore_ok=yes
  2025. fi
  2026. AC_MSG_RESULT($ntp_ok)
  2027. # Check for ioctls TIOCSPPS
  2028. AC_MSG_CHECKING(ioctl TIOCSPPS)
  2029. if test "$ac_cv_header_termios_h" = "yes"; then
  2030. AC_EGREP_CPP(yes,
  2031. [#include <termios.h>
  2032. #ifdef TIOCSPPS
  2033. yes
  2034. #endif
  2035. ], ntp_ok=yes, ntp_ok=no)
  2036. else
  2037. ntp_ok=no
  2038. fi
  2039. if test "$ntp_ok" = "yes"; then
  2040. AC_DEFINE(HAVE_TIOCSPPS, 1, [Do we have the TIOCSPPS ioctl (Solaris)?])
  2041. fi
  2042. AC_MSG_RESULT($ntp_ok)
  2043. # Check for ioctls CIOGETEV
  2044. AC_MSG_CHECKING([ioctl CIOGETEV])
  2045. if test "$ac_cv_header_sys_ppsclock_h" = "yes"; then
  2046. AC_EGREP_CPP(yes,
  2047. [#include <sys/ppsclock.h>
  2048. #ifdef CIOGETEV
  2049. yes
  2050. #endif
  2051. ], ntp_ok=yes, ntp_ok=no)
  2052. else
  2053. ntp_ok=no
  2054. fi
  2055. if test "$ntp_ok" = "yes"; then
  2056. ac_cv_var_oncore_ok=yes
  2057. AC_DEFINE(HAVE_CIOGETEV, 1, [Do we have the CIOGETEV ioctl (SunOS, Linux)?])
  2058. fi
  2059. AC_MSG_RESULT($ntp_ok)
  2060. # ATOM/PPSAPI stuff.
  2061. # ATOM used to require struct timespec, but that's been fixed now.
  2062. # case "$ac_cv_struct_timespec" in
  2063. # 'yes')
  2064. # ac_cv_var_atom_ok=yes
  2065. # ;;
  2066. # esac
  2067. ac_cv_var_atom_ok=yes
  2068. # Check for header timepps.h, if found then we have PPS API (Draft RFC) stuff.
  2069. # The PPSAPI headers need "inline" ($ac_cv_c_inline='inline')
  2070. # The PPSAPI needs struct timespec.
  2071. # The PPSAPI also needs a timepps header.
  2072. case "$ac_cv_c_inline$ac_cv_struct_timespec" in
  2073. inlineyes)
  2074. case "$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h$host_os" in
  2075. *yes* | *sunos* | *solaris* | *sco* | *netbsd* )
  2076. AC_DEFINE(HAVE_PPSAPI, 1, [Do we have the PPS API per the Draft RFC?])
  2077. ac_cv_var_jupiter_ok=yes
  2078. ac_cv_var_oncore_ok=yes
  2079. ac_cv_var_parse_ok=yes
  2080. ac_cv_var_ripe_ncc_ok=yes
  2081. ;;
  2082. esac
  2083. ;;
  2084. esac
  2085. # Check for ioctls TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG
  2086. AC_CHECK_HEADER(linux/serial.h)
  2087. AC_MSG_CHECKING([ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG])
  2088. case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
  2089. yesyes)
  2090. AC_EGREP_CPP(yes,
  2091. [#include <sys/time.h>
  2092. typedef int u_int;
  2093. #include <sys/ppsclock.h>
  2094. #include <linux/serial.h>
  2095. #ifdef TIOCGSERIAL
  2096. #ifdef TIOCSSERIAL
  2097. #ifdef ASYNC_PPS_CD_POS
  2098. #ifdef ASYNC_PPS_CD_NEG
  2099. #ifdef CIOGETEV
  2100. yes
  2101. #endif
  2102. #endif
  2103. #endif
  2104. #endif
  2105. #endif
  2106. ], ntp_ok=yes)
  2107. ;;
  2108. *)
  2109. ntp_ok=no
  2110. ;;
  2111. esac
  2112. if test "$ntp_ok" = "yes"; then
  2113. AC_DEFINE(HAVE_TIO_SERIAL_STUFF, 1, [Do we have the TIO serial stuff?])
  2114. fi
  2115. AC_MSG_RESULT($ntp_ok)
  2116. # Check for SHMEM_STATUS support
  2117. AC_MSG_CHECKING([SHMEM_STATUS support])
  2118. case "$ac_cv_header_sys_mman_h" in
  2119. yes) ntp_ok=yes ;;
  2120. *) ntp_ok=no ;;
  2121. esac
  2122. if test "$ntp_ok" = "yes"; then
  2123. AC_DEFINE(ONCORE_SHMEM_STATUS, 1, [Do we have support for SHMEM_STATUS?])
  2124. fi
  2125. AC_MSG_RESULT($ntp_ok)
  2126. dnl dnl These are for OPT_PROGRAMS in authstuff/
  2127. dnl AC_SUBST(AUTHCERT)
  2128. dnl AC_SUBST(AUTHSPEED)
  2129. dnl AC_SUBST(MD5DRIVER)
  2130. dnl AC_SUBST(KEYPARITY)
  2131. dnl AC_SUBST(MAKEIPFP)
  2132. dnl AC_SUBST(MAKEPC1)
  2133. dnl AC_SUBST(MAKEPC2)
  2134. dnl AC_SUBST(MAKESP)
  2135. dnl AC_SUBST(MKRANDKEYS)
  2136. dnl AC_SUBST(OMAKEIPFP)
  2137. dnl AC_SUBST(UNIXCERT)
  2138. ntp_refclock=no
  2139. # HPUX only, and by explicit request
  2140. AC_MSG_CHECKING([Datum/Bancomm bc635/VME interface])
  2141. AC_ARG_ENABLE(BANCOMM,
  2142. AC_HELP_STRING([--enable-BANCOMM], [- Datum/Bancomm bc635/VME interface]),
  2143. [ntp_ok=$enableval], [ntp_ok=no])
  2144. if test "$ntp_ok" = "yes"; then
  2145. ntp_refclock=yes
  2146. AC_DEFINE(CLOCK_BANC, 1, [Datum/Bancomm bc635/VME interface?])
  2147. fi
  2148. AC_MSG_RESULT($ntp_ok)
  2149. case "$ntp_ok$host" in
  2150. yes*-*-hpux*) ;;
  2151. yes*) AC_MSG_WARN([*** But the expected answer is... no ***]) ;;
  2152. esac
  2153. #HPUX only, and only by explicit request
  2154. AC_MSG_CHECKING([TrueTime GPS receiver/VME interface])
  2155. AC_ARG_ENABLE(GPSVME,
  2156. AC_HELP_STRING([--enable-GPSVME], [- TrueTime GPS receiver/VME interface]),
  2157. [ntp_ok=$enableval], [ntp_ok=no])
  2158. if test "$ntp_ok" = "yes"; then
  2159. ntp_refclock=yes
  2160. AC_DEFINE(CLOCK_GPSVME, 1, [TrueTime GPS receiver/VME interface?])
  2161. fi
  2162. AC_MSG_RESULT($ntp_ok)
  2163. case "$ntp_ok$host" in
  2164. yes*-*-hpux*) ;;
  2165. yes*) AC_MSG_WARN([*** But the expected answer is... no ***]) ;;
  2166. esac
  2167. AC_MSG_CHECKING([for PCL720 clock support])
  2168. case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in
  2169. yesyesyes)
  2170. AC_DEFINE(CLOCK_PPS720, 1, [PCL 720 clock support])
  2171. ans=yes
  2172. ;;
  2173. *)
  2174. ans=no
  2175. ;;
  2176. esac
  2177. AC_MSG_RESULT([$ans])
  2178. AC_MSG_CHECKING([for default inclusion of all suitable non-PARSE clocks])
  2179. AC_ARG_ENABLE(all-clocks,
  2180. AC_HELP_STRING([--enable-all-clocks], [+ include all suitable non-PARSE clocks:]),
  2181. [ntp_eac=$enableval], [ntp_eac=yes])
  2182. AC_MSG_RESULT($ntp_eac)
  2183. # HMS: Should we also require ac_cv_var_parse_ok?
  2184. AC_MSG_CHECKING([if we have support for PARSE clocks])
  2185. case "$ac_cv_var_atom_ok$ac_cv_header_termio_h$ac_cv_header_termios_h" in
  2186. yes*yes*)
  2187. ntp_canparse=yes
  2188. ;;
  2189. *) ntp_canparse=no
  2190. ;;
  2191. esac
  2192. AC_MSG_RESULT($ntp_canparse)
  2193. AC_MSG_CHECKING([if we have support for audio clocks])
  2194. case "$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
  2195. *yes*)
  2196. ntp_canaudio=yes
  2197. AC_DEFINE(HAVE_AUDIO, , [Do we have audio support?])
  2198. ;;
  2199. *) ntp_canaudio=no ;;
  2200. esac
  2201. AC_MSG_RESULT($ntp_canaudio)
  2202. AC_MSG_CHECKING([if we have support for the SHM refclock interface])
  2203. case "$ac_cv_header_sys_ipc_h$ac_cv_header_sys_shm_h" in
  2204. yesyes)
  2205. ntp_canshm=yes
  2206. ;;
  2207. *) ntp_canshm=no ;;
  2208. esac
  2209. AC_MSG_RESULT($ntp_canshm)
  2210. # Requires modem control
  2211. AC_MSG_CHECKING([ACTS modem service])
  2212. AC_ARG_ENABLE(ACTS,
  2213. AC_HELP_STRING([--enable-ACTS], [s ACTS modem service]),
  2214. [ntp_ok=$enableval],
  2215. [AC_EGREP_CPP(yes,
  2216. [#include <termios.h>
  2217. #ifdef HAVE_SYS_IOCTL_H
  2218. #include <sys/ioctl.h>
  2219. #endif
  2220. #ifdef TIOCMBIS
  2221. yes
  2222. #endif
  2223. ], ntp_ok=$ntp_eac, ntp_ok=no)])
  2224. if test "$ntp_ok" = "yes"; then
  2225. ntp_refclock=yes
  2226. AC_DEFINE(CLOCK_ACTS, 1, [ACTS modem service])
  2227. fi
  2228. AC_MSG_RESULT($ntp_ok)
  2229. AC_MSG_CHECKING([Arbiter 1088A/B GPS receiver])
  2230. AC_ARG_ENABLE(ARBITER,
  2231. AC_HELP_STRING([--enable-ARBITER], [+ Arbiter 1088A/B GPS receiver]),
  2232. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2233. if test "$ntp_ok" = "yes"; then
  2234. ntp_refclock=yes
  2235. AC_DEFINE(CLOCK_ARBITER, 1, [Arbiter 1088A/B GPS receiver])
  2236. fi
  2237. AC_MSG_RESULT($ntp_ok)
  2238. AC_MSG_CHECKING([Arcron MSF receiver])
  2239. AC_ARG_ENABLE(ARCRON_MSF,
  2240. AC_HELP_STRING([--enable-ARCRON-MSF], [+ Arcron MSF receiver]),
  2241. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2242. if test "$ntp_ok" = "yes"; then
  2243. ntp_refclock=yes
  2244. AC_DEFINE(CLOCK_ARCRON_MSF, 1, [ARCRON support?])
  2245. fi
  2246. AC_MSG_RESULT($ntp_ok)
  2247. AC_MSG_CHECKING([Austron 2200A/2201A GPS receiver])
  2248. AC_ARG_ENABLE(AS2201,
  2249. AC_HELP_STRING([--enable-AS2201], [+ Austron 2200A/2201A GPS receiver]),
  2250. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2251. if test "$ntp_ok" = "yes"; then
  2252. ntp_refclock=yes
  2253. AC_DEFINE(CLOCK_AS2201, 1, [Austron 2200A/2201A GPS receiver?])
  2254. fi
  2255. AC_MSG_RESULT($ntp_ok)
  2256. AC_MSG_CHECKING([ATOM PPS interface])
  2257. AC_ARG_ENABLE(ATOM,
  2258. AC_HELP_STRING([--enable-ATOM], [s ATOM PPS interface]),
  2259. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2260. case "$ac_cv_var_atom_ok" in
  2261. no) ntp_ok=no ;;
  2262. esac
  2263. if test "$ntp_ok" = "yes"; then
  2264. ntp_refclock=yes
  2265. AC_DEFINE(CLOCK_ATOM, 1, [PPS interface?])
  2266. fi
  2267. AC_MSG_RESULT($ntp_ok)
  2268. AC_MSG_CHECKING([Chrono-log K-series WWVB receiver])
  2269. AC_ARG_ENABLE(CHRONOLOG,
  2270. AC_HELP_STRING([--enable-CHRONOLOG], [+ Chrono-log K-series WWVB receiver]),
  2271. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2272. if test "$ntp_ok" = "yes"; then
  2273. ntp_refclock=yes
  2274. AC_DEFINE(CLOCK_CHRONOLOG, 1, [Chronolog K-series WWVB receiver?])
  2275. fi
  2276. AC_MSG_RESULT($ntp_ok)
  2277. AC_MSG_CHECKING([CHU modem/decoder])
  2278. AC_ARG_ENABLE(CHU,
  2279. AC_HELP_STRING([--enable-CHU], [+ CHU modem/decoder]),
  2280. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2281. if test "$ntp_ok" = "yes"; then
  2282. ntp_refclock=yes
  2283. AC_DEFINE(CLOCK_CHU, 1, [CHU modem/decoder])
  2284. fi
  2285. AC_MSG_RESULT($ntp_ok)
  2286. ac_refclock_chu=$ntp_ok
  2287. AC_MSG_CHECKING([CHU audio/decoder])
  2288. AC_ARG_ENABLE(AUDIO-CHU,
  2289. AC_HELP_STRING([--enable-AUDIO-CHU], [s CHU audio/decoder]),
  2290. [ntp_ok=$enableval],
  2291. [case "$ntp_eac$ac_refclock_chu$ntp_canaudio" in
  2292. *no*) ntp_ok=no ;;
  2293. *) ntp_ok=yes ;;
  2294. esac])
  2295. if test "$ntp_ok" = "yes"; then
  2296. AC_DEFINE(AUDIO_CHU, 1, [CHU audio/decoder?])
  2297. fi
  2298. AC_MSG_RESULT($ntp_ok)
  2299. # We used to check for sunos/solaris target...
  2300. case "$ntp_ok$ac_refclock_chu$ntp_canaudio" in
  2301. yes*no*) AC_MSG_WARN([*** But the expected answer is...no ***]) ;;
  2302. esac
  2303. # Not under HP-UX
  2304. AC_MSG_CHECKING([Datum Programmable Time System])
  2305. AC_ARG_ENABLE(DATUM,
  2306. AC_HELP_STRING([--enable-DATUM], [s Datum Programmable Time System]),
  2307. [ntp_ok=$enableval],
  2308. [case "$ac_cv_header_termios_h" in
  2309. yes)
  2310. ntp_ok=$ntp_eac
  2311. ;;
  2312. *) ntp_ok=no
  2313. ;;
  2314. esac])
  2315. if test "$ntp_ok" = "yes"; then
  2316. ntp_refclock=yes
  2317. AC_DEFINE(CLOCK_DATUM, 1, [Datum Programmable Time System?])
  2318. fi
  2319. AC_MSG_RESULT($ntp_ok)
  2320. AC_MSG_CHECKING([Dumb generic hh:mm:ss local clock])
  2321. AC_ARG_ENABLE(DUMBCLOCK,
  2322. AC_HELP_STRING([--enable-DUMBCLOCK], [+ Dumb generic hh:mm:ss local clock]),
  2323. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2324. if test "$ntp_ok" = "yes"; then
  2325. ntp_refclock=yes
  2326. AC_DEFINE(CLOCK_DUMBCLOCK, 1, [Dumb generic hh:mm:ss local clock?])
  2327. fi
  2328. AC_MSG_RESULT($ntp_ok)
  2329. AC_MSG_CHECKING([Forum Graphic GPS])
  2330. AC_ARG_ENABLE(FG,
  2331. AC_HELP_STRING([--enable-FG], [+ Forum Graphic GPS]),
  2332. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2333. if test "$ntp_ok" = "yes"; then
  2334. ntp_refclock=yes
  2335. AC_DEFINE(CLOCK_FG, 1, [Forum Graphic GPS datating station driver?])
  2336. fi
  2337. AC_MSG_RESULT($ntp_ok)
  2338. # Requires modem control
  2339. AC_MSG_CHECKING([Heath GC-1000 WWV/WWVH receiver])
  2340. AC_ARG_ENABLE(HEATH,
  2341. AC_HELP_STRING([--enable-HEATH], [s Heath GC-1000 WWV/WWVH receiver]),
  2342. [ntp_ok=$enableval],
  2343. [AC_EGREP_CPP(yes,
  2344. [#include <termios.h>
  2345. #ifdef HAVE_SYS_IOCTL_H
  2346. #include <sys/ioctl.h>
  2347. #endif
  2348. #ifdef TIOCMBIS
  2349. yes
  2350. #endif
  2351. ], ntp_ok=$ntp_eac, ntp_ok=no)])
  2352. if test "$ntp_ok" = "yes"; then
  2353. ntp_refclock=yes
  2354. AC_DEFINE(CLOCK_HEATH, 1, [Heath GC-1000 WWV/WWVH receiver?])
  2355. fi
  2356. AC_MSG_RESULT($ntp_ok)
  2357. AC_MSG_CHECKING([for hopf serial clock device])
  2358. AC_ARG_ENABLE(HOPFSERIAL,
  2359. AC_HELP_STRING([--enable-HOPFSERIAL], [+ hopf serial clock device]),
  2360. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2361. if test "$ntp_ok" = "yes"; then
  2362. ntp_refclock=yes
  2363. AC_DEFINE(CLOCK_HOPF_SERIAL, 1, [HOPF serial clock device?])
  2364. fi
  2365. AC_MSG_RESULT($ntp_ok)
  2366. AC_MSG_CHECKING([for hopf PCI clock 6039])
  2367. AC_ARG_ENABLE(HOPFPCI,
  2368. AC_HELP_STRING([--enable-HOPFPCI], [+ hopf 6039 PCI board]),
  2369. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2370. if test "$ntp_ok" = "yes"; then
  2371. ntp_refclock=yes
  2372. AC_DEFINE(CLOCK_HOPF_PCI, 1, [HOPF PCI clock device?])
  2373. fi
  2374. AC_MSG_RESULT($ntp_ok)
  2375. AC_MSG_CHECKING([HP 58503A GPS receiver])
  2376. AC_ARG_ENABLE(HPGPS,
  2377. AC_HELP_STRING([--enable-HPGPS], [+ HP 58503A GPS receiver]),
  2378. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2379. if test "$ntp_ok" = "yes"; then
  2380. ntp_refclock=yes
  2381. AC_DEFINE(CLOCK_HPGPS, 1, [HP 58503A GPS receiver?])
  2382. fi
  2383. AC_MSG_RESULT($ntp_ok)
  2384. AC_MSG_CHECKING([IRIG audio decoder])
  2385. AC_ARG_ENABLE(IRIG,
  2386. AC_HELP_STRING([--enable-IRIG], [s IRIG audio decoder]),
  2387. [ntp_ok=$enableval],
  2388. [case "$ntp_eac$ntp_canaudio" in
  2389. *no*) ntp_ok=no ;;
  2390. *) ntp_ok=yes ;;
  2391. esac])
  2392. if test "$ntp_ok" = "yes"; then
  2393. ntp_refclock=yes
  2394. AC_DEFINE(CLOCK_IRIG, 1, [IRIG audio decoder?])
  2395. fi
  2396. AC_MSG_RESULT($ntp_ok)
  2397. case "$ntp_ok$ntp_canaudio" in
  2398. yesno) AC_MSG_WARN([*** But the expected answer is... no ***]) ;;
  2399. esac
  2400. AC_MSG_CHECKING([for JJY receiver])
  2401. AC_ARG_ENABLE(JJY,
  2402. AC_HELP_STRING([--enable-JJY], [+ JJY receiver]),
  2403. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2404. if test "$ntp_ok" = "yes"; then
  2405. ntp_refclock=yes
  2406. AC_DEFINE(CLOCK_JJY, 1, [JJY receiver?])
  2407. fi
  2408. AC_MSG_RESULT($ntp_ok)
  2409. AC_MSG_CHECKING([Rockwell Jupiter GPS receiver])
  2410. AC_ARG_ENABLE(JUPITER,
  2411. AC_HELP_STRING([--enable-JUPITER], [s Rockwell Jupiter GPS receiver]),
  2412. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2413. case "$ac_cv_var_jupiter_ok" in
  2414. no) ntp_ok=no ;;
  2415. esac
  2416. if test "$ntp_ok" = "yes"; then
  2417. ntp_refclock=yes
  2418. AC_DEFINE(CLOCK_JUPITER, 1, [Rockwell Jupiter GPS clock?])
  2419. fi
  2420. AC_MSG_RESULT($ntp_ok)
  2421. AC_MSG_CHECKING([Leitch CSD 5300 Master Clock System Driver])
  2422. AC_ARG_ENABLE(LEITCH,
  2423. AC_HELP_STRING([--enable-LEITCH], [+ Leitch CSD 5300 Master Clock System Driver]),
  2424. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2425. if test "$ntp_ok" = "yes"; then
  2426. ntp_refclock=yes
  2427. AC_DEFINE(CLOCK_LEITCH, 1, [Leitch CSD 5300 Master Clock System Driver?])
  2428. fi
  2429. AC_MSG_RESULT($ntp_ok)
  2430. AC_MSG_CHECKING([local clock reference])
  2431. AC_ARG_ENABLE(LOCAL-CLOCK,
  2432. AC_HELP_STRING([--enable-LOCAL-CLOCK], [+ local clock reference]),
  2433. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2434. if test "$ntp_ok" = "yes"; then
  2435. ntp_refclock=yes
  2436. AC_DEFINE(CLOCK_LOCAL, 1, [local clock reference?])
  2437. fi
  2438. AC_MSG_RESULT($ntp_ok)
  2439. dnl Bug 340: longstanding unfixed bugs
  2440. dnl AC_MSG_CHECKING(EES M201 MSF receiver)
  2441. dnl AC_ARG_ENABLE(MSFEES,
  2442. dnl AC_HELP_STRING([--enable-MSFEES], [+ EES M201 MSF receiver]),
  2443. dnl [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2444. dnl if test "$ntp_ok" = "yes"; then
  2445. dnl ntp_refclock=yes
  2446. dnl AC_DEFINE(CLOCK_MSFEES, 1, [EES M201 MSF receiver])
  2447. dnl fi
  2448. dnl AC_MSG_RESULT($ntp_ok)
  2449. # Not Ultrix
  2450. AC_MSG_CHECKING([Magnavox MX4200 GPS receiver])
  2451. AC_ARG_ENABLE(MX4200,
  2452. AC_HELP_STRING([--enable-MX4200 ], [s Magnavox MX4200 GPS receiver]),
  2453. [ntp_ok=$enableval],
  2454. [case "$ac_cv_var_ppsclock" in
  2455. yes) ntp_ok=$ntp_eac
  2456. ;;
  2457. *) ntp_ok=no
  2458. ;;
  2459. esac])
  2460. if test "$ntp_ok" = "yes"; then
  2461. ntp_refclock=yes
  2462. AC_DEFINE(CLOCK_MX4200, 1, [Magnavox MX4200 GPS receiver])
  2463. fi
  2464. AC_MSG_RESULT($ntp_ok)
  2465. case "$ntp_ok$host" in
  2466. yes*-*-ultrix*) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
  2467. esac
  2468. AC_MSG_CHECKING([for NeoClock4X receiver])
  2469. AC_ARG_ENABLE(NEOCLOCK4X,
  2470. AC_HELP_STRING([--enable-NEOCLOCK4X], [+ NeoClock4X DCF77 / TDF receiver]),
  2471. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2472. if test "$ntp_ok" = "yes"; then
  2473. ntp_refclock=yes
  2474. AC_DEFINE(CLOCK_NEOCLOCK4X, 1, [NeoClock4X])
  2475. fi
  2476. AC_MSG_RESULT($ntp_ok)
  2477. AC_MSG_CHECKING([NMEA GPS receiver])
  2478. AC_ARG_ENABLE(NMEA,
  2479. AC_HELP_STRING([--enable-NMEA], [+ NMEA GPS receiver]),
  2480. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2481. if test "$ntp_ok" = "yes"; then
  2482. ntp_refclock=yes
  2483. AC_DEFINE(CLOCK_NMEA, 1, [NMEA GPS receiver])
  2484. fi
  2485. AC_MSG_RESULT($ntp_ok)
  2486. AC_MSG_CHECKING([for ONCORE Motorola VP/UT Oncore GPS])
  2487. AC_ARG_ENABLE(ONCORE,
  2488. AC_HELP_STRING([--enable-ONCORE], [s Motorola VP/UT Oncore GPS receiver]),
  2489. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2490. case "$ac_cv_var_oncore_ok" in
  2491. no) ntp_ok=no ;;
  2492. esac
  2493. if test "$ntp_ok" = "yes"; then
  2494. ntp_refclock=yes
  2495. AC_DEFINE(CLOCK_ONCORE, 1, [Motorola UT Oncore GPS])
  2496. fi
  2497. AC_MSG_RESULT($ntp_ok)
  2498. AC_MSG_CHECKING([for Palisade clock])
  2499. AC_ARG_ENABLE(PALISADE,
  2500. AC_HELP_STRING([--enable-PALISADE], [s Palisade clock]),
  2501. [ntp_ok=$enableval],
  2502. [case "$ac_cv_header_termios_h" in
  2503. yes)
  2504. ntp_ok=$ntp_eac
  2505. ;;
  2506. *) ntp_ok=no
  2507. ;;
  2508. esac])
  2509. if test "$ntp_ok" = "yes"; then
  2510. ntp_refclock=yes
  2511. AC_DEFINE(CLOCK_PALISADE, 1, [Palisade clock])
  2512. fi
  2513. AC_MSG_RESULT($ntp_ok)
  2514. AC_MSG_CHECKING([Conrad parallel port radio clock])
  2515. AC_ARG_ENABLE(PCF,
  2516. AC_HELP_STRING([--enable-PCF ], [+ Conrad parallel port radio clock]),
  2517. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2518. if test "$ntp_ok" = "yes"; then
  2519. ntp_refclock=yes
  2520. AC_DEFINE(CLOCK_PCF, 1, [Conrad parallel port radio clock])
  2521. fi
  2522. AC_MSG_RESULT($ntp_ok)
  2523. AC_MSG_CHECKING([PST/Traconex 1020 WWV/WWVH receiver])
  2524. AC_ARG_ENABLE(PST,
  2525. AC_HELP_STRING([--enable-PST], [+ PST/Traconex 1020 WWV/WWVH receiver]),
  2526. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2527. if test "$ntp_ok" = "yes"; then
  2528. ntp_refclock=yes
  2529. AC_DEFINE(CLOCK_PST, 1, [PST/Traconex 1020 WWV/WWVH receiver])
  2530. fi
  2531. AC_MSG_RESULT($ntp_ok)
  2532. AC_MSG_CHECKING([RIPENCC specific Trimble driver])
  2533. AC_ARG_ENABLE(RIPENCC,
  2534. AC_HELP_STRING([--enable-RIPENCC], [- RIPENCC specific Trimble driver]),
  2535. [ntp_ok=$enableval], [ntp_ok=no])
  2536. # 020629: HMS: s/$ntp_eac -> -/no because of ptr += sprintf(ptr, ...) usage
  2537. case "$ac_cv_var_ripe_ncc_ok" in
  2538. no) ntp_ok=no ;;
  2539. esac
  2540. if test "$ntp_ok" = "yes"; then
  2541. ntp_refclock=yes
  2542. AC_DEFINE(CLOCK_RIPENCC, ,[RIPE NCC Trimble clock])
  2543. fi
  2544. AC_MSG_RESULT($ntp_ok)
  2545. # Danny Meyer says SHM compiles (with a few warnings) under Win32.
  2546. # For *IX, we need sys/ipc.h and sys/shm.h.
  2547. AC_MSG_CHECKING([for SHM clock attached thru shared memory])
  2548. AC_ARG_ENABLE(SHM,
  2549. AC_HELP_STRING([--enable-SHM], [s SHM clock attached thru shared memory]),
  2550. [ntp_ok=$enableval],
  2551. [case "$ntp_eac$ntp_canshm" in
  2552. *no*) ntp_ok=no ;;
  2553. *) ntp_ok=yes ;;
  2554. esac])
  2555. if test "$ntp_ok" = "yes"; then
  2556. ntp_refclock=yes
  2557. AC_DEFINE(CLOCK_SHM, 1, [clock thru shared memory])
  2558. fi
  2559. AC_MSG_RESULT($ntp_ok)
  2560. AC_MSG_CHECKING([Spectracom 8170/Netclock/2 WWVB receiver])
  2561. AC_ARG_ENABLE(SPECTRACOM,
  2562. AC_HELP_STRING([--enable-SPECTRACOM], [+ Spectracom 8170/Netclock/2 WWVB receiver]),
  2563. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2564. if test "$ntp_ok" = "yes"; then
  2565. ntp_refclock=yes
  2566. AC_DEFINE(CLOCK_SPECTRACOM, 1, [Spectracom 8170/Netclock/2 WWVB receiver])
  2567. fi
  2568. AC_MSG_RESULT($ntp_ok)
  2569. AC_MSG_CHECKING([KSI/Odetics TPRO/S GPS receiver/IRIG interface])
  2570. AC_ARG_ENABLE(TPRO,
  2571. AC_HELP_STRING([--enable-TPRO], [s KSI/Odetics TPRO/S GPS receiver/IRIG interface]),
  2572. [ntp_ok=$enableval],
  2573. [case "$ac_cv_header_sys_tpro_h" in
  2574. yes)
  2575. ntp_ok=$ntp_eac
  2576. ;;
  2577. *) ntp_ok=no
  2578. ;;
  2579. esac])
  2580. if test "$ntp_ok" = "yes"; then
  2581. ntp_refclock=yes
  2582. AC_DEFINE(CLOCK_TPRO, 1, [KSI/Odetics TPRO/S GPS receiver/IRIG interface])
  2583. fi
  2584. AC_MSG_RESULT($ntp_ok)
  2585. case "$ntp_ok$ac_cv_header_sys_tpro" in
  2586. yesno) AC_MSG_WARN([*** But the expected answer is... no ***]) ;;
  2587. esac
  2588. dnl Bug 342: longstanding unfixed bugs
  2589. dnl AC_MSG_CHECKING(TRAK 8810 GPS receiver)
  2590. dnl AC_ARG_ENABLE(TRAK,
  2591. dnl AC_HELP_STRING([--enable-TRAK], [+ TRAK 8810 GPS receiver]),
  2592. dnl [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2593. dnl if test "$ntp_ok" = "yes"; then
  2594. dnl ntp_refclock=yes
  2595. dnl AC_DEFINE(CLOCK_TRAK, 1, [TRAK 8810 GPS receiver])
  2596. dnl fi
  2597. dnl AC_MSG_RESULT($ntp_ok)
  2598. # Not on a vax-dec-bsd
  2599. AC_MSG_CHECKING([Kinemetrics/TrueTime receivers])
  2600. AC_ARG_ENABLE(TRUETIME,
  2601. AC_HELP_STRING([--enable-TRUETIME], [s Kinemetrics/TrueTime receivers]),
  2602. [ntp_ok=$enableval],
  2603. [case "$host" in
  2604. vax-dec-bsd)
  2605. ntp_ok=no
  2606. ;;
  2607. *)
  2608. ntp_ok=$ntp_eac
  2609. ;;
  2610. esac])
  2611. if test "$ntp_ok" = "yes"; then
  2612. ntp_refclock=yes
  2613. AC_DEFINE(CLOCK_TRUETIME, 1, [Kinemetrics/TrueTime receivers])
  2614. fi
  2615. AC_MSG_RESULT($ntp_ok)
  2616. case "$ntp_ok$host" in
  2617. yesvax-dec-bsd) AC_MSG_WARN([*** But the expected answer is... no ***]) ;;
  2618. esac
  2619. AC_MSG_CHECKING([TrueTime 560 IRIG-B decoder])
  2620. AC_ARG_ENABLE(TT560,
  2621. AC_HELP_STRING([--enable-TT560], [- TrueTime 560 IRIG-B decoder]),
  2622. [ntp_ok=$enableval], [ntp_ok=no])
  2623. if test "$ntp_ok" = "yes"; then
  2624. ntp_refclock=yes
  2625. AC_DEFINE(CLOCK_TT560, , [TrueTime 560 IRIG-B decoder?])
  2626. fi
  2627. AC_MSG_RESULT($ntp_ok)
  2628. AC_MSG_CHECKING([Ultralink M320 WWVB receiver])
  2629. AC_ARG_ENABLE(ULINK,
  2630. AC_HELP_STRING([--enable-ULINK], [+ Ultralink WWVB receiver]),
  2631. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2632. if test "$ntp_ok" = "yes"; then
  2633. ntp_refclock=yes
  2634. AC_DEFINE(CLOCK_ULINK, 1, [Ultralink M320 WWVB receiver?])
  2635. fi
  2636. AC_MSG_RESULT($ntp_ok)
  2637. AC_MSG_CHECKING([WWV receiver])
  2638. AC_ARG_ENABLE(WWV,
  2639. AC_HELP_STRING([--enable-WWV], [s WWV Audio receiver]),
  2640. [ntp_ok=$enableval],
  2641. [case "$ntp_eac$ntp_canaudio" in
  2642. *no*) ntp_ok=no ;;
  2643. *) ntp_ok=yes ;;
  2644. esac])
  2645. if test "$ntp_ok" = "yes"; then
  2646. ntp_refclock=yes
  2647. AC_DEFINE(CLOCK_WWV, 1, [WWV audio driver])
  2648. fi
  2649. AC_MSG_RESULT($ntp_ok)
  2650. case "$ntp_ok$ntp_canaudio" in
  2651. yesno) AC_MSG_WARN(*** But the expected answer is... no ***) ;;
  2652. esac
  2653. AC_MSG_CHECKING([for Zyfer receiver])
  2654. AC_ARG_ENABLE(ZYFER,
  2655. AC_HELP_STRING([--enable-ZYFER], [+ Zyfer GPStarplus receiver]),
  2656. [ntp_ok=$enableval], [ntp_ok=$ntp_eac])
  2657. if test "$ntp_ok" = "yes"; then
  2658. ntp_refclock=yes
  2659. AC_DEFINE(CLOCK_ZYFER, 1, [Zyfer GPStarplus])
  2660. fi
  2661. AC_MSG_RESULT($ntp_ok)
  2662. AC_MSG_CHECKING([for default inclusion of all suitable PARSE clocks])
  2663. AC_ARG_ENABLE(parse-clocks,
  2664. AC_HELP_STRING([--enable-parse-clocks], [- include all suitable PARSE clocks:]),
  2665. [ntp_eapc=$enableval],
  2666. [case "$ntp_eac" in
  2667. yes) ntp_eapc=$ntp_canparse ;;
  2668. *) ntp_eapc=no ;;
  2669. esac
  2670. # Delete the next line one of these days
  2671. ntp_eapc=no])
  2672. AC_MSG_RESULT($ntp_eapc)
  2673. case "$ntp_eac$ntp_eapc$ntp_canparse" in
  2674. noyes*)
  2675. AC_MSG_ERROR(["--enable-parse-clocks" requires "--enable-all-clocks".])
  2676. ;;
  2677. yesyesno)
  2678. AC_MSG_ERROR([You said "--enable-parse-clocks" but PARSE isn't supported on this platform!])
  2679. ;;
  2680. *) ;;
  2681. esac
  2682. ntp_libparse=no
  2683. ntp_parseutil=no
  2684. ntp_rawdcf=no
  2685. AC_MSG_CHECKING([Diem Computime Radio Clock])
  2686. AC_ARG_ENABLE(COMPUTIME,
  2687. AC_HELP_STRING([--enable-COMPUTIME], [s Diem Computime Radio Clock]),
  2688. [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
  2689. if test "$ntp_ok" = "yes"; then
  2690. ntp_libparse=yes
  2691. ntp_refclock=yes
  2692. AC_DEFINE(CLOCK_COMPUTIME, 1, [Diems Computime Radio Clock?])
  2693. fi
  2694. AC_MSG_RESULT($ntp_ok)
  2695. case "$ntp_ok$ntp_canparse" in
  2696. yesno)
  2697. AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
  2698. ;;
  2699. esac
  2700. AC_MSG_CHECKING([ELV/DCF7000 clock])
  2701. AC_ARG_ENABLE(DCF7000,
  2702. AC_HELP_STRING([--enable-DCF7000], [s ELV/DCF7000 clock]),
  2703. [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
  2704. if test "$ntp_ok" = "yes"; then
  2705. ntp_libparse=yes
  2706. ntp_refclock=yes
  2707. AC_DEFINE(CLOCK_DCF7000, 1, [ELV/DCF7000 clock?])
  2708. fi
  2709. AC_MSG_RESULT($ntp_ok)
  2710. case "$ntp_ok$ntp_canparse" in
  2711. yesno)
  2712. AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
  2713. ;;
  2714. esac
  2715. AC_MSG_CHECKING([HOPF 6021 clock])
  2716. AC_ARG_ENABLE(HOPF6021,
  2717. AC_HELP_STRING([--enable-HOPF6021 ], [s HOPF 6021 clock]),
  2718. [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
  2719. if test "$ntp_ok" = "yes"; then
  2720. ntp_libparse=yes
  2721. ntp_refclock=yes
  2722. AC_DEFINE(CLOCK_HOPF6021, 1, [HOPF 6021 clock?])
  2723. fi
  2724. AC_MSG_RESULT($ntp_ok)
  2725. case "$ntp_ok$ntp_canparse" in
  2726. yesno)
  2727. AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
  2728. ;;
  2729. esac
  2730. AC_MSG_CHECKING([Meinberg clocks])
  2731. AC_ARG_ENABLE(MEINBERG,
  2732. AC_HELP_STRING([--enable-MEINBERG], [s Meinberg clocks]),
  2733. [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
  2734. if test "$ntp_ok" = "yes"; then
  2735. ntp_libparse=yes
  2736. ntp_refclock=yes
  2737. AC_DEFINE(CLOCK_MEINBERG, 1, [Meinberg clocks])
  2738. fi
  2739. AC_MSG_RESULT($ntp_ok)
  2740. case "$ntp_ok$ntp_canparse" in
  2741. yesno)
  2742. AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
  2743. ;;
  2744. esac
  2745. AC_MSG_CHECKING([DCF77 raw time code])
  2746. AC_ARG_ENABLE(RAWDCF,
  2747. AC_HELP_STRING([--enable-RAWDCF], [s DCF77 raw time code]),
  2748. [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
  2749. if test "$ntp_ok" = "yes"; then
  2750. ntp_libparse=yes
  2751. ntp_parseutil=yes
  2752. ntp_refclock=yes
  2753. ntp_rawdcf=yes
  2754. AC_DEFINE(CLOCK_RAWDCF, 1, [DCF77 raw time code])
  2755. fi
  2756. AC_MSG_RESULT($ntp_ok)
  2757. case "$ntp_ok$ntp_canparse" in
  2758. yesno)
  2759. AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
  2760. ;;
  2761. esac
  2762. case "$ntp_rawdcf" in
  2763. yes)
  2764. AC_CACHE_CHECK([if we must enable parity for RAWDCF],
  2765. ac_cv_var_rawdcf_parity,
  2766. [ans=no
  2767. case "$host" in
  2768. *-*-*linux*)
  2769. ans=yes
  2770. ;;
  2771. esac
  2772. ac_cv_var_rawdcf_parity=$ans])
  2773. case "$ac_cv_var_rawdcf_parity" in
  2774. yes) AC_DEFINE(RAWDCF_NO_IGNPAR, 1, [Should we not IGNPAR (Linux)?]) ;;
  2775. esac
  2776. ;;
  2777. *) # HMS: Is this a good idea?
  2778. ac_cv_var_rawdcf_parity=no
  2779. ;;
  2780. esac
  2781. AC_MSG_CHECKING([RCC 8000 clock])
  2782. AC_ARG_ENABLE(RCC8000,
  2783. AC_HELP_STRING([--enable-RCC8000], [s RCC 8000 clock]),
  2784. [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
  2785. if test "$ntp_ok" = "yes"; then
  2786. ntp_libparse=yes
  2787. ntp_refclock=yes
  2788. AC_DEFINE(CLOCK_RCC8000, 1, [RCC 8000 clock])
  2789. fi
  2790. AC_MSG_RESULT($ntp_ok)
  2791. case "$ntp_ok$ntp_canparse" in
  2792. yesno)
  2793. AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
  2794. ;;
  2795. esac
  2796. AC_MSG_CHECKING([Schmid DCF77 clock])
  2797. AC_ARG_ENABLE(SCHMID,
  2798. AC_HELP_STRING([--enable-SCHMID ], [s Schmid DCF77 clock]),
  2799. [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
  2800. if test "$ntp_ok" = "yes"; then
  2801. ntp_libparse=yes
  2802. ntp_refclock=yes
  2803. AC_DEFINE(CLOCK_SCHMID, 1, [Schmid DCF77 clock])
  2804. fi
  2805. AC_MSG_RESULT($ntp_ok)
  2806. case "$ntp_ok$ntp_canparse" in
  2807. yesno)
  2808. AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
  2809. ;;
  2810. esac
  2811. AC_MSG_CHECKING([Trimble GPS receiver/TAIP protocol])
  2812. AC_ARG_ENABLE(TRIMTAIP,
  2813. AC_HELP_STRING([--enable-TRIMTAIP], [s Trimble GPS receiver/TAIP protocol]),
  2814. [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
  2815. if test "$ntp_ok" = "yes"; then
  2816. ntp_libparse=yes
  2817. ntp_refclock=yes
  2818. AC_DEFINE(CLOCK_TRIMTAIP, 1, [Trimble GPS receiver/TAIP protocol])
  2819. fi
  2820. AC_MSG_RESULT($ntp_ok)
  2821. case "$ntp_ok$ntp_canparse" in
  2822. yesno)
  2823. AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
  2824. ;;
  2825. esac
  2826. AC_MSG_CHECKING([Trimble GPS receiver/TSIP protocol])
  2827. AC_ARG_ENABLE(TRIMTSIP,
  2828. AC_HELP_STRING([--enable-TRIMTSIP], [s Trimble GPS receiver/TSIP protocol]),
  2829. [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
  2830. if test "$ntp_ok" = "yes"; then
  2831. ntp_libparse=yes
  2832. ntp_refclock=yes
  2833. AC_DEFINE(CLOCK_TRIMTSIP, 1, [Trimble GPS receiver/TSIP protocol])
  2834. fi
  2835. AC_MSG_RESULT($ntp_ok)
  2836. case "$ntp_ok$ntp_canparse" in
  2837. yesno)
  2838. AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
  2839. ;;
  2840. esac
  2841. AC_MSG_CHECKING([WHARTON 400A Series clock])
  2842. AC_ARG_ENABLE(WHARTON,
  2843. AC_HELP_STRING([--enable-WHARTON], [s WHARTON 400A Series clock]),
  2844. [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
  2845. if test "$ntp_ok" = "yes"; then
  2846. ntp_libparse=yes
  2847. ntp_refclock=yes
  2848. AC_DEFINE(CLOCK_WHARTON_400A, 1, [WHARTON 400A Series protocol])
  2849. fi
  2850. AC_MSG_RESULT($ntp_ok)
  2851. case "$ntp_ok$ntp_canparse" in
  2852. yesno)
  2853. AC_MSG_ERROR(That's a parse clock and this system doesn't support it!)
  2854. ;;
  2855. esac
  2856. AC_MSG_CHECKING([VARITEXT clock])
  2857. AC_ARG_ENABLE(VARITEXT,
  2858. AC_HELP_STRING([--enable-VARITEXT], [s VARITEXT clock]),
  2859. [ntp_ok=$enableval], [ntp_ok=$ntp_eapc])
  2860. if test "$ntp_ok" = "yes"; then
  2861. ntp_libparse=yes
  2862. ntp_refclock=yes
  2863. AC_DEFINE(CLOCK_VARITEXT, 1, [VARITEXT protocol])
  2864. fi
  2865. AC_MSG_RESULT($ntp_ok)
  2866. case "$ntp_ok$ntp_canparse" in
  2867. yesno)
  2868. AC_MSG_ERROR([That's a parse clock and this system doesn't support it!])
  2869. ;;
  2870. esac
  2871. AC_SUBST(LIBPARSE)
  2872. AC_SUBST(MAKE_LIBPARSE)
  2873. AC_SUBST(MAKE_LIBPARSE_KERNEL)
  2874. AC_SUBST(MAKE_CHECK_Y2K)
  2875. AC_MSG_CHECKING([if we need to make and use the parse libraries])
  2876. ans=no
  2877. case "$ntp_libparse" in
  2878. yes)
  2879. ans=yes
  2880. AC_DEFINE(CLOCK_PARSE, 1, [PARSE driver interface])
  2881. LIBPARSE=../libparse/libparse.a
  2882. MAKE_LIBPARSE=libparse.a
  2883. # HMS: check_y2k trips the 34 year problem now...
  2884. false && MAKE_CHECK_Y2K=check_y2k
  2885. AC_DEFINE(PPS_SAMPLE, 1, [PPS auxiliary interface for ATOM?])
  2886. AC_DEFINE(CLOCK_ATOM)
  2887. ;;
  2888. esac
  2889. AC_MSG_RESULT([$ans])
  2890. # AC_SUBST(RSAOBJS)
  2891. # AC_SUBST(RSASRCS)
  2892. # AC_SUBST(RSADIR)
  2893. # AC_SUBST(RSAREF)
  2894. # AC_SUBST(LIBRSAREF)
  2895. # AC_SUBST(MAKE_LIBRSAREF)
  2896. AC_SUBST(OPENSSL)
  2897. AC_SUBST(OPENSSL_INC)
  2898. AC_SUBST(OPENSSL_LIB)
  2899. AC_MSG_CHECKING([for openssl library directory])
  2900. AC_ARG_WITH(openssl-libdir,
  2901. AC_HELP_STRING([--with-openssl-libdir], [+ =/something/reasonable]),
  2902. [ans=$withval],
  2903. [case "$build" in
  2904. $host) ans=yes ;;
  2905. *) ans=no ;;
  2906. esac])
  2907. case "$ans" in
  2908. no) ;;
  2909. yes) # Look in:
  2910. ans="/usr/lib /usr/lib/openssl /usr/sfw/lib /usr/local/lib /usr/local/ssl/lib"
  2911. ;;
  2912. *) # Look where they said
  2913. ;;
  2914. esac
  2915. case "$ans" in
  2916. no) ;;
  2917. *) # Look for libcrypto.a and libssl.a:
  2918. for i in $ans no
  2919. do
  2920. case "$host" in
  2921. *-*-darwin*)
  2922. test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
  2923. ;;
  2924. *)
  2925. test -f $i/libcrypto.so -a -f $i/libssl.so && break
  2926. test -f $i/libcrypto.a -a -f $i/libssl.a && break
  2927. ;;
  2928. esac
  2929. done
  2930. case "$i" in
  2931. no)
  2932. ans=no
  2933. OPENSSL_LIB=
  2934. ;;
  2935. *) ans=$i
  2936. OPENSSL_LIB=$ans
  2937. ;;
  2938. esac
  2939. ;;
  2940. esac
  2941. AC_MSG_RESULT([$ans])
  2942. AC_MSG_CHECKING([for openssl include directory])
  2943. AC_ARG_WITH(openssl-incdir,
  2944. AC_HELP_STRING([--with-openssl-incdir], [+ =/something/reasonable]),
  2945. [ans=$withval],
  2946. [case "$build" in
  2947. $host) ans=yes ;;
  2948. *) ans=no ;;
  2949. esac])
  2950. case "$ans" in
  2951. no) ;;
  2952. yes) # look in:
  2953. ans="/usr/include /usr/sfw/include /usr/local/include /usr/local/ssl/include"
  2954. ;;
  2955. *) # Look where they said
  2956. ;;
  2957. esac
  2958. case "$ans" in
  2959. no) ;;
  2960. *) # look for openssl/opensslconf.h:
  2961. for i in $ans no
  2962. do
  2963. test -f $i/openssl/opensslconf.h && break
  2964. done
  2965. case "$i" in
  2966. no)
  2967. ans=no
  2968. OPENSSL_INC=
  2969. ;;
  2970. *) ans=$i
  2971. OPENSSL_INC=$ans
  2972. ;;
  2973. esac
  2974. ;;
  2975. esac
  2976. AC_MSG_RESULT([$ans])
  2977. AC_ARG_WITH(crypto,
  2978. AC_HELP_STRING([--with-crypto], [+ =openssl]),
  2979. [ans=$withval], [ans=yes])
  2980. case "$ans" in
  2981. no) ;;
  2982. yes|openssl)
  2983. if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INC"
  2984. then
  2985. ans=no
  2986. else
  2987. # We have OpenSSL inc/lib - use them.
  2988. ans=openssl
  2989. CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC"
  2990. LDFLAGS="$LDFLAGS -L$OPENSSL_LIB"
  2991. case "$need_dash_r" in
  2992. 1) LDFLAGS="$LDFLAGS -R$OPENSSL_LIB"
  2993. ;;
  2994. esac
  2995. AC_SUBST(LCRYPTO, [-lcrypto])
  2996. AC_DEFINE(OPENSSL, , [Use OpenSSL?])
  2997. AC_CHECK_FUNCS(EVP_md2 EVP_mdc2)
  2998. fi
  2999. ;;
  3000. esac
  3001. AC_MSG_CHECKING(for the level of crypto support)
  3002. AC_MSG_RESULT([$ans])
  3003. AC_MSG_CHECKING([if we want to compile with ElectricFence])
  3004. AC_ARG_WITH(electricfence,
  3005. AC_HELP_STRING([--with-electricfence], [- compile with ElectricFence malloc debugger]),
  3006. [ans=$withval], [ans=no])
  3007. case "$ans" in
  3008. no) ;;
  3009. *)
  3010. LIBS="$LIBS \${top_builddir}/ElectricFence/libefence.a"
  3011. EF_PROGS="eftest tstheap"
  3012. AC_SUBST(EF_PROGS)
  3013. EF_LIBS=libefence.a
  3014. AC_SUBST(EF_LIBS)
  3015. ans=yes
  3016. ;;
  3017. esac
  3018. AC_MSG_RESULT([$ans])
  3019. AC_SUBST(MAKE_CHECK_LAYOUT)
  3020. AC_MSG_CHECKING([if we want to run check-layout])
  3021. case "$cross_compiling$PATH_PERL" in
  3022. no/*)
  3023. MAKE_CHECK_LAYOUT=check-layout
  3024. ans=yes
  3025. ;;
  3026. *)
  3027. ans=no
  3028. ;;
  3029. esac
  3030. AC_MSG_RESULT([$ans])
  3031. AC_SUBST(TESTDCF)
  3032. AC_SUBST(DCFD)
  3033. AC_MSG_CHECKING([if we can make dcf parse utilities])
  3034. ans=no
  3035. if test "$ntp_parseutil" = "yes"; then
  3036. case "$host" in
  3037. *-*-sunos4*|*-*-solaris2*|*-*-*linux*|*-*-netbsd*)
  3038. ans="dcfd testdcf"
  3039. DCFD=dcfd
  3040. TESTDCF=testdcf
  3041. ;;
  3042. esac
  3043. fi
  3044. AC_MSG_RESULT([$ans])
  3045. AC_SUBST(MAKE_PARSEKMODULE)
  3046. AC_MSG_CHECKING([if we can build kernel streams modules for parse])
  3047. ans=no
  3048. case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in
  3049. yesyes)
  3050. case "$host" in
  3051. sparc-*-sunos4*)
  3052. case "$ac_cv_var_kernel_pll" in
  3053. yes)
  3054. AC_DEFINE(PPS_SYNC, 1, [PARSE kernel PLL PPS support])
  3055. ;;
  3056. esac
  3057. ans=parsestreams
  3058. MAKE_PARSEKMODULE=parsestreams.loadable_module.o
  3059. ;;
  3060. sparc-*-solaris2*)
  3061. ans=parsesolaris
  3062. MAKE_PARSEKMODULE=parse
  3063. ;;
  3064. esac
  3065. ;;
  3066. esac
  3067. AC_MSG_RESULT([$ans])
  3068. AC_MSG_CHECKING([if we need basic refclock support])
  3069. if test "$ntp_refclock" = "yes"; then
  3070. AC_DEFINE(REFCLOCK, 1, [Basic refclock support?])
  3071. fi
  3072. AC_MSG_RESULT($ntp_refclock)
  3073. dnl Things that can be made in clockstuff/
  3074. AC_SUBST(PROPDELAY) dnl Set to "propdelay"
  3075. AC_SUBST(CHUTEST) dnl Set to "chutest"
  3076. AC_SUBST(CLKTEST) dnl Set to "clktest"
  3077. AC_SUBST(MAKE_ADJTIMED)
  3078. AC_MSG_CHECKING(if we want HP-UX adjtimed support)
  3079. case "$host" in
  3080. *-*-hpux[[56789]]*)
  3081. ans=yes
  3082. ;;
  3083. *) ans=no
  3084. ;;
  3085. esac
  3086. if test "$ans" = "yes"; then
  3087. MAKE_ADJTIMED=adjtimed
  3088. AC_DEFINE(NEED_HPUX_ADJTIME, 1, [Do we need HPUX adjtime() library support?])
  3089. fi
  3090. AC_MSG_RESULT([$ans])
  3091. AC_MSG_CHECKING([if we want QNX adjtime support])
  3092. case "$host" in
  3093. *-*-qnx*)
  3094. ans=yes
  3095. ;;
  3096. *) ans=no
  3097. ;;
  3098. esac
  3099. if test "$ans" = "yes"; then
  3100. AC_DEFINE(NEED_QNX_ADJTIME, 1, [Do we need the qnx adjtime call?])
  3101. fi
  3102. AC_MSG_RESULT([$ans])
  3103. AC_MSG_CHECKING([if we can read kmem])
  3104. # the default is to enable it if the system has the capability
  3105. case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
  3106. *yes*)
  3107. ans=yes
  3108. ;;
  3109. *) ans=no
  3110. esac
  3111. case "$host" in
  3112. *-*-domainos) # Won't be found...
  3113. ans=no
  3114. ;;
  3115. *-*-hpux*)
  3116. #ans=no
  3117. ;;
  3118. *-*-irix[[456]]*)
  3119. ans=no
  3120. ;;
  3121. *-*-*linux*)
  3122. ans=no
  3123. ;;
  3124. *-*-winnt3.5)
  3125. ans=no
  3126. ;;
  3127. *-*-unicosmp*)
  3128. ans=no
  3129. ;;
  3130. esac
  3131. # --enable-kmem / --disable-kmem controls if present
  3132. AC_ARG_ENABLE(
  3133. [kmem],
  3134. AC_HELP_STRING(
  3135. [--enable-kmem],
  3136. [s read /dev/kmem for tick and/or tickadj]
  3137. ),
  3138. [ans=$enableval]
  3139. )
  3140. AC_MSG_RESULT([$ans])
  3141. case "$ans" in
  3142. yes)
  3143. can_kmem=yes
  3144. ;;
  3145. *)
  3146. can_kmem=no
  3147. AC_DEFINE(NOKMEM, 1, [Should we NOT read /dev/kmem?])
  3148. esac
  3149. AC_MSG_CHECKING([if adjtime is accurate])
  3150. # target-dependent defaults
  3151. case "$host" in
  3152. i386-sequent-ptx*)
  3153. ans=no
  3154. ;;
  3155. i386-unknown-osf1*)
  3156. ans=yes
  3157. ;;
  3158. mips-sgi-irix[[456]]*)
  3159. ans=yes
  3160. ;;
  3161. *-fujitsu-uxp*)
  3162. ans=yes
  3163. ;;
  3164. *-ibm-aix[[456]]*)
  3165. ans=yes
  3166. ;;
  3167. *-*-*linux*)
  3168. ans=yes
  3169. ;;
  3170. *-*-solaris2.[[01]])
  3171. ans=no
  3172. ;;
  3173. *-*-solaris2*)
  3174. ans=yes
  3175. ;;
  3176. *-*-unicosmp*)
  3177. ans=yes
  3178. ;;
  3179. *) ans=no
  3180. esac
  3181. # --enable-accurate-adjtime / --disable-accurate-adjtime
  3182. # override the default
  3183. AC_ARG_ENABLE([accurate-adjtime],
  3184. AC_HELP_STRING(
  3185. [--enable-accurate-adjtime],
  3186. [s the adjtime() call is accurate]
  3187. ),
  3188. [ans=$enableval],
  3189. )
  3190. AC_MSG_RESULT([$ans])
  3191. case "$ans" in
  3192. yes)
  3193. AC_DEFINE(ADJTIME_IS_ACCURATE, 1, [Is adjtime() accurate?])
  3194. adjtime_is_accurate=yes
  3195. ;;
  3196. *)
  3197. adjtime_is_accurate=no
  3198. esac
  3199. AC_CACHE_CHECK([the name of 'tick' in the kernel],
  3200. ac_cv_var_nlist_tick,
  3201. [ans=_tick
  3202. case "$host" in
  3203. m68*-hp-hpux*) # HP9000/300?
  3204. ans=_old_tick
  3205. ;;
  3206. *-apple-aux[[23]]*)
  3207. ans=tick
  3208. ;;
  3209. *-hp-hpux*)
  3210. ans=old_tick
  3211. ;;
  3212. *-ibm-aix[[3456]]*)
  3213. ans=no
  3214. ;;
  3215. *-*-mpeix*)
  3216. ans=no
  3217. ;;
  3218. *-*-ptx*)
  3219. ans=tick
  3220. ;;
  3221. *-*-sco3.2v[[45]]*)
  3222. ans=no
  3223. ;;
  3224. *-*-solaris2*)
  3225. ans=nsec_per_tick
  3226. ;;
  3227. *-*-sysv4*)
  3228. ans=tick
  3229. ;;
  3230. esac
  3231. ac_cv_var_nlist_tick=$ans])
  3232. case "$ac_cv_var_nlist_tick" in
  3233. ''|no) ;; # HMS: I think we can only get 'no' here...
  3234. *) AC_DEFINE_UNQUOTED(K_TICK_NAME, "$ac_cv_var_nlist_tick", [What is the name of TICK in the kernel?]) ;;
  3235. esac
  3236. #
  3237. AC_CACHE_CHECK([for the units of 'tick'],
  3238. ac_cv_var_tick_nano,
  3239. [ans=usec
  3240. case "$host" in
  3241. *-*-solaris2*)
  3242. ans=nsec
  3243. ;;
  3244. esac
  3245. ac_cv_var_tick_nano=$ans])
  3246. case "$ac_cv_var_tick_nano" in
  3247. nsec)
  3248. AC_DEFINE(TICK_NANO, 1, [Is K_TICK_NAME in nanoseconds?])
  3249. ;;
  3250. esac
  3251. #
  3252. AC_CACHE_CHECK([the name of 'tickadj' in the kernel],
  3253. ac_cv_var_nlist_tickadj,
  3254. [ans=_tickadj
  3255. case "$host" in
  3256. m68*-hp-hpux*) # HP9000/300?
  3257. ans=_tickadj
  3258. ;;
  3259. *-apple-aux[[23]]*)
  3260. ans=tickadj
  3261. ;;
  3262. *-hp-hpux10*)
  3263. ans=no
  3264. ;;
  3265. *-hp-hpux9*)
  3266. ans=no
  3267. ;;
  3268. *-hp-hpux*)
  3269. ans=tickadj
  3270. ;;
  3271. *-*-aix*)
  3272. ans=tickadj
  3273. ;;
  3274. *-*-mpeix*)
  3275. ans=no
  3276. ;;
  3277. *-*-ptx*)
  3278. ans=tickadj
  3279. ;;
  3280. *-*-sco3.2v4*)
  3281. ans=no
  3282. ;;
  3283. *-*-sco3.2v5.0*)
  3284. ans=clock_drift
  3285. ;;
  3286. *-*-solaris2*)
  3287. ans=no # hrestime_adj
  3288. ;;
  3289. *-*-sysv4*)
  3290. ans=tickadj
  3291. ;;
  3292. esac
  3293. ac_cv_var_nlist_tickadj=$ans])
  3294. case "$ac_cv_var_nlist_tickadj" in
  3295. ''|no) ;; # HMS: I think we can only get 'no' here...
  3296. *) AC_DEFINE_UNQUOTED(K_TICKADJ_NAME, "$ac_cv_var_nlist_tickadj", [What is the name of TICKADJ in the kernel?]) ;;
  3297. esac
  3298. #
  3299. AC_CACHE_CHECK([for the units of 'tickadj'],
  3300. ac_cv_var_tickadj_nano,
  3301. [ans=usec
  3302. case "$host" in
  3303. *-*-solaris2*)
  3304. ans=nsec
  3305. ;;
  3306. esac
  3307. ac_cv_var_tickadj_nano=$ans])
  3308. case "$ac_cv_var_tickadj_nano" in
  3309. nsec)
  3310. AC_DEFINE(TICKADJ_NANO, 1, [Is K_TICKADJ_NAME in nanoseconds?])
  3311. ;;
  3312. esac
  3313. #
  3314. AC_CACHE_CHECK([half-heartedly for 'dosynctodr' in the kernel],
  3315. ac_cv_var_nlist_dosynctodr,
  3316. [case "$host" in
  3317. *-apple-aux[[23]]*)
  3318. ans=no
  3319. ;;
  3320. *-sni-sysv*)
  3321. ans=dosynctodr
  3322. ;;
  3323. *-*-aix*)
  3324. ans=dosynctodr
  3325. ;;
  3326. *-*-hpux*)
  3327. ans=no
  3328. ;;
  3329. *-*-mpeix*)
  3330. ans=no
  3331. ;;
  3332. *-*-nextstep*)
  3333. ans=_dosynctodr
  3334. ;;
  3335. *-*-ptx*)
  3336. ans=doresettodr
  3337. ;;
  3338. *-*-sco3.2v4*)
  3339. ans=no
  3340. ;;
  3341. *-*-sco3.2v5*)
  3342. ans=track_rtc
  3343. ;;
  3344. *-*-solaris2*)
  3345. ans=dosynctodr
  3346. ;;
  3347. *-*-sysv4*)
  3348. ans=doresettodr
  3349. ;;
  3350. *)
  3351. ans=_dosynctodr
  3352. ;;
  3353. esac
  3354. ac_cv_var_nlist_dosynctodr=$ans])
  3355. case "$ac_cv_var_nlist_dosynctodr" in
  3356. no) ;;
  3357. *) AC_DEFINE_UNQUOTED(K_DOSYNCTODR_NAME, "$ac_cv_var_nlist_dosynctodr", [What is (probably) the name of DOSYNCTODR in the kernel?])
  3358. ;;
  3359. esac
  3360. #
  3361. AC_CACHE_CHECK([half-heartedly for 'noprintf' in the kernel],
  3362. ac_cv_var_nlist_noprintf,
  3363. [case "$host" in
  3364. *-apple-aux[[23]]*)
  3365. ans=no
  3366. ;;
  3367. *-sni-sysv*)
  3368. ans=noprintf
  3369. ;;
  3370. *-*-aix*)
  3371. ans=noprintf
  3372. ;;
  3373. *-*-hpux*)
  3374. ans=no
  3375. ;;
  3376. *-*-mpeix*)
  3377. ans=no
  3378. ;;
  3379. *-*-ptx*)
  3380. ans=noprintf
  3381. ;;
  3382. *-*-nextstep*)
  3383. ans=_noprintf
  3384. ;;
  3385. *-*-solaris2*)
  3386. ans=noprintf
  3387. ;;
  3388. *-*-sysv4*)
  3389. ans=noprintf
  3390. ;;
  3391. *)
  3392. ans=_noprintf
  3393. ;;
  3394. esac
  3395. ac_cv_var_nlist_noprintf=$ans])
  3396. case "$ac_cv_var_nlist_noprintf" in
  3397. no) ;;
  3398. *) AC_DEFINE_UNQUOTED(K_NOPRINTF_NAME, "$ac_cv_var_nlist_noprintf", [What is (probably) the name of NOPRINTF in the kernel?])
  3399. ;;
  3400. esac
  3401. dnl The tick/tickadj sections were written by Skippy, who never learned
  3402. dnl that it's impolite (horridly gross) to show your guts in public.
  3403. dnl tick tickadj
  3404. dnl 10000 80 Unixware
  3405. dnl 1000000L/hz tick/16 (Solaris,UXPV,HPUX) && ADJTIME_IS_ACCURATE
  3406. dnl 10000 150 sgi IRIX
  3407. dnl 1000000L/hz 1000 RS6000 && NOKMEM
  3408. dnl 1000000L/hz 668 DOMAINOS && NOKMEM
  3409. dnl 1000000L/hz 500/HZ other && NOKMEM
  3410. dnl txc.tick 1 Linux
  3411. dnl (every / 10) 50 WinNT - tickadj is roughly 500/hz
  3412. dnl 1000000L/hz (nlist) (Solaris && !ADJTIME_IS_ACCURATE),
  3413. dnl (RS6000 && !NOKMEM), SINIX MIPS
  3414. dnl But we'll only use these "values" if we can't find anything else.
  3415. AC_MSG_CHECKING([for a default value for 'tick'])
  3416. # target-dependent default for tick
  3417. case "$host" in
  3418. *-*-pc-cygwin*)
  3419. AC_MSG_ERROR([tick needs work for cygwin])
  3420. ;;
  3421. *-univel-sysv*)
  3422. ans=10000
  3423. ;;
  3424. *-*-irix*)
  3425. ans=10000
  3426. ;;
  3427. *-*-*linux*)
  3428. ans=txc.tick
  3429. ;;
  3430. *-*-mpeix*)
  3431. ans=no
  3432. ;;
  3433. *-*-winnt3.5)
  3434. ans='(every / 10)'
  3435. ;;
  3436. *-*-unicosmp*)
  3437. ans=10000
  3438. ;;
  3439. *)
  3440. ans='1000000L/hz'
  3441. ;;
  3442. esac
  3443. AC_ARG_ENABLE(
  3444. [tick],
  3445. AC_HELP_STRING(
  3446. [--enable-tick=VALUE],
  3447. [s force a value for 'tick']
  3448. ),
  3449. [ans=$enableval]
  3450. )
  3451. AC_MSG_RESULT([$ans])
  3452. case "$ans" in
  3453. ''|no) ;; # HMS: I think we can only get 'no' here...
  3454. *) AC_DEFINE_UNQUOTED(PRESET_TICK, [$ans], [Preset a value for 'tick'?]) ;;
  3455. esac
  3456. AC_MSG_CHECKING([for a default value for 'tickadj'])
  3457. # target-specific default
  3458. ans='500/hz'
  3459. case "$host" in
  3460. *-fujitsu-uxp*)
  3461. case "$adjtime_is_accurate" in
  3462. yes)
  3463. ans='tick/16'
  3464. esac
  3465. ;;
  3466. XXX-*-pc-cygwin*)
  3467. ans=no
  3468. ;;
  3469. *-univel-sysv*)
  3470. ans=80
  3471. ;;
  3472. *-*-aix*)
  3473. case "$can_kmem" in
  3474. no)
  3475. ans=1000
  3476. esac
  3477. ;;
  3478. *-*-domainos) # Skippy: won't be found...
  3479. case "$can_kmem" in
  3480. no)
  3481. ans=668
  3482. esac
  3483. ;;
  3484. *-*-hpux*)
  3485. case "$adjtime_is_accurate" in
  3486. yes)
  3487. ans='tick/16'
  3488. esac
  3489. ;;
  3490. *-*-irix*)
  3491. ans=150
  3492. ;;
  3493. *-*-mpeix*)
  3494. ans=no
  3495. ;;
  3496. *-*-sco3.2v5.0*)
  3497. ans=10000L/hz
  3498. ;;
  3499. *-*-winnt3.5)
  3500. ans=50
  3501. ;;
  3502. *-*-unicosmp*)
  3503. ans=150
  3504. esac
  3505. AC_ARG_ENABLE(
  3506. [tickadj],
  3507. AC_HELP_STRING(
  3508. [--enable-tickadj=VALUE],
  3509. [s force a value for 'tickadj']
  3510. ),
  3511. [ans=$enableval]
  3512. )
  3513. AC_MSG_RESULT([$ans])
  3514. default_tickadj=$ans
  3515. case "$default_tickadj" in
  3516. ''|no) ;; # HMS: I think we can only get 'no' here...
  3517. *) AC_DEFINE_UNQUOTED(PRESET_TICKADJ, $default_tickadj, [Preset a value for 'tickadj'?]) ;;
  3518. esac
  3519. # Newer versions of ReliantUNIX round adjtime() values down to
  3520. # 1/100s (system tick). Sigh ...
  3521. # Unfortunately, there is no easy way to know if particular release
  3522. # has this "feature" or any obvious way to test for it.
  3523. case "$host" in
  3524. mips-sni-sysv4*) AC_DEFINE(RELIANTUNIX_CLOCK, 1, [Do we want the ReliantUNIX clock hacks?]) ;;
  3525. esac
  3526. case "$host" in
  3527. *-*-sco3.2v5*) AC_DEFINE(SCO5_CLOCK, 1, [Do we want the SCO clock hacks?]) ;;
  3528. esac
  3529. ac_cv_make_tickadj=yes
  3530. case "$can_kmem$ac_cv_var_tick$default_tickadj" in
  3531. nonono) # Don't read KMEM, no presets. Bogus.
  3532. AC_MSG_WARN([Can't read kmem, no PRESET_TICK or PRESET_TICKADJ. No tickadj.])
  3533. ac_cv_make_tickadj=no
  3534. ;;
  3535. nono*) # Don't read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
  3536. AC_MSG_WARN([Can't read kmem but no PRESET_TICK. No tickadj.])
  3537. ac_cv_make_tickadj=no
  3538. ;;
  3539. no*no) # Don't read KMEM, PRESET_TICK but no PRESET_TICKADJ. Bogus.
  3540. AC_MSG_WARN([Can't read kmem but no PRESET_TICKADJ. No tickadj.])
  3541. ac_cv_make_tickadj=no
  3542. ;;
  3543. no*) # Don't read KMEM, PRESET_TICK and PRESET_TICKADJ. Cool.
  3544. ;;
  3545. yesnono) # Read KMEM, no presets. Cool.
  3546. ;;
  3547. yesno*) # Read KMEM, no PRESET_TICK but PRESET_TICKADJ. Bogus.
  3548. AC_MSG_WARN([PRESET_TICKADJ is defined but not PRESET_TICK. Please report this.])
  3549. ;;
  3550. yes*no) # Read KMEM, PRESET_TICK but no PRESET_TICKADJ. Cool.
  3551. ;;
  3552. yes*) # READ KMEM, PRESET_TICK and PRESET_TICKADJ.
  3553. ;;
  3554. *) # Generally bogus.
  3555. AC_MSG_ERROR([This shouldn't happen.])
  3556. ;;
  3557. esac
  3558. AC_SUBST(MAKE_NTPTIME)
  3559. AC_CACHE_CHECK([if we want and can make the ntptime utility], ac_cv_make_ntptime,
  3560. [case "$host" in
  3561. *) case "$ac_cv_struct_ntptimeval$ac_cv_var_kernel_pll" in
  3562. yesyes)
  3563. ans=yes
  3564. ;;
  3565. *)
  3566. ans=no
  3567. ;;
  3568. esac
  3569. ;;
  3570. esac
  3571. ac_cv_make_ntptime=$ans])
  3572. case "$ac_cv_make_ntptime" in
  3573. yes)
  3574. MAKE_NTPTIME=ntptime
  3575. ;;
  3576. esac
  3577. AC_SUBST(MAKE_TICKADJ)
  3578. case "$host" in
  3579. mips-sni-sysv4*)
  3580. # tickadj is pretty useless on newer versions of ReliantUNIX
  3581. # Do not bother
  3582. ac_cv_make_tickadj=no
  3583. ;;
  3584. *-*-irix*)
  3585. ac_cv_make_tickadj=no
  3586. ;;
  3587. *-*-solaris2*)
  3588. # DLM says tickadj is a no-no starting with solaris2.5
  3589. case "$host" in
  3590. *-*-solaris2.1[[0-9]]*)
  3591. ac_cv_make_tickadj=no
  3592. ;;
  3593. *-*-solaris2.[[0-4]]*) ;;
  3594. *) ac_cv_make_tickadj=no ;;
  3595. esac
  3596. ;;
  3597. *-*-unicosmp*)
  3598. ac_cv_make_tickadj=no
  3599. ;;
  3600. esac
  3601. #
  3602. # Despite all the above, we always make tickadj. Setting
  3603. # ac_cv_make_tickadj before AC_CACHE_CHECK will cause a false
  3604. # report that the configuration variable was cached. It may
  3605. # be better to simply remove the hunk above, I did not want
  3606. # to remove it if there is hope it will be used again.
  3607. #
  3608. unset ac_cv_make_tickadj
  3609. AC_CACHE_CHECK([if we want and can make the tickadj utility], ac_cv_make_tickadj,
  3610. ac_cv_make_tickadj=yes)
  3611. case "$ac_cv_make_tickadj" in
  3612. yes)
  3613. MAKE_TICKADJ=tickadj
  3614. ;;
  3615. esac
  3616. AC_SUBST(MAKE_TIMETRIM)
  3617. AC_CACHE_CHECK([if we want and can make the timetrim utility], ac_cv_make_timetrim,
  3618. [case "$host" in
  3619. *-*-irix*)
  3620. ac_cv_make_timetrim=yes
  3621. ;;
  3622. *-*-unicosmp*)
  3623. ac_cv_make_timetrim=yes
  3624. ;;
  3625. *)
  3626. ac_cv_make_timetrim=no
  3627. ;;
  3628. esac])
  3629. case "$ac_cv_make_timetrim" in
  3630. yes)
  3631. MAKE_TIMETRIM=timetrim
  3632. ;;
  3633. esac
  3634. AC_SUBST(MAKE_LIBNTPSIM)
  3635. AC_SUBST(MAKE_NTPDSIM)
  3636. AC_MSG_CHECKING([if we want to build the NTPD simulator])
  3637. AC_ARG_ENABLE(
  3638. [simulator],
  3639. AC_HELP_STRING(
  3640. [--enable-simulator],
  3641. [- build/install the NTPD simulator?]
  3642. ),
  3643. [ans=$enableval],
  3644. [ans=no]
  3645. )
  3646. AC_MSG_RESULT([$ans])
  3647. case "$ans" in
  3648. yes)
  3649. MAKE_NTPDSIM=ntpdsim
  3650. MAKE_LIBNTPSIM=libntpsim.a
  3651. ;;
  3652. esac
  3653. case "$build" in
  3654. $host)
  3655. ;;
  3656. *) case "$host" in
  3657. *-*-vxworks*)
  3658. LDFLAGS="$LDFLAGS -r"
  3659. ;;
  3660. esac
  3661. ;;
  3662. esac
  3663. AC_MSG_CHECKING([if we should always slew the time])
  3664. # target-specific defaults
  3665. case "$host" in
  3666. *-apple-aux[[23]]*)
  3667. ans=yes
  3668. ;;
  3669. *-*-bsdi[[012]]*)
  3670. ans=no
  3671. ;;
  3672. *-*-bsdi*)
  3673. ans=yes
  3674. ;;
  3675. *-*-openvms*) # HMS: won't be found
  3676. ans=yes
  3677. ;;
  3678. *) ans=no
  3679. ;;
  3680. esac
  3681. # --enable-slew-always / --disable-slew-always overrides default
  3682. AC_ARG_ENABLE(
  3683. [slew-always],
  3684. AC_HELP_STRING(
  3685. [--enable-slew-always],
  3686. [s always slew the time]
  3687. ),
  3688. [ans=$enableval]
  3689. )
  3690. AC_MSG_RESULT([$ans])
  3691. case "$ans" in
  3692. yes) AC_DEFINE(SLEWALWAYS, 1, [Slew always?]) ;;
  3693. esac
  3694. AC_MSG_CHECKING([if we should step and slew the time])
  3695. case "$host" in
  3696. *-sni-sysv*)
  3697. ans=yes
  3698. ;;
  3699. *-univel-sysv*)
  3700. ans=no
  3701. ;;
  3702. *-*-ptx*)
  3703. ans=yes
  3704. ;;
  3705. *-*-solaris2.1[[0-9]]*)
  3706. ans=no
  3707. ;;
  3708. *-*-solaris2.[[012]]*)
  3709. ans=yes
  3710. ;;
  3711. *-*-sysv4*) # HMS: Does this catch Fujitsu UXP?
  3712. ans=yes
  3713. ;;
  3714. *) ans=no
  3715. ;;
  3716. esac
  3717. AC_ARG_ENABLE(
  3718. [step-slew],
  3719. AC_HELP_STRING(
  3720. [--enable-step-slew],
  3721. [s step and slew the time]
  3722. ),
  3723. [ans=$enableval]
  3724. )
  3725. AC_MSG_RESULT([$ans])
  3726. case "$ans" in
  3727. yes) AC_DEFINE(STEP_SLEW, 1, [Step, then slew the clock?]) ;;
  3728. esac
  3729. AC_MSG_CHECKING([if ntpdate should step the time])
  3730. case "$host" in
  3731. *-apple-aux[[23]]*)
  3732. ans=yes
  3733. ;;
  3734. *) ans=no
  3735. esac
  3736. AC_ARG_ENABLE(
  3737. [ntpdate-step],
  3738. AC_HELP_STRING(
  3739. [--enable-ntpdate-step],
  3740. [s if ntpdate should step the time]
  3741. ),
  3742. [ans=$enableval]
  3743. )
  3744. AC_MSG_RESULT([$ans])
  3745. case "$ans" in
  3746. yes) AC_DEFINE(FORCE_NTPDATE_STEP, 1, [force ntpdate to step the clock if !defined(STEP_SLEW) ?]) ;;
  3747. esac
  3748. AC_MSG_CHECKING([if we should sync TODR clock every hour])
  3749. case "$host" in
  3750. *-*-nextstep*)
  3751. ans=yes
  3752. ;;
  3753. *-*-openvms*) # HMS: won't be found
  3754. ans=yes
  3755. ;;
  3756. *)
  3757. ans=no
  3758. esac
  3759. AC_ARG_ENABLE(
  3760. [hourly-todr-sync],
  3761. AC_HELP_STRING(
  3762. [--enable-hourly-todr-sync],
  3763. [s if we should sync TODR hourly]
  3764. ),
  3765. [ans=$enableval]
  3766. )
  3767. AC_MSG_RESULT([$ans])
  3768. case "$ac_cv_var_sync_todr" in
  3769. yes) AC_DEFINE(DOSYNCTODR, 1, [synch TODR hourly?]) ;;
  3770. esac
  3771. AC_MSG_CHECKING([if we should avoid kernel FLL bug])
  3772. case "$host" in
  3773. *-*-solaris2.6)
  3774. unamev=`uname -v`
  3775. case "$unamev" in
  3776. Generic_105181-*)
  3777. old_IFS="$IFS"
  3778. IFS="-"
  3779. set $unamev
  3780. IFS="$old_IFS"
  3781. if test "$2" -ge 17
  3782. then
  3783. # Generic_105181-17 and higher
  3784. ans=no
  3785. else
  3786. ans=yes
  3787. fi
  3788. ;;
  3789. *)
  3790. ans=yes
  3791. esac
  3792. ;;
  3793. *-*-solaris2.7)
  3794. unamev=`uname -v`
  3795. case "$unamev" in
  3796. Generic_106541-*)
  3797. old_IFS="$IFS"
  3798. IFS="-"
  3799. set $unamev
  3800. IFS="$old_IFS"
  3801. if test "$2" -ge 07
  3802. then
  3803. # Generic_106541-07 and higher
  3804. ans=no
  3805. else
  3806. ans=yes
  3807. fi
  3808. ;;
  3809. *)
  3810. ans=yes
  3811. esac
  3812. ;;
  3813. *)
  3814. ans=no
  3815. esac
  3816. AC_ARG_ENABLE(
  3817. [kernel-fll-bug],
  3818. AC_HELP_STRING(
  3819. [--enable-kernel-fll-bug],
  3820. [s if we should avoid a kernel FLL bug]
  3821. ),
  3822. [ans=$enableval]
  3823. )
  3824. AC_MSG_RESULT([$ans])
  3825. case "$ans" in
  3826. yes) AC_DEFINE(KERNEL_FLL_BUG, 1, [Does the kernel have an FLL bug?]) ;;
  3827. esac
  3828. AC_MSG_CHECKING([if we should use the IRIG sawtooth filter])
  3829. case "$host" in
  3830. *-*-solaris2.[[89]])
  3831. ans=yes
  3832. ;;
  3833. *-*-solaris2.1[[0-9]]*)
  3834. ans=yes
  3835. ;;
  3836. *) ans=no
  3837. esac
  3838. AC_ARG_ENABLE(
  3839. [irig-sawtooth],
  3840. AC_HELP_STRING(
  3841. [--enable-irig-sawtooth],
  3842. [s if we should enable the IRIG sawtooth filter]
  3843. ),
  3844. [ans=$enableval]
  3845. )
  3846. AC_MSG_RESULT([$ans])
  3847. case "$ans" in
  3848. yes) AC_DEFINE(IRIG_SUCKS, 1, [Should we use the IRIG sawtooth filter?]) ;;
  3849. esac
  3850. AC_MSG_CHECKING([if we should enable NIST lockclock scheme])
  3851. AC_ARG_ENABLE(
  3852. [nist],
  3853. AC_HELP_STRING(
  3854. [--enable-nist],
  3855. [- if we should enable the NIST lockclock scheme]
  3856. ),
  3857. [ans=$enableval],
  3858. [ans=no]
  3859. )
  3860. AC_MSG_RESULT([$ans])
  3861. case "$ans" in
  3862. yes) AC_DEFINE(LOCKCLOCK, 1, [Should we align with the NIST lockclock scheme?]) ;;
  3863. esac
  3864. AC_MSG_CHECKING([if we want support for Samba's signing daemon])
  3865. AC_ARG_ENABLE(
  3866. [ntp-signd],
  3867. AC_HELP_STRING(
  3868. [--enable-ntp-signd],
  3869. [- Provide support for Samba's signing daemon, =/var/run/ntp_signd]
  3870. ),
  3871. [ans=$enableval],
  3872. [ans=no]
  3873. )
  3874. AC_MSG_RESULT([$ans])
  3875. case "$ans" in
  3876. no)
  3877. ntp_signd_path=
  3878. ;;
  3879. yes)
  3880. ntp_signd_path=/var/run/ntp_signd
  3881. ;;
  3882. *)
  3883. ntp_signd_path="$ans"
  3884. esac
  3885. case "$ntp_signd_path" in
  3886. '')
  3887. wintime_default=no
  3888. ;;
  3889. *)
  3890. wintime_default=yes
  3891. AC_DEFINE(HAVE_NTP_SIGND, ,[Do we want support for Samba's signing daemon?])
  3892. AC_DEFINE_UNQUOTED(NTP_SIGND_PATH, "$ntp_signd_path", [Path to sign daemon rendezvous socket])
  3893. esac
  3894. AC_MSG_CHECKING([if we want the windows symmetric client hack])
  3895. # default is no, unless --enable-ntp-signd was given
  3896. ans=$wintime_default
  3897. unset wintime_default
  3898. AC_ARG_ENABLE(
  3899. [wintime],
  3900. AC_HELP_STRING(
  3901. [--enable-wintime],
  3902. [- Provide the windows symmetric client hack]
  3903. ),
  3904. [ans=$enableval],
  3905. )
  3906. AC_MSG_RESULT([$ans])
  3907. case "$ans" in
  3908. yes)
  3909. AC_DEFINE(WINTIME, ,[Do we want the windows symmetric client hack?])
  3910. esac
  3911. AC_CHECK_HEADERS(sys/clockctl.h)
  3912. case "$host" in
  3913. *-*-netbsd*)
  3914. ans=yes
  3915. ;;
  3916. *) ans=no
  3917. ;;
  3918. esac
  3919. AC_ARG_ENABLE(
  3920. [clockctl],
  3921. AC_HELP_STRING(
  3922. [--enable-clockctl],
  3923. [s Use /dev/clockctl for non-root clock control]
  3924. ),
  3925. [ntp_use_dev_clockctl=$enableval],
  3926. [ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h]
  3927. )
  3928. AC_MSG_CHECKING([[if we should use /dev/clockctl]])
  3929. AC_MSG_RESULT([$ntp_use_dev_clockctl])
  3930. AC_CHECK_HEADERS([sys/capability.h])
  3931. AC_CHECK_HEADERS([sys/prctl.h])
  3932. AC_MSG_CHECKING([[if we have linux capabilities (libcap)]])
  3933. case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
  3934. yesyes)
  3935. ntp_have_linuxcaps=yes
  3936. ;;
  3937. *)
  3938. ntp_have_linuxcaps=no
  3939. esac
  3940. AC_MSG_RESULT([$ntp_have_linuxcaps])
  3941. AC_ARG_ENABLE(
  3942. [linuxcaps],
  3943. AC_HELP_STRING(
  3944. [--enable-linuxcaps],
  3945. [+ Use Linux capabilities for non-root clock control]
  3946. ),
  3947. [ntp_have_linuxcaps=$enableval]
  3948. )
  3949. case "$ntp_have_linuxcaps" in
  3950. yes)
  3951. AC_DEFINE(HAVE_LINUX_CAPABILITIES, ,[[Do we have Linux capabilities?]])
  3952. LIBS="$LIBS -lcap"
  3953. esac
  3954. case "$ntp_use_dev_clockctl$ntp_have_linuxcaps" in
  3955. *yes*)
  3956. AC_DEFINE(HAVE_DROPROOT, ,[[Can we drop root privileges?]])
  3957. esac
  3958. AC_CHECK_HEADERS([libscf.h])
  3959. case "$ac_cv_header_libscf_h" in
  3960. yes)
  3961. AC_SUBST(LSCF, [-lscf])
  3962. esac
  3963. AC_CHECK_FUNC(
  3964. [setppriv],
  3965. AC_DEFINE(HAVE_SOLARIS_PRIVS, ,[[Are Solaris privileges available?]])
  3966. )
  3967. #
  3968. # ISC stuff
  3969. #
  3970. if test $ac_cv_struct_sockaddr_has_sa_len = yes; then
  3971. AC_DEFINE(ISC_PLATFORM_HAVESALEN, ,[ISC: struct sockaddr as sa_len?])
  3972. fi
  3973. AC_ARG_ENABLE(ipv6, AC_HELP_STRING([--enable-ipv6], [s use IPv6?]))
  3974. case "$enable_ipv6" in
  3975. yes|''|autodetect)
  3976. case "$host" in
  3977. powerpc-ibm-aix4*) ;;
  3978. *)
  3979. AC_DEFINE(WANT_IPV6, ,[configure --enable-ipv6])
  3980. ;;
  3981. esac
  3982. ;;
  3983. no)
  3984. ;;
  3985. esac
  3986. AC_CACHE_CHECK(
  3987. [for IPv6 structures],
  3988. ac_cv_isc_found_ipv6,
  3989. [
  3990. AC_COMPILE_IFELSE(
  3991. [
  3992. AC_LANG_PROGRAM(
  3993. [
  3994. #include <sys/types.h>
  3995. #include <sys/socket.h>
  3996. #include <netinet/in.h>
  3997. ],
  3998. [
  3999. struct sockaddr_in6 sin6;
  4000. ]
  4001. )
  4002. ],
  4003. [ac_cv_isc_found_ipv6=yes],
  4004. [ac_cv_isc_found_ipv6=no]
  4005. )
  4006. ]
  4007. )
  4008. #
  4009. # See whether IPv6 support is provided via a Kame add-on.
  4010. # This is done before other IPv6 linking tests so LIBS is properly set.
  4011. #
  4012. AC_MSG_CHECKING([for Kame IPv6 support])
  4013. AC_ARG_WITH(kame,
  4014. [AC_HELP_STRING([--with-kame], [- =/usr/local/v6])],
  4015. use_kame="$withval", use_kame="no")
  4016. case "$use_kame" in
  4017. no)
  4018. ;;
  4019. yes)
  4020. kame_path=/usr/local/v6
  4021. ;;
  4022. *)
  4023. kame_path="$use_kame"
  4024. ;;
  4025. esac
  4026. case "$use_kame" in
  4027. no)
  4028. AC_MSG_RESULT(no)
  4029. ;;
  4030. *)
  4031. if test -f $kame_path/lib/libinet6.a; then
  4032. AC_MSG_RESULT($kame_path/lib/libinet6.a)
  4033. LIBS="-L$kame_path/lib -linet6 $LIBS"
  4034. else
  4035. AC_MSG_ERROR([$kame_path/lib/libinet6.a not found.
  4036. Please choose the proper path with the following command:
  4037. configure --with-kame=PATH
  4038. ])
  4039. fi
  4040. ;;
  4041. esac
  4042. #
  4043. # Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
  4044. # Including it on Kame-using platforms is very bad, though, because
  4045. # Kame uses #error against direct inclusion. So include it on only
  4046. # the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
  4047. # This is done before the in6_pktinfo check because that's what
  4048. # netinet6/in6.h is needed for.
  4049. #
  4050. case "$host" in
  4051. *-bsdi4.[[01]]*)
  4052. AC_DEFINE(ISC_PLATFORM_NEEDNETINET6IN6H, 1, [Do we need netinet6/in6.h?])
  4053. isc_netinet6in6_hack="#include <netinet6/in6.h>"
  4054. ;;
  4055. *)
  4056. isc_netinet6in6_hack=""
  4057. esac
  4058. #
  4059. # This is similar to the netinet6/in6.h issue.
  4060. #
  4061. case "$host" in
  4062. *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
  4063. AC_DEFINE(ISC_PLATFORM_FIXIN6ISADDR, 1,[Do we need to fix in6isaddr?])
  4064. isc_netinetin6_hack="#include <netinet/in6.h>"
  4065. ;;
  4066. *)
  4067. isc_netinetin6_hack=""
  4068. esac
  4069. case "$ac_cv_isc_found_ipv6" in
  4070. yes)
  4071. AC_DEFINE(ISC_PLATFORM_HAVEIPV6, ,[have IPv6?])
  4072. AC_CACHE_CHECK(
  4073. [for in6_pktinfo],
  4074. ac_cv_have_in6_pktinfo,
  4075. [
  4076. AC_COMPILE_IFELSE(
  4077. [
  4078. AC_LANG_PROGRAM(
  4079. [
  4080. #include <sys/types.h>
  4081. #include <sys/socket.h>
  4082. #include <netinet/in.h>
  4083. $isc_netinetin6_hack
  4084. $isc_netinet6in6_hack
  4085. ],
  4086. [
  4087. struct in6_pktinfo xyzzy;
  4088. ]
  4089. )
  4090. ],
  4091. [ac_cv_have_in6_pktinfo=yes],
  4092. [ac_cv_have_in6_pktinfo=no]
  4093. )
  4094. ]
  4095. )
  4096. case "$ac_cv_have_in6_pktinfo" in
  4097. yes)
  4098. AC_DEFINE(ISC_PLATFORM_HAVEIN6PKTINFO, , [have struct in6_pktinfo?])
  4099. esac
  4100. # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
  4101. AC_CACHE_CHECK(
  4102. [for sockaddr_in6.sin6_scope_id],
  4103. ac_cv_have_sin6_scope_id,
  4104. [
  4105. AC_COMPILE_IFELSE(
  4106. [
  4107. AC_LANG_PROGRAM(
  4108. [
  4109. #include <sys/types.h>
  4110. #include <sys/socket.h>
  4111. #include <netinet/in.h>
  4112. $isc_netinetin6_hack
  4113. $isc_netinet6in6_hack
  4114. ],
  4115. [
  4116. struct sockaddr_in6 xyzzy;
  4117. xyzzy.sin6_scope_id = 0;
  4118. ]
  4119. )
  4120. ],
  4121. [ac_cv_have_sin6_scope_id=yes],
  4122. [ac_cv_have_sin6_scope_id=no]
  4123. )
  4124. ]
  4125. )
  4126. case "$ac_cv_have_sin6_scope_id" in
  4127. yes)
  4128. AC_DEFINE(ISC_PLATFORM_HAVESCOPEID, , [have sin6_scope_id?])
  4129. esac
  4130. esac
  4131. # We need this check run even without ac_cv_isc_found_ipv6=yes
  4132. AC_CACHE_CHECK(
  4133. [for in6addr_any],
  4134. ac_cv_have_in6addr_any,
  4135. [
  4136. AC_COMPILE_IFELSE(
  4137. [
  4138. AC_LANG_PROGRAM(
  4139. [
  4140. #include <sys/types.h>
  4141. #include <sys/socket.h>
  4142. #include <netinet/in.h>
  4143. $isc_netinetin6_hack
  4144. $isc_netinet6in6_hack
  4145. ],
  4146. [
  4147. struct in6_addr in6;
  4148. in6 = in6addr_any;
  4149. ]
  4150. )
  4151. ],
  4152. [ac_cv_have_in6addr_any=yes],
  4153. [ac_cv_have_in6addr_any=no]
  4154. )
  4155. ]
  4156. )
  4157. case "$ac_cv_have_in6addr_any" in
  4158. no)
  4159. AC_DEFINE(ISC_PLATFORM_NEEDIN6ADDRANY, , [missing in6addr_any?])
  4160. esac
  4161. AC_CACHE_CHECK(
  4162. [for struct if_laddrconf],
  4163. ac_cv_isc_struct_if_laddrconf,
  4164. [
  4165. AC_COMPILE_IFELSE(
  4166. [
  4167. AC_LANG_PROGRAM(
  4168. [
  4169. #include <sys/types.h>
  4170. #include <net/if6.h>
  4171. ],
  4172. [
  4173. struct if_laddrconf a;
  4174. ]
  4175. )
  4176. ],
  4177. [ac_cv_isc_struct_if_laddrconf=yes],
  4178. [ac_cv_isc_struct_if_laddrconf=no]
  4179. )
  4180. ]
  4181. )
  4182. case "$ac_cv_isc_struct_if_laddrconf" in
  4183. yes)
  4184. AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRCONF, , [have struct if_laddrconf?])
  4185. esac
  4186. AC_CACHE_CHECK(
  4187. [for struct if_laddrreq],
  4188. ac_cv_isc_struct_if_laddrreq,
  4189. [
  4190. AC_COMPILE_IFELSE(
  4191. [
  4192. AC_LANG_PROGRAM(
  4193. [
  4194. #include <sys/types.h>
  4195. #include <net/if6.h>
  4196. ],
  4197. [
  4198. struct if_laddrreq a;
  4199. ]
  4200. )
  4201. ],
  4202. [ac_cv_isc_struct_if_laddrreq=yes],
  4203. [ac_cv_isc_struct_if_laddrreq=no]
  4204. )
  4205. ]
  4206. )
  4207. case "$ac_cv_isc_struct_if_laddrreq" in
  4208. yes)
  4209. AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRREQ, , [have struct if_laddrreq?])
  4210. esac
  4211. #
  4212. # Look for a sysctl call to get the list of network interfaces.
  4213. #
  4214. AC_CACHE_CHECK(
  4215. [for interface list sysctl],
  4216. ac_cv_iflist_sysctl,
  4217. AC_EGREP_CPP(
  4218. [found_rt_iflist],
  4219. [
  4220. #include <sys/param.h>
  4221. #include <sys/sysctl.h>
  4222. #include <sys/socket.h>
  4223. #ifdef NET_RT_IFLIST
  4224. found_rt_iflist
  4225. #endif
  4226. ],
  4227. [ac_cv_iflist_sysctl=yes],
  4228. [ac_cv_iflist_sysctl=no]
  4229. )
  4230. )
  4231. case "$ac_cv_iflist_sysctl" in
  4232. yes)
  4233. AC_DEFINE(HAVE_IFLIST_SYSCTL,1,[have iflist_sysctl?])
  4234. esac
  4235. ###
  4236. AC_DEFINE_DIR(NTP_KEYSDIR, sysconfdir, [Default location of crypto key info])
  4237. AC_CONFIG_FILES(Makefile)
  4238. AC_CONFIG_FILES(ElectricFence/Makefile)
  4239. AC_CONFIG_FILES(adjtimed/Makefile)
  4240. AC_CONFIG_FILES(clockstuff/Makefile)
  4241. AC_CONFIG_FILES(include/Makefile)
  4242. AC_CONFIG_FILES(include/isc/Makefile)
  4243. AC_CONFIG_FILES(kernel/Makefile)
  4244. AC_CONFIG_FILES(kernel/sys/Makefile)
  4245. AC_CONFIG_FILES(libntp/Makefile)
  4246. AC_CONFIG_FILES(libparse/Makefile)
  4247. AC_CONFIG_FILES(ntpd/Makefile)
  4248. AC_CONFIG_FILES(ntpdate/Makefile)
  4249. AC_CONFIG_FILES(ntpdc/Makefile)
  4250. AC_CONFIG_FILES(ntpdc/nl.pl, [chmod +x ntpdc/nl.pl])
  4251. AC_CONFIG_FILES(ntpq/Makefile)
  4252. AC_CONFIG_FILES(parseutil/Makefile)
  4253. AC_CONFIG_FILES(scripts/Makefile)
  4254. AC_CONFIG_FILES(scripts/calc_tickadj, [chmod +x scripts/calc_tickadj])
  4255. AC_CONFIG_FILES(scripts/checktime, [chmod +x scripts/checktime])
  4256. AC_CONFIG_FILES(scripts/freq_adj, [chmod +x scripts/freq_adj])
  4257. AC_CONFIG_FILES(scripts/html2man, [chmod +x scripts/html2man])
  4258. AC_CONFIG_FILES(scripts/mkver, [chmod +x scripts/mkver])
  4259. AC_CONFIG_FILES(scripts/ntp-wait, [chmod +x scripts/ntp-wait])
  4260. AC_CONFIG_FILES(scripts/ntpsweep, [chmod +x scripts/ntpsweep])
  4261. AC_CONFIG_FILES(scripts/ntptrace, [chmod +x scripts/ntptrace])
  4262. AC_CONFIG_FILES(scripts/ntpver, [chmod +x scripts/ntpver])
  4263. AC_CONFIG_FILES(scripts/plot_summary, [chmod +x scripts/plot_summary])
  4264. AC_CONFIG_FILES(scripts/summary, [chmod +x scripts/summary])
  4265. AC_CONFIG_FILES(util/Makefile)
  4266. AC_CONFIG_SUBDIRS(sntp)
  4267. AC_OUTPUT