]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Merge shiny.ad.hartbrothers.com:C:/ntp/ntp-stable-undef
authorDave Hart <hart@ntp.org>
Tue, 30 Nov 2010 06:31:02 +0000 (06:31 +0000)
committerDave Hart <hart@ntp.org>
Tue, 30 Nov 2010 06:31:02 +0000 (06:31 +0000)
into  shiny.ad.hartbrothers.com:C:/ntp/ntp-dev-undef

bk: 4cf49a26_KHpep0h511BVyYS-qzhmw

1  2 
ChangeLog
configure.ac
sntp/configure.ac

diff --cc ChangeLog
index 7b6a81f199ac6f03b8c93af4d6abd9294842229f,3c9a6dfbd1a6823bf4b4423b95540535967d049b..0b2e2bf15f00dcff01ce909b603ad4f1e270de1d
+++ b/ChangeLog
++* from 4.2.6p3-RC12: Clean up m4 quoting in configure.ac, *.m4 files,
++  resolving intermittent AC_LANG_PROGRAM possibly undefined errors.
 +(4.2.7p86) 2010/11/29 Released by Harlan Stenn <stenn@ntp.org>
 +* Documentation updates from Dave Mills.
 +(4.2.7p85) 2010/11/24 Released by Harlan Stenn <stenn@ntp.org>
 +* Documentation updates from Dave Mills.
 +(4.2.7p84) 2010/11/22 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1618] Unreachable code in jjy_start().
 +* [Bug 1725] from 4.2.6p3-RC11: ntpd sends multicast from only one
 +  address.
 +* from 4.2.6p3-RC11: Upgrade libopts to 33.3.8.
 +* from 4.2.6p3-RC11: Bump minimum Automake version to 1.11, required for
 +  AM_COND_IF use in LIBOPTS_CHECK.
 +* An almost complete rebuild of the initial loopfilter configuration
 +  process, including the code that determines the interval between
 +  frequency file updates, from Dave Mills.
 +* Documentation updates from Dave Mills.
 +* Add ntp-keygen -l/--lifetime to control certificate expiry.
 +* JJY driver improvements for Tristate JJY01/02, including changes
 +  to its clockstats format.
 +* Add "nonvolatile" ntp.conf directive to control how often the
 +  driftfile is written.
 +(4.2.7p83) 2010/11/17 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1727] ntp-keygen PLEN, ILEN undeclared --without-crypto.
 +* Remove top-level libopts, use sntp/libopts.
 +* from 4.2.6p3-RC11: Remove log_msg() and debug_msg() from sntp in favor
 +  of msyslog().
 +* Documentation updates from Dave Mills.
 +(4.2.7p82) 2010/11/16 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1728] from 4.2.6p3-RC11: In ntp_openssl.m4, don't add
 +  -I/usr/include or -L/usr/lib to CPPFLAGS or LDFLAGS.
 +(4.2.7p81) 2010/11/14 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1681] from 4.2.6p3-RC10: More sntp logging cleanup.
 +* [Bug 1683] from 4.2.6p3-RC10: Non-localhost on loopback exempted from
 +  nic rules.
 +* [Bug 1719] Cleanup for ntp-keygen and fix -V crash, from Dave Mills.
 +(4.2.7p80) 2010/11/10 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1574] from 4.2.6p3-RC9: sntp doesn't set tv_usec correctly.
 +* [Bug 1681] from 4.2.6p3-RC9: sntp logging cleanup.
 +* [Bug 1683] from 4.2.6p3-RC9: Interface binding does not seem to work
 +  as intended.
 +* [Bug 1708] make check fails with googletest 1.4.0.
 +* [Bug 1709] from 4.2.6p3-RC9: ntpdate ignores replies with equal
 +  receive and transmit timestamps.
 +* [Bug 1715] sntp utilitiesTest.IPv6Address failed.
 +* [Bug 1718] Improve gtest checks in configure.ac.
 +(4.2.7p79) 2010/11/07 Released by Harlan Stenn <stenn@ntp.org>
 +* Correct frequency estimate with no drift file, from David Mills.
 +(4.2.7p78) 2010/11/04 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1697] filegen implementation should be improved.
 +* Refactor calendar functions in terms of new common code.
 +* Documentation updates from Dave Mills.
 +(4.2.7p77) 2010/11/03 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1692] packageinfo.sh needs to be "sourced" using ./ .
 +* [Bug 1695] ntpdate takes longer than necessary.
 +(4.2.7p76) 2010/11/02 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1690] Unit tests fails to build on some systems.
 +* [Bug 1691] Use first NMEA sentence each second.
 +* Put the sntp tests under sntp/ .
 +* ... and only build/run them if we have gtest.
 +* Documentation updates from Dave Mills.
 +(4.2.7p75) 2010/10/30 Released by Harlan Stenn <stenn@ntp.org>
 +* Documentation updates from Dave Mills.
 +* Include Linus Karlsson's GSoC 2010 testing code.
 +(4.2.7p74) 2010/10/29 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1685] from 4.2.6p3-RC8: NMEA driver mode byte confusion.
 +* from 4.2.6p3-RC8: First cut at using scripts/checkChangeLog.
 +* Documentation updates from Dave Mills.
 +(4.2.7p73) 2010/10/27 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1680] Fix alignment of clock_select() arrays.
 +* refinements to new startup behavior from David Mills.
 +* For the bootstrap script, touch .html files last.
 +* Add 'make check' test case that would have caught [Bug 1678].
 +(4.2.7p72) 2010/10/26 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1679] Fix test for -lsocket.
 +* Clean up missing ;; entries in configure.ac.
 +(4.2.7p71) 2010/10/25 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1676] from 4.2.6p3-RC7: NMEA: $GPGLL did not work after fix
 +  for Bug 1571.
 +* [Bug 1678] "restrict source" treated as "restrict default".
 +* from 4.2.6p3-RC7: Added scripts/checkChangeLog.
 +(4.2.7p70) 2010/10/24 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1571] from 4.2.6p3-RC6: NMEA does not relate data to PPS edge.
 +* [Bug 1572] from 4.2.p63-RC6: NMEA time adjustment for GPZDG buggy.
 +* [Bug 1675] from 4.2.6p3-RC6: Prohibit includefile remote config.
 +* Enable generating ntpd/ntp_keyword.h after keyword-gen.c changes on
 +  Windows as well as POSIX platforms.
 +* Fix from Dave Mills for a rare singularity in clock_combine().
 +(4.2.7p69) 2010/10/23 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1671] Automatic delay calibration is sometimes inaccurate.
 +(4.2.7p68) 2010/10/22 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1669] from 4.2.6p3-RC5: NTP fails to compile on IBM AIX 5.3.
 +* [Bug 1670] Fix peer->bias and broadcastdelay.
 +* Documentation updates from Dave Mills.
 +* Documentation EOL cleanup.
 +(4.2.7p67) 2010/10/21 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1649] from 4.2.6p3-RC5: Require NMEA checksum if $GPRMC or
 +  previously seen.
 +(4.2.7p66) 2010/10/19 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1277] Provide and use O(1) FIFOs, esp. in the config tree code.
 +* Remove unused 'bias' configuration keyword.
 +(4.2.7p65) 2010/10/16 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1584] from 4.2.6p3-RC4: wrong SNMP type for precision,
 +  resolution.
 +* Remove 'calldelay' and 'sign' remnants from parser, ntp_config.c.
 +(4.2.7p64) 2010/10/15 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1584] from 4.2.6p3-RC3: ntpsnmpd OID must be mib-2.197.
 +* [Bug 1659] from 4.2.6p3-RC4: Need CLOCK_TRUETIME not CLOCK_TRUE.
 +* [Bug 1663] ntpdsim should not open net sockets.
 +* [Bug 1665] from 4.2.6p3-RC4: is_anycast() u_int32_t should be u_int32.
 +* from 4.2.6p3: ntpsnmpd, libntpq warning cleanup.
 +* Remove 'calldelay' and 'sign' keywords (Dave Mills).
 +* Documentation updates from Dave Mills.
 +(4.2.7p63) 2010/10/13 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1080] from 4.2.6p3-RC3: ntpd on ipv6 routers very chatty.
 +* Documentation nit cleanup.
 +* Documentation updates from Dave Mills.
 +(4.2.7p62) 2010/10/12 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 750] from 4.2.6p3-RC3: Non-existing device causes coredump with 
 +  RIPE-NCC driver.
 +* [Bug 1567] from 4.2.6p3-RC3: Support Arbiter 1093C Satellite Clock on
 +  Windows.
 +* [Bug 1581] from 4.2.6p3-RC3: printf format string mismatch leftover.
 +* [Bug 1659] from 4.2.6p3-RC3: Support Truetime Satellite Clocks on
 +  Windows. 
 +* [Bug 1660] from 4.2.6p3-RC3: On some systems, test is in /usr/bin, not
 +  /bin. 
 +* [Bug 1661] from 4.2.6p3-RC3: Re-indent refclock_ripencc.c.
 +* Lose peer_count from ntp_peer.c and ntp_proto.c (Dave Mills).
 +* Documentation updates from Dave Mills.
 +(4.2.7p61) 2010/10/06 Released by Harlan Stenn <stenn@ntp.org>
 +* Documentation and code cleanup from Dave Mills. No more NTP_MAXASSOC.
 +(4.2.7p60) 2010/10/04 Released by Harlan Stenn <stenn@ntp.org>
 +* Documentation updates from Dave Mills.
 +(4.2.7p59) 2010/10/02 Released by Harlan Stenn <stenn@ntp.org>
 +* Documentation updates from Dave Mills.
 +* Variable name cleanup from Dave Mills.
 +* [Bug 1657] darwin needs res_9_init, not res_init.
 +(4.2.7p58) 2010/09/30 Released by Harlan Stenn <stenn@ntp.org>
 +* Clock select bugfix from Dave Mills.
 +* [Bug 1554] peer may stay selected as system peer after becoming
 +  unreachable.
 +* [Bug 1644] from 4.2.6p3-RC3: cvo.sh should use lsb_release to identify
 +  linux distros.
 +* [Bug 1646] ntpd crashes with relative path to logfile.
 +(4.2.7p57) 2010/09/27 Released by Harlan Stenn <stenn@ntp.org>
 +* Documentation updates from Dave Mills.
 +(4.2.7p56) 2010/09/25 Released by Harlan Stenn <stenn@ntp.org>
 +* Clock combining algorithm improvements from Dave Mills.
 +* Documentation updates from Dave Mills.
 +* [Bug 1642] ntpdsim can't find simulate block in config file.
 +* [Bug 1643] from 4.2.6p3-RC3: Range-check the decoding of the RIPE-NCC
 +  status codes.
 +(4.2.7p55) 2010/09/22 Released by Harlan Stenn <stenn@ntp.org>
 +* Documentation updates from Dave Mills.
 +* [Bug 1636] from 4.2.6p3-RC2: segfault after denied remote config.
 +(4.2.7p54) 2010/09/21 Released by Harlan Stenn <stenn@ntp.org>
 +* More Initial convergence improvements from Dave Mills.
 +* Documentation updates from Dave Mills.
 +* [Bug 1635] from 4.2.6p3-RC2: "filegen ... enable" is not default.
 +(4.2.7p53) 2010/09/20 Released by Harlan Stenn <stenn@ntp.org>
 +* Documentation updates from Dave Mills.
 +* More Initial convergence improvements from Dave Mills.
 +(4.2.7p52) 2010/09/19 Released by Harlan Stenn <stenn@ntp.org>
 +* Initial convergence improvements from Dave Mills.
 +(4.2.7p51) 2010/09/18 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1344] from 4.2.6p3-RC1: ntpd on Windows exits without logging
 +  cause.
 +* [Bug 1629] 4.2.7p50 configure.ac changes invalidate config.cache.
 +* [Bug 1630] 4.2.7p50 cannot bootstrap on Autoconf 2.61.
 +(4.2.7p50) 2010/09/16 Released by Harlan Stenn <stenn@ntp.org>
 +* Cleanup NTP_LIB_M.
 +* [Bug 1628] Clean up -lxnet/-lsocket usage for (open)solaris.
 +(4.2.7p49) 2010/09/13 Released by Harlan Stenn <stenn@ntp.org>
 +* Documentation updates from Dave Mills.
 +(4.2.7p48) 2010/09/12 Released by Harlan Stenn <stenn@ntp.org>
 +* Documentation updates from Dave Mills.
 +(4.2.7p47) 2010/09/11 Released by Harlan Stenn <stenn@ntp.org>
 +* Documentation updates from Dave Mills.
 +* [Bug 1588] finish configure --disable-autokey implementation.
 +* [Bug 1616] refclock_acts.c: if (pp->leap == 2) is always false.
 +* [Bug 1620] [Backward Incompatible] "discard minimum" value should be in
 +  seconds, not log2 seconds.
 +(4.2.7p46) 2010/09/10 Released by Harlan Stenn <stenn@ntp.org>
 +* Use AC_SEARCH_LIBS instead of AC_CHECK_LIB for NTP_LIB_M.
 +(4.2.7p45) 2010/09/05 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1578] Consistently use -lm when needed.
 +(4.2.7p44) 2010/08/27 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1573] from 4.2.6p3-beta1: Miscalculation of offset in sntp.
 +(4.2.7p43) 2010/08/26 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1602] Refactor some of the sntp/ directory to facililtate testing.
 +(4.2.7p42) 2010/08/18 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1593] ntpd abort in free() with logconfig syntax error.
 +* [Bug 1595] from 4.2.6p3-beta1: empty last line in key file causes
 +  duplicate key to be added
 +* [Bug 1597] from 4.2.6p3-beta1: packet processing ignores RATE KoD packets,
 +  Because of a bug in string comparison.
 +(4.2.7p41) 2010/07/28 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1581] from 4.2.6p3-beta1: ntp_intres.c size_t printf format
 +  string mismatch.
 +* [Bug 1586] ntpd 4.2.7p40 doesn't write to syslog after fork on QNX.
 +* Avoid race with parallel builds using same source directory in
 +  scripts/genver by using build directory for temporary files.
 +* orphanwait documentation updates.
 +(4.2.7p40) 2010/07/12 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1395] ease ntpdate elimination with ntpd -w/--wait-sync
 +* [Bug 1396] allow servers on ntpd command line like ntpdate
 +(4.2.7p39) 2010/07/09 Released by Harlan Stenn <stenn@ntp.org>
 +* Fix typo in driver28.html.
 +* [Bug 1581] from 4.2.6p2: size_t printf format string mismatches, IRIG
 +  string buffers undersized.  Mostly backported from earlier ntp-dev
 +  fixes by Juergen Perlinger.
 +(4.2.7p38) 2010/06/20 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1570] backported to 4.2.6p2-RC7.
 +* [Bug 1575] from 4.2.6p2-RC7: use 'snprintf' with LIB_BUFLENGTH in
 +  inttoa.c, tvtoa.c and utvtoa.c
 +* [Bug 1576] backported to 4.2.6p2-RC7.
 +* Typo fix in a comment in ntp_proto.c.
 +(4.2.7p37) 2010/06/19 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1576] sys/sysctl.h depends on sys/param.h on OpenBSD.
 +(4.2.7p36) 2010/06/15 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1560] Initial support for orphanwait, from Dave Mills.
 +* clock_filter()/reachability fixes from Dave Mills.
 +(4.2.7p35) 2010/06/12 Released by Harlan Stenn <stenn@ntp.org>
 +* Rewrite of multiprecision macros in 'ntp_fp.h' from J. Perlinger
 +  <perlinger@ntp.org>
 +* [Bug 715] from 4.2.6p2-RC6: libisc Linux IPv6 interface iteration
 +  drops multicast flags.
 +(4.2.7p34) 2010/06/05 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1570] serial clock drivers get outdated input from kernel tty
 +  line buffer after startup
 +(4.2.7p33) 2010/06/04 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1561] from 4.2.6p2-RC5: ntpq, ntpdc "passwd" prompts for MD5
 +  password w/SHA1.
 +* [Bug 1565] from 4.2.6p2-RC5: sntp/crypto.c compile fails on MacOS over
 +  vsnprintf().
 +* from 4.2.6p2-RC5: Windows port: do not exit in
 +  ntp_timestamp_from_counter() without first logging the reason.
 +(4.2.7p32) 2010/05/19 Released by Harlan Stenn <stenn@ntp.org>
 +* Copyright file cleanup from Dave Mills.
 +* [Bug 1555] from 4.2.6p2-RC4: sntp illegal C (mixed code and
 +  declarations).
 +* [Bug 1558] pool prototype associations have 0.0.0.0 for remote addr.
 +* configure.ac: add --disable-autokey, #define AUTOKEY to enable future
 +  support for building without Autokey, but with OpenSSL for its digest
 +  algorithms (hash functions).  Code must be modified to use #ifdef
 +  AUTOKEY instead of #ifdef OPENSSL where appropriate to complete this.
 +* include/ntp_crypto.h: make assumption AUTOKEY implies OPENSSL explicit.
 +(4.2.7p31) 2010/05/11 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1325] from 4.2.6p2-RC3: unreachable code sntp recv_bcst_data().
 +* [Bug 1459] from 4.2.6p2-RC3: sntp MD5 authentication does not work
 +  with ntpd.
 +* [Bug 1552] from 4.2.6p2-RC3: update and complete broadcast and crypto
 +  features in sntp.
 +* [Bug 1553] from 4.2.6p2-RC3: sntp/configure.ac OpenSSL support.
 +* from 4.2.6p2-RC3: Escape unprintable characters in a refid in ntpq -p
 +  billboard.
 +* from 4.2.6p2-RC3: Simplify hash client code by providing OpenSSL
 +  EVP_*() API when built without OpenSSL.  (already in 4.2.7)
 +* from 4.2.6p2-RC3: Do not depend on ASCII in sntp.
 +(4.2.7p30) 2010/05/06 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1526] ntpd DNS pipe read EINTR with no network at startup.
 +* Update the ChangeLog entries when merging items from -stable.
 +(4.2.7p29) 2010/05/04 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1542] ntpd mrulist response may have incorrect last.older.
 +* [Bug 1543] ntpq mrulist must refresh nonce when retrying.
 +* [Bug 1544] ntpq mrulist sscanf timestamp format mismatch on 64-bit.
 +* Windows compiling hints/winnt.html update from G. Sunil Tej.
 +(4.2.7p28) 2010/05/03 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1512] from 4.2.6p2-RC3: ntpsnmpd should connect to net-snmpd
 +  via a unix-domain socket by default.
 +  Provide a command-line 'socket name' option.
 +* [Bug 1538] from 4.2.6p2-RC3: update refclock_nmea.c's call to
 +  getprotobyname().
 +* [Bug 1541] from 4.2.6p2-RC3: Fix wrong keyword for "maxclock".
 +(4.2.7p27) 2010/04/27 Released by Harlan Stenn <stenn@ntp.org>
 +(4.2.7p26) 2010/04/24 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1465] from 4.2.6p2-RC2: Make sure time from TS2100 is not
 +  invalid (backport from -dev).
 +* [Bug 1528] from 4.2.6p2-RC2: Fix EDITLINE_LIBS link order for ntpq
 +  and ntpdc.
 +* [Bug 1531] Require nonce with mrulist requests.
 +* [Bug 1532] Remove ntpd support for ntpdc's monlist in favor of ntpq's
 +  mrulist.
 +* [Bug 1534] from 4.2.6p2-RC2: conflicts with VC++ 2010 errno.h.
 +* [Bug 1535] from 4.2.6p2-RC2: "restrict -4 default" and "restrict
 +  -6 default" ignored.
 +(4.2.7p25) 2010/04/20 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1528] from 4.2.6p2-RC2: Remove --with-arlib from br-flock.
 +* [Bug 1503] [Bug 1504] [Bug 1518] [Bug 1522] from 4.2.6p2-RC2:
 +  all of which were fixed in 4.2.7 previously. 
 +(4.2.7p24) 2010/04/13 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1390] Control PPS on the Oncore M12.
 +* [Bug 1518] Windows ntpd should lock to one processor more
 +  conservatively.
 +* [Bug 1520] '%u' formats for size_t gives warnings with 64-bit builds.
 +* [Bug 1522] Enable range syntax "trustedkey (301 ... 399)".
 +* Documentation updates for 4.2.7p22 changes and additions, updating
 +  ntpdc.html, ntpq.html, accopt.html, confopt.html, manyopt.html,
 +  miscopt.html, and miscopt.txt.
 +* accopt.html: non-ntpport doc changes from Dave Mills.
 +* Modify full MRU list preemption when full to match "discard monitor"
 +  documentation, by removing exception for count == 1.
 +(4.2.7p23) 2010/04/04 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1516] unpeer by IP address fails, DNS name works.
 +* [Bug 1517] ntpq and ntpdc should verify reverse DNS before use.
 +  ntpq and ntpdc now use the following format for showing purported
 +  DNS names from IP address "reverse" DNS lookups when the DNS name
 +  does not exist or does not include the original IP address among
 +  the results: "192.168.1.2 (fake.dns.local)".
 +(4.2.7p22) 2010/04/02 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1432] Don't set inheritable flag for linux capabilities.
 +* [Bug 1465] Make sure time from TS2100 is not invalid.
 +* [Bug 1483] AI_NUMERICSERV undefined in 4.2.7p20.
 +* [Bug 1497] fudge is broken by getnetnum() change.
 +* [Bug 1503] Auto-enabling of monitor for "restrict ... limited" wrong.
 +* [Bug 1504] ntpdate tickles ntpd "discard minimum 1" rate limit if
 +  "restrict ... limited" is used.
 +* ntpdate: stop querying source after KoD packet response, log it.
 +* ntpdate: rate limit each server to 2s between packets.
 +* From J. N. Perlinger: avoid pointer wraparound warnings in dolfptoa(),
 +  printf format mismatches with 64-bit size_t.
 +* Broadcast client (ephemeral) associations should be demobilized only
 +  if they are not heard from for 10 consecutive polls, regardless of
 +  surviving the clock selection.  Fix from David Mills.
 +* Add "ntpq -c ifstats" similar to "ntpdc -c ifstats".
 +* Add "ntpq -c sysstats" similar to "ntpdc -c sysstats".
 +* Add "ntpq -c monstats" to show monlist knobs and stats.
 +* Add "ntpq -c mrulist" similar to "ntpdc -c monlist" but not
 +  limited to 600 rows, and with filtering and sorting options:
 +  ntpq -c "mrulist mincount=2 laddr=192.168.1.2 sort=-avgint"
 +  ntpq -c "mrulist sort=addr"
 +  ntpq -c "mrulist mincount=2 sort=count"
 +  ntpq -c "mrulist sort=-lstint"
 +* Modify internal representation of MRU list to use l_fp fixed-point
 +  NTP timestamps instead of seconds since startup.  This increases the
 +  resolution and substantially improves accuracy of sorts involving
 +  timestamps, at the cost of flushing all MRU entries when the clock is
 +  stepped, to ensure the timestamps can be compared with the current
 +  get_systime() results.
 +* Add ntp.conf "mru" directive to configure MRU parameters, such as
 +  "mru mindepth 600 maxage 64 maxdepth 5000 maxmem 1024" or
 +  "mru initalloc 0 initmem 16 incalloc 99 incmem 4".  Several pairs are
 +  equivalent with one in units of MRU entries and its twin in units of
 +  kilobytes of memory, so the last one used in ntp.conf controls:
 +  maxdepth/maxmem, initalloc/initmem, incalloc/incmem.  With the above
 +  values, ntpd will preallocate 16kB worth of MRU entries, allocating
 +  4kB worth each time more are needed, with a hard limit of 1MB of MRU
 +  entries.  Until there are more than 600 entries none would be reused.
 +  Then only entries for addresses last seen 64 seconds or longer ago are
 +  reused.
 +* Limit "ntpdc -c monlist" response in ntpd to 600 entries, the previous
 +  overall limit on the MRU list depth which was driven by the monlist
 +  implementation limit of one request with a single multipacket
 +  response.
 +* New "pool" directive implementation modeled on manycastclient.
 +* Do not abort on non-ASCII characters in ntp.conf, ignore them.
 +* ntpq: increase response reassembly limit from 24 to 32 packets, add
 +  discussion in comment regarding results with even larger MAXFRAGS.
 +* ntpq: handle "passwd MYPASSWORD" (without prompting) as with ntpdc.
 +* ntpdc: do not examine argument to "passwd" if not supplied.
 +* configure: remove check for pointer type used with qsort(), we
 +  require ANSI C which mandates void *.
 +* Reset sys_kodsent to 0 in proto_clr_stats().
 +* Add sptoa()/sockporttoa() similar to stoa()/socktoa() adding :port.
 +* Use memcpy() instead of memmove() when buffers can not overlap.
 +* Remove sockaddr_storage from our sockaddr_u union of sockaddr,
 +  sockaddr_in, and sockaddr_in6, shaving about 100 bytes from its size
 +  and substantially decreasing MRU entry memory consumption.
 +* Extend ntpq readvar (alias rv) to allow fetching up to three named
 +  variables in one operation:  ntpq -c "rv 0 version offset frequency".
 +* ntpq: use srchost variable to show .POOL. prototype associations'
 +  hostname instead of address 0.0.0.0.
 +* "restrict source ..." configures override restrictions for time
 +  sources, allows tight default restrictions to be used with the pool
 +  directive (where server addresses are not known in advance).
 +* Ignore "preempt" modifier on manycastclient and pool prototype
 +  associations.  The resulting associations are preemptible, but the
 +  prototype must not be.
 +* Maintain and use linked list of associations (struct peer) in ntpd,
 +  avoiding walking 128 hash table entries to iterate over peers.
 +* Remove more workarounds unneeded since we require ISO C90 AKA ANSI C:
 +  - remove fallback implementations for memmove(), memset, strstr().
 +  - do not test for atexit() or memcpy().
 +* Collapse a bunch of code duplication in ntpd/ntp_restrict.c added with
 +  support for IPv6.
 +* Correct some corner case failures in automatically enabling the MRU
 +  list if any "restrict ... limited" is in effect, and in disabling MRU
 +  maintenance. (ntp_monitor.c, ntp_restrict.c)
 +* Reverse the internal sort order of the address restriction lists, but
 +  preserve the same behavior.  This allows removal of special-case code
 +  related to the default restrictions and more straightforward lookups
 +  of restrictions for a given address (now, stop on first match).
 +* Move ntp_restrict.c MRU doubly-linked list maintenance code into
 +  ntp_lists.h macros, allowing more duplicated source excision.
 +* Repair ntpdate.c to no longer test HAVE_TIMER_SETTIME.
 +* Do not reference peer_node/unpeer_node after freeing when built with
 +  --disable-saveconfig and using DNS.
 +(4.2.7p21) 2010/03/31 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1514] from 4.2.6p1-RC6: Typo in ntp_proto.c: fabs(foo < .4)
 +  should be fabs(foo) < .4.
 +* [Bug 1464] from 4.2.6p1-RC6: synchronization source wrong for
 +  refclocks ARCRON_MSF (27) and SHM (28).
 +* From 4.2.6p1-RC6: Correct Windows port's refclock_open() to
 +  return 0 on failure not -1.
 +* From 4.2.6p1-RC6: Correct CHU, dumbclock, and WWVB drivers to
 +  check for 0 returned from refclock_open() on failure.
 +* From 4.2.6p1-RC6: Correct "SIMUL=4 ./flock-build -1" to
 +  prioritize -1/--one.
 +* [Bug 1306] constant conditionals in audio_gain().
 +(4.2.7p20) 2010/02/13 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1483] hostname in ntp.conf "restrict" parameter rejected.
 +* Use all addresses for each restrict by hostname.
 +* Use async DNS to resolve trap directive hostnames.
 +(4.2.7p19) 2010/02/09 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1338] Update the association type codes in ntpq.html.
 +* [Bug 1478] from 4.2.6p1-RC5: linking fails: EVP_MD_pkey_type.
 +* [Bug 1479] from 4.2.6p1-RC5: not finding readline headers.
 +* [Bug 1484] from 4.2.6p1-RC5: ushort is not defined in QNX6.
 +(4.2.7p18) 2010/02/07 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1480] from 4.2.6p1-RC5: snprintf() cleanup caused 
 +  unterminated refclock IDs.
 +* Stop using getaddrinfo() to convert numeric address strings to on-wire
 +  addresses in favor of is_ip_address() alone.
 +(4.2.7p17) 2010/02/05 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1477] from 4.2.6p1-RC5: First non-gmake make in clone
 +  w/VPATH can't make COPYRIGHT.
 +* Attempts to cure CID 108 CID 118 CID 119 TAINTED_SCALAR warnings.
 +* Broaden ylwrap workaround VPATH_HACK to all non-GNU make.
 +(4.2.7p16) 2010/02/04 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1474] from 4.2.6p1-RC4: ntp_keygen LCRYPTO after libntp.a.
 +* Include 4.2.6p1-RC4: Remove arlib.
 +(4.2.7p15) 2010/02/03 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1455] from 4.2.6p1: ntpd does not try /etc/ntp.audio.
 +* Include 4.2.6p1: Convert many sprintf() calls to snprintf(), also
 +  strcpy(), strcat().
 +* Include 4.2.6p1: Fix widely cut-n-pasted bug in refclock shutdown
 +  after failed start.
 +* Include 4.2.6p1: Remove some dead code checking for emalloc()
 +  returning NULL.
 +(4.2.7p14) 2010/02/02 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1338] ntpq displays incorrect association type codes.
 +* [Bug 1469] u_int32, int32 changes broke HP-UX 10.20 build.
 +* [Bug 1470] from 4.2.6p1: "make distdir" compiles keyword-gen.
 +* [Bug 1471] CID 120 CID 121 CID 122 is_ip_address() uninit family.
 +* [Bug 1472] CID 116 CID 117 minor warnings in new DNS code.
 +* [Bug 1473] from 4.2.6p1: "make distcheck" version.m4 error.
 +(4.2.7p13) 2010/01/31 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1467] from 4.2.6p1: Fix bogus rebuild of sntp/sntp.html.
 +(4.2.7p12) 2010/01/30 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1468] 'make install' broken for root on default NFS mount.
 +(4.2.7p11) 2010/01/28 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 47] Debugging and logging do not work after a fork.
 +* [Bug 1010] getaddrinfo() could block and thus should not be called by
 +  the main thread/process.
 +* New async DNS resolver in ntpd allows nonblocking queries anytime,
 +  instead of only once at startup.
 +(4.2.7p10) 2010/01/24 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1140] from 4.2.6p1-RC5: Clean up debug.html, decode.html,
 +  and ntpq.html.
 +* Include 4.2.6p1-RC3: Use TZ=UTC instead of TZ= when calling date in
 +  scripts/mkver.in .
 +* [Bug 1448] from 4.2.6p1-RC3: Some macros not correctly conditionally
 +  or absolutely defined on Windows.
 +* [Bug 1449] from 4.2.6p1-RC3: ntpsim.h in ntp_config.c should be used
 +  conditionally.
 +* [Bug 1450] from 4.2.6p1-RC3: Option to exclude warnings not
 +  unconditionally defined on Windows.
 +(4.2.7p9) 2010/01/13 Released by Harlan Stenn <stenn@ntp.org>
 +(4.2.7p8) 2010/01/12 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 702] ntpd service logic should use libopts to examine cmdline.
 +* [Bug 1451] from 4.2.6p1-RC3: sntp leaks KoD entry updating.
 +* [Bug 1453] from 4.2.6p1-RC3: Use $CC in config.cache filename.
 +(4.2.7p7) 2009/12/30 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 620] ntpdc getresponse() esize != *rsize s/b size != *rsize.
 +* [Bug 1446] 4.2.7p6 requires autogen, missing ntpd.1, *.texi, *.menu.
 +(4.2.7p6) 2009/12/28 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1443] Remove unnecessary dependencies on ntp_io.h
 +* [Bug 1442] Move Windows functions into libntp files
 +* [Bug 1127] from 4.2.6p1-RC3: Check the return of X590_verify().
 +* [Bug 1439] from 4.2.6p1-RC3: .texi gen after binary is linked.
 +* [Bug 1440] from 4.2.6p1-RC3: Update configure.ac to support kfreebsd.
 +* [Bug 1445] from 4.2.6p1-RC3: IRIX does not have -lcap or support
 +  linux capabilities.
 +(4.2.7p5) 2009/12/25 Released by Harlan Stenn <stenn@ntp.org>
 +* Include 4.2.6p1-RC2
 +(4.2.7p4) 2009/12/24 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1429] ntpd -4 option does not reliably force IPv4 resolution.
 +* [Bug 1431] System headers must come before ntp headers in ntp_intres.c .
 +(4.2.7p3) 2009/12/22 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1426] scripts/VersionName needs . on the search path.
 +* [Bug 1427] quote missing in ./build - shows up on NetBSD.
 +* [Bug 1428] Use AC_HEADER_RESOLV to fix breaks from resolv.h
 +(4.2.7p2) 2009/12/20 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1419] ntpdate, ntpdc, sntp, ntpd ignore configure --bindir.
 +* [Bug 1421] add util/tg2, a clone of tg that works on Linux, NetBSD, and
 +  FreeBSD
 +(4.2.7p1) 2009/12/15 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1348] ntpd Windows port should wait for sendto() completion.
 +* [Bug 1413] test OpenSSL headers regarding -Wno-strict-prototypes.
 +* [Bug 1418] building ntpd/ntpdc/ntpq statically with ssl fails.
 +(4.2.7p0) 2009/12/13 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1412] m4/os_cflags.m4 caches results that depend on $CC.
 +* [Bug 1414] Enable "make distcheck" success with BSD make.
 +(4.2.7) 2009/12/09 Released by Harlan Stenn <stenn@ntp.org>
 +* [Bug 1407] configure.ac: recent GNU Make -v does not include "version".
  ---
  
