aboutsummaryrefslogtreecommitdiff
path: root/contrib/ntp
diff options
context:
space:
mode:
authorOllivier Robert <roberto@FreeBSD.org>1999-12-09 13:01:21 +0000
committerOllivier Robert <roberto@FreeBSD.org>1999-12-09 13:01:21 +0000
commitc0b746e5e8d9479f05b3749cbf1f73b8928719bd (patch)
treefc0cfa1aab0ff6b228f511b410733ef4f35d1ead /contrib/ntp
downloadsrc-vendor/ntp/4.0.98f.tar.gz
src-vendor/ntp/4.0.98f.zip
Virgin import of ntpd 4.0.98fvendor/ntp/4.0.98f
Diffstat (limited to 'contrib/ntp')
-rw-r--r--contrib/ntp/COPYRIGHT151
-rw-r--r--contrib/ntp/ChangeLog2737
-rw-r--r--contrib/ntp/INSTALL178
-rw-r--r--contrib/ntp/Makefile.am95
-rw-r--r--contrib/ntp/Makefile.in490
-rw-r--r--contrib/ntp/NEWS83
-rw-r--r--contrib/ntp/NOTES.y2kfixes107
-rw-r--r--contrib/ntp/README152
-rw-r--r--contrib/ntp/README.cvs24
-rw-r--r--contrib/ntp/README.des20
-rw-r--r--contrib/ntp/README.hackers25
-rw-r--r--contrib/ntp/TODO126
-rw-r--r--contrib/ntp/WHERE-TO-START41
-rw-r--r--contrib/ntp/acconfig.h457
-rw-r--r--contrib/ntp/aclocal.m4253
-rw-r--r--contrib/ntp/adjtimed/Makefile.am8
-rw-r--r--contrib/ntp/adjtimed/Makefile.in334
-rw-r--r--contrib/ntp/adjtimed/README22
-rw-r--r--contrib/ntp/adjtimed/adjtimed.c491
-rwxr-xr-xcontrib/ntp/build66
-rw-r--r--contrib/ntp/clockstuff/Makefile.am16
-rw-r--r--contrib/ntp/clockstuff/Makefile.in342
-rw-r--r--contrib/ntp/clockstuff/README31
-rw-r--r--contrib/ntp/clockstuff/chutest.c816
-rw-r--r--contrib/ntp/clockstuff/clktest.c529
-rw-r--r--contrib/ntp/clockstuff/propdelay.c544
-rw-r--r--contrib/ntp/conf/README17
-rw-r--r--contrib/ntp/conf/baldwin.conf35
-rw-r--r--contrib/ntp/conf/beauregard.conf23
-rw-r--r--contrib/ntp/conf/dewey.conf42
-rw-r--r--contrib/ntp/conf/grundoon.conf154
-rw-r--r--contrib/ntp/conf/malarky.conf24
-rw-r--r--contrib/ntp/conf/pogo.conf30
-rwxr-xr-xcontrib/ntp/config.guess1090
-rw-r--r--contrib/ntp/config.h.in887
-rwxr-xr-xcontrib/ntp/config.sub1215
-rwxr-xr-xcontrib/ntp/configure10546
-rw-r--r--contrib/ntp/configure.in2896
-rw-r--r--contrib/ntp/dot.emacs18
-rw-r--r--contrib/ntp/excludes1
-rw-r--r--contrib/ntp/html/accopt.htm219
-rw-r--r--contrib/ntp/html/assoc.htm170
-rw-r--r--contrib/ntp/html/authopt.htm281
-rw-r--r--contrib/ntp/html/biblio.htm259
-rw-r--r--contrib/ntp/html/build.htm206
-rw-r--r--contrib/ntp/html/clockopt.htm193
-rw-r--r--contrib/ntp/html/config.htm291
-rw-r--r--contrib/ntp/html/confopt.htm330
-rw-r--r--contrib/ntp/html/copyright.htm123
-rw-r--r--contrib/ntp/html/debug.htm288
-rw-r--r--contrib/ntp/html/driver1.htm157
-rw-r--r--contrib/ntp/html/driver10.htm114
-rw-r--r--contrib/ntp/html/driver11.htm150
-rw-r--r--contrib/ntp/html/driver12.htm98
-rw-r--r--contrib/ntp/html/driver16.htm43
-rw-r--r--contrib/ntp/html/driver18.htm235
-rw-r--r--contrib/ntp/html/driver19.htm124
-rw-r--r--contrib/ntp/html/driver2.htm137
-rw-r--r--contrib/ntp/html/driver20.htm131
-rw-r--r--contrib/ntp/html/driver22.htm129
-rw-r--r--contrib/ntp/html/driver23.htm87
-rw-r--r--contrib/ntp/html/driver24.htm85
-rw-r--r--contrib/ntp/html/driver26.htm109
-rw-r--r--contrib/ntp/html/driver27.htm634
-rw-r--r--contrib/ntp/html/driver28.htm133
-rw-r--r--contrib/ntp/html/driver29.htm1254
-rw-r--r--contrib/ntp/html/driver3.htm131
-rw-r--r--contrib/ntp/html/driver30.htm153
-rw-r--r--contrib/ntp/html/driver32.htm42
-rw-r--r--contrib/ntp/html/driver33.htm38
-rw-r--r--contrib/ntp/html/driver34.htm54
-rw-r--r--contrib/ntp/html/driver4.htm126
-rw-r--r--contrib/ntp/html/driver5.htm159
-rw-r--r--contrib/ntp/html/driver6.htm253
-rw-r--r--contrib/ntp/html/driver7.htm227
-rw-r--r--contrib/ntp/html/driver8.htm343
-rw-r--r--contrib/ntp/html/driver9.htm133
-rw-r--r--contrib/ntp/html/exec.htm292
-rw-r--r--contrib/ntp/html/extern.htm40
-rw-r--r--contrib/ntp/html/gadget.htm111
-rw-r--r--contrib/ntp/html/hints.htm26
-rw-r--r--contrib/ntp/html/hints/a-ux195
-rw-r--r--contrib/ntp/html/hints/aix76
-rw-r--r--contrib/ntp/html/hints/bsdi65
-rw-r--r--contrib/ntp/html/hints/changes13
-rw-r--r--contrib/ntp/html/hints/decosf140
-rw-r--r--contrib/ntp/html/hints/decosf254
-rw-r--r--contrib/ntp/html/hints/hpux158
-rw-r--r--contrib/ntp/html/hints/linux5
-rw-r--r--contrib/ntp/html/hints/notes-xntp-v3119
-rw-r--r--contrib/ntp/html/hints/parse105
-rw-r--r--contrib/ntp/html/hints/refclocks35
-rw-r--r--contrib/ntp/html/hints/rs600056
-rw-r--r--contrib/ntp/html/hints/sco.htm39
-rw-r--r--contrib/ntp/html/hints/sgi74
-rw-r--r--contrib/ntp/html/hints/solaris.html139
-rw-r--r--contrib/ntp/html/hints/solaris.xtra.402311836
-rw-r--r--contrib/ntp/html/hints/solaris.xtra.409584974
-rw-r--r--contrib/ntp/html/hints/solaris.xtra.S99ntpd20
-rw-r--r--contrib/ntp/html/hints/solaris.xtra.patchfreq85
-rw-r--r--contrib/ntp/html/hints/sun415
-rw-r--r--contrib/ntp/html/hints/svr4-dell8
-rw-r--r--contrib/ntp/html/hints/svr4_package33
-rw-r--r--contrib/ntp/html/hints/todo4
-rw-r--r--contrib/ntp/html/hints/vxworks.html18
-rw-r--r--contrib/ntp/html/hints/winnt207
-rw-r--r--contrib/ntp/html/howto.htm315
-rw-r--r--contrib/ntp/html/htmlprimer.htm1198
-rw-r--r--contrib/ntp/html/index.htm201
-rw-r--r--contrib/ntp/html/kern.htm51
-rw-r--r--contrib/ntp/html/kernpps.htm26
-rw-r--r--contrib/ntp/html/ldisc.htm161
-rw-r--r--contrib/ntp/html/measure.htm50
-rw-r--r--contrib/ntp/html/miscopt.htm162
-rw-r--r--contrib/ntp/html/monopt.htm370
-rw-r--r--contrib/ntp/html/mx4200data.htm445
-rw-r--r--contrib/ntp/html/notes.htm1544
-rw-r--r--contrib/ntp/html/ntpd.htm183
-rw-r--r--contrib/ntp/html/ntpdate.htm185
-rw-r--r--contrib/ntp/html/ntpdc.htm620
-rw-r--r--contrib/ntp/html/ntpq.htm747
-rw-r--r--contrib/ntp/html/ntptime.htm96
-rw-r--r--contrib/ntp/html/ntptrace.htm82
-rw-r--r--contrib/ntp/html/parsedata.htm407
-rw-r--r--contrib/ntp/html/parsenew.htm237
-rw-r--r--contrib/ntp/html/patches.htm70
-rw-r--r--contrib/ntp/html/porting.htm78
-rw-r--r--contrib/ntp/html/pps.htm83
-rw-r--r--contrib/ntp/html/prefer.htm332
-rw-r--r--contrib/ntp/html/quick.htm99
-rw-r--r--contrib/ntp/html/rdebug.htm67
-rw-r--r--contrib/ntp/html/refclock.htm126
-rw-r--r--contrib/ntp/html/release.htm199
-rw-r--r--contrib/ntp/html/tickadj.htm103
-rw-r--r--contrib/ntp/html/vxworks.htm153
-rw-r--r--contrib/ntp/html/y2k.htm141
-rw-r--r--contrib/ntp/include/Makefile.am44
-rw-r--r--contrib/ntp/include/Makefile.in273
-rw-r--r--contrib/ntp/include/README4
-rw-r--r--contrib/ntp/include/adjtime.h63
-rw-r--r--contrib/ntp/include/ascii.h61
-rw-r--r--contrib/ntp/include/binio.h41
-rw-r--r--contrib/ntp/include/global.h51
-rw-r--r--contrib/ntp/include/gps.h53
-rw-r--r--contrib/ntp/include/ieee754io.h43
-rw-r--r--contrib/ntp/include/iosignal.h23
-rw-r--r--contrib/ntp/include/l_stdlib.h495
-rw-r--r--contrib/ntp/include/mbg_gps166.h538
-rw-r--r--contrib/ntp/include/md5.h51
-rw-r--r--contrib/ntp/include/mx4200.h40
-rw-r--r--contrib/ntp/include/ntif.h98
-rw-r--r--contrib/ntp/include/ntp.h714
-rw-r--r--contrib/ntp/include/ntp_calendar.h112
-rw-r--r--contrib/ntp/include/ntp_control.h260
-rw-r--r--contrib/ntp/include/ntp_datum.h30
-rw-r--r--contrib/ntp/include/ntp_filegen.h51
-rw-r--r--contrib/ntp/include/ntp_fp.h373
-rw-r--r--contrib/ntp/include/ntp_if.h54
-rw-r--r--contrib/ntp/include/ntp_io.h33
-rw-r--r--contrib/ntp/include/ntp_machine.h512
-rw-r--r--contrib/ntp/include/ntp_malloc.h19
-rw-r--r--contrib/ntp/include/ntp_proto.h8
-rw-r--r--contrib/ntp/include/ntp_refclock.h265
-rw-r--r--contrib/ntp/include/ntp_request.h790
-rw-r--r--contrib/ntp/include/ntp_select.h35
-rw-r--r--contrib/ntp/include/ntp_stdlib.h172
-rw-r--r--contrib/ntp/include/ntp_string.h48
-rw-r--r--contrib/ntp/include/ntp_syscall.h48
-rw-r--r--contrib/ntp/include/ntp_syslog.h77
-rw-r--r--contrib/ntp/include/ntp_types.h69
-rw-r--r--contrib/ntp/include/ntp_unixtime.h132
-rw-r--r--contrib/ntp/include/ntpd.h381
-rw-r--r--contrib/ntp/include/parse.h391
-rw-r--r--contrib/ntp/include/parse_conf.h54
-rw-r--r--contrib/ntp/include/recvbuff.h113
-rw-r--r--contrib/ntp/include/trimble.h125
-rwxr-xr-xcontrib/ntp/install-sh238
-rw-r--r--contrib/ntp/kernel/Makefile.am5
-rw-r--r--contrib/ntp/kernel/Makefile.in309
-rw-r--r--contrib/ntp/kernel/README200
-rw-r--r--contrib/ntp/kernel/chuinit.c76
-rw-r--r--contrib/ntp/kernel/clkinit.c76
-rw-r--r--contrib/ntp/kernel/sys/Makefile.am8
-rw-r--r--contrib/ntp/kernel/sys/Makefile.in238
-rw-r--r--contrib/ntp/kernel/sys/README11
-rw-r--r--contrib/ntp/kernel/sys/bsd_audioirig.h101
-rw-r--r--contrib/ntp/kernel/sys/chudefs.h22
-rw-r--r--contrib/ntp/kernel/sys/clkdefs.h38
-rw-r--r--contrib/ntp/kernel/sys/i8253.h48
-rw-r--r--contrib/ntp/kernel/sys/parsestreams.h107
-rw-r--r--contrib/ntp/kernel/sys/pcl720.h95
-rw-r--r--contrib/ntp/kernel/sys/ppsclock.h64
-rw-r--r--contrib/ntp/kernel/sys/timex.h309
-rw-r--r--contrib/ntp/kernel/sys/tpro.h34
-rw-r--r--contrib/ntp/kernel/tty_chu.c276
-rw-r--r--contrib/ntp/kernel/tty_chu_STREAMS.c603
-rw-r--r--contrib/ntp/kernel/tty_clk.c317
-rw-r--r--contrib/ntp/kernel/tty_clk_STREAMS.c266
-rw-r--r--contrib/ntp/libntp/Makefile.am31
-rw-r--r--contrib/ntp/libntp/Makefile.in796
-rw-r--r--contrib/ntp/libntp/README5
-rw-r--r--contrib/ntp/libntp/a_md5encrypt.c132
-rw-r--r--contrib/ntp/libntp/adjtime.c152
-rw-r--r--contrib/ntp/libntp/adjtimex.c15
-rw-r--r--contrib/ntp/libntp/atoint.c50
-rw-r--r--contrib/ntp/libntp/atolfp.c118
-rw-r--r--contrib/ntp/libntp/atouint.c35
-rw-r--r--contrib/ntp/libntp/authencrypt.c97
-rw-r--r--contrib/ntp/libntp/authkeys.c574
-rw-r--r--contrib/ntp/libntp/authparity.c57
-rw-r--r--contrib/ntp/libntp/authreadkeys.c205
-rw-r--r--contrib/ntp/libntp/authusekey.c134
-rw-r--r--contrib/ntp/libntp/binio.c128
-rw-r--r--contrib/ntp/libntp/buftvtots.c65
-rw-r--r--contrib/ntp/libntp/caljulian.c115
-rw-r--r--contrib/ntp/libntp/calleapwhen.c59
-rw-r--r--contrib/ntp/libntp/caltontp.c42
-rw-r--r--contrib/ntp/libntp/calyearstart.c22
-rw-r--r--contrib/ntp/libntp/clocktime.c132
-rw-r--r--contrib/ntp/libntp/clocktypes.c98
-rw-r--r--contrib/ntp/libntp/decodenetnum.c59
-rw-r--r--contrib/ntp/libntp/dofptoa.c118
-rw-r--r--contrib/ntp/libntp/dolfptoa.c162
-rw-r--r--contrib/ntp/libntp/emalloc.c48
-rw-r--r--contrib/ntp/libntp/findconfig.c72
-rw-r--r--contrib/ntp/libntp/fptoa.c25
-rw-r--r--contrib/ntp/libntp/fptoms.c24
-rw-r--r--contrib/ntp/libntp/getopt.c107
-rw-r--r--contrib/ntp/libntp/gpstolfp.c41
-rw-r--r--contrib/ntp/libntp/hextoint.c39
-rw-r--r--contrib/ntp/libntp/hextolfp.c67
-rw-r--r--contrib/ntp/libntp/humandate.c62
-rw-r--r--contrib/ntp/libntp/ieee754io.c575
-rw-r--r--contrib/ntp/libntp/inttoa.c20
-rw-r--r--contrib/ntp/libntp/iosignal.c518
-rw-r--r--contrib/ntp/libntp/lib_strbuf.c22
-rw-r--r--contrib/ntp/libntp/lib_strbuf.h27
-rw-r--r--contrib/ntp/libntp/log.c152
-rw-r--r--contrib/ntp/libntp/log.h21
-rw-r--r--contrib/ntp/libntp/machines.c218
-rw-r--r--contrib/ntp/libntp/md5c.c350
-rw-r--r--contrib/ntp/libntp/memmove.c136
-rw-r--r--contrib/ntp/libntp/mexit.c34
-rw-r--r--contrib/ntp/libntp/mfp_mul.c140
-rw-r--r--contrib/ntp/libntp/mfptoa.c23
-rw-r--r--contrib/ntp/libntp/mfptoms.c23
-rw-r--r--contrib/ntp/libntp/mktime.c282
-rw-r--r--contrib/ntp/libntp/modetoa.c34
-rw-r--r--contrib/ntp/libntp/mstolfp.c100
-rw-r--r--contrib/ntp/libntp/msutotsf.c35
-rw-r--r--contrib/ntp/libntp/msyslog.c170
-rw-r--r--contrib/ntp/libntp/netof.c25
-rw-r--r--contrib/ntp/libntp/numtoa.c24
-rw-r--r--contrib/ntp/libntp/numtohost.c39
-rw-r--r--contrib/ntp/libntp/octtoint.c35
-rw-r--r--contrib/ntp/libntp/prettydate.c72
-rw-r--r--contrib/ntp/libntp/ranny.c82
-rw-r--r--contrib/ntp/libntp/recvbuff.c277
-rw-r--r--contrib/ntp/libntp/refnumtoa.c31
-rw-r--r--contrib/ntp/libntp/statestr.c271
-rw-r--r--contrib/ntp/libntp/strerror.c40
-rw-r--r--contrib/ntp/libntp/syssignal.c123
-rw-r--r--contrib/ntp/libntp/systime.c404
-rw-r--r--contrib/ntp/libntp/tsftomsu.c38
-rw-r--r--contrib/ntp/libntp/tstotv.c135
-rw-r--r--contrib/ntp/libntp/tvtoa.c38
-rw-r--r--contrib/ntp/libntp/tvtots.c159
-rw-r--r--contrib/ntp/libntp/uglydate.c50
-rw-r--r--contrib/ntp/libntp/uinttoa.c20
-rw-r--r--contrib/ntp/libntp/utvtoa.c26
-rw-r--r--contrib/ntp/libntp/ymd2yd.c37
-rw-r--r--contrib/ntp/libparse/Makefile.am93
-rw-r--r--contrib/ntp/libparse/Makefile.in598
-rw-r--r--contrib/ntp/libparse/README96
-rw-r--r--contrib/ntp/libparse/clk_computime.c194
-rw-r--r--contrib/ntp/libparse/clk_dcf7000.c188
-rw-r--r--contrib/ntp/libparse/clk_hopf6021.c280
-rw-r--r--contrib/ntp/libparse/clk_meinberg.c747
-rw-r--r--contrib/ntp/libparse/clk_rawdcf.c581
-rw-r--r--contrib/ntp/libparse/clk_rcc8000.c195
-rw-r--r--contrib/ntp/libparse/clk_schmid.c231
-rw-r--r--contrib/ntp/libparse/clk_trimtaip.c188
-rw-r--r--contrib/ntp/libparse/clk_trimtsip.c421
-rw-r--r--contrib/ntp/libparse/clk_varitext.c239
-rw-r--r--contrib/ntp/libparse/clk_wharton.c180
-rw-r--r--contrib/ntp/libparse/data_mbg.c490
-rw-r--r--contrib/ntp/libparse/info_trimble.c94
-rw-r--r--contrib/ntp/libparse/kclk_computime.c17
-rw-r--r--contrib/ntp/libparse/kclk_dcf7000.c17
-rw-r--r--contrib/ntp/libparse/kclk_hopf6021.c17
-rw-r--r--contrib/ntp/libparse/kclk_meinberg.c17
-rw-r--r--contrib/ntp/libparse/kclk_rawdcf.c15
-rw-r--r--contrib/ntp/libparse/kclk_rcc8000.c17
-rw-r--r--contrib/ntp/libparse/kclk_schmid.c17
-rw-r--r--contrib/ntp/libparse/kclk_trimtaip.c17
-rw-r--r--contrib/ntp/libparse/kclk_trimtsip.c17
-rw-r--r--contrib/ntp/libparse/kclk_varitext.c28
-rw-r--r--contrib/ntp/libparse/kclk_wharton.c15
-rw-r--r--contrib/ntp/libparse/kparse.c17
-rw-r--r--contrib/ntp/libparse/kparse_conf.c17
-rw-r--r--contrib/ntp/libparse/mkinfo_rcmd.sed8
-rw-r--r--contrib/ntp/libparse/mkinfo_scmd.sed16
-rw-r--r--contrib/ntp/libparse/parse.c917
-rw-r--r--contrib/ntp/libparse/parse_conf.c149
-rw-r--r--contrib/ntp/libparse/parsesolaris.c1173
-rw-r--r--contrib/ntp/libparse/parsestreams.c1335
-rw-r--r--contrib/ntp/libparse/trim_info.c35
-rw-r--r--contrib/ntp/librsaref/Makefile.am50
-rw-r--r--contrib/ntp/librsaref/Makefile.in346
-rwxr-xr-xcontrib/ntp/missing134
-rwxr-xr-xcontrib/ntp/mkinstalldirs32
-rw-r--r--contrib/ntp/ntpd/Makefile.am45
-rw-r--r--contrib/ntp/ntpd/Makefile.in907
-rw-r--r--contrib/ntp/ntpd/check_y2k.c624
-rw-r--r--contrib/ntp/ntpd/jupiter.h255
-rw-r--r--contrib/ntp/ntpd/map_vme.c135
-rw-r--r--contrib/ntp/ntpd/ntp_config.c2405
-rw-r--r--contrib/ntp/ntpd/ntp_control.c2652
-rw-r--r--contrib/ntp/ntpd/ntp_filegen.c547
-rw-r--r--contrib/ntp/ntpd/ntp_intres.c970
-rw-r--r--contrib/ntp/ntpd/ntp_io.c1754
-rw-r--r--contrib/ntp/ntpd/ntp_loopfilter.c847
-rw-r--r--contrib/ntp/ntpd/ntp_monitor.c354
-rw-r--r--contrib/ntp/ntpd/ntp_peer.c795
-rw-r--r--contrib/ntp/ntpd/ntp_proto.c2165
-rw-r--r--contrib/ntp/ntpd/ntp_refclock.c1322
-rw-r--r--contrib/ntp/ntpd/ntp_request.c2334
-rw-r--r--contrib/ntp/ntpd/ntp_restrict.c460
-rw-r--r--contrib/ntp/ntpd/ntp_timer.c308
-rw-r--r--contrib/ntp/ntpd/ntp_util.c640
-rw-r--r--contrib/ntp/ntpd/ntpd.c1121
-rw-r--r--contrib/ntp/ntpd/refclock_acts.c981
-rw-r--r--contrib/ntp/ntpd/refclock_arbiter.c429
-rw-r--r--contrib/ntp/ntpd/refclock_arc.c1323
-rw-r--r--contrib/ntp/ntpd/refclock_as2201.c388
-rw-r--r--contrib/ntp/ntpd/refclock_atom.c488
-rw-r--r--contrib/ntp/ntpd/refclock_bancomm.c483
-rw-r--r--contrib/ntp/ntpd/refclock_chronolog.c343
-rw-r--r--contrib/ntp/ntpd/refclock_chu.c1464
-rw-r--r--contrib/ntp/ntpd/refclock_conf.c262
-rw-r--r--contrib/ntp/ntpd/refclock_datum.c873
-rw-r--r--contrib/ntp/ntpd/refclock_dumbclock.c381
-rw-r--r--contrib/ntp/ntpd/refclock_gpsvme.c613
-rw-r--r--contrib/ntp/ntpd/refclock_heath.c487
-rw-r--r--contrib/ntp/ntpd/refclock_hpgps.c603
-rw-r--r--contrib/ntp/ntpd/refclock_irig.c1079
-rw-r--r--contrib/ntp/ntpd/refclock_jupiter.c1262
-rw-r--r--contrib/ntp/ntpd/refclock_leitch.c619
-rw-r--r--contrib/ntp/ntpd/refclock_local.c258
-rw-r--r--contrib/ntp/ntpd/refclock_msfees.c1444
-rw-r--r--contrib/ntp/ntpd/refclock_mx4200.c1774
-rw-r--r--contrib/ntp/ntpd/refclock_nmea.c411
-rw-r--r--contrib/ntp/ntpd/refclock_oncore.c1660
-rw-r--r--contrib/ntp/ntpd/refclock_palisade.c880
-rw-r--r--contrib/ntp/ntpd/refclock_palisade.h167
-rw-r--r--contrib/ntp/ntpd/refclock_parse.c5340
-rw-r--r--contrib/ntp/ntpd/refclock_pst.c318
-rw-r--r--contrib/ntp/ntpd/refclock_ptbacts.c16
-rw-r--r--contrib/ntp/ntpd/refclock_shm.c320
-rw-r--r--contrib/ntp/ntpd/refclock_tpro.c209
-rw-r--r--contrib/ntp/ntpd/refclock_trak.c361
-rw-r--r--contrib/ntp/ntpd/refclock_true.c852
-rw-r--r--contrib/ntp/ntpd/refclock_ulink.c319
-rw-r--r--contrib/ntp/ntpd/refclock_usno.c674
-rw-r--r--contrib/ntp/ntpd/refclock_wwvb.c440
-rw-r--r--contrib/ntp/ntpdate/Makefile.am20
-rw-r--r--contrib/ntp/ntpdate/Makefile.in381
-rw-r--r--contrib/ntp/ntpdate/README7
-rw-r--r--contrib/ntp/ntpdate/ntpdate.c2036
-rw-r--r--contrib/ntp/ntpdate/ntpdate.h95
-rw-r--r--contrib/ntp/ntpdate/ntptime_config.c557
-rw-r--r--contrib/ntp/ntpdate/ntptimeset.c2174
-rw-r--r--contrib/ntp/ntpdc/Makefile.am21
-rw-r--r--contrib/ntp/ntpdc/Makefile.in361
-rw-r--r--contrib/ntp/ntpdc/README6
-rw-r--r--contrib/ntp/ntpdc/ntpdc.c1689
-rw-r--r--contrib/ntp/ntpdc/ntpdc.h59
-rw-r--r--contrib/ntp/ntpdc/ntpdc_ops.c2471
-rw-r--r--contrib/ntp/ntpq/Makefile.am21
-rw-r--r--contrib/ntp/ntpq/Makefile.in360
-rw-r--r--contrib/ntp/ntpq/README6
-rw-r--r--contrib/ntp/ntpq/ntpq.c3095
-rw-r--r--contrib/ntp/ntpq/ntpq.h89
-rw-r--r--contrib/ntp/ntpq/ntpq_ops.c1651
-rw-r--r--contrib/ntp/ntptrace/Makefile.am19
-rw-r--r--contrib/ntp/ntptrace/Makefile.in349
-rw-r--r--contrib/ntp/ntptrace/README7
-rw-r--r--contrib/ntp/ntptrace/ntptrace.c784
-rw-r--r--contrib/ntp/ntptrace/ntptrace.h36
-rw-r--r--contrib/ntp/parseutil/Makefile.am10
-rw-r--r--contrib/ntp/parseutil/Makefile.in334
-rw-r--r--contrib/ntp/parseutil/README16
-rw-r--r--contrib/ntp/parseutil/dcfd.c1850
-rw-r--r--contrib/ntp/parseutil/testdcf.c495
-rwxr-xr-xcontrib/ntp/readme.y2kfixesbin0 -> 8192 bytes
-rw-r--r--contrib/ntp/results.y2kfixes76
-rw-r--r--contrib/ntp/scripts/Makefile.am1
-rw-r--r--contrib/ntp/scripts/Makefile.in210
-rw-r--r--contrib/ntp/scripts/README30
-rw-r--r--contrib/ntp/scripts/calc_tickadj38
-rwxr-xr-xcontrib/ntp/scripts/checktime79
-rw-r--r--contrib/ntp/scripts/fixautomakedepsmagic28
-rwxr-xr-xcontrib/ntp/scripts/hpadjtime.sh18
-rw-r--r--contrib/ntp/scripts/mkver.in31
-rw-r--r--contrib/ntp/scripts/monitoring/README154
-rw-r--r--contrib/ntp/scripts/monitoring/loopwatch.config.SAMPLE89
-rw-r--r--contrib/ntp/scripts/monitoring/lr.pl145
-rw-r--r--contrib/ntp/scripts/monitoring/ntp.pl478
-rw-r--r--contrib/ntp/scripts/monitoring/ntploopstat457
-rw-r--r--contrib/ntp/scripts/monitoring/ntploopwatch1667
-rw-r--r--contrib/ntp/scripts/monitoring/ntptrap463
-rw-r--r--contrib/ntp/scripts/monitoring/timelocal.pl77
-rwxr-xr-xcontrib/ntp/scripts/ntp-groper95
-rwxr-xr-xcontrib/ntp/scripts/ntp-restart9
-rw-r--r--contrib/ntp/scripts/ntpver.in7
-rwxr-xr-xcontrib/ntp/scripts/plot_summary.pl333
-rw-r--r--contrib/ntp/scripts/rc1/postinstall2
-rw-r--r--contrib/ntp/scripts/rc1/preinstall6
-rw-r--r--contrib/ntp/scripts/rc1/preremove4
-rw-r--r--contrib/ntp/scripts/rc1/prototype19
-rw-r--r--contrib/ntp/scripts/rc1/xntp29
-rw-r--r--contrib/ntp/scripts/rc2/local.ntpd64
-rw-r--r--contrib/ntp/scripts/stats.ulrich.patches1003
-rw-r--r--contrib/ntp/scripts/stats/README39
-rw-r--r--contrib/ntp/scripts/stats/README.stats246
-rw-r--r--contrib/ntp/scripts/stats/README.timecodes149
-rwxr-xr-xcontrib/ntp/scripts/stats/clock.awk431
-rwxr-xr-xcontrib/ntp/scripts/stats/dupe.awk8
-rwxr-xr-xcontrib/ntp/scripts/stats/ensemble.S5
-rwxr-xr-xcontrib/ntp/scripts/stats/ensemble.awk17
-rwxr-xr-xcontrib/ntp/scripts/stats/etf.S15
-rwxr-xr-xcontrib/ntp/scripts/stats/etf.awk19
-rwxr-xr-xcontrib/ntp/scripts/stats/itf.S5
-rwxr-xr-xcontrib/ntp/scripts/stats/itf.awk19
-rwxr-xr-xcontrib/ntp/scripts/stats/loop.S7
-rwxr-xr-xcontrib/ntp/scripts/stats/loop.awk45
-rwxr-xr-xcontrib/ntp/scripts/stats/loop_summary2
-rwxr-xr-xcontrib/ntp/scripts/stats/peer.awk68
-rwxr-xr-xcontrib/ntp/scripts/stats/psummary.awk82
-rwxr-xr-xcontrib/ntp/scripts/stats/summary.sh88
-rwxr-xr-xcontrib/ntp/scripts/stats/tdata.S5
-rwxr-xr-xcontrib/ntp/scripts/stats/tdata.awk45
-rw-r--r--contrib/ntp/scripts/summary.pl357
-rw-r--r--contrib/ntp/scripts/support/README73
-rw-r--r--contrib/ntp/scripts/support/bin/monl213
-rw-r--r--contrib/ntp/scripts/support/bin/mvstats23
-rw-r--r--contrib/ntp/scripts/support/conf/hp300.hp3000
-rw-r--r--contrib/ntp/scripts/support/conf/hp700.hp7000
-rw-r--r--contrib/ntp/scripts/support/conf/hp700.hp700.faui470
-rw-r--r--contrib/ntp/scripts/support/conf/hp800.hp8000
-rw-r--r--contrib/ntp/scripts/support/conf/ntp.conf3
-rw-r--r--contrib/ntp/scripts/support/conf/sun3.sun30
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4.faui010
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4.faui100
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4.faui450
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4c0
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4c.Lucifer0
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4m0
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4m.faui420
-rw-r--r--contrib/ntp/scripts/support/conf/sun4.sun4m.faui45m0
-rw-r--r--contrib/ntp/scripts/support/conf/tickconf19
-rw-r--r--contrib/ntp/scripts/support/etc/cron18
-rw-r--r--contrib/ntp/scripts/support/etc/crontab8
-rw-r--r--contrib/ntp/scripts/support/etc/install67
-rw-r--r--contrib/ntp/scripts/support/etc/rc198
-rw-r--r--contrib/ntp/scripts/support/etc/setup72
-rw-r--r--contrib/ntp/stamp-h.in1
-rw-r--r--contrib/ntp/util/Makefile.am18
-rw-r--r--contrib/ntp/util/Makefile.in492
-rw-r--r--contrib/ntp/util/README37
-rw-r--r--contrib/ntp/util/ansi2knr.136
-rw-r--r--contrib/ntp/util/ansi2knr.c720
-rw-r--r--contrib/ntp/util/byteorder.c56
-rw-r--r--contrib/ntp/util/hist.c107
-rw-r--r--contrib/ntp/util/jitter.c70
-rw-r--r--contrib/ntp/util/kern.c224
-rw-r--r--contrib/ntp/util/longsize.c11
-rw-r--r--contrib/ntp/util/ntptime.c399
-rw-r--r--contrib/ntp/util/precision.c172
-rw-r--r--contrib/ntp/util/sht.c185
-rw-r--r--contrib/ntp/util/testrs6000.c55
-rw-r--r--contrib/ntp/util/tickadj.c904
-rw-r--r--contrib/ntp/util/timetrim.c95
483 files changed, 150243 insertions, 0 deletions
diff --git a/contrib/ntp/COPYRIGHT b/contrib/ntp/COPYRIGHT
new file mode 100644
index 000000000000..6507db7bb374
--- /dev/null
+++ b/contrib/ntp/COPYRIGHT
@@ -0,0 +1,151 @@
+This file is automatically generated from html/copyright.htm
+
+ Copyright Notice
+
+ [INLINE] "Clone me," says Dolly sheepishly
+ _________________________________________________________________
+
+ The following copyright notice applies to all files collectively
+ called the Network Time Protocol Version 4 Distribution. Unless
+ specifically declared otherwise in an individual file, this notice
+ applies as if the text was explicitly included in the file.
+/***********************************************************************
+ * *
+ * Copyright (c) David L. Mills 1992-1999 *
+ * *
+ * Permission to use, copy, modify, and distribute this software and *
+ * its documentation for any purpose and without fee is hereby *
+ * granted, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission *
+ * notice appear in supporting documentation, and that the name *
+ * University of Delaware not be used in advertising or publicity *
+ * pertaining to distribution of the software without specific, *
+ * written prior permission. The University of Delaware makes no *
+ * representations about the suitability this software for any *
+ * purpose. It is provided "as is" without express or implied *
+ * warranty. *
+ **********************************************************************/
+
+ The following individuals contributed in part to the Network Time
+ Protocol Distribution Version 4 and are acknowledged as authors of
+ this work.
+ 1. [1]Mark Andrews <marka@syd.dms.csiro.au> Leitch atomic clock
+ controller
+ 2. [2]Viraj Bais <vbais@mailman1.intel.com> and [3]Clayton Kirkwood
+ <kirkwood@striderfm.intel.com> port to WindowsNT 3.5
+ 3. [4]Karl Berry <karl@owl.HQ.ileaf.com> syslog to file option
+ 4. [5]Piete Brooks <Piete.Brooks@cl.cam.ac.uk> MSF clock driver,
+ Trimble PARSE support
+ 5. [6]Steve Clift <clift@ml.csiro.au> OMEGA clock driver
+ 6. [7]Casey Crellin <casey@csc.co.za> vxWorks (Tornado) port and help
+ with target configuration
+ 7. [8]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux port
+ 8. [9]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port
+ 9. [10]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for
+ NTP Version 2 as specified in RFC-1119
+ 10. [11]Glenn Hollinger <glenn@herald.usask.ca> GOES clock driver
+ 11. [12]Mike Iglesias <iglesias@uci.edu> DEC Alpha port
+ 12. [13]Jim Jagielski <jim@jagubox.gsfc.nasa.gov> A/UX port
+ 13. [14]Jeff Johnson <jbj@chatham.usdesign.com> massive prototyping
+ overhaul
+ 14. [15]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
+ modifications, HPUX modifications
+ 15. [16]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
+ 16. [17]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock,
+ Maganavox GPS clock driver
+ 17. [18]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
+ 18. [19]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
+ 19. [20]Derek Mulcahy <derek@toybox.demon.co.uk> and [21]Damon
+ Hart-Davis <d@hd.org> ARCRON MSF clock driver
+ 20. [22]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
+ code for Version 3 as specified in RFC-1305
+ 21. [23]David L. Mills <mills@udel.edu> Version 4 foundation,
+ Spectractom WWVB, Austron GPS, Arbiter GPS, CHU, Heath, ATOM,
+ ACTS, KSI/Odetics, IRIG clock drivers; PPS support; precision
+ kernel; NTPv4 changes
+ 22. [24]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
+ 23. [25]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
+ 24. [26]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
+ 25. [27]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
+ monitoring/trap scripts, statistics file handling
+ 26. [28]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
+ 27. [29]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
+ 28. [30]Frank Kardel [31]<Frank.Kardel@informatik.uni-erlangen.de>
+ PARSE <GENERIC> driver (14 reference clocks), STREAMS modules for
+ PARSE, support scripts, syslog cleanup
+ 29. [32]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
+ 30. [33]Michael Shields <shields@tembel.org> USNO clock driver
+ 31. [34]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock
+ driver
+ 32. [35]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
+ makeover
+ 33. [36]Kenneth Stone <ken@sdd.hp.com> HP-UX port
+ 34. [37]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast support
+ 35. [38]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock
+ driver
+ 36. [39]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
+ TrueTime clock driver
+ 37. [40]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
+ validated HTML documents according to the HTML DTD
+ 38. [41]Greg Brackley <greg.brackley@bigfoot.com> Major rework of
+ WINNT port. Clean up recvbuf and iosignal code into separate
+ modules.
+ 39. [42]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference
+ clock driver, NT adj. residuals, integrated Greg's Winnt port.
+ 40. [43]Wilfredo Sánchez <wsanchez@apple.com> added support for
+ NetInfo
+
+ _________________________________________________________________
+
+ [44][LINK]
+
+
+ [45]David L. Mills <mills@udel.edu>
+
+References
+
+ 1. mailto: marka@syd.dms.csiro.au
+ 2. mailto: vbais@mailman1.intel.co
+ 3. mailto: kirkwood@striderfm.intel.com
+ 4. mailto: karl@owl.HQ.ileaf.com
+ 5. mailto: Piete.Brooks@cl.cam.ac.uk
+ 6. mailto: clift@ml.csiro.au
+ 7. mailto:casey@csc.co.za
+ 8. mailto: duwe@immd4.informatik.uni-erlangen.de
+ 9. mailto: dundas@salt.jpl.nasa.gov
+ 10. mailto: dennis@mrbill.canet.ca
+ 11. mailto: glenn@herald.usask.ca
+ 12. mailto: iglesias@uci.edu
+ 13. mailto: jagubox.gsfc.nasa.gov
+ 14. mailto: jbj@chatham.usdesign.com
+ 15. mailto: jones@hermes.chpc.utexas.edu
+ 16. mailto: dkatz@cisco.com
+ 17. mailto: leres@ee.lbl.gov
+ 18. mailto: lindholm@ucs.ubc.ca
+ 19. mailto: louie@ni.umd.edu
+ 20. mailto: derek@toybox.demon.co.uk
+ 21. mailto: d@hd.org
+ 22. mailto: thorinn@diku.dk
+ 23. mailto: mills@udel.edu
+ 24. mailto: moeller@gwdgv1.dnet.gwdg.de
+ 25. mailto: mogul@pa.dec.com
+ 26. mailto: tmoore@fievel.daytonoh.ncr.com
+ 27. mailto: Rainer.Pruy@informatik.uni-erlangen.de
+ 28. mailto: dirce@zk3.dec.com
+ 29. mailto: mrapple@quack.kfu.com
+ 30. http://www4.informatik.uni-erlangen.de/~kardel
+ 31. mailto: Frank.Kardel@informatik.uni-erlangen.de
+ 32. mailto: schnitz@unipress.com
+ 33. mailto: shields@tembel.org
+ 34. mailto: pebbles.jpl.nasa.gov
+ 35. mailto: harlan@pfcs.com
+ 36. mailto: ken@sdd.hp.com
+ 37. mailto: ajit@ee.udel.edu
+ 38. mailto: tsuruoka@nc.fukuoka-u.ac.jp
+ 39. mailto: vixie@vix.com
+ 40. mailto: Ulrich.Windl@rz.uni-regensburg.de
+ 41. mailto: greg.brackley@bigfoot.com
+ 42. mailto: Sven_Dietrich@trimble.COM
+ 43. mailto: wsanchez@apple.com
+ 44. file://localhost/backroom/ntp4/html/index.htm
+ 45. mailto:mills@udel.edu
diff --git a/contrib/ntp/ChangeLog b/contrib/ntp/ChangeLog
new file mode 100644
index 000000000000..a7abc1458223
--- /dev/null
+++ b/contrib/ntp/ChangeLog
@@ -0,0 +1,2737 @@
+1999-11-11 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.98f
+
+ * configure.in: DECL_PLOCK_0 and DECL_STIME_0 are for dec-osf5*, too
+
+ * ntpd/ntpd.c: DEC OSF cleanup (editorial comments by HMS)
+ From: Tom Smith <smith@cag.lkg.dec.com>
+
+ * ntpd/ntp_refclock.c: MAXUNIT bugfix
+ From: Marc.Brett@westgeo.com
+
+ * ntpd/ntp_refclock.c:
+ * ntpd/ntpd.c:
+ * ntpd/refclock_arc.c:
+ * ntpd/refclock_as2201.c:
+ * ntpd/refclock_atom.c:
+ * ntpdc/ntpdc.c:
+ * ntpq/ntpq.c:
+ Code cleanup.
+ From: Marc.Brett@westgeo.com
+
+ * include/ntp_stdlib.h:
+ * libntp/systime.c:
+ * ntpd/ntp_proto.c:
+ Replaced the 'sco5_oldclock' variable with 'systime_10ms_ticks'.
+ Cleared libntp/systime.c and include/ntp_stdlib.h of references
+ to SCO5_CLOCK and RELIANTUNIX_CLOCK (moved to ntpd/ntp_proto.c).
+ From: Kamal A Mostafa <kamal@whence.com>
+
+ * configure.in: alpha-dec-osf4* -> alpha*-dec-osf4*|alpha*-dec-osf5*
+ From: Tom Smith <smith@cag.lkg.dec.com>
+
+ * configure.in: Look for <sys/sio.h>. If TIOCDCDTIMESTAMP is
+ there, we have TTYCLK.
+ * acconfig.h: Lose old AIOCTIMESTAMP stuff
+ Reported by: Kamal A Mostafa <kamal@whence.com>
+
+1999-11-10 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/ntpd.c (set_process_priority): Clean up nice() and setpriority()
+
+1999-11-09 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * Makefile.am (EXTRA_DIST): Added README.cvs
+ Reported by: Kamal A Mostafa <kamal@whence.com>
+
+1999-11-08 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.98e
+
+1999-11-07 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: Lose AIOCTIMESTAMP tests
+
+ * ntpd/ntpd.c: lose select() EINTR debug warning
+ * ntpd/ntp_refclock.c: AIOCTIMESTAMP -> TIOCDCDTIMESTAMP. Watch
+ CLK_SETSTR.
+ * ntpd/refclock_atom.c: fdpps is only there for PPS or PPSAPI.
+ AIOCTIMESTAMP is gone now.
+ From: Kamal A Mostafa <kamal@whence.com>
+
+ * configure.in (HAVE_MLOCKALL): Deal with dec-osf5 realities
+ * ntpd/refclock_ulink.c (ulink_poll): Fix cast.
+ * libntp/machines.c (ntp_set_tod): Use a long* for the argument to
+ stime().
+ Reported by: Tom Smith <smith@cag.lkg.dec.com>
+
+ * ntpd/ntpd.c (set_process_priority): Use whatever we have until
+ something works.
+
+ * ntpd/ntp_loopfilter.c: Keep clock_frequency changes in a temp
+ variable so we can record it to loopstats (near as HMS can tell).
+ From: Dave Mills <mills@udel.edu>
+
+1999-11-06 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * acconfig.h: RELIANTUNIX_CLOCK
+ * configure.in (ac_cv_var_tickadj): RELIANTUNIX_CLOCK
+ * libntp/systime.c (adj_systime): Reliant patches
+ From: Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>
+
+1999-11-05 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_parse.c (parse_start): ASYNC_PPS_CD_NEG cleanup
+ * configure.in (ac_cv_make_ntptime): OK on Linux
+ From: <Ulrich.Windl@rz.uni-regensburg.de>
+
+ * configure.in: NetBSD has PPSAPI now
+ F_SETOWN is needed for NetBSD
+ From: Jonathan Stone <jonathan@dsg.stanford.edu>
+
+1999-11-02 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.98d
+
+ * ntpd/refclock_parse.c: Cleanup/fixes
+ From: John Hay <jhay@mikom.csir.co.za>
+
+ * ntpd/refclock_parse.c: Lose #include "ntp_select.h"
+ * ntpd/ntpd.c: Lose #include "ntp_select.h"
+ * ntpd/ntp_io.c: Lose #include "ntp_select.h"
+ * ntpd/ntp_intres.c: Lose #include "ntp_select.h"
+ * libntp/iosignal.c: Lose #include "ntp_select.h"
+ * include/ntpd.h: #include "ntp_select.h" for declaration of activefds
+ Reported by: Christian Krackowizer <kra1@technodat.co.at>
+
+1999-11-01 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.98c
+
+ * libntp/syssignal.c: Don't warn about SA_RESTART
+ * libntp/recvbuff.c: Fix free buffer count
+ From: Jeffrey C Honig <jch@bsdi.com>
+
+ * html/pps.htm:
+ * html/howto.htm:
+ * html/confopt.htm:
+ * html/clockopt.htm:
+ * html/uthopt.htm:
+ Updates.
+ From: Dave Mills <mills@udel.edu>
+
+ * ntpd/refclock_wwvb.c: burst fixes
+ * ntpd/refclock_ulink.c: burst fixes
+ * ntpd/refclock_tpro.c: burst and NSTAGE fixes
+ * ntpd/refclock_pst.c: burst fixes
+ * ntpd/refclock_irig.c: SAMPLE -> SAMPLES
+ * ntpd/refclock_heath.c: burst fixes
+ * ntpd/refclock_dumbclock.c: burst fixes
+ * ntpd/refclock_chronolog.c: burst fixes
+ * ntpd/refclock_bancomm.c: burst fixes
+ * ntpd/refclock_atom.c: burst fixes
+ * ntpd/refclock_as2201.c: burst fixes
+ * ntpd/ntp_refclock.c: PPSAPI, code, and comment cleanup/fixes
+ * ntpd/ntp_proto.c: Broadcast/restrict cleanup
+ * ntpd/ntp_loopfilter.c: Cleanup and fixes
+ * libntp/gpstolfp.c: Lose the UL qualifiers - old compilers hate them
+ From: Dave Mills <mills@udel.edu>
+
+1999-10-31 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: TIOCSPPS cleanup
+
+1999-10-20 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.98b
+
+ * ntpd/refclock_atom.c: AIOCTIMESTAMP patch
+ * ntpd/ntpd.c: SCO clock patch
+ * ntpd/ntp_request.c: noselect patch
+ * ntpd/ntp_refclock.c: AIOCTIMESTAMP patch
+ * ntpd/ntp_proto.c: noselect patch
+ * ntpd/ntp_intres.c: noselect patch
+ * ntpd/ntp_config.c: noselect patch
+ * include/ntp_request.h: noselect patch
+ * include/ntp.h: noselect patch
+ From: Kamal A Mostafa <kamal@whence.com>
+
+ * configure.in:
+ * acconfig.h: TTYCLK_AIOCTIMESTAMP
+ Stuff for Kamal
+
+ * ntpd/refclock_atom.c (atom_pps): make "result" initialization
+ uglier, but more bulletproof.
+
+ * configure.in (sys/timepps.h): Fixed.
+ From: John Hay <jhay@mikom.csir.co.za>
+
+1999-10-19 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_oncore.c: Rename instance.state to instance.o_state
+
+ * refclock_oncore.c:
+ * refclock_mx4200.c:
+ * refclock_chu.c:
+ * refclock_atom.c:
+ * ntp_refclock.c:
+ * ntp_peer.c:
+ * ntp_loopfilter.c:
+ * include/ntp_refclock.h:
+ Various cleanup and fixes
+ From: Dave Mills <mills@udel.edu>
+
+1999-10-17 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/ntp_config.c (CONFIG_FILE): NT changes
+ From: Sven Dietrich <Sven_Dietrich@trimble.com>
+
+1999-10-16 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: sys/timepps.h verification changes
+
+ * ntpd/refclock_atom.c (atom_poll): PPS cleanup
+ From: Dave Mills <mills@udel.edu>
+ (atom_pps): Portability patch
+ From: John Hay <jhay@mikom.csir.co.za>
+
+
+ * libntp/msyslog.c:
+ * libntp/gpstolfp.c:
+ Lint cleanup
+ From: Jonathan Stone <jonathan@dsg.stanford.edu>
+
+ * parseutil/dcfd.c: abs() -> l_abs(), time.h (AIX 4.3.2 patches)
+ From: Dana Kaempen <decay@flash.net>
+
+ * ntpd/refclock_oncore.c:
+ * ntpd/refclock_atom.c:
+ * ntpd/ntp_refclock.c:
+ PPS cleanup
+ From: John.Hay@mikom.csir.co.za
+
+ * util/ntptime.c:
+ * ntpdate/ntptimeset.c:
+ * ntpdate/ntpdate.c:
+ * ntpd/refclock_trak.c:
+ * ntpd/refclock_oncore.c:
+ * ntpd/refclock_mx4200.c:
+ * ntpd/refclock_msfees.c:
+ * ntpd/refclock_atom.c:
+ * ntpd/ntp_control.c:
+ * ntpd/ntp_config.c:
+ * configure.in:
+ * configure:
+ PPS, Solaris 7, cleanup patches
+ From: Marc.Brett@westgeo.com
+
+ * ports/winnt/ntptrace/ntptrace.dsp:
+ * ports/winnt/ntpq/ntpq.dsp:
+ * ports/winnt/ntpdc/ntpdc.dsp:
+ * ports/winnt/ntpdate/ntpdate.dsp:
+ * ports/winnt/ntpd/refclock_trimbledc.c:
+ * ports/winnt/ntpd/ntpd.dsp:
+ * ports/winnt/ntpd/ntp_iocompletionport.c:
+ * ports/winnt/ntpd/nt_clockstuff.c:
+ * ports/winnt/libntp/util_clockstuff.c:
+ * ports/winnt/libntp/libntp.dsp:
+ * ports/winnt/libntp/SetSystemTime.c:
+ * ports/winnt/instsrv/instsrv.c:
+ * ports/winnt/include/sys/ioctl.h:
+ * ports/winnt/include/termios.h:
+ * ports/winnt/include/config.h:
+ * ports/winnt/include/clockstuff.h:
+ * ports/winnt/ntp.dsw:
+ * ntpd/refclock_shm.c:
+ * ntpd/refclock_palisade.c:
+ * ntpd/ntpd.c:
+ * ntpd/ntp_timer.c:
+ * ntpd/ntp_refclock.c:
+ * libntp/systime.c:
+ * libntp/machines.c:
+ NT patches
+ From: Sven Dietrich <Sven_Dietrich@trimble.com>
+
+1999-10-15 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_wwvb.c:
+ * ntpd/refclock_usno.c:
+ * ntpd/refclock_ulink.c:
+ * ntpd/refclock_tpro.c:
+ * ntpd/refclock_pst.c:
+ * ntpd/refclock_parse.c:
+ * ntpd/refclock_palisade.c:
+ * ntpd/refclock_oncore.c:
+ * ntpd/refclock_mx4200.c:
+ * ntpd/refclock_msfees.c:
+ * ntpd/refclock_jupiter.c:
+ * ntpd/refclock_irig.c:
+ * ntpd/refclock_heath.c:
+ * ntpd/refclock_chu.c:
+ * ntpd/refclock_atom.c:
+ * ntpd/refclock_as2201.c:
+ * ntpd/refclock_arc.c:
+ * ntpd/refclock_arbiter.c:
+ * ntpd/refclock_acts.c:
+ * ntpd/ntp_refclock.c:
+ * include/ntp_refclock.h:
+ Bunches of fixes.
+ From: Dave Mills <mills@udel.edu>
+
+1999-10-10 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * html/driver16.htm: New version
+ * ntpd/refclock_bancomm.c: New version
+ From: "Cliff, Gary" <gary.cliff@cdott.com>
+ "Ramasivan, Ganesh" <ganesh.ramasivan@cdott.com>
+
+ * ntpd/refclock_ulink.c (ulink_receive): Cleanup
+ (ulink_poll): Cleanup
+ * ntpd/refclock_atom.c (atom_pps): SunOS timespec/timeval cleanup
+ From: Marc.Brett@westgeo.com
+
+ * INSTALL: Point NT folks at ports/winnt
+ Reported by: Stephen Gildea <gildea@intouchsys.com>
+
+ * include/ntp_stdlib.h: Noise abatement
+ * include/ntpd.h: Noise abatement
+ Reported by: "W. David Higgins" <wdh@grouper.ccur.com>
+
+ * configure.in: DECL_STDIO_0 with gcc under solaris.
+
+ * include/l_stdlib.h: DECL_TOUPPER_0
+ DECL_STRERROR_0
+
+ * configure.in: Fix a bunch of implicit declarations for SunOS
+
+ * html/release.htm: cleanup - we still provide MD5.
+ Reported by: Winslowe Lacesso <lacesso@cs.ubc.ca>
+
+1999-10-09 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_oncore.c:
+ * ntpd/refclock_atom.c:
+ * ntpd/ntp_refclock.c:
+ PPS API code updated to the current spec
+ From: Dave Mills
+
+ * configure.in (ac_cv_make_tickadj): Don't make tickadj starting
+ with solaris2.5
+ Requested by: Dave Mills
+
+1999-10-04 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: We might need -lsocket for the -lnsl check.
+
+1999-09-19 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_ulink.c: Typos in C++ comment
+ Reported by: Thomas.Tornblom@Sun.SE
+
+ * configure.in: 4.0.98a
+
+ * ntpd/ntp_config.c (getconfig): Fix typo.
+ From: "David E. Myers" <dem@skyline.rtp.nc.us>
+ From: David Godfrey <dave@delta.demon.co.uk>
+ From: Geoffrey Sisson <geoff@nominet.org.uk>
+
+1999-09-17 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.98
+
+ NetInfo support:
+
+ * config.guess
+ * config.sub
+ Add Mac OS (versions 10 and up).
+
+ * acconfig.h
+ * config.h.in
+ * configure.in
+ Check for NetInfo API; add HAVE_NETINFO macro and friends.
+
+ * include/ntp.h
+ * ntpd/ntp_config.c
+ * ntpdate/ntpdate.c
+ Add support for reading configuration from NetInfo.
+
+ * ntpd/ntp_config.c
+ Get rid of unnecessary eol variable in tokenizer.
+
+ * html/notes.htm
+ * html/ntpd.htm
+ * html/ntpdate.htm
+ Document NetInfo functionality.
+
+ * util/tickadj.c
+ Use HAVE_KVM_OPEN conditional around kvm.h include.
+
+ From: Wilfredo Sanchez <wsanchez@apple.com>
+
+1999-09-15 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * acconfig.h:
+ * config.h.in:
+ * configure.in:
+ * html/driver34.htm:
+ * html/refclock.htm:
+ * include/ntp.h:
+ * libntp/clocktypes.c:
+ * ntpd/Makefile.am:
+ * ntpd/ntp_control.c:
+ * ntpd/refclock_conf.c:
+ * ntpd/refclock_ulink.c:
+ Ultralink driver
+ From: Dave Strout <dstrout@linuxfoundary.com>
+
+1999-09-14 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: ReliantUNIX patches
+ From: Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>
+
+ * ntpd/refclock_atom.c: PPS cleanup
+ * ntpd/ntp_refclock.c (refclock_ioctl): PPS cleanup
+ From: Dave Mills <mills@udel.edu>
+
+ * ntptrace/ntptrace.c (ReceiveBuf): addserver() can return NIL.
+ Reported by: "Alan J. Wylie" <alanw@cyrano.com>
+
+ * libntp/ieee754io.c:
+ * ntpd/ntp_proto.c:
+ * ntpd/ntp_refclock.c:
+ Lint cleanup.
+ From: Marc.Brett@westgeo.com
+
+1999-09-12 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/ntp_refclock.c (refclock_ioctl): Declaration cleanup.
+
+ * ntpd/ntp_proto.c (init_proto): msyslog kern_enable at LOG_DEBUG.
+
+ * ntpd/refclock_atom.c: Add missing declaration.
+
+1999-09-11 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in (ac_cv_make_ntptime): Just look for struct
+ ntptimeval, not timespec or nsec (Solaris 2.7 should get ntptime
+ and it uses msec).
+ (ac_cv_var_oncore_ok): Reorder so it's a "normal" clock
+
+ * configure.in: Solaris Kernel FLL bug fixed in 106541-07
+
+1999-09-02 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.97f
+
+ * ntptrace/ntptrace.c:
+ * ntpdate/ntptimeset.c:
+ * ntpdate/ntptime_config.c:
+ * ntpdate/ntpdate.c:
+ * util/ntptime.c:
+ * parseutil/dcfd.c:
+ * libparse/parsestreams.c:
+ * libparse/parse_conf.c:
+ * libparse/parse.c:
+ * libparse/clk_varitext.c:
+ * libparse/clk_trimtsip.c:
+ * libparse/clk_trimtaip.c:
+ * libparse/clk_schmid.c:
+ * libparse/clk_rcc8000.c:
+ * libparse/clk_rawdcf.c:
+ * libparse/clk_meinberg.c:
+ * libparse/clk_hopf6021.c:
+ * libparse/clk_dcf7000.c:
+ * libparse/clk_computime.c:
+ * libntp/msyslog.c:
+ * libntp/iosignal.c:
+ * libntp/syssignal.c:
+ * adjtimed/adjtimed.c:
+ * ntpd/refclock_shm.c:
+ * ntpd/refclock_parse.c:
+ * ntpd/refclock_palisade.c:
+ * ntpd/refclock_mx4200.c:
+ * ntpd/refclock_jupiter.c:
+ * ntpd/refclock_datum.c:
+ * ntpd/ntpd.c:
+ * ntpd/ntp_util.c:
+ * ntpd/ntp_timer.c:
+ * ntpd/ntp_request.c:
+ * ntpd/ntp_refclock.c:
+ * ntpd/ntp_monitor.c:
+ * ntpd/ntp_loopfilter.c:
+ * ntpd/ntp_io.c:
+ * ntpd/ntp_intres.c:
+ * ntpd/ntp_filegen.c:
+ * include/l_stdlib.h:
+ <errno.h> and errno declaration cleanup.
+
+ * ntpd/map_vme.c: cleanup some spacing.
+
+1999-09-01 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.97e
+
+ * configure.in (ac_cv_struct_sigaction_has_sa_sigaction):
+ * acconfig.h: Ditto
+ * parseutil/dcfd.c (main): Use it.
+ From: HOSAKA Eiichi <HOSAKA.Eiichi@dd.anritsu.co.jp>
+
+1999-08-29 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.97d
+
+ * include/ntp_stdlib.h: Clean up previous NeXT patch.
+ From: Jack Bryans <jbryans@csulb.edu>
+
+ * ntpd/refclock_parse.c: Permit RTS to power a DCF77.
+ From: Carsten Paeth <calle@calle.in-berlin.de>
+
+ * ntpd/refclock_oncore.c (oncore_start): This makes the Oncore run
+ on systems without hardpps().
+ From: Poul-Henning Kamp <phk@freebsd.org>
+
+1999-08-28 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.97c
+
+ * configure.in (ac_cv_make_ntptime): Typo.
+ From: Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>
+
+1999-08-26 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.97b
+
+ * libntp/iosignal.c:
+ * ntpd/ntp_peer.c:
+ * ntpd/refclock_nmea.c:
+ * ntpdate/ntptime_config.c:
+ * ntpdate/ntptimeset.c:
+ AIX, Irix, and SunOS lint cleanup
+ From: Marc.Brett@westgeo.com
+
+1999-08-24 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in 4.0.97a
+
+ * configure.in (AC_OUTPUT): added scripts/Makefile
+ * Makefile.am (SUBDIRS): Added scripts
+ * scripts/Makefile.am: Added
+
+1999-08-23 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_nmea.c: Patches for:
+ Trimble OEM Ace-II receiver. Low cost PCB with single
+ voltage input, external active antenna and two serial
+ ports with either NMEA and ITAPs output. Programmable
+ to be tuned for 'time' accuracy in fixed station config.
+ From: Nick Hibma <nick.hibma@jrc.it>
+
+1999-08-21 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/ntp_config.c: Added listen_to_virtual_ips support (-L flag)
+ * ntpd/ntp_io.c: Ditto
+
+1999-08-19 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/ntp_intres.c (request): Lint cleanup
+ * ntpd/ntp_control.c (ctl_putclock): Ditto
+ * libntp/recvbuff.c (getrecvbufs): Ditto
+ (get_free_recv_buffer): Ditto
+ * libntp/systime.c (adj_systime): Ditto
+
+1999-08-18 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.97
+
+ * libntp/systime.c:
+ * ntpd/ntp_loopfilter.c:
+ * ntpd/ntpd.c:
+ * ports/winnt/libntp/nt_clockstuff.c:
+ From: Sven Dietrich <Sven_Dietrich@trimble.com>
+
+ * README.cvs: Updated.
+
+ * configure.in:
+ * include/ntp_machine.h:
+ * libntp/mexit.c:
+ * ntpd/ntp_config.c:
+ * ntpd/ntp_peer.c:
+ * ntpd/ntp_restrict.c:
+ * ntpd/refclock_arc.c:
+ * ntpdate/ntpdate.c:
+ Irix, SunOS, AIX, lint patches
+ From: Marc.Brett@westgeo.com
+
+ * util/ansi2knr.c: New release (fix for bug reported by Marc Brett)
+ From: "L. Peter Deutsch" <ghost@aladdin.com>
+
+ * include/ntp_stdlib.h: NeXT portability patch
+ From: Jack Bryans <jbryans@csulb.edu>
+
+ * configure.in:
+ * dot.emacs: (cleanup)
+ * ntpdate/Makefile.am:
+ * ntpdate/ntpdate.h:
+ * ntpdate/ntptime_config.c:
+ * ntpdate/ntptimeset.c:
+ ntptimeset patches.
+ From: Jeffrey Hutzelman <jhutz@cmu.edu>
+
+ * ntpd/refclock_parse.c (local_input): ts.l_ui -> ts.fp.l_ui
+
+1999-08-11 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.96p1
+
+ * ntpd/ntpd.c (sys/resource.h): Include this file only #if
+ HAVE_SYS_RESOURCE_H.
+ (set_process_priority): Use TIOCNOTTY only if it is #define'd.
+ * ntpd/refclock_parse.c (STREAM): STREAM does not imply HAVE_TERMIOS.
+ (termios.h, termio.h, fcntl.h): Do not include those files here;
+ they are already included by ntp_refclock.h or ntp_io.h.
+ * ntpd/refclock_leitch.c (sgtty.h, termios.h, termio.h): Do not
+ include those files here; they are already included by ntp_refclock.h.
+ * ntpdate/ntpdate.c (sys/resource.h) : Include that file only #if
+ HAVE_RESOURCE_H.
+ From: Philippe De Muyter <phdm@macqel.be>
+
+ * ntptrace/ntptrace.c (input_handler): Make it a "normal" function
+ definition.
+ Reported by: GIANNI_CATANIA@hp-italy-om6.om.hp.com
+
+ * configure.in: pc-cygwin32 -> pc-cygwin* because of a change in
+ B20.
+ From: Stephen Gildea <gildea@intouchsys.com>
+
+1999-08-09 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.96
+
+ * parseutil/dcfd.c (main): Replace SA_ONSTACK and SV_ONSTACK with
+ HAVE_SIGACTION and HAVE_SIGVEC, respectively. HP-UX provides both
+ of the former but only one of the latter...
+
+1999-08-08 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: Better tests for -lnsl and -lsocket
+ From: Albert Chin-A-Young <china@thewrittenword.com>
+
+ Works for me - handle openlog() and -lgen the same way.
+
+ * Makefile.am (EXTRA_DIST): Add in the y2k notes
+
+ * parseutil/dcfd.c: Renamed drift_comp to accum_drift
+
+ * configure.in: Added MAKE_CHECK_Y2K support; check_y2k needs libparse.
+ * ntpd/Makefile.am (check_PROGRAMS): Use MAKE_CHECK_Y2K
+ * ntpd/Makefile.am (check-local): Added.
+ * parseutil/Makefile.am (check-local): Added.
+
+ * include/ntp.h: Y2KFixes
+ * libparse/parse.c: Ditto
+ * ntpd/Makefile.am (check_PROGRAMS): Ditto
+ * ntpd/refclock_acts.c: Ditto
+ * ntpd/refclock_arc.c (arc_receive): Ditto
+ * ntpd/refclock_heath.c: Ditto
+ * ntpd/refclock_hpgps.c: Ditto
+ * parseutil/Makefile.am (check-local): Ditto
+ * parseutil/dcfd.c (check_y2k): Ditto
+ * NOTES.y2kfixes: Ditto
+ * readme.y2kfixes: Ditto
+ * results.y2kfixes: Ditto
+ * ntpd/check_y2k.c: Ditto
+ From: y2k@y2k.labs.att.com
+
+1999-08-07 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: Look for sys/ppstime.h.
+
+1999-07-31 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/ntp_io.c (create_sockets): Typo.
+ From: Doug Wells <dmw@contek.com>
+
+1999-07-29 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in (ac_cv_struct_ntptimeval): Explicitly look for
+ struct ntptimeval.
+ (ac_cv_var_kernel_pll): Require struct ntptimeval.
+ Linux. Grrr.
+ Reported by: Ronald Kuetemeier <ronaldk@smginc.com>
+
+1999-07-27 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.95
+
+ * ports/winnt: New release
+ From: Sven Dietrich <Sven_Dietrich@trimble.com>
+
+1999-07-26 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * libntp/machines.c (ntp_set_tod): Bugfix
+ From: Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>
+
+1999-07-25 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.94b
+
+ * acconfig.h:
+ * configure.in:
+ * libparse/Makefile.am:
+ * libparse/parse_conf.c:
+ * libparse/clk_varitext.c:
+ * libparse/kclk_varitext.c:
+ * ntpd/refclock_parse.c: VARITEXT parse clock
+ * ntpdate/ntpdate.c: bugfix
+ From: Tony McConnell <tonym@datel-technology.co.uk>
+
+1999-07-24 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * include/ntp_syscall.h (ntp_gettime): Make it static
+ * configure.in: Added AC_C_INLINE
+ Reported by: "Charles C. Fu" <ccwf@klab.caltech.edu>
+
+1999-07-23 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * include/ntpd.h:
+ * libntp/machines.c:
+ * libntp/systime.c:
+ * ntpd/ntp_config.c:
+ * ntpd/ntp_filegen.c:
+ * ntpd/ntp_io.c:
+ * ntpd/ntp_proto.c:
+ * ntpd/ntp_timer.c:
+ * ntpdate/ntpdate.c: Windows NT port cleanup
+ From: Sven Dietrich <Sven_Dietrich@trimble.com>
+
+1999-07-22 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * libntp/authkeys.c:
+ * libntp/ieee754io.c:
+ * libntp/iosignal.c:
+ * libntp/machines.c:
+ * libntp/mexit.c:
+ * libntp/recvbuff.c:
+ * ntpd/ntp_filegen.c:
+ * ntpd/ntp_loopfilter.c:
+ * ntpd/ntp_request.c:
+ * ntpd/ntp_timer.c:
+ * ntpd/ntpd.c: Compile/lint cleanup
+ From: Allen Smith <easmith@beatrice.rutgers.edu>
+
+1999-07-21 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.94a
+
+ * configure.in (ac_cv_make_ntptime): Add tv_nsec check.
+
+ * include/Makefile.am (noinst_HEADERS): Forgot ntp_syscall.h
+ From: John.Hay@mikom.csir.co.za
+
+ * configure.in: 4.0.94
+
+ * Makefile.am (SUBDIRS): librsaref
+ (dist-hook): Lose CVS subdirs in the distribution tarball
+
+ * include/Makefile.am (noinst_HEADERS): Added iosignal.h, recvbuff.h
+
+ * Makefile.am (dist-hook): Don't call dos2unix anymore
+
+1999-07-20 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * acconfig.h:
+ * util/ntptime.c: FreeBSD nano patches
+ From: Per Hedeland <per@erix.ericsson.se> and
+ Allen Smith <easmith@beatrice.rutgers.edu>
+
+ * include/ntp.h:
+ include/ntp_fp.h:
+ include/ntp_io.h:
+ include/ntp_machine.h:
+ include/ntp_refclock.h:
+ include/ntp_stdlib.h:
+ include/ntpd.h:
+ libntp/Makefile.am:
+ libntp/emalloc.c:
+ libntp/machines.c:
+ libntp/mexit.c:
+ libntp/msyslog.c:
+ libntp/statestr.c:
+ libntp/syssignal.c:
+ libntp/systime.c:
+ libparse/parse.c:
+ libparse/parse_conf.c:
+ ntpd/ntp_control.c:
+ ntpd/ntp_intres.c:
+ ntpd/ntp_io.c:
+ ntpd/ntp_proto.c:
+ ntpd/ntp_refclock.c:
+ ntpd/ntp_request.c:
+ ntpd/ntp_timer.c:
+ ntpd/ntp_util.c:
+ ntpd/ntpd.c:
+ ntpd/refclock_nmea.c:
+ ntpd/refclock_palisade.c:
+ ntpd/refclock_palisade.h:
+ ntpd/refclock_shm.c:
+ ntpdate/ntpdate.c:
+ ntptrace/ntptrace.c: Cleanup
+ * libntp/recvbuff.c:
+ libntp/iosignal.c:
+ include/iosignal.h:
+ include/recvbuff.h: Added
+ From: Sven_Dietrich@Trimble.COM
+
+ * README: Add README.cvs
+
+ * configure.in (ac_cv_var_struct_ntptime_val_timespec): Typo.
+ From: John Hay <jhay@mikom.csir.co.za>
+
+1999-07-19 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * Makefile.am (EXTRA_DIST): Lose ntpmak; "build" does a better job.
+
+ * ntpq/Makefile.am (version.o): Use mkver
+ * ntptrace/Makefile.am (version.o): Ditto
+ * ntpdate/Makefile.am (version.o): Ditto
+ * ntpd/Makefile.am (version.o): Ditto
+ * ntpdc/Makefile.am (version.o): Ditto
+
+ * configure.in (AC_OUTPUT): scripts/mkver
+
+ * scripts/mkver.in: Created. Note RSAREF in the version string
+
+1999-07-18 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * README.des: Updated.
+
+ * ntpq/Makefile.am (LDADD): Add LIBRSAREF
+
+ * ntpdc/Makefile.am (LDADD): Add LIBRSAREF
+
+ * ntpdate/Makefile.am (LDADD): Add LIBRSAREF
+
+ * ntpd/Makefile.am (LDADD): Add LIBRSAREF
+
+ * configure.in (AC_OUTPUT): Added librsaref/Makefile
+ Added tests for making/using librsaref.a
+ Lose old DES stuff; AC_DEFINE(DES) if we find the rsaref stuff.
+
+1999-07-11 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_trak.c (trak_receive): disambiguate expression.
+ At least now it is unambiguous. It may even still be correct.
+ Reported by: Tom Smith <smith@cag.lkg.dec.com>
+
+ * ntp_update (UPDATE_OPTIONS): Typo.
+
+1999-07-07 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntp_update: Check out copyright.htm before COPYRIGHT
+
+ * ntpd/ntp_config.c: Support for PPS assert/clear/hardpps
+ * ntpd/ntp_refclock.c (refclock_ioctl): Ditto
+ (refclock_gtlin): Ditto
+ * html/clockopt.htm: Document.
+ From: John Hay <jhay@mikom.csir.co.za>
+
+ * html/monopt.htm: We have four types of files now
+ * ntpd/refclock_oncore.c: If debug is on, tell when
+ we are waiting for a valid almanac
+ From: Poul-Henning Kamp <phk@critter.freebsd.dk>
+
+ * include/ntp_machine.h (HAVE_TERMIOS): STREAMS does not imply
+ HAVE_TERMIOS !!!
+ * include/parse.h (timercmp): Macro defined if needed.
+ * ntpd/ntp_config.c (SIGCHLD): Macro defined as SIGCLD if needed.
+ (sys/wait.h): File included only if HAVE_SYS_WAIT_H.
+ * configure.in (sys/wait.h): File added to AC_CHECK_HEADERS list.
+ From: Philippe De Muyter <phdm@macqel.be>
+
+1999-06-23 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_irig.c (irig_debug): NetBSD patches
+ From: Frederick Bruckman <fb@enteract.com>
+
+ * util/ntptime.c (main): ntx.freq bugfix (-f option)
+ From: Frederick Bruckman <fb@enteract.com>
+
+1999-06-22 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: Fix typo with DECL_H_ERRNO test
+
+ * ntpd/ntp_loopfilter.c: Lose syscall decl, it's handled in
+ l_stdlib.h now.
+ * ntpd/ntp_request.c: Ditto
+ * util/ntptime.c: Ditto
+
+Mon May 31 18:49:49 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * ntpd/ntp_proto.c (proto_config): Don't set sys_bclient on
+ PROTO_MULTICAST_ADD, only caller can decide; remove wrong set on
+ PROTO_MULTICAST_DEL.
+
+Mon May 31 18:49:49 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * ntpd/refclock_parse.c (stream_receive): Cast size_t to int to
+ match format.
+ (local_receive): Likewise.
+ (trimbletaip_event): Likewise.
+ (stream_receive): Cast struct timeval members to long to match
+ format.
+ (local_receive): Likewise.
+
+ * ntpd/ntp_util.c (stats_config): Cast size_t to int to match
+ format.
+
+ * libparse/clk_rawdcf.c (cvt_rawdcf): Cast ptr difference to int
+ to match format.
+ * ntpd/refclock_parse.c (gps16x_poll): Likewise.
+
+ * ntpd/ntp_filegen.c (filegen_open): Use long format, cast arg to
+ match.
+
+ * ntpd/refclock_parse.c (list_err): Use long format to match arg.
+ (parse_statistics): Likewise.
+ (gps16x_message): Likewise.
+ (cvt_ts): Use long format, cast args to match.
+ (parse_start): Add missing arg.
+ (gps16x_message): Swap args to match format.
+
+ * ntpd/ntpd.c (ntpdmain): Cast uid to long, adapt format.
+
+ * ntpd/ntp_intres.c (readconf): Use long format to match arg.
+ * ntpd/ntp_io.c (getrecvbufs): Likewise.
+ * ntpd/ntp_proto.c (default_get_precision): Likewise.
+
+ * ntpd/ntp_loopfilter.c (local_clock): Cast clock_panic to int to
+ match format.
+
+ * ntpd/ntp_io.c (io_multicast_add): Print s_addr member, not
+ struct in_addr, to match format.
+
+ * include/ntp_stdlib.h: Declare msyslog() as printf-like for gcc
+ format checking.
+
+Fri May 28 16:39:35 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * ntpdc/ntpdc_ops.c (iostats): Align timereset line.
+
+ * ntpq/ntpq_ops.c (doopeers): Properly align header.
+
+ * ntpdc/ntpdc_ops.c (debug): Removed declaration, already in
+ ntp_stdlib.h.
+ * ntpq/ntpq_ops.c: Likewise.
+
+ * ntpdate/ntpdate.c (debug): Declare volatile to match
+ ntp_stdlib.h.
+ * ntpdc/ntpdc.c, ntpq/ntpq.c, ntptrace/ntptrace.c, util/tickadj.c,
+ util/ntptime.c: Likewise.
+
+ * include/parse.h (debug): Don't declare to avoid clash with
+ ntp_stdlib.h.
+
+ * include/Makefile.am (noinst_HEADERS): Add new ntp_syscall.h.
+
+ * configure.in: Also check for -lrt for POSIX.1c functions.
+
+Wed May 26 21:03:30 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * configure.in: Removed -Wwrite-strings from CFLAGS.
+
+ * ntpdc/ntpdc.c (help): Remove superfluous cast.
+ * ntpq/ntpq.c (help): Likewise.
+
+Tue May 25 18:00:49 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * ntpq/ntpq_ops.c (struct varlist): name cannot be const char *
+ since it may be malloc'ed.
+
+ * ntpdc/ntpdc.c (sendrequest): Declare pass as const char *, don't
+ loose const in cast.
+ * ntpq/ntpq.c (sendrequest): Likewise.
+
+ * ntpd/ntp_control.c (ctl_getitem): Remove superfluous cast.
+ * include/ntpd.h (struct ctl_var): text cannot be const char *
+ since it's malloc'ed.
+
+1999-06-22 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * include/l_stdlib.h: Don't include <netinet/in.h>, add forward
+ declaration of struct in_addr instead.
+ From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ Patch:
+
+ * include/l_stdlib.h: Fixed syscall() declaration.
+ * configure.in: Updated test to match.
+
+ * configure.in: Check if we need to declare errno and h_errno.
+ Check for <resolv.h> which may provide a h_errno declaration and
+ <arpa/nameserv.h> which the latter needs.
+ * acconfig.h: Provide the necessary templates.
+
+ * include/ntp_syscall.h: New file, hides various implementations
+ of ntp_adjtime() and ntp_gettime() syscalls.
+ * ntpd/ntp_loopfilter.c: Use it.
+ * ntpd/ntp_request.c: Likewise.
+ * ntpd/refclock_local.c: Likewise.
+ * util/ntptime.c: Likewise.
+
+ * include/l_stdlib.h: Include <netinet/in.h>, declare inet_ntoa if
+ necessary.
+ Moved syscall() declaration here.
+
+ * kernel/sys/parsestreams.h: Include <sys/termios.h> for it's
+ definition of struct ppsclockev.
+ Include <sys/ppsclock.h> unconditionally for definition of
+ CIOGETEV via TIOCGPPSEV.
+ * kernel/sys/ppsclock.h: Protect struct ppsclockev from
+ redefinition.
+
+ * include/ntp_refclock.h: Protect it from multiple inclusion.
+ * include/ntp_fp.h: Likewise.
+ * include/ntp.h: Likewise.
+
+ * include/ntpd.h: Include ntp_refclock.h for MAXDIAL declaration.
+ * libntp/authkeys.c: Include ntpd.h for current_time declaration.
+
+ * include/ntpd.h (getauthkeys, auth_agekeys, rereadkeys): Moved
+ prototypes to ntp_stdlib.h
+
+ * include/ntp_stdlib.h: Declare variables exported by libntp.
+ * include/ntpd.h: Likewise for ntpd.
+
+ * libntp/authkeys.c (key_hash, authnokey, authfreekeys,
+ cache_flags): Made static.
+ * libntp/systime.c (tvu_maxslew, tsf_maxslew, sys_clock_offset,
+ sys_residual): Likewise.
+ * ntpd/ntp_intres.c (confentries): Likewise.
+ * ntpd/ntp_loopfilter.c (clock_offset, clock_panic): Likewise.
+ (pll_nano): Likewise. Removed duplicate definition.
+ * ntpd/ntp_peer.c (peer_free, current_association_ID,
+ assocpeer_calls, init_peer_starttime): Likewise.
+ * ntpd/ntp_proto.c (sys_offset, sys_authdly): Likewise.
+ * ntpd/ntp_request.c (numrequests, numresppkts, errorcounter):
+ Likewise.
+ * ntpd/ntp_restrict.c (res_calls, res_found, res_not_found,
+ res_timereset, res_limited_refcnt): Likewise.
+ * ntpd/ntpd.c (was_alarmed, worker_thread): Likewise.
+
+ * ntpq/ntpq_ops.c: Moved declaration of external variable from
+ ntpq.c to file scope.
+
+ * adjtimed/adjtimed.c: Moved declarations of external variables to
+ ntpd.h and ntp_stdlib.h.
+ * clockstuff/propdelay.c: Likewise.
+ * libntp/a_md5encrypt.c, libntp/authencrypt.c, libntp/authkeys.c,
+ libntp/mfp_mul.c, libntp/msyslog.c, libntp/systime.c: Likewise.
+ * ntpd/ntp_config.c, ntpd/ntp_control.c, ntpd/ntp_filegen.c,
+ ntpd/ntp_intres.c, ntpd/ntp_io.c, ntpd/ntp_loopfilter.c,
+ ntpd/ntp_monitor.c, ntpd/ntp_peer.c, ntpd/ntp_proto.c,
+ ntpd/ntp_refclock.c, ntpd/ntp_request.c, ntpd/ntp_restrict.c,
+ ntpd/ntp_timer.c, ntpd/ntp_util.c, ntpd/ntpd.c,
+ ntpd/refclock_acts.c, ntpd/refclock_arbiter.c, ntpd/refclock_arc.c,
+ ntpd/refclock_as2201.c, ntpd/refclock_atom.c,
+ ntpd/refclock_bancomm.c, ntpd/refclock_chronolog.c,
+ ntpd/refclock_chu.c, ntpd/refclock_datum.c,
+ ntpd/refclock_dumbclock.c, ntpd/refclock_gpsvme.c,
+ ntpd/refclock_heath.c, ntpd/refclock_hpgps.c, ntpd/refclock_irig.c,
+ ntpd/refclock_jupiter.c, ntpd/refclock_leitch.c,
+ ntpd/refclock_local.c, ntpd/refclock_msfees.c,
+ ntpd/refclock_mx4200.c, ntpd/refclock_nmea.c,
+ ntpd/refclock_oncore.c, ntpd/refclock_palisade.h,
+ ntpd/refclock_parse.c, ntpd/refclock_pst.c, ntpd/refclock_shm.c,
+ ntpd/refclock_tpro.c, ntpd/refclock_trak.c, ntpd/refclock_true.c,
+ ntpd/refclock_usno.c, ntpd/refclock_wwvb.c: Likewise.
+ * ntpdate/ntpdate.c: Likewise.
+ * ntpdc/ntpdc.c, ntpdc/ntpdc_ops.c: Likewise.
+ * ntpq/ntpq.c: Likewise.
+ * ntptrace/ntptrace.c: Likewise.
+ * util/ntptime.c, til/tickadj.c: Likewise.
+ From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * include/ntp_machine.h: Removed superfluous yy/mm/dd comments.
+ * include/ntpd.h: Likewise.
+ * libntp/authencrypt.c: Likewise.
+ * libntp/a_md5encrypt.c: Likewise.
+ * libntp/caljulian.c: Likewise.
+ * libntp/ymd2yd.c: Likewise.
+ * libntp/syssignal.c: Likewise.
+ * libntp/ymd2yd.c: Likewise.
+ * ntpd/ntp_control.c: Likewise.
+ * ntpd/ntp_io.c: Likewise.
+ * ntpd/ntp_timer.c: Likewise.
+ * ntpdate/ntpdate.c: Likewise.
+ * ntpq/ntpq_ops.c: Likewise.
+ * ntpd/ntp_peer.c (findpeer): Wrap debug output in DEBUG/debug.
+ From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * dot.emacs: Removed wrong indentation of substatements.
+ Wrap in c-style.
+ From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * ntpd/refclock_palisade.c: Patches from Marc Brett
+ * ntpd/refclock_palisade.h: Ditto.
+ * util/hist.c: Ditto.
+
+Tue Jun 1 00:40:04 1999 Harlan Stenn <stenn@pogo.udel.edu>
+
+ * build: mips-dec-ultrix4.4 hates "set -e"
+
+ * flock-build: Created
+
+ * build: added -l option
+
+Mon May 31 20:28:40 1999 Harlan Stenn <stenn@pogo.udel.edu>
+
+ * README: Removed auto{make,conf}.patch files
+
+Tue May 25 01:20:53 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * Makefile.am ($(srcdir)/COPYRIGHT): Added
+ (EXTRA_DIST): Remove auto*.patches
+
+Thu May 20 01:03:00 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * Makefile.am (dist-hook): Call dos2unix on the .htm files
+
+ * ntpd/refclock_palisade.h: Clean up declarations.
+
+ * configure.in (ac_cv_struct_ntptimeval_timespec): Added.
+ (ac_cv_make_ntptime): Only if ntptimeval does not use timespec.
+
+ * util/tickadj.c: Linux Patches
+ From: Reg Clemens <reg@dwf.com>
+
+Wed May 19 01:18:24 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.93a
+
+ * ntpd/refclock_palisade.h: Restore some lost patches
+ From: Kamal A Mostafa <kamal@whence.com>
+
+Sun May 16 13:18:32 1999 Philippe De Muyter <phdm@macqel.be>
+
+ * libparse/clk_wharton.c (cvt_wharton_400a, inp_wharton_400a): Expect
+ serial output format number 1, not 5.
+ (clock_wharton_400a) : Likewise.
+ * ntpd/refclock_parse.c (parse_clockinfo): For Wharton 400a clock,
+ do not poll, but expect a message every second.
+ * html/parsedata.htm : Entry added for Wharton 400a clock.
+ * html/driver8.htm : Entry fixed for Wharton 400a clock.
+
+Sun May 16 02:59:46 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.93
+
+Sat May 15 18:53:47 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in (ntp_refclock): ONCORE requires PPSAPI, CIOGETEV,
+ or TIOCGPPSEV.
+ Reported by: Reg Clemens <reg@dwf.com>
+
+Fri May 14 23:58:35 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.92h2
+
+ * configure.in (ac_cv_make_ntptime): Not under Linux. Yes, it
+ works for some people. We're tired of the complaints from the
+ others.
+
+Fri May 14 18:58:59 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * libntp/authreadkeys.c (authreadkeys): Reject autokey keys.
+ Include ntp.h for NTP_MAXKEY definition, ntp_fp.h for types used
+ in ntp.h.
+
+Wed May 12 23:02:22 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * libntp/authkeys.c (auth_delkeys): Don't remove autokey keys,
+ leave info on KEY_TRUSTED flag alone.
+ Include ntp.h for NTP_MAXKEY definition.
+
+Thu May 13 02:19:02 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.92h1
+
+ * configure.in: patch for ReliantUNIX
+ From: Andrej Borsenkow <borsenkow.msk@sni.de>
+
+ * ntpd/refclock_oncore.c: Patches
+ From: Reg Clemens <reg@dwf.com>
+
+Thu Apr 29 14:01:04 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * html/*.htm: Remove unnecessary &nbsp;. Cleanup <pre></pre>
+ sections.
+
+ * configure.in: Properly align configure --help output.
+ * html/config.htm: Include this version, removing Netscape &nbsp;
+ cruft.
+
+Wed Apr 28 15:08:55 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * kernel/sys/parsestreams.h: Only include <sys/ppsclock.h> if
+ struct ppsclockev is missing from system headers.
+
+ * util/tickadj.c (getoffsets): Define kernels[] only if used.
+ (openfile): Rename fd to avoid shadowing global fd.
+ (writevar): Likewise.
+ (readvar): Likewise.
+
+ * parseutil/dcfd.c (read_drift): drift_file is const char *.
+ (update_drift): Likewise.
+ (adjust_clock): Likewise.
+ (main): Likewise.
+
+ * ntpd/refclock_parse.c (gps16x_poll): Adapt format to match
+ parse->localstate type.
+
+ * ntpd/ntp_refclock.c (refclock_gtlin): Only define gotit label
+ if used.
+
+ * include/l_stdlib.h (openlog, syslog): char * args are const.
+
+ * configure.in (*-*-osf4*): Enable declaration of stime().
+
+ * ntpd/refclock_oncore.c (oncore_msg_any): Cast args to long to
+ match prototype.
+ (oncore_msg_En): Likewise.
+
+ * include/ntp_refclock.h (struct refclockstat): Declare p_lastcode
+ as const char *.
+
+ * ntpq/ntpq_ops.c (struct varlist): Define name as const.
+
+ * ntpdc/ntpdc.c (tokenize): Define cp as const char *, remove
+ wrong cast instead.
+
+ * ntpd/ntp_util.c (record_clock_stats): Make text arg const.
+ * include/ntpd.h (record_clock_stats): Adapt declaration.
+ * ntpd/refclock_oncore.c (oncore_start): Removed superfluous casts.
+ (oncore_msg_Cf): Likewise.
+ (oncore_msg_Fa): Likewise.
+ (oncore_msg_Cj): Likewise.
+ (oncore_msg_Ea): Likewise.
+ (oncore_msg_Bj): Likewise.
+
+ * configure.in (*-*-solaris2.4): Enable declarations of
+ gettimeofday(), settimeofday(); they are `protected' by
+ __cplusplus in <sys/time.h>.
+
+Tue Apr 27 21:14:47 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * scripts/summary.pl: Use . as default statsdir.
+ (do_loop): Accept new loopstats format with additional sys_error
+ and clock_stability fields.
+ (do_peer): Accept new peerstats format with additional skew field.
+
+Mon Apr 26 01:50:38 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * Upgraded automake (1.4a) and autoconf (2.14.1)
+
+ * configure.in (ac_refclock_irig): We no longer need stropts.h.
+ * ntpd/refclock_irig.c: Ditto
+
+Mon Apr 26 17:33:33 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * configure.in (*-*-irix6*): Don't pass MIPSpro cc-only flag -n32
+ to gcc.
+
+Thu Apr 22 15:06:40 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * ntpd/ntp_config.c (getconfig): IN_CLASSD() expects address in
+ host byte order, but struct sockaddr_in.s_addr is in network byte
+ order.
+ * ntpd/ntp_io.c (io_multicast_del): Likewise.
+
+Sat Apr 24 01:00:53 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.92h
+
+ * ntptrace/ntptrace.c: -m maxhost patch
+ From: "R. Gary Cutbill" <rgary@chrysalis.com>
+
+ * util/ntptime.c: Patches.
+ From: Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>
+
+ * html/accopt.htm, html/assoc.htm, html/authopt.htm,
+ html/biblio.htm, html/build.htm, html/clockopt.htm,
+ html/confopt.htm, html/copyright.htm, html/debug.htm,
+ html/exec.htm, html/extern.htm, html/hints.htm, html/index.htm,
+ html/kern.htm, html/miscopt.htm, html/monopt.htm, html/notes.htm,
+ html/ntpd.htm, html/ntpdate.htm, html/ntpdc.htm, html/ntpq.htm,
+ html/ntptime.htm, html/ntptrace.htm, html/patches.htm,
+ html/porting.htm, html/pps.htm, html/rdebug.htm,
+ html/refclock.htm, html/release.htm, html/tickadj.htm,
+ html/hints/solaris.html: Fixed many typos and problems.
+ * acconfig.h (DECL_CFSETISPEED_0, DECL_MRAND48_0, DECL_NLIST_0,
+ DECL_SRAND48_0, DECL_STIME_0): New templates.
+ * include/l_stdlib.h: Include termios.h to get definition of
+ speed_t.
+ (cfsetispeed, cfsetospeed, mrand48, nlist, srand48, stime): New
+ declarations.
+ (openlog): Declare 2- or 3-argument form.
+ * configure.in: Enable declarations of functions missing from
+ Ultrix V4.3 system headers.
+ * ntpd/refclock_oncore.c: Include <sys/types.h>, Ultrix V4.3
+ <sys/stat.h> needs it for dev_t.
+ From: Rainer Orth <ro@techfak.uni-bielefeld.de>
+
+ * ntpdc/ntpdc_ops.c: Reality checks.
+
+ * configure.in: netbsd has stubs for the timer_* stuff and doesn't
+ support PPSAPI. IRIG requires <stropts.h> .
+ From: Frederick Bruckman <fb@enteract.com>
+
+ * ntpdc/ntpdc_ops.c: (kerninfo) Report in seconds regardless of
+ kernel precision. Report kernel flags as text.
+ From: Poul-Henning Kamp <phk@critter.freebsd.dk>
+
+Sun Apr 18 14:26:51 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.92g
+
+ * ntpd/ntp_refclock.c (refclock_ioctl): We don't want
+ PPS_HARDPPSONASSERT by default.
+ * ntpd/refclock_oncore.c: Prefer timepps.h over sys/timepps.h
+ From: Poul-Henning Kamp <phk@freebsd.org>
+
+Tue Apr 13 17:32:35 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.92f
+
+ * ntpd/ntp_refclock.c (refclock_open): VMIN should be 1, not 0
+ From: Reg Clemens <reg@dwf.com>
+
+Sun Apr 11 18:26:44 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_mx4200.c: Patches/improvements
+ * ntpd/ntpd.c (set_process_priority): Lint
+ From: Marc.Brett@westgeo.com
+
+ * util/ntptime.c: Lint, bit definition cleanup
+ From: Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>
+
+Wed Apr 7 03:02:23 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_oncore.c: Use timepps.h or sys/timepps.h
+ * configure.in: Look for either timepps.h or sys/timepps.h
+ From: Poul-Henning Kamp <phk@critter.freebsd.dk>
+
+ * ntpd/ntp_io.c (create_sockets): Don't warn about ENXIO.
+ (Several places)
+ From: Andrej Borsenkow <borsenkow.msk@sni.de>
+
+ * libntp/mfp_mul.c (mfp_mul): Lint.
+ Marc.Brett@westgeo.com
+
+Sun Apr 4 03:23:53 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.92e
+ Dave redesigned the clock state machine.
+
+1999-02-28 Frank Kardel <kardel@acm.org>
+
+ * parseutil/dcfd.c: added DCF77 module powersetup
+
+ * ntpd/refclock_parse.c (parse_control): using gmprettydate instead of prettydate()
+ (mk_utcinfo): new function for formatting GPS derived UTC information
+ (gps16x_message): changed to use mk_utcinfo()
+ (trimbletsip_message): changed to use mk_utcinfo()
+ ignoring position information in unsynchronized mode
+ (parse_start): augument linux support for optional ASYNC_LOW_LATENCY
+
+ * ntpd/ntp_control.c (ctl_putclock): cleanup of end of buffer handling
+
+ * libparse/parse.c (timepacket): removed unnecessary code
+
+ * libparse/clk_trimtsip.c (struct trimble): new member t_utcknown
+ (cvt_trimtsip): fixed status monitoring, bad receiver states are
+ now recognized
+
+ * libntp/prettydate.c (gmprettydate): new function for format date
+ and time with respect to UTC
+
+ * libntp/gpstolfp.c (GPSWRAP): update GPS rollover to 990 weeks
+
+ * include/trimble.h (CMD_RUTCPARAM): control variable name unification
+
+ * include/ntp_fp.h: added prototype for gmprettydate()
+
+Sat Feb 27 00:03:16 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * libntp/systime.c: definition
+ * ntpd/ntp_proto.c: sco5_oldclock declaration
+ * configure.in: SCO5_CLOCK for *-*-sco3.2v5*
+ * util/tickadj.c (main): SCO5_OLDCLOCK -> SCO5_CLOCK
+ From: Kees Hendrikse <kees@echelon.nl>
+
+ * ntpd/ntp_config.c (getconfig): Indentation cleanup
+ Deal with 'P' case better
+ * ntpd/ntpd.c: Declare set_process_priority()
+ * ntpd/refclock_dumbclock.c: Lint cleanup
+ From: Marc.Brett@westgeo.com
+
+Wed Feb 24 10:22:51 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.92d
+
+ * configure.in: Dave says we can't enable PARSE clocks by default.
+ Also, Solaris 2.7 still has its kernel bug - disable kernel FLL
+ there.
+ Reported by: Dave Mills <dlm@udel.edu>
+
+Tue Feb 23 23:37:44 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * libparse/Makefile.am (parsesolaris.o): Devious hack to deal
+ with bug in sys/systm.h .
+ Suggested by: Chaim Frenkel <chaimf@pobox.com>
+
+Tue Feb 23 20:46:31 1999 Frank Kardel <kardel@acm.org>
+
+ * ntpd/refclock_parse.c: fixed #endifs
+ (stream_receive): fixed formats
+
+Mon Feb 22 00:35:06 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.92c
+
+ * ntpd/refclock_chronolog.c: Lint
+ * ntpd/refclock_dumbclock.c: Ditto
+ * ntpd/refclock_oncore.c: Ditto
+ From: Marc.Brett@westgeo.com
+
+ * ntpd/refclock_oncore.c (oncore_msg_any): Call GETTIMEOFDAY, not
+ gettimeofday().
+ From: david.higgins@mail.ccur.com
+
+ * configure.in (MCAST): Not in i386-sequent-sysv4
+ Reported by: Joseph Geter <joe.geter@somills.com>
+
+ * util/ntptime.c: Linux cleanup.
+ From: Reg Clemens <reg@dwf.com>
+
+ * configure.in: Rename SCO5_OLDCLOCK to SCO5_CLOCK
+ * acconfig.h: Ditto
+
+ * ntpd/ntp_proto.c: SCO5_CLOCK stuff
+ (init_proto): Use the SCO5_CLOCK stuff
+ * libntp/systime.c: SCO5_CLOCK stuff
+ (get_systime): Use the SCO5_CLOCK stuff
+ (adj_systime): Use the SCO5_CLOCK stuff
+ From: Kees Hendrikse <kees@echelon.nl>
+
+ * ntpd/ntp_config.c: Added -P option and associated baggage.
+ (getstartup): Update help text
+ (getconfig): Process -P option
+ (getconfig): Update help text
+ * ntpd/ntpd.c (set_process_priority): Created.
+ (service_main): remove process priority stuff - we want to do at
+ after we start up the resolver, so call set_process_priority()
+ after getconfig().
+ From: Kamal A Mostafa <kamal@whence.com>
+
+1999-02-21 Frank Kardel <kardel@acm.org>
+
+ * ntpd/ntp_util.c (hourly_stats): removed unused variable
+
+ * libntp/ieee754io.c: renamed index to fieldindex to avoid index() name clash
+
+ * ntpd/refclock_parse.c (parse_start): add initialization for Linux PPSkit
+
+Sun Feb 21 17:53:33 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/ntp_io.c (create_sockets): Skip interfaces that are really
+ just aliases.
+ From: "Erik R. Leo" <erikl@sover.net>
+
+ * configure.in: 4.0.92b
+
+ * ntpd/ntpd.c (service_main): Check for an error return from
+ sched_get_priority_max().
+
+Wed Feb 17 03:48:47 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.92a
+
+ * configure.in: configure.in requires autoconf 2.13 or later.
+ Reported by Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>
+
+Wed Feb 17 00:12:11 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * acconfig.h: TERMIOS_NEEDS__SVID3
+ * configure.in: Ditto
+ * ntpd/refclock_palisade.h: Ditto
+ * include/ntp_refclock.h: Ditto
+ * ntpd/ntpd.c (service_main): We want sched_get_priority_max().
+ From: Kamal A Mostafa <kamal@whence.com>
+
+ * ntpd/ntp_refclock.c (refclock_open): Zero the entire c_cc[] array.
+ From: Reg Clemens <reg@dwf.com>
+
+Tue Feb 16 23:37:49 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * Updated ansi2knr
+ Reported by: Marc Brett
+
+Mon Feb 15 02:55:28 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.92
+
+ * ntpd/ntp_refclock.c: Added refclock_chronolog and
+ refclock_dumbclock.
+ From: Robert McMillin <rlm@syseca-us.com>
+
+Sun Feb 14 15:57:53 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * dropped SCO3 support #defines.
+ * changed SCO5_TICKADJ #define to SCO5_OLDCLOCK
+ * Added code in libntp/systime.c to accumulate changes until a whole
+ tick can be added or dropped. Adjusted gettimeofday() output
+ to include the contents of the accumulator.
+ * cleaned up util/tickadj.c; tickadj -As now does the right thing.
+ From: Kees Hendrikse <kees@echelon.nl>
+
+ * ntpq/ntpq.c: Rename delay() to auth_delay()
+ Reported by: Andrej Borsenkow <borsenkow.msk@sni.de>
+
+ * ntpd/refclock_palisade.h: Cleanup.
+ From: Marc.Brett@westgeo.com
+
+ * ntpd/ntp_refclock.c (refclock_ioctl): Typo.
+ From: Reg Clemens <reg@dwf.com>
+
+ * ntpd/ntp_io.c (create_sockets): Only bind a given network once.
+ From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
+
+Sat Jan 30 11:48:37 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.91f
+
+Thu Jan 28 22:58:40 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_parse.c (CLK_REALTYPE): We really want ttl, not hmode.
+ * ntpd/ntp_config.c (getconfig): "mode" really should update the
+ ttl member, not the hmode member.
+
+ * ntpd/refclock_local.c: More offset cleanup from Dave.
+
+Thu Jan 28 00:15:20 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.91e
+
+ * ntpd/refclock_local.c: Bugfix.
+ From: Dave Mills
+
+ * ntpd/refclock_palisade.c: Lint/IRIX portability cleanup
+ * ntpd/refclock_palisade.h: Re-enable the declaration of float()
+ * ntpd/ntp_io.c (create_sockets): Initialize size to 0
+ From: Marc.Brett@westgeo.com
+
+ * ntpd/refclock_parse.c (CLK_REALTYPE): Use hmode, not ttl.
+ * configure.in (ac_cv_var_no_parenb_ignpar): Not under Linux.
+ Reported by: Thomas Quinot <thomas@Cuivre.FR.EU.ORG>
+
+ * ntpdc/ntpdc.c (my_delay): Renamed, from delay.
+ Reported by: Andrej Borsenkow <borsenkow.msk@sni.de>
+
+Tue Jan 26 00:56:10 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.91d
+
+ * ntpq/ntpq.c: Y2K patches
+ From: Marc.Brett@westgeo.com
+
+ * html/driver29.htm: New version
+ * ntpd/refclock_palisade.c: Ditto
+ * ntpd/refclock_palisade.h: Ditto
+ From: Sven_Dietrich@Trimble.COM
+
+ * upgrade ansi2knr.c
+
+ * Some stuff that Dave did.
+
+ * configure.in: 4.0.91c
+
+ * ntpd/refclock_oncore.c: Prototype cleanup. Enum cleanup.
+ * ntpd/ntp_proto.c (clock_select): Fix memory leak.
+ * configure.in (ac_cv_struct_ppsclockev): Might need sys/time.h to
+ check for struct clockppsev. Return pce->serial, not 0;
+ From: Marc.Brett@westgeo.com
+
+ * ntpd/refclock_oncore.c (oncore_msg_En): Clean up.
+ From: John.Hay@mikom.csir.co.za
+
+Mon Jan 25 11:50:29 1999 Philippe De Muyter <phdm@macqel.be>
+
+ * libparse/parse_conf.c (clockformats): Entry added for
+ clock_wharton_400a.
+ * libparse/clk_wharton.c: New file.
+ * libparse/Makefile.am (libparse_a_SOURCES): clk_wharton.c added;
+ (libparse_kernel_a_SOURCES): kclk_wharton.c added.
+ (kclk_wharton.o): New dependency rule.
+ * ntpd/refclock_parse.c (parse_clockinfo): Entry added for the
+ WHARTON clock (mode 15).
+ * acconfig.h (CLOCK_WHARTON_400A): New configuration macro.
+ * configure.in (CLOCK_WHARTON_400A): Macro defined like other
+ CLOCK_xxx macros.
+
+Sun Jan 24 13:51:30 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/ntp_config.c (do_resolve_internal): Missing #ifdef DEBUG
+ From: Sven Dietrich <Sven_Dietrich@Trimble.COM>
+
+ * Makefile.am (SUBDIRS): Lose authstuff
+ * configure.in: Ditto
+
+Sat Jan 23 15:28:03 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.91b
+
+Sat Jan 23 15:02:25 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_oncore.c: use HAVE_STRUCT_PPSCLOCKEV
+ * acconfig.h: HAVE_STRUCT_PPSCLOCKEV
+ * configure.in (ac_cv_struct_ppsclockev): Added test
+
+Thu Jan 21 15:35:25 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.91a
+
+ * ntpd/refclock_nmea.c (nmea_receive): Call refclock_process()
+ every second (or each time a nmea string is received).
+ From: John Hay <jhay@mikom.csir.co.za>
+
+ * ntpd/ntp_refclock.c (refclock_ioctl): Use TIOCPPS if we have it.
+ (refclock_ioctl): Use LDISC_CLKPPS, not LDISC_PPS when deciding
+ how to set str.
+ * ntpd/ntp_loopfilter.c: Lose unused ntp_gettime() stuff.
+ * ntpd/ntp_request.c: Ditto.
+ * ntpd/refclock_local.c: Ditto.
+ * ntpd/refclock_shm.c (shm_poll): Fix the refclock_process() call.
+ * ntpd/refclock_oncore.c: patches and cleanup
+ * configure.in: ioctl/PPS checks, ONCORE cleanup
+ * acconfig.h: ONCORE cleanup
+ From: Reg Clemens <reg@dwf.com>
+
+ * configure.in (CFLAGS): cc on Sequent wants -Wc,+abi-socket.
+ We also need to figure out why -lsocket isn't being detected;
+ -lsocket is needed.
+ From: Dana Kaempen <decay@flash.net>
+
+ * include/ntp_stdlib.h: AIX portability patches, header cleanup.
+ * ntptrace/ntptrace.c: Ditto.
+ * ntpdate/ntpdate.c: Ditto.
+ * ntpd/refclock_true.c: Ditto.
+ * ntpd/refclock_mx4200.c: Ditto.
+ * ntpd/refclock_jupiter.c: Ditto.
+ * libntp/msyslog.c: Ditto.
+ From: Marc.Brett@waii.com
+
+Sun Jan 10 15:15:07 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.91
+
+Sat Jan 9 00:11:34 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * include/ntp_stdlib.h: msyslog() is declared differently if we're
+ not __STDC__.
+
+ * include/ntp_types.h: It's HAVE_PROTOTYPES, not USE_PROTOTYPES.
+ * include/ntp_machine.h: Ditto.
+
+Fri Jan 8 20:47:10 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: Upgrade to autoconf-2.13
+ Do the prototypes check much earlier, as it might alter CFLAGS and
+ things which will affect other tests.
+
+ * ntpd/ntp_request.c (do_conf): The problem was with a template
+ for "version" on an IRIX C compiler...
+ From: Marc.Brett@waii.com
+
+ * libntp/authkeys.c: #include config.h first.
+ Reported by: brian.bumpass@funb.com
+
+Thu Jan 7 00:24:35 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * util/tickadj.c (main): return() instead of exit().
+ * ntpd/ntp_request.c (do_conf): Disambiguate ||.
+ * ntpd/ntp_proto.c (clock_select): Initialize variables.
+ From: Marc.Brett@waii.com
+
+ * scripts/ntpver.in: Use PATH_SH
+
+ * configure.in (PATH_SH): Added.
+
+Tue Jan 5 19:02:51 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.90h
+
+ * html/driver30.htm: Updated.
+ * html/refclock.htm: Refer to driver30
+ * ntpd/refclock_oncore.c: Vastly improve and make less FreeBSD centric,
+ From: Poul-Henning Kamp <phk@critter.freebsd.dk> and
+ Reg.Clemens <reg@dwf.com>
+
+ * include/ntp.h: Portability/lint patches
+ * libntp/binio.c: Ditto.
+ * libntp/caljulian.c: Ditto.
+ * libntp/caltontp.c: Ditto.
+ * libntp/ieee754io.c: Ditto.
+ * libntp/md5c.c: Ditto.
+ * libntp/mfp_mul.c: Ditto.
+ * libntp/msyslog.c: Ditto.
+ * libntp/statestr.c: Ditto.
+ * libntp/systime.c: Ditto.
+ * libparse/clk_trimtsip.c: Ditto.
+ * libparse/data_mbg.c: Ditto.
+ * libparse/parse.c: Ditto.
+ * ntpd/ntp_control.c: Ditto.
+ * ntpd/ntp_filegen.c: Ditto.
+ * ntpd/ntp_intres.c: Ditto.
+ * ntpd/ntp_io.c: Ditto.
+ * ntpd/ntp_peer.c: Ditto.
+ * ntpd/ntp_proto.c: Ditto.
+ * ntpd/ntp_util.c: Ditto.
+ * ntpd/ntpd.c: Ditto.
+ * ntpd/refclock_arc.c: Ditto.
+ * ntpd/refclock_chu.c: Ditto.
+ * ntpd/refclock_datum.c: Ditto.
+ * ntpd/refclock_leitch.c: Ditto.
+ * ntpd/refclock_parse.c: Ditto.
+ * ntpd/refclock_usno.c: Ditto.
+ * ntpq/ntpq.c: Ditto.
+ * util/tickadj.c: Ditto.
+ From: Marc.Brett@waii.com
+
+Mon Jan 4 00:56:55 1999 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.90g
+
+ * ntpd/ntp_config.c (getconfig): MODE was setting ttl, not hmode.
+ Reported by: Carsten Emde <ce@ceag.ch>
+
+Fri Dec 4 01:01:14 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.90f
+
+ * ntpd/refclock_mx4200.c: New version
+ From: Marc.Brett@waii.com
+
+1998-12-02 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/ntp_config.c (do_resolve_internal): If fork fails, say why.
+ Reported by: Jeff_Dennison@admin.tc.faa.gov
+
+ * ntpd/ntpd.c (ntpdmain): fork() can return a -1. Someday we'll
+ report this condition...
+
+1998-12-02 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.90e
+
+ * ntpd/refclock_palisade.c: Reformat code so ansi2knr will work
+ * ntpd/refclock_palisade.h: Ditto
+ From: Marc.Brett@waii.com
+
+Sun Nov 29 21:00:53 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.90d
+
+ * configure.in (CFLAGS): Use "-O2 -g3 -n32" by default for Irix6.2
+ and later.
+ Reported by: Jack Bryans <jbryans@csulb.edu>
+
+1998-11-29 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.90c
+
+ * ntpd/refclock_oncore.c (oncore_msg_En): Convert to nano
+ From: John Hay <jhay@mikom.csir.co.za>
+
+ * include/ntp_request.h (RM_VN_MODE): Add version parameter, so
+ xntpdc will work across v3 and v4.
+ * ntpd/ntp_request.c: Track requested version
+ (req_ack): Use requested version in RM_VN_MODE
+ (more_pkt): Ditto
+ (flush_pkt): Ditto
+ (process_private): Get requested version
+ * ntpd/ntp_intres.c (request): Use default version
+ * ntpdc/ntpdc.c (sendrequest): Ditto
+ From: John Hay <jhay@mikom.csir.co.za>
+
+Fri Nov 27 14:27:21 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_palisade.c: Lint cleanup
+ * ntpd/refclock_palisade.h: Ditto.
+ From: Marc Brett <mbrett@rgs0.london.waii.com>
+
+Mon Nov 23 04:45:03 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.90b
+
+ * New code and cleanup for the NT stuff
+ From: Carl Byington <carl@five-ten-sg.com>
+
+Sat Nov 21 21:21:45 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.90a
+
+ * libntp/systime.c (step_systime): net_set_tod calls clock_settime.
+ * libntp/machines.c (ntp_set_tod): Take a 2nd arg for NT.
+ * include/ntp_machine.h: ntp_set_tod() has 2 args always.
+ * ports/winnt/bldrel.bat: Typo.
+ From: Carl Byington <carl@five-ten-sg.com>
+
+ * ntpd/ntp_intres.c (findhostaddr): h_errno is a #define under AIX.
+ * configure.in: clock_settime is a stub in AIX4.
+ From: Perry Ross <pross@platinum.com>
+
+ * libntp/Makefile.am (EXTRA_DIST): Lose libntp.mak
+ * ntpd/Makefile.am (EXTRA_DIST): Ditto.
+ * ntpdate/Makefile.am (EXTRA_DIST): Ditto.
+ * ntpdc/Makefile.am (EXTRA_DIST): Ditto.
+ * ntpq/Makefile.am (EXTRA_DIST): Ditto.
+ From: Greg Schueman <schueman@ix.netcom.com>
+
+Sat Nov 21 12:33:16 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.90
+
+ Nano changes from Dave Mills.
+
+Thu Nov 19 04:23:46 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * include/ntp_machine.h: STREAM also needs HAVE_SYS_STREAM_H
+ Reported by: Ronald Cole <ronald@forte-intl.com>
+
+Mon Nov 16 19:17:34 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.73e14
+
+ * util/ntptime.c (main): Protect STA_NANO
+
+ * ntpd/refclock_oncore.c: General overhaul and simplifications.
+ The new manual clarifies a lot of fine points, and the driver has
+ been suitably simplified. Uses Site Survey if possible, otherwise
+ does it by hand. Should also work with non-UT models, as long as
+ they talk the Motorola Binary Protocol. The driver Doesn't (need
+ to) know where the author lives anymore.
+ From: Poul-Henning Kamp <phk@critter.freebsd.dk>
+
+ * ntpd/refclock_palisade.h: New version.
+ * ntpd/refclock_palisade.c: New version.
+ From: Sven Dietrich <Sven_Dietrich@Trimble.COM>
+
+Sat Oct 24 01:19:21 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.73e13
+
+ * ntpdc/ntpdc_ops.c (clkbug): Patches
+ * ntpd/ntp_refclock.c (refclock_buginfo): Patches
+ From: Marc.Brett@waii.com
+
+Sat Oct 10 20:13:14 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.73e12
+
+ * ntpd/ntp_util.c (hourly_stats): Added prio_set stuff.
+
+ * ntpd/ntpd.c (ntpdmain): HAVE_SETPGRP_0 typo.
+ * parseutil/dcfd.c (detach): Ditto.
+ * ntpd/ntp_control.c (ctl_putpeer): Sometimes, peer->dstadr is
+ NIL.
+ From: Perry Ross <pross@platinum.com>
+
+ * ntpd/ntpd.c:
+ Some systems use sys/sched.h, not sched.h (Irix)
+ * configure.in (CFLAGS): nextstep needs -posix.
+ Reported by: Jack Bryans <jbryans@csulb.edu>
+
+Sat Oct 3 02:32:46 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.73e11
+
+ * configure.in (ac_refclock_palisade): Needs termios.
+
+ * libntp/mktime.c: Some systems need sys/types.h
+
+ * configure.in: Added AC_TYPE_SIZE_T and AC_CHECK_TYPE(time_t, long)
+ The time_t stuff should only be needed on Older machines, so the
+ fact that I'm using a long shouldn't be a problem (hollow laugh).
+
+ * include/l_stdlib.h: Sometimes we need to #include <sys/types.h>
+
+ * libntp/Makefile.am (../include/des.h): Typo.
+
+Fri Oct 2 20:52:47 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/ntp_intres.c (request): Accept responses back thru V2.
+
+Thu Oct 1 00:11:16 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.73e9
+
+ * ntpd/ntpd.c (catch_danger): Added.
+ (ntpdmain): AIX SIGDANGER stuff
+ From: Lars-Owe Ivarsson <larsowe@paradisaea.its.uu.se>
+
+ * configure.in:
+ * include/ntp_machine.h:
+ * include/ntp_string.h:
+ * libntp/machines.c:
+ * libparse/clk_hopf6021.c:
+ * libparse/clk_trimtsip.c:
+ * ntpd/refclock_leitch.c:
+ * ntpd/refclock_palisade.c:
+ * ntpd/refclock_parse.c:
+ Here are some patches to suppress warnings from various compilers
+ (IRIX 5.3, MipsPro C 7.1 on IRIX 6.4, AIX 4.1) and loaders (IRIX
+ 5.3, IRIX 6.4). Shouldn't affect functionality at all.
+ From: Marc Brett <mbrett@rgs0.london.waii.com>
+ (I got similar patches for AIX from Lars-Owe Ivarsson
+ <larsowe@paradisaea.its.uu.se>)
+
+Thu Sep 24 21:33:50 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: '73e8
+
+ * configure.in: AIX4 stubs the POSIX timer_ stuff,
+ sched_setscheduler, and mlockall.
+ Reported by: Lars-Owe Ivarsson <larsowe@paradisaea.its.uu.se>
+
+ * configure.in: OpenBSD stubs the POSIX timer_ stuff.
+ Reported by: sidney august cammeresi iv <cammeres@uiuc.edu>
+ (and several other folks whose names I can't find at the moment)
+
+Mon Sep 21 15:35:23 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: '73e7
+
+ * ntpd/refclock_parse.c: Missing declaration
+ From: Marc Brett <mbrett@rgs0.london.waii.com>
+
+ * include/README: Remove old MCAST descriptions
+
+ * include/Makefile.am (noinst_HEADERS): Lose sun-in.h .
+
+Mon Sep 21 14:50:12 1998 Harlan Stenn <stenn@grundoon.udel.edu>
+
+ * ntpdate/ntpdate.c (timer): Properly format the definition.
+
+Sun Sep 20 23:02:50 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: '73e6
+
+ * include/Makefile.am (noinst_HEADERS): Renamed in.h to sun-in.h
+
+Fri Sep 18 01:05:55 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: '73e5
+
+ * ntpd/refclock_palisade.c: SCO patch
+ From: Kamal A Mostafa <kamalm@sco.com>
+
+ * libparse/clk_trimtsip.c (cvt_trimtsip): Fix rollover bug.
+ From: "Michael J. Tubby B.Sc. G8TIC" <Mike.Tubby@thorcom.co.uk>
+
+ * libntp/authencrypt.c:
+ * libntp/systime.c:
+ * ntpd/refclock_acts.c:
+ * ntpd/refclock_arbiter.c:
+ * ntpd/refclock_arc.c:
+ * ntpd/refclock_as2201.c:
+ * ntpd/refclock_atom.c:
+ * ntpd/refclock_chu.c:
+ * ntpd/refclock_conf.c:
+ * ntpd/refclock_datum.c:
+ * ntpd/refclock_heath.c:
+ * ntpd/refclock_hpgps.c:
+ * ntpd/refclock_irig.c:
+ * ntpd/refclock_leitch.c:
+ * ntpd/refclock_nmea.c:
+ * ntpd/refclock_palisade.c:
+ * ntpd/refclock_parse.c:
+ * ntpd/refclock_pst.c:
+ * ntpd/refclock_trak.c:
+ * ntpd/refclock_true.c:
+ * ntpd/refclock_usno.c:
+ * ntpd/refclock_wwvb.c:
+ Typos, cleanup, and bugfixes
+ From: Marc Brett <mbrett@rgs0.london.waii.com>
+
+ * ntpd/ntp_timer.c (timer): Typo.
+ * include/ntp_refclock.h: in refclockstat, clockdesc should be const.
+ * ntpd/ntp_io.c (create_sockets): Typo.
+ * ntpd/ntp_control.c (free_varlist): Use the appropriate cast when
+ calling free().
+ (set_var): Use char *td for non-const char data.
+ (ctl_getitem): Use char * for non-const data.
+ (Many of these reported by Marc Brett)
+
+Sun Sep 13 19:19:09 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/ntpd.c: Added nofork declaration.
+ (ntpdmain): Initialize it...
+ * ntpd/ntp_config.c: added nofork.
+ Updated ntp_options.
+ (getstartup): Updated "usage" string. Deal with -n flag.
+ (getconfig): Ditto.
+ From: Jeffrey Hutzelman <jhutz@cs.cmu.edu>
+
+ * ntpd/ntp_io.c (open_socket): Use ntoa() to print out the address
+ when bind() fails. (in 2 places)
+ Reported by: "Markus W. Fehr" <mfehr@ch.ibm.com>
+ Only soft-fail if an interface is unavailable.
+ (create_sockets): Don't SO_REUSEADDR if the interface is unavailable.
+ From: "Markus W. Fehr" <mfehr@ch.ibm.com>
+
+ * configure.in: If we --disable-all-clocks, then don't enable
+ parse clocks by default.
+ Reported by: Marion Hakanson <hakanson@cse.ogi.edu>
+
+Sat Aug 22 23:58:14 1998 Frank Kardel <kardel@acm.org>
+
+ * ntpd/refclock_parse.c (local_input): fixed IO handling for non-STREAM IO
+
+Sun Aug 16 20:13:32 1998 Frank Kardel <kardel@acm.org>
+
+ * libntp/ieee754io.c: debug information only compile for LIBDEBUG case
+
+ * ntpd/refclock_parse.c (gps16x_message): reduced UTC parameter information (dropped A0,A1)
+ made uval a local variable (killed one of the last globals)
+ (sendetx): added logging of messages when in debug mode
+ (trimble_check): added periodic checks to facilitate re-initialization
+ (trimbletsip_init): made use of EOL character if in non-kernel operation
+ (trimbletsip_message): extended message interpretation
+ (getdbl): fixed data conversion
+
+ * libparse/parse_conf.c (clockformats): Trimble TSIP driver now also
+ available for kernel operation
+
+ * libparse/info_trimble.c: re-generated
+
+ * libparse/clk_trimtsip.c (cvt_trimtsip): initial kernel capable version (no more floats)
+ (clock_trimtsip =): new format name
+
+ * libparse/clk_trimtaip.c (clock_trimtaip =): changed format name
+
+ * include/trimble.h (CMD_RSTATTRACK): renamed mode 6 variable name
+
+ * scripts/monitoring/ntploopwatch: moved emacs mode selector
+
+Mon Aug 10 15:32:48 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_acts.c: Patch cleanup
+ * ntpd/ntp_refclock.c: Patch cleanup
+ * ntpd/ntp_timer.c: Patch cleanup
+ From: qli@huey.udel.edu
+
+Wed Jul 29 15:23:21 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * libntp/machines.c: IRIX needs time.h
+ Reported by: Judith E Bush <jbush@fi.edu>
+
+ * ntpd/ntpd.c (service_main): Better AIX PROCLOCK fix.
+ From: Matt Ladendorf <matt.ladendorf@anheuser-busch.com> and
+ Grover Davidson <Grover.Davidson@anheuser-busch.com>
+
+Wed Jul 29 01:36:48 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * include/ntpd.h (MAXINTERFACES): Moved here...
+ * ntpd/ntp_io.c: From here...
+ (create_sockets): Only deal with MAXINTERFACES.
+ (create_sockets): Only deal with specified interfaces.
+
+ * ntpd/ntp_config.c (CONFIG_LISTEN): Added
+ Added ifnum and listenaddrs[]
+ (getconfig): Added defn for "addr"
+ (getconfig): Initialize ifnum.
+
+ * ntpd/ntpd.c (service_main): call init_io after getconfig
+ From: Vebjorn Ljosa <ljosa@initio.no>
+
+Wed Jul 29 00:42:28 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_palisade.c: Use NEED_HPUX9_TIOCM_STUFF
+
+ * acconfig.h (NEED_HPUX9_TIOCM_STUFF): Added.
+
+ * configure.in (REFCLOCK_PALISADE): Needs termio*.h
+ (NEED_HPUX9_TIOCM_STUFF): Added.
+
+ * ntpd/ntp_io.c (create_sockets): Use strchr instead of strstr.
+
+ * libntp/mktime.c: #include <sys/types.h>
+
+ * libntp/ieee754io.c: #include <sys/types.h>
+
+Wed Jul 29 00:24:22 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_acts.c (ACTS_MAXPOLL): 14 -> 18.
+ Import current_nextdate
+ (acts_receive): Update peer->nextdate with current_nextdate
+ (acts_poll): Call acts_timeout() (debugging)
+
+ * ntpd/ntp_refclock.c: Export current_nextdate.
+ (refclock_transmit): Check peer->valid >= NTP_SHIFT - 2, not >.
+ (refclock_transmit): hpoll wiggles, update current_nextdate
+
+ * ntpd/ntp_timer.c: #include "ntp_refclock.h"
+ (MODE_MANUAL): Added.
+ (timer): MODE_MANUAL stuff
+
+ From: qli@huey.udel.edu
+
+Tue Jul 28 23:23:15 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: Check for inet_ntoa in -lbind .
+
+ * ntpd/ntpd.c: #undef PROCLOCK for AIX.
+
+Mon Jul 20 01:06:24 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in (AC_TYPE_SIZE_T): Added.
+
+Sat Jul 11 09:38:30 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.73e
+
+ * ports/winnt/: Replaced with new code (no SHM or PALISADE)
+ From: Greg Schueman <schueman@ix.netcom.com>
+
+Fri Jul 10 12:12:59 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.73d
+
+ * include/ntp_machine.h (HAVE_SRANDOM): VxWorks patches
+ (HAVE_RANDOM): Ditto.
+ (CALL): Ditto.
+ From: Casey Crellin <ccrellin@mweb.com>
+
+ * ntpd/refclock_parse.c (local_input): Typo.
+ Reported by: Tony Li <tony1@home.net>
+
+Wed Jul 8 01:49:01 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.73c
+
+ * PARSE patches from Frank Kardel
+
+ * libntp/machines.c (ntp_set_tod): Get it right.
+
+Sun Jul 5 22:15:34 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.73a
+
+ * kernel/sys/timex.h (MOD_CANSCALE): Add rest of patch to handle
+ scaling.
+ From: Poul-Henning Kamp <phk@critter.freebsd.dk>
+
+Wed Jun 10 21:16:01 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.73
+
+ * ntpd/ntp_loopfilter.c (local_clock): MOD_CANSCALE patches, and
+ be careful with the integration if we're nearly perfect.
+ From: Poul-Henning Kamp <phk@critter.freebsd.dk>
+
+ * util/tickadj.c (main): Typo fix...
+ From: Marion Hakanson <hakanson@cse.ogi.edu>
+
+ * ntpd/ntp_io.c (create_sockets): Attempt to ignore alias
+ interfaces.
+ From: Kenneth Maupin <maupin@easystreet.com>
+
+ * ntpd/ntp_refclock.c: PPS fixes
+ * ntpd/refclock_msfees.c (msfees_start): Portability fixes and
+ PPS/STREAM enhancements
+ From: John Hay <jhay@mikom.csir.co.za>
+
+ * ntpd/ntp_refclock.c (refclock_gtlin): Patch...
+ From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
+
+Sun Jun 28 18:43:30 1998 Frank Kardel <kardel@acm.org>
+
+ * libntp/buftvtots.c (buftvtots): using WORD_BIGENDIAN instead of XNTP_BIG_ENDIAN
+
+ * libparse/clk_trimtsip.c (getflt): fixed ENDIAN issue
+ (getdbl): fixed ENDIAN issue
+ (getint): use get_msb_short()
+ (cvt_trimtsip): use gpstolfp() for conversion
+
+ * libntp/Makefile.am (libntp_a_SOURCES): added gpstolfp.c source
+
+ * libntp/binio.c: added {get,put}_msb_{short,long}() functions
+
+ * include/ntp_fp.h: added gpstolfp() prototype
+
+ * include/binio.h: added binio MSB prototypes
+
+Sat Jun 13 13:48:17 1998 Frank Kardel <kardel@acm.org>
+
+ * parseutil/testdcf.c: signed/unsigned
+ SYSV clock name clash fixed
+
+ * parseutil/dcfd.c: signed/unsigned
+ SYSV clock name clash fixed
+ year wrapping at 1998
+ ctype macros take ints as args
+
+ * ntptrace/ntptrace.c (decodeipaddr): ctype macros take ints as args
+
+ * ntpq/ntpq_ops.c (doprintpeers): signed/unsigned
+
+ * ntpq/ntpq.c: ctype macros take ints as args
+ signed/unsigned
+
+ * ntpdc/ntpdc.c: signed/unsigned
+
+ * ntpd/refclock_usno.c: signed/unsigned
+
+ * ntpd/refclock_true.c (true_send): signed/unsigned, name clashes
+
+ * ntpd/refclock_parse.c: signed/unsigned, name clashes
+
+ * ntpd/refclock_nmea.c (nmea_receive): ctype macros take ints as args
+
+ * ntpd/refclock_heath.c (heath_receive): prototypes (signed/unsigned issues)
+
+ * ntpd/refclock_arc.c: prototypes (signed/unsigned issues)
+
+ * ntpd/refclock_acts.c: prototypes (signed/unsigned issues)
+
+ * ntpd/ntpd.c: prototypes (signed/unsigned issues)
+
+ * ntpd/ntp_util.c (getauthkeys): prototypes (signed/unsigned issues)
+ fix SYSV clock name clash
+
+ * ntpd/ntp_request.c: prototypes (signed/unsigned issues)
+ fix SYSV clock name clash
+
+ * ntpd/ntp_io.c (input_handler): variable naming, signed/unsigned
+
+ * ntpd/ntp_intres.c (readconf): signed/unsigned issues
+
+ * ntpd/ntp_control.c: prototypes (signed/unsigned issues)
+ fix SYSV clock name clash
+
+ * ntpd/ntp_config.c: fix SYSV clock name clash
+ ctype macros take ints as args
+
+ * libparse/parsestreams.c: dirt (debug) removed
+
+ * libparse/parsesolaris.c: more prototypes
+ fix name clashes
+ allow for ansi2knr
+
+ * libparse/parse.c: bcopy/memcpy cleanup
+ fix SYSV clock name clash
+
+ * libparse/clk_trimtsip.c (cvt_trimtsip): fix SYSV clock name clash
+
+ * libparse/clk_trimtaip.c (cvt_trimtaip): fix SYSV clock name clash
+
+ * libparse/clk_schmid.c (cvt_schmid): fix SYSV clock name clash
+
+ * libparse/clk_rcc8000.c (cvt_rcc8000): fix SYSV clock name clash
+
+ * libparse/clk_rawdcf.c (cvt_rawdcf): fix SYSV clock name clash
+
+ * libparse/clk_hopf6021.c (cvt_hopf6021): fix SYSV clock name clash
+
+ * libparse/clk_dcf7000.c (cvt_dcf7000): fix SYSV clock name clash
+
+ * libparse/clk_computime.c: fix SYSV clock name clash
+
+ * libntp/octtoint.c (octtoint): ctype macros take ints as args
+
+ * libntp/mstolfp.c (mstolfp): ctype macros take ints as args
+
+ * libntp/hextolfp.c (hextolfp): ctype macros take ints as args
+
+ * libntp/hextoint.c (hextoint): ctype macros take ints as args
+
+ * libntp/decodenetnum.c (decodenetnum): ctype macros take ints as args
+
+ * libntp/atouint.c (atouint): ctype macros take ints as args
+
+ * libntp/atolfp.c (atolfp): ctype macros take ints as args
+
+ * libntp/atoint.c (atoint): ctype macros take ints as args
+
+ * kernel/sys/parsestreams.h: STREAM macro gone in favor of HAVE_SYS_STREAM_H
+
+ * include/parse.h: STREAM macro gone in favor of HAVE_SYS_STREAM_H
+
+Fri Jun 12 11:08:53 1998 Frank Kardel <kardel@acm.org>
+
+ * ntpd/ntp_timer.c: prototype fixes (ansi2knr/knr compiler)
+
+ * ntpd/ntp_proto.c (make_keylist): type cast for e(!!!)malloc()
+
+ * libparse/Makefile.am: adjust for ansi2knr
+
+ * libntp/ieee754io.c: ansi2knr compatibility
+
+ * include/ntp_refclock.h: added pps_sample() extern declaration
+ added refclock_process_offset() extern declaration
+
+ * include/ntp.h: fixed function * prototypes
+
+ * ntpd/refclock_parse.c (bind): added input routine
+ (local_input): added input routine
+
+ * ntpd/ntp_io.c (input_handler): direct input processing for
+ refclocks to save input recv buffers
+
+ * include/ntp_refclock.h: added int io_input(struct recvbuf *)
+ pointer to allow direct processing of read refclock data in
+ order to save many bug recv buffers on single character input
+ (problem with "fast" machines)
+
+ * parse_conf.c: conditional compile macros fixed
+
+ * parse.c: conditional compile macros fixed
+ printf prototype
+
+ * clk_trimtaip.c: conditional compile macros fixed
+ printf prototype
+
+ * clk_schmid.c: conditional compile macros fixed
+ printf prototype
+
+ * clk_rcc8000.c: conditional compile macros fixed
+ printf prototype
+
+ * clk_hopf6021.c: conditional compile macros fixed
+ printf prototype
+
+ * clk_dcf7000.c: conditional compile macros fixed
+ printf prototype
+
+ * clk_computime.c: conditional compile macros fixed
+ printf prototype
+
+Sat Jun 6 07:41:54 1998 Frank Kardel <kardel@acm.org>
+
+ * ntpd/refclock_palisade.c: fixed termio.h / termios.h inclusion
+
+ * include/ntp_refclock.h: made refclockproc/clockdesc const
+
+ * ntpd/ntp_control.c (ctl_putpeer): avoided ambigous 'else' (gcc)
+
+ * ntpd/refclock_parse.c (parse_start): added BURST mode initialisation
+
+ * scripts/stats/summary.sh (CLOCK): allow for Y2K log files
+
+ * libparse/clk_rawdcf.c: simplified condidional compile expression
+
+Wed May 27 08:10:43 1998 Frank Kardel <kardel@acm.org>
+
+ * include/Makefile.am (noinst_HEADERS): added new header files
+ mbg_gps166.h binio.h ascii.h ieee754io.h
+
+ * ntpdc/ntpdc.c (sendrequest): fixed info_auth_keyid setting it
+ got accidentally trashed every other round
+
+Mon May 25 22:55:07 1998 Frank Kardel <kardel@acm.org>
+
+ * configure.in: PARSE clocks are enabled by default whenever
+ possible (termio.h or termios.h present)
+ removed RAWDCF_SETDTR feature
+
+ * acconfig.h: removed RAWDCF_SETDTR option (now implicit by
+ compilation and run time configuration)
+
+ * ntpd/refclock_parse.c (rawdcf_init): offer a RAWDCF clock (type 14)
+ that attempts to set the DTR modem line for receiver power
+
+ * libparse/clk_meinberg.c (cvt_meinberg): support current standard
+ Meinberg data formats
+
+Sun May 24 09:43:19 1998 Frank Kardel <kardel@acm.org>
+
+ * libparse/clk_rawdcf.c (pps_rawdcf): trigger pps on zero going
+ edge - that is simpler wiring (Rx->DCD).
+
+ * parseutil/testdcf.c (wday): const keyword
+
+ * parseutil/dcfd.c (cvt_rawdcf): sign issues and calling interfaces
+
+ * ntpq/ntpq.c (MAXVARLEN): adjusted internal buffer length for
+ variable values
+
+ * ntpd/refclock_parse.c: adjust to new io handling (fixed formats
+ only)
+ (mkreadable): don't include >"< in readable ASCII output (-> ntpq
+ parsing)
+ output debug messages to stdout instead of msyslog()
+ fixed version information string
+
+ * ntpd/refclock_atom.c (pps_sample): new auxiliary pps interface
+
+ * libparse/parsestreams.c (parserput): get event status consistent
+ with direct calls
+ (zs_xsisr): simulate CARRIER status to avoid unnecessary M_xHANGUP
+ events
+
+ * libparse/parsesolaris.c (parserput): get event status consistent
+ with direct calls
+ (zs_xsisr): simulate CARRIER status to avoid unnecessary M_xHANGUP
+ events
+
+ * libparse/parse.c: removed old input cruft
+ (parse_restart): new generic input help function
+ (parse_addchar): ditto
+ (parse_end): ditto
+ (pps_one): new generic pps help function
+ (pps_zero): ditto
+
+ * libparse/clk_trimtsip.c (clock_trimtsip =): new input handling
+
+ * libparse/clk_trimtaip.c (clock_trimtaip =): new input handling
+ (inp_trimtaip): new input handler
+
+ * libparse/clk_schmid.c (clock_schmid =): new input handling
+ (inp_schmid): new input handler
+
+ * libparse/clk_rcc8000.c (clock_rcc8000 =): new input handling
+ (inp_rcc8000): new input handler
+
+ * libparse/clk_rawdcf.c (clock_rawdcf =): new input handling
+ (snt_rawdcf): adjusted to new input handling
+ (inp_rawdcf): new input handler
+
+ * libparse/clk_meinberg.c (clock_meinberg): new input handling
+ (gps_input): new input handler
+ (mbg_input): new input handler
+
+ * libparse/clk_hopf6021.c (clock_hopf6021 =): new input handling
+ (inp_hopf6021): new input handler
+
+ * libparse/clk_dcf7000.c (clock_dcf7000 =): new input handling
+ (inp_dcf7000): new input handler
+
+ * libparse/clk_computime.c (clock_computime =): new input handling
+ (inp_computime): new input handler
+
+ * libparse/Makefile.am: link kernel module with libntp.a
+
+ * include/parse.h (struct parse): removed old data structure cruft
+ (new input model) new PARSE_INP* macros for input handling
+ removed old SYNC_* macros from old input model
+ (struct clockformat): removed old parse functions in favor of the
+ new input model
+ updated prototypes
+
+ * include/ntp_refclock.h: prototype for refclock_atom pps_sample()
+ interface
+
+ * acconfig.h: added PPS_SAMPLE define
+ * configure.in (LIBPARSE): added PPS_SAMPLE configuration
+ <refclock_atom aux interface>
+
+ * libntp/systime.c (adj_systime): debug output (> level 6) for
+ adjtime results
+
+ * libntp/mfp_mul.c (mfp_mul): controlled debug output
+
+ * libntp/ieee754io.c (get_byte): controlled debug output
+ (fetch_ieee754): ditto
+ (put_ieee754): ditto
+
+Tue May 5 20:09:51 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: document DES is not usually present.
+
+Wed Apr 29 22:00:22 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.72h
+
+ * authstuff/Makefile.am (check-local-rsn): check-local doesn't
+ work with RSAREF...
+ Reported by: "Auteria Wally Winzer Jr." <wally.winzer@champusa.com>
+
+ * libntp/machines.c: the settime() choices were ordered badly.
+ Reported by: Michael Joosten <joost@c-lab.de>
+
+Sat Apr 25 00:35:53 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in (ac_cv_var_no_parenb_ignpar): Undo the kernel PLL
+ block I just installed - Dave wants to control this via
+ KERNEL_FLL_BUG.
+
+Fri Apr 24 20:35:57 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * libntp/Makefile.am (libntp_a_DEPENDENCIES): Set per libntp_a_LIBADD
+
+ * configure.in: Do a better job of blocking kernel PLL under
+ solaris2.6.
+
+Fri Apr 24 00:41:12 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: 4.0.72f
+ (ac_cv_struct_nlist_n_un): Don't look for ntp_adjtime or
+ ntp_gettime under solaris2.6.
+
+ * ntpd/ntp_proto.c (process_packet): Give verbose error messages
+
+ * include/global.h (PROTOTYPES): Drive via HAVE_PROTOTYPES.
+
+Wed Apr 22 16:55:55 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in (ac_cv_var_use_des): Added. 4.0.72e.
+ * libntp/Makefile.am (libntp_a_LIBADD): Added DESOBJS
+
+Tue Apr 21 02:08:06 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_arc.c (arc_receive): Typo...
+ From: Sam Steingold <sds@usa.net>
+
+Fri Apr 10 03:05:35 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in (ac_refclock_chu): AUDIO_CHU support. Disabled by
+ default, and currently only supported on SunOS and Solaris.
+ * acconfig.h: AUDIO_CHU
+
+Wed Apr 8 19:53:53 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * libntp/Makefile.am (EXTRA_DIST): Added mktime.c
+
+ * configure.in: AC_REPLACE_FUNCS(mktime).
+ (--enable-dst-minutes=60): Added, for (missing) mktime().
+
+ * ntpd/refclock_heath.c (heath_receive): Use mktime() instead of
+ the old hack.
+
+Tue Apr 7 21:15:14 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in (LIBOBJS): Hack it before AC_OUTPUT to deal with
+ ANSI2KNR-filtering rules.
+ From: Jim Meyering <meyering@ascend.com>
+
+Mon Apr 6 01:40:45 1998 Harlan Stenn <stenn@grundoon.udel.edu>
+
+ * libntp/strerror.c: ANSIfy strerror's definition.
+
+Thu Mar 12 20:24:45 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * libntp/statestr.c: Only #include <config.h> if HAVE_CONFIG_H is
+ #define'd.
+ From: Sven Dietrich <Sven_Dietrich@Trimble.COM>
+
+Wed Mar 11 00:27:32 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: Cygwin needs to check for the advapi32 library.
+ NT doesn't support a root user, so don't bother with getuid().
+ Also, don't bother with umask().
+
+ * ntpd/ntp_io.c: cygwin32 patches
+ * ntpd/ntp_proto.c: Ditto.
+ * ntpd/ntpd.c: Ditto.
+ * ntpd/ntp_timer.c: Ditto.
+ * ntpdate/ntpdate.c: Ditto.
+ * libntp/machines.c: Ditto.
+ * libntp/systime.c: Ditto.
+ * include/ntp_machine.h: Ditto.
+ * include/ntp_unixtime.h: Ditto.
+ From: Sven Dietrich <Sven_Dietrich@Trimble.COM>
+
+Tue Mar 10 22:26:14 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in (ac_cv_make_tickadj): Added.
+ Now that tickadj is the only(?) utility that cares about tick and
+ tickadj, we don't need to have NOKMEM and no PRESET_* be fatal.
+
+Sat Mar 7 02:57:17 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/ntp_loopfilter.c (local_clock): Patch STA_FLL check
+ From: Poul-Henning Kamp <phk@freebsd.org>
+
+ * various: Renamed ACTS to CLOCK_ACTS, ARBITER to CLOCK_ARBITER,
+ ARCRON_MSF to CLOCK_ARCRON_MSF, AS2201 to CLOCK_AS2201, BANC to
+ CLOCK_BANC, DATUM to CLOCK_DATUM, GPSVME to CLOCK_GPSVME, HEATH to
+ CLOCK_HEATH, HPGPS to CLOCK_HPGPS, IRIG to CLOCK_IRIG, JUPITER to
+ CLOCK_JUPITER, LEITCH to CLOCK_LEITCH, MSFEES to CLOCK_MSFEES,
+ MX4200 to CLOCK_MX4200, NMEA to CLOCK_NMEA, PALISADE to
+ CLOCK_PALISADE, PARSE to CLOCK_PARSE, PPS720 to CLOCK_PPS720, PST
+ to CLOCK_PST, PTBACTS to CLOCK_PTBACTS, SHM_CLOCK to CLOCK_SHM,
+ ONCORE to CLOCK_ONCORE, TPRO to CLOCK_TPRO, TRAK to CLOCK_TRAK,
+ TRUETIME to CLOCK_TRUETIME, USNO to CLOCK_USNO, WWVB to CLOCK_WWVB
+
+ * Makefile.am (ETAGS_ARGS): Added acconfig.h
+
+ * various: Renamed LOCAL_CLOCK to CLOCK_LOCAL.
+
+ * configure.in: First cut at *-pc-cygwin32 support
+ Requested by: Sven Dietrich <Sven_Dietrich@Trimble.COM>
+
+ * configure.in: gdt-surveying code is gone. Sigh.
+ Reported by: Poul-Henning Kamp <phk@critter.freebsd.dk>
+
+Wed Mar 4 21:41:06 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * many places: Renamed ATOM to CLOCK_ATOM
+
+Tue Mar 3 03:18:13 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/ntp_timer.c (timer): Only call refclock_transmit if
+ REFCLOCK is #define'd.
+ Reported by a bunch of folks.
+
+Mon Mar 2 03:46:07 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in (ntp_refclock): Use CLOCK_CHU, which no longer
+ needs any special headers.
+ * ntpd/refclock_chu.c: Call it CLOCK_CHU
+ (chu_receive): Define it correctly.
+
+ * include/winnt/sys/time.h (gettimeofday): Prototypes are OK.
+ (settimeofday): Prototypes are OK.
+ From: JJEVNISEK@qgraph.com
+
+ * ntpq/ntpq_ops.c: varlist name and value aren't const.
+ * ntpdc/ntpdc_ops.c (fudge): The flags are u_val, not val.
+ * ntpdc/ntpdc.c: const cleanup, exit cleanup.
+ * ntpd/refclock_wwvb.c (wwvb_receive): Move the definition of tz
+ somewhere more normal.
+ * ntpd/ntp_request.c (do_trustkey): kp gets u_long data, not
+ u_int32 (but Harlan thinks this patch may be wrong).
+ * ntpd/ntp_refclock.c (refclock_process): clocktime needs
+ offset.l_ui, not offset.l_i .
+ * ntpd/ntp_control.c (set_var): t isn't const.
+ * libntp/a_md5encrypt.c (session_key): Cast 2nd arg to MD5auth_setkey.
+ * include/ntpd.h: ctl_var's text field isn't const.
+ * include/ntp_refclock.h: clockdesc isn't const.
+ From: Marc Brett <Marc.Brett@waii.com>
+
+ * ntpd/ntp_loopfilter.c (local_clock): Limit ntv.constant to
+ MAXTC, and log error returns from ntp_adjtime.
+ From: Juha Sarlin <juha@c3l.tyreso.se>
+
+Mon Mar 2 03:05:23 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in (ac_cv_var_kernel_fll_bug): KERNEL_FLL_BUG
+ * acconfig.h: KERNEL_FLL_BUG: added.
+ * ntpd/ntp_loopfilter.c (local_clock): Only avoid STA_FLL if
+ KERNEL_FLL_BUG is #define'd (Solaris2.6)
+
+Sat Feb 21 00:45:10 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * automake-1.2d.patches: Added ansi2knr.o rules.
+
+ * ntpd/refclock_tpro.c: P() stuff
+
+Fri Feb 20 20:10:20 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in: Improve the ${CC} -pipe test (cygwin-32's gcc -pipe
+ silently does nothing).
+ Reported by: Sven Dietrich <Sven_Dietrich@Trimble.COM>
+
+Wed Feb 18 00:51:08 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+* configure.in: 4.0.72 released.
+
+* configure.in:AC_REPLACE_FUNCS(strerror), check for poll.h, and deal
+ with the --enable-JUPITER stuff.
+* libntp/Makefile.am (libntp_a_LIBADD): Added (for strerror support).
+* libntp/clocktypes.c: Added REFCLK_GPS_JUPITER.
+* ntpdate/ntpdate.c: poll() support
+* ntpd/Makefile.am: Add refclock_jupiter.c
+* ntpd/refclock_conf.c: Added refclock_jupiter
+* ntpd/refclock_mx4200.c (mx4200_pps): Bugfixes.
+* include/ntp.h (REFCLK_GPS_JUPITER): Added, and bumped REFCLK_MAX.
+ From: Craig Leres <leres@ee.lbl.gov>
+
+Mon Feb 16 21:02:42 1998 Harlan Stenn <stenn@grundoon.udel.edu>
+
+ * ntpd/ntp_proto.c: P()
+
+Mon Feb 16 12:43:11 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+* include/ntp_types.h: Added P() prototyping hack back in.
+* include/parse.h: Ditto.
+* include/ntpd.h: Ditto.
+* include/ntp_unixtime.h: Ditto.
+* include/ntp_stdlib.h: Ditto.
+* include/ntp_select.h: Ditto.
+* include/ntp_refclock.h: Ditto.
+* include/ntp_fp.h: Ditto.
+* include/md5.h: Ditto.
+* include/ntp_filegen.h: Ditto.
+* include/ntp_calendar.h: Ditto.
+* include/l_stdlib.h: Ditto.
+
+ * configure.in (ACTS): Sometimes, TIOCMBIS is in sys/ioctl.h
+ Reported by Kenneth Jaldehag <kenneth.jaldehag@sp.se>
+ * configure.in (HEATH): Ditto.
+ * configure.in (PTBACTS): Ditto.
+ * configure.in (USNO): Ditto.
+
+Sat Feb 14 00:02:14 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_irig.c (irig_rf): Rename sincos[] to sin_cos[].
+
+Fri Feb 13 22:22:08 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * include/ntp.h (RANDPOLL): Use random or mrand48.
+ * ntpd/ntp_config.c (do_resolve_internal): Ditto.
+ * ntpd/ntp_peer.c (unpeer): Ditto.
+ * ntpd/ntp_proto.c (make_keylist): Ditto.
+
+ * ntpd/ntpd.c (xntpdmain): Use srandom or srand48.
+
+ * configure.in: Look for {s,}random() and [ms]rand48().
+
+Wed Feb 11 22:50:24 1998 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/ntp_restrict.c (hack_restrict): Renamed restrict()
+ * include/ntpd.h: Ditto
+ * ntpd/ntp_request.c (do_restrict): Ditto
+ * ntpd/ntp_config.c (getconfig):
+ * ntpd/ntp_io.c (create_sockets): Ditto.
+
+1998-01-23 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_irig.c: Allow either <sun/audioio.h> or
+ <sys/audioio.h> . From Dave Mills.
+
+ * configure.in: Under SunOS, it's sun/audioio.h .
+
+1998-01-22 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * html/driver6.html: Updated header file info
+ * html/irig.html: Ditto.
+ * configure.in: sys/bsd_audioirig.h replaced with sys/audioio.h
+ for new irig driver that Dave installed.
+
+1998-01-08 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * Many places: Lose the P(()) prototype stuff
+
+ * util/tickadj.c (writevar): Make offset an off_t
+ (readvar): Ditto
+ (getoffsets): Make offsets off_t
+
+ * adjtimed/adjtimed.c (GetClockRate): Fix lseek arg 2.
+ (SetClockRate): Ditto
+
+ * Many things in many places from many people.
+
+ * configure.in: Added AC_TYPE_OFF_T
+
+1997-11-26 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * ntpd/refclock_palisade.c: ANSIfied.
+
+Wed Sep 3 23:51:44 1997 Harlan Stenn <stenn@whimsy.udel.edu>
+
+ * configure.in (AM_C_PROTOTYPES): Added.
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Added ansi2knr.
+
diff --git a/contrib/ntp/INSTALL b/contrib/ntp/INSTALL
new file mode 100644
index 000000000000..0c73fefed39b
--- /dev/null
+++ b/contrib/ntp/INSTALL
@@ -0,0 +1,178 @@
+Basic Installation
+==================
+
+ These are generic *nix installation instructions.
+
+ For Windows/NT, please see ports/winnt.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+ The file `configure.in' is used to create `configure' by a program
+called `autoconf'. You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes a while. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. You can give `configure'
+initial values for variables by setting them in the environment. Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on. Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+ CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+ If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
+
+`--help'
+ Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made.
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--version'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
+
diff --git a/contrib/ntp/Makefile.am b/contrib/ntp/Makefile.am
new file mode 100644
index 000000000000..53a77603c54c
--- /dev/null
+++ b/contrib/ntp/Makefile.am
@@ -0,0 +1,95 @@
+#AUTOMAKE_OPTIONS = foreign dist-tarZ #distdir=$(PACKAGE)$(VERSION)
+#AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
+AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ
+
+SUBDIRS = \
+ scripts \
+ include \
+ libntp \
+ libparse \
+ librsaref \
+ ntpd \
+ ntpdate \
+ ntpdc \
+ ntpq \
+ ntptrace \
+ parseutil \
+ adjtimed \
+ clockstuff \
+ kernel \
+ util
+
+EXTRA_DIST = ChangeLog COPYRIGHT NEWS README.cvs README.des README.hackers TODO WHERE-TO-START acconfig.h config.guess config.h.in config.sub excludes install-sh dot.emacs build NOTES.y2kfixes readme.y2kfixes results.y2kfixes
+#ETAGS_ARGS = $(srcdir)/Makefile.am $(srcdir)/configure.in
+ETAGS_ARGS = Makefile.am configure.in acconfig.h
+
+# DIST_CPDIRS = conf html scripts
+# DIST_MKDIRS = adjtime clockstuff kernel libparse ppsclock
+#DIST_HOOK_DIRS = conf html patches ports scripts
+# HMS: make ports be the last directory...
+DIST_HOOK_DIRS = conf html scripts ports
+
+BUILT_SOURCES = $(srcdir)/COPYRIGHT
+
+$(srcdir)/COPYRIGHT: html/copyright.htm
+ ( echo "This file is automatically generated from html/copyright.htm" ; lynx -dump $(srcdir)/html/copyright.htm ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT
+
+# local-dist: dist-tarZ
+
+dist-hook:
+ -for i in $(DIST_HOOK_DIRS); do \
+ mkdir $(distdir)/$$i ; \
+ cp -rp $(srcdir)/$$i $(distdir) ; \
+ done ; \
+ find $(distdir) -type d -name CVS -exec rm -rf '{}' \; ; \
+ # find $(distdir)/html -name '*.htm' -exec dos2unix {} {} \; ; \
+ # cp -rp $(srcdir)/include/winnt $(distdir)/include
+
+dist-export: distdir
+ rm $(distdir)/libntp/authdes.c
+ cp $(distdir)/libntp/authdes.c.export $(distdir)/libntp/authdes.c
+ chmod -R a+r $(distdir)
+ mv $(distdir) $(distdir)-export
+ $(TAR) chozf $(distdir)-export.tar.gz $(distdir)-export
+ rm -rf $(distdir)-export
+
+Makefile: .warning
+
+CVO=`$(srcdir)/config.guess`
+
+.buildcvo:
+ echo "$(CVO)" > .buildcvo
+
+.checkcvo: .buildcvo FRC.checkcvo
+ @if [ "`cat .buildcvo`" != "$(CVO)" ];then \
+ echo "This directory was configured for `cat .buildcvo`"; \
+ echo "but this machine is a $(CVO)"; \
+ exit 1; \
+ fi
+
+BHOST=`(hostname || uname -n)`
+
+.buildhost:
+ echo "$(BHOST)" > .buildhost
+
+.checkhost: .buildhost FRC.checkhost
+ @if [ "`cat .buildhost`" != "$(BHOST)" ];then \
+ echo "Built on `cat .buildhost` but this is $(BHOST)"; \
+ echo " "; \
+ fi
+
+.warning:
+ @echo "Compiling with GCC now generates lots of new warnings."
+ @echo " "
+ @echo "Don't be concerned. They're just warnings."
+ @echo " "
+ @echo "Don't send bug reports about the warnings, either."
+ @echo " "
+ @echo "Feel free to send patches that fix these warnings, though."
+ @echo " "
+ @sleep 1
+ @touch .warning
+
+FRC.distwarn FRC.checkcvo FRC.checkhost:
+
+dot.emacs: FRC.distwarn
diff --git a/contrib/ntp/Makefile.in b/contrib/ntp/Makefile.in
new file mode 100644
index 000000000000..c8a8d7f880d3
--- /dev/null
+++ b/contrib/ntp/Makefile.in
@@ -0,0 +1,490 @@
+# Makefile.in generated automatically by automake 1.4a from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_FLAG =
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AMTAR = @AMTAR@
+AMTARFLAGS = @AMTARFLAGS@
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+CHUTEST = @CHUTEST@
+CLKTEST = @CLKTEST@
+CPP = @CPP@
+DCFD = @DCFD@
+LDFLAGS = @LDFLAGS@
+LIBPARSE = @LIBPARSE@
+LIBRSAREF = @LIBRSAREF@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBPARSE = @MAKE_LIBPARSE@
+MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
+MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+PACKAGE = @PACKAGE@
+PATH_SH = @PATH_SH@
+PROPDELAY = @PROPDELAY@
+RANLIB = @RANLIB@
+RSAREF = @RSAREF@
+TESTDCF = @TESTDCF@
+U = @U@
+VERSION = @VERSION@
+
+#AUTOMAKE_OPTIONS = foreign dist-tarZ #distdir=$(PACKAGE)$(VERSION)
+#AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
+
+
+AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ
+
+SUBDIRS = \
+ scripts \
+ include \
+ libntp \
+ libparse \
+ librsaref \
+ ntpd \
+ ntpdate \
+ ntpdc \
+ ntpq \
+ ntptrace \
+ parseutil \
+ adjtimed \
+ clockstuff \
+ kernel \
+ util
+
+
+EXTRA_DIST = ChangeLog COPYRIGHT NEWS README.cvs README.des README.hackers TODO WHERE-TO-START acconfig.h config.guess config.h.in config.sub excludes install-sh dot.emacs build NOTES.y2kfixes readme.y2kfixes results.y2kfixes
+#ETAGS_ARGS = $(srcdir)/Makefile.am $(srcdir)/configure.in
+ETAGS_ARGS = Makefile.am configure.in acconfig.h
+
+# DIST_CPDIRS = conf html scripts
+# DIST_MKDIRS = adjtime clockstuff kernel libparse ppsclock
+#DIST_HOOK_DIRS = conf html patches ports scripts
+# HMS: make ports be the last directory...
+DIST_HOOK_DIRS = conf html scripts ports
+
+BUILT_SOURCES = $(srcdir)/COPYRIGHT
+
+CVO = `$(srcdir)/config.guess`
+
+BHOST = `(hostname || uname -n)`
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+DIST_COMMON = README ./stamp-h.in ChangeLog INSTALL Makefile.am \
+Makefile.in NEWS TODO acconfig.h aclocal.m4 config.guess config.h.in \
+config.sub configure configure.in install-sh missing mkinstalldirs
+
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): configure.in
+ cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+config.h: stamp-h
+ @if test ! -f $@; then \
+ rm -f stamp-h; \
+ $(MAKE) stamp-h; \
+ else :; fi
+stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h stamp-hT
+ @echo timestamp > stamp-hT 2> /dev/null
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=config.h \
+ $(SHELL) ./config.status
+ @mv stamp-hT stamp-h
+$(srcdir)/config.h.in: $(srcdir)/./stamp-h.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/./stamp-h.in; \
+ $(MAKE) $(srcdir)/./stamp-h.in; \
+ else :; fi
+$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+ @rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
+ @echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
+ cd $(top_srcdir) && $(AUTOHEADER)
+ @mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+ -rm -f config.h
+
+maintainer-clean-hdr:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+ rev="$$subdir $$rev"; \
+ if test "$$subdir" = "."; then dot_seen=yes; else :; fi; \
+ done; \
+ test "$$dot_seen" = "no" && rev=". $$rev"; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ ${AWK:-awk} ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ ${AWK:-awk} ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -rm -rf $(distdir)
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ dc_install_base=`cd $(distdir)/=inst && pwd`; \
+ cd $(distdir)/=build \
+ && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) dist
+ -rm -rf $(distdir)
+ @banner="$(distdir).tar.gz is ready for distribution"; \
+ dashes=`echo "$$banner" | sed s/./=/g`; \
+ echo "$$dashes"; \
+ echo "$$banner"; \
+ echo "$$dashes"
+dist: distdir
+ -chmod -R a+r $(distdir)
+ $(AMTAR) ch$(AMTARFLAGS)f - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
+ -rm -rf $(distdir)
+dist-tarZ: distdir
+ -chmod -R a+r $(distdir)
+ $(AMTAR) ch$(AMTARFLAGS)f - $(distdir) | compress -c > $(distdir).tar.Z
+ -rm -rf $(distdir)
+dist-all: distdir
+ -chmod -R a+r $(distdir)
+ $(AMTAR) ch$(AMTARFLAGS)f - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
+ $(AMTAR) ch$(AMTARFLAGS)f - $(distdir) | compress -c > $(distdir).tar.Z
+ -rm -rf $(distdir)
+distdir: $(DISTFILES)
+ -rm -rf $(distdir)
+ mkdir $(distdir)
+ -chmod 777 $(distdir)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+ for subdir in $(SUBDIRS); do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ chmod 777 $(distdir)/$$subdir; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+all-recursive-am: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+install-exec-am:
+install-exec: install-exec-recursive
+
+install-data-am:
+install-data: install-data-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am:
+uninstall: uninstall-recursive
+all-am: Makefile config.h
+all-redirect: all-recursive-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
+
+distclean: distclean-recursive
+ -rm -f config.status
+
+maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
+ maintainer-clean-generic distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f config.status
+
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+install-recursive uninstall-recursive install-data-recursive \
+uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
+install-exec-am install-exec install-data-am install-data install-am \
+install uninstall-am uninstall all-redirect all-am all install-strip \
+installdirs-am installdirs mostlyclean-generic distclean-generic \
+clean-generic maintainer-clean-generic clean mostlyclean distclean \
+maintainer-clean
+
+
+$(srcdir)/COPYRIGHT: html/copyright.htm
+ ( echo "This file is automatically generated from html/copyright.htm" ; lynx -dump $(srcdir)/html/copyright.htm ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT
+
+# local-dist: dist-tarZ
+
+dist-hook:
+ -for i in $(DIST_HOOK_DIRS); do \
+ mkdir $(distdir)/$$i ; \
+ cp -rp $(srcdir)/$$i $(distdir) ; \
+ done ; \
+ find $(distdir) -type d -name CVS -exec rm -rf '{}' \; ; \
+ # find $(distdir)/html -name '*.htm' -exec dos2unix {} {} \; ; \
+ # cp -rp $(srcdir)/include/winnt $(distdir)/include
+
+dist-export: distdir
+ rm $(distdir)/libntp/authdes.c
+ cp $(distdir)/libntp/authdes.c.export $(distdir)/libntp/authdes.c
+ chmod -R a+r $(distdir)
+ mv $(distdir) $(distdir)-export
+ $(TAR) chozf $(distdir)-export.tar.gz $(distdir)-export
+ rm -rf $(distdir)-export
+
+Makefile: .warning
+
+.buildcvo:
+ echo "$(CVO)" > .buildcvo
+
+.checkcvo: .buildcvo FRC.checkcvo
+ @if [ "`cat .buildcvo`" != "$(CVO)" ];then \
+ echo "This directory was configured for `cat .buildcvo`"; \
+ echo "but this machine is a $(CVO)"; \
+ exit 1; \
+ fi
+
+.buildhost:
+ echo "$(BHOST)" > .buildhost
+
+.checkhost: .buildhost FRC.checkhost
+ @if [ "`cat .buildhost`" != "$(BHOST)" ];then \
+ echo "Built on `cat .buildhost` but this is $(BHOST)"; \
+ echo " "; \
+ fi
+
+.warning:
+ @echo "Compiling with GCC now generates lots of new warnings."
+ @echo " "
+ @echo "Don't be concerned. They're just warnings."
+ @echo " "
+ @echo "Don't send bug reports about the warnings, either."
+ @echo " "
+ @echo "Feel free to send patches that fix these warnings, though."
+ @echo " "
+ @sleep 1
+ @touch .warning
+
+FRC.distwarn FRC.checkcvo FRC.checkhost:
+
+dot.emacs: FRC.distwarn
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/ntp/NEWS b/contrib/ntp/NEWS
new file mode 100644
index 000000000000..8fee9b0adb7d
--- /dev/null
+++ b/contrib/ntp/NEWS
@@ -0,0 +1,83 @@
+(4.0.98)
+* Solaris kernel FLL bug is fixed in 106541-07
+* Bug/lint cleanup
+* PPS cleanup
+* ReliantUNIX patches
+* NetInfo support
+* Ultralink driver
+* Trimble OEM Ace-II support
+* DCF77 power choices
+* Oncore improvements
+(4.0.97)
+* NT patches
+* AIX,SunOS,IRIX portability
+* NeXT portability
+* ntptimeset utility added
+* cygwin portability patches
+(4.0.96)
+* -lnsl, -lsocket, -lgen configuration patches
+* Y2K patches from AT&T
+* Linux portability cruft
+(4.0.95)
+* NT port cleanup/replacement
+* a few portability fixes
+* VARITEXT Parse clock added
+(4.0.94)
+* PPS updates (including ntp.config options)
+* Lose the old DES stuff in favor of the (optional) RSAREF stuff
+* html cleanup/updates
+* numerous drivers cleaned up
+* numerous portability patches and code cleanup
+(4.0.93)
+* Oncore refclock needs PPS or one of two ioctls.
+* Don't make ntptime under Linux. It doesn't compile for too many folks.
+* Autokey cleanup
+* ReliantUnix patches
+* html cleanup
+* tickadj cleanup
+* PARSE cleanup
+* IRIX -n32 cleanup
+* byte order cleanup
+* ntptrace improvements and patches
+* ntpdc improvements and patches
+* PPS cleanup
+* mx4200 cleanup
+* New clock state machine
+* SCO cleanup
+* Skip alias interfaces
+(4.0.92)
+* chronolog and dumbclock refclocks
+* SCO updates
+* Cleanup/bugfixes
+* Y2K patches
+* Updated palisade driver
+* Plug memory leak
+* wharton kernel clock
+* Oncore clock upgrades
+* NMEA clock improvements
+* PPS improvements
+* AIX portability patches
+(4.0.91)
+* New ONCORE driver
+* New MX4200 driver
+* Palisade improvements
+* config file bugfixes and problem reporting
+* autoconf upgrade and cleanup
+* HP-UX, IRIX lint cleanup
+* AIX portability patches
+* NT cleanup
+(4.0.90)
+* Nanoseconds
+* New palisade driver
+* New Oncore driver
+(4.0.73)
+* README.hackers added
+* PARSE driver is working again
+* Solaris 2.6 has nasty kernel bugs. DO NOT enable pll!
+* DES is out of the distribution.
+(4.0.72)
+* K&R C compiling should work again.
+* IRIG patches.
+* MX4200 driver patches.
+* Jupiter driver added.
+* Palisade driver added. Needs work (ANSI, ntoh/hton, sizeof double, ???)
diff --git a/contrib/ntp/NOTES.y2kfixes b/contrib/ntp/NOTES.y2kfixes
new file mode 100644
index 000000000000..cf181c1377f1
--- /dev/null
+++ b/contrib/ntp/NOTES.y2kfixes
@@ -0,0 +1,107 @@
+Name of the Application: xntp
+
+Version Number: 4.0.91
+
+Download Size: 4541953 bytes
+
+Downloaded from: http://www.eecis.udel.edu/~ntp/
+
+Operating Systems Supported: many
+
+Operating Systems Tested: unix
+
+Testing
+
+Dates tested (CPU clock set)
+
+ 1999-12-31
+ 2000-01-01
+ 2000-02-29
+
+ Critical fragments of code tested with other dates by special
+ algorithms.
+
+Hardware Platform: Sun Sparc
+
+OS: Solaris 2.6
+
+Compiler: gcc
+
+Version: 2.8.1
+
+Repairs: 9
+
+No. of files Repaired: 13
+
+
+Compilation of Patches Required: yes
+
+Results Description:
+
+1) Tested suspicious code.
+
+2) Repaired problem code and added documentation to ntp.h.
+
+3) Verified ntpd works on critical Y2K dates.
+
+
+Comments:
+
+1) Errors were found in improper use of tm_year within struct tm,
+ calculations that did not support year 2000 as a leap year
+ (it truly is, despite any unchanged comments remaining in
+ the NTP source), and some incorrect date calculations, while
+ not traditional Y2K errors, would break in the year 2000.
+
+2) include/ntpd.h
+ Added some definitions and documentation about the right way
+ of doing things. Definitions used by most, if not all, of
+ the Y2K repairs.
+
+Cautions:
+
+1) Some of the Y2K repairs were to reference clock drivers that
+ we did not have the local hardware to test. While I believe
+ the changes are sound, they really need to be tested.
+ This includes:
+
+ refclock_arc.c
+ refclock_heath.c
+ refclock_hpgps.c
+
+ Also, parseutil/dcfd.c is another hardware dependent module that
+ was repaired without live testing.
+
+Non-Y2K Problems Observed:
+
+1) Inconsistent casts of variables containing time values may
+ make expansion to 64 bit integer values in a portable manner
+ difficult.
+
+2) libntp/caltontp.c:
+ Has logic I believe will fail starting in year 2100 or so.
+ Left unchanged/untested as it works well beyond basic NTP 2036
+ limit checked by check_y2k.c.
+ If NTP is implemented on 64-bit machines, this should be fixed
+
+3) ntpd/refclock_acts.c:
+ ACTS time format has changed somewhat since the code was written.
+ In particular the '*' '#' character switch no longer occurs...
+ only '*' is typed.
+
+ NOTE: Author (falsely) stated Y2K is NOT a leap year when it
+ really is.
+
+ TRUTH: ACTS will go beyond Y2K: it uses FourDigitYear % 100 values
+ for year so year 2000 will revert to "00".
+
+
+4) ntpd/refclock_oncore.c
+ Some very strange logic in manipulating year values:
+ 1122 instance->pp->year = buf[6]*256+buf[7];
+ Multiply by 256????
+
+ Response from PHK:
+ The entire protocol is binary, the year is a 16 bit quantity
+ which according to the manual can have the range 1998-2018.
+
diff --git a/contrib/ntp/README b/contrib/ntp/README
new file mode 100644
index 000000000000..a5916d856a40
--- /dev/null
+++ b/contrib/ntp/README
@@ -0,0 +1,152 @@
+The ntp Distribution Base Directory
+
+This directory and its subdirectories contain the Network Time Protocol
+Version 4 (NTP) distribution for Unix and Windows/NT systems. This release
+may still work on VxWorks, too.
+
+The contents of the base directory are given in this file. The contents of
+subdirectories are given in the README files in each subdirectory.
+
+A complete explanation of the configure, compile and install process, as
+well as setting up an NTP subnet, is in the HTML pages in the ./html/
+directory. For more information on NTP and how to get a working setup,
+read WHERE-TO-START.
+
+For Windows/NT, visit html/hints/winnt .
+
+The base directory ./ contains the autoconfiguation files, source
+directories and related stuff:
+
+COPYRIGHT Excerpt from the HTML file ./html/copyright.html. This file
+ specifies copyright conditions, together with a list of
+ major authors and electric addresses.
+
+INSTALL Generic installation instructions for autoconf-based programs.
+ Unless you really know what you are doing, you should read the
+ directions in the HTML pages, starting with ./html/index.htm.
+
+NEWS What's new in this release.
+
+README This file.
+
+README.cvs Instructions for folks who use the CVS-repository
+ version of NTP.
+
+README.des If you *need* DES support.
+
+README.hackers Notes to folks who want to hack on the code.
+
+TODO List of items the NTP developers are working on.
+
+WHERE-TO-START Hints on what to read in order to get a working
+ configuration.
+
+Makefile.am Automake file configuration file. Edit only if you have the
+ GNU automake and autoconf utilities installed.
+
+Makefile.in Autoconf make file template for Unix.
+
+acconfig.h Autoconf template header file. Edit only if you
+ have the GNU automake and autoconf utilities installed.
+
+adjtimed Directory containing the sources for the adjtime daemon
+ for HP/UX systems prior to HP-UX 10.0.
+
+authstuff Directory containing sources for miscellaneous programs
+ to test, calibrate and certify the cryptographic
+ mechanisms for DES and MD5 based authentication. These
+ programs do not include the cryptographic routines
+ themselves, so are free of U.S. export restrictions.
+
+build A script to build the distribution in A.`config.guess`
+ subdirectory (more or less).
+
+clockstuff Directory containing sources for miscellaneous programs
+ to test certain auxiliary programs used with some kernel
+ configurations, together with a program to calculate
+ propagation delays for use with radio clocks and
+ national time dissemination services such as WWV/WWVH,
+ WWVB and CHU.
+
+conf Directory containing a motley collection of
+ configuration files for various systems. For example only.
+
+config.guess Script used to identify the machine architecture and
+ operating system.
+
+config.h.in Configuration file generated automatically from
+ configure.in. Do not edit.
+
+configure Script used to configure the distribution. See the HTML pages
+ (./html/index.htm) for a complete description of the options
+ available.
+
+configure.in Master configuration template. Edit only if you have the
+ GNU automake and autoconf utilities installed.
+
+dot.emacs C-mode indentation rules for code "Just the way Dave likes it".
+
+flock_build (UDel only) Build the distribution on a number of
+ different platforms.
+
+html Directory containing a complete set of documentation on
+ building and configuring a NTP server or client. The
+ documentation is in the form of HTML files suitable for
+ browsing and contains links to additional documentation
+ at various web sites. If a browser is unavailable, an
+ ordinary text editor can be used.
+
+include Directory containing include header files used by most
+ programs in the distribution.
+
+install-sh Script to install a program, script or data file.
+
+kernel Directory containing sources for kernel programs such as
+ line disciplines and STREAMS modules used with the CHU
+ decoder and precision PPS signals.
+
+libntp Directory containing library source code used by most
+ programs in the distribution.
+
+librsaref Staging directory for RSAREF.
+
+ntp_update Update an NTP CVS tree.
+
+ntpdate Directory containing sources for a program to set the
+ local machine time from one or more remote machines
+ running NTP. Operates like rdate, but much more accurate.
+
+ntpq Directory containing sources for a utility program to
+ query local and remote NTP peers for state variables and
+ related timekeeping information. This program conforms
+ to Appendix A of the NTP Version 3 Specification RFC 1305.
+
+ntptrace Directory containing sources for a utility program that
+ can be used to reveal the chain of NTP peers from a
+ designated peer to the primary server at the root of the
+ timekeeping subnet.
+
+parse Directory containing files belonging to the generic
+ parse reference clock driver. For reasonably simple
+ clocks it is possible to get away with about 3-4Kb of
+ code. additionally the SunOS 4.x/Solaris 5.3 streams
+ module for parse squats here.
+
+patches Directory containing patches already applied to this
+ distribution. These are included for record and to help
+ in possible porting problems.
+
+scripts Directory containing scripts to build the configuration
+ files in this directory and then the makefiles used in
+ various dependent directories. the subdirectories
+ monitoring and support hold various perl and shell
+ scripts for visualizing synchronization and daemon startup.
+
+stamp.h.in Configuration file generated automatically from configure.in.
+ Do not edit.
+
+util Directory containing sources for various utility and
+ testing programs.
+
+David L. Mills (mills@udel.edu)
+21 June 1998
diff --git a/contrib/ntp/README.cvs b/contrib/ntp/README.cvs
new file mode 100644
index 000000000000..b9f352a7179b
--- /dev/null
+++ b/contrib/ntp/README.cvs
@@ -0,0 +1,24 @@
+To get the NTP distribution via anonymous CVS:
+
+ cvs -d :pserver:anoncvs@www.ntp.org:/cvs/ntp login
+
+the password is: anoncvs
+
+ cvs -d :pserver:anoncvs@www.ntp.org:/cvs/ntp co ntp
+
+after which the "ntp_update" script in the top-level of the tree should
+keep things in synch and properly timestamped.
+
+There are some mailing lists for the NTP CVS distribution. For more
+information, send a message to <majordomo@ntp.org> with the "lists" in
+the body of the message.
+
+If you get NTP via CVS, you will need to build the release using GNU make
+and gcc.
+
+You can then "make dist" to build a release tarball that does not require
+GNU make or gcc.
+
+The reason GNU make and gcc are required is because the repository version
+of NTP does not have the make dependencies built-in. These dependencies
+are created dynamically, and this dynamic process requires GNU make and gcc.
diff --git a/contrib/ntp/README.des b/contrib/ntp/README.des
new file mode 100644
index 000000000000..072d72e85950
--- /dev/null
+++ b/contrib/ntp/README.des
@@ -0,0 +1,20 @@
+If you want DES support in ntp:
+
+- Use MD5 instead:
+- - convert your DES keys to MD5 by changing the 'A', 'N' or 'S' to 'M'
+
+If you *need* DES support:
+
+- first see if you can simply "want" DES support instead
+- Get RSAREF or RSAEURO (or a reasonable facsimile thereof)
+- - Unpack it in the top-level source directory of the NTP distribution
+ (You should see directories like ports, rsaref2, scripts)
+
+When you run configure, the Right Thing will happen.
+
+Be advised that the RSA DES code is not quite as portable os one might
+wish for. In particular, DES under NTP will only work between machines
+of the same "endianness".
+
+Dave would prefer that new/alternative encryption schemes follow the
+RSA API.
diff --git a/contrib/ntp/README.hackers b/contrib/ntp/README.hackers
new file mode 100644
index 000000000000..230cd3239c07
--- /dev/null
+++ b/contrib/ntp/README.hackers
@@ -0,0 +1,25 @@
+Notes to hackers.
+
+---
+
+Dave likes this code indented formatted in a consistent way.
+The file "dot.emacs" has the emacs C-mode indentation style that Dave likes.
+
+---
+
+NTP4 uses ANSI C. Some folks are blessed with a pre-ansi C compiler. We
+support them by using "ansi2knr" in the Makefiles, which is automatically
+detected and selected by the configure process.
+
+For ansi2knr to work, we MUST define functions as follows:
+
+type stuff
+function_name ( actual parameters )
+
+While the whitespace is optional, the function name MUST start at column 0.
+
+---
+
+We'd like to see *all* system function declarations live in include/l_stdlib.h
+and NEVER appear in the .c files.
+
diff --git a/contrib/ntp/TODO b/contrib/ntp/TODO
new file mode 100644
index 000000000000..e57a2c46b2bd
--- /dev/null
+++ b/contrib/ntp/TODO
@@ -0,0 +1,126 @@
+
+ *** IF YOU CAN HELP FIX ANY OF THESE THINGS, PLEASE DO! ***
+
+970711: Look Real Hard at changing the key stuff from u_long to u_int32.
+
+970711: Make sure it's safe to convert proto_config's 2nd argument from
+ u_long to u_int32. Watch "set" in ntp_request.c:setclr_flags().
+
+970318: in hourly_stats(?), squawk if the magnitude of the drift is,
+ say, >400.
+
+970301: Implement the utmp/wtmp timestamping on time steps.
+
+970210: Find a way to dump the current configuration to either syslog or
+ a file.
+
+CPP macros we need to handle:
+
+ SUN_3_3_STINKS (this will be easy to handle if anybody still needs it)
+
+Problems that need to be fixed:
+
+- Get rid of the old SYS_* macros:
+ (It's worth noting that any code that would have been "enabled" by any
+ of these macros has not been used since 5.83, and there have been very
+ few complaints...)
+
+ SYS_44BSD:
+ authstuff/md5driver.c
+
+ SYS_BSDI:
+ authstuff/md5driver.c
+
+ SYS_DECOSF1:
+ util/ntptime.c
+
+ SYS_DOMAINOS:
+ parseutil/dcfd.c
+ xntpd/ntpd.c
+
+ SYS_HPUX:
+ kernel/sys/ppsclock.h
+ ntpdate/ntpdate.c
+ ntptrace/ntptrace.c
+
+ SYS_PTX:
+ libntp/machines.c
+
+ SYS_SOLARIS:
+ libparse/parse.c
+ libparse/clk_trimtsip.c
+ xntpd/ntp_io.c
+ xntpd/ntp_refclock.c
+ xntpd/ntpd.c
+
+ SYS_SUNOS4:
+ libparse/parse.c
+ libparse/clk_trimsip.c
+
+ SYS_WINNT:
+ include/ntp.h
+ include/ntp_fp.h
+ include/ntp_if.h
+ include/ntp_machine.h
+ include/ntp_select.h
+ include/ntp_syslog.h
+ include/ntp_unixtime.h
+ include/ntpd.h
+ libntp/libntp.mak
+ libntp/machines.c
+ libntp/mexit.c
+ libntp/msyslog.c
+ libntp/systime.c
+ ntpdate/ntpdate.c
+ ntpdate/ntpdate.mak
+ ntpq/ntpq.c
+ ntpq/ntpq.mak
+ ntpq/ntpq_ops.c
+ ntptrace/ntptrace.c
+ ntptrace/ntptrace.mak
+ xntpd/ntp_config.c
+ xntpd/ntp_filegen.c
+ xntpd/ntp_intres.c
+ xntpd/ntp_io.c
+ xntpd/ntp_loopfilter.c
+ xntpd/ntp_peer.c
+ xntpd/ntp_proto.c
+ xntpd/ntp_refclock.c
+ xntpd/ntp_timer.c
+ xntpd/ntp_unixclock.c
+ xntpd/ntp_util.c
+ xntpd/ntpd.c
+ xntpd/xntpd.mak
+ xntpdc/ntpdc.c
+ xntpdc/xntpdc.mak
+
+- config.guess might need help to identify:
+
+ Fujitsu's UXP --enable-adjtime-is-accurate
+ --enable-step-slew
+
+ Unixware --enable-adjtime-is-accurate
+ --enable-tick=10000
+ --enable-tickadj=80
+ --enable-udp-wildcard
+ --disable-step-slew
+
+ DomainOS --enable-adjtime-is-accurate
+ --disable-kmem
+ --enable-tick=1000000
+
+ OpenVMS --enable-slew-always
+ --enable-hourly-todr-sync
+
+ Is adjtime accurate on ALL sysv4* machines?
+ Can we identify DomainOS with *-apollo-* ?
+ Do we catch all Unixware machines with *-univel-sysv* ?
+
+- How can we test if UDP_WILDCARD_DELIVERY should be used?
+
+- Combine enable-step-slew and enable-ntpdate-step
+
+- Make sure enable-hourly-todr-sync is always disabled
+ What about NextStep and OpenVMS, where hourly TODR sync used to be enabled?
+
+- Check dcfd.c for variables that need to be volatile.
diff --git a/contrib/ntp/WHERE-TO-START b/contrib/ntp/WHERE-TO-START
new file mode 100644
index 000000000000..2e3e77b26eb1
--- /dev/null
+++ b/contrib/ntp/WHERE-TO-START
@@ -0,0 +1,41 @@
+The Network Time Protocol (NTP) Version 4 Distribution
+
+This is a distribution of the Network Time Protocol (NTP) Version 4
+sources and documentation. NTP can be used by Unix, DEC VMS and
+Microsoft Windows NT platforms to synchronize the computer clock to
+external sources of time, such as other NTP time servers or a local
+radio clock. The daemon included in this distribution can operate as a
+server, a client, or a relay from a set of servers to a dependent client
+population on a local net. This distribution includes the daemon itself,
+plus utility programs and supporting documentation.
+
+You are welcome to the lot, with due consideration of the copyright
+information in the COPYRIGHT file. You are also invited to contribute
+bugfixes and drivers for new and exotic radios, telephones and sundials.
+This distribution is normally available by anonymous ftp as the
+compressed tar archive ntp-<version>.tar.Z in the pub/ntp directory on
+louie.udel.edu and <version> is the version number. The current version
+number can be found on the NTP web page <http://www.eecis.udel.edu/~ntp>.
+
+A considerable amount of documentation, including build instructions,
+configuration advice, program usage and miscellaneous information is
+included in the ./html directory of this distribution. The intended
+access method is using a web browser such as netscape; however, the
+pages have been formatted so that viewing with an ordinary text editor
+is practical. Start the browser on the ./html/index.htm page, which
+contains additional instructions and hotlinks to the remaining pages.
+Some hotlinks for the larger documents, such as related technical
+memoranda, reports and papers, lead to other web sites where this
+information is stashed. We apologize for the inconvenience this may
+cause for users without Internet and World Wide Web access.
+
+If you are an old hand and just want to build the distribution, you
+might find the INSTALL file a useful shortcut. A descriptive list of all
+files in the base directory of this distribution is in the README file.
+A list of "significant" changes for the release is in the NEWS file.
+
+If you're interested in helping us test pre-release versions of ntpd,
+please look in <ftp://louie.udel.edu/pub/ntp/testing/>.
+
+David L. Mills (mills@udel.edu)
+21 June 1998
diff --git a/contrib/ntp/acconfig.h b/contrib/ntp/acconfig.h
new file mode 100644
index 000000000000..82051d95219e
--- /dev/null
+++ b/contrib/ntp/acconfig.h
@@ -0,0 +1,457 @@
+/* Package */
+#undef PACKAGE
+
+/* Version */
+#undef VERSION
+
+/* debugging code */
+#undef DEBUG
+
+/* Minutes per DST adjustment */
+#undef DSTMINUTES
+
+/* MD5 authentication */
+#undef MD5
+
+/* DES authentication (COCOM only) */
+#undef DES
+
+/* time_t */
+#undef time_t
+
+/* reference clock interface */
+#undef REFCLOCK
+
+/* Audio CHU? */
+#undef AUDIO_CHU
+
+/* ACTS modem service */
+#undef CLOCK_ACTS
+
+/* Arbiter 1088A/B GPS receiver */
+#undef CLOCK_ARBITER
+
+/* DHD19970505: ARCRON support. */
+#undef CLOCK_ARCRON_MSF
+
+/* Austron 2200A/2201A GPS receiver */
+#undef CLOCK_AS2201
+
+/* PPS interface */
+#undef CLOCK_ATOM
+
+/* PPS auxiliary interface for ATOM */
+#undef PPS_SAMPLE
+
+/* Datum/Bancomm bc635/VME interface */
+#undef CLOCK_BANC
+
+/* ELV/DCF7000 clock */
+#undef CLOCK_DCF7000
+
+/* HOPF 6021 clock */
+#undef CLOCK_HOPF6021
+
+/* Meinberg clocks */
+#undef CLOCK_MEINBERG
+
+/* DCF77 raw time code */
+#undef CLOCK_RAWDCF
+
+/* RCC 8000 clock */
+#undef CLOCK_RCC8000
+
+/* Schmid DCF77 clock */
+#undef CLOCK_SCHMID
+
+/* Trimble GPS receiver/TAIP protocol */
+#undef CLOCK_TRIMTAIP
+
+/* Trimble GPS receiver/TSIP protocol */
+#undef CLOCK_TRIMTSIP
+
+/* WHARTON 400A Series protocol */
+#undef CLOCK_WHARTON_400A
+
+/* VARITEXT protocol */
+#undef CLOCK_VARITEXT
+
+/* Diems Computime Radio Clock */
+#undef CLOCK_COMPUTIME
+
+/* Datum Programmable Time System */
+#undef CLOCK_DATUM
+
+/* TrueTime GPS receiver/VME interface */
+#undef CLOCK_GPSVME
+
+/* Heath GC-1000 WWV/WWVH receiver */
+#undef CLOCK_HEATH
+
+/* HP 58503A GPS receiver */
+#undef CLOCK_HPGPS
+
+/* Sun IRIG audio decoder */
+#undef CLOCK_IRIG
+
+/* Rockwell Jupiter GPS clock */
+#undef CLOCK_JUPITER
+
+/* Leitch CSD 5300 Master Clock System Driver */
+#undef CLOCK_LEITCH
+
+/* local clock reference */
+#undef CLOCK_LOCAL
+
+/* EES M201 MSF receiver */
+#undef CLOCK_MSFEES
+
+/* Magnavox MX4200 GPS receiver */
+#undef CLOCK_MX4200
+
+/* NMEA GPS receiver */
+#undef CLOCK_NMEA
+
+/* Palisade clock */
+#undef CLOCK_PALISADE
+
+/* PARSE driver interface */
+#undef CLOCK_PARSE
+
+/* PARSE kernel PLL PPS support */
+#undef PPS_SYNC
+
+/* PCL 720 clock support */
+#undef CLOCK_PPS720
+
+/* PST/Traconex 1020 WWV/WWVH receiver */
+#undef CLOCK_PST
+
+/* PTB modem service */
+#undef CLOCK_PTBACTS
+
+/* clock thru shared memory */
+#undef CLOCK_SHM
+
+/* Motorola UT Oncore GPS */
+#undef CLOCK_ONCORE
+
+/* KSI/Odetics TPRO/S GPS receiver/IRIG interface */
+#undef CLOCK_TPRO
+
+/* TRAK 8810 GPS receiver */
+#undef CLOCK_TRAK
+
+/* Kinemetrics/TrueTime receivers */
+#undef CLOCK_TRUETIME
+
+/* USNO modem service */
+#undef CLOCK_USNO
+
+/* Spectracom 8170/Netclock/2 WWVB receiver */
+#undef CLOCK_WWVB
+
+/* Ultralink M320 WWVB receiver */
+#undef CLOCK_ULINK
+
+/* Chronolog K-series WWVB receiver */
+#undef CLOCK_CHRONOLOG
+
+/* Dumb generic hh:mm:ss local clock */
+#undef CLOCK_DUMBCLOCK
+
+/* define if we need to declare int errno; */
+#undef DECL_ERRNO
+
+/* define if we may declare int h_errno; */
+#undef DECL_H_ERRNO
+
+/* define if it's OK to declare char *sys_errlist[]; */
+#undef CHAR_SYS_ERRLIST
+
+/* define if it's OK to declare int syscall P((int, struct timeval *, struct timeval *)); */
+#undef DECL_SYSCALL
+
+/* define if we have syscall is buggy (Solaris 2.4) */
+#undef SYSCALL_BUG
+
+/* Do we need extra room for SO_RCVBUF? (HPUX <8) */
+#undef NEED_RCVBUF_SLOP
+
+/* Should we open the broadcast socket? */
+#undef OPEN_BCAST_SOCKET
+
+/* Do we want the HPUX FindConfig()? */
+#undef NEED_HPUX_FINDCONFIG
+
+/* canonical system (cpu-vendor-os) string */
+#undef STR_SYSTEM
+
+/* define if NetInfo support is available */
+#undef HAVE_NETINFO
+
+/* define if [gs]ettimeofday() only takes 1 argument */
+#undef SYSV_TIMEOFDAY
+
+/* define if struct sockaddr has sa_len */
+#undef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+
+/* define if struct clockinfo has hz */
+#undef HAVE_HZ_IN_STRUCT_CLOCKINFO
+
+/* define if struct sigaction has sa_sigaction */
+#undef HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION
+
+/* define if struct clockinfo has tickadj */
+#undef HAVE_TICKADJ_IN_STRUCT_CLOCKINFO
+
+/* define if struct ntptimeval uses time.tv_nsec instead of time.tv_usec */
+#undef HAVE_TV_NSEC_IN_NTPTIMEVAL
+
+/* Does a system header defind struct ppsclockev? */
+#undef HAVE_STRUCT_PPSCLOCKEV
+
+/* define if function prototypes are OK */
+#undef HAVE_PROTOTYPES
+
+/* define if setpgrp takes 0 arguments */
+#undef HAVE_SETPGRP_0
+
+/* hardwire a value for tick? */
+#undef PRESET_TICK
+
+/* hardwire a value for tickadj? */
+#undef PRESET_TICKADJ
+
+/* is adjtime() accurate? */
+#undef ADJTIME_IS_ACCURATE
+
+/* should we NOT read /dev/kmem? */
+#undef NOKMEM
+
+/* use UDP Wildcard Delivery? */
+#undef UDP_WILDCARD_DELIVERY
+
+/* always slew the clock? */
+#undef SLEWALWAYS
+
+/* step, then slew the clock? */
+#undef STEP_SLEW
+
+/* force ntpdate to step the clock if !defined(STEP_SLEW) ? */
+#undef FORCE_NTPDATE_STEP
+
+/* synch TODR hourly? */
+#undef DOSYNCTODR
+
+/* do we set process groups with -pid? */
+#undef UDP_BACKWARDS_SETOWN
+
+/* must we have a CTTY for fsetown? */
+#undef USE_FSETOWNCTTY
+
+/* can we use SIGIO for tcp and udp IO? */
+#undef HAVE_SIGNALED_IO
+
+/* can we use SIGPOLL for UDP? */
+#undef USE_UDP_SIGPOLL
+
+/* can we use SIGPOLL for tty IO? */
+#undef USE_TTY_SIGPOLL
+
+/* should we use clock_settime()? */
+#undef USE_CLOCK_SETTIME
+
+/* do we want the CHU driver? */
+#undef CLOCK_CHU
+
+/* do we have the ppsclock streams module? */
+#undef PPS
+
+/* do we have the tty_clk line discipline/streams module? */
+#undef TTYCLK
+
+/* does the kernel support precision time discipline? */
+#undef KERNEL_PLL
+
+/* does the kernel support multicasting IP? */
+#undef MCAST
+
+/* do we have ntp_{adj,get}time in libc? */
+#undef NTP_SYSCALLS_LIBC
+
+/* do we have ntp_{adj,get}time in the kernel? */
+#undef NTP_SYSCALLS_STD
+
+/* do we have STREAMS/TLI? (Can we replace this with HAVE_SYS_STROPTS_H? */
+#undef STREAMS_TLI
+
+/* do we need an s_char typedef? */
+#undef NEED_S_CHAR_TYPEDEF
+
+/* include the GDT Surveying code? */
+#undef GDT_SURVEYING
+
+/* does SIOCGIFCONF return size in the buffer? */
+#undef SIZE_RETURNED_IN_BUFFER
+
+/* what is the name of TICK in the kernel? */
+#undef K_TICK_NAME
+
+/* Is K_TICK_NAME (nsec_per_tick, for example) in nanoseconds? */
+#undef TICK_NANO
+
+/* what is the name of TICKADJ in the kernel? */
+#undef K_TICKADJ_NAME
+
+/* Is K_TICKADJ_NAME (hrestime_adj, for example) in nanoseconds? */
+#undef TICKADJ_NANO
+
+/* what is (probably) the name of DOSYNCTODR in the kernel? */
+#undef K_DOSYNCTODR_NAME
+
+/* what is (probably) the name of NOPRINTF in the kernel? */
+#undef K_NOPRINTF_NAME
+
+/* do we need HPUX adjtime() library support? */
+#undef NEED_HPUX_ADJTIME
+
+/* Might nlist() values require an extra level of indirection (AIX)? */
+#undef NLIST_EXTRA_INDIRECTION
+
+/* Should we recommend a minimum value for tickadj? */
+#undef MIN_REC_TICKADJ
+
+/* Is there a problem using PARENB and IGNPAR (IRIX)? */
+#undef NO_PARENB_IGNPAR
+
+/* Should we not IGNPAR (Linux)? */
+#undef RAWDCF_NO_IGNPAR
+
+/* Does the compiler like "volatile"? */
+#undef volatile
+
+/* Does qsort expect to work on "void *" stuff? */
+#undef QSORT_USES_VOID_P
+
+/* What is the fallback value for HZ? */
+#undef DEFAULT_HZ
+
+/* Do we need to override the system's idea of HZ? */
+#undef OVERRIDE_HZ
+
+/* Do we want the SCO clock hacks? */
+#undef SCO5_CLOCK
+
+/* Do we want the ReliantUNIX clock hacks? */
+#undef RELIANTUNIX_CLOCK
+
+/* Does the kernel have an FLL bug? */
+#undef KERNEL_FLL_BUG
+
+/* Define if you have the TIOCGPPSEV ioctl (Solaris) */
+#undef HAVE_TIOCGPPSEV
+
+/* Define if you have the TIOCSPPS ioctl (Solaris) */
+#undef HAVE_TIOCSPPS
+
+/* Define if you have the CIOGETEV ioctl (SunOS, Linux) */
+#undef HAVE_CIOGETEV
+
+/* Define if you have the TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, and ASYNC_PPS_CD_NEG ioctls (linux) */
+#undef HAVE_TIO_SERIAL_STUFF
+
+/* Define if you use struct timespec rather than struct timeval (time in ns rather than us) */
+#undef HAVE_TIMESPEC
+
+/* Define if you have the interface in the Draft RFC */
+#undef HAVE_PPSAPI
+
+/* Do we need to #define _SVID3 when we #include <termios.h>? */
+#undef TERMIOS_NEEDS__SVID3
+
+/***/
+
+/* Which way should we declare... */
+
+/* adjtime()? */
+#undef DECL_ADJTIME_0
+
+/* bcopy()? */
+#undef DECL_BCOPY_0
+
+/* bzero()? */
+#undef DECL_BZERO_0
+
+/* cfset[io]speed()? */
+#undef DECL_CFSETISPEED_0
+
+/* ioctl()? */
+#undef DECL_IOCTL_0
+
+/* IPC? (bind, connect, recvfrom, sendto, setsockopt, socket) */
+#undef DECL_IPC_0
+
+/* memmove()? */
+#undef DECL_MEMMOVE_0
+
+/* memset()? */
+#undef DECL_MEMSET_0
+
+/* mkstemp()? */
+#undef DECL_MKSTEMP_0
+
+/* mktemp()? */
+#undef DECL_MKTEMP_0
+
+/* mrand48()? */
+#undef DECL_MRAND48_0
+
+/* nlist()? */
+#undef DECL_NLIST_0
+
+/* plock()? */
+#undef DECL_PLOCK_0
+
+/* rename()? */
+#undef DECL_RENAME_0
+
+/* select()? */
+#undef DECL_SELECT_0
+
+/* setitimer()? */
+#undef DECL_SETITIMER_0
+
+/* setpriority()? */
+#undef DECL_SETPRIORITY_0
+#undef DECL_SETPRIORITY_1
+
+/* sigvec()? */
+#undef DECL_SIGVEC_0
+
+/* srand48()? */
+#undef DECL_SRAND48_0
+
+/* stdio stuff? */
+#undef DECL_STDIO_0
+
+/* stime()? */
+#undef DECL_STIME_0
+
+/* strtol()? */
+#undef DECL_STRTOL_0
+
+/* syslog() stuff? */
+#undef DECL_SYSLOG_0
+
+/* time()? */
+#undef DECL_TIME_0
+
+/* [gs]ettimeofday()? */
+#undef DECL_TIMEOFDAY_0
+
+/* tolower()? */
+#undef DECL_TOLOWER_0
+
+/* toupper()? */
+#undef DECL_TOUPPER_0
diff --git a/contrib/ntp/aclocal.m4 b/contrib/ntp/aclocal.m4
new file mode 100644
index 000000000000..4c96f8238645
--- /dev/null
+++ b/contrib/ntp/aclocal.m4
@@ -0,0 +1,253 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4
+
+dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN(AM_CONFIG_HEADER,
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated. We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<<am_indx=1
+for am_file in <<$1>>; do
+ case " <<$>>CONFIG_HEADERS " in
+ *" <<$>>am_file "*<<)>>
+ echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+ ;;
+ esac
+ am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN(AM_INIT_AUTOMAKE,
+[AC_REQUIRE([AC_PROG_INSTALL])
+dnl We require 2.13 because we rely on SHELL being computed by configure.
+AC_PREREQ([2.13])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+dnl We check for tar when the user configures the end package.
+dnl This is sad, since we only need this for "dist". However,
+dnl there's no other good way to do it. We prefer GNU tar if
+dnl we can find it. If we can't find a tar, it doesn't really matter.
+AC_CHECK_PROGS(AMTAR, gnutar gtar tar)
+AMTARFLAGS=
+if test -n "$AMTAR"; then
+ if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
+ dnl We have GNU tar.
+ AMTARFLAGS=o
+ fi
+fi
+AC_SUBST(AMTARFLAGS)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN(AM_SANITY_CHECK,
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "[$]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "[$]*" != "X $srcdir/configure conftestfile" \
+ && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "[$]2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN(AM_MISSING_PROG,
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+ $1=$2
+ AC_MSG_RESULT(found)
+else
+ $1="$3/missing $2"
+ AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+
+# serial 1
+
+AC_DEFUN(AM_C_PROTOTYPES,
+[AC_REQUIRE([AM_PROG_CC_STDC])
+AC_REQUIRE([AC_PROG_CPP])
+AC_MSG_CHECKING([for function prototypes])
+if test "$am_cv_prog_cc_stdc" != no; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
+ U= ANSI2KNR=
+else
+ AC_MSG_RESULT(no)
+ U=_ ANSI2KNR=./ansi2knr
+ # Ensure some checks needed by ansi2knr itself.
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS(string.h)
+fi
+AC_SUBST(U)dnl
+AC_SUBST(ANSI2KNR)dnl
+])
+
+
+# serial 1
+
+# @defmac AC_PROG_CC_STDC
+# @maindex PROG_CC_STDC
+# @ovindex CC
+# If the C compiler in not in ANSI C mode by default, try to add an option
+# to output variable @code{CC} to make it so. This macro tries various
+# options that select ANSI C on some system or another. It considers the
+# compiler to be in ANSI C mode if it handles function prototypes correctly.
+#
+# If you use this macro, you should check after calling it whether the C
+# compiler has been set to accept ANSI C; if not, the shell variable
+# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
+# code in ANSI C, you can make an un-ANSIfied copy of it by using the
+# program @code{ansi2knr}, which comes with Ghostscript.
+# @end defmac
+
+AC_DEFUN(AM_PROG_CC_STDC,
+[AC_REQUIRE([AC_PROG_CC])
+AC_BEFORE([$0], [AC_C_INLINE])
+AC_BEFORE([$0], [AC_C_CONST])
+dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
+dnl a magic option to avoid problems with ANSI preprocessor commands
+dnl like #elif.
+dnl FIXME: can't do this because then AC_AIX won't work due to a
+dnl circular dependency.
+dnl AC_BEFORE([$0], [AC_PROG_CPP])
+AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
+AC_CACHE_VAL(am_cv_prog_cc_stdc,
+[am_cv_prog_cc_stdc=no
+ac_save_CC="$CC"
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ AC_TRY_COMPILE(
+[#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+], [
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+],
+[am_cv_prog_cc_stdc="$ac_arg"; break])
+done
+CC="$ac_save_CC"
+])
+if test -z "$am_cv_prog_cc_stdc"; then
+ AC_MSG_RESULT([none needed])
+else
+ AC_MSG_RESULT($am_cv_prog_cc_stdc)
+fi
+case "x$am_cv_prog_cc_stdc" in
+ x|xno) ;;
+ *) CC="$CC $am_cv_prog_cc_stdc" ;;
+esac
+])
+
diff --git a/contrib/ntp/adjtimed/Makefile.am b/contrib/ntp/adjtimed/Makefile.am
new file mode 100644
index 000000000000..14a44c6aedab
--- /dev/null
+++ b/contrib/ntp/adjtimed/Makefile.am
@@ -0,0 +1,8 @@
+#AUTOMAKE_OPTIONS = ../ansi2knr #no-dependencies
+AUTOMAKE_OPTIONS = ../util/ansi2knr
+bin_PROGRAMS = @MAKE_ADJTIMED@
+EXTRA_PROGRAMS = adjtimed
+INCLUDES = -I$(top_srcdir)/include
+LDADD = ../libntp/libntp.a
+#EXTRA_DIST = TAGS
+ETAGS_ARGS = Makefile.am
diff --git a/contrib/ntp/adjtimed/Makefile.in b/contrib/ntp/adjtimed/Makefile.in
new file mode 100644
index 000000000000..f90fd26996f6
--- /dev/null
+++ b/contrib/ntp/adjtimed/Makefile.in
@@ -0,0 +1,334 @@
+# Makefile.in generated automatically by automake 1.4a from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_FLAG =
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AMTAR = @AMTAR@
+AMTARFLAGS = @AMTARFLAGS@
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+CHUTEST = @CHUTEST@
+CLKTEST = @CLKTEST@
+CPP = @CPP@
+DCFD = @DCFD@
+LDFLAGS = @LDFLAGS@
+LIBPARSE = @LIBPARSE@
+LIBRSAREF = @LIBRSAREF@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBPARSE = @MAKE_LIBPARSE@
+MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
+MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+PACKAGE = @PACKAGE@
+PATH_SH = @PATH_SH@
+PROPDELAY = @PROPDELAY@
+RANLIB = @RANLIB@
+RSAREF = @RSAREF@
+TESTDCF = @TESTDCF@
+U = @U@
+VERSION = @VERSION@
+
+#AUTOMAKE_OPTIONS = ../ansi2knr #no-dependencies
+
+
+AUTOMAKE_OPTIONS = ../util/ansi2knr
+bin_PROGRAMS = @MAKE_ADJTIMED@
+EXTRA_PROGRAMS = adjtimed
+INCLUDES = -I$(top_srcdir)/include
+LDADD = ../libntp/libntp.a
+#EXTRA_DIST = TAGS
+ETAGS_ARGS = Makefile.am
+subdir = adjtimed
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(bin_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LIBS = @LIBS@
+ANSI2KNR = ../util/ansi2knr
+adjtimed_SOURCES = adjtimed.c
+adjtimed_OBJECTS = adjtimed$U.o
+adjtimed_LDADD = $(LDADD)
+adjtimed_DEPENDENCIES = ../libntp/libntp.a
+adjtimed_LDFLAGS =
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = adjtimed.c
+DIST_COMMON = README Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+GZIP_ENV = --best
+SOURCES = adjtimed.c
+OBJECTS = adjtimed$U.o
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .c .o
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps adjtimed/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
+ echo " $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/$$f; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f="`echo $$p|sed -e 's/$(EXEEXT)$$//' -e '$(transform)' -e 's/$$/$(EXEEXT)/'`"; \
+ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+ rm -f $(DESTDIR)$(bindir)/$$f; \
+ done
+
+.c.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+../util/ansi2knr: ../util/ansi2knr.o
+ cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
+
+../util/ansi2knr.o:
+ cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr.o
+
+
+mostlyclean-kr:
+ -rm -f *_.c
+
+clean-kr:
+
+distclean-kr:
+
+maintainer-clean-kr:
+adjtimed$U.o:
+
+adjtimed: $(adjtimed_OBJECTS) $(adjtimed_DEPENDENCIES)
+ @rm -f adjtimed
+ $(LINK) $(adjtimed_LDFLAGS) $(adjtimed_OBJECTS) $(adjtimed_LDADD) $(LIBS)
+adjtimed_.c: adjtimed.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/adjtimed.c; then echo $(srcdir)/adjtimed.c; else echo adjtimed.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > adjtimed_.c
+adjtimed_.o : $(ANSI2KNR)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ ${AWK:-awk} ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ ${AWK:-awk} ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+adjtimed.o adjtimed.lo: adjtimed.c ../include/ntp_syslog.h \
+ ../include/ntp_stdlib.h ../include/ntp_types.h \
+ ../include/ntp_machine.h ../config.h ../include/ntp_proto.h \
+ ../include/ntp_string.h ../include/l_stdlib.h \
+ ../include/adjtime.h
+
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binPROGRAMS
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
+ mostlyclean-kr mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-binPROGRAMS clean-compile clean-kr clean-tags \
+ clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-binPROGRAMS distclean-compile distclean-kr \
+ distclean-tags distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-binPROGRAMS \
+ maintainer-clean-compile maintainer-clean-kr \
+ maintainer-clean-tags maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-kr distclean-kr clean-kr \
+maintainer-clean-kr tags mostlyclean-tags distclean-tags clean-tags \
+maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all install-strip installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/ntp/adjtimed/README b/contrib/ntp/adjtimed/README
new file mode 100644
index 000000000000..d4bd593a26b5
--- /dev/null
+++ b/contrib/ntp/adjtimed/README
@@ -0,0 +1,22 @@
+------------------------------------------------------------------------------
+The adjtimed daemon emulates the BSD adjtime(2) system call. The
+adjtime() routine communicates with this daemon via SYSV messages.
+
+The emulation uses an undocumented kernel variable (as of 6.0/2.0
+and later releases) and as such it cannot be guaranteed to work in
+future HP-UX releases. Perhaps HP-UX will have a real adjtime(2)
+system call in the future.
+
+Author: Tai Jin (tai@sde.hp.com)
+------------------------------------------------------------------------------
+
+IMPORTANT NOTE: This stuff must be compiled with no optimization !!
+
+NOTE: This code is known to work as of 8.0 on s300's, s700's and s800's.
+ PLEASE do not modify it unless you have access to kernel sources
+ and fully understand the implications of any changes you are making.
+ One person already has trashed adjtimed by making it do "the right
+ thing". This is not an exact replacement for BSD adjtime(2), don't
+ try to make it into one.
+
+ -- Ken
diff --git a/contrib/ntp/adjtimed/adjtimed.c b/contrib/ntp/adjtimed/adjtimed.c
new file mode 100644
index 000000000000..f38e66dd0f75
--- /dev/null
+++ b/contrib/ntp/adjtimed/adjtimed.c
@@ -0,0 +1,491 @@
+/*************************************************************************/
+/* (c) Copyright Tai Jin, 1988. All Rights Reserved. */
+/* Hewlett-Packard Laboratories. */
+/* */
+/* Permission is hereby granted for unlimited modification, use, and */
+/* distribution. This software is made available with no warranty of */
+/* any kind, express or implied. This copyright notice must remain */
+/* intact in all versions of this software. */
+/* */
+/* The author would appreciate it if any bug fixes and enhancements were */
+/* to be sent back to him for incorporation into future versions of this */
+/* software. Please send changes to tai@iag.hp.com or ken@sdd.hp.com. */
+/*************************************************************************/
+
+#ifndef lint
+static char RCSid[] = "adjtimed.c,v 3.1 1993/07/06 01:04:45 jbj Exp";
+#endif
+
+/*
+ * Adjust time daemon.
+ * This daemon adjusts the rate of the system clock a la BSD's adjtime().
+ * The adjtime() routine uses SYSV messages to communicate with this daemon.
+ *
+ * Caveat: This emulation uses an undocumented kernel variable. As such, it
+ * cannot be guaranteed to work in future HP-UX releases. Fortunately,
+ * it will no longer be needed in HPUX 10.01 and later.
+ */
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/msg.h>
+#include <sys/lock.h>
+#include <time.h>
+#include <signal.h>
+#include <nlist.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "ntp_syslog.h"
+#include "ntp_stdlib.h"
+
+#include "adjtime.h"
+
+double atof (const char *);
+
+int InitClockRate (void);
+int AdjustClockRate (register struct timeval *delta, register struct timeval *olddelta);
+long GetClockRate (void);
+int SetClockRate (long);
+void ResetClockRate (void);
+void Cleanup (void);
+void Exit (int);
+
+#define MILLION 1000000L
+
+/* emacs cc-mode goes nuts if we split the next line... */
+#define tvtod(tv) ((double)tv.tv_sec + ((double)tv.tv_usec / (double)MILLION))
+
+char *progname = NULL;
+int verbose = 0;
+int sysdebug = 0;
+static int mqid;
+static double oldrate = 0.0;
+
+int
+main(
+ int argc,
+ char *argv[]
+ )
+{
+ struct timeval remains;
+ struct sigvec vec;
+ MsgBuf msg;
+ char ch;
+ int nofork = 0;
+ int fd;
+
+ progname = argv[0];
+
+#ifdef LOG_LOCAL6
+ openlog("adjtimed", LOG_PID, LOG_LOCAL6);
+#else
+ openlog("adjtimed", LOG_PID);
+#endif
+
+ while ((ch = ntp_getopt(argc, argv, "hkrvdfp:")) != EOF) {
+ switch (ch) {
+ case 'k':
+ case 'r':
+ if ((mqid = msgget(KEY, 0)) != -1) {
+ if (msgctl(mqid, IPC_RMID, (struct msqid_ds *)0) == -1) {
+ msyslog(LOG_ERR, "remove old message queue: %m");
+ perror("adjtimed: remove old message queue");
+ exit(1);
+ }
+ }
+
+ if (ch == 'k')
+ exit(0);
+
+ break;
+
+ case 'v':
+ ++verbose, nofork = 1;
+ break;
+
+ case 'd':
+ ++sysdebug;
+ break;
+
+ case 'f':
+ nofork = 1;
+ break;
+
+ case 'p':
+ fputs("adjtimed: -p option ignored\n", stderr);
+ break;
+
+ default:
+ puts("usage: adjtimed -hkrvdf");
+ puts("-h\thelp");
+ puts("-k\tkill existing adjtimed, if any");
+ puts("-r\trestart (kills existing adjtimed, if any)");
+ puts("-v\tdebug output (repeat for more output)");
+ puts("-d\tsyslog output (repeat for more output)");
+ puts("-f\tno fork");
+ msyslog(LOG_ERR, "usage error");
+ exit(1);
+ } /* switch */
+ } /* while */
+
+ if (!nofork) {
+ switch (fork()) {
+ case 0:
+ close(fileno(stdin));
+ close(fileno(stdout));
+ close(fileno(stderr));
+
+#ifdef TIOCNOTTY
+ if ((fd = open("/dev/tty")) != -1) {
+ ioctl(fd, TIOCNOTTY, 0);
+ close(fd);
+ }
+#else
+ setpgrp();
+#endif
+ break;
+
+ case -1:
+ msyslog(LOG_ERR, "fork: %m");
+ perror("adjtimed: fork");
+ exit(1);
+
+ default:
+ exit(0);
+ } /* switch */
+ } /* if */
+
+ if (nofork) {
+ setvbuf(stdout, NULL, _IONBF, BUFSIZ);
+ setvbuf(stderr, NULL, _IONBF, BUFSIZ);
+ }
+
+ msyslog(LOG_INFO, "started");
+ if (verbose) printf("adjtimed: started\n");
+
+ if (InitClockRate() == -1)
+ Exit(2);
+
+ (void)signal(SIGHUP, SIG_IGN);
+ (void)signal(SIGINT, SIG_IGN);
+ (void)signal(SIGQUIT, SIG_IGN);
+ (void)signal(SIGTERM, Cleanup);
+
+ vec.sv_handler = ResetClockRate;
+ vec.sv_flags = 0;
+ vec.sv_mask = ~0;
+ sigvector(SIGALRM, &vec, (struct sigvec *)0);
+
+ if (msgget(KEY, IPC_CREAT|IPC_EXCL) == -1) {
+ if (errno == EEXIST) {
+ msyslog(LOG_ERR, "message queue already exists, use -r to remove it");
+ fputs("adjtimed: message queue already exists, use -r to remove it\n",
+ stderr);
+ Exit(1);
+ }
+
+ msyslog(LOG_ERR, "create message queue: %m");
+ perror("adjtimed: create message queue");
+ Exit(1);
+ }
+
+ if ((mqid = msgget(KEY, 0)) == -1) {
+ msyslog(LOG_ERR, "get message queue id: %m");
+ perror("adjtimed: get message queue id");
+ Exit(1);
+ }
+
+ /* Lock process in memory to improve response time */
+ if (plock(PROCLOCK)) {
+ msyslog(LOG_ERR, "plock: %m");
+ perror("adjtimed: plock");
+ Cleanup();
+ }
+
+ /* Also raise process priority.
+ * If we do not get run when we want, this leads to bad timekeeping
+ * and "Previous time adjustment didn't complete" gripes from xntpd.
+ */
+ if (nice(-10) == -1) {
+ msyslog(LOG_ERR, "nice: %m");
+ perror("adjtimed: nice");
+ Cleanup();
+ }
+
+ for (;;) {
+ if (msgrcv(mqid, &msg.msgp, MSGSIZE, CLIENT, 0) == -1) {
+ if (errno == EINTR) continue;
+ msyslog(LOG_ERR, "read message: %m");
+ perror("adjtimed: read message");
+ Cleanup();
+ }
+
+ switch (msg.msgb.code) {
+ case DELTA1:
+ case DELTA2:
+ AdjustClockRate(&msg.msgb.tv, &remains);
+
+ if (msg.msgb.code == DELTA2) {
+ msg.msgb.tv = remains;
+ msg.msgb.mtype = SERVER;
+
+ while (msgsnd(mqid, &msg.msgp, MSGSIZE, 0) == -1) {
+ if (errno == EINTR) continue;
+ msyslog(LOG_ERR, "send message: %m");
+ perror("adjtimed: send message");
+ Cleanup();
+ }
+ }
+
+ if (remains.tv_sec + remains.tv_usec != 0L) {
+ if (verbose) {
+ printf("adjtimed: previous correction remaining %.6fs\n",
+ tvtod(remains));
+ }
+ if (sysdebug) {
+ msyslog(LOG_INFO, "previous correction remaining %.6fs",
+ tvtod(remains));
+ }
+ }
+ break;
+
+ default:
+ fprintf(stderr, "adjtimed: unknown message code %d\n", msg.msgb.code);
+ msyslog(LOG_ERR, "unknown message code %d", msg.msgb.code);
+ } /* switch */
+ } /* loop */
+} /* main */
+
+/*
+ * Default clock rate (old_tick).
+ */
+#define DEFAULT_RATE (MILLION / HZ)
+#define UNKNOWN_RATE 0L
+#define TICK_ADJ 5 /* standard adjustment rate, microsec/tick */
+
+static long default_rate = DEFAULT_RATE;
+static long tick_rate = HZ; /* ticks per sec */
+static long slew_rate = TICK_ADJ * HZ; /* in microsec/sec */
+
+int
+AdjustClockRate(
+ register struct timeval *delta,
+ register struct timeval *olddelta
+ )
+{
+ register long rate, dt, leftover;
+ struct itimerval period, remains;
+
+ dt = (delta->tv_sec * MILLION) + delta->tv_usec;
+
+ if (verbose)
+ printf("adjtimed: new correction %.6fs\n", (double)dt / (double)MILLION);
+ if (sysdebug)
+ msyslog(LOG_INFO, "new correction %.6fs", (double)dt / (double)MILLION);
+ if (verbose > 2) printf("adjtimed: leftover %ldus\n", leftover);
+ if (sysdebug > 2) msyslog(LOG_INFO, "leftover %ldus", leftover);
+ rate = dt;
+
+ /*
+ * Apply a slew rate of slew_rate over a period of dt/slew_rate seconds.
+ */
+ if (dt > 0) {
+ rate = slew_rate;
+ } else {
+ rate = -slew_rate;
+ dt = -dt;
+ }
+ period.it_value.tv_sec = dt / slew_rate;
+ period.it_value.tv_usec = (dt % slew_rate) * (MILLION / slew_rate);
+ /*
+ * Note: we assume the kernel will convert the specified period into ticks
+ * using the modified clock rate rather than an assumed nominal clock rate,
+ * and therefore will generate the timer interrupt after the specified
+ * number of true seconds, not skewed seconds.
+ */
+
+ if (verbose > 1)
+ printf("adjtimed: will be complete in %lds %ldus\n",
+ period.it_value.tv_sec, period.it_value.tv_usec);
+ if (sysdebug > 1)
+ msyslog(LOG_INFO, "will be complete in %lds %ldus",
+ period.it_value.tv_sec, period.it_value.tv_usec);
+ /*
+ * adjust the clock rate
+ */
+ if (dt) {
+ if (SetClockRate((rate / tick_rate) + default_rate) == -1) {
+ msyslog(LOG_ERR, "set clock rate: %m");
+ perror("adjtimed: set clock rate");
+ }
+ }
+ /*
+ * start the timer
+ * (do this after changing the rate because the period has been rounded down)
+ */
+ period.it_interval.tv_sec = period.it_interval.tv_usec = 0L;
+ setitimer(ITIMER_REAL, &period, &remains);
+ /*
+ * return old delta
+ */
+ if (olddelta) {
+ dt = ((remains.it_value.tv_sec * MILLION) + remains.it_value.tv_usec) *
+ oldrate;
+ olddelta->tv_sec = dt / MILLION;
+ olddelta->tv_usec = dt - (olddelta->tv_sec * MILLION);
+ }
+
+ oldrate = (double)rate / (double)MILLION;
+ return(0);
+} /* AdjustClockRate */
+
+static struct nlist nl[] = {
+#ifdef __hp9000s800
+#ifdef PRE7_0
+ { "tick" },
+#else
+ { "old_tick" },
+#endif
+#else
+ { "_old_tick" },
+#endif
+ { "" }
+};
+
+static int kmem;
+
+/*
+ * The return value is the clock rate in old_tick units or -1 if error.
+ */
+long
+GetClockRate(void)
+{
+ long rate, mask;
+
+ if (lseek(kmem, (off_t)nl[0].n_value, 0) == -1L)
+ return (-1L);
+
+ mask = sigblock(sigmask(SIGALRM));
+
+ if (read(kmem, (caddr_t)&rate, sizeof(rate)) != sizeof(rate))
+ rate = UNKNOWN_RATE;
+
+ sigsetmask(mask);
+ return (rate);
+} /* GetClockRate */
+
+/*
+ * The argument is the new rate in old_tick units.
+ */
+int
+SetClockRate(
+ long rate
+ )
+{
+ long mask;
+
+ if (lseek(kmem, (off_t)nl[0].n_value, 0) == -1L)
+ return (-1);
+
+ mask = sigblock(sigmask(SIGALRM));
+
+ if (write(kmem, (caddr_t)&rate, sizeof(rate)) != sizeof(rate)) {
+ sigsetmask(mask);
+ return (-1);
+ }
+
+ sigsetmask(mask);
+
+ if (rate != default_rate) {
+ if (verbose > 3) {
+ printf("adjtimed: clock rate (%lu) %ldus/s\n", rate,
+ (rate - default_rate) * tick_rate);
+ }
+ if (sysdebug > 3) {
+ msyslog(LOG_INFO, "clock rate (%lu) %ldus/s", rate,
+ (rate - default_rate) * tick_rate);
+ }
+ }
+
+ return (0);
+} /* SetClockRate */
+
+int
+InitClockRate(void)
+{
+ if ((kmem = open("/dev/kmem", O_RDWR)) == -1) {
+ msyslog(LOG_ERR, "open(/dev/kmem): %m");
+ perror("adjtimed: open(/dev/kmem)");
+ return (-1);
+ }
+
+ nlist("/hp-ux", nl);
+
+ if (nl[0].n_type == 0) {
+ fputs("adjtimed: /hp-ux has no symbol table\n", stderr);
+ msyslog(LOG_ERR, "/hp-ux has no symbol table");
+ return (-1);
+ }
+ /*
+ * Set the default to the system's original value
+ */
+ default_rate = GetClockRate();
+ if (default_rate == UNKNOWN_RATE) default_rate = DEFAULT_RATE;
+ tick_rate = (MILLION / default_rate);
+ slew_rate = TICK_ADJ * tick_rate;
+ fprintf(stderr,"default_rate=%ld, tick_rate=%ld, slew_rate=%ld\n",default_rate,tick_rate,slew_rate);
+
+ return (0);
+} /* InitClockRate */
+
+/*
+ * Reset the clock rate to the default value.
+ */
+void
+ResetClockRate(void)
+{
+ struct itimerval it;
+
+ it.it_value.tv_sec = it.it_value.tv_usec = 0L;
+ setitimer(ITIMER_REAL, &it, (struct itimerval *)0);
+
+ if (verbose > 2) puts("adjtimed: resetting the clock");
+ if (sysdebug > 2) msyslog(LOG_INFO, "resetting the clock");
+
+ if (GetClockRate() != default_rate) {
+ if (SetClockRate(default_rate) == -1) {
+ msyslog(LOG_ERR, "set clock rate: %m");
+ perror("adjtimed: set clock rate");
+ }
+ }
+
+ oldrate = 0.0;
+} /* ResetClockRate */
+
+void
+Cleanup(void)
+{
+ ResetClockRate();
+
+ if (msgctl(mqid, IPC_RMID, (struct msqid_ds *)0) == -1) {
+ if (errno != EINVAL) {
+ msyslog(LOG_ERR, "remove message queue: %m");
+ perror("adjtimed: remove message queue");
+ }
+ }
+
+ Exit(2);
+} /* Cleanup */
+
+void
+Exit(status)
+ int status;
+{
+ msyslog(LOG_ERR, "terminated");
+ closelog();
+ if (kmem != -1) close(kmem);
+ exit(status);
+} /* Exit */
diff --git a/contrib/ntp/build b/contrib/ntp/build
new file mode 100755
index 000000000000..e23865a3aaeb
--- /dev/null
+++ b/contrib/ntp/build
@@ -0,0 +1,66 @@
+#! /bin/sh
+
+LOGF=make.log
+case "$1" in
+ -l) LOG=1
+ shift
+ ;;
+ *) LOG=0
+ ;;
+esac
+
+CONFIG_ARGS="$@"
+
+IAM=`hostname || uname -n`
+
+#set -e
+#set -x
+
+CVO=`./config.guess`
+case "$CVO" in
+ *-*-*) ;;
+ *) echo "config.guess returned <$CVO>, which makes no sense to me."
+ exit 1
+ ;;
+esac
+
+MYNAME=`IFS=. ; set $IAM ; echo $1`
+
+case "$IAM" in
+ *.udel.edu)
+ BDIR=A.$MYNAME
+ ;;
+ *)
+ BDIR=A.$CVO
+ ;;
+esac
+
+CCSUF=""
+
+case "$CC" in
+ '') ;;
+ *) CCSUF="-$CC"
+ ;;
+esac
+
+BDIR="$BDIR$CCSUF"
+
+[ -d "$BDIR" ] || mkdir $BDIR
+[ -f "$BDIR/.buildcvo" ] || echo $CVO > $BDIR/.buildcvo
+[ -f "$BDIR/.buildhost" ] || echo $IAM > $BDIR/.buildhost
+
+cd $BDIR
+
+(
+cp /dev/null $LOGF
+
+[ -f config.status ] || ../configure $CONFIG_ARGS
+
+case "$MAKE" in
+ '') make && make check
+ ;;
+ *) $MAKE && $MAKE check
+ ;;
+esac
+) >> $LOGF 2>&1
+
diff --git a/contrib/ntp/clockstuff/Makefile.am b/contrib/ntp/clockstuff/Makefile.am
new file mode 100644
index 000000000000..44e85a842214
--- /dev/null
+++ b/contrib/ntp/clockstuff/Makefile.am
@@ -0,0 +1,16 @@
+#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
+AUTOMAKE_OPTIONS = ../util/ansi2knr
+noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@ @CLKTEST@
+EXTRA_PROGRAMS = propdelay chutest clktest
+
+INCLUDES = -I$(top_srcdir)/include
+# We need -lm (and perhaps $(COMPAT) for propdelay, -lntp for {chu,clk}test
+propdelay_LDADD = -lm
+chutest_LDADD = ../libntp/libntp.a
+clktest_LDADD = ../libntp/libntp.a
+ETAGS_ARGS = Makefile.am
+#EXTRA_DIST = TAGS
+
+chutest: ../libntp/libntp.a
+
+clktest: ../libntp/libntp.a
diff --git a/contrib/ntp/clockstuff/Makefile.in b/contrib/ntp/clockstuff/Makefile.in
new file mode 100644
index 000000000000..67797b8b9a68
--- /dev/null
+++ b/contrib/ntp/clockstuff/Makefile.in
@@ -0,0 +1,342 @@
+# Makefile.in generated automatically by automake 1.4a from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_FLAG =
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AMTAR = @AMTAR@
+AMTARFLAGS = @AMTARFLAGS@
+AWK = @AWK@
+CC = @CC@
+CFLAGS = @CFLAGS@
+CHUTEST = @CHUTEST@
+CLKTEST = @CLKTEST@
+CPP = @CPP@
+DCFD = @DCFD@
+LDFLAGS = @LDFLAGS@
+LIBPARSE = @LIBPARSE@
+LIBRSAREF = @LIBRSAREF@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+MAKE_ADJTIMED = @MAKE_ADJTIMED@
+MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
+MAKE_LIBPARSE = @MAKE_LIBPARSE@
+MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
+MAKE_LIBRSAREF = @MAKE_LIBRSAREF@
+MAKE_NTPTIME = @MAKE_NTPTIME@
+MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
+MAKE_TICKADJ = @MAKE_TICKADJ@
+PACKAGE = @PACKAGE@
+PATH_SH = @PATH_SH@
+PROPDELAY = @PROPDELAY@
+RANLIB = @RANLIB@
+RSAREF = @RSAREF@
+TESTDCF = @TESTDCF@
+U = @U@
+VERSION = @VERSION@
+
+#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
+
+
+AUTOMAKE_OPTIONS = ../util/ansi2knr
+noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@ @CLKTEST@
+EXTRA_PROGRAMS = propdelay chutest clktest
+
+INCLUDES = -I$(top_srcdir)/include
+# We need -lm (and perhaps $(COMPAT) for propdelay, -lntp for {chu,clk}test
+propdelay_LDADD = -lm
+chutest_LDADD = ../libntp/libntp.a
+clktest_LDADD = ../libntp/libntp.a
+ETAGS_ARGS = Makefile.am
+subdir = clockstuff
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LIBS = @LIBS@
+ANSI2KNR = ../util/ansi2knr
+chutest_SOURCES = chutest.c
+chutest_OBJECTS = chutest$U.o
+chutest_DEPENDENCIES = ../libntp/libntp.a
+chutest_LDFLAGS =
+clktest_SOURCES = clktest.c
+clktest_OBJECTS = clktest$U.o
+clktest_DEPENDENCIES = ../libntp/libntp.a
+clktest_LDFLAGS =
+propdelay_SOURCES = propdelay.c
+propdelay_OBJECTS = propdelay$U.o
+propdelay_DEPENDENCIES =
+propdelay_LDFLAGS =
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = chutest.c clktest.c propdelay.c
+DIST_COMMON = README Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+GZIP_ENV = --best
+SOURCES = chutest.c clktest.c propdelay.c
+OBJECTS = chutest$U.o clktest$U.o propdelay$U.o
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .c .o
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps clockstuff/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-noinstPROGRAMS:
+
+clean-noinstPROGRAMS:
+ -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+
+distclean-noinstPROGRAMS:
+
+maintainer-clean-noinstPROGRAMS:
+
+.c.o:
+ $(COMPILE) -c $<
+
+mostlyclean-compile:
+ -rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+ -rm -f *.tab.c
+
+maintainer-clean-compile:
+../util/ansi2knr: ../util/ansi2knr.o
+ cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
+
+../util/ansi2knr.o:
+ cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr.o
+
+
+mostlyclean-kr:
+ -rm -f *_.c
+
+clean-kr:
+
+distclean-kr:
+
+maintainer-clean-kr:
+chutest$U.o:
+clktest$U.o:
+propdelay$U.o:
+
+propdelay: $(propdelay_OBJECTS) $(propdelay_DEPENDENCIES)
+ @rm -f propdelay
+ $(LINK) $(propdelay_LDFLAGS) $(propdelay_OBJECTS) $(propdelay_LDADD) $(LIBS)
+chutest_.c: chutest.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/chutest.c; then echo $(srcdir)/chutest.c; else echo chutest.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > chutest_.c
+clktest_.c: clktest.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clktest.c; then echo $(srcdir)/clktest.c; else echo clktest.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clktest_.c
+propdelay_.c: propdelay.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/propdelay.c; then echo $(srcdir)/propdelay.c; else echo propdelay.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > propdelay_.c
+chutest_.o clktest_.o propdelay_.o : $(ANSI2KNR)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ ${AWK:-awk} ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ here=`pwd` && cd $(srcdir) \
+ && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS)'; \
+ unique=`for i in $$list; do echo $$i; done | \
+ ${AWK:-awk} ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+ -rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+chutest.o chutest.lo: chutest.c ../include/ntp_fp.h \
+ ../include/ntp_types.h ../include/ntp_machine.h ../config.h \
+ ../include/ntp_proto.h ../include/ntp.h \
+ ../include/ntp_unixtime.h
+clktest.o clktest.lo: clktest.c ../include/ntp_fp.h \
+ ../include/ntp_types.h ../include/ntp_machine.h ../config.h \
+ ../include/ntp_proto.h ../include/ntp.h \
+ ../include/ntp_unixtime.h
+propdelay.o propdelay.lo: propdelay.c ../include/ntp_stdlib.h \
+ ../include/ntp_types.h ../include/ntp_machine.h ../config.h \
+ ../include/ntp_proto.h ../include/ntp_string.h \
+ ../include/l_stdlib.h
+
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS)
+all-redirect: all-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
+ mostlyclean-kr mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-noinstPROGRAMS clean-compile clean-kr clean-tags \
+ clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-kr \
+ distclean-tags distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
+ maintainer-clean-compile maintainer-clean-kr \
+ maintainer-clean-tags maintainer-clean-generic \
+ distclean-am
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
+clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-kr distclean-kr clean-kr \
+maintainer-clean-kr tags mostlyclean-tags distclean-tags clean-tags \
+maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all install-strip installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+#EXTRA_DIST = TAGS
+
+chutest: ../libntp/libntp.a
+
+clktest: ../libntp/libntp.a
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/ntp/clockstuff/README b/contrib/ntp/clockstuff/README
new file mode 100644
index 000000000000..c7f972773aec
--- /dev/null
+++ b/contrib/ntp/clockstuff/README
@@ -0,0 +1,31 @@
+README file for directory ./clockstuff of the NTP Version 4 distribution
+
+This directory contains the sources for utility programs designed to
+support radio clocks. The chutest.c and clktest.c are desgined to
+test the chu_clk and tty_clk line disciplines and STREAMS modules in
+the ../kernel directory.
+
+These files have been modified to work with either the line disciplines
+or the STREAMS modules. Be sure to define -DSTREAM if appropriate.
+
+These are random bits of things written to help with clocks. You can
+make things in here by typing one or more of:
+
+ make propdelay (or `make')
+ make chutest
+ make clktest
+
+Propdelay computes high frequency propagation delays, given the
+longitude and latitude of the transmitter and receiver. Use
+this for WWV/H and CHU. Don't use it for WWVB (the computation
+is easier for that).
+
+Chutest can be used to input and process data from a CHU modem
+attached to a serial port. It will use the CHU line discipline
+(if installed), or raw mode otherwise. This was used to test
+out the initial reduction algorithms, and may not be up to date.
+
+Clktest can be used to test the clock line discipline (CLKLDISC,
+it must be available), and to take a look at radio clocks attached to a
+serial port.
+
diff --git a/contrib/ntp/clockstuff/chutest.c b/contrib/ntp/clockstuff/chutest.c
new file mode 100644
index 000000000000..785c253edbce
--- /dev/null
+++ b/contrib/ntp/clockstuff/chutest.c
@@ -0,0 +1,816 @@
+/* chutest.c,v 3.1 1993/07/06 01:05:21 jbj Exp
+ * chutest - test the CHU clock
+ */
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <sys/file.h>
+#include <sgtty.h>
+
+#include "../include/ntp_fp.h"
+#include "../include/ntp.h"
+#include "../include/ntp_unixtime.h"
+
+#ifdef CHULDISC
+#ifdef STREAM
+# ifdef HAVE_SYS_CHUDEFS_H
+#include <sys/chudefs.h>
+#endif
+#include <stropts.h>
+#endif
+#endif
+
+#ifdef CHULDISC
+# ifdef HAVE_SYS_CHUDEFS_H
+#include <sys/chudefs.h>
+#endif
+#endif
+
+#ifndef CHULDISC
+#ifndef STREAM
+#define NCHUCHARS (10)
+
+struct chucode {
+ u_char codechars[NCHUCHARS]; /* code characters */
+ u_char ncodechars; /* number of code characters */
+ u_char chustatus; /* not used currently */
+ struct timeval codetimes[NCHUCHARS]; /* arrival times */
+};
+#endif
+#endif
+
+#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
+
+char *progname;
+int debug;
+
+int dofilter = 0; /* set to 1 when we should run filter algorithm */
+int showtimes = 0; /* set to 1 when we should show char arrival times */
+int doprocess = 0; /* set to 1 when we do processing analogous to driver */
+#ifdef CHULDISC
+int usechuldisc = 0; /* set to 1 when CHU line discipline should be used */
+#endif
+#ifdef STREAM
+int usechuldisc = 0; /* set to 1 when CHU line discipline should be used */
+#endif
+
+struct timeval lasttv;
+struct chucode chudata;
+
+extern u_long ustotslo[];
+extern u_long ustotsmid[];
+extern u_long ustotshi[];
+
+/*
+ * main - parse arguments and handle options
+ */
+int
+main(
+ int argc,
+ char *argv[]
+ )
+{
+ int c;
+ int errflg = 0;
+ extern int ntp_optind;
+ extern char *ntp_optarg;
+ void init_chu();
+
+ progname = argv[0];
+ while ((c = ntp_getopt(argc, argv, "cdfpt")) != EOF)
+ switch (c) {
+ case 'c':
+#ifdef STREAM
+ usechuldisc = 1;
+ break;
+#endif
+#ifdef CHULDISC
+ usechuldisc = 1;
+ break;
+#endif
+#ifndef STREAM
+#ifndef CHULDISC
+ (void) fprintf(stderr,
+ "%s: CHU line discipline not available on this machine\n",
+ progname);
+ exit(2);
+#endif
+#endif
+ case 'd':
+ ++debug;
+ break;
+ case 'f':
+ dofilter = 1;
+ break;
+ case 'p':
+ doprocess = 1;
+ case 't':
+ showtimes = 1;
+ break;
+ default:
+ errflg++;
+ break;
+ }
+ if (errflg || ntp_optind+1 != argc) {
+#ifdef STREAM
+ (void) fprintf(stderr, "usage: %s [-dft] tty_device\n",
+ progname);
+#endif
+#ifdef CHULDISC
+ (void) fprintf(stderr, "usage: %s [-dft] tty_device\n",
+ progname);
+#endif
+#ifndef STREAM
+#ifndef CHULDISC
+ (void) fprintf(stderr, "usage: %s [-cdft] tty_device\n",
+ progname);
+#endif
+#endif
+ exit(2);
+ }
+
+ (void) gettimeofday(&lasttv, (struct timezone *)0);
+ c = openterm(argv[ntp_optind]);
+ init_chu();
+#ifdef STREAM
+ if (usechuldisc)
+ process_ldisc(c);
+ else
+#endif
+#ifdef CHULDISC
+ if (usechuldisc)
+ process_ldisc(c);
+ else
+#endif
+ process_raw(c);
+ /*NOTREACHED*/
+}
+
+
+/*
+ * openterm - open a port to the CHU clock
+ */
+int
+openterm(
+ char *dev
+ )
+{
+ int s;
+ struct sgttyb ttyb;
+
+ if (debug)
+ (void) fprintf(stderr, "Doing open...");
+ if ((s = open(dev, O_RDONLY, 0777)) < 0)
+ error("open(%s)", dev, "");
+ if (debug)
+ (void) fprintf(stderr, "open okay\n");
+
+ if (debug)
+ (void) fprintf(stderr, "Setting exclusive use...");
+ if (ioctl(s, TIOCEXCL, (char *)0) < 0)
+ error("ioctl(TIOCEXCL)", "", "");
+ if (debug)
+ (void) fprintf(stderr, "done\n");
+
+ ttyb.sg_ispeed = ttyb.sg_ospeed = B300;
+ ttyb.sg_erase = ttyb.sg_kill = 0;
+ ttyb.sg_flags = EVENP|ODDP|RAW;
+ if (debug)
+ (void) fprintf(stderr, "Setting baud rate et al...");
+ if (ioctl(s, TIOCSETP, (char *)&ttyb) < 0)
+ error("ioctl(TIOCSETP, raw)", "", "");
+ if (debug)
+ (void) fprintf(stderr, "done\n");
+
+#ifdef CHULDISC
+ if (usechuldisc) {
+ int ldisc;
+
+ if (debug)
+ (void) fprintf(stderr, "Switching to CHU ldisc...");
+ ldisc = CHULDISC;
+ if (ioctl(s, TIOCSETD, (char *)&ldisc) < 0)
+ error("ioctl(TIOCSETD, CHULDISC)", "", "");
+ if (debug)
+ (void) fprintf(stderr, "okay\n");
+ }
+#endif
+#ifdef STREAM
+ if (usechuldisc) {
+
+ if (debug)
+ (void) fprintf(stderr, "Poping off streams...");
+ while (ioctl(s, I_POP, 0) >=0) ;
+ if (debug)
+ (void) fprintf(stderr, "okay\n");
+ if (debug)
+ (void) fprintf(stderr, "Pushing CHU stream...");
+ if (ioctl(s, I_PUSH, "chu") < 0)
+ error("ioctl(I_PUSH, \"chu\")", "", "");
+ if (debug)
+ (void) fprintf(stderr, "okay\n");
+ }
+#endif
+ return s;
+}
+
+
+/*
+ * process_raw - process characters in raw mode
+ */
+int
+process_raw(
+ int s
+ )
+{
+ u_char c;
+ int n;
+ struct timeval tv;
+ struct timeval difftv;
+
+ while ((n = read(s, &c, sizeof(char))) > 0) {
+ (void) gettimeofday(&tv, (struct timezone *)0);
+ if (dofilter)
+ raw_filter((unsigned int)c, &tv);
+ else {
+ difftv.tv_sec = tv.tv_sec - lasttv.tv_sec;
+ difftv.tv_usec = tv.tv_usec - lasttv.tv_usec;
+ if (difftv.tv_usec < 0) {
+ difftv.tv_sec--;
+ difftv.tv_usec += 1000000;
+ }
+ (void) printf("%02x\t%lu.%06lu\t%lu.%06lu\n",
+ c, tv.tv_sec, tv.tv_usec, difftv.tv_sec,
+ difftv.tv_usec);
+ lasttv = tv;
+ }
+ }
+
+ if (n == 0) {
+ (void) fprintf(stderr, "%s: zero returned on read\n", progname);
+ exit(1);
+ } else
+ error("read()", "", "");
+}
+
+
+/*
+ * raw_filter - run the line discipline filter over raw data
+ */
+int
+raw_filter(
+ unsigned int c,
+ struct timeval *tv
+ )
+{
+ static struct timeval diffs[10] = { 0 };
+ struct timeval diff;
+ l_fp ts;
+ void chufilter();
+
+ if ((c & 0xf) > 9 || ((c>>4)&0xf) > 9) {
+ if (debug)
+ (void) fprintf(stderr,
+ "character %02x failed BCD test\n");
+ chudata.ncodechars = 0;
+ return;
+ }
+
+ if (chudata.ncodechars > 0) {
+ diff.tv_sec = tv->tv_sec
+ - chudata.codetimes[chudata.ncodechars].tv_sec;
+ diff.tv_usec = tv->tv_usec
+ - chudata.codetimes[chudata.ncodechars].tv_usec;
+ if (diff.tv_usec < 0) {
+ diff.tv_sec--;
+ diff.tv_usec += 1000000;
+ } /*
+ if (diff.tv_sec != 0 || diff.tv_usec > 900000) {
+ if (debug)
+ (void) fprintf(stderr,
+ "character %02x failed time test\n");
+ chudata.ncodechars = 0;
+ return;
+ } */
+ }
+
+ chudata.codechars[chudata.ncodechars] = c;
+ chudata.codetimes[chudata.ncodechars] = *tv;
+ if (chudata.ncodechars > 0)
+ diffs[chudata.ncodechars] = diff;
+ if (++chudata.ncodechars == 10) {
+ if (doprocess) {
+ TVTOTS(&chudata.codetimes[NCHUCHARS-1], &ts);
+ ts.l_ui += JAN_1970;
+ chufilter(&chudata, &chudata.codetimes[NCHUCHARS-1]);
+ } else {
+ register int i;
+
+ for (i = 0; i < chudata.ncodechars; i++) {
+ (void) printf("%x%x\t%lu.%06lu\t%lu.%06lu\n",
+ chudata.codechars[i] & 0xf,
+ (chudata.codechars[i] >>4 ) & 0xf,
+ chudata.codetimes[i].tv_sec,
+ chudata.codetimes[i].tv_usec,
+ diffs[i].tv_sec, diffs[i].tv_usec);
+ }
+ }
+ chudata.ncodechars = 0;
+ }
+}
+
+
+/* #ifdef CHULDISC*/
+/*
+ * process_ldisc - process line discipline
+ */
+int
+process_ldisc(
+ int s
+ )
+{
+ struct chucode chu;
+ int n;
+ register int i;
+ struct timeval diff;
+ l_fp ts;
+ void chufilter();
+
+ while ((n = read(s, (char *)&chu, sizeof chu)) > 0) {
+ if (n != sizeof chu) {
+ (void) fprintf(stderr, "Expected %d, got %d\n",
+ sizeof chu, n);
+ continue;
+ }
+
+ if (doprocess) {
+ TVTOTS(&chu.codetimes[NCHUCHARS-1], &ts);
+ ts.l_ui += JAN_1970;
+ chufilter(&chu, &ts);
+ } else {
+ for (i = 0; i < NCHUCHARS; i++) {
+ if (i == 0)
+ diff.tv_sec = diff.tv_usec = 0;
+ else {
+ diff.tv_sec = chu.codetimes[i].tv_sec
+ - chu.codetimes[i-1].tv_sec;
+ diff.tv_usec = chu.codetimes[i].tv_usec
+ - chu.codetimes[i-1].tv_usec;
+ if (diff.tv_usec < 0) {
+ diff.tv_sec--;
+ diff.tv_usec += 1000000;
+ }
+ }
+ (void) printf("%x%x\t%lu.%06lu\t%lu.%06lu\n",
+ chu.codechars[i] & 0xf, (chu.codechars[i]>>4)&0xf,
+ chu.codetimes[i].tv_sec, chu.codetimes[i].tv_usec,
+ diff.tv_sec, diff.tv_usec);
+ }
+ }
+ }
+ if (n == 0) {
+ (void) fprintf(stderr, "%s: zero returned on read\n", progname);
+ exit(1);
+ } else
+ error("read()", "", "");
+}
+/*#endif*/
+
+
+/*
+ * error - print an error message
+ */
+void
+error(
+ char *fmt,
+ char *s1,
+ char *s2
+ )
+{
+ (void) fprintf(stderr, "%s: ", progname);
+ (void) fprintf(stderr, fmt, s1, s2);
+ (void) fprintf(stderr, ": ");
+ perror("");
+ exit(1);
+}
+
+/*
+ * Definitions
+ */
+#define MAXUNITS 4 /* maximum number of CHU units permitted */
+#define CHUDEV "/dev/chu%d" /* device we open. %d is unit number */
+#define NCHUCODES 9 /* expect 9 CHU codes per minute */
+
+/*
+ * When CHU is operating optimally we want the primary clock distance
+ * to come out at 300 ms. Thus, peer.distance in the CHU peer structure
+ * is set to 290 ms and we compute delays which are at least 10 ms long.
+ * The following are 290 ms and 10 ms expressed in u_fp format
+ */
+#define CHUDISTANCE 0x00004a3d
+#define CHUBASEDELAY 0x0000028f
+
+/*
+ * To compute a quality for the estimate (a pseudo delay) we add a
+ * fixed 10 ms for each missing code in the minute and add to this
+ * the sum of the differences between the remaining offsets and the
+ * estimated sample offset.
+ */
+#define CHUDELAYPENALTY 0x0000028f
+
+/*
+ * Other constant stuff
+ */
+#define CHUPRECISION (-9) /* what the heck */
+#define CHUREFID "CHU\0"
+
+/*
+ * Default fudge factors
+ */
+#define DEFPROPDELAY 0x00624dd3 /* 0.0015 seconds, 1.5 ms */
+#define DEFFILTFUDGE 0x000d1b71 /* 0.0002 seconds, 200 us */
+
+/*
+ * Hacks to avoid excercising the multiplier. I have no pride.
+ */
+#define MULBY10(x) (((x)<<3) + ((x)<<1))
+#define MULBY60(x) (((x)<<6) - ((x)<<2)) /* watch overflow */
+#define MULBY24(x) (((x)<<4) + ((x)<<3))
+
+/*
+ * Constants for use when multiplying by 0.1. ZEROPTONE is 0.1
+ * as an l_fp fraction, NZPOBITS is the number of significant bits
+ * in ZEROPTONE.
+ */
+#define ZEROPTONE 0x1999999a
+#define NZPOBITS 29
+
+/*
+ * The CHU table. This gives the expected time of arrival of each
+ * character after the on-time second and is computed as follows:
+ * The CHU time code is sent at 300 bps. Your average UART will
+ * synchronize at the edge of the start bit and will consider the
+ * character complete at the center of the first stop bit, i.e.
+ * 0.031667 ms later. Thus the expected time of each interrupt
+ * is the start bit time plus 0.031667 seconds. These times are
+ * in chutable[]. To this we add such things as propagation delay
+ * and delay fudge factor.
+ */
+#define CHARDELAY 0x081b4e80
+
+static u_long chutable[NCHUCHARS] = {
+ 0x2147ae14 + CHARDELAY, /* 0.130 (exactly) */
+ 0x2ac08312 + CHARDELAY, /* 0.167 (exactly) */
+ 0x34395810 + CHARDELAY, /* 0.204 (exactly) */
+ 0x3db22d0e + CHARDELAY, /* 0.241 (exactly) */
+ 0x472b020c + CHARDELAY, /* 0.278 (exactly) */
+ 0x50a3d70a + CHARDELAY, /* 0.315 (exactly) */
+ 0x5a1cac08 + CHARDELAY, /* 0.352 (exactly) */
+ 0x63958106 + CHARDELAY, /* 0.389 (exactly) */
+ 0x6d0e5604 + CHARDELAY, /* 0.426 (exactly) */
+ 0x76872b02 + CHARDELAY, /* 0.463 (exactly) */
+};
+
+/*
+ * Keep the fudge factors separately so they can be set even
+ * when no clock is configured.
+ */
+static l_fp propagation_delay;
+static l_fp fudgefactor;
+static l_fp offset_fudge;
+
+/*
+ * We keep track of the start of the year, watching for changes.
+ * We also keep track of whether the year is a leap year or not.
+ * All because stupid CHU doesn't include the year in the time code.
+ */
+static u_long yearstart;
+
+/*
+ * Imported from the timer module
+ */
+extern u_long current_time;
+extern struct event timerqueue[];
+
+/*
+ * Time conversion tables imported from the library
+ */
+extern u_long ustotslo[];
+extern u_long ustotsmid[];
+extern u_long ustotshi[];
+
+
+/*
+ * init_chu - initialize internal chu driver data
+ */
+void
+init_chu(void)
+{
+
+ /*
+ * Initialize fudge factors to default.
+ */
+ propagation_delay.l_ui = 0;
+ propagation_delay.l_uf = DEFPROPDELAY;
+ fudgefactor.l_ui = 0;
+ fudgefactor.l_uf = DEFFILTFUDGE;
+ offset_fudge = propagation_delay;
+ L_ADD(&offset_fudge, &fudgefactor);
+
+ yearstart = 0;
+}
+
+
+void
+chufilter(
+ struct chucode *chuc,
+ l_fp *rtime
+ )
+{
+ register int i;
+ register u_long date_ui;
+ register u_long tmp;
+ register u_char *code;
+ int isneg;
+ int imin;
+ int imax;
+ u_long reftime;
+ l_fp off[NCHUCHARS];
+ l_fp ts;
+ int day, hour, minute, second;
+ static u_char lastcode[NCHUCHARS];
+ extern u_long calyearstart();
+ extern char *mfptoa();
+ void chu_process();
+ extern char *prettydate();
+
+ /*
+ * We'll skip the checks made in the kernel, but assume they've
+ * been done. This means that all characters are BCD and
+ * the intercharacter spacing isn't unreasonable.
+ */
+
+ /*
+ * print the code
+ */
+ for (i = 0; i < NCHUCHARS; i++)
+ printf("%c%c", (chuc->codechars[i] & 0xf) + '0',
+ ((chuc->codechars[i]>>4) & 0xf) + '0');
+ printf("\n");
+
+ /*
+ * Format check. Make sure the two halves match.
+ */
+ for (i = 0; i < NCHUCHARS/2; i++)
+ if (chuc->codechars[i] != chuc->codechars[i+(NCHUCHARS/2)]) {
+ (void) printf("Bad format, halves don't match\n");
+ return;
+ }
+
+ /*
+ * Break out the code into the BCD nibbles. Only need to fiddle
+ * with the first half since both are identical. Note the first
+ * BCD character is the low order nibble, the second the high order.
+ */
+ code = lastcode;
+ for (i = 0; i < NCHUCHARS/2; i++) {
+ *code++ = chuc->codechars[i] & 0xf;
+ *code++ = (chuc->codechars[i] >> 4) & 0xf;
+ }
+
+ /*
+ * If the first nibble isn't a 6, we're up the creek
+ */
+ code = lastcode;
+ if (*code++ != 6) {
+ (void) printf("Bad format, no 6 at start\n");
+ return;
+ }
+
+ /*
+ * Collect the day, the hour, the minute and the second.
+ */
+ day = *code++;
+ day = MULBY10(day) + *code++;
+ day = MULBY10(day) + *code++;
+ hour = *code++;
+ hour = MULBY10(hour) + *code++;
+ minute = *code++;
+ minute = MULBY10(minute) + *code++;
+ second = *code++;
+ second = MULBY10(second) + *code++;
+
+ /*
+ * Sanity check the day and time. Note that this
+ * only occurs on the 31st through the 39th second
+ * of the minute.
+ */
+ if (day < 1 || day > 366
+ || hour > 23 || minute > 59
+ || second < 31 || second > 39) {
+ (void) printf("Failed date sanity check: %d %d %d %d\n",
+ day, hour, minute, second);
+ return;
+ }
+
+ /*
+ * Compute seconds into the year.
+ */
+ tmp = (u_long)(MULBY24((day-1)) + hour); /* hours */
+ tmp = MULBY60(tmp) + (u_long)minute; /* minutes */
+ tmp = MULBY60(tmp) + (u_long)second; /* seconds */
+
+ /*
+ * Now the fun begins. We demand that the received time code
+ * be within CLOCK_WAYTOOBIG of the receive timestamp, but
+ * there is uncertainty about the year the timestamp is in.
+ * Use the current year start for the first check, this should
+ * work most of the time.
+ */
+ date_ui = tmp + yearstart;
+ if (date_ui < (rtime->l_ui + CLOCK_WAYTOOBIG)
+ && date_ui > (rtime->l_ui - CLOCK_WAYTOOBIG))
+ goto codeokay; /* looks good */
+
+ /*
+ * Trouble. Next check is to see if the year rolled over and, if
+ * so, try again with the new year's start.
+ */
+ date_ui = calyearstart(rtime->l_ui);
+ if (date_ui != yearstart) {
+ yearstart = date_ui;
+ date_ui += tmp;
+ (void) printf("time %u, code %u, difference %d\n",
+ date_ui, rtime->l_ui, (long)date_ui-(long)rtime->l_ui);
+ if (date_ui < (rtime->l_ui + CLOCK_WAYTOOBIG)
+ && date_ui > (rtime->l_ui - CLOCK_WAYTOOBIG))
+ goto codeokay; /* okay this time */
+ }
+
+ ts.l_uf = 0;
+ ts.l_ui = yearstart;
+ printf("yearstart %s\n", prettydate(&ts));
+ printf("received %s\n", prettydate(rtime));
+ ts.l_ui = date_ui;
+ printf("date_ui %s\n", prettydate(&ts));
+
+ /*
+ * Here we know the year start matches the current system
+ * time. One remaining possibility is that the time code
+ * is in the year previous to that of the system time. This
+ * is only worth checking if the receive timestamp is less
+ * than CLOCK_WAYTOOBIG seconds into the new year.
+ */
+ if ((rtime->l_ui - yearstart) < CLOCK_WAYTOOBIG) {
+ date_ui = tmp + calyearstart(yearstart - CLOCK_WAYTOOBIG);
+ if ((rtime->l_ui - date_ui) < CLOCK_WAYTOOBIG)
+ goto codeokay;
+ }
+
+ /*
+ * One last possibility is that the time stamp is in the year
+ * following the year the system is in. Try this one before
+ * giving up.
+ */
+ date_ui = tmp + calyearstart(yearstart + (400*24*60*60)); /* 400 days */
+ if ((date_ui - rtime->l_ui) >= CLOCK_WAYTOOBIG) {
+ printf("Date hopelessly off\n");
+ return; /* hopeless, let it sync to other peers */
+ }
+
+ codeokay:
+ reftime = date_ui;
+ /*
+ * We've now got the integral seconds part of the time code (we hope).
+ * The fractional part comes from the table. We next compute
+ * the offsets for each character.
+ */
+ for (i = 0; i < NCHUCHARS; i++) {
+ register u_long tmp2;
+
+ off[i].l_ui = date_ui;
+ off[i].l_uf = chutable[i];
+ tmp = chuc->codetimes[i].tv_sec + JAN_1970;
+ TVUTOTSF(chuc->codetimes[i].tv_usec, tmp2);
+ M_SUB(off[i].l_ui, off[i].l_uf, tmp, tmp2);
+ }
+
+ /*
+ * Here is a *big* problem. What one would normally
+ * do here on a machine with lots of clock bits (say
+ * a Vax or the gizmo board) is pick the most positive
+ * offset and the estimate, since this is the one that
+ * is most likely suffered the smallest interrupt delay.
+ * The trouble is that the low order clock bit on an IBM
+ * RT, which is the machine I had in mind when doing this,
+ * ticks at just under the millisecond mark. This isn't
+ * precise enough. What we can do to improve this is to
+ * average all 10 samples and rely on the second level
+ * filtering to pick the least delayed estimate. Trouble
+ * is, this means we have to divide a 64 bit fixed point
+ * number by 10, a procedure which really sucks. Oh, well.
+ * First compute the sum.
+ */
+ date_ui = 0;
+ tmp = 0;
+ for (i = 0; i < NCHUCHARS; i++)
+ M_ADD(date_ui, tmp, off[i].l_ui, off[i].l_uf);
+ if (M_ISNEG(date_ui, tmp))
+ isneg = 1;
+ else
+ isneg = 0;
+
+ /*
+ * Here is a multiply-by-0.1 optimization that should apply
+ * just about everywhere. If the magnitude of the sum
+ * is less than 9 we don't have to worry about overflow
+ * out of a 64 bit product, even after rounding.
+ */
+ if (date_ui < 9 || date_ui > 0xfffffff7) {
+ register u_long prod_ui;
+ register u_long prod_uf;
+
+ prod_ui = prod_uf = 0;
+ /*
+ * This code knows the low order bit in 0.1 is zero
+ */
+ for (i = 1; i < NZPOBITS; i++) {
+ M_LSHIFT(date_ui, tmp);
+ if (ZEROPTONE & (1<<i))
+ M_ADD(prod_ui, prod_uf, date_ui, tmp);
+ }
+
+ /*
+ * Done, round it correctly. Prod_ui contains the
+ * fraction.
+ */
+ if (prod_uf & 0x80000000)
+ prod_ui++;
+ if (isneg)
+ date_ui = 0xffffffff;
+ else
+ date_ui = 0;
+ tmp = prod_ui;
+ /*
+ * date_ui is integral part, tmp is fraction.
+ */
+ } else {
+ register u_long prod_ovr;
+ register u_long prod_ui;
+ register u_long prod_uf;
+ register u_long highbits;
+
+ prod_ovr = prod_ui = prod_uf = 0;
+ if (isneg)
+ highbits = 0xffffffff; /* sign extend */
+ else
+ highbits = 0;
+ /*
+ * This code knows the low order bit in 0.1 is zero
+ */
+ for (i = 1; i < NZPOBITS; i++) {
+ M_LSHIFT3(highbits, date_ui, tmp);
+ if (ZEROPTONE & (1<<i))
+ M_ADD3(prod_ovr, prod_uf, prod_ui,
+ highbits, date_ui, tmp);
+ }
+
+ if (prod_uf & 0x80000000)
+ M_ADDUF(prod_ovr, prod_ui, (u_long)1);
+ date_ui = prod_ovr;
+ tmp = prod_ui;
+ }
+
+ /*
+ * At this point we have the mean offset, with the integral
+ * part in date_ui and the fractional part in tmp. Store
+ * it in the structure.
+ */
+ /*
+ * Add in fudge factor.
+ */
+ M_ADD(date_ui, tmp, offset_fudge.l_ui, offset_fudge.l_uf);
+
+ /*
+ * Find the minimun and maximum offset
+ */
+ imin = imax = 0;
+ for (i = 1; i < NCHUCHARS; i++) {
+ if (L_ISGEQ(&off[i], &off[imax])) {
+ imax = i;
+ } else if (L_ISGEQ(&off[imin], &off[i])) {
+ imin = i;
+ }
+ }
+
+ L_ADD(&off[imin], &offset_fudge);
+ if (imin != imax)
+ L_ADD(&off[imax], &offset_fudge);
+ (void) printf("mean %s, min %s, max %s\n",
+ mfptoa(date_ui, tmp, 8), lfptoa(&off[imin], 8),
+ lfptoa(&off[imax], 8));
+}
diff --git a/contrib/ntp/clockstuff/clktest.c b/contrib/ntp/clockstuff/clktest.c
new file mode 100644
index 000000000000..86edf59d52d2
--- /dev/null
+++ b/contrib/ntp/clockstuff/clktest.c
@@ -0,0 +1,529 @@
+/* clktest.c,v 3.1 1993/07/06 01:05:23 jbj Exp
+ * clktest - test the clock line discipline
+ *
+ * usage: clktest -b bps -f -t timeo -s cmd -c char1 -a char2 /dev/whatever
+ */
+
+#include <stdio.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <signal.h>
+#include <netinet/in.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <sys/file.h>
+#include <sgtty.h>
+
+#include "../include/ntp_fp.h"
+#include "../include/ntp.h"
+#include "../include/ntp_unixtime.h"
+
+#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
+
+#if defined(ULT_2_0_SUCKS)
+#ifndef sigmask
+#define sigmask(m) (1<<(m))
+#endif
+#endif
+
+#ifndef STREAM
+#ifndef CLKLDISC
+CLOCK_LINE_DISCIPLINE_NEEDED_BY_THIS_PROGRAM;
+#endif
+#endif
+
+/*
+ * Mask for blocking SIGIO and SIGALRM
+ */
+#define BLOCKSIGMASK (sigmask(SIGIO)|sigmask(SIGALRM))
+
+/*
+ * speed table
+ */
+struct speeds {
+ int bps;
+ int rate;
+} speedtab[] = {
+ { 300, B300 },
+ { 1200, B1200 },
+ { 2400, B2400 },
+ { 4800, B4800 },
+ { 9600, B9600 },
+ { 19200, EXTA },
+ { 38400, EXTB },
+ { 0, 0 }
+};
+
+char *progname;
+int debug;
+
+#ifdef CLKLDISC
+#define DEFMAGIC '\r'
+#endif
+
+#ifdef CLKLDISC
+# ifdef STREAM
+# include <stropts.h>
+# ifdef HAVE_SYS_CLKDEFS_H
+# include <sys/clkdefs.h>
+# endif
+# define DEFMAGIC "\r"
+# endif
+#endif
+
+struct timeval timeout = { 0 };
+char *cmd = NULL;
+int cmdlen;
+int docmd = 0;
+#ifdef CLKLDISC
+u_long magic1 = DEFMAGIC;
+u_long magic2 = DEFMAGIC;
+#endif
+#ifdef STREAM
+char magic[32];
+#endif
+int speed = B9600;
+int ttflags = RAW|EVENP|ODDP;
+
+volatile int wasalarmed;
+volatile int iosig;
+
+struct timeval lasttv;
+
+extern u_long ustotslo[];
+extern u_long ustotsmid[];
+extern u_long ustotshi[];
+
+/*
+ * main - parse arguments and handle options
+ */
+int
+main(
+ int argc,
+ char *argv[]
+ )
+{
+ int c;
+ int errflg = 0;
+ struct speeds *spd;
+ u_long tmp;
+ int fd;
+ struct sgttyb ttyb;
+ struct itimerval itimer;
+ extern int ntp_optind;
+ extern char *ntp_optarg;
+ int alarming();
+ int ioready();
+
+ progname = argv[0];
+#ifdef STREAM
+ magic[0] = 0;
+#endif
+ while ((c = ntp_getopt(argc, argv, "a:b:c:dfs:t:")) != EOF)
+ switch (c) {
+#ifdef CLKLDISC
+ case 'a':
+#endif
+ case 'c':
+ if (!atouint(ntp_optarg, &tmp)) {
+ (void) fprintf(stderr,
+ "%s: argument for -%c must be integer\n",
+ progname, c);
+ errflg++;
+ break;
+ }
+#ifdef CLKLDISC
+ if (c == 'c')
+ magic1 = tmp;
+ else
+ magic2 = tmp;
+#endif
+#ifdef STREAM
+ magic[strlen(magic)+1] = '\0';
+ magic[strlen(magic)] = tmp;
+#endif
+ break;
+ case 'b':
+ if (!atouint(ntp_optarg, &tmp)) {
+ errflg++;
+ break;
+ }
+ spd = speedtab;
+ while (spd->bps != 0)
+ if ((int)tmp == spd->bps)
+ break;
+ if (spd->bps == 0) {
+ (void) fprintf(stderr,
+ "%s: speed %lu is unsupported\n",
+ progname, tmp);
+ errflg++;
+ } else {
+ speed = spd->rate;
+ }
+ break;
+ case 'd':
+ ++debug;
+ break;
+ case 'f':
+ ttflags |= CRMOD;
+ break;
+ case 's':
+ cmdlen = strlen(ntp_optarg);
+ if (cmdlen == 0)
+ errflg++;
+ else
+ cmd = ntp_optarg;
+ break;
+ case 't':
+ if (!atouint(ntp_optarg, &tmp))
+ errflg++;
+ else {
+ timeout.tv_sec = (long)tmp;
+ docmd = 1;
+ }
+ break;
+ default:
+ errflg++;
+ break;
+ }
+ if (errflg || ntp_optind+1 != argc) {
+ (void) fprintf(stderr,
+#ifdef CLKLDISC
+ "usage: %s [-b bps] [-c magic1] [-a magic2] [-f] [-s cmd] [-t timeo] tty_device\n",
+#endif
+#ifdef STREAM
+ "usage: %s [-b bps] [-c magic1] [-c magic2]... [-f] [-s cmd] [-t timeo] tty_device\n",
+#endif
+ progname);
+ exit(2);
+ }
+
+#ifdef STREAM
+ if (!strlen(magic))
+ strcpy(magic,DEFMAGIC);
+#endif
+
+ if (docmd)
+ fd = open(argv[ntp_optind], O_RDWR, 0777);
+ else
+ fd = open(argv[ntp_optind], O_RDONLY, 0777);
+ if (fd == -1) {
+ (void) fprintf(stderr, "%s: open(%s): ", progname,
+ argv[ntp_optind]);
+ perror("");
+ exit(1);
+ }
+
+ if (ioctl(fd, TIOCEXCL, (char *)0) < 0) {
+ (void) fprintf(stderr, "%s: ioctl(TIOCEXCL): ", progname);
+ perror("");
+ exit(1);
+ }
+
+ /*
+ * If we have the clock discipline, set the port to raw. Otherwise
+ * we run cooked.
+ */
+ ttyb.sg_ispeed = ttyb.sg_ospeed = speed;
+#ifdef CLKLDISC
+ ttyb.sg_erase = (char)magic1;
+ ttyb.sg_kill = (char)magic2;
+#endif
+ ttyb.sg_flags = (short)ttflags;
+ if (ioctl(fd, TIOCSETP, (char *)&ttyb) < 0) {
+ (void) fprintf(stderr, "%s: ioctl(TIOCSETP): ", progname);
+ perror("");
+ exit(1);
+ }
+
+ if (fcntl(fd, F_SETOWN, getpid()) == -1) {
+ (void) fprintf(stderr, "%s: fcntl(F_SETOWN): ", progname);
+ perror("");
+ exit(1);
+ }
+
+#ifdef CLKLDISC
+ {
+ int ldisc;
+ ldisc = CLKLDISC;
+ if (ioctl(fd, TIOCSETD, (char *)&ldisc) < 0) {
+ (void) fprintf(stderr, "%s: ioctl(TIOCSETD): ", progname);
+ perror("");
+ exit(1);
+ }
+ }
+#endif
+#ifdef STREAM
+ if (ioctl(fd, I_POP, 0) >=0 ) ;
+ if (ioctl(fd, I_PUSH, "clk") < 0) {
+ (void) fprintf(stderr, "%s: ioctl(I_PUSH): ", progname);
+ perror("");
+ exit(1);
+ }
+ if (ioctl(fd, CLK_SETSTR, magic) < 0) {
+ (void) fprintf(stderr, "%s: ioctl(CLK_SETSTR): ", progname);
+ perror("");
+ exit(1);
+ }
+#endif
+
+
+ (void) gettimeofday(&lasttv, (struct timezone *)0);
+ if (docmd) {
+ /*
+ * set non-blocking, async I/O on the descriptor
+ */
+ iosig = 0;
+ (void) signal(SIGIO, ioready);
+ if (fcntl(fd, F_SETFL, FNDELAY|FASYNC) < 0) {
+ (void) fprintf(stderr, "%s: fcntl(F_SETFL): ",
+ progname);
+ perror("");
+ exit(1);
+ }
+
+ /*
+ * Set up the alarm interrupt.
+ */
+ wasalarmed = 0;
+ (void) signal(SIGALRM, alarming);
+ itimer.it_interval = itimer.it_value = timeout;
+ setitimer(ITIMER_REAL, &itimer, (struct itimerval *)0);
+ doboth(fd);
+ }
+ doioonly(fd);
+}
+
+
+/*
+ * doboth - handle both I/O and alarms via SIGIO
+ */
+int
+doboth(
+ int fd
+ )
+{
+ int n;
+ int sawalarm;
+ int sawiosig;
+ int omask;
+ fd_set fds;
+ struct timeval tvzero;
+
+ sawalarm = 0;
+ sawiosig = 0;
+ FD_ZERO(&fds);
+ for (;;) {
+ omask = sigblock(BLOCKSIGMASK);
+ if (wasalarmed) { /* alarmed? */
+ sawalarm = 1;
+ wasalarmed = 0;
+ }
+ if (iosig) {
+ sawiosig = 1;
+ iosig = 0;
+ }
+
+ if (!sawalarm && !sawiosig) {
+ /*
+ * Nothing to do. Wait for something.
+ */
+ sigpause(omask);
+ if (wasalarmed) { /* alarmed? */
+ sawalarm = 1;
+ wasalarmed = 0;
+ }
+ if (iosig) {
+ sawiosig = 1;
+ iosig = 0;
+ }
+ }
+ (void)sigsetmask(omask);
+
+ if (sawiosig) {
+
+ do {
+ tvzero.tv_sec = tvzero.tv_usec = 0;
+ FD_SET(fd, &fds);
+ n = select(fd+1, &fds, (fd_set *)0,
+ (fd_set *)0, &tvzero);
+ if (n > 0)
+ doio(fd);
+ } while (n > 0);
+
+ if (n == -1) {
+ (void) fprintf(stderr, "%s: select: ",
+ progname);
+ perror("");
+ exit(1);
+ }
+ sawiosig = 0;
+ }
+ if (sawalarm) {
+ doalarm(fd);
+ sawalarm = 0;
+ }
+ }
+}
+
+
+/*
+ * doioonly - do I/O. This avoids the use of signals
+ */
+int
+doioonly(
+ int fd
+ )
+{
+ int n;
+ fd_set fds;
+
+ FD_ZERO(&fds);
+ for (;;) {
+ FD_SET(fd, &fds);
+ n = select(fd+1, &fds, (fd_set *)0, (fd_set *)0,
+ (struct timeval *)0);
+ if (n > 0)
+ doio(fd);
+ }
+}
+
+
+/*
+ * doio - read a buffer full of stuff and print it out
+ */
+int
+doio(
+ int fd
+ )
+{
+ register char *rp, *rpend;
+ register char *cp;
+ register int i;
+ char raw[512];
+ struct timeval tv, tvd;
+ int rlen;
+ int ind;
+ char cooked[2049];
+ static char *digits = "0123456789abcdef";
+
+ rlen = read(fd, raw, sizeof(raw));
+ if (rlen < 0) {
+ (void) fprintf(stderr, "%s: read(): ", progname);
+ perror("");
+ return;
+ }
+ if (rlen == 0) {
+ (void) printf("Zero length read\n");
+ return;
+ }
+
+ cp = cooked;
+ rp = raw;
+ rpend = &raw[rlen];
+ ind = 0;
+
+ while (rp < rpend) {
+ ind = 1;
+ if (isprint(*rp))
+ *cp++ = *rp;
+ else {
+ *cp++ = '<';
+ *cp++ = digits[((*rp)>>4) & 0xf];
+ *cp++ = digits[*rp & 0xf];
+ *cp++ = '>';
+ }
+ if (
+#ifdef CLKLDISC
+ (*rp == (char)magic1 || *rp == (char)magic2)
+#else
+ ( strchr( magic, *rp) != NULL )
+#endif
+ ) {
+ rp++;
+ ind = 0;
+ *cp = '\0';
+ if ((rpend - rp) < sizeof(struct timeval)) {
+ (void)printf(
+ "Too little data (%d): %s\n",
+ rpend-rp, cooked);
+ return;
+ }
+
+ tv.tv_sec = 0;
+ for (i = 0; i < 4; i++) {
+ tv.tv_sec <<= 8;
+ tv.tv_sec |= ((long)*rp++) & 0xff;
+ }
+ tv.tv_usec = 0;
+ for (i = 0; i < 4; i++) {
+ tv.tv_usec <<= 8;
+ tv.tv_usec |= ((long)*rp++) & 0xff;
+ }
+
+ tvd.tv_sec = tv.tv_sec - lasttv.tv_sec;
+ tvd.tv_usec = tv.tv_usec - lasttv.tv_usec;
+ if (tvd.tv_usec < 0) {
+ tvd.tv_usec += 1000000;
+ tvd.tv_sec--;
+ }
+
+ (void)printf("%lu.%06lu %lu.%06lu %s\n",
+ tv.tv_sec, tv.tv_usec, tvd.tv_sec, tvd.tv_usec,
+ cooked);
+ lasttv = tv;
+ } else {
+ rp++;
+ }
+ }
+
+ if (ind) {
+ *cp = '\0';
+ (void)printf("Incomplete data: %s\n", cooked);
+ }
+}
+
+
+/*
+ * doalarm - send a string out the port, if we have one.
+ */
+int
+doalarm(
+ int fd
+ )
+{
+ int n;
+
+ if (cmd == NULL || cmdlen <= 0)
+ return;
+
+ n = write(fd, cmd, cmdlen);
+
+ if (n < 0) {
+ (void) fprintf(stderr, "%s: write(): ", progname);
+ perror("");
+ } else if (n < cmdlen) {
+ (void) printf("Short write (%d bytes, should be %d)\n",
+ n, cmdlen);
+ }
+}
+
+
+/*
+ * alarming - receive alarm interupt
+ */
+void
+alarming(void)
+{
+ wasalarmed = 1;
+}
+
+/*
+ * ioready - handle SIGIO interrupt
+ */
+void
+ioready(void)
+{
+ iosig = 1;
+}
diff --git a/contrib/ntp/clockstuff/propdelay.c b/contrib/ntp/clockstuff/propdelay.c
new file mode 100644
index 000000000000..3ce571c2510e
--- /dev/null
+++ b/contrib/ntp/clockstuff/propdelay.c
@@ -0,0 +1,544 @@
+/* propdelay.c,v 3.1 1993/07/06 01:05:24 jbj Exp
+ * propdelay - compute propagation delays
+ *
+ * cc -o propdelay propdelay.c -lm
+ *
+ * "Time and Frequency Users' Manual", NBS Technical Note 695 (1977).
+ */
+
+/*
+ * This can be used to get a rough idea of the HF propagation delay
+ * between two points (usually between you and the radio station).
+ * The usage is
+ *
+ * propdelay latitudeA longitudeA latitudeB longitudeB
+ *
+ * where points A and B are the locations in question. You obviously
+ * need to know the latitude and longitude of each of the places.
+ * The program expects the latitude to be preceded by an 'n' or 's'
+ * and the longitude to be preceded by an 'e' or 'w'. It understands
+ * either decimal degrees or degrees:minutes:seconds. Thus to compute
+ * the delay between the WWVH (21:59:26N, 159:46:00W) and WWV (40:40:49N,
+ * 105:02:27W) you could use:
+ *
+ * propdelay n21:59:26 w159:46 n40:40:49 w105:02:27
+ *
+ * By default it prints out a summer (F2 average virtual height 350 km) and
+ * winter (F2 average virtual height 250 km) number. The results will be
+ * quite approximate but are about as good as you can do with HF time anyway.
+ * You might pick a number between the values to use, or use the summer
+ * value in the summer and switch to the winter value when the static
+ * above 10 MHz starts to drop off in the fall. You can also use the
+ * -h switch if you want to specify your own virtual height.
+ *
+ * You can also do a
+ *
+ * propdelay -W n45:17:47 w75:45:22
+ *
+ * to find the propagation delays to WWV and WWVH (from CHU in this
+ * case), a
+ *
+ * propdelay -C n40:40:49 w105:02:27
+ *
+ * to find the delays to CHU, and a
+ *
+ * propdelay -G n52:03:17 w98:34:18
+ *
+ * to find delays to GOES via each of the three satellites.
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#include "ntp_stdlib.h"
+
+extern double sin (double);
+extern double cos (double);
+extern double acos (double);
+extern double tan (double);
+extern double atan (double);
+extern double sqrt (double);
+
+#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
+
+/*
+ * Program constants
+ */
+#define EARTHRADIUS (6370.0) /* raduis of earth (km) */
+#define LIGHTSPEED (299800.0) /* speed of light, km/s */
+#define PI (3.1415926536)
+#define RADPERDEG (PI/180.0) /* radians per degree */
+#define MILE (1.609344) /* km in a mile */
+
+#define SUMMERHEIGHT (350.0) /* summer height in km */
+#define WINTERHEIGHT (250.0) /* winter height in km */
+
+#define SATHEIGHT (6.6110 * 6378.0) /* geosync satellite height in km
+ from centre of earth */
+
+#define WWVLAT "n40:40:49"
+#define WWVLONG "w105:02:27"
+
+#define WWVHLAT "n21:59:26"
+#define WWVHLONG "w159:46:00"
+
+#define CHULAT "n45:17:47"
+#define CHULONG "w75:45:22"
+
+#define GOES_UP_LAT "n37:52:00"
+#define GOES_UP_LONG "w75:27:00"
+#define GOES_EAST_LONG "w75:00:00"
+#define GOES_STBY_LONG "w105:00:00"
+#define GOES_WEST_LONG "w135:00:00"
+#define GOES_SAT_LAT "n00:00:00"
+
+char *wwvlat = WWVLAT;
+char *wwvlong = WWVLONG;
+
+char *wwvhlat = WWVHLAT;
+char *wwvhlong = WWVHLONG;
+
+char *chulat = CHULAT;
+char *chulong = CHULONG;
+
+char *goes_up_lat = GOES_UP_LAT;
+char *goes_up_long = GOES_UP_LONG;
+char *goes_east_long = GOES_EAST_LONG;
+char *goes_stby_long = GOES_STBY_LONG;
+char *goes_west_long = GOES_WEST_LONG;
+char *goes_sat_lat = GOES_SAT_LAT;
+
+int hflag = 0;
+int Wflag = 0;
+int Cflag = 0;
+int Gflag = 0;
+int height;
+
+char *progname;
+int debug;
+
+static void doit (double, double, double, double, double, char *);
+static double latlong (char *, int);
+static double greatcircle (double, double, double, double);
+static double waveangle (double, double, int);
+static double propdelay (double, double, int);
+static int finddelay (double, double, double, double, double, double *);
+static void satdoit (double, double, double, double, double, double, char *);
+static void satfinddelay (double, double, double, double, double *);
+static double satpropdelay (double);
+
+/*
+ * main - parse arguments and handle options
+ */
+int
+main(
+ int argc,
+ char *argv[]
+ )
+{
+ int c;
+ int errflg = 0;
+ double lat1, long1;
+ double lat2, long2;
+ double lat3, long3;
+
+ progname = argv[0];
+ while ((c = ntp_getopt(argc, argv, "dh:CWG")) != EOF)
+ switch (c) {
+ case 'd':
+ ++debug;
+ break;
+ case 'h':
+ hflag++;
+ height = atof(ntp_optarg);
+ if (height <= 0.0) {
+ (void) fprintf(stderr, "height %s unlikely\n",
+ ntp_optarg);
+ errflg++;
+ }
+ break;
+ case 'C':
+ Cflag++;
+ break;
+ case 'W':
+ Wflag++;
+ break;
+ case 'G':
+ Gflag++;
+ break;
+ default:
+ errflg++;
+ break;
+ }
+ if (errflg || (!(Cflag || Wflag || Gflag) && ntp_optind+4 != argc) ||
+ ((Cflag || Wflag || Gflag) && ntp_optind+2 != argc)) {
+ (void) fprintf(stderr,
+ "usage: %s [-d] [-h height] lat1 long1 lat2 long2\n",
+ progname);
+ (void) fprintf(stderr," - or -\n");
+ (void) fprintf(stderr,
+ "usage: %s -CWG [-d] lat long\n",
+ progname);
+ exit(2);
+ }
+
+
+ if (!(Cflag || Wflag || Gflag)) {
+ lat1 = latlong(argv[ntp_optind], 1);
+ long1 = latlong(argv[ntp_optind + 1], 0);
+ lat2 = latlong(argv[ntp_optind + 2], 1);
+ long2 = latlong(argv[ntp_optind + 3], 0);
+ if (hflag) {
+ doit(lat1, long1, lat2, long2, height, "");
+ } else {
+ doit(lat1, long1, lat2, long2, (double)SUMMERHEIGHT,
+ "summer propagation, ");
+ doit(lat1, long1, lat2, long2, (double)WINTERHEIGHT,
+ "winter propagation, ");
+ }
+ } else if (Wflag) {
+ /*
+ * Compute delay from WWV
+ */
+ lat1 = latlong(argv[ntp_optind], 1);
+ long1 = latlong(argv[ntp_optind + 1], 0);
+ lat2 = latlong(wwvlat, 1);
+ long2 = latlong(wwvlong, 0);
+ if (hflag) {
+ doit(lat1, long1, lat2, long2, height, "WWV ");
+ } else {
+ doit(lat1, long1, lat2, long2, (double)SUMMERHEIGHT,
+ "WWV summer propagation, ");
+ doit(lat1, long1, lat2, long2, (double)WINTERHEIGHT,
+ "WWV winter propagation, ");
+ }
+
+ /*
+ * Compute delay from WWVH
+ */
+ lat2 = latlong(wwvhlat, 1);
+ long2 = latlong(wwvhlong, 0);
+ if (hflag) {
+ doit(lat1, long1, lat2, long2, height, "WWVH ");
+ } else {
+ doit(lat1, long1, lat2, long2, (double)SUMMERHEIGHT,
+ "WWVH summer propagation, ");
+ doit(lat1, long1, lat2, long2, (double)WINTERHEIGHT,
+ "WWVH winter propagation, ");
+ }
+ } else if (Cflag) {
+ lat1 = latlong(argv[ntp_optind], 1);
+ long1 = latlong(argv[ntp_optind + 1], 0);
+ lat2 = latlong(chulat, 1);
+ long2 = latlong(chulong, 0);
+ if (hflag) {
+ doit(lat1, long1, lat2, long2, height, "CHU ");
+ } else {
+ doit(lat1, long1, lat2, long2, (double)SUMMERHEIGHT,
+ "CHU summer propagation, ");
+ doit(lat1, long1, lat2, long2, (double)WINTERHEIGHT,
+ "CHU winter propagation, ");
+ }
+ } else if (Gflag) {
+ lat1 = latlong(goes_up_lat, 1);
+ long1 = latlong(goes_up_long, 0);
+ lat3 = latlong(argv[ntp_optind], 1);
+ long3 = latlong(argv[ntp_optind + 1], 0);
+
+ lat2 = latlong(goes_sat_lat, 1);
+
+ long2 = latlong(goes_west_long, 0);
+ satdoit(lat1, long1, lat2, long2, lat3, long3,
+ "GOES Delay via WEST");
+
+ long2 = latlong(goes_stby_long, 0);
+ satdoit(lat1, long1, lat2, long2, lat3, long3,
+ "GOES Delay via STBY");
+
+ long2 = latlong(goes_east_long, 0);
+ satdoit(lat1, long1, lat2, long2, lat3, long3,
+ "GOES Delay via EAST");
+
+ }
+ exit(0);
+}
+
+
+/*
+ * doit - compute a delay and print it
+ */
+static void
+doit(
+ double lat1,
+ double long1,
+ double lat2,
+ double long2,
+ double h,
+ char *str
+ )
+{
+ int hops;
+ double delay;
+
+ hops = finddelay(lat1, long1, lat2, long2, h, &delay);
+ printf("%sheight %g km, hops %d, delay %g seconds\n",
+ str, h, hops, delay);
+}
+
+
+/*
+ * latlong - decode a latitude/longitude value
+ */
+static double
+latlong(
+ char *str,
+ int islat
+ )
+{
+ register char *cp;
+ register char *bp;
+ double arg;
+ double div;
+ int isneg;
+ char buf[32];
+ char *colon;
+
+ if (islat) {
+ /*
+ * Must be north or south
+ */
+ if (*str == 'N' || *str == 'n')
+ isneg = 0;
+ else if (*str == 'S' || *str == 's')
+ isneg = 1;
+ else
+ isneg = -1;
+ } else {
+ /*
+ * East is positive, west is negative
+ */
+ if (*str == 'E' || *str == 'e')
+ isneg = 0;
+ else if (*str == 'W' || *str == 'w')
+ isneg = 1;
+ else
+ isneg = -1;
+ }
+
+ if (isneg >= 0)
+ str++;
+
+ colon = strchr(str, ':');
+ if (colon != NULL) {
+ /*
+ * in hhh:mm:ss form
+ */
+ cp = str;
+ bp = buf;
+ while (cp < colon)
+ *bp++ = *cp++;
+ *bp = '\0';
+ cp++;
+ arg = atof(buf);
+ div = 60.0;
+ colon = strchr(cp, ':');
+ if (colon != NULL) {
+ bp = buf;
+ while (cp < colon)
+ *bp++ = *cp++;
+ *bp = '\0';
+ cp++;
+ arg += atof(buf) / div;
+ div = 3600.0;
+ }
+ if (*cp != '\0')
+ arg += atof(cp) / div;
+ } else {
+ arg = atof(str);
+ }
+
+ if (isneg == 1)
+ arg = -arg;
+
+ if (debug > 2)
+ (void) printf("latitude/longitude %s = %g\n", str, arg);
+
+ return arg;
+}
+
+
+/*
+ * greatcircle - compute the great circle distance in kilometers
+ */
+static double
+greatcircle(
+ double lat1,
+ double long1,
+ double lat2,
+ double long2
+ )
+{
+ double dg;
+ double l1r, l2r;
+
+ l1r = lat1 * RADPERDEG;
+ l2r = lat2 * RADPERDEG;
+ dg = EARTHRADIUS * acos(
+ (cos(l1r) * cos(l2r) * cos((long2-long1)*RADPERDEG))
+ + (sin(l1r) * sin(l2r)));
+ if (debug >= 2)
+ printf(
+ "greatcircle lat1 %g long1 %g lat2 %g long2 %g dist %g\n",
+ lat1, long1, lat2, long2, dg);
+ return dg;
+}
+
+
+/*
+ * waveangle - compute the wave angle for the given distance, virtual
+ * height and number of hops.
+ */
+static double
+waveangle(
+ double dg,
+ double h,
+ int n
+ )
+{
+ double theta;
+ double delta;
+
+ theta = dg / (EARTHRADIUS * (double)(2 * n));
+ delta = atan((h / (EARTHRADIUS * sin(theta))) + tan(theta/2)) - theta;
+ if (debug >= 2)
+ printf("waveangle dist %g height %g hops %d angle %g\n",
+ dg, h, n, delta / RADPERDEG);
+ return delta;
+}
+
+
+/*
+ * propdelay - compute the propagation delay
+ */
+static double
+propdelay(
+ double dg,
+ double h,
+ int n
+ )
+{
+ double phi;
+ double theta;
+ double td;
+
+ theta = dg / (EARTHRADIUS * (double)(2 * n));
+ phi = (PI/2.0) - atan((h / (EARTHRADIUS * sin(theta))) + tan(theta/2));
+ td = dg / (LIGHTSPEED * sin(phi));
+ if (debug >= 2)
+ printf("propdelay dist %g height %g hops %d time %g\n",
+ dg, h, n, td);
+ return td;
+}
+
+
+/*
+ * finddelay - find the propagation delay
+ */
+static int
+finddelay(
+ double lat1,
+ double long1,
+ double lat2,
+ double long2,
+ double h,
+ double *delay
+ )
+{
+ double dg; /* great circle distance */
+ double delta; /* wave angle */
+ int n; /* number of hops */
+
+ dg = greatcircle(lat1, long1, lat2, long2);
+ if (debug)
+ printf("great circle distance %g km %g miles\n", dg, dg/MILE);
+
+ n = 1;
+ while ((delta = waveangle(dg, h, n)) < 0.0) {
+ if (debug)
+ printf("tried %d hop%s, no good\n", n, n>1?"s":"");
+ n++;
+ }
+ if (debug)
+ printf("%d hop%s okay, wave angle is %g\n", n, n>1?"s":"",
+ delta / RADPERDEG);
+
+ *delay = propdelay(dg, h, n);
+ return n;
+}
+
+/*
+ * satdoit - compute a delay and print it
+ */
+static void
+satdoit(
+ double lat1,
+ double long1,
+ double lat2,
+ double long2,
+ double lat3,
+ double long3,
+ char *str
+ )
+{
+ double up_delay,down_delay;
+
+ satfinddelay(lat1, long1, lat2, long2, &up_delay);
+ satfinddelay(lat3, long3, lat2, long2, &down_delay);
+
+ printf("%s, delay %g seconds\n", str, up_delay + down_delay);
+}
+
+/*
+ * satfinddelay - calculate the one-way delay time between a ground station
+ * and a satellite
+ */
+static void
+satfinddelay(
+ double lat1,
+ double long1,
+ double lat2,
+ double long2,
+ double *delay
+ )
+{
+ double dg; /* great circle distance */
+
+ dg = greatcircle(lat1, long1, lat2, long2);
+
+ *delay = satpropdelay(dg);
+}
+
+/*
+ * satpropdelay - calculate the one-way delay time between a ground station
+ * and a satellite
+ */
+static double
+satpropdelay(
+ double dg
+ )
+{
+ double k1, k2, dist;
+ double theta;
+ double td;
+
+ theta = dg / (EARTHRADIUS);
+ k1 = EARTHRADIUS * sin(theta);
+ k2 = SATHEIGHT - (EARTHRADIUS * cos(theta));
+ if (debug >= 2)
+ printf("Theta %g k1 %g k2 %g\n", theta, k1, k2);
+ dist = sqrt(k1*k1 + k2*k2);
+ td = dist / LIGHTSPEED;
+ if (debug >= 2)
+ printf("propdelay dist %g height %g time %g\n", dg, dist, td);
+ return td;
+}
diff --git a/contrib/ntp/conf/README b/contrib/ntp/conf/README
new file mode 100644
index 000000000000..f06e44f5ae7c
--- /dev/null
+++ b/contrib/ntp/conf/README
@@ -0,0 +1,17 @@
+README file for directory ./conf of the NTP Version 4 distribution
+
+This directory contains example run-time configuration files for the
+NTP Version 4 daemon ntpd. These files illustrate some of the more
+obtuse configurations you may run into. They are not likely to do
+anything good if run on machines other than their native spot, so don't
+just blindly copy something and put it up. Additional information can
+be found in the ./doc directory of the base directory.
+
+See the Config.local.dist file in the base directory for an explanation
+of the defines used.
+
+The files Config.* are used to generate fullblown binaries suitable for
+distribution with the systems shown as suffix. While this can result
+in some degree of useless code, the degree is small compared to the
+size of the baseline code. The files *.conf are representative NTP
+run-time configuration files, which normally live in /etc/ntp.conf.
diff --git a/contrib/ntp/conf/baldwin.conf b/contrib/ntp/conf/baldwin.conf
new file mode 100644
index 000000000000..0781825f990d
--- /dev/null
+++ b/contrib/ntp/conf/baldwin.conf
@@ -0,0 +1,35 @@
+#
+# NTP configuration file (ntp.conf)
+# baldwin.udel.edu
+#
+# This illustrates the use of an external clock with the local clock
+# driver, as well as a multicast server. The prefer keyword on the
+# local clock driver declares an external clock and that the time of
+# this server should not be wiggled by an NTP peer, unless the
+# external clock comes unstuck. Note the use of the multicast group
+# ID assigned to NTP, 224.0.1.1, which identifies this as a multicast
+# server rather than a broadcast one. The other NTP peers are known
+# stratum-1 chimes intended as backup should the external clock croak.
+#
+peer 127.127.1.0 prefer # local clock driver
+fudge 127.127.12.0 stratum 0 refid GPS
+broadcast 224.0.1.1 key 6 ttl 127
+peer rackety.udel.edu # (Sun4c/40 IPC)
+peer barnstable.udel.edu # (Sun4c/65 SS1+)
+peer mizbeaver.udel.edu #(Bancomm bc700LAN)
+peer pogo.udel.edu # (Sun4c/65 SS1+)
+#
+# Miscellaneous stuff
+#
+driftfile /etc/ntp.drift # path for drift file
+statsdir /baldwin/ntpstats/ # directory for statistics files
+filegen peerstats file peerstats type day enable
+filegen loopstats file loopstats type day enable
+filegen clockstats file clockstats type day enable
+#
+# Authentication stuff
+#
+keys /usr/local/etc/ntp.keys # path for keys file
+trustedkey 3 4 5 6 14 15 # define trusted keys
+requestkey 15 # key (7) for accessing server variables
+controlkey 15 # key (6) for accessing server variables
diff --git a/contrib/ntp/conf/beauregard.conf b/contrib/ntp/conf/beauregard.conf
new file mode 100644
index 000000000000..72f735b17eae
--- /dev/null
+++ b/contrib/ntp/conf/beauregard.conf
@@ -0,0 +1,23 @@
+#
+# NTP configuration file (ntp.conf)
+# bearegard.udel.edu
+#
+server 127.127.18.1 # NIST ACTS modem driver
+fudge 127.127.18.1 time1 .0035
+phone atdt913034944774 atdt913034944785 atdt913034944774
+#phone atdt913034944812 atdt913034948497 atdt913034948022
+#
+# Miscellaneous stuff
+#
+driftfile /etc/ntp.drift # path for drift file
+statsdir /beauregard/ntpstats/ # directory for statistics files
+filegen peerstats file peerstats type day enable
+filegen loopstats file loopstats type day enable
+filegen clockstats file clockstats type day enable
+#
+# Authentication stuff
+#
+keys /usr/local/etc/ntp.keys # path for keys file
+trustedkey 3 4 5 6 14 15 # define trusted keys
+requestkey 15 # key (7) for accessing server variables
+controlkey 15 # key (6) for accessing server variables
diff --git a/contrib/ntp/conf/dewey.conf b/contrib/ntp/conf/dewey.conf
new file mode 100644
index 000000000000..ea4f3d4f4844
--- /dev/null
+++ b/contrib/ntp/conf/dewey.conf
@@ -0,0 +1,42 @@
+#
+# NTP configuration file (ntp.conf)
+#
+# Generic configuration file for UDel NTP stratum-2 time servers. Don't
+# forget each server should have a /etc/ntp.drift and /etc/ntp.keys file.
+#
+# Stratum-1 peers. Each server should chime two different stratum-1
+# servers from the following list. Each stratum-1 server should be used
+# only once.
+#
+#peer 128.8.10.1 # umd1.umd.edu
+#peer 18.72.0.3 version 2 # bitsy.mit.edu
+peer 132.249.16.1 # fuzz.sdsc.edu
+peer 128.118.46.3 version 2 # otc1.psu.edu
+#peer 128.9.2.129 # wwvb.isi.edu
+#peer 130.43.2.2 version 2 # apple.com
+#peer 16.1.0.22 # clepsydra.dec.com
+#peer 130.105.1.156 version 2 # clock.osf.orga
+#peer 128.96.60.5 version 2 # pi.bellcore.com
+#peer 128.4.1.1 # rackety.udel.edu
+#peer 129.116.3.5 # shorty.chpc.utexas.edu
+#
+# Stratum-2 peers. Each server should chime all of the others in this
+# list except itself.
+#
+peer 128.175.1.1 # huey.udel.edu (VAX)
+#peer 128.175.1.2 # dewey.udel.edu (VAX)
+peer 128.175.1.3 # louie.udel.edu (SPARC)
+peer 128.175.2.15 # snow-white.ee.udel.edu (SPARC)
+peer 128.175.7.4 # sol.cis.udel.edu (SPARC)
+#
+# Miscellaneous stuff
+#
+driftfile /etc/ntp.drift # path for drift file
+#
+# Authentication stuff. Note the different authentication delay on
+# VAX and SPARC.
+#
+keys /usr/local/etc/ntp.keys # path for key file
+trustedkey 1 2 15 # define trusted keys
+requestkey 15 # key (7) for accessing server variables
+controlkey 15 # key (6) for accessing server variables
diff --git a/contrib/ntp/conf/grundoon.conf b/contrib/ntp/conf/grundoon.conf
new file mode 100644
index 000000000000..44629230e6ac
--- /dev/null
+++ b/contrib/ntp/conf/grundoon.conf
@@ -0,0 +1,154 @@
+#
+# NTP configuration file (ntp.conf)
+# grundoon.udel.edu
+#
+# This machine can best be described as the kitchen sink. It has, in
+# addition to the baseboard tty ports ttya and ttyb, an 8-line
+# Serial/Parallel Interface (SPIF) with ports ttyz00 through ttyz07. The
+# configuration includes the following drivers, clock addresses and Unix
+# device names.
+#
+# Local Clock 127.127.1.0 /dev/audio
+# PST 1020 WWV/WWVH Receiver 127.127.3.1 /dev/pst1
+# Spectracom 8170 WWVB Receiver 127.127.4.1 /dev/wwvb1
+# IRIG Audio Decoder 127.127.6.0 /dev/audio
+# Scratchbuilt CHU Receiver 127.127.7.1 /dev/chu1
+# NIST ACTS modem 127.127.18.1 /dev/acts1
+# Heath GC-1000 WWV Receiver 127.127.19.1 /dev/pst1
+# PPS Clock 127.127.22.1 none
+#
+# This machine has the kernel modifications described in the README.kern
+# file, as well as the tty_clk, tty_chu and ppsclock streams modules.
+#
+# Spectracom 8170/Netclock-2 WWVB receiver. This receiver is equipped
+# with a 1-pps and IRIG outputs. The 1-pps signal is connected via the
+# ppsclock streams module and the carrier detect line of the CHU
+# receiver below (ttyb). The IRIG signal is connected via an attenuator
+# to the audio port (/dev/audio). The propagation delay computed from
+# geographical coordinates is 8.8 ms, while the receiver delay
+# calibrated at the factory is 17.3 ms, for a total delay of 26.1 ms.
+# This is confirmed within 0.1 ms at the 1-pps signal output using a
+# portable cesium clock. We add a fudge time1 of 3.5 ms so the driver
+# time agrees with the 1-pps signal to within 1 ms. The fudge flag4 is
+# set to cause the receiver to dump the quality table once each day to
+# the clockstats file.
+
+#
+#server 127.127.4.1 # /dev/wwvb1 -> /dev/ttyz03
+#fudge 127.127.4.1 time1 0.0035 flag4 1
+#
+# IRIG Audio Decoder. The IRGI signal of the Spectracom WWVB receiver is
+# connected to the audio codec via a resistor attenuator. We add a fudge
+# time1 of 3.5 ms so the driver agrees with the calibrated 1-pps signal
+# to within 0.1 ms. We also specify a reference ID of WWVB to indicate
+# the signal origin. Note the prefer keyword in the server line, which
+# favors this driver over all others that survive the clock selection
+# algorithm. See README.refclock for further insight on this feature.
+#
+server 127.127.6.0 prefer # /dev/audio
+fudge 127.127.6.0 time1 0.0005 refid WWVB
+
+#
+# PST/Traconex 1020 WWV/WWVH Receier. The internal DIPswitches are set
+# as near as possible to the delays to WWV (8.8 ms) and WWVH (28.1 ms),
+# as computed from geographical coordinates. We add a fudge time1 of 5.9
+# ms so the driver time agrees with the 1-pps signal to within 1 ms for
+# WWV. We also set the stratum to 1, so this receiver will not normally
+# be selected, unless the primary WWVB receiver comes unstuck.
+#
+server 127.127.3.1 # /dev/pst1 -> ttyz05
+fudge 127.127.3.1 time1 0.0059 stratum 1
+
+#
+# Scratchbuilt CHU Receiver. The audio signal from a computer controlled
+# CHU receiver is connected to a gadget box, which contains a 103A modem
+# chip and level converter operating at 300 bps. The propagation delay
+# computed from geographical coordinates is 3.0 ms, which is the value
+# of the fudge time1 parameter. We add a fudge time2 of 9.9 ms so that
+# the driver time agrees with the 1-pps signal to within a few ms,
+# ordinarily the best possible with this receiver. The fudge flag3 is
+# set because the 1-pps signal happens to be connected vit the carrier
+# detect line on this port (ttyb). We also set the stratum to 1, so this
+# receiver will not normally be selected, unless the primary WWVB
+# receiver comes unstuck.
+#
+server 127.127.7.1 # /dev/chu1 -> /dev/ttyb
+fudge 127.127.7.1 time1 0.0030 time2 0.0099 flag3 1 stratum 1
+
+#
+# NIST Automated Computer Time Service. This driver calls a special
+# telephone number in Boulder, CO, to fetch the time directly from the
+# NIST cesium farm. The details of the complicated calling program are
+# in the README.refclock file. The Practical Peripherals 9600SA modem
+# does not work correctly with the ACTS echo-delay scheme for
+# automatically calculating the propagation delay, so the fudge flag2 is
+# set to disable the feature. Instead, we add a fudge time1 of 65.0 ms
+# so that the driver time agrees with th e1-pps signal to within 1 ms.
+# The phone command specifies three alternate telephone numbers,
+# including AT modem command prefix, which will be tried one after the
+# other at each measurement attempt. In this case, a cron job is used to
+# set fudge flag1, causing a measurement attempt, every six hours.
+#
+server 127.127.18.1 # /dev/acts1 -> /dev/ttyz00
+fudge 127.127.18.1 time1 0.0650 flag2 1
+phone atdt13034944774 atdt13034944785 atdt13034944774
+
+#
+# Heath GC-1000 Most Accurate Clock. This is a WWV receiver with a
+# claimed accuracy better than 100 ms under "hi spec" conditions, but
+# such conditions are not frequent. The propagation delay DIPswitchs are
+# set to 9 ms, as close as possible to the 8.8 ms computed from
+# geographical coordinates. We add a fudge time2 of 40.0 ms so that the
+# driver time agrees with the 1-pps signal to within 50 ms, ordinarily
+# the best possible with this receiver. We also set the stratum to 1, so
+# this receiver will not normally be selected, unless the primary WWVB
+# receiver comes unstuck.
+#
+server 127.127.19.1 # /dev/heath1 -> ttyz07
+fudge 127.127.19.1 time1 0.040 stratum 1
+
+#
+# Undisciplined Local Clock. This is a fake driver intended for backup
+# and when no outside source of synchronized time is available. The
+# default stratum is usually 3, but in this case we elect to use stratum
+# 0. Since the server line does not have the prefer keyword, this driver
+# is never used for synchronization, unless no other other
+# synchronization source is available. In case the local host is
+# controlled by some external source, such as an external oscillator or
+# another protocol, the prefer keyword would cause the local host to
+# disregard all other synchronization sources, unless the kernel
+# modifications are in use and declare an unsynchronized condition.
+#
+server 127.127.1.0 # local clock
+fudge 127.127.1.0 stratum 0
+
+#
+# PPS Clock. This driver is used to capture a 1-pps signal when the PPS
+# kernel modifications are not in use. It can be configured for the
+# tty_clk or ppsclock streams module or no module at all, assuming the
+# RS232 connector is properly wired. Normally, the 1-pps signal is
+# generated by a radio clock, in this cast the Spectracom clock
+# 127.127.4.1 also configured for this host. When used this way, the
+# associated radio clock normally has the prefer keyword in the serve
+# command line. The PPS driver then will be selected only if the prefer
+# peer is operating within nominal error bounds. See the README.refclock
+# file for further details.
+#
+#server 127.127.22.1 # pps clock
+
+#
+# Miscellaneous stuff. We enable authentication in order to prevent
+#
+driftfile /etc/ntp.drift # path for drift file
+statsdir /grundoon/ntpstats/ # directory for statistics files
+filegen peerstats file peerstats type day enable
+filegen loopstats file loopstats type day enable
+filegen clockstats file clockstats type day enable
+
+#
+# Authentication stuff
+#
+keys /usr/local/etc/ntp.keys # path for keys file
+trustedkey 1 2 3 4 5 6 14 15 # define trusted keys
+requestkey 15 # key (7) for accessing server variables
+controlkey 15 # key (6) for accessing server variables
diff --git a/contrib/ntp/conf/malarky.conf b/contrib/ntp/conf/malarky.conf
new file mode 100644
index 000000000000..adf5eb39d4d4
--- /dev/null
+++ b/contrib/ntp/conf/malarky.conf
@@ -0,0 +1,24 @@
+#
+# NTP configuration file (ntp.conf)
+#
+# This is for a broadcast/multicast client. Except for the statistics
+# stuff, this can be done with only a commmand line of the form
+#
+# /usr/local/bin/xntpd -a -k /usr/local/bin/ntp.keys -m -t 3
+#
+multicastclient # listen on default 224.0.1.1
+#
+# Miscellaneous stuff
+#
+driftfile /etc/ntp.drift # path for drift file
+statsdir /malarky/ntpstats/ # directory for statistics files
+filegen peerstats file peerstats type day enable
+filegen loopstats file loopstats type day enable
+filegen clockstats file clockstats type day enable
+#
+# Authentication stuff
+#
+keys /usr/local/etc/ntp.keys # path for key file
+trustedkey 3 4 5 6 14 # define trusted keys
+requestkey 14 # key (7) for accessing server variables
+controlkey 14 # key (6) for accessing server variables
diff --git a/contrib/ntp/conf/pogo.conf b/contrib/ntp/conf/pogo.conf
new file mode 100644
index 000000000000..e97d4c5c7bfd
--- /dev/null
+++ b/contrib/ntp/conf/pogo.conf
@@ -0,0 +1,30 @@
+#
+# NTP configuration file (ntp.conf)
+# pogo.udel.edu
+#
+server 127.127.10.1 prefer # austron 2201A gps receiver
+peer 128.4.1.1 # rackety.udel.edu (Sun4c/40 IPC)
+peer 128.4.1.2 # mizbeaver.udel.edu (Bancomm bc700LAN)
+peer 128.4.1.4 # barnstable.udel.edu (Sun4c/65 SS1+)
+peer 128.4.1.5 maxpoll 8 # churchy.udel.edu (cisco IGS router)
+peer 132.163.135.130 maxpoll 8 # time_A.timefreq.bldrdoc.gov (Cesium)
+peer 131.188.1.40 maxpoll 8 # ntps1-0.uni-erlangen.de (DCF77)
+peer 129.132.2.21 maxpoll 8 # swisstime.ethz.ch (DCF77)
+peer 130.155.98.13 maxpoll 8 # terss.ml.csiro.au (Cesium)
+peer 192.36.143.150 maxpoll 8 # Time1.Stupi.SE (Cesium)
+#
+# Miscellaneous stuff
+#
+precision -18 # clock reading precision (usec)
+driftfile /etc/ntp.drift # path for drift file
+statsdir /pogo/ntpstats/ # directory for statistics files
+filegen peerstats file peerstats type day enable
+filegen loopstats file loopstats type day enable
+filegen clockstats file clockstats type day enable
+#
+# Authentication stuff
+#
+keys /usr/local/etc/ntp.keys # path for keys file
+trustedkey 3 4 5 6 14 # define trusted keys
+requestkey 15 # key (7) for accessing server variables
+controlkey 15 # key (6) for accessing server variables
diff --git a/contrib/ntp/config.guess b/contrib/ntp/config.guess
new file mode 100755
index 000000000000..8ccccbce0367
--- /dev/null
+++ b/contrib/ntp/config.guess
@@ -0,0 +1,1090 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
+# Free Software Foundation, Inc.
+#
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner <bothner@cygnus.com>.
+# The master version of this file is at the FSF in /home/gd/gnu/lib.
+# Please send patches to the Autoconf mailing list <autoconf@gnu.org>.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit system type (host/target name).
+#
+# Only a few systems have been added to this list; please add others
+# (but try to keep the structure clean).
+#
+
+# Use $HOST_CC if defined. $CC may point to a cross-compiler
+if test x"$CC_FOR_BUILD" = x; then
+ if test x"$HOST_CC" != x; then
+ CC_FOR_BUILD="$HOST_CC"
+ else
+ if test x"$CC" != x; then
+ CC_FOR_BUILD="$CC"
+ else
+ CC_FOR_BUILD=cc
+ fi
+ fi
+fi
+
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 8/24/94.)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ alpha:OSF1:*:*)
+ if test $UNAME_RELEASE = "V4.0"; then
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ fi
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ cat <<EOF >$dummy.s
+ .globl main
+ .ent main
+main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
+EOF
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-cbm-sysv4
+ exit 0;;
+ amiga:NetBSD:*:*)
+ echo m68k-cbm-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ arc64:OpenBSD:*:*)
+ echo mips64el-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hkmips:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ arm32:NetBSD:*:*)
+ echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ SR2?01:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:NetBSD:*:*)
+ echo m68k-atari-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:NetBSD:*:*)
+ echo m68k-sun-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:NetBSD:*:*)
+ echo m68k-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:NetBSD:*:*)
+ echo powerpc-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy \
+ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
+ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i?86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:4)
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=4.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ sed 's/^ //' << EOF >$dummy.c
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+ rm -f $dummy.c $dummy
+ esac
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i?86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ hppa*:OpenBSD:*:*)
+ echo hppa-unknown-openbsd
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*X-MP:*:*:*)
+ echo xmp-cray-unicos
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo t3e-cray-unicosmk${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY-2:*:*:*)
+ echo cray2-cray-unicos
+ exit 0 ;;
+ F300:UNIX_System_V:*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ F301:UNIX_System_V:*:*)
+ echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
+ exit 0 ;;
+ hp3[0-9][05]:NetBSD:*:*)
+ echo m68k-hp-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ if test -x /usr/bin/objformat; then
+ if test "elf" = "`/usr/bin/objformat`"; then
+ echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ exit 0
+ fi
+ fi
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ *:NetBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i386-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ *:Linux:*:*)
+ # uname on the ARM produces all sorts of strangeness, and we need to
+ # filter it out.
+ case "$UNAME_MACHINE" in
+ armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
+ arm* | sa110*) UNAME_MACHINE="arm" ;;
+ esac
+
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ ld_help_string=`cd /; ld --help 2>&1`
+ ld_supported_emulations=`echo $ld_help_string \
+ | sed -ne '/supported emulations:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported emulations: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_emulations" in
+ i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
+ i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
+ sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+ armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+ m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+ elf32ppc)
+ # Determine Lib Version
+ cat >dummy.c <<EOF
+#include <features.h>
+#if defined(__GLIBC__)
+extern char __libc_version[];
+extern char __libc_release[];
+#endif
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#if defined(__GLIBC__)
+ printf("%s %s\n", __libc_version, __libc_release);
+#else
+ printf("unkown\n");
+#endif
+ return 0;
+}
+EOF
+ LIBC=""
+ ${CC-cc} dummy.c -o dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./dummy | grep 1\.99 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f dummy.c dummy
+ echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
+ esac
+
+ if test "${UNAME_MACHINE}" = "alpha" ; then
+ sed 's/^ //' <<EOF >$dummy.s
+ .globl main
+ .ent main
+ main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+
+ objdump --private-headers $dummy | \
+ grep ld.so.1 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
+ elif test "${UNAME_MACHINE}" = "mips" ; then
+ cat >$dummy.c <<EOF
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __MIPSEB__
+ printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+ printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ else
+ # Either a pre-BFD a.out linker (linux-gnuoldld)
+ # or one that does not give us useful --help.
+ # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+ # If ld does not provide *any* "supported emulations:"
+ # that means it is gnuoldld.
+ echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+ test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+
+ case "${UNAME_MACHINE}" in
+ i?86)
+ VENDOR=pc;
+ ;;
+ *)
+ VENDOR=unknown;
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ cat >$dummy.c <<EOF
+#include <features.h>
+#ifdef __cplusplus
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __ELF__
+# ifdef __GLIBC__
+# if __GLIBC__ >= 2
+ printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+ printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ fi ;;
+# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
+# are messed up and put the nodename in both sysname and nodename.
+ i?86:DYNIX/ptx:4*:*)
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ i?86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit 0 ;;
+ i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ i?86:*:5:7*)
+ UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586
+ (/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686
+ (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ i?86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ pc:*:*:*)
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:*:6*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:"Mac OS":*:*)
+ echo `uname -p`-apple-macos${UNAME_RELEASE}
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+ printf ("vax-dec-bsd\n"); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+#echo '(Unable to guess system type)' 1>&2
+
+exit 1
diff --git a/contrib/ntp/config.h.in b/contrib/ntp/config.h.in
new file mode 100644
index 000000000000..f722c7de78eb
--- /dev/null
+++ b/contrib/ntp/config.h.in
@@ -0,0 +1,887 @@
+/* config.h.in. Generated automatically from configure.in by autoheader. */
+
+/* Define if on AIX 3.
+ System headers sometimes define this.
+ We just want to avoid a redefinition error message. */
+#ifndef _ALL_SOURCE
+#undef _ALL_SOURCE
+#endif
+
+/* Define if type char is unsigned and you are not using gcc. */
+#ifndef __CHAR_UNSIGNED__
+#undef __CHAR_UNSIGNED__
+#endif
+
+/* Define to empty if the keyword does not work. */
+#undef const
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
+
+/* Define as __inline if that's what the C compiler calls it. */
+#undef inline
+
+/* Define if on MINIX. */
+#undef _MINIX
+
+/* Define if your struct nlist has an n_un member. */
+#undef NLIST_NAME_UNION
+
+/* Define if you have <nlist.h>. */
+#undef NLIST_STRUCT
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+#undef off_t
+
+/* Define if the system does not provide POSIX.1 features except
+ with this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define if you need to in order for stat and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define as the return type of signal handlers (int or void). */
+#undef RETSIGTYPE
+
+/* Define to `unsigned' if <sys/types.h> doesn't define. */
+#undef size_t
+
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Define if your <sys/time.h> declares struct tm. */
+#undef TM_IN_SYS_TIME
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef uid_t
+
+/* Define if your processor stores words with the most significant
+ byte first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* debugging code */
+#undef DEBUG
+
+/* Minutes per DST adjustment */
+#undef DSTMINUTES
+
+/* MD5 authentication */
+#undef MD5
+
+/* DES authentication (COCOM only) */
+#undef DES
+
+/* time_t */
+#undef time_t
+
+/* reference clock interface */
+#undef REFCLOCK
+
+/* Audio CHU? */
+#undef AUDIO_CHU
+
+/* ACTS modem service */
+#undef CLOCK_ACTS
+
+/* Arbiter 1088A/B GPS receiver */
+#undef CLOCK_ARBITER
+
+/* DHD19970505: ARCRON support. */
+#undef CLOCK_ARCRON_MSF
+
+/* Austron 2200A/2201A GPS receiver */
+#undef CLOCK_AS2201
+
+/* PPS interface */
+#undef CLOCK_ATOM
+
+/* PPS auxiliary interface for ATOM */
+#undef PPS_SAMPLE
+
+/* Datum/Bancomm bc635/VME interface */
+#undef CLOCK_BANC
+
+/* ELV/DCF7000 clock */
+#undef CLOCK_DCF7000
+
+/* HOPF 6021 clock */
+#undef CLOCK_HOPF6021
+
+/* Meinberg clocks */
+#undef CLOCK_MEINBERG
+
+/* DCF77 raw time code */
+#undef CLOCK_RAWDCF
+
+/* RCC 8000 clock */
+#undef CLOCK_RCC8000
+
+/* Schmid DCF77 clock */
+#undef CLOCK_SCHMID
+
+/* Trimble GPS receiver/TAIP protocol */
+#undef CLOCK_TRIMTAIP
+
+/* Trimble GPS receiver/TSIP protocol */
+#undef CLOCK_TRIMTSIP
+
+/* WHARTON 400A Series protocol */
+#undef CLOCK_WHARTON_400A
+
+/* VARITEXT protocol */
+#undef CLOCK_VARITEXT
+
+/* Diems Computime Radio Clock */
+#undef CLOCK_COMPUTIME
+
+/* Datum Programmable Time System */
+#undef CLOCK_DATUM
+
+/* TrueTime GPS receiver/VME interface */
+#undef CLOCK_GPSVME
+
+/* Heath GC-1000 WWV/WWVH receiver */
+#undef CLOCK_HEATH
+
+/* HP 58503A GPS receiver */
+#undef CLOCK_HPGPS
+
+/* Sun IRIG audio decoder */
+#undef CLOCK_IRIG
+
+/* Rockwell Jupiter GPS clock */
+#undef CLOCK_JUPITER
+
+/* Leitch CSD 5300 Master Clock System Driver */
+#undef CLOCK_LEITCH
+
+/* local clock reference */
+#undef CLOCK_LOCAL
+
+/* EES M201 MSF receiver */
+#undef CLOCK_MSFEES
+
+/* Magnavox MX4200 GPS receiver */
+#undef CLOCK_MX4200
+
+/* NMEA GPS receiver */
+#undef CLOCK_NMEA
+
+/* Palisade clock */
+#undef CLOCK_PALISADE
+
+/* PARSE driver interface */
+#undef CLOCK_PARSE
+
+/* PARSE kernel PLL PPS support */
+#undef PPS_SYNC
+
+/* PCL 720 clock support */
+#undef CLOCK_PPS720
+
+/* PST/Traconex 1020 WWV/WWVH receiver */
+#undef CLOCK_PST
+
+/* PTB modem service */
+#undef CLOCK_PTBACTS
+
+/* clock thru shared memory */
+#undef CLOCK_SHM
+
+/* Motorola UT Oncore GPS */
+#undef CLOCK_ONCORE
+
+/* KSI/Odetics TPRO/S GPS receiver/IRIG interface */
+#undef CLOCK_TPRO
+
+/* TRAK 8810 GPS receiver */
+#undef CLOCK_TRAK
+
+/* Kinemetrics/TrueTime receivers */
+#undef CLOCK_TRUETIME
+
+/* USNO modem service */
+#undef CLOCK_USNO
+
+/* Spectracom 8170/Netclock/2 WWVB receiver */
+#undef CLOCK_WWVB
+
+/* Ultralink M320 WWVB receiver */
+#undef CLOCK_ULINK
+
+/* Chronolog K-series WWVB receiver */
+#undef CLOCK_CHRONOLOG
+
+/* Dumb generic hh:mm:ss local clock */
+#undef CLOCK_DUMBCLOCK
+
+/* define if we need to declare int errno; */
+#undef DECL_ERRNO
+
+/* define if we may declare int h_errno; */
+#undef DECL_H_ERRNO
+
+/* define if it's OK to declare char *sys_errlist[]; */
+#undef CHAR_SYS_ERRLIST
+
+/* define if it's OK to declare int syscall P((int, struct timeval *, struct timeval *)); */
+#undef DECL_SYSCALL
+
+/* define if we have syscall is buggy (Solaris 2.4) */
+#undef SYSCALL_BUG
+
+/* Do we need extra room for SO_RCVBUF? (HPUX <8) */
+#undef NEED_RCVBUF_SLOP
+
+/* Should we open the broadcast socket? */
+#undef OPEN_BCAST_SOCKET
+
+/* Do we want the HPUX FindConfig()? */
+#undef NEED_HPUX_FINDCONFIG
+
+/* canonical system (cpu-vendor-os) string */
+#undef STR_SYSTEM
+
+/* define if NetInfo support is available */
+#undef HAVE_NETINFO
+
+/* define if [gs]ettimeofday() only takes 1 argument */
+#undef SYSV_TIMEOFDAY
+
+/* define if struct sockaddr has sa_len */
+#undef HAVE_SA_LEN_IN_STRUCT_SOCKADDR
+
+/* define if struct clockinfo has hz */
+#undef HAVE_HZ_IN_STRUCT_CLOCKINFO
+
+/* define if struct sigaction has sa_sigaction */
+#undef HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION
+
+/* define if struct clockinfo has tickadj */
+#undef HAVE_TICKADJ_IN_STRUCT_CLOCKINFO
+
+/* define if struct ntptimeval uses time.tv_nsec instead of time.tv_usec */
+#undef HAVE_TV_NSEC_IN_NTPTIMEVAL
+
+/* Does a system header defind struct ppsclockev? */
+#undef HAVE_STRUCT_PPSCLOCKEV
+
+/* define if function prototypes are OK */
+#undef HAVE_PROTOTYPES
+
+/* define if setpgrp takes 0 arguments */
+#undef HAVE_SETPGRP_0
+
+/* hardwire a value for tick? */
+#undef PRESET_TICK
+
+/* hardwire a value for tickadj? */
+#undef PRESET_TICKADJ
+
+/* is adjtime() accurate? */
+#undef ADJTIME_IS_ACCURATE
+
+/* should we NOT read /dev/kmem? */
+#undef NOKMEM
+
+/* use UDP Wildcard Delivery? */
+#undef UDP_WILDCARD_DELIVERY
+
+/* always slew the clock? */
+#undef SLEWALWAYS
+
+/* step, then slew the clock? */
+#undef STEP_SLEW
+
+/* force ntpdate to step the clock if !defined(STEP_SLEW) ? */
+#undef FORCE_NTPDATE_STEP
+
+/* synch TODR hourly? */
+#undef DOSYNCTODR
+
+/* do we set process groups with -pid? */
+#undef UDP_BACKWARDS_SETOWN
+
+/* must we have a CTTY for fsetown? */
+#undef USE_FSETOWNCTTY
+
+/* can we use SIGIO for tcp and udp IO? */
+#undef HAVE_SIGNALED_IO
+
+/* can we use SIGPOLL for UDP? */
+#undef USE_UDP_SIGPOLL
+
+/* can we use SIGPOLL for tty IO? */
+#undef USE_TTY_SIGPOLL
+
+/* do we want the CHU driver? */
+#undef CLOCK_CHU
+
+/* do we have the ppsclock streams module? */
+#undef PPS
+
+/* do we have the tty_clk line discipline/streams module? */
+#undef TTYCLK
+
+/* does the kernel support precision time discipline? */
+#undef KERNEL_PLL
+
+/* does the kernel support multicasting IP? */
+#undef MCAST
+
+/* do we have ntp_{adj,get}time in libc? */
+#undef NTP_SYSCALLS_LIBC
+
+/* do we have ntp_{adj,get}time in the kernel? */
+#undef NTP_SYSCALLS_STD
+
+/* do we have STREAMS/TLI? (Can we replace this with HAVE_SYS_STROPTS_H? */
+#undef STREAMS_TLI
+
+/* do we need an s_char typedef? */
+#undef NEED_S_CHAR_TYPEDEF
+
+/* does SIOCGIFCONF return size in the buffer? */
+#undef SIZE_RETURNED_IN_BUFFER
+
+/* what is the name of TICK in the kernel? */
+#undef K_TICK_NAME
+
+/* Is K_TICK_NAME (nsec_per_tick, for example) in nanoseconds? */
+#undef TICK_NANO
+
+/* what is the name of TICKADJ in the kernel? */
+#undef K_TICKADJ_NAME
+
+/* Is K_TICKADJ_NAME (hrestime_adj, for example) in nanoseconds? */
+#undef TICKADJ_NANO
+
+/* what is (probably) the name of DOSYNCTODR in the kernel? */
+#undef K_DOSYNCTODR_NAME
+
+/* what is (probably) the name of NOPRINTF in the kernel? */
+#undef K_NOPRINTF_NAME
+
+/* do we need HPUX adjtime() library support? */
+#undef NEED_HPUX_ADJTIME
+
+/* Might nlist() values require an extra level of indirection (AIX)? */
+#undef NLIST_EXTRA_INDIRECTION
+
+/* Should we recommend a minimum value for tickadj? */
+#undef MIN_REC_TICKADJ
+
+/* Is there a problem using PARENB and IGNPAR (IRIX)? */
+#undef NO_PARENB_IGNPAR
+
+/* Should we not IGNPAR (Linux)? */
+#undef RAWDCF_NO_IGNPAR
+
+/* Does the compiler like "volatile"? */
+#undef volatile
+
+/* Does qsort expect to work on "void *" stuff? */
+#undef QSORT_USES_VOID_P
+
+/* What is the fallback value for HZ? */
+#undef DEFAULT_HZ
+
+/* Do we need to override the system's idea of HZ? */
+#undef OVERRIDE_HZ
+
+/* Do we want the SCO clock hacks? */
+#undef SCO5_CLOCK
+
+/* Do we want the ReliantUNIX clock hacks? */
+#undef RELIANTUNIX_CLOCK
+
+/* Does the kernel have an FLL bug? */
+#undef KERNEL_FLL_BUG
+
+/* Define if you have the TIOCGPPSEV ioctl (Solaris) */
+#undef HAVE_TIOCGPPSEV
+
+/* Define if you have the TIOCSPPS ioctl (Solaris) */
+#undef HAVE_TIOCSPPS
+
+/* Define if you have the CIOGETEV ioctl (SunOS, Linux) */
+#undef HAVE_CIOGETEV
+
+/* Define if you have the TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, and ASYNC_PPS_CD_NEG ioctls (linux) */
+#undef HAVE_TIO_SERIAL_STUFF
+
+/* Define if you use struct timespec rather than struct timeval (time in ns rather than us) */
+#undef HAVE_TIMESPEC
+
+/* Define if you have the interface in the Draft RFC */
+#undef HAVE_PPSAPI
+
+/* Do we need to #define _SVID3 when we #include <termios.h>? */
+#undef TERMIOS_NEEDS__SVID3
+
+/* adjtime()? */
+#undef DECL_ADJTIME_0
+
+/* bcopy()? */
+#undef DECL_BCOPY_0
+
+/* bzero()? */
+#undef DECL_BZERO_0
+
+/* cfset[io]speed()? */
+#undef DECL_CFSETISPEED_0
+
+/* ioctl()? */
+#undef DECL_IOCTL_0
+
+/* IPC? (bind, connect, recvfrom, sendto, setsockopt, socket) */
+#undef DECL_IPC_0
+
+/* memmove()? */
+#undef DECL_MEMMOVE_0
+
+/* mkstemp()? */
+#undef DECL_MKSTEMP_0
+
+/* mktemp()? */
+#undef DECL_MKTEMP_0
+
+/* mrand48()? */
+#undef DECL_MRAND48_0
+
+/* nlist()? */
+#undef DECL_NLIST_0
+
+/* plock()? */
+#undef DECL_PLOCK_0
+
+/* rename()? */
+#undef DECL_RENAME_0
+
+/* select()? */
+#undef DECL_SELECT_0
+
+/* setitimer()? */
+#undef DECL_SETITIMER_0
+
+/* setpriority()? */
+#undef DECL_SETPRIORITY_0
+#undef DECL_SETPRIORITY_1
+
+/* sigvec()? */
+#undef DECL_SIGVEC_0
+
+/* srand48()? */
+#undef DECL_SRAND48_0
+
+/* stdio stuff? */
+#undef DECL_STDIO_0
+
+/* stime()? */
+#undef DECL_STIME_0
+
+/* strtol()? */
+#undef DECL_STRTOL_0
+
+/* syslog() stuff? */
+#undef DECL_SYSLOG_0
+
+/* time()? */
+#undef DECL_TIME_0
+
+/* [gs]ettimeofday()? */
+#undef DECL_TIMEOFDAY_0
+
+/* tolower()? */
+#undef DECL_TOLOWER_0
+
+/* toupper()? */
+#undef DECL_TOUPPER_0
+
+/* The number of bytes in a int. */
+#undef SIZEOF_INT
+
+/* The number of bytes in a long. */
+#undef SIZEOF_LONG
+
+/* The number of bytes in a signed char. */
+#undef SIZEOF_SIGNED_CHAR
+
+/* Define if you have the K_open function. */
+#undef HAVE_K_OPEN
+
+/* Define if you have the __adjtimex function. */
+#undef HAVE___ADJTIMEX
+
+/* Define if you have the __ntp_gettime function. */
+#undef HAVE___NTP_GETTIME
+
+/* Define if you have the clock_settime function. */
+#undef HAVE_CLOCK_SETTIME
+
+/* Define if you have the daemon function. */
+#undef HAVE_DAEMON
+
+/* Define if you have the getbootfile function. */
+#undef HAVE_GETBOOTFILE
+
+/* Define if you have the getdtablesize function. */
+#undef HAVE_GETDTABLESIZE
+
+/* Define if you have the getrusage function. */
+#undef HAVE_GETRUSAGE
+
+/* Define if you have the gettimeofday function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define if you have the getuid function. */
+#undef HAVE_GETUID
+
+/* Define if you have the kvm_open function. */
+#undef HAVE_KVM_OPEN
+
+/* Define if you have the memcpy function. */
+#undef HAVE_MEMCPY
+
+/* Define if you have the memlk function. */
+#undef HAVE_MEMLK
+
+/* Define if you have the memmove function. */
+#undef HAVE_MEMMOVE
+
+/* Define if you have the memset function. */
+#undef HAVE_MEMSET
+
+/* Define if you have the mkstemp function. */
+#undef HAVE_MKSTEMP
+
+/* Define if you have the mktime function. */
+#undef HAVE_MKTIME
+
+/* Define if you have the mlockall function. */
+#undef HAVE_MLOCKALL
+
+/* Define if you have the mrand48 function. */
+#undef HAVE_MRAND48
+
+/* Define if you have the nice function. */
+#undef HAVE_NICE
+
+/* Define if you have the nlist function. */
+#undef HAVE_NLIST
+
+/* Define if you have the ntp_adjtime function. */
+#undef HAVE_NTP_ADJTIME
+
+/* Define if you have the ntp_gettime function. */
+#undef HAVE_NTP_GETTIME
+
+/* Define if you have the plock function. */
+#undef HAVE_PLOCK
+
+/* Define if you have the pututline function. */
+#undef HAVE_PUTUTLINE
+
+/* Define if you have the pututxline function. */
+#undef HAVE_PUTUTXLINE
+
+/* Define if you have the random function. */
+#undef HAVE_RANDOM
+
+/* Define if you have the rtprio function. */
+#undef HAVE_RTPRIO
+
+/* Define if you have the sched_setscheduler function. */
+#undef HAVE_SCHED_SETSCHEDULER
+
+/* Define if you have the setlinebuf function. */
+#undef HAVE_SETLINEBUF
+
+/* Define if you have the setpgid function. */
+#undef HAVE_SETPGID
+
+/* Define if you have the setpriority function. */
+#undef HAVE_SETPRIORITY
+
+/* Define if you have the setsid function. */
+#undef HAVE_SETSID
+
+/* Define if you have the settimeofday function. */
+#undef HAVE_SETTIMEOFDAY
+
+/* Define if you have the setvbuf function. */
+#undef HAVE_SETVBUF
+
+/* Define if you have the sigaction function. */
+#undef HAVE_SIGACTION
+
+/* Define if you have the sigset function. */
+#undef HAVE_SIGSET
+
+/* Define if you have the sigsuspend function. */
+#undef HAVE_SIGSUSPEND
+
+/* Define if you have the sigvec function. */
+#undef HAVE_SIGVEC
+
+/* Define if you have the srand48 function. */
+#undef HAVE_SRAND48
+
+/* Define if you have the srandom function. */
+#undef HAVE_SRANDOM
+
+/* Define if you have the stime function. */
+#undef HAVE_STIME
+
+/* Define if you have the strchr function. */
+#undef HAVE_STRCHR
+
+/* Define if you have the strerror function. */
+#undef HAVE_STRERROR
+
+/* Define if you have the sysconf function. */
+#undef HAVE_SYSCONF
+
+/* Define if you have the sysctl function. */
+#undef HAVE_SYSCTL
+
+/* Define if you have the timer_create function. */
+#undef HAVE_TIMER_CREATE
+
+/* Define if you have the timer_settime function. */
+#undef HAVE_TIMER_SETTIME
+
+/* Define if you have the umask function. */
+#undef HAVE_UMASK
+
+/* Define if you have the uname function. */
+#undef HAVE_UNAME
+
+/* Define if you have the updwtmp function. */
+#undef HAVE_UPDWTMP
+
+/* Define if you have the updwtmpx function. */
+#undef HAVE_UPDWTMPX
+
+/* Define if you have the vsprintf function. */
+#undef HAVE_VSPRINTF
+
+/* Define if you have the </sys/sync/queue.h> header file. */
+#undef HAVE__SYS_SYNC_QUEUE_H
+
+/* Define if you have the </sys/sync/sema.h> header file. */
+#undef HAVE__SYS_SYNC_SEMA_H
+
+/* Define if you have the <arpa/nameser.h> header file. */
+#undef HAVE_ARPA_NAMESER_H
+
+/* Define if you have the <bstring.h> header file. */
+#undef HAVE_BSTRING_H
+
+/* Define if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define if you have the <machine/inline.h> header file. */
+#undef HAVE_MACHINE_INLINE_H
+
+/* Define if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define if you have the <net/if.h> header file. */
+#undef HAVE_NET_IF_H
+
+/* Define if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define if you have the <netinet/ip.h> header file. */
+#undef HAVE_NETINET_IP_H
+
+/* Define if you have the <netinfo/ni.h> header file. */
+#undef HAVE_NETINFO_NI_H
+
+/* Define if you have the <poll.h> header file. */
+#undef HAVE_POLL_H
+
+/* Define if you have the <resolv.h> header file. */
+#undef HAVE_RESOLV_H
+
+/* Define if you have the <sched.h> header file. */
+#undef HAVE_SCHED_H
+
+/* Define if you have the <sgtty.h> header file. */
+#undef HAVE_SGTTY_H
+
+/* Define if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define if you have the <sun/audioio.h> header file. */
+#undef HAVE_SUN_AUDIOIO_H
+
+/* Define if you have the <sys/audioio.h> header file. */
+#undef HAVE_SYS_AUDIOIO_H
+
+/* Define if you have the <sys/clkdefs.h> header file. */
+#undef HAVE_SYS_CLKDEFS_H
+
+/* Define if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
+
+/* Define if you have the <sys/i8253.h> header file. */
+#undef HAVE_SYS_I8253_H
+
+/* Define if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define if you have the <sys/lock.h> header file. */
+#undef HAVE_SYS_LOCK_H
+
+/* Define if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define if you have the <sys/modem.h> header file. */
+#undef HAVE_SYS_MODEM_H
+
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define if you have the <sys/pcl720.h> header file. */
+#undef HAVE_SYS_PCL720_H
+
+/* Define if you have the <sys/ppsclock.h> header file. */
+#undef HAVE_SYS_PPSCLOCK_H
+
+/* Define if you have the <sys/ppstime.h> header file. */
+#undef HAVE_SYS_PPSTIME_H
+
+/* Define if you have the <sys/proc.h> header file. */
+#undef HAVE_SYS_PROC_H
+
+/* Define if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define if you have the <sys/sched.h> header file. */
+#undef HAVE_SYS_SCHED_H
+
+/* Define if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define if you have the <sys/sio.h> header file. */
+#undef HAVE_SYS_SIO_H
+
+/* Define if you have the <sys/sockio.h> header file. */
+#undef HAVE_SYS_SOCKIO_H
+
+/* Define if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define if you have the <sys/stream.h> header file. */
+#undef HAVE_SYS_STREAM_H
+
+/* Define if you have the <sys/stropts.h> header file. */
+#undef HAVE_SYS_STROPTS_H
+
+/* Define if you have the <sys/sysctl.h> header file. */
+#undef HAVE_SYS_SYSCTL_H
+
+/* Define if you have the <sys/syssgi.h> header file. */
+#undef HAVE_SYS_SYSSGI_H
+
+/* Define if you have the <sys/termios.h> header file. */
+#undef HAVE_SYS_TERMIOS_H
+
+/* Define if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define if you have the <sys/timepps.h> header file. */
+#undef HAVE_SYS_TIMEPPS_H
+
+/* Define if you have the <sys/timers.h> header file. */
+#undef HAVE_SYS_TIMERS_H
+
+/* Define if you have the <sys/timex.h> header file. */
+#undef HAVE_SYS_TIMEX_H
+
+/* Define if you have the <sys/tpro.h> header file. */
+#undef HAVE_SYS_TPRO_H
+
+/* Define if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define if you have the <termio.h> header file. */
+#undef HAVE_TERMIO_H
+
+/* Define if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define if you have the <timepps.h> header file. */
+#undef HAVE_TIMEPPS_H
+
+/* Define if you have the <timex.h> header file. */
+#undef HAVE_TIMEX_H
+
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define if you have the <utmp.h> header file. */
+#undef HAVE_UTMP_H
+
+/* Define if you have the <utmpx.h> header file. */
+#undef HAVE_UTMPX_H
+
+/* Define if you have the advapi32 library (-ladvapi32). */
+#undef HAVE_LIBADVAPI32
+
+/* Define if you have the elf library (-lelf). */
+#undef HAVE_LIBELF
+
+/* Define if you have the gen library (-lgen). */
+#undef HAVE_LIBGEN
+
+/* Define if you have the kvm library (-lkvm). */
+#undef HAVE_LIBKVM
+
+/* Define if you have the ld library (-lld). */
+#undef HAVE_LIBLD
+
+/* Define if you have the mld library (-lmld). */
+#undef HAVE_LIBMLD
+
+/* Define if you have the nsl library (-lnsl). */
+#undef HAVE_LIBNSL
+
+/* Define if you have the rt library (-lrt). */
+#undef HAVE_LIBRT
+
+/* Define if you have the socket library (-lsocket). */
+#undef HAVE_LIBSOCKET
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
+/* Define if compiler has function prototypes */
+#undef PROTOTYPES
+
+/* Do we have struct ntptimeval? */
+#undef HAVE_STRUCT_NTPTIMEVAL
+
+/* Does ntptimeval use struct timespec? */
+#undef TIMESPEC_IN_NTPTIMEVAL
+
diff --git a/contrib/ntp/config.sub b/contrib/ntp/config.sub
new file mode 100755
index 000000000000..eaa862353f38
--- /dev/null
+++ b/contrib/ntp/config.sub
@@ -0,0 +1,1215 @@
+#! /bin/sh
+# Configuration validation subroutine script, version 1.1.
+# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+if [ x$1 = x ]
+then
+ echo Configuration name missing. 1>&2
+ echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
+ echo "or $0 ALIAS" 1>&2
+ echo where ALIAS is a recognized configuration type. 1>&2
+ exit 1
+fi
+
+# First pass through any local machine types.
+case $1 in
+ *local*)
+ echo $1
+ exit 0
+ ;;
+ *)
+ ;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ linux-gnu*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=vxworks
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
+ | 580 | i960 | h8300 \
+ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
+ | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
+ | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
+ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
+ | mips64orion | mips64orionel | mipstx39 | mipstx39el \
+ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
+ | mips64vr5000 | miprs64vr5000el \
+ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
+ | thumb | d10v)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65)
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i[34567]86)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
+ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
+ | xmp-* | ymp-* \
+ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
+ | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
+ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
+ | clipper-* | orion-* \
+ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
+ | mipstx39-* | mipstx39el-* \
+ | f301-* | armv*-* | t3e-* \
+ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
+ | thumb-* | v850-* | d30v-* | tic30-* | c30-* )
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-cbm
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-cbm
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-cbm
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ cray2)
+ basic_machine=cray2-cray
+ os=-unicos
+ ;;
+ [ctj]90-cray)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i[34567]86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i[34567]86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i[34567]86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i[34567]86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ i386-go32 | go32)
+ basic_machine=i386-unknown
+ os=-go32
+ ;;
+ i386-mingw32 | mingw32)
+ basic_machine=i386-unknown
+ os=-mingw32
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | *MiNT)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mipsel*-linux*)
+ basic_machine=mipsel-unknown
+ os=-linux-gnu
+ ;;
+ mips*-linux*)
+ basic_machine=mips-unknown
+ os=-linux-gnu
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ msdos)
+ basic_machine=i386-unknown
+ os=-msdos
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-corel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexen)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexen-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=rs6000-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sparclite-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=t3e-cray
+ os=-unicos
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xmp)
+ basic_machine=xmp-cray
+ os=-unicos
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ mips)
+ if [ x$os = x-linux-gnu ]; then
+ basic_machine=mips-unknown
+ else
+ basic_machine=mips-mips
+ fi
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sparc | sparcv9)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ c4x*)
+ basic_machine=c4x-none
+ os=-coff
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -rhapsody* | -macos* | -openstep* | -oskit*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -*MiNT)
+ os=-mint
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-corel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f301-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -vxsim* | -vxworks*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -*MiNT)
+ vendor=atari
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
diff --git a/contrib/ntp/configure b/contrib/ntp/configure
new file mode 100755
index 000000000000..e8fa8143953b
--- /dev/null
+++ b/contrib/ntp/configure
@@ -0,0 +1,10546 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.14.1
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+ --enable-debugging + include debugging code"
+ac_help="$ac_help
+ --enable-dst-minutes=60 + minutes per DST adjustment"
+ac_help="$ac_help
+ --enable-md5 + include support for MD5 keys"
+ac_help="$ac_help
+ --enable-BANCOMM - Datum/Bancomm bc635/VME interface"
+ac_help="$ac_help
+ --enable-GPSVME - TrueTime GPS receiver/VME interface"
+ac_help="$ac_help
+ --enable-SHM - SHM clock attached thru shared memory"
+ac_help="$ac_help
+ --enable-all-clocks + include all suitable non-PARSE clocks:"
+ac_help="$ac_help
+ --enable-ACTS + ACTS modem service"
+ac_help="$ac_help
+ --enable-ARBITER + Arbiter 1088A/B GPS receiver"
+ac_help="$ac_help
+ --enable-ARCRON-MSF + Arcron MSF receiver"
+ac_help="$ac_help
+ --enable-AS2201 + Austron 2200A/2201A GPS receiver"
+ac_help="$ac_help
+ --enable-ATOM + PPS interface"
+ac_help="$ac_help
+ --enable-CHU + CHU modem/decoder"
+ac_help="$ac_help
+ --enable-AUDIO-CHU s - CHU audio/decoder"
+ac_help="$ac_help
+ --enable-DATUM s Datum Programmable Time System"
+ac_help="$ac_help
+ --enable-HEATH s Heath GC-1000 WWV/WWVH receiver"
+ac_help="$ac_help
+ --enable-HPGPS + HP 58503A GPS receiver"
+ac_help="$ac_help
+ --enable-IRIG s Sun IRIG audio decoder"
+ac_help="$ac_help
+ --enable-LEITCH + Leitch CSD 5300 Master Clock System Driver"
+ac_help="$ac_help
+ --enable-LOCAL-CLOCK + local clock reference"
+ac_help="$ac_help
+ --enable-MSFEES + EES M201 MSF receiver"
+ac_help="$ac_help
+ --enable-MX4200 s Magnavox MX4200 GPS receiver"
+ac_help="$ac_help
+ --enable-NMEA + NMEA GPS receiver"
+ac_help="$ac_help
+ --enable-ONCORE + Motorola VP/UT Oncore GPS receiver"
+ac_help="$ac_help
+ --enable-PALISADE + Palisade clock"
+ac_help="$ac_help
+ --enable-PST + PST/Traconex 1020 WWV/WWVH receiver"
+ac_help="$ac_help
+ --enable-JUPITER s Rockwell Jupiter GPS receiver"
+ac_help="$ac_help
+ --enable-PTBACTS s PTB modem service"
+ac_help="$ac_help
+ --enable-TPRO s KSI/Odetics TPRO/S GPS receiver/IRIG interface"
+ac_help="$ac_help
+ --enable-TRAK + TRAK 8810 GPS receiver"
+ac_help="$ac_help
+ --enable-CHRONOLOG + Chrono-log K-series WWVB receiver"
+ac_help="$ac_help
+ --enable-DUMBCLOCK + Dumb generic hh:mm:ss local clock"
+ac_help="$ac_help
+ --enable-TRUETIME s Kinemetrics/TrueTime receivers"
+ac_help="$ac_help
+ --enable-WWVB + Spectracom 8170/Netclock/2 WWVB receiver"
+ac_help="$ac_help
+ --enable-ULINK + Ultralink WWVB receiver"
+ac_help="$ac_help
+ --enable-USNO s USNO modem service"
+ac_help="$ac_help
+ --enable-parse-clocks - include all suitable PARSE clocks:"
+ac_help="$ac_help
+ --enable-COMPUTIME s Diem Computime Radio Clock"
+ac_help="$ac_help
+ --enable-DCF7000 s ELV/DCF7000 clock"
+ac_help="$ac_help
+ --enable-HOPF6021 s HOPF 6021 clock"
+ac_help="$ac_help
+ --enable-MEINBERG s Meinberg clocks"
+ac_help="$ac_help
+ --enable-RAWDCF s DCF77 raw time code"
+ac_help="$ac_help
+ --enable-RCC8000 s RCC 8000 clock"
+ac_help="$ac_help
+ --enable-SCHMID s Schmid DCF77 clock"
+ac_help="$ac_help
+ --enable-TRIMTAIP s Trimble GPS receiver/TAIP protocol"
+ac_help="$ac_help
+ --enable-TRIMTSIP s Trimble GPS receiver/TSIP protocol"
+ac_help="$ac_help
+ --enable-WHARTON s WHARTON 400A Series clock"
+ac_help="$ac_help
+ --enable-VARITEXT s VARITEXT clock"
+ac_help="$ac_help
+ --enable-kmem s read /dev/kmem for tick and/or tickadj"
+ac_help="$ac_help
+ --enable-accurate-adjtime
+ s the adjtime() call is accurate"
+ac_help="$ac_help
+ --enable-tick=VALUE s force a value for 'tick'"
+ac_help="$ac_help
+ --enable-tickadj=VALUE s force a value for 'tickadj'"
+ac_help="$ac_help
+ --enable-udp-wildcard s use UDP wildcard delivery"
+ac_help="$ac_help
+ --enable-slew-always s always slew the time"
+ac_help="$ac_help
+ --enable-step-slew s step and slew the time"
+ac_help="$ac_help
+ --enable-ntpdate-step s if ntpdate should step the time"
+ac_help="$ac_help
+ --enable-hourly-todr-sync
+ s if we should sync TODR hourly"
+ac_help="$ac_help
+ --enable-kernel-fll-bug s if we should avoid a kernel FLL bug"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.14.1"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set. These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=ntpd/ntp_refclock.c
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ test -f "$cache_file" && . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:664: checking host system type" >&5
+if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
+
+# Make sure we can run config.sub.
+ if $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+ fi
+
+ ac_cv_host_alias=$host
+ case "$ac_cv_host_alias" in
+ NONE)
+ case $nonopt in
+ NONE)
+ if ac_cv_host_alias=`$ac_config_guess`; then :
+ else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+ fi ;;
+ *) ac_cv_host_alias=$nonopt ;;
+ esac ;;
+ esac
+
+ ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
+ ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+else
+ echo $ac_n "(cached) $ac_c" 1>&6
+fi
+
+echo "$ac_t""$ac_cv_host" 1>&6
+
+host=$ac_cv_host
+host_alias=$ac_cv_host_alias
+host_cpu=$ac_cv_host_cpu
+host_vendor=$ac_cv_host_vendor
+host_os=$ac_cv_host_os
+
+
+
+
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:705: checking target system type" >&5
+if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
+
+# Make sure we can run config.sub.
+ if $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+ fi
+
+ ac_cv_target_alias=$target
+ case "$ac_cv_target_alias" in
+ NONE)
+ case $nonopt in
+ NONE)
+ ac_cv_target_alias=$host_alias ;;
+
+ *) ac_cv_target_alias=$nonopt ;;
+ esac ;;
+ esac
+
+ ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
+ ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+else
+ echo $ac_n "(cached) $ac_c" 1>&6
+fi
+
+echo "$ac_t""$ac_cv_target" 1>&6
+
+target=$ac_cv_target
+target_alias=$ac_cv_target_alias
+target_cpu=$ac_cv_target_cpu
+target_vendor=$ac_cv_target_vendor
+target_os=$ac_cv_target_os
+
+
+
+
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:745: checking build system type" >&5
+if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
+
+# Make sure we can run config.sub.
+ if $ac_config_sub sun4 >/dev/null 2>&1; then :
+ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+ fi
+
+ ac_cv_build_alias=$build
+ case "$ac_cv_build_alias" in
+ NONE)
+ case $nonopt in
+ NONE)
+ ac_cv_build_alias=$host_alias ;;
+
+ *) ac_cv_build_alias=$nonopt ;;
+ esac ;;
+ esac
+
+ ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
+ ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+ ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+ ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+else
+ echo $ac_n "(cached) $ac_c" 1>&6
+fi
+
+echo "$ac_t""$ac_cv_build" 1>&6
+
+build=$ac_cv_build
+build_alias=$ac_cv_build_alias
+build_cpu=$ac_cv_build_cpu
+build_vendor=$ac_cv_build_vendor
+build_os=$ac_cv_build_os
+
+
+
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+# configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+# same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+# as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+test "$host_alias" != "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
+cat >> confdefs.h <<EOF
+#define STR_SYSTEM "$target"
+EOF
+
+
+
+
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:847: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"\${ac_cv_path_install+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:904: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftestfile`
+ fi
+ if test "$*" != "X $srcdir/configure conftestfile" \
+ && test "$*" != "X conftestfile $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+ fi
+
+ test "$2" = conftestfile
+ )
+then
+ # Ok.
+ :
+else
+ { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:942: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+
+PACKAGE=ntp
+
+VERSION=4.0.98f
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+ { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+cat >> confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
+
+cat >> confdefs.h <<EOF
+#define VERSION "$VERSION"
+EOF
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:989: checking for working aclocal" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+ ACLOCAL=aclocal
+ echo "$ac_t""found" 1>&6
+else
+ ACLOCAL="$missing_dir/missing aclocal"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:1002: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+ AUTOCONF=autoconf
+ echo "$ac_t""found" 1>&6
+else
+ AUTOCONF="$missing_dir/missing autoconf"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:1015: checking for working automake" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake
+ echo "$ac_t""found" 1>&6
+else
+ AUTOMAKE="$missing_dir/missing automake"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:1028: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+ AUTOHEADER=autoheader
+ echo "$ac_t""found" 1>&6
+else
+ AUTOHEADER="$missing_dir/missing autoheader"
+ echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:1041: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf. Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+ MAKEINFO=makeinfo
+ echo "$ac_t""found" 1>&6
+else
+ MAKEINFO="$missing_dir/missing makeinfo"
+ echo "$ac_t""missing" 1>&6
+fi
+
+for ac_prog in gnutar gtar tar
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1058: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$AMTAR"; then
+ ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_AMTAR="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+AMTAR="$ac_cv_prog_AMTAR"
+if test -n "$AMTAR"; then
+ echo "$ac_t""$AMTAR" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$AMTAR" && break
+done
+
+AMTARFLAGS=
+if test -n "$AMTAR"; then
+ if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
+ AMTARFLAGS=o
+ fi
+fi
+
+
+
+
+ac_cv_var_oncore_ok=no
+
+iCFLAGS="$CFLAGS"
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1104: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1134: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32* | *CYGWIN*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1185: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1217: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 1228 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:1233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1259: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1264: checking whether we are using GNU C" >&5
+if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1292: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1324: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1339 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1356 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1373 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+
+case "$target" in
+ *-pc-cygwin*)
+ CFLAGS="$CFLAGS -DSYS_CYGWIN32"
+ ;;
+ i386-sequent-sysv4)
+ case "$CC" in
+ cc)
+ CFLAGS="$CFLAGS -Wc,+Abi-socket"
+ ;;
+ esac
+esac
+
+case "$host" in
+ $target)
+ ;;
+ *) case "$target" in
+ *-*-vxworks*)
+ # Quick and dirty sanity check
+ case "$VX_KERNEL" in
+ '') { echo "configure: error: Please follow the directions in html/vxworks.html!" 1>&2; exit 1; }
+ ;;
+ esac
+ CFLAGS="$CFLAGS -DSYS_VXWORKS"
+ ;;
+ esac
+ ;;
+esac
+
+for ac_prog in mawk gawk nawk awk
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1437: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_AWK="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+AWK="$ac_cv_prog_AWK"
+if test -n "$AWK"; then
+ echo "$ac_t""$AWK" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$AWK" && break
+done
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:1467: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+rm -f conftest*
+
+case "$GCC" in
+ yes)
+ CFLAGS="$CFLAGS -Wall"
+ # CFLAGS="$CFLAGS -Wtraditional"
+ CFLAGS="$CFLAGS -Wshadow"
+ # CFLAGS="$CFLAGS -Wwrite-strings"
+ CFLAGS="$CFLAGS -Wconversion"
+ CFLAGS="$CFLAGS -Wpointer-arith"
+ CFLAGS="$CFLAGS -Wcast-qual"
+ # CFLAGS="$CFLAGS -Wcast-align"
+ CFLAGS="$CFLAGS -Wstrict-prototypes"
+
+ echo $ac_n "checking whether ${CC-cc} -pipe works""... $ac_c" 1>&6
+echo "configure:1509: checking whether ${CC-cc} -pipe works" >&5
+if eval "test \"\${ac_cv_prog_cc_pipe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+ if test -z "`${CC-cc} -pipe -c conftest.c 2>&1`" -a -s conftest.o; then
+ ac_cv_prog_cc_pipe=yes
+ else
+ ac_cv_prog_cc_pipe=no
+ fi
+ rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_pipe" 1>&6
+
+ case "$ac_cv_prog_cc_pipe" in
+ yes)
+ CFLAGS="$CFLAGS -pipe"
+ ;;
+ esac
+ ;;
+esac
+
+ac_busted_vpath_in_make=no
+
+case "$target" in
+ *-*-irix6.1*) # 64 bit only
+ ;;
+ *-*-irix6*) # 6.2 (and later?)
+ ac_busted_vpath_in_make=yes
+ # don't pass -n32 to gcc, it cannot handle and doesn't need it
+ if test "$GCC" != yes; then
+ case "$CFLAGS" in
+ *-n32*) ;;
+ *-n64*) ;;
+ *) case "$iCFLAGS" in
+ '') CFLAGS="-O2 -g3 -n32" ;;
+ *) CFLAGS="$CFLAGS -n32" ;;
+ esac
+ ;;
+ esac
+ case "$LDFLAGS" in
+ *-n32*) ;;
+ *-n64*) ;;
+ *) LDFLAGS="$LDFLAGS -n32" ;;
+ esac
+ fi
+ ;;
+ *-next-nextstep3)
+ CFLAGS="$CFLAGS -posix" ;;
+ *-*-solaris2.5.1)
+ ac_busted_vpath_in_make=yes
+ ;;
+esac
+
+case "$ac_busted_vpath_in_make$srcdir" in
+ no*) ;;
+ yes.) ;;
+ *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | sed -e 's/GNU Make version \(1-9.]*\).*/\1/' -e q`" in
+ '')
+ { echo "configure: error: building outside of the main directory requires GNU make" 1>&2; exit 1; }
+ ;;
+ *) ;;
+ esac
+ ;;
+esac
+
+
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1579: checking whether ln -s works" >&5
+if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test $ac_cv_prog_gcc = yes; then
+ echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
+echo "configure:1601: checking whether ${CC-cc} needs -traditional" >&5
+if eval "test \"\${ac_cv_prog_gcc_traditional+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_pattern="Autoconf.*'x'"
+ cat > conftest.$ac_ext <<EOF
+#line 1607 "configure"
+#include "confdefs.h"
+#include <sgtty.h>
+Autoconf TIOCGETP
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "$ac_pattern" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=yes
+else
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+
+ if test $ac_cv_prog_gcc_traditional = no; then
+ cat > conftest.$ac_ext <<EOF
+#line 1625 "configure"
+#include "confdefs.h"
+#include <termio.h>
+Autoconf TCGETA
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "$ac_pattern" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+ fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
+ if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
+ fi
+fi
+
+echo $ac_n "checking for AIX""... $ac_c" 1>&6
+echo "configure:1647: checking for AIX" >&5
+cat > conftest.$ac_ext <<EOF
+#line 1649 "configure"
+#include "confdefs.h"
+#ifdef _AIX
+ yes
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "yes" >/dev/null 2>&1; then
+ rm -rf conftest*
+ echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
+#define _ALL_SOURCE 1
+EOF
+
+else
+ rm -rf conftest*
+ echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+
+
+ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
+echo "configure:1672: checking for minix/config.h" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1677 "configure"
+#include "confdefs.h"
+#include <minix/config.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ MINIX=yes
+else
+ echo "$ac_t""no" 1>&6
+MINIX=
+fi
+
+if test "$MINIX" = yes; then
+ cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _POSIX_1_SOURCE 2
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _MINIX 1
+EOF
+
+fi
+
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:1720: checking for POSIXized ISC" >&5
+if test -d /etc/conf/kconfig.d &&
+ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
+ echo "$ac_t""yes" 1>&6
+ ISC=yes # If later tests want to check for ISC.
+ cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ if test "$GCC" = yes; then
+ CC="$CC -posix"
+ else
+ CC="$CC -Xp"
+ fi
+else
+ echo "$ac_t""no" 1>&6
+ ISC=
+fi
+
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1743: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_RANLIB="ranlib"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+ echo "$ac_t""$RANLIB" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "sh", so it can be a program name with args.
+set dummy sh; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1773: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_path_PATH_SH+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$PATH_SH" in
+ /*)
+ ac_cv_path_PATH_SH="$PATH_SH" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_PATH_SH="$PATH_SH" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_PATH_SH="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+fi
+PATH_SH="$ac_cv_path_PATH_SH"
+if test -n "$PATH_SH"; then
+ echo "$ac_t""$PATH_SH" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+case "$target" in
+ *-*-vxworks*)
+ ac_link="$ac_link $VX_KERNEL"
+ ;;
+esac
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:1824: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"\${ac_cv_path_install+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+case "$target" in
+ *-pc-cygwin*)
+ echo $ac_n "checking for main in -ladvapi32""... $ac_c" 1>&6
+echo "configure:1884: checking for main in -ladvapi32" >&5
+ac_lib_var=`echo advapi32'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ladvapi32 $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1892 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:1899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo advapi32 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-ladvapi32 $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ ;;
+esac
+echo $ac_n "checking for nlist in -lelf""... $ac_c" 1>&6
+echo "configure:1929: checking for nlist in -lelf" >&5
+ac_lib_var=`echo elf'_'nlist | sed 'y%./+-%__p_%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lelf $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1937 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char nlist();
+
+int main() {
+nlist()
+; return 0; }
+EOF
+if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo elf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lelf $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for main in -lkvm""... $ac_c" 1>&6
+echo "configure:1976: checking for main in -lkvm" >&5
+ac_lib_var=`echo kvm'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lkvm $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1984 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:1991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lkvm $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+ echo $ac_n "checking for nlist in -lld""... $ac_c" 1>&6
+echo "configure:2018: checking for nlist in -lld" >&5
+ac_lib_var=`echo ld'_'nlist | sed 'y%./+-%__p_%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lld $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2026 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char nlist();
+
+int main() {
+nlist()
+; return 0; }
+EOF
+if { (eval echo configure:2037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo ld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lld $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for nlist in -lmld""... $ac_c" 1>&6
+echo "configure:2065: checking for nlist in -lmld" >&5
+ac_lib_var=`echo mld'_'nlist | sed 'y%./+-%__p_%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lmld $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2073 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char nlist();
+
+int main() {
+nlist()
+; return 0; }
+EOF
+if { (eval echo configure:2084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo mld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lmld $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for gethostent""... $ac_c" 1>&6
+echo "configure:2112: checking for gethostent" >&5
+if eval "test \"\${ac_cv_func_gethostent+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2117 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gethostent(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostent();
+char (*f)();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_gethostent) || defined (__stub___gethostent)
+choke me
+#else
+f = gethostent;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_gethostent=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_gethostent=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'gethostent`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for gethostent in -lnsl""... $ac_c" 1>&6
+echo "configure:2159: checking for gethostent in -lnsl" >&5
+ac_lib_var=`echo nsl'_'gethostent | sed 'y%./+-%__p_%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lnsl -lsocket $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2167 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostent();
+
+int main() {
+gethostent()
+; return 0; }
+EOF
+if { (eval echo configure:2178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lnsl $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+echo $ac_n "checking for openlog""... $ac_c" 1>&6
+echo "configure:2208: checking for openlog" >&5
+if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2213 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char openlog(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char openlog();
+char (*f)();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_openlog) || defined (__stub___openlog)
+choke me
+#else
+f = openlog;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_openlog=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_openlog=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for openlog in -lgen""... $ac_c" 1>&6
+echo "configure:2255: checking for openlog in -lgen" >&5
+ac_lib_var=`echo gen'_'openlog | sed 'y%./+-%__p_%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lgen $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2263 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char openlog();
+
+int main() {
+openlog()
+; return 0; }
+EOF
+if { (eval echo configure:2274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/^a-zA-Z0-9_/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lgen $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+
+echo $ac_n "checking for sched_setscheduler in -lrt""... $ac_c" 1>&6
+echo "configure:2305: checking for sched_setscheduler in -lrt" >&5
+ac_lib_var=`echo rt'_'sched_setscheduler | sed 'y%./+-%__p_%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lrt $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2313 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sched_setscheduler();
+
+int main() {
+sched_setscheduler()
+; return 0; }
+EOF
+if { (eval echo configure:2324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo rt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lrt $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for sched_setscheduler in -lposix4""... $ac_c" 1>&6
+echo "configure:2350: checking for sched_setscheduler in -lposix4" >&5
+ac_lib_var=`echo posix4'_'sched_setscheduler | sed 'y%./+-%__p_%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lposix4 $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2358 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sched_setscheduler();
+
+int main() {
+sched_setscheduler()
+; return 0; }
+EOF
+if { (eval echo configure:2369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo posix4 | sed -e 's/^a-zA-Z0-9_/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lposix4 $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+echo $ac_n "checking for setsockopt""... $ac_c" 1>&6
+echo "configure:2399: checking for setsockopt" >&5
+if eval "test \"\${ac_cv_func_setsockopt+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2404 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char setsockopt(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setsockopt();
+char (*f)();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
+choke me
+#else
+f = setsockopt;
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_setsockopt=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_setsockopt=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'setsockopt`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+echo $ac_n "checking for setsockopt in -lsocket""... $ac_c" 1>&6
+echo "configure:2446: checking for setsockopt in -lsocket" >&5
+ac_lib_var=`echo socket'_'setsockopt | sed 'y%./+-%__p_%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lsocket $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2454 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setsockopt();
+
+int main() {
+setsockopt()
+; return 0; }
+EOF
+if { (eval echo configure:2465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lsocket $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:2496: checking for ANSI C header files" >&5
+if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2501 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 2526 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 2544 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2565 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:2576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+for ac_hdr in bstring.h errno.h fcntl.h memory.h netdb.h poll.h resolv.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2603: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2608 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in sched.h sgtty.h stdlib.h string.h termio.h termios.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2643: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2648 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in timepps.h timex.h unistd.h utmp.h utmpx.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2683: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2688 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in arpa/nameser.h net/if.h netinet/in.h netinet/ip.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2723: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2728 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in netinfo/ni.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2763: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2768 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ cat >> confdefs.h <<\EOF
+#define HAVE_NETINFO 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in sun/audioio.h sys/audioio.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2806: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2811 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in sys/clkdefs.h sys/file.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2846: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2851 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+case "$target" in
+ *-*-sunos4*) ;;
+ *) for ac_hdr in sys/ioctl.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2888: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2893 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ ;;
+esac
+for ac_hdr in sys/lock.h sys/mman.h sys/modem.h sys/param.h sys/ppsclock.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2930: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2935 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in sys/ppstime.h sys/proc.h sys/resource.h sys/sched.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2970: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2975 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+case "$target" in
+ *-*-sco*)
+ for ac_hdr in sys/sio.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3012: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3017 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ ;;
+ *sgi*)
+ for ac_hdr in sys/syssgi.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3054: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3059 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ ;;
+ *)
+ for ac_hdr in sys/select.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3096: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3101 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ ;;
+esac
+for ac_hdr in sys/sockio.h sys/stat.h sys/stream.h sys/stropts.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3138: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3143 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in sys/sysctl.h sys/termios.h sys/time.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3178: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3183 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+cat > conftest.$ac_ext <<EOF
+#line 3215 "configure"
+#include "confdefs.h"
+#include <sys/timepps.h>
+#ifdef PPS_API_VERS_1
+yes
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "yes" >/dev/null 2>&1; then
+ rm -rf conftest*
+ for ac_hdr in sys/timepps.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3230: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3235 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+rm -f conftest*
+
+for ac_hdr in sys/timers.h sys/timex.h sys/tpro.h sys/types.h sys/wait.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3273: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3278 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+echo "configure:3310: checking whether time.h and sys/time.h may both be included" >&5
+if eval "test \"\${ac_cv_header_time+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3315 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+int main() {
+struct tm *tp;
+; return 0; }
+EOF
+if { (eval echo configure:3324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_header_time=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_time=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_time" 1>&6
+if test $ac_cv_header_time = yes; then
+ cat >> confdefs.h <<\EOF
+#define TIME_WITH_SYS_TIME 1
+EOF
+
+fi
+
+case "$target" in
+*-convex-*)
+ for ac_hdr in /sys/sync/queue.h /sys/sync/sema.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3350: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3355 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ ;;
+*-*-bsdi*)
+ for ac_hdr in machine/inline.h sys/pcl720.h sys/i8253.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3392: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3397 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ ;;
+esac
+
+ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
+echo "configure:3433: checking for nlist.h" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3438 "configure"
+#include "confdefs.h"
+#include <nlist.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define NLIST_STRUCT 1
+EOF
+
+echo $ac_n "checking for n_un in struct nlist""... $ac_c" 1>&6
+echo "configure:3464: checking for n_un in struct nlist" >&5
+if eval "test \"\${ac_cv_struct_nlist_n_un+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3469 "configure"
+#include "confdefs.h"
+#include <nlist.h>
+int main() {
+struct nlist n; n.n_un.n_name = 0;
+; return 0; }
+EOF
+if { (eval echo configure:3476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_struct_nlist_n_un=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_struct_nlist_n_un=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_struct_nlist_n_un" 1>&6
+if test $ac_cv_struct_nlist_n_un = yes; then
+ cat >> confdefs.h <<\EOF
+#define NLIST_NAME_UNION 1
+EOF
+
+fi
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for basic volatile support""... $ac_c" 1>&6
+echo "configure:3501: checking for basic volatile support" >&5
+if eval "test \"\${ac_cv_c_volatile+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3506 "configure"
+#include "confdefs.h"
+
+int main() {
+
+volatile int x;
+; return 0; }
+EOF
+if { (eval echo configure:3514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_volatile=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_volatile=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_c_volatile" 1>&6
+case "$ac_cv_c_volatile" in
+ yes)
+ ;;
+ *) cat >> confdefs.h <<\EOF
+#define volatile
+EOF
+
+ ;;
+esac
+
+case "$target" in
+ sparc-*-solaris2*)
+ # Assume that solaris2 is Ansi C...
+ ;;
+ *)
+
+
+
+echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
+echo "configure:3547: checking for ${CC-cc} option to accept ANSI C" >&5
+if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ am_cv_prog_cc_stdc=no
+ac_save_CC="$CC"
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ cat > conftest.$ac_ext <<EOF
+#line 3564 "configure"
+#include "confdefs.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+
+int main() {
+
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+
+; return 0; }
+EOF
+if { (eval echo configure:3601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ am_cv_prog_cc_stdc="$ac_arg"; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+CC="$ac_save_CC"
+
+fi
+
+if test -z "$am_cv_prog_cc_stdc"; then
+ echo "$ac_t""none needed" 1>&6
+else
+ echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
+fi
+case "x$am_cv_prog_cc_stdc" in
+ x|xno) ;;
+ *) CC="$CC $am_cv_prog_cc_stdc" ;;
+esac
+
+
+
+echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
+echo "configure:3627: checking for function prototypes" >&5
+if test "$am_cv_prog_cc_stdc" != no; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define PROTOTYPES 1
+EOF
+
+ U= ANSI2KNR=
+else
+ echo "$ac_t""no" 1>&6
+ U=_ ANSI2KNR=./ansi2knr
+ # Ensure some checks needed by ansi2knr itself.
+ echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:3640: checking for ANSI C header files" >&5
+if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3645 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ ac_cv_header_stdc=yes
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 3670 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 3688 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ rm -rf conftest*
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3709 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ :
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+ for ac_hdr in string.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3747: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3752 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+ ;;
+esac
+echo $ac_n "checking if C compiler permits function prototypes""... $ac_c" 1>&6
+echo "configure:3788: checking if C compiler permits function prototypes" >&5
+if eval "test \"\${ac_cv_have_prototypes+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3793 "configure"
+#include "confdefs.h"
+
+extern int foo (short);
+int foo(short i) { return i; }
+int main() {
+
+int i;
+; return 0; }
+EOF
+if { (eval echo configure:3803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_have_prototypes=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_have_prototypes=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_have_prototypes" 1>&6
+if test "$ac_cv_have_prototypes" = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_PROTOTYPES 1
+EOF
+
+fi
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:3825: checking for working const" >&5
+if eval "test \"\${ac_cv_c_const+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3830 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this. */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this. */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this. */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in an arm
+ of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:3879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_const=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+ cat >> confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+case "$host" in
+ $target)
+ echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
+echo "configure:3902: checking whether byte ordering is bigendian" >&5
+if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_c_bigendian=unknown
+# See if sys/param.h defines the BYTE_ORDER macro.
+cat > conftest.$ac_ext <<EOF
+#line 3909 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+int main() {
+
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:3920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat > conftest.$ac_ext <<EOF
+#line 3924 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+int main() {
+
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:3935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_c_bigendian=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_c_bigendian=no
+fi
+rm -f conftest*
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+if test $ac_cv_c_bigendian = unknown; then
+if test "$cross_compiling" = yes; then
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3955 "configure"
+#include "confdefs.h"
+main () {
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long l;
+ char c[sizeof (long)];
+ } u;
+ u.l = 1;
+ exit (u.c[sizeof (long) - 1] == 1);
+}
+EOF
+if { (eval echo configure:3968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+ ac_cv_c_bigendian=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_c_bigendian=yes
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+if test $ac_cv_c_bigendian = yes; then
+ cat >> confdefs.h <<\EOF
+#define WORDS_BIGENDIAN 1
+EOF
+
+fi
+
+ ;;
+ *) case "$target" in
+ i*86-*-vxworks*)
+ # LITTLEENDIAN
+ ;;
+ *-*-vxworks*)
+ cat >> confdefs.h <<\EOF
+#define WORDS_BIGENDIAN 1
+EOF
+
+ ;;
+ *) { echo "configure: error: Cross-compiling needs explicit byte order" 1>&2; exit 1; }
+ ;;
+ esac
+ ;;
+esac
+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+echo "configure:4008: checking return type of signal handlers" >&5
+if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4013 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+
+int main() {
+int i;
+; return 0; }
+EOF
+if { (eval echo configure:4030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_type_signal=void
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_type_signal=int
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_type_signal" 1>&6
+cat >> confdefs.h <<EOF
+#define RETSIGTYPE $ac_cv_type_signal
+EOF
+
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:4049: checking for off_t" >&5
+if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4054 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ eval "ac_cv_type_off_t=yes"
+else
+ rm -rf conftest*
+ eval "ac_cv_type_off_t=no"
+fi
+rm -f conftest*
+
+fi
+if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+ cat >> confdefs.h <<EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:4084: checking for size_t" >&5
+if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4089 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ eval "ac_cv_type_size_t=yes"
+else
+ rm -rf conftest*
+ eval "ac_cv_type_size_t=no"
+fi
+rm -f conftest*
+
+fi
+if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+ cat >> confdefs.h <<EOF
+#define size_t unsigned
+EOF
+
+fi
+
+echo $ac_n "checking for time_t""... $ac_c" 1>&6
+echo "configure:4119: checking for time_t" >&5
+if eval "test \"\${ac_cv_type_time_t+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4124 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "(^|[^a-zA-Z_0-9])time_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ eval "ac_cv_type_time_t=yes"
+else
+ rm -rf conftest*
+ eval "ac_cv_type_time_t=no"
+fi
+rm -f conftest*
+
+fi
+if eval "test \"`echo '$ac_cv_type_'time_t`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+ cat >> confdefs.h <<EOF
+#define time_t long
+EOF
+
+fi
+
+echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
+echo "configure:4154: checking whether struct tm is in sys/time.h or time.h" >&5
+if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4159 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <time.h>
+int main() {
+struct tm *tp; tp->tm_sec;
+; return 0; }
+EOF
+if { (eval echo configure:4167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_struct_tm=time.h
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_struct_tm=sys/time.h
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_struct_tm" 1>&6
+if test $ac_cv_struct_tm = sys/time.h; then
+ cat >> confdefs.h <<\EOF
+#define TM_IN_SYS_TIME 1
+EOF
+
+fi
+
+
+echo $ac_n "checking for a fallback value for HZ""... $ac_c" 1>&6
+echo "configure:4189: checking for a fallback value for HZ" >&5
+if eval "test \"\${ac_cv_var_default_hz+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_var_default_hz=100
+case "$target" in
+ alpha*-dec-osf4*|alpha*-dec-osf5*)
+ ac_cv_var_default_hz=1024
+ ;;
+ mips-dec-ultrix4*)
+ ac_cv_var_default_hz=256
+ ;;
+esac
+fi
+
+echo "$ac_t""$ac_cv_var_default_hz" 1>&6
+cat >> confdefs.h <<EOF
+#define DEFAULT_HZ $ac_cv_var_default_hz
+EOF
+
+
+echo $ac_n "checking if we need to override the system's value for HZ""... $ac_c" 1>&6
+echo "configure:4211: checking if we need to override the system's value for HZ" >&5
+if eval "test \"\${ac_cv_var_override_hz+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_cv_var_override_hz=no
+case "$target" in
+ alpha*-dec-osf4*|alpha*-dec-osf5*)
+ ac_cv_var_override_hz=yes
+ ;;
+ mips-dec-ultrix4*)
+ ac_cv_var_override_hz=yes
+ ;;
+ *-*-freebsd*)
+ ac_cv_var_override_hz=yes
+ ;;
+ *-*-sunos4*)
+ ac_cv_var_override_hz=yes
+ ;;
+esac
+fi
+
+echo "$ac_t""$ac_cv_var_override_hz" 1>&6
+case "$ac_cv_var_override_hz" in
+ yes)
+ cat >> confdefs.h <<\EOF
+#define OVERRIDE_HZ 1
+EOF
+
+ ;;
+esac
+
+
+
+echo $ac_n "checking struct sigaction for sa_sigaction""... $ac_c" 1>&6
+echo "configure:4245: checking struct sigaction for sa_sigaction" >&5
+if eval "test \"\${ac_cv_struct_sigaction_has_sa_sigaction+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ cat > conftest.$ac_ext <<EOF
+#line 4251 "configure"
+#include "confdefs.h"
+#include <signal.h>
+int main() {
+struct sigaction act; act.sa_sigaction = 0;
+; return 0; }
+EOF
+if { (eval echo configure:4258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_struct_sigaction_has_sa_sigaction=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_struct_sigaction_has_sa_sigaction=no
+
+fi
+rm -f conftest*
+
+
+fi
+
+echo "$ac_t""$ac_cv_struct_sigaction_has_sa_sigaction" 1>&6
+if test $ac_cv_struct_sigaction_has_sa_sigaction = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION 1
+EOF
+
+fi
+
+echo $ac_n "checking for struct ppsclockev""... $ac_c" 1>&6
+echo "configure:4282: checking for struct ppsclockev" >&5
+if eval "test \"\${ac_cv_struct_ppsclockev+set}\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4287 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#ifdef HAVE_SYS_TERMIOS_H
+# include <sys/termios.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_PPSCLOCK_H
+# include <sys/ppsclock.h>
+#endif
+int main() {
+
+extern struct ppsclockev *pce;
+return pce->serial;
+; return 0; }
+EOF
+if { (eval echo configure:4306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_struct_ppsclockev=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_struct_ppsclockev=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_struct_ppsclockev" 1>&6
+if test $ac_cv_struct_ppsclockev = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_PPSCLOCKEV 1
+EOF
+
+fi
+
+echo $ac_n "checking struct sockaddr for sa_len""... $ac_c" 1>&6<