- * [Bug 1725] ntpd sends multicast from only one address.
- * [Bug 1728] In ntp_openssl.m4, don't add -I/usr/include or -L/usr/lib
-   to CPPFLAGS or LDFLAGS.
- * Remove log_msg() and debug_msg() from sntp in favor of msyslog().
- * Use a single copy of libopts/, in sntp/.
- * Upgrade libopts to 33.3.8.
- * Bump minimum Automake version to 1.11, required for AM_COND_IF
-   use in LIBOPTS_CHECK.
+ * Clean up m4 quoting in configure.ac, *.m4 files, resolving
+   intermittent AC_LANG_PROGRAM possibly undefined errors.
  ---
  (4.2.6p3-RC11) 2010/11/28 Released by Harlan Stenn <stenn@ntp.org>
  
diff --cc configure.ac
index dcea32a0fb857f84183a75457e3343ed5e7ecf7b,36b13698bcc412b1988733a9526774e3c08b8a0b..ebe0d4f867d2d9fb6c51be5214c77f7f4f7735f4
@@@ -188,13 -171,12 +172,13 @@@ case "$GCC" i
            )
        ]
      )
-     CFLAGS="$SAVED_CFLAGS_AC"
-     $as_unset SAVED_CFLAGS_AC
+     CFLAGS="$SAVED_CFLAGS_NTP"
+     AS_UNSET([SAVED_CFLAGS_NTP])
      #
-     # $ac_cv_gcc_Winit_self is tested later to add the 
+     # $ntp_cv_gcc_Winit_self is tested later to add the 
      # flag to CFLAGS.
      #
 +    ;;
  esac
  
  # Expose a cross-compilation indicator to makefiles
@@@ -284,18 -270,15 +273,18 @@@ case "$GCC" i
      CFLAGS="$CFLAGS -Wshadow"
      # CFLAGS="$CFLAGS -Wtraditional"
      # CFLAGS="$CFLAGS -Wwrite-strings"
-     case "$ac_cv_gcc_Winit_self" in
+     case "$ntp_cv_gcc_Winit_self" in
       yes)
        CFLAGS="$CFLAGS -Winit-self"
 +      ;;
      esac
-     case "$ac_cv_gcc_Wstrict_overflow" in
+     case "$ntp_cv_gcc_Wstrict_overflow" in
       yes)
        CFLAGS="$CFLAGS -Wstrict-overflow"
 +      ;;
      esac
      # -W[no-]strict-prototypes is added later depending on OpenSSL
 +    ;;
  esac
  
  ac_busted_vpath_in_make=no
@@@ -378,38 -368,15 +373,38 @@@ esa
  
  AC_PROG_INSTALL
  
 -AC_CHECK_FUNC([gethostent], ,
 -  AC_SEARCH_LIBS([gethostent], [nsl], , , [$libxnet -lsocket]))
 -AC_CHECK_FUNC([openlog], , 
 -  AC_SEARCH_LIBS([openlog], [gen], , 
 -  AC_SEARCH_LIBS([openlog], [syslog], , , [$libxnet -lsocket])))
 +# Checks for libraries.
 +NTP_LINEEDITLIBS
 +NTP_LIB_M
 +
 +# [Bug 1628] On Solaris, we need -lxnet -lsocket.  Generalize this to
 +# avoid keying on the OS name:  If we find socket functions in
 +# libsocket, next try for them in libxnet without libsocket, if found,
 +# list both.  If we simply tested libxnet first, we would find the
 +# functions there and never add libsocket.  See also [Bug 660]
 +# http://bugs.ntp.org/show_bug.cgi?id=660#c9
 +saved_LIBS=$LIBS
 +AC_SEARCH_LIBS([setsockopt], [socket])
 +case "$ac_cv_search_setsockopt" in
 + -lsocket)
 +    LIBS="$saved_LIBS"
 +    AC_SEARCH_LIBS([getsockopt], [xnet])
 +    case "$ac_cv_search_getsockopt" in
 +     -lxnet)
 +      LIBS="-lxnet -lsocket $saved_LIBS"
 +      ;;
 +     *) LIBS="-lsocket $saved_LIBS"
 +      ;;
 +    esac
 +    ;;
 +esac
- $as_unset saved_LIBS
++AS_UNSET([saved_LIBS])
 +
 +AC_SEARCH_LIBS([inet_pton], [nsl])
 +AC_SEARCH_LIBS([openlog], [gen syslog])
  AC_SEARCH_LIBS([MD5Init], [md5 md])
 -AC_CHECK_FUNCS(MD5Init)
 +AC_CHECK_FUNCS([MD5Init])
  
 -NTP_LINEEDITLIBS
  
  dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt
  dnl Solaris 2.6 only has -lposix4; in Solaris 7, this is a symlink to -lrt,
@@@ -438,28 -405,38 +433,38 @@@ case "$host" i
      ;;
  esac
  AC_HEADER_RESOLV
 -AC_CHECK_FUNCS([res_init __res_init])
 +AC_CHECK_FUNCS([res_init], , [AC_CHECK_FUNCS([__res_init])])
  
  AC_HEADER_STDC
- AC_CHECK_HEADERS(bstring.h)
- AC_CHECK_HEADER(dns_sd.h,
-       [AC_CHECK_LIB(dns_sd,
-                       DNSServiceRegister,
-                       [AC_DEFINE(HAVE_DNSREGISTRATION, 1,
-                               [Use Rendezvous/DNS-SD registration])])])
+ AC_CHECK_HEADERS([bstring.h])
+ AC_CHECK_HEADER(
+     [dns_sd.h],
+     [AC_CHECK_LIB(
+       [dns_sd],
+       [DNSServiceRegister],
+       [AC_DEFINE([HAVE_DNSREGISTRATION], [1],
+           [Use Rendezvous/DNS-SD registration])]
+     )]
+ )
  case "$ac_cv_lib_dns_sd_DNSServiceRegister" in
-  yes) LIBS="-ldns_sd $LIBS" ;;
+  yes)
+     LIBS="-ldns_sd $LIBS"
  esac
- AC_CHECK_HEADERS(errno.h fcntl.h ieeefp.h inttypes.h kvm.h math.h)
 -AC_CHECK_HEADERS([errno.h fcntl.h ieeefp.h kvm.h math.h])
++AC_CHECK_HEADERS([errno.h fcntl.h ieeefp.h inttypes.h kvm.h math.h])
  
- AC_CHECK_HEADERS(md5.h, [], [],
- [#if HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
- ])
- AC_CHECK_HEADERS(memory.h netdb.h poll.h)
- AC_CHECK_HEADERS(sched.h sgtty.h stdlib.h string.h termio.h)
- AC_CHECK_HEADERS(termios.h timepps.h timex.h unistd.h)
+ AC_CHECK_HEADERS(
+     [md5.h],
+     [],
+     [],
+     [
+       #ifdef HAVE_SYS_TYPES_H
+       # include <sys/types.h>
+       #endif
+     ]
+ )
+ AC_CHECK_HEADERS([memory.h netdb.h poll.h])
+ AC_CHECK_HEADERS([sgtty.h stdlib.h string.h termio.h])
+ AC_CHECK_HEADERS([termios.h timepps.h timex.h unistd.h])
  
  case "$host" in
   *-*-aix*)
@@@ -769,7 -792,8 +820,7 @@@ AC_C_BIGENDIA
  AC_TYPE_SIGNAL
  AC_TYPE_OFF_T
  AC_TYPE_SIZE_T
- AC_CHECK_TYPES([uintptr_t])
 -AC_CHECK_TYPES([time_t, long, uintptr_t])
 -AC_CHECK_SIZEOF([time_t])
++AC_CHECK_TYPES([long, uintptr_t])
   
  AH_VERBATIM([TYPEDEF_UINTPTR_T],
  [/* Provide a typedef for uintptr_t? */
@@@ -778,104 -802,100 +829,159 @@@ typedef unsigned int uintptr_t
  #define HAVE_UINTPTR_T        1
  #endif])
  
-       AC_COMPILE_IFELSE(
 +AC_CHECK_TYPES([time_t, int32, u_int32])
 +
 +case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
 + no::yes)
 +    AC_CACHE_CHECK(
 +      [for int32 with DNS headers included],
 +      [ntp_cv_type_int32_with_dns],
-       )
++      [AC_COMPILE_IFELSE(
 +          [AC_LANG_PROGRAM(
 +              [[
 +                  #ifdef HAVE_ARPA_NAMESER_H
 +                  # include <arpa/nameser.h>
 +                  #endif
 +                  #include <resolv.h>
 +              ]],
 +              [[
 +                  size_t cb = sizeof(int32);
 +              ]]
 +          )],
 +          [ntp_cv_type_int32_with_dns=yes],
 +          [ntp_cv_type_int32_with_dns=no]
-       AC_DEFINE([HAVE_INT32_ONLY_WITH_DNS], , [int32 type in DNS headers, not others.])
-       ;;
++      )]
 +    )
 +    case "$ntp_cv_type_int32_with_dns" in
 +     yes)
-     ;;
++      AC_DEFINE([HAVE_INT32_ONLY_WITH_DNS], [1],
++          [int32 type in DNS headers, not others.])
 +    esac
-       AC_COMPILE_IFELSE(
 +esac
 +
 +case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
 + no::yes)
 +    AC_CACHE_CHECK(
 +      [for u_int32 with DNS headers included],
 +      [ntp_cv_type_u_int32_with_dns],
-       )
++      [AC_COMPILE_IFELSE(
 +          [AC_LANG_PROGRAM(
 +              [[
 +                  #ifdef HAVE_ARPA_NAMESER_H
 +                  # include <arpa/nameser.h>
 +                  #endif
 +                  #include <resolv.h>
 +              ]],
 +              [[
 +                  size_t cb = sizeof(u_int32);
 +              ]]
 +          )],
 +          [ntp_cv_type_u_int32_with_dns=yes],
 +          [ntp_cv_type_u_int32_with_dns=no]
-       AC_DEFINE([HAVE_U_INT32_ONLY_WITH_DNS], , [u_int32 type in DNS headers, not others.])
-       ;;
++      )]
 +    )
 +    case "$ntp_cv_type_u_int32_with_dns" in
 +     yes)
-     ;;
++      AC_DEFINE([HAVE_U_INT32_ONLY_WITH_DNS], [1],
++          [u_int32 type in DNS headers, not others.])
 +    esac
 +esac
 +
 +AC_CHECK_SIZEOF([time_t])
  AC_STRUCT_TM
  
- AC_CACHE_CHECK([for a fallback value for HZ], ac_cv_var_default_hz,
- [ac_cv_var_default_hz=100
- case "$host" in
-  alpha*-dec-osf4*|alpha*-dec-osf5*)
-     ac_cv_var_default_hz=1024
-     ;;
-  mips-dec-ultrix4*)
-     ac_cv_var_default_hz=256
-     ;;
- esac])
- AC_DEFINE_UNQUOTED(DEFAULT_HZ, $ac_cv_var_default_hz, [What is the fallback value for HZ?])
+ AC_CACHE_CHECK(
+     [for u_int8_t],
+     [ntp_cv_type_u_int8_t],
+     [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+           [[
+               #ifdef HAVE_SYS_TYPES_H
+               # include <sys/types.h>
+               #endif
+           ]],
+           [[
+               u_int8_t len = 42;
+           ]]
+       )],
+       [ntp_cv_type_u_int8_t=yes],
+       [ntp_cv_type_u_int8_t=no]
+     )]
+ )
+ case "$ntp_cv_type_u_int8_t" in
+  yes)
+     AC_DEFINE([HAVE_TYPE_U_INT8_T], [1], [Does u_int8_t exist?])
+ esac
  
- AC_CACHE_CHECK([if we need to override the system's value for HZ], ac_cv_var_override_hz,
- [ac_cv_var_override_hz=no
- case "$host" in
-  alpha*-dec-osf4*|alpha*-dec-osf5*)
-     ac_cv_var_override_hz=yes
-     ;;
-  mips-dec-ultrix4*)
-     ac_cv_var_override_hz=yes
-     ;;
-  *-*-freebsd*)
-     ac_cv_var_override_hz=yes
-     ;;
-  *-*-sunos4*)
-     ac_cv_var_override_hz=yes
-     ;;
-  *-*-kfreebsd*)
-     ac_cv_var_override_hz=yes
-     ;;
- esac])
- case "$ac_cv_var_override_hz" in
+ AC_CACHE_CHECK(
+     [for u_int64_t],
+     [ntp_cv_type_u_int64_t],
+     [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+           [[
+               #ifdef HAVE_SYS_TYPES_H
+               # include <sys/types.h>
+               #endif
+           ]],
+           [[
+               u_int64_t len = 42;
+           ]]
+       )],
+       [ntp_cv_type_u_int64_t=yes],
+       [ntp_cv_type_u_int64_t=no]
+     )]
+ )
+ case "$ntp_cv_type_u_int64_t" in
   yes)
-     AC_DEFINE(OVERRIDE_HZ, 1, [Do we need to override the system's idea of HZ?])
-     ;;
+     AC_DEFINE([HAVE_TYPE_U_INT64_T], [1], [Does u_int64_t exist?])
+ esac
+ AC_CACHE_CHECK(
+     [for a fallback value for HZ],
+     [ntp_cv_default_hz],
+     [
+       ntp_cv_default_hz=100
+       case "$host" in
+        alpha*-dec-osf4*|alpha*-dec-osf5*)
+           ntp_cv_default_hz=1024
+           ;;
+        mips-dec-ultrix4*)
+           ntp_cv_default_hz=256
+           ;;
+       esac
+     ]
+ )
+ AC_DEFINE_UNQUOTED([DEFAULT_HZ], [$ntp_cv_default_hz],
+     [What is the fallback value for HZ?])
+ AC_CACHE_CHECK(
+     [if we need to override the system's value for HZ],
+     [ntp_cv_override_hz],
+     [
+       ntp_cv_override_hz=no
+       case "$host" in
+        alpha*-dec-osf4*|alpha*-dec-osf5*)
+           ntp_cv_override_hz=yes
+           ;;
+        mips-dec-ultrix4*)
+           ntp_cv_override_hz=yes
+           ;;
+        *-*-freebsd*)
+           ntp_cv_override_hz=yes
+           ;;
+        *-*-sunos4*)
+           ntp_cv_override_hz=yes
+           ;;
+        *-*-kfreebsd*)
+           ntp_cv_override_hz=yes
+           ;;
+       esac
+     ]
+ )
+ case "$ntp_cv_override_hz" in
+  yes)
+     AC_DEFINE([OVERRIDE_HZ], [1],
+       [Do we need to override the system's idea of HZ?])
  esac
  
  dnl AC_CACHE_CHECK(ut_host in struct utmp, ac_cv_func_ut_host_in_utmp,
@@@ -1049,10 -1110,9 +1196,10 @@@ case "$ntp_cv_have_ss_family" i
      )
      case "$ntp_cv_have___ss_family" in
       yes)
-       AC_DEFINE(HAVE___SS_FAMILY_IN_SS, 1, [Does struct sockaddr_storage have __ss_family?])
-       ;;
+       AC_DEFINE([HAVE___SS_FAMILY_IN_SS], [1],
+           [Does struct sockaddr_storage have __ss_family?])
      esac
 +    ;;
  esac
  
  AH_VERBATIM(
@@@ -1120,10 -1180,9 +1267,10 @@@ case "$ntp_cv_have_ss_len" i
      )
      case "$ntp_cv_have___ss_len" in
       yes)
-       AC_DEFINE(HAVE___SS_LEN_IN_SS, 1, [Does struct sockaddr_storage have __ss_len?])
-       ;;
+       AC_DEFINE([HAVE___SS_LEN_IN_SS], [1],
+           [Does struct sockaddr_storage have __ss_len?])
      esac
 +    ;;
  esac
  
  AH_VERBATIM(
@@@ -1264,7 -1384,7 +1472,8 @@@ esa
  
  AC_C_CHAR_UNSIGNED            dnl CROSS_COMPILE?
  AC_CHECK_SIZEOF([signed char])
+ AC_CHECK_TYPES([s_char])
 +AC_CHECK_SIZEOF([short])
  AC_CHECK_SIZEOF([int])
  AC_CHECK_SIZEOF([long])
  
@@@ -1401,29 -1566,29 +1655,28 @@@ esac]
  #
  # Check for if_nametoindex() for IPv6 scoped addresses support
  #
- AC_CHECK_FUNC([if_nametoindex], ac_cv_have_if_nametoindex=yes,
-               ac_cv_have_if_nametoindex=no)
- case $ac_cv_have_if_nametoindex in
+ AC_CHECK_FUNCS([if_nametoindex])
+ case "$ac_cv_func_if_nametoindex" in
   no)
 -      case "$host" in
 -      *-hp-hpux*)
 -              AC_CHECK_LIB([ipv6], [if_nametoindex],
 -                  [ac_cv_func_if_nametoindex=yes ; LIBS="-lipv6 $LIBS"])
 -      ;;
 -      esac
 +    case "$host" in
 +     *-hp-hpux*)
-       AC_CHECK_LIB(ipv6, if_nametoindex,
-                       ac_cv_have_if_nametoindex=yes
-                       LIBS="-lipv6 $LIBS",)
-       ;;
-       esac
-       ;;
++      AC_CHECK_LIB([ipv6], [if_nametoindex],
++          [ac_cv_func_if_nametoindex=yes ; LIBS="-lipv6 $LIBS"])
++    esac
  esac
- case $ac_cv_have_if_nametoindex in
+ case "$ac_cv_func_if_nametoindex" in
   yes)
-       AC_DEFINE(ISC_PLATFORM_HAVEIFNAMETOINDEX, 1, [ISC: do we have if_nametoindex()?])
-       ;;
+       AC_DEFINE([ISC_PLATFORM_HAVEIFNAMETOINDEX], [1],
+           [ISC: do we have if_nametoindex()?])
 -      ;;
  esac
  
 -AC_SEARCH_LIBS([inet_ntop], [resolv], , , [-lsocket -lnsl])
 +# We also need -lsocket, but we have tested for that already.
 +AC_SEARCH_LIBS([inet_ntop], [resolv], , , [-lnsl])
- AC_CHECK_FUNC(inet_ntop, [], [AC_DEFINE(ISC_PLATFORM_NEEDNTOP, 1, [ISC: provide inet_ntop()])])
- AC_CHECK_FUNC(inet_pton, [], [AC_DEFINE(ISC_PLATFORM_NEEDPTON, 1, [ISC: provide inet_pton()])])
+ AC_CHECK_FUNC([inet_ntop], [], 
+     [AC_DEFINE([ISC_PLATFORM_NEEDNTOP], [1], [ISC: provide inet_ntop()])])
+ AC_CHECK_FUNC([inet_pton], [],
+     [AC_DEFINE([ISC_PLATFORM_NEEDPTON], [1], [ISC: provide inet_pton()])])
  case "$ac_cv_header_kvm_h" in
   yes)
      AC_CHECK_FUNCS([kvm_open])
@@@ -1502,32 -1670,10 +1755,26 @@@ case "$host" i
   *-*-openbsd*)
      # Just stubs.  Idiots.
      ;;
-  *) AC_CHECK_FUNCS([timer_create])
 - *) AC_CHECK_FUNCS([timer_create timer_settime])
++ *)
++    AC_CHECK_FUNCS([timer_create])
      ;;
  esac
- case "$host" in
-  *-pc-cygwin*)
-     # I have no idea...
-     ;;
-  *) AC_CHECK_FUNCS([umask])
-     ;;
- esac
- AC_CHECK_FUNCS([uname updwtmp updwtmpx vsnprintf vsprintf])
 +
 +# some OSes prefer _exit() in forked children to exit()
 +AC_CHECK_FUNCS([_exit])
 +ntp_worker_child_exit=exit
 +case "$ac_cv_func__exit::$host_os" in
 + yes::netbsd*)
 +    ntp_worker_child_exit=_exit
 +    ;;
 + yes::openbsd*)
 +    ntp_worker_child_exit=_exit
 +    ;;
 +esac
 +AC_DEFINE_UNQUOTED([WORKER_CHILD_EXIT], [$ntp_worker_child_exit],
 +                 [routine worker child proc uses to exit.])
 +
+ AC_CHECK_FUNCS([umask uname updwtmp updwtmpx vsnprintf vsprintf])
  
  ###
  
@@@ -2243,22 -2505,73 +2606,57 @@@ case "$ans" i
  esac
  AC_MSG_RESULT([$ans])
  
- AC_CACHE_CHECK([if we have the tty_clk line discipline/streams module],
-  ac_cv_var_tty_clk,
-  [case "$ac_cv_header_sys_clkdefs_h$ac_cv_hdr_def_tiocdcdtimestamp" in
-   *yes*) ac_cv_var_tty_clk=yes ;;
-   *)     ac_cv_var_tty_clk=no ;;
-  esac])
- case "$ac_cv_var_tty_clk" in
-  yes) AC_DEFINE(TTYCLK, 1, [Do we have the tty_clk line discipline/streams module?]) ;;
 -AC_MSG_CHECKING([if ntpd will use the deferred DNS lookup path])
 -AC_ARG_ENABLE(
 -    [force-defer-DNS],
 -    [AS_HELP_STRING(
 -      [--enable-force-defer-DNS],
 -      [- force all DNS lookups to take the deferred path]
 -    )],
 -    [ans=$enableval],
 -    [ans=no]
 -)
 -case "$ans" in
 - yes)
 -    AC_DEFINE([FORCE_DEFER_DNS], [1], [Force deferred DNS lookups?])
 -esac
 -AC_MSG_RESULT([$ans])
 -
+ case "$ac_cv_header_sys_sio_h" in
+  yes)
+     AC_CACHE_CHECK(
+       [sys/sio.h for TIOCDCDTIMESTAMP],
+       [ntp_cv_hdr_def_tiocdcdtimestamp],
+       [AC_EGREP_CPP(
+           [yes],
+           [
+               #include <sys/sio.h>
+               #ifdef TIOCDCDTIMESTAMP
+                   yes
+               #endif
+           ],
+           [ntp_cv_hdr_def_tiocdcdtimestamp=yes],
+           [ntp_cv_hdr_def_tiocdcdtimestamp=no]
+       )]
+     )
+ esac
+ AC_CACHE_CHECK(
+     [if we have the tty_clk line discipline/streams module],
+     [ntp_cv_tty_clk],
+     [
+       case "$ac_cv_header_sys_clkdefs_h$ntp_cv_hdr_def_tiocdcdtimestamp" in
+        *yes*)
+           ntp_cv_tty_clk=yes
+           ;;
+        *)
+           ntp_cv_tty_clk=no
+           ;;
+       esac
+     ]
+ )
+ case "$ntp_cv_tty_clk" in
+  yes)
+     AC_DEFINE([TTYCLK], [1],
+       [Do we have the tty_clk line discipline/streams module?])
  esac
  
- AC_CACHE_CHECK([for the ppsclock streams module],
-  ac_cv_var_ppsclock,
-  ac_cv_var_ppsclock=$ac_cv_struct_ppsclockev)
- case "$ac_cv_var_ppsclock" in
-  yes) AC_DEFINE(PPS, 1, [Do we have the ppsclock streams module?]) ;;
+ AC_MSG_CHECKING([for the ppsclock streams module])
+ case "$ntp_cv_struct_ppsclockev" in
+  yes)
+     ans=yes
+     AC_DEFINE([PPS], [1],
+       [Do we have the ppsclock streams module?])
+     ;;
+  *)
+     ans=no
  esac
+ AC_MSG_RESULT([$ans])
  
  AC_CACHE_CHECK(
      [for multicast IP support],
@@@ -2300,12 -2611,8 +2697,9 @@@ case "$ntp_cv_multicast" i
             *-*-netbsd*|*-*-*linux*)
                ntp_cv_typeof_ip_multicast_loop=u_int
                ;;
-            *-*-winnt*)
-               ntp_cv_typeof_ip_multicast_loop=BOOL
-               ;;
             *)
                ntp_cv_typeof_ip_multicast_loop=u_char
 +              ;;
            esac
        ]
      )
@@@ -3356,38 -4021,16 +4108,44 @@@ AC_MSG_RESULT([$ans]
  
  NTP_OPENSSL
  
 +# if we are using OpenSSL (--with-crypto), by default Autokey is enabled
 +AC_MSG_CHECKING([if we want to include NTP Autokey protocol support])
 +AC_ARG_ENABLE(
 +    [autokey],
 +    AS_HELP_STRING(
 +      [--enable-autokey],
 +      [+ support NTP Autokey protocol]
 +      ),
 +    [ntp_autokey=$enableval],
 +    [ntp_autokey=$ntp_openssl]
 +)
 +case "$ntp_autokey" in
 + no)
 +    ;;
 + *)
 +    case "$ntp_openssl" in
 +     no)
 +      AC_MSG_WARN([Disabling Autokey, --enable-autokey requires --with-crypto.])
 +      ;;
 +     *)
 +      AC_DEFINE(AUTOKEY, , [Support NTP Autokey protocol?])
 +      ntp_autokey=yes
 +      ;;
 +    esac
 +    ;;
 +esac
 +AC_MSG_RESULT([$ntp_autokey])
 +
  AC_MSG_CHECKING([if we want to compile with ElectricFence])
- AC_ARG_WITH(electricfence,
-       AC_HELP_STRING([--with-electricfence], [- compile with ElectricFence malloc debugger]),
- [ans=$withval], [ans=no])
+ AC_ARG_WITH(
+     [electricfence],
+     [AS_HELP_STRING(
+       [--with-electricfence],
+       [- compile with ElectricFence malloc debugger]
+     )],
+     [ans=$withval],
+     [ans=no]
+ )
  case "$ans" in
   no) ;;
   *)
@@@ -4420,9 -5107,12 +5234,11 @@@ AC_ARG_ENABLE
  AC_MSG_RESULT([$ans])
  
  case "$ans" in
-  yes) AC_DEFINE(IRIG_SUCKS, 1, [Should we use the IRIG sawtooth filter?]) ;;
+  yes)
+     AC_DEFINE([IRIG_SUCKS], [1],
+       [Should we use the IRIG sawtooth filter?])
  esac
  
 -
  AC_MSG_CHECKING([if we should enable NIST lockclock scheme])
  
  AC_ARG_ENABLE(
  AC_MSG_RESULT([$ans])
  
  case "$ans" in
-  yes) AC_DEFINE(LOCKCLOCK, 1, [Should we align with the NIST lockclock scheme?]) ;;
+  yes)
+     AC_DEFINE([LOCKCLOCK], [1],
+       [Should we align with the NIST lockclock scheme?]) ;;
  esac
  
 -
  AC_MSG_CHECKING([if we want support for Samba's signing daemon])
  
  AC_ARG_ENABLE(
@@@ -4470,12 -5163,14 +5288,14 @@@ case "$ntp_signd_path" i
   '')
      ;;
   *)
-     AC_DEFINE(HAVE_NTP_SIGND, ,[Do we want support for Samba's signing daemon?])
-     AC_DEFINE_UNQUOTED(NTP_SIGND_PATH, "$ntp_signd_path", [Path to sign daemon rendezvous socket])
+     AC_DEFINE([HAVE_NTP_SIGND], [1],
+       [Do we want support for Samba's signing daemon?])
+     AC_DEFINE_UNQUOTED([NTP_SIGND_PATH], ["$ntp_signd_path"],
+       [Path to sign daemon rendezvous socket])
 +    ;;
  esac
  
- AC_CHECK_HEADERS(sys/clockctl.h)
 -
+ AC_CHECK_HEADERS([sys/clockctl.h])
  
  case "$host" in
   *-*-netbsd*)
@@@ -4532,57 -5226,69 +5351,68 @@@ AC_MSG_RESULT([$ntp_have_linuxcaps]
  
  case "$ntp_have_linuxcaps" in
   yes)
-     AC_DEFINE(HAVE_LINUX_CAPABILITIES, ,[Do we have Linux capabilities?])
+     AC_DEFINE([HAVE_LINUX_CAPABILITIES], [1],
+       [Do we have Linux capabilities?])
      LIBS="$LIBS -lcap"
 +    ;;
  esac
  
  case "$ntp_use_dev_clockctl$ntp_have_linuxcaps" in
   *yes*)
-     AC_DEFINE(HAVE_DROPROOT, ,[Can we drop root privileges?])
-     ;;
+     AC_DEFINE([HAVE_DROPROOT], [1],
+       [Can we drop root privileges?])
  esac
  
 -
  AC_CHECK_HEADERS([libscf.h])
+ LSCF=
  case "$ac_cv_header_libscf_h" in
   yes)
-     AC_SUBST(LSCF, [-lscf])
-     ;;
+     LSCF='-lscf'
  esac
+ AC_SUBST([LSCF])
  
  AC_CHECK_FUNC(
      [setppriv],
-     AC_DEFINE(HAVE_SOLARIS_PRIVS, ,[Are Solaris privileges available?])
+     [ans=yes],
+     [ans=no]
  )
- #
- # ISC stuff
- #
+ case "$ans" in
+  yes)
+     AC_DEFINE([HAVE_SOLARIS_PRIVS], [1],
+       [Are Solaris privileges available?])
+ esac
  
 -
  AC_CACHE_CHECK(
      [struct sockaddr for sa_len],
-     isc_cv_platform_havesalen,
-     [
-       AC_TRY_COMPILE(
-           [
+     [isc_cv_platform_havesalen],
+     [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+           [[
                #include <sys/types.h>
                #include <sys/socket.h>
-           ],
-           [
+           ]],
+           [[
                extern struct sockaddr *ps;
                return ps->sa_len;
-           ],
-           [isc_cv_platform_havesalen=yes],
-           [isc_cv_platform_havesalen=no]
-       )
-     ]
+           ]]
+       )],
+       [isc_cv_platform_havesalen=yes],
+       [isc_cv_platform_havesalen=no]
+     )]
  )
- if test $isc_cv_platform_havesalen = yes; then
-     AC_DEFINE(ISC_PLATFORM_HAVESALEN, ,[struct sockaddr has sa_len?])
- fi
+ case "$isc_cv_platform_havesalen" in
+  yes)
+     AC_DEFINE([ISC_PLATFORM_HAVESALEN], [1],
+        [struct sockaddr has sa_len?])
+ esac
  
- AC_ARG_ENABLE(ipv6, AC_HELP_STRING([--enable-ipv6], [s use IPv6?]))
+ AC_ARG_ENABLE(
+     [ipv6],
+     [AS_HELP_STRING(
+       [--enable-ipv6],
+       [s use IPv6?]
+     )]
+ )
  
  case "$enable_ipv6" in
   yes|''|autodetect)
@@@ -4732,36 -5434,30 +5558,31 @@@ case "$isc_cv_found_ipv6" i
      # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
      AC_CACHE_CHECK(
        [for sockaddr_in6.sin6_scope_id],
-       ac_cv_have_sin6_scope_id,
-       [
-           AC_COMPILE_IFELSE(
-               [
-                   AC_LANG_PROGRAM(
-                       [[
-                           #include <sys/types.h>
-                           #include <sys/socket.h>
-                           #include <netinet/in.h>
-                           $isc_netinetin6_hack
-                           $isc_netinet6in6_hack
-                       ]],
-                       [[
-                           struct sockaddr_in6 xyzzy;
-                           xyzzy.sin6_scope_id = 0;
-                       ]]
-                   )
-               ],
-               [ac_cv_have_sin6_scope_id=yes],
-               [ac_cv_have_sin6_scope_id=no]
-           )
-       ]
+       [isc_cv_have_sin6_scope_id],
+       [AC_COMPILE_IFELSE(
+           [AC_LANG_PROGRAM(
+               [[
+                   #include <sys/types.h>
+                   #include <sys/socket.h>
+                   #include <netinet/in.h>
+                   $isc_netinetin6_hack
+                   $isc_netinet6in6_hack
+               ]],
+               [[
+                   struct sockaddr_in6 xyzzy;
+                   xyzzy.sin6_scope_id = 0;
+               ]]
+           )],
+           [isc_cv_have_sin6_scope_id=yes],
+           [isc_cv_have_sin6_scope_id=no]
+       )]
      )
  
-     case "$ac_cv_have_sin6_scope_id" in
+     case "$isc_cv_have_sin6_scope_id" in
       yes)
-       AC_DEFINE(ISC_PLATFORM_HAVESCOPEID, , [have sin6_scope_id?])
-       ;;
+       AC_DEFINE([ISC_PLATFORM_HAVESCOPEID], [1], [sin6_scope_id?])
      esac
 +    ;;
  esac
  
  
  
  AC_CACHE_CHECK(
      [for struct if_laddrreq],
-     ac_cv_isc_struct_if_laddrreq,
-     [
-         AC_COMPILE_IFELSE(
-           [
-               AC_LANG_PROGRAM(
-                   [[
-                       #include <sys/types.h>
-                       #include <net/if6.h>
-                   ]],
-                   [[
-                       struct if_laddrreq a;
-                   ]]
-               )
-           ],
-           [ac_cv_isc_struct_if_laddrreq=yes],
-           [ac_cv_isc_struct_if_laddrreq=no]
-       )
-     ]
 -    isc_cv_struct_if_laddrreq,
++    [isc_cv_struct_if_laddrreq],
+     [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+           [[
+               #include <sys/types.h>
+               #include <net/if6.h>
+           ]],
+           [[
+               struct if_laddrreq a;
+           ]]
+       )],
+       [isc_cv_struct_if_laddrreq=yes],
+       [isc_cv_struct_if_laddrreq=no]
+     )]
  )
  
- case "$ac_cv_isc_struct_if_laddrreq" in
+ case "$isc_cv_struct_if_laddrreq" in
   yes)
-     AC_DEFINE(ISC_PLATFORM_HAVEIF_LADDRREQ, , [have struct if_laddrreq?])
-     ;;
+     AC_DEFINE([ISC_PLATFORM_HAVEIF_LADDRREQ], [1],
+       [have struct if_laddrreq?])
  esac
  
  #
@@@ -4899,83 -5586,40 +5711,89 @@@ AC_MSG_RESULT([$ntp_ok]
  
  ###
  
- AC_DEFINE_DIR(NTP_KEYSDIR, sysconfdir, [Default location of crypto key info])
- AC_CONFIG_FILES(Makefile)
- AC_CONFIG_FILES(ElectricFence/Makefile)
- AC_CONFIG_FILES(adjtimed/Makefile)
- AC_CONFIG_FILES(clockstuff/Makefile)
- AC_CONFIG_FILES(include/Makefile)
- AC_CONFIG_FILES(include/isc/Makefile)
- AC_CONFIG_FILES(kernel/Makefile)
- AC_CONFIG_FILES(kernel/sys/Makefile)
- AC_CONFIG_FILES(libntp/Makefile)
- AC_CONFIG_FILES(libparse/Makefile)
- AC_CONFIG_FILES(ntpd/Makefile)
- AC_CONFIG_FILES(ntpdate/Makefile)
- AC_CONFIG_FILES(ntpdc/Makefile)
- AC_CONFIG_FILES(ntpdc/nl.pl,          [chmod +x ntpdc/nl.pl])
- AC_CONFIG_FILES(ntpq/Makefile)
- AC_CONFIG_FILES(ntpsnmpd/Makefile)
- AC_CONFIG_FILES(parseutil/Makefile)
- AC_CONFIG_FILES(scripts/Makefile)
- AC_CONFIG_FILES(scripts/calc_tickadj, [chmod +x scripts/calc_tickadj])
- AC_CONFIG_FILES(scripts/checktime,    [chmod +x scripts/checktime])
- AC_CONFIG_FILES(scripts/freq_adj,     [chmod +x scripts/freq_adj])
- AC_CONFIG_FILES(scripts/html2man,     [chmod +x scripts/html2man])
- AC_CONFIG_FILES(scripts/mkver,                [chmod +x scripts/mkver])
- AC_CONFIG_FILES(scripts/ntp-wait,     [chmod +x scripts/ntp-wait])
- AC_CONFIG_FILES(scripts/ntpsweep,     [chmod +x scripts/ntpsweep])
- AC_CONFIG_FILES(scripts/ntptrace,     [chmod +x scripts/ntptrace])
- AC_CONFIG_FILES(scripts/ntpver,               [chmod +x scripts/ntpver])
- AC_CONFIG_FILES(scripts/plot_summary, [chmod +x scripts/plot_summary])
- AC_CONFIG_FILES(scripts/summary,      [chmod +x scripts/summary])
- AC_CONFIG_FILES(util/Makefile)
+ AC_DEFINE_DIR([NTP_KEYSDIR], [sysconfdir],
+     [Default location of crypto key info])
+ AC_CONFIG_FILES([Makefile])
+ AC_CONFIG_FILES([ElectricFence/Makefile])
+ AC_CONFIG_FILES([adjtimed/Makefile])
+ AC_CONFIG_FILES([clockstuff/Makefile])
+ AC_CONFIG_FILES([include/Makefile])
+ AC_CONFIG_FILES([include/isc/Makefile])
+ AC_CONFIG_FILES([kernel/Makefile])
+ AC_CONFIG_FILES([kernel/sys/Makefile])
+ AC_CONFIG_FILES([libntp/Makefile])
+ AC_CONFIG_FILES([libparse/Makefile])
+ AC_CONFIG_FILES([ntpd/Makefile])
+ AC_CONFIG_FILES([ntpdate/Makefile])
+ AC_CONFIG_FILES([ntpdc/Makefile])
+ AC_CONFIG_FILES([ntpdc/nl.pl],                [chmod +x ntpdc/nl.pl])
+ AC_CONFIG_FILES([ntpq/Makefile])
+ AC_CONFIG_FILES([ntpsnmpd/Makefile])
+ AC_CONFIG_FILES([parseutil/Makefile])
+ AC_CONFIG_FILES([scripts/Makefile])
+ AC_CONFIG_FILES([scripts/calc_tickadj],       [chmod +x scripts/calc_tickadj])
+ AC_CONFIG_FILES([scripts/checktime],  [chmod +x scripts/checktime])
+ AC_CONFIG_FILES([scripts/freq_adj],   [chmod +x scripts/freq_adj])
+ AC_CONFIG_FILES([scripts/html2man],   [chmod +x scripts/html2man])
+ AC_CONFIG_FILES([scripts/mkver],      [chmod +x scripts/mkver])
+ AC_CONFIG_FILES([scripts/ntp-wait],   [chmod +x scripts/ntp-wait])
+ AC_CONFIG_FILES([scripts/ntpsweep],   [chmod +x scripts/ntpsweep])
+ AC_CONFIG_FILES([scripts/ntptrace],   [chmod +x scripts/ntptrace])
+ AC_CONFIG_FILES([scripts/ntpver],     [chmod +x scripts/ntpver])
+ AC_CONFIG_FILES([scripts/plot_summary],       [chmod +x scripts/plot_summary])
+ AC_CONFIG_FILES([scripts/summary],    [chmod +x scripts/summary])
+ AC_CONFIG_FILES([util/Makefile])
 +
 +AC_PROG_CXX
 +
 +gta=false
- AC_ARG_WITH([gtest],
-   [AS_HELP_STRING([--with-gtest],
-     [Use the gtest framework if it's available])],
-   [try_gtest=$withval], [try_gtest=yes])
++AC_ARG_WITH(
++    [gtest],
++    [AS_HELP_STRING(
++      [--with-gtest],
++      [Use the gtest framework if it's available]
++    )],
++    [try_gtest=$withval],
++    [try_gtest=yes]
++)
 +case "$try_gtest" in
 + yes)
 +    AC_PATH_PROG([GTEST_CONFIG], [gtest-config])
 +    case x${GTEST_CONFIG} in
 +     x) ;;
 +     *)
 +      AC_MSG_CHECKING([gtest version])
 +      gtest_version=`$GTEST_CONFIG --version`
-         case "$gtest_version" in
-          1.5.*)
++      case "$gtest_version" in
++       1.5.*)
 +          GTEST_LDFLAGS=`$GTEST_CONFIG --ldflags`
 +          GTEST_LIBS=`$GTEST_CONFIG --libs`
 +          GTEST_CXXFLAGS=`$GTEST_CONFIG --cxxflags`
 +          GTEST_CPPFLAGS=`$GTEST_CONFIG --cppflags`
-           AC_SUBST(GTEST_LDFLAGS)
-           AC_SUBST(GTEST_LIBS)
-           AC_SUBST(GTEST_CXXFLAGS)
-           AC_SUBST(GTEST_CPPFLAGS)
++          AC_SUBST([GTEST_LDFLAGS])
++          AC_SUBST([GTEST_LIBS])
++          AC_SUBST([GTEST_CXXFLAGS])
++          AC_SUBST([GTEST_CPPFLAGS])
 +          gta=true
 +          ;;
-         esac
++      esac
 +      case "$gta" in
 +       true)
 +          AC_MSG_RESULT([($gtest_version) ok])
 +          ;;
 +       *) AC_MSG_RESULT([($gtest_version) not ok])
 +          ;;
 +      esac
 +    esac
 +esac
 +
 +AM_CONDITIONAL([GTEST_AVAILABLE], [$gta])
 +
- AC_CONFIG_FILES(tests/Makefile)
- AC_CONFIG_FILES(tests/libntp/Makefile)
++AC_CONFIG_FILES([tests/Makefile])
++AC_CONFIG_FILES([tests/libntp/Makefile])
 +
- AC_CONFIG_SUBDIRS(sntp)
+ AC_CONFIG_SUBDIRS([sntp])
  
  AC_OUTPUT
index b6e853e788c40d10917ce7c65b7708fcfd86137e,c50d0ff271401c3db439c8c0652e669d58a5ea22..55168519b48f2f8c92f83582e8114b1e53436c0f
@@@ -41,15 -41,7 +41,14 @@@ dnl the 'host' machine is where the res
  AC_DEFINE_UNQUOTED([STR_SYSTEM], "$host", [canonical system (cpu-vendor-os) of where we should run])
  AC_CONFIG_HEADER([config.h])
  dnl AC_ARG_PROGRAM
- AC_PREREQ([2.53])
  
- AM_CONDITIONAL(SNTP_CROSSCOMPILE, test $build != $host)
 +# Expose a cross-compilation indicator to makefiles
++AM_CONDITIONAL([SNTP_CROSSCOMPILE], [test $build != $host])
 +
 +dnl check these early to avoid autoconf warnings
 +AC_AIX
 +AC_MINIX
 +
  # Checks for programs.
  AM_PROG_CC_C_O
  AC_PROG_CPP
@@@ -143,47 -147,38 +153,72 @@@ NTP_DIR_SE
  # Checks for libraries.
  NTP_LIB_M
  
 -AC_CHECK_FUNC([gethostent], ,
 -      [AC_SEARCH_LIBS([gethostent], [nsl], , , [$libxnet -lsocket])])
 -AC_CHECK_FUNC([openlog], , 
 -      [AC_SEARCH_LIBS([openlog], [gen], , 
 -              [AC_SEARCH_LIBS([openlog], [syslog], , , [$libxnet -lsocket])])])
+ case "$GCC" in
+  yes)
+     CFLAGS="$CFLAGS -Wall"
+     # CFLAGS="$CFLAGS -Wcast-align"
+     CFLAGS="$CFLAGS -Wcast-qual"
+     # CFLAGS="$CFLAGS -Wconversion"
+     # CFLAGS="$CFLAGS -Werror"
+     # CFLAGS="$CFLAGS -Wextra"
+     # CFLAGS="$CFLAGS -Wfloat-equal"
+     CFLAGS="$CFLAGS -Wmissing-prototypes"
+     CFLAGS="$CFLAGS -Wpointer-arith"
+     CFLAGS="$CFLAGS -Wshadow"
+     # CFLAGS="$CFLAGS -Wtraditional"
+     # CFLAGS="$CFLAGS -Wwrite-strings"
+     case "$ntp_cv_gcc_Winit_self" in
+      yes)
+       CFLAGS="$CFLAGS -Winit-self"
+     esac
+     case "$ntp_cv_gcc_Wstrict_overflow" in
+      yes)
+       CFLAGS="$CFLAGS -Wstrict-overflow"
+     esac
+     # -W[no-]strict-prototypes is added later depending on OpenSSL
+ esac
- $as_unset saved_LIBS
 +# [Bug 1628] On Solaris, we need -lxnet -lsocket.  Generalize this to
 +# avoid keying on the OS name:  If we find socket functions in
 +# libsocket, next try for them in libxnet without libsocket, if found,
 +# list both.  If we simply tested libxnet first, we would find the
 +# functions there and never add libsocket.  See also [Bug 660]
 +# http://bugs.ntp.org/show_bug.cgi?id=660#c9
 +saved_LIBS=$LIBS
 +AC_SEARCH_LIBS([setsockopt], [socket])
 +case "$ac_cv_search_setsockopt" in
 + -lsocket)
 +    LIBS="$saved_LIBS"
 +    AC_SEARCH_LIBS([getsockopt], [xnet])
 +    case "$ac_cv_search_getsockopt" in
 +     -lxnet)
 +      LIBS="-lxnet -lsocket $saved_LIBS"
 +      ;;
 +     *)
 +      LIBS="-lsocket $saved_LIBS"
 +      ;;
 +    esac
 +    ;;
 +esac
++AS_UNSET([saved_LIBS])
 +
 +AC_SEARCH_LIBS([inet_pton], [nsl])
 +AC_SEARCH_LIBS([openlog], [gen syslog])
  
 -AC_SEARCH_LIBS([setsockopt], [socket xnet])
 +# -lrt may only be needed by tests/
 +case "$host" in
 + *-*-aix[[456]]*)
 +      # (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
 +      # (returning ENOSYS).  I didn't check 4.2.  If, in the future,
 +      # IBM pulls its thumbs out long enough to implement clock_settime,
 +      # this conditional will need to change.  Maybe use AC_TRY_RUN
 +      # instead to try to set the time to itself and check errno.
 +    ;;
 + *)
 +    AC_SEARCH_LIBS([clock_gettime], [rt])
 +    AC_CHECK_FUNCS([clock_gettime clock_settime])
 +    ;;
 +esac
  
  # Checks for header files.
  AC_HEADER_STDC
@@@ -857,55 -882,11 +923,55 @@@ case "$use_binsubdir" i
      AC_MSG_ERROR([<$use_binsubdir> is illegal - must be "bin" or "sbin"])
      ;;
  esac
- AC_MSG_RESULT($use_binsubdir)
+ AC_MSG_RESULT([$use_binsubdir])
  
  BINSUBDIR=$use_binsubdir
- AC_SUBST(BINSUBDIR)
- AM_CONDITIONAL(NTP_BINSUBDIR_IS_BIN, test "bin" = "$BINSUBDIR")
+ AC_SUBST([BINSUBDIR])
+ AM_CONDITIONAL([NTP_BINSUBDIR_IS_BIN], [test "bin" = "$BINSUBDIR"])
  
  AC_CONFIG_FILES([Makefile])
 +
 +# HMS: if we don't find c++ we should not look for gtest.
 +AC_PROG_CXX
 +
 +gta=false
 +AC_ARG_WITH([gtest],
 +  [AS_HELP_STRING([--with-gtest],
 +    [Use the gtest framework if it's available])],
 +  [try_gtest=$withval], [try_gtest=yes])
 +
 +case "$try_gtest" in
 + yes)
 +    AC_PATH_PROG([GTEST_CONFIG], [gtest-config])
 +    case x${GTEST_CONFIG} in
 +     x) ;;
 +     *)
 +      AC_MSG_CHECKING([gtest version])
 +      gtest_version=`$GTEST_CONFIG --version`
 +        case "$gtest_version" in
 +         1.5.*)
 +          GTEST_LDFLAGS=`$GTEST_CONFIG --ldflags`
 +          GTEST_LIBS=`$GTEST_CONFIG --libs`
 +          GTEST_CXXFLAGS=`$GTEST_CONFIG --cxxflags`
 +          GTEST_CPPFLAGS=`$GTEST_CONFIG --cppflags`
 +          AC_SUBST(GTEST_LDFLAGS)
 +          AC_SUBST(GTEST_LIBS)
 +          AC_SUBST(GTEST_CXXFLAGS)
 +          AC_SUBST(GTEST_CPPFLAGS)
 +          gta=true
 +          ;;
 +        esac
 +      case "$gta" in
 +       true)
 +          AC_MSG_RESULT([($gtest_version) ok])
 +          ;;
 +       *) AC_MSG_RESULT([($gtest_version) not ok])
 +          ;;
 +      esac
 +    esac
 +esac
 +
 +AM_CONDITIONAL([GTEST_AVAILABLE], [$gta])
 +
 +AC_CONFIG_FILES(tests/Makefile)
  AC_OUTPUT