summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-05 01:21:04 (GMT)
committerAnas Nashif <anas.nashif@intel.com>2012-11-05 01:21:04 (GMT)
commite0b431a48cc3ac5d3ec32f06eddd9708ad655fa2 (patch)
treece4c73521220fbb751c2be6a42e85ff6a6cbff97
downloadexpect-e0b431a48cc3ac5d3ec32f06eddd9708ad655fa2.zip
expect-e0b431a48cc3ac5d3ec32f06eddd9708ad655fa2.tar.gz
expect-e0b431a48cc3ac5d3ec32f06eddd9708ad655fa2.tar.bz2
Imported Upstream version 5.45upstream/5.45upstream
-rw-r--r--ChangeLog1514
-rw-r--r--Dbg.c1470
-rw-r--r--FAQ1989
-rw-r--r--HISTORY3552
-rw-r--r--INSTALL282
-rw-r--r--Makefile.in636
-rw-r--r--NEWS715
-rw-r--r--README350
-rw-r--r--aclocal.m49
-rwxr-xr-xconfigure17741
-rwxr-xr-xconfigure.in1059
-rw-r--r--example/Makefile63
-rw-r--r--example/README144
-rwxr-xr-xexample/archie41
-rwxr-xr-xexample/autoexpect348
-rw-r--r--example/autoexpect.man207
-rwxr-xr-xexample/autopasswd17
-rwxr-xr-xexample/beer.exp116
-rw-r--r--example/beer.exp.out119
-rw-r--r--example/carpal26
-rwxr-xr-xexample/chess.exp59
-rw-r--r--example/chesslib++.c87
-rw-r--r--example/chesslib.c83
-rw-r--r--example/chesslib2.c84
-rwxr-xr-xexample/cryptdir68
-rw-r--r--example/cryptdir.man42
-rwxr-xr-xexample/decryptdir68
-rw-r--r--example/decryptdir.man42
-rwxr-xr-xexample/dislocate355
-rw-r--r--example/dislocate.man100
-rwxr-xr-xexample/dvorak36
-rw-r--r--example/expectd.proto80
-rwxr-xr-xexample/ftp-inband302
-rwxr-xr-xexample/ftp-rfc40
-rwxr-xr-xexample/gethostbyaddr333
-rw-r--r--example/getpassck37
-rwxr-xr-xexample/irsh11
-rwxr-xr-xexample/kibitz415
-rw-r--r--example/kibitz.man266
-rwxr-xr-xexample/lpunlock101
-rwxr-xr-xexample/mkpasswd216
-rw-r--r--example/mkpasswd.man100
-rwxr-xr-xexample/multixterm993
-rw-r--r--example/multixterm.man299
-rwxr-xr-xexample/passmass216
-rw-r--r--example/passmass.man106
-rw-r--r--example/passwd.cgi106
-rw-r--r--example/passwd.html25
-rwxr-xr-xexample/passwdprompt35
-rw-r--r--example/read1char13
-rw-r--r--example/reprompt20
-rwxr-xr-xexample/rftp341
-rwxr-xr-xexample/rlogin-cwd21
-rwxr-xr-xexample/robohunt87
-rwxr-xr-xexample/rogue.exp23
-rwxr-xr-xexample/telnet-cwd19
-rw-r--r--example/telnet-in-bg18
-rwxr-xr-xexample/term_expect602
-rwxr-xr-xexample/timed-read12
-rwxr-xr-xexample/timed-run13
-rwxr-xr-xexample/tknewsbiff521
-rw-r--r--example/tknewsbiff.man412
-rwxr-xr-xexample/tkpasswd612
-rwxr-xr-xexample/tkterm539
-rwxr-xr-xexample/unbuffer31
-rw-r--r--example/unbuffer.c13
-rw-r--r--example/unbuffer.man82
-rwxr-xr-xexample/virterm639
-rwxr-xr-xexample/vrfy27
-rwxr-xr-xexample/weather81
-rwxr-xr-xexample/xkibitz219
-rw-r--r--example/xkibitz.man170
-rwxr-xr-xexample/xpstat274
-rw-r--r--example/xrlogin22
-rw-r--r--expTcl.c0
-rw-r--r--expTcl.h0
-rw-r--r--exp_chan.c708
-rw-r--r--exp_clib.c2970
-rw-r--r--exp_closetcl.c16
-rw-r--r--exp_command.c3587
-rw-r--r--exp_command.h358
-rw-r--r--exp_console.c70
-rw-r--r--exp_event.c349
-rw-r--r--exp_event.h21
-rw-r--r--exp_glob.c399
-rw-r--r--exp_int.h39
-rw-r--r--exp_inter.c2263
-rw-r--r--exp_log.c768
-rw-r--r--exp_log.h47
-rw-r--r--exp_main_exp.c60
-rw-r--r--exp_main_sub.c1023
-rw-r--r--exp_memmove.c25
-rw-r--r--exp_noevent.c176
-rw-r--r--exp_poll.c526
-rw-r--r--exp_prog.h22
-rw-r--r--exp_pty.c368
-rw-r--r--exp_pty.h19
-rw-r--r--exp_regexp.c1265
-rw-r--r--exp_regexp.h10
-rw-r--r--exp_rename.h11
-rw-r--r--exp_select.c290
-rw-r--r--exp_simple.c465
-rw-r--r--exp_strf.c618
-rw-r--r--exp_trap.c554
-rw-r--r--exp_tstamp.h2
-rw-r--r--exp_tty.c811
-rw-r--r--exp_tty.h29
-rw-r--r--exp_tty_comm.c37
-rw-r--r--exp_tty_in.h100
-rw-r--r--exp_win.c217
-rw-r--r--exp_win.h22
-rw-r--r--expect.c3270
-rw-r--r--expect.h418
-rw-r--r--expect.man2613
-rw-r--r--expect_cf.h.in127
-rw-r--r--expect_comm.h65
-rw-r--r--expect_tcl.h57
-rwxr-xr-xfixline125
-rw-r--r--libexpect.man690
-rw-r--r--license.terms7
-rw-r--r--pty_sgttyb.c249
-rw-r--r--pty_termios.c781
-rw-r--r--pty_unicos.c419
-rw-r--r--retoglob.c767
-rwxr-xr-xtclconfig/config.guess1415
-rwxr-xr-xtclconfig/config.sub1510
-rwxr-xr-xtclconfig/install-sh119
-rw-r--r--tclconfig/tcl.m44033
-rw-r--r--tcldbg.h62
-rw-r--r--tests/README120
-rw-r--r--tests/all.tcl24
-rw-r--r--tests/cat.test33
-rw-r--r--tests/expect.test195
-rw-r--r--tests/logfile.test37
-rw-r--r--tests/pid.test43
-rw-r--r--tests/send.test39
-rw-r--r--tests/spawn.test73
-rw-r--r--tests/stty.test33
-rw-r--r--testsuite/ChangeLog16
-rw-r--r--testsuite/Makefile.in109
-rw-r--r--testsuite/aclocal.m49
-rwxr-xr-xtestsuite/configure7059
-rw-r--r--testsuite/configure.in14
-rw-r--r--testsuite/exp_test.c33
-rw-r--r--vgrindefs30
145 files changed, 82653 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..64c40a4
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,1514 @@
+2010-10-26 Andreas Kupries <andreask@activestate.com>
+
+ * expect.c: [Bug 3095935]: Convert #bytes information to #chars to
+ prevent later code to fail when copying strings around and
+ miscalculating how much to copy, for strings containing
+ non-ASCII utf chars.
+
+2010-09-30 Andreas Kupries <andreask@activestate.com>
+
+ * example/autopasswd: Updated to use tclsh in PATH, and 'package
+ * example/chess.exp: require Expect'. Obsoletes fixline1.
+ * example/cryptdir:
+ * example/decryptdir:
+ * example/dislocate:
+ * example/dvorak:
+ * example/ftp-inband:
+ * example/ftp-rfc:
+ * example/gethostbyaddr:
+ * example/kibitz:
+ * example/lpunlock:
+ * example/mkpasswd:
+ * example/multixterm:
+ * example/passmass:
+ * example/read1char:
+ * example/rftp:
+ * example/rlogin-cwd:
+ * example/robohunt:
+ * example/rogue.exp:
+ * example/telnet-cwd:
+ * example/timed-read:
+ * example/timed-run:
+ * example/unbuffer:
+ * example/virterm:
+ * example/weather:
+ * example/xkibitz:
+ * example/xpstat:
+
+ * Makefile.in: Continued work on the 'make dist' target (config.{sub,guess})
+ * install.sh: Removed unused file.
+ * mkinstalldirs: Removed unused file.
+ * tclconfig/README.txt: Removed unused file.
+ * testsuite/config/: Removed contents of unused directory.
+ * test/.Sanitize: Removed unused file.
+
+2010-09-17 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * Makefile.in: improved make dist target to include the necessary
+ files, and remove old dist_orig.
+ Enable Makefile regen target
+
+2010-09-16 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * configure: regen with ac-2.59
+ * tclconfig/tcl.m4: update for correct LDFLAGS on HP-UX
+ * Makefile.in (expect): use TEA LDFLAGS instead of tclConfig.sh to
+ build expect executable
+
+2010-09-01 Andreas Kupries <andreask@activestate.com>
+
+ * Makefile.in: [Bug 865278] Semi-applied Don Porter's patch adding
+ code which prevents the package from registering with Tcl
+ interpreters which cannot load it, i.e. below the version it was
+ compiled against. Semi because the pkgIndex.in in his patch is
+ not used, the pkgIndex.tcl is generated by the Makefile(.in).
+ * pkgIndex.in: Removed. File not used.
+
+2010-08-31 Andreas Kupries <andreask@activestate.com>
+
+ * Various cleanups, local patches of ActiveState.
+ * exp_clib.c: Remove local copy of Tcl_ErrnoMsg().
+ * exp_inter.c: Hack access to TCL_REG_BOSONLY when not present,
+ became private with Tcl 8.5 and higher.
+ * expect.h: Remove the local fiddling with the memory allocation
+ and panic macros.
+
+ * Dbg.c: [Bug 2972727]: Applied the parts of Larry Virden's patch
+ which were still current. Most of it applied to the partially
+ ansified sources we had in trunk for a time and where errors in
+ that set of changes, thus out of date now.
+
+ * example/unbuffer: [Bug 2949748]: Applied patch by Vitezslav
+ Crhonek <vcrhonek@users.sourceforge.net> to prevent unbuffer
+ from eating the exit code of the command it ran (regular mode
+ only, not -p). Slightly modified, I removed the superfluous
+ 'eval' used to invoke 'wait', invoking it directly.
+
+2010-08-27 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * retoglob.c: Fail if the generated glob contains more than
+ two asterisks. Fixes [Expect SF Bug 3010684] (cederqvist)
+
+ * exp_main_sub.c: add return to silence compiler warning.
+ Updated EXP_VERSION to 5.45.0
+
+ * config.guess, config.sub, expect.m4 (removed):
+ * configure, configure.in, tclconfig/tcl.m4: Update to TEA 3.9
+ * Makefile.in, aclocal.m4: Partial cleanup of the build system.
+ * testsuite/Makefile.in: Remove unused EXP_ from configure.in
+ * testsuite/aclocal.m4: and no longer use Tk.
+ * testsuite/configure: Update testsuite bits to use TEA info.
+ * testsuite/configure.in:
+ Update expect to version 5.45
+
+ * Dbg.c: account for removal of tcldbgcf.h
+ * DbgMkfl.in, Dbgconfig.in, Dbgconfigure, DbgpkgInd.in (removed):
+ * tcldbgcf.h.in (removed): removed Dbg debugger subcomponent as it
+ no longer built and debugger functionality is included in expect
+ library and binary
+
+ * pty_termios.c: add HAVE_STRING_H include string.h
+ * exp_trap.c: add HAVE_STRING_H include string.h
+
+ * expectk.man, exp_main_tk.c (removed): expectk no longer
+ built. Use tclsh with package require Tk and Expect instead.
+
+ * tests/all.tcl: add package require Expect
+
+ * example/archie, example/autoexpect: minor code cleanup
+ * example/tkpasswd, example/tknewsbiff, example/tkterm: use
+ package require statements in lieu of expectk
+
+2009-11-03 Andreas Kupries <andreask@activestate.com>
+
+ * exp_command.c (Exp_SpawnObjCmd): [Expect SF Bug 2891422]. Fixed
+ error message when the command to spawn could not be executed.
+ Tried to use a Tcl_Obj* as argument for a %s. Replaced with the
+ correct char* variable. Thanks to Elchonon Edelson
+ <eee@users.sourceforge.net> for the report.
+ [Expect SF Bug 2891563] Ditto for the same type of bug when
+ emitting error 'usage: -ignore unknown signal name'. The
+ remainder of the exp_error calls are ok however.
+
+ * configure.in: Bumped version to 5.44.1.15.
+ * configure: Regen'd, autoconf 2.59.
+
+2009-07-14 Andreas Kupries <andreask@activestate.com>
+
+ * exp_clib.c (TclRegComp): Fixed memory leak reported by
+ <ettlmartin@users.sourceforge.net> in [Expect SF Bug 2814263].
+
+2009-06-22 Andreas Kupries <andreask@activestate.com>
+
+ * pty_unicos.c (pty_stty): Fixed missing double-quotes for sprint
+ formatting strings. Thanks to <ettlmartin@users.sourceforge.net>
+ for the report, i.e. [Expect SF Bug 2809496].
+
+2009-06-18 Andreas Kupries <andreask@activestate.com>
+
+ * exp_command.c (Exp_LogFileObjCmd): Fix argument parsing logic
+ error in the log_file command breaking the use of options -open
+ and -leaveopen. Applied patch supplied by Andy Belsey
+ <Andrew.Belsey@Sun.COM>. With thanks for both the analysis of
+ the problem and the patch.
+
+ * configure.in: Bumped version to 5.44.1.14.
+ * configure: Regen'd, autoconf 2.59.
+
+2009-05-27 Andreas Kupries <andreask@activestate.com>
+
+ * exp_tty.c (Exp_SttyCmd, Exp_SystemCmd): Applied patch by
+ Reinhard Max (max@suse.de) fixing buffer-overflows in the 'stty'
+ command due to an off-by-one error in the buffer size. See the
+ bugs https://bugzilla.novell.com/show_bug.cgi?id=506873
+ and https://bugzilla.novell.com/show_bug.cgi?id=501291
+
+ * configure.in: Bumped version to 5.44.1.13.
+ * configure: Regen'd, autoconf 2.59.
+
+2009-05-06 Andreas Kupries <andreask@activestate.com>
+
+ * retoglob.c: Accepted the patch by Mike Cumings
+ <mcumings@users.sourceforge.net> fixing [Expect SF Bug 13179].
+ The updated code checks a (?...) sequence that it contains only
+ ARE options before processing it as such. This prevents the
+ misinterpretation of non-capturing paren groups as ARe options
+ with subsequent segmentation fault.
+
+ * configure.in: Bumped version to 5.44.1.12.
+ * configure: Regen'd, autoconf 2.59.
+
+2008-09-30 Andreas Kupries <andreask@activestate.com>
+
+ * configure.in: Bumped version to 5.44.1.11.
+ * configure: Regen'd, autoconf 2.59.
+
+ * exp_command.c (Exp_OverlayObjCmd): Fixed [Expect SF Bug 2127456]
+ reported by <eee@users.sourceforge.net>, with thanks. Changed
+ retrieval of command from objv[0] (== 'overlay' itself), to
+ objv[i] containing the actual user command.
+
+ * expect.c (string_case_first, string_first, eval_case_string):
+ Applied patch supplied by Andy Belsey <Andrew.Belsey@Sun.COM>
+ fixing the seg.fault in 'expect -exact'. With thanks for both
+ the analysis of the problem and the patch. See also [Expect SF
+ Bug 2114547].
+
+2008-08-28 Andreas Kupries <andreask@activestate.com>
+
+ * exp_trap.c (tophalf): Fixed inverted condition setting the
+ interpreter used for trap handling to NULL, causing a crash when
+ trying to handle ^C. This fixes [SF Bug 1757471] reported by
+ Matthias Kraft <matzek@users.sourceforge.net>.
+ * configure.in: Bumped version to 5.44.1.10.
+ * configure: Regen'd, autoconf 2.59.
+
+2008-08-18 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * exp_main_sub.c (exp_interpreter): cleaner handling of commandPtr
+ to prevent crash. (das)
+
+2008-06-03 Andreas Kupries <andreask@activestate.com>
+
+ * exp_glob.c (Exp_StringCaseMatch2): Fixed bug in the handling of
+ glob classes, see [SF Bug 1873404]. The code tried to match the
+ closing bracket of a class in the input because it was not
+ properly skipped after the class was matched successfully.
+ Additional trace output added.
+ * configure.in: Bumped version to 5.44.1.9.
+ * configure: Regen'd, autoconf 2.59.
+
+2008-05-05 Andreas Kupries <andreask@activestate.com>
+
+ * exp_pty.c: Minimal ansification of function definitions to match
+ them to their prototypes where promoted types are otherwise
+ causing a mismatch for some compilers, like AIX in 64bit mode.
+ * configure.in: Bumped version to 5.44.1.8.
+ * configure: Regen'd, autoconf 2.59.
+
+2008-04-03 Andreas Kupries <andreask@activestate.com>
+
+ * configure.in: Bumped version to 5.44.1.7.
+ * configure: Regen'd, autoconf 2.59.
+
+ * The following set of changes was sent our way by Reinhard Max
+ <max@tclers.tk>.
+
+ * exp_command.c: Fixed more compiler warnings, and started
+ * exp_command.h: to ansify the code base, beginning with
+ * exp_inter.c: the introduction of proper function prototypes.
+ * exp_main_exp.c:
+ * exp_pty.h:
+ * exp_tty.c:
+ * exp_tty.h:
+ * exp_win.c:
+ * expect.c:
+ * pty_termios.c:
+ * retoglob.c:
+
+2008-04-03 Andreas Kupries <andreask@activestate.com>
+
+ * configure.in: Bumped version to 5.44.1.6.
+ * configure: Regen'd, autoconf 2.59.
+
+ * The following set of changes was sent our way by Reinhard Max
+ <max@tclers.tk>.
+
+ * configure.in: Fixed checking of stty on linux, do not restrict
+ to specific cpu's. Further try with stdin, and stdin redirected
+ to /dev/tty when determining if stdout is read.
+
+ * testsuite/configure.in: Brought up to TEA 3.5.
+ * testsuite/aclocal.m4: New file, to import the TEA definitions.
+
+ * Dbg.c: Added missed CONST in declaration and definition of
+ 'debugger_trap'.
+
+ * exp_command.c: Fixed pointer aliasing trouble with
+ 'Tcl_DetachPids', and added the missing initialization of the
+ command string in the 'overlay' command.
+
+ * expect.c: Fixed missing initialization of 'simple_start' element
+ of 'ecase'.
+
+ * exp_inter.c: Fixed bogus use of 'slen' in 'intMatch'. The
+ relevant string is Tcl_Unichar, not Utf.
+
+ * Makefile.in: Replaced bogus INSTALL_ROOT with DESTDIR, and added
+ missing DESTDIR references to the target for the installation of
+ the manpages.
+
+2008-02-27 Andreas Kupries <andreask@activestate.com>
+
+ * expect.c: Fixed refcounting error when parsing a single expect
+ * configure.in: argument into a list of patterns and
+ * configure: actions. Updated the version number to 5.44.1.5.
+ * Dbg.c: Added missing 'return TCL_OK' to debugger_trap.
+
+2007-12-13 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * exp_log.c (expStdoutLogU): correct which buf is output.
+
+ * exp_command.c (Exp_SendLogObjCmd): fix '--' handling
+ (Exp_SendObjCmd): fix '--' handling to expect last argument
+
+2007-09-24 Andreas Kupries <andreask@activestate.com>
+
+ * exp_inter.c: Changed inclusion of tcl.h to tclInt.h to get the
+ * expect.c: definition of TCL_REG_BOSONLY, which was moved to that
+ header in Tcl 8.5. Ditto for expect.c, for the macro
+ TclUtfToUniChar (was a function in 8.4). Expect now compiles
+ again for both Tcl 8.4 and 8.5.
+
+ * configure.in: Bumped version to 5.44.1.4.
+ * configure: Regenerated.
+
+2007-09-19 Andreas Kupries <andreask@activestate.com>
+
+ * retoglob.c (EMITC): Keep the characters '^' and '$' quoted as
+ well, we do not wish to invoke their special interpretation by
+ the Expect glob matcher.
+ * configure.in: Bumped version to 5.44.1.3.
+ * configure: Regenerated.
+
+2007-08-09 Andreas Kupries <andreask@activestate.com>
+
+ * retoglob.c: We had ExpChopNested and ExpBackslash locally
+ ansified (prototypes) to avoid a compiler error on AIX (type
+ promotion trouble). This now integrated into the mainline
+ sources, conditional to AIX.
+
+ * expect.c (Exp_TimestampObjCmd): Fixed argument processing broken
+ by objc,objv conversion. Tried to use command name as the
+ argument for -seconds. Also did not detect when one argument to
+ many was specified.
+
+ * configure.in: Bumped version to 5.44.1.2.
+ * configure: Regenerated.
+
+2007-07-17 Andreas Kupries <andreask@activestate.com>
+
+ * expect.c: Circumvented problems with the C compiler by use of a
+ temporary variable to hold the unicode pointer of a glob
+ pattern. The computed pattern length given to
+ Exp_StringCaseMatch was bogus.
+
+ * exp_glob.c: Added tracing of the glob matcher internals (Can be
+ enabled by define EXP_INTERNAL_TRACE_GLOB). Fixed bug in a guard
+ condition in the optimized handling of '*'. The bad condition
+ caused the code to miss possible matches at the beginning of the
+ input (first char).
+
+ * tests/expect.test: Added tests which check the glob matcher and
+ RE gate keeping.
+
+ * configure.in: Bumped to 5.44.1.1 to separate this from the
+ regular 5.44.1 sources.
+ * configure: Regenerated.
+
+2007-07-12 Andreas Kupries <andreask@activestate.com>
+
+ * expect.c: Found bugs mismanaging input and pattern in the
+ * exp_glob.c: updated glob matcher. We cannot check for '\0'
+ anymore to find the end of the string, these are counted
+ arrays now. Rewritten to use sentinel pointers.
+
+2007-07-11 Andreas Kupries <andreask@activestate.com>
+
+ * exp_chan.c: Converted the buffering system from UTF-8 in Tcl_Obj
+ * exp_command.h: to UTF-16 C-array, to avoid the repeated conversion
+ * expect.c: of the input from utf-8 to utf-16. Updated the glob
+ * exp_glob.c: matching code to use the same tricks for speed which
+ * exp_inter.c: are used by the Tcl core. Extended the regexp
+ * exp_log.c: matching path with a glob matcher which uses a gate
+ * exp_log.h: keeper glob pattern to weed out most non-candidates
+ * retoglob.c (New file): in a speedy manner. Regexp matching now
+ has to be done only for the small number of candidates
+ identified by the gate keeper. Overall speed improvement as glob
+ matching is faster than regexp matching. Added code translating
+ regular expressions into their gate keeper glob pattern.
+
+ * Dbg.c: Converted the lot of argc,argv based command
+ * exp_command.c: implementations over to objc,objv.
+ * expect.c:
+ * exp_main_sub.c:
+
+ * Dbg.c: Cleaned up the direct access to interp->result,
+ * exp_command.c: replaced with the proper functions and
+ * expect.c: Tcl_Obj's.
+ * exp_main_exp.c:
+ * exp_main_sub.c:
+ * exp_main_tk.c:
+ * exp_prog.h:
+ * exp_trap.c:
+ * exp_tty.c:
+ * exp_win.c:
+ * exp_win.h:
+
+ * tests/cat.test: Added proper 'package require Expect'
+ * tests/expect.test: to the test setup code (JeffH).
+ * tests/logfile.test:
+ * tests/pid.test:
+ * tests/send.test:
+ * tests/spawn.test:
+ * tests/stty.test:
+
+ * exp_command.c: Reformatted overlong lines, whitespace,
+ * expect.c: comments. Added braces to some if-constructs.
+ * exp_inter.c: Reworked if-constructs interleaved with
+ * exp_tty.c: #if for better formatting in emacs.
+
+ * Dbg.c: Added note about unhandled cases in a switch.
+ * exp_chan.c: Added code to suppress unhandled warning for
+ unreachable code.
+ * exp_command.c: Removed unused variable.
+ * expect.c: Removed unused static function, added code to suppress
+ unhandled warning for unreachable code.
+
+ * exp_command.c: Fixed typo in comment.
+
+2007-06-28 Andreas Kupries <andreask@activestate.com>
+
+ * Merged changes from the official version 5.44.1 of expect into
+ the SF sources. See the details below.
+
+ --------------------
+ Marius Schamsula <marius173@mchsi.xcom> reported tclconfig
+ missing, evidentally for new TEA.
+
+ Lots of massaging to fix TEAification of Makefile and configure
+ including that version numbers will now be full three part.
+
+ Daniel Wong <danielwong@berkeley.xedu> noted the home page
+ should note that Wikipedia has a very readable entry for Expect.
+
+ Andre Alves <aalves@escloyalty.xcom> noted passmass needed some
+ fixes to handle Solaris 9 passwd prompt changes.
+
+ Andreas fixed several things: changes to better support TEA, fix
+ debugger interaction with nonblocking mode, and probably other
+ things I'm overlooking.
+
+ Martin Dietze <di@fh-wedel.xde> noted that autoconf 2.59 is
+ confused by C comment after undefs in expect_cf.h.in.
+
+ Added additional code to unbuffer -p so that if a process
+ earlier in the pipeline exits, unbuffer attempts to recover any
+ remaining output from the spawned proc before unbuffer itself
+ exits.
+
+ Jeffrey Hobbs noted that once stty was called, a bg'd script
+ would be suspended at exit. Turned out to be overaggressive
+ code in stty that recorded what 'damage' the user might have
+ caused when calling stty in the first place.
+
+ Jens Petersen provided patch to make setpgrp configure better on
+ some Linux systems.
+
+ Added example/getpassck script to test for getpass bug.
+
+ multixterm had debugging stuff leftover ("hello").
+ --------------------
+
+2006-02-27 Andreas Kupries <andreask@activestate.com>
+
+ * exp_main_sub.c: Added command 'exp_configure' for magic configuration.
+ * exp_command.c: Accepts option -strictwrite. Default is 0, ignoring
+ * exp_chan.c: write errors (compatible to 5.41). Setting to 1 re-
+ * expect_tcl.h: activates 5.42 behaviour.
+
+2006-01-25 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * tclconfig/tcl.m4, configure: Fix LD_SEARCH_FLAGS setting in tcl.m4
+
+ * example/unbuffer: whitespace police
+
+ * example/beer.exp: brace exprs
+
+ * expect.man: use clock instead of exec date, minor nroff fixes.
+
+2006-01-24 Andreas Kupries <andreask@activestate.com>
+
+ * tclconfig/tcl.m4: Updated to TEA 3.5
+ * configure.in: Ditto.
+ * configure: Regenerated.
+
+2006-01-10 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * tests/expect.test: ensure iso8859-1 for /tmp/null (steffen).
+
+2005-09-19 Andreas Kupries <andreask@activestate.com>
+
+ * exp_chan.c (ExpOutputProc): Added guard to intercept and ignore
+ empty write operations, i.e. operations trying to write zero
+ bytes.
+
+2005-09-09 Andreas Kupries <andreask@activestate.com>
+
+ * exp_chan.c (ExpBlockModeProc): No, stdin is not ok (See last
+ entry). Fixed.
+
+2005-07-07 Andreas Kupries <andreask@activestate.com>
+
+ * exp_chan.c (ExpBlockModeProc): [Expect SF Bug 1108551]. Excluded
+ manipulation of the blocking status for stdin/stderr. This is
+ handled by the Tcl core itself and we must absolutely not pull
+ the rug out from under it. The standard setting to non-blocking
+ will mess with the core which had them set to blocking, and
+ makes all its decisions based on that assumption. Setting to
+ non-blocking can cause hangs and crashes. Stdin is ok however,
+ apparently.
+
+ This problem was introduced at '2004-06-14'.
+
+2005-06-22 Andreas Kupries <andreask@activestate.com>
+
+ * exp_chan.c: Fixed bug causing crash of expect on exit when a
+ * exp_command.c: Tcl channel is used with -(leave)open more than
+ * exp_command.h: once. It tried to close such channels multiple
+ times, going through already freed memory. Added data structures
+ to track and refcount all such channels, to close them only when
+ the last user goes away.
+
+2005-06-09 Andreas Kupries <andreask@activestate.com>
+
+ * Makefile.in: Upgraded build system to TEA 3.2.
+ * configure.in:
+ * config.guess:
+ * config.sub
+ * exp_main_sub.c:
+ * aclocal.m4:
+
+2005-03-29 Andreas Kupries <andreask@activestate.com>
+
+ * exp_chan.c: Fixed problem with debugger introduced at '2004-06-14'.
+ * tcldbg.h: For a nonblocking stdin the debugger blowed up on the
+ * Dbg.c: empty reads it could get, exiting the application. I
+ guess that this was an implicit 'panic'. Fix:
+
+ - Split ExpBlockmodeProc into high- and lowlevel
+ code, the latter for use by the debugger. The
+ high-level code tells the debugger which state
+ stdin is in (doing this explicitly because if
+ FIONBIO is used it is not possible to query the fd
+ directly, and I saw no reason to #ifdef for fcntl
+ which can).
+
+ - Debugger now exports a function for use by the
+ blockmode proc, and in each interaction it checks
+ for nonblocking input, forces blocking if
+ necessary. At the end of each interaction the true
+ mode is restored. Both operations use the
+ low-level blockmode code.
+
+2005-03-07 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * exp_tty.c (Exp_SttyCmd): fix from Libes that controlling
+ terminal check example (book p372) by restricting set of
+ exp_ioctled_devtty variable.
+
+2005-02-15 Andreas Kupries <andreask@activestate.com>
+
+ * Merged changes from the official versions 5.42.1 and 5.43.0 of
+ expect into the SF sources. See the details below.
+
+ --------------------
+ Martin Forssen <maf@tkrat.xorg> fixed bug in ExpOutputProc
+ that caused misbehavior during partial writes.
+
+ Someone noted that gets stdin behaves differently (returns -1
+ immediately) from tclsh because with 5.42, stdin is unblocked by
+ defaults.
+
+ Robroy Gregg <robroy@armory.xcom> noted that expect_background
+ ignores timeouts. Added to documentation.
+
+ Jens Peterson <peterson@redhat.xcom> provided patch for
+ "mkpasswd -vo".
+
+ Gary Bliesener <gary.bliesener@nextel.xcom> noted that
+ multixterm failed on his system which had an old Tk that didn't
+ support the Tk package.
+
+ Removed beta designation.
+
+ Daniel A. Steffen <steffen@ics.mq.edu.xau> provided patch for
+ MacOS to avoid panic-redefinition.
+ --------------------
+
+2005-01-21 Andreas Kupries <andreask@activestate.com>
+
+ * exp_inter.c: Changed all uses of 'time(3)' to Tcl_GetTime. IOW
+ * expect.c: go through the abstract core API instead of
+ directly acessing OS time. This makes the code
+ dependent on Tcl 8.4, as Tcl_GetTime was not public
+ before. See TIP #73 for its introduction into the
+ public API. As for the reason behind _this_ change
+ see TIP #233. Our change here now causes Expect to
+ be automatically in sync with any virtualization
+ set up in the core.
+
+2004-08-19 Andreas Kupries <andreask@activestate.com>
+
+ * exp_chan.c (ExpOutputProc): Added code posted by Don on
+ c.l.t. to handle interrupted system calls (EAGAIN).
+
+2004-07-15 Andreas Kupries <andreask@activestate.com>
+
+ * Merged changes from the official version 5.42b0 of expect into
+ the SF sources. See details below.
+
+ --------------------
+ Alexander Doktorovich <alexander.doktorovich@ericsson.xcom>
+ wanted to use Expect as a filter. This is possible but 'too
+ hard'. To make it easier, added close_on_eof command to control
+ whether expect/interact automatically close the channel on eof.
+ This should simplify/enable other scripts.
+
+ Kurt Heberlein <kurth@3pardata.xcom> noted that Expect would
+ hang. Andreas tracked it down to a change in Tcl such that when
+ Tcl had data left in its buffers, it would check for more data
+ rather than returning what it had to Expect first. If no data
+ was forthcoming then Tcl would hang because the pty driver runs
+ in blocked mode. Recoded to use nonblocking mode.
+
+ Yi Luo <yluo@brocade.xcom> noted that multixterm xterms were
+ reporting the parent's X window ids (via the WINDOWID env
+ variable) instead of the new ones.
+
+ Dick Van Deun <dirk@dinf.vub.ac.xbe> noted that kibitz expects
+ to find write in /bin but it is in /usr/bin on Slackware. Seems
+ safe to drop the prefix.
+
+ Steve Lee <steve@tuxsoft.xcom> noted that building Expect failed
+ on Linux when built from scratch because stty ends up in
+ /usr/local/bin rather than the assumed /bin. Added code to
+ support this.
+ --------------------
+
+2004-06-14 Andreas Kupries <andreask@activestate.com>
+
+ * exp_chan.c: Integrated the block mode proc I got by mail from
+ Don Libes into the channel driver. This fixes an error with
+ expect hanging on some input if the situation is just
+ right^Hwrong. Basically if the buffers in driver, Tcl IO core
+ and Expect itself are aligned just so it can cause Expect to
+ block in all call to the OS for more data even if all the data
+ it needs is in ts buffers. Because the driver is blocking and
+ the Tcl core was told that it can run in non-blocking mode. with
+ the block mode proc in place the driver knows that it should be
+ non-blocking and is able to tell this to the OS as well. The
+ call to the OS still happens, but is not blocking anymore, and
+ so the problem is gone.
+
+ A number of incompat changes in the Tcl IO core to work around
+ this problem in Expect will be removed now.
+
+2004-06-03 Andreas Kupries <andreask@activestate.com>
+
+ * aclocal.m4 (TCLHDIRDASHI): Extended with path to unix headers as
+ well.
+ * expect_tcl.h: Added inclusion of <stdio.h>.
+ Both changes required for Expect to compile against Tcl 8.5
+ after the header reform.
+ * configure: Regenerated.
+
+2004-05-19 Andreas Kupries <andreask@activestate.com>
+
+ * Merged changes from the official version 5.41 of expect into the
+ SF sources. See details below.
+
+ --------------------
+ Simon Taylor <simon@unisolve.com.xau> provided fix for interact
+ -o which was completely broken by 5.40.1.
+
+ Added scroll support to official tkterm. Copied all fixes
+ from/to term_expect to/from tkterm.
+
+ Kiran Madabhushi <maskiran@hotmail.xcom> encountered interact
+ diagnostics incorrectly pointing to expect_background. Also,
+ found multiple -o flags behaving unexpectedly. Added diag.
+
+ Kristoffer Eriksson <ske@pkmab.xse> noted typo in SIMPLE code in
+ exp_inter.c. However, this is extremely unlikely to affect any
+ machines.
+
+ Reinhard Max <max@suse.xcom> noted that "make test" failed when
+ run in the background. The log testcase was testing the
+ send_tty command. Added code in both Expect and in the test to
+ handle this.
+ --------------------
+
+2004-02-25 Andreas Kupries <andreask@activestate.com>
+
+ * Merged changes from the official version 5.40 of expect into the
+ SF sources. See details below. Partially already done (Rich
+ Kennedy's patch).
+
+ --------------------
+ Eric Raymond <esr@snark.thyrsus.xcom> provided troff-related
+ fixes for the expect, lib, and dislocate man pages.
+
+ Rich Kennedy <rickenne@cisco.xcom> noted a bug having to do
+ with our caching of whether we have registered a filehandler.
+ This broke when Tcl was setting a handler on the same file.
+
+ Ken Pizzini <ken.pizzini@explicate.xorg> provided patch for
+ leak in spawn error handling.
+
+ Pete Lancashire <plancashire@columbia.xcom> noted autopasswd
+ example broke on Solaris which capitalized prompts.
+ --------------------
+
+2003-10-20 Andreas Kupries <andreask@activestate.com>
+
+ * exp_event.c (exp_get_next_event): Applied a patch made by Don
+ Libes in response to a bug report posted to news:comp.lang.tcl
+ by Rich Kennedy <rickenne@cisco.com>. Patch was posted to c.l.t
+ too.
+
+ > Subject: Re: 2nd interact does not grab stdin
+ > Date: 17 Oct 2003 15:33:38 -0400
+ > From: Don Libes <libes@nist.gov>
+ > Organization: National Institute of Standards and Technology
+ > Newsgroups: comp.lang.tcl
+ > References: <3F86D6F8.E535CBDE@cisco.com>
+
+ > It's a bug - some overaggressive caching regarding stdin. A fix
+ > appears below. (You should also be able to avoid the problem by
+ > replacing the gets with expect_user.)
+
+ > Don
+
+ > Rich Kennedy <rickenne@cisco.com> writes:
+
+ > > Hi,
+ > >
+ > > The following little expect script gets in trouble with second
+ > > 'interact' statement. The 'less' program does not get stdin
+ > > so it doesn't respond to typed characters...
+ > >
+ > > Is there something that must be done after the 1st interact to
+ > > allow the second to work correctly? (Note, you have to run
+ > > as a script because it works correctly if you type the commands
+ > > interactively to expect)
+ > >
+ > > #!/usr/local/bin/expect
+ > >
+ > > gets stdin a
+ > > spawn less file1
+ > > interact
+ > > wait
+ > > gets stdin junk
+ > > spawn less file2
+ > > interact
+ > > wait
+ > >
+ > > Thanks
+ > >
+ > > Rich Kennedy
+
+2003-09-05 Andreas Kupries <andreask@activestate.com>
+
+ * Merged changes from the official version 5.39 of expect into the
+ SF sources. See details below. Partially already done.
+
+ --------------------
+ Poorva Gupta <poorva@cup.hp.xcom> noted that grantpt/unlockpt
+ order was backward. Strange that this was never a prob before!
+
+ Eric Raymond <esr@snark.thyrsus.xcom> provided a troff-related
+ fix for the multixterm man page.
+
+ Nicolas Roeser <n-roeser@gmx.xnet> noted confusion with md5 so I
+ made the Expect page more explicit about which file that hash
+ was based on.
+
+ Josh Purinton noted that earlier fix wasn't quite right. Exit
+ on INT/TERM should cause Expect to exit with signal embedded in
+ status. He also requested I obfuscate email addresses in this
+ file.
+
+ Guido Ostkamp <Guido.Ostkamp@t-online.xde> and Igor Sobrado
+ <sobrado@string1.ciencias.uniovi.xes> noted that fixline1
+ rewrote scripts to be expect scripts even if they were expectk
+ scripts.
+
+ Dirk Petera <dirkpetera@yahoo.xcom> noted that any_spawn_id used
+ to work but did no longer. Looks like a bug left over from the
+ the I18L conversion. Fixed.
+
+ Steve Szabo noted exp_log_file -open channel failed. Fixed.
+
+ Fixed bug from 5.31 that prevent stty from returning messages
+ from underlying program.
+
+ Thomas Dickey <dickey@herndon4.his.xcom> noted that ncurses
+ ignores 2-char term names because of, well, poor assumptions and
+ coding. Changed tkterm to use longer names.
+
+ Heath Moore <hmoore@systran.xcom> noted that exp_clib could lock
+ up if remtime happened to be precisely 0. Recoded to avoid.
+
+ At request of Per Otterholm <otterholm@telia.xcom>, wrote script
+ to read from stdin and echo passwords (exercise 9 in Tk chapter
+ of Expect book). Added to example directory as passwdprompt.
+
+ Josh Purinton <josh@purinton.xorg> pointed out that by default,
+ SIGINT/TERM should cause expect's return status to be 1, not 0.
+
+ Paul Reithmuller <paul.reithmuller@eng.sun.xcom> noted that
+ unbuffer shouldn't postprocess its output. Added stty_init.
+
+ Mordechai T. Abzug <morty@sanctuary.arbutus.md.xus> noted that
+ log_file wasn't recording -append status.
+
+ James Kelly <macubergeek@comcast.xnet> noted weather example
+ needed new source.
+
+ Dimitar Haralanov <mitko@tahoenetworks.xcom> noted that interact
+ dumped core with interact { timeout 1 }
+ --------------------
+
+2003-06-16 Andreas Kupries <andreask@activestate.com>
+
+ * exp_command.c: Applied patch provided on c.l.t., by Don Libes
+ <libes@nist.gov> in response to a bug report by Dirk Petera
+ <dirkpetera@yahoo.com> in same place. See thread reference
+ below:
+
+ http://groups.google.ca/groups?threadm=4791f5a6.0305250619.1a660299%40posting.google.com
+
+2003-05-08 Andreas Kupries <andreask@activestate.com>
+
+ * exp_clib.c (expectv): Applied patch provided on c.l.t., by Don
+ Libes <libes@nist.gov> in response to a bug report by "Heath
+ Moore" <hmoore@systran.com> in same place:
+
+ > Regarding expect 5.38...
+ >
+ > I'm using libexpect on RedHat 8.0 to communicate via telnet,
+ > and am having problems with it locking up instead of timing
+ > out. Causing traffic during the lockup breaks the lockup. I
+ > looked at the sources, and think I may have found the reason.
+ >
+ > It appears as though i_read can be called with remtime== 0,
+ > which means do > one read() and return without using alarm(),
+ > even when exp_timeout is non-zero. This would happen if
+ > i_read were to return after receiving non-matching data when
+ > end_time == current_time. The subsequent i_read would then
+ > wait until it received data.
+
+2003-02-17 Andreas Kupries <andreask@activestate.com>
+
+ * Makefile.in:
+ * configure.in: Removed the check of configure against
+ configure.in and Makefile.in. It is a hassle to deal with when
+ trying to build straight from CVS, making unsupervised automatic
+ builds difficult
+
+2003-02-14 Andreas Kupries <andreask@activestate.com>
+
+ * configure.in: Made expect aware of tcl stubs. Derived from the
+ * exp_command.h: patches to expect done by Steve Landers
+ * exp_command.c: <stevel@digital-smarties.com>. Modifications:
+ * exp_main_sub.c No global cmdinfo structures for 'close' and
+ * exp_main_exp.c: 'return'. Made this per-interpreter information
+ * exp_main_tk.c: as it should be. Using interp assoc data for this.
+
+ NOTE: stubs is not default, but has to be activated via '--enable-stubs'.
+
+ * configure: Regenerated.
+
+2003-02-14 Andreas Kupries <andreask@activestate.com>
+
+ * exp_chan.c (exp_close_all): Save the nextPtr in a local variable
+ before calling 'exp_close' as 'expStateFree' can be called from
+ it under some circumstances, possibly causing the memory
+ allocator to smash the value in 'esPtr'.
+
+2003-02-03 Andreas Kupries <andreask@activestate.com>
+
+ * exp_log.c (expLogChannelOpen): Fixed the bug reported on
+ comp.lang.tcl by Mordechai T. Abzug
+ <morty@sanctuary.arbutus.md.us>. The bugfix itself was provided
+ by Don Libes.
+
+2002-10-09 Andreas Kupries <andreask@activestate.com>
+
+ * exp_command.c (Exp_SpawnCmd): Tcl_GetChannelHandle expected a
+ ClientData*, but got an int*. sizeof(int) != sizeof(ClientData)
+ on 64bit platforms. Crashed the command on a PA-RISC 2.0 machine
+ with --enable-64bit set. Fix: Use temp. variables of type
+ ClientData to retrieve the fd's, and copy this into the actual
+ variables, with a cast to int.
+
+2002-09-25 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * configure: regen'ed
+ * configure.in: use tcl_libdir in EXP_LIB_SPEC instead of
+ ${INSTALL_ROOT}${exec_prefix}/lib (steffen)
+
+ * exp_main_tk.c (Tk_Init2): don't call XSynchronize on OS X.
+
+2002-08-08 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * Merged changes from the official version 5.38 of expect into the
+ SF sources. See details below.
+
+ * Makefile.in: Added generation of MD5 checksum for distributed
+ archive.
+ * rftp: Bugfix by Curt Schroeder, see HISTORY
+ * HISTORY: Updated with new info.
+ * configure: Updated version info.
+ * configure.in: Updated version info.
+
+2002-06-26 David Gravereaux <davygrvy@pobox.com>
+
+ * example/weather: Updated script to use rainmaker.wunderground.com
+ instead of cirrus.sprl.umich.edu. The old service is closed.
+ Added Larry Virden's notes about how rainmaker needs reverse DNS
+ from the peer making the connection or no data can retrieved.
+ This appears to be a blind error condition.
+
+2002-06-17 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * exp_main_tk.c: #ifdef'd definition of "matherr". This hack is
+ not required for 8.4 anymore. But still for 8.3.
+
+2002-03-25 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * exp_main_sub.c: Fixed typo in merge of #459646. Thanks to Hemang Lavana.
+
+ * exp_log.c (expStdoutLogU): Merged fix for SF Bug #513382 into
+ the HEAD (The source of the patch is "expect-sf418892-sf439042-branch").
+
+ Use Tcl_WriteChars/Tcl_Flush instead of 'fwrite' for tcl 8.1 and
+ beyond to enforce correct conversion of the internal UTF/8 into
+ the external representation.
+
+ * Merged fix for SF Bug #459646 into the HEAD (The source of the
+ patch is "expect-sf418892-sf439042-branch").
+
+ * Merged fix for SF Bug #439042 into the HEAD (The source of the
+ patch is "expect-sf418892-sf439042-branch").
+
+ * Merged fix for SF Bug #418892 into the HEAD (The source of the
+ patch is "expect-sf418892-sf439042-branch").
+
+2002-03-23 Don Libes <libes@users.sourceforge.net>
+
+ * Andreas Kupries mods to provide CONST support per TIP 27 (Fixed
+ SF Patch #525074).
+
+2002-02-25 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * expect.c: Applied patch by Don Libes fixing improper
+ internationalization.
+
+2002-02-21 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * expect.man: Changed the paragraph about [exp_continue] to
+ contain information about the flag "-continue_timer". This fixes
+ the bug SF #520630.
+
+2002-02-08 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * expect.man: Changed abbreviation of "-notransfer" from "-n" to
+ "-not". "-n" is no longer unique due to the addition of
+ "-nocase". This fixes the bug SF #514994.
+
+2002-02-07 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * Applied patch for SF #514590 to correct behaviour of expect when
+ expecting and send from and to bogus spawn id's.
+
+2002-01-16 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * Resynchronization of SourceForge with Don's sources to Expect
+ version 5.34. The changes are
+
+ Don Porter <don.porter@nist.gov> provided package-related fixes
+ for test suite.
+
+ Brian Theado <brian.theado@usa.net> noted that interact's -re
+ support broke when offsets kicked in. Turned out that the
+ regexp engine supports them during execution but the results are
+ delivered RELATIVE to the offset. (I suspect this was done
+ due to expediency.)
+
+2001-12-05 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * exp_inter.c: Applied patch posted by Don libes to c.l.t. on his
+ behalf to keep the SF repository in sync with his changes. Don's
+ notes: I obviously missed the fact that although
+ "Tcl_RegExpExecObj" supports offsets, they aren't delivered to
+ "Tcl_RegExpGetInfo".
+
+2001-09-12 David Gravereaux <davygrvy@pobox.com>
+
+ * 'telco-tec-win32-branch' branch created.
+
+2001-08-01 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * Dbg.c (Dbg_On): fixed handling of stepping. [Bug: #446412]
+
+2000-04-26 Rob Savoye <rob@welcomehome.org>
+
+ * pty_termios.h: Only include stropts.h if it exists, rather than
+ deciding it exists based on HAVE_PTMX.
+ * configure.in: Make sure libpt exists, rather than blindly using
+ it for all our configure tests, which then all fail. Also assume
+ our svr4 style ptys are broken, if /dev/ptmx exists, but stropts.h
+ doesn't exist.
+
+1999-08-31 Jennifer Hom <jenn@scriptics.com>
+
+ * Makefile.in: Changed test target to source tests/all.tcl instead
+ of tests/all
+
+ * tests/README: Modified documentation to reflect the change from
+ usage of a defs file to the use of package tcltest to run the tests
+
+ * tests/all:
+ * tests/defs:
+ * tests/all.tcl:
+ * tests/cat.test:
+ * tests/expect.test:
+ * tests/logfile.test:
+ * tests/pid.test:
+ * tests/send.test:
+ * tests/spawn.test
+ * tests/stty.test: Modified test files to use package tcltest,
+ removed tests/all and tests/defs, and added tests/all.tcl
+
+1999-06-22 <stanton@scriptics.com>
+
+ * expect.c: Fixed bug in token parsing where index was not being
+ incremented properly.
+
+ * configure.in: Changed version number to 5.31.
+
+ * aclocal.m4: Fixed CY_AC_LOAD_TKCONFIG so it tests for Tk_Init
+ instead of Tk_Main (which is only a macro in 8.1 and later). Also
+ added TCL_BUILD_LIB_SPEC to the set of flags used in this test to
+ avoid linker errors.
+
+ * Dbgconfig.in: move CY_*_TCLCONFIG tests below AC_PROG_CC so it
+ will work with gcc
+
+Thu Mar 20 14:27:45 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * configure.in: don't check if stty reads stdout for
+ i[[3456]]86-*-sysv4.2MP during config; hard code instead
+
+Tue Nov 19 09:22:08 1996 Tom Tromey <tromey@cygnus.com>
+
+ * Makefile.in (install_shared_lib): Put else clause onto each if.
+
+Fri Nov 15 11:23:43 1996 Tom Tromey <tromey@cygnus.com>
+
+ * Makefile.in (XCFLAGS): Use EXP_SHLIB_CFLAGS, not
+ TCL_SHLIB_CFLAGS.
+ (TCL_SHLIB_CFLAGS): Define.
+
+ * configure.in: Allow arguments to --enable-blah to work.
+ Compute and AC_SUBST EXP_SHLIB_CFLAGS.
+ Added missing AC_MSG_CHECKING.
+
+Wed Oct 2 10:13:37 1996 Tom Tromey <tromey@cygnus.com>
+
+ * configure: Regenerated.
+ * configure.in (stty_reads_stdout): /bin/stty on DG/UX fails.
+
+Fri Sep 27 10:15:48 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * expect.c (exp_i_read): Pass interp as first arg to exp_error.
+ * configure.in (stty_reads_stdout): /bin/stty on OSF2.0, OSF3.2,
+ HPUX 9.X, HPUX 10.X guesses wrong, so set value explicitly.
+
+Mon Sep 9 10:29:32 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * configure: Regenerated.
+ * configure.in: Added code to actually handle --with-x.
+
+ * configure: Regenerated.
+ * configure.in: Don't bother looking for Tk if --with-x=no
+ specified.
+
+Thu Sep 5 11:01:09 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * configure: Regenerated.
+ * configure.in (stty_reads_stdout): AIX fails "stty" test in
+ background, so set explicitly. Ditto HPUX 9 and 10.
+
+Thu Aug 29 17:04:55 1996 Michael Meissner <meissner@tiktok.cygnus.com>
+
+ * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
+ * configure: Regenerate.
+
+Mon Aug 5 12:55:06 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * Makefile.in (XCFLAGS): New macro.
+ (CFLAGS): Define to just @CFLAGS@.
+ (CFLAGS_INT): Use $(XCFLAGS).
+ (expect, expect_installed, expect.tc, expectk, expectk_installed,
+ expectk.tc): Use $(XCFLAGS).
+
+Mon Feb 12 23:11:38 1996 Rob Savoye <rob@chinadoll>
+
+ * aclocal.m4: Fix typo of ac_cv_tkh to be ac_cv_tclh so it works
+ on all systems.
+ * configure, DBGconfigure, testsuite/configure: Regenerated with
+ autoconf 2.7.
+
+Tue Feb 6 11:48:05 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * exp_clib.c, exp_printify.c, expect_comm.h: For Tcl 7.5 and
+ greater, use ../compat/stdlib.h, not compat/stdlib.h.
+
+Tue Jan 30 12:21:37 1996 Fred Fish <fnf@kalessin.cygnus.com>
+
+ * exp_regexp.c (regmatch, regrepeat): Only declare strchr if it is not
+ a macro.
+
+Mon Jan 22 11:17:06 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * configure.in: Check for -lieee, -ldl, and -ldld.
+
+ * Makefile.in (OFILES): Include @LIBOBJS@.
+ (strerror.o): New target.
+
+ * strerror.c: New file.
+
+ * configure.in: Test for strerror.
+
+Fri Jan 19 11:08:11 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * Makefile.in (install, ${SCRIPT_LIST}, test): Find new Tcl libraries.
+
+Thu Jan 18 13:43:13 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * Most files: Update to expect 5.19.
+
+Fri Jan 12 16:22:12 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * exp_closetcl.c (exp_close_tcl_files): Skip stdin, stdout,
+ stderr.
+ * expect_comm.h: Declare exp_close_files_interp.
+ * exp_command.c (exp_init_most_cmds): Set exp_close_files_interp.
+
+Thu Jan 11 09:43:14 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * exp_closetcl.c (exp_close_files_interp): New variable for Tcl
+ 7.5.
+ (exp_close_tcl_files): Updated for Tcl 7.5.
+
+ Prototype and varargs changes:
+ * expect.c: Don't include <varargs.h>.
+ * Dbg.c: Copied in many defines from expect_comm.h.
+ (print): Use new varargs defines.
+ * exp_clib.c (exp_fexpectl): Use EXP_VARARGS_START.
+ * expect_comm.h: Include "tclInt.h".
+ * exp_console.c (exp_console_manipulation_failed): First arg to
+ errorlog is char*, not FILE*.
+ * exp_log.c (debuglog): Pass name of last argument to
+ EXP_VARARGS_START.
+ * expect_cf.h.in (tcl_AsyncReady): Removed define.
+ * expect.c (Exp_ExpectGlobalCmd): Added cast.
+ * exp_command.c (exp_i_update): First arg to exp_debuglog is
+ * exp_poll.c (exp_get_next_event): Likewise.
+ char*, not Tcl_Interp*.
+ * exp_log.h: Use prototypes everywhere. Include "expect_comm.h".
+ * expect_tcl.h: Use EXP_VARARGS, not VARARGS.
+ (tcl_AsyncReady): New define for Tcl 7.5.
+
+ * aclocal.m4 (CY_AC_PATH_TCLH): Handle Tcl 7.5 and greater.
+ (CY_AC_PATH_TCLLIB): Handle Tcl 7.5 and greater.
+ (CY_AC_PATH_TKH): Handle Tk 4.1 and greater.
+ (CY_AC_PATH_TKLIB): Handle Tk 4.1 and greater. Properly quote
+ argument to AC_REQUIRE.
+ * configure: Regenerated.
+
+Tue Jan 9 16:26:47 1996 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * Makefile.in: Change SHORT_BINDIR to $prefix, rather than
+ exec_prefix. This is only used to store the platform independant
+ expect scripts.
+
+Dec 18 17:22:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
+
+ * configure.in, configure: For a solaris2 machine doing a static
+ build, add `-ldl -lw' to avoid unresolved refs using the
+ OpenWindows libraries.
+
+Wed Nov 22 08:49:01 1995 Rob Savoye <rob@chinadollchinadoll.cygnus.com>
+
+ * Most files: Update to expect 5.18.1.
+
+Fri Nov 17 17:31:55 1995 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * configure.in: Add support for SCO OpenServer. It doesn't like
+ the trap either.
+
+Thu Nov 16 09:28:53 1995 Rob Savoye <rob@chinadoll.cygnus.com>
+
+ * configure.in: Use $host to get the OS type rather than trying to
+ get the host name ourselves. Use the $host to set the
+ STTY_READS_STDOUT for hosts were the test is known to fail. It
+ also now configures in the background.
+ * configure.in, Dbgconfig.in, testsuite/configure.in: Use
+ AC_PROG_CC again since Cygnus configure now does the sames thing.
+
+Mon Oct 30 18:16:48 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * configure.in (no_tk): zero out X_PROGS if we can't find tk
+ libraries.
+
+Tue Oct 24 18:25:09 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * Makefile.in (X11HDIR): Changed to X11_CFLAGS.
+ (X11_LIB_FLAGS): Changed to X11_LDFLAGS.
+ (X11_LIB): Changed to X11_LIBS.
+ (CPPFLAGS_SIMPLE): Use X11_CFLAGS.
+ (expectk, expectk.tc, tk): use X11_LDFLAGS & X11_LIBS.
+
+ * configure.in (X11HDIR, X11_LIB_FLAGS, X11_LIB): Use X11_CFLAGS,
+ X11_LDFLAGS, X11_LIBS. Link X11 statically on Solaris, SunOS and
+ HPUX.
+
+Thu Oct 19 20:55:54 1995 Fred Fish <fnf@cygnus.com>
+
+ * Makefile.in: Remove extraneous tabs and blanks in otherwise
+ empty lines. That confuses older non-GNU versions of "make".
+
+Mon Oct 9 20:58:50 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * testsuite/aclocal.m4: New file. Include ../aclocal.m4.
+
+Thu Aug 31 00:16:26 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * HISTORY, Makefile.in, aclocal.m4, exp_command.h, exp_inter.c,
+ exp_main_tk.c, exp_pty.c, expect.c, tests/all,
+ testsuite/Makefile.in. Update to the 5.18.0 release. Minor
+ changes.
+
+Thu Aug 17 18:47:21 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * Most files: Update to the 5.17.7 release.
+
+Thu Aug 3 22:47:36 1995 Jeff Law (law@snake.cs.utah.edu)
+
+ * pty_termios.c (HAVE_PTMX): Undefine if both HAVE_PTYM and
+ HAVE_PTMX are defined (as happens for hpux10).
+
+Thu Jul 27 16:31:23 1995 J.T. Conklin <jtc@cygnus.com>
+
+ * Makefile.in (configure): Removed rule that automatically
+ rebuilds configure script. Users might not have autoconf.
+
+Tue Jul 18 23:15:03 1995 Fred Fish <fnf@fishbowl>
+
+ * expect.c (Exp_ExpectGlobalCmd): Cast ckrealloc first arg to char*.
+
+Sun Jun 18 13:02:41 1995 Fred Fish <fnf@amigalib.com>
+
+ * configure, configure.in (XLIBS): When adding -lX11, also preserve
+ the previous libraries that we went to the trouble of finding.
+
+Sun Jun 18 12:15:44 1995 Fred Fish <fnf@amigalib.com>
+
+ * Makefile.in (exp_clib.o): Add dependencies.
+
+Mon May 1 16:50:22 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * configure.in: Also set XINCLUDES in the Makefile.
+
+Fri Apr 28 18:56:02 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * aclocal.m4: Create a clone of AC_C_CROSS called CY_C_CROSS that
+ has better error handling in case the native compiler is hosed.
+ * aclocal.m4: Look for tcl and tk directories as just tcl (and tk)
+ or tcl[0-9] (and tk[0-9)] so it doesn't match the tclX
+ release. Print an error and exit if any of the --with-{tcl,tk}*
+ options are used and point to bogus paths. Based Tcl header search
+ on tclInt./h rather than tcl.h.
+ * Makefile.in: Add dependancies for back in for configure and
+ Dbgconfigure targets.
+
+Mon Apr 24 16:46:01 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * exp_command.c, exp_event.h, exp_inter.c, exp_main_tk.c,
+ exp_poll.c, exp_select.c, exp_simple.c, exp_tk.c, exp_trap.c,
+ exp_tty.c, FAQ, README, HISTORY: Update to expect 5.16.3.
+
+Fri Apr 14 12:00:39 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * configure.in: Copy Dbg_cf.h to objdir, not srcdir.
+
+Tue Apr 11 18:52:24 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * aclocal.m4: Split the macros so header and library searches are
+ seperate macros. AC_PATH_{TCL,TK} nows only calls the macros. Lots
+ of optimization to the AC_PATH_T* macros. Supports the use of
+ --with-tclinclude, --with-tcllib, --with-tkinclude, --with-tklib
+ to specify alternative search dirs for tcl and tk stuff.
+ * Makefile.in, testsuite/Makefile.in: Re-write targets for
+ configure, Dbgconfigure so they work in an unconfigured srcdir.
+ * configure.in: Put AC_PATH_X before AC_PATH_TK and make the TK
+ test conditional. Fix how Dbgconfigure gets passed the Tcl header
+ dir to use --with-PACKAGE which is much simpler. Removed the test
+ for user override of X search paths since AC_PATH_X uses.
+ --x-includes and --x-libraries instead.
+ * Dbgconfig.in: Use AC_PATH_TCLH to find just the headers, and
+ test for LynxOS.
+ * debugger/: Remove directory. Recursive configuring is so much
+ easier...
+ * DbgMkfl.in, Dbg_cf.h.in, Dbg.c, Dbg.h, Dbgconfigure,
+ Dbgconfig.in: Sigh, moved back to the top-level expect directory.
+
+Wed Apr 5 17:25:45 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * configure.in: Add a trap so the configure runs in the
+ background.
+
+Thu Mar 16 16:56:08 1995 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * debugger: New directory for the Tcl debugger.
+ * debugger/Dbg.c, debugger/Dbg.h, debugger/Dbg_cf.h.in: Moved from
+ the top level expect directory so it builds standalone.
+ * DbgMkfl.in, debugger/Makefile.in: Moved to debugger dir and
+ renamed.
+ * install-sh, mkinstalldirs: New files borrowed from the autoconf
+ distribution.
+ * aclocal.m4: New autoconf macros.
+ * Makefile.in: Tweaked so it's recursive.
+ * configure.in: Use new macros in aclocal.m4 rather than hunting
+ for the Tcl and Tk stuff ourseleves.
+ * debugger/Makefile.in: Build debugger standalone.
+ * testsuite/Makefile.in, testsuite/configure.in: New files for
+ autoconf support.
+ * exp_test.c, testsuite/exp_test.c: Move test file.
+
+Fri Jan 13 15:30:30 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
+
+ * Makefile.in (check): Pass EXPECT correctly to runtest.
+
+Thu Oct 20 18:04:06 1994 Rob Savoye <rob@darkstar.cygnus.com>
+
+ * Makefile.in: Add X11_INCLUDE_FLAGS so top level flags get used
+ too.
+
+Tue Jun 14 12:32:07 1994 David J. Mackenzie (djm@rtl.cygnus.com)
+
+ * aclocal.m4: Copy from TCL directory.
+ * configure.in: Improve checks for installed Tcl and Tk.
+ * configure: Rebuilt.
+
+Tue Jun 7 13:52:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Makefile.in (mostlyclean, realclean): New targets.
+
+Wed May 18 12:21:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Makefile.in (install): Add another ``else true''.
+
+Fri Apr 29 16:49:36 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * Makefile.in (install): Always use else in if conditional to
+ avoid Ultrix sh bug.
+
+Mon Apr 11 15:22:12 1994 Rob Savoye (rob@cirdan.cygnus.com)
+
+ * Upgrade to the new "official" beta release of expect 5.7.
+
+Wed Mar 30 17:15:28 1994 Rob Savoye (rob@cirdan.cygnus.com)
+
+ * testsuite/expect.tests/expect-test.exp: Just run the new expect
+ tests and format the outout under DejaGnu.
+
+Mon Mar 28 14:33:55 1994 Rob Savoye (rob@cirdan.cygnus.com)
+
+ * Upgrade to expect 5.6.3.
+
+Thu Dec 2 16:26:54 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * configure.in: Add tests to find Tcl and Tk headers and
+ libraries.
+
+Thu Aug 19 18:26:49 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * upgraded to version 4.7.6, add OSF/1 patches in again.
+
+Wed Aug 18 20:10:16 1993 Rob Savoye (rob@rtl.cygnus.com)
+
+ * upgraded to version 4.7.4, add OSF/1 patches in again.
+
+Tue Aug 17 20:17:40 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * pty_termios.c, exp_command.c, configure.in: Add support for
+ using ptmx_bsd's if they exist. Only found on OSF/1. (patch
+ applied from Gregory Depp <depp@osf.org>
+
+Thu Jun 10 11:36:09 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * exp_main.h: fix prototype for exp_cook
+
+Fri Jun 4 08:55:22 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * Makefile.in (TCLLIB): If ../tcl/libtcl.a does not exist, use
+ -ltcl.
+
+Tue May 25 14:45:12 1993 Rob Savoye (rob@darkstar.cygnus.com)
+
+ * Makefile.in, configure.in: Add some support for autoconfiguring
+ for X.
+
+Sun May 23 22:32:09 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * exp_command.c: Fix so send_log still works when master is out of
+ bounds. (ok since it doesn't get used).
+
+Mon May 17 19:51:52 1993 Rob Savoye (rob@cygnus.com)
+
+ * configure.in: Change test for ranlib so it kicks out "true"
+ rather than "@:" if it can't be found.
+
+Thu Apr 15 14:11:50 1993 Rob Savoye (rob@cygnus.com)
+
+ * configure.in, Makefile.in: If using ptmx's (SVR4 style pty's)
+ then check for libpt.a too.
+
+Thu Apr 8 17:13:39 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: all doesn't depend on $(SCRIPTS). When building
+ $(SCRIPTS) using fixline & sources in $(srcdir), not the current
+ directory. When installing manpages, install from $(srcdir).
+ Don't install like "install foo $(bindir)" but rather "install foo
+ $(bindir)/foo".
+
+Mon Mar 22 23:56:29 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: add check & installcheck targets
+
+Tue Mar 2 20:28:30 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * configure.in, configure: declare SETUID to be @: instead of echo
+
+ * pty_termios.c: declare ptynum
+
+ * Makefile.in: a number of changes, including use of the AR and
+ ARFLAGS variables, the appropriate variables for X11 (as passed
+ down from the top level Makefile), clean up some doc lines
+
+Mon Mar 1 15:05:40 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * configure.in, defs.h.in: Fixed problem for systems that think
+ getpty() should be _getpty().
+
+Thu Feb 25 15:34:34 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * exp_tty.h: Defines portable tty macros.
+ * pty_termios.c: New file, slightly based on pty_usg.c. Uses
+ portable macros and also supports termio.
+ * pty_sgttyb.c: Was pty_bsd.c.
+ * configure.in, Makefile.in, configure: autoconf support for
+ expect.
+
+Sun Feb 21 17:42:28 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * exp_tty.h: Removed and renamed the macros to use configure's.
+
+Wed Feb 17 18:56:36 1993 Rob Savoye (rob at darkstar.cygnus.com)
+
+ * expect.c, Makefile.in: Changed SIG_FN_RETURN to RETSIGTYPE
+ since that's what autoconf kicks out.
+
+Thu Dec 24 15:07:32 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * Makefile.in: added dummy dvi target
+
+Wed Dec 16 11:26:16 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * inter_select.c (init_interact): if SCO is defined, use sysconf
+ to get maxfds, rather than getdtablesize.
+ * configure.in (*-*-sco*): Use mh-sco.
+ * mh-sco: New file; like mh-sysv, but pass -DSCO in HDEFS.
+
+Tue Nov 17 14:28:20 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * config/mh-{hpux,aix,irix4,sysv*}: updated with appropriate
+ values for the host machine (HDEFS, RANLIB, etc)
+
+ * configure.in: use that
+
+ * Makefile.in: use $(HDEFS) in compiling C files
+
+Sun Nov 15 21:46:16 1992 Fred Fish (fnf@cygnus.com)
+
+ * Update to base 3.24.0 release, merging back in changes made
+ by cygnus to 3.22.12 release.
+
+Sat Nov 14 20:16:26 1992 Fred Fish (fnf@cygnus.com)
+
+ * Makefile.in (CFLAGS): Rework use of CFLAGS to fit in better with
+ cygnus configuration standard.
+ * config/mh-svr4: Removed.
+ * config/mh-sysv4: New file, renamed from mh-svr4.
+ * configure.in (*-sysv4): New configuration.
+ * configure.in (*-sun-solaris2, *-sysv4): Use mh-sysv4.
+ * expect.c (sigwinch_handler): Fix #if without any condition.
+ * command.c, expect.c, global.h, lib_exp.c, main.c, term.h:
+ Test for SYSV4 as well as SYSV3.
+ * inter_select.c (sys/sysconfig.h): Include when SYSV4 defined.
+ * inter_select.c (init_interact): Add sysconf call for SYSV4.
+ * pty_svr4.c (ptsname): Declare for SYSV4.
+
+Thu Oct 22 17:35:07 1992 Rob Savoye (rob@cygnus.com)
+
+ * command.c: Added a "send_log" command. It only writes to a log
+ file if one was opened by the "log_file" command.
+
+ * main.c: Added setbuf commands for stdin, stdout, stderr to turn
+ off buffering.
+
diff --git a/Dbg.c b/Dbg.c
new file mode 100644
index 0000000..c7689e5
--- /dev/null
+++ b/Dbg.c
@@ -0,0 +1,1470 @@
+/* Dbg.c - Tcl Debugger - See cmdHelp() for commands
+
+Written by: Don Libes, NIST, 3/23/93
+
+Design and implementation of this program was paid for by U.S. tax
+dollars. Therefore it is public domain. However, the author and NIST
+would appreciate credit if this program or parts of it are used.
+
+*/
+
+#include <stdio.h>
+
+#ifndef HAVE_STRCHR
+#define strchr(s,c) index(s,c)
+#endif /* HAVE_STRCHR */
+
+#if 0
+/* tclInt.h drags in stdlib. By claiming no-stdlib, force it to drag in */
+/* Tcl's compat version. This avoids having to test for its presence */
+/* which is too tricky - configure can't generate two cf files, so when */
+/* Expect (or any app) uses the debugger, there's no way to get the info */
+/* about whether stdlib exists or not, except pointing the debugger at */
+/* an app-dependent .h file and I don't want to do that. */
+#define NO_STDLIB_H
+#endif
+
+
+#include "tclInt.h"
+/*#include <varargs.h> tclInt.h drags in varargs.h. Since Pyramid */
+/* objects to including varargs.h twice, just */
+/* omit this one. */
+/*#include "string.h" tclInt.h drags this in, too! */
+#include "tcldbg.h"
+
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+
+static int simple_interactor (Tcl_Interp *interp, ClientData data);
+static int zero (Tcl_Interp *interp, char *string);
+
+/* most of the static variables in this file may be */
+/* moved into Tcl_Interp */
+
+static Dbg_InterProc *interactor = &simple_interactor;
+static ClientData interdata = 0;
+static Dbg_IgnoreFuncsProc *ignoreproc = &zero;
+static Dbg_OutputProc *printproc = 0;
+static ClientData printdata = 0;
+static int stdinmode;
+
+static void print _ANSI_ARGS_(TCL_VARARGS(Tcl_Interp *,interp));
+
+static int debugger_active = FALSE;
+
+/* this is not externally documented anywhere as of yet */
+char *Dbg_VarName = "dbg";
+
+#define DEFAULT_COMPRESS 0
+static int compress = DEFAULT_COMPRESS;
+#define DEFAULT_WIDTH 75 /* leave a little space for printing */
+ /* stack level */
+static int buf_width = DEFAULT_WIDTH;
+
+static int main_argc = 1;
+static char *default_argv = "application";
+static char **main_argv = &default_argv;
+
+static Tcl_Trace debug_handle;
+static int step_count = 1; /* count next/step */
+
+#define FRAMENAMELEN 10 /* enough to hold strings like "#4" */
+static char viewFrameName[FRAMENAMELEN];/* destination frame name for up/down */
+
+static CallFrame *goalFramePtr; /* destination for next/return */
+static int goalNumLevel; /* destination for Next */
+
+static enum debug_cmd {
+ none, step, next, ret, cont, up, down, where, Next
+} debug_cmd = step;
+
+/* info about last action to use as a default */
+static enum debug_cmd last_action_cmd = next;
+static int last_step_count = 1;
+
+/* this acts as a strobe (while testing breakpoints). It is set to true */
+/* every time a new debugger command is issued that is an action */
+static int debug_new_action;
+
+#define NO_LINE -1 /* if break point is not set by line number */
+
+struct breakpoint {
+ int id;
+ Tcl_Obj *file; /* file where breakpoint is */
+ int line; /* line where breakpoint is */
+ int re; /* 1 if this is regexp pattern */
+ Tcl_Obj *pat; /* pattern defining where breakpoint can be */
+ Tcl_Obj *expr; /* expr to trigger breakpoint */
+ Tcl_Obj *cmd; /* cmd to eval at breakpoint */
+ struct breakpoint *next, *previous;
+};
+
+static struct breakpoint *break_base = 0;
+static int breakpoint_max_id = 0;
+
+static struct breakpoint *
+breakpoint_new()
+{
+ struct breakpoint *b = (struct breakpoint *)ckalloc(sizeof(struct breakpoint));
+ if (break_base) break_base->previous = b;
+ b->next = break_base;
+ b->previous = 0;
+ b->id = breakpoint_max_id++;
+ b->file = 0;
+ b->line = NO_LINE;
+ b->pat = 0;
+ b->re = 0;
+ b->expr = 0;
+ b->cmd = 0;
+ break_base = b;
+ return(b);
+}
+
+static
+void
+breakpoint_print(interp,b)
+Tcl_Interp *interp;
+struct breakpoint *b;
+{
+ print(interp,"breakpoint %d: ",b->id);
+
+ if (b->re) {
+ print(interp,"-re \"%s\" ",Tcl_GetString(b->pat));
+ } else if (b->pat) {
+ print(interp,"-glob \"%s\" ",Tcl_GetString(b->pat));
+ } else if (b->line != NO_LINE) {
+ if (b->file) {
+ print(interp,"%s:",Tcl_GetString(b->file));
+ }
+ print(interp,"%d ",b->line);
+ }
+
+ if (b->expr)
+ print(interp,"if {%s} ",Tcl_GetString(b->expr));
+
+ if (b->cmd)
+ print(interp,"then {%s}",Tcl_GetString(b->cmd));
+
+ print(interp,"\n");
+}
+
+static void
+save_re_matches(interp, re, objPtr)
+Tcl_Interp *interp;
+Tcl_RegExp re;
+Tcl_Obj *objPtr;
+{
+ Tcl_RegExpInfo info;
+ int i, start;
+ char name[20];
+
+ Tcl_RegExpGetInfo(re, &info);
+ for (i=0;i<=info.nsubs;i++) {
+ start = info.matches[i].start;
+ /* end = info.matches[i].end-1;*/
+
+ if (start == -1) continue;
+
+ sprintf(name,"%d",i);
+ Tcl_SetVar2Ex(interp, Dbg_VarName, name, Tcl_GetRange(objPtr,
+ info.matches[i].start, info.matches[i].end-1), 0);
+ }
+}
+
+/* return 1 to break, 0 to continue */
+static int
+breakpoint_test(interp,cmd,bp)
+Tcl_Interp *interp;
+char *cmd; /* command about to be executed */
+struct breakpoint *bp; /* breakpoint to test */
+{
+ if (bp->re) {
+ int found = 0;
+ Tcl_Obj *cmdObj;
+ Tcl_RegExp re = Tcl_GetRegExpFromObj(NULL, bp->pat,
+ TCL_REG_ADVANCED);
+ cmdObj = Tcl_NewStringObj(cmd,-1);
+ Tcl_IncrRefCount(cmdObj);
+ if (Tcl_RegExpExecObj(NULL, re, cmdObj, 0 /* offset */,
+ -1 /* nmatches */, 0 /* eflags */) > 0) {
+ save_re_matches(interp, re, cmdObj);
+ found = 1;
+ }
+ Tcl_DecrRefCount(cmdObj);
+ if (!found) return 0;
+ } else if (bp->pat) {
+ if (0 == Tcl_StringMatch(cmd,
+ Tcl_GetString(bp->pat))) return 0;
+ } else if (bp->line != NO_LINE) {
+ /* not yet implemented - awaiting support from Tcl */
+ return 0;
+ }
+
+ if (bp->expr) {
+ int value;
+
+ /* ignore errors, since they are likely due to */
+ /* simply being out of scope a lot */
+ if (TCL_OK != Tcl_ExprBooleanObj(interp,bp->expr,&value)
+ || (value == 0)) return 0;
+ }
+
+ if (bp->cmd) {
+ Tcl_EvalObjEx(interp, bp->cmd, 0);
+ } else {
+ breakpoint_print(interp,bp);
+ }
+
+ return 1;
+}
+
+static char *already_at_top_level = "already at top level";
+
+/* similar to TclGetFrame but takes two frame ptrs and a direction.
+If direction is up, search up stack from curFrame
+If direction is down, simulate searching down stack by
+ seaching up stack from origFrame
+*/
+static
+int
+TclGetFrame2(interp, origFramePtr, string, framePtrPtr, dir)
+ Tcl_Interp *interp;
+ CallFrame *origFramePtr; /* frame that is true top-of-stack */
+ char *string; /* String describing frame. */
+ CallFrame **framePtrPtr; /* Store pointer to frame here (or NULL
+ * if global frame indicated). */
+ enum debug_cmd dir; /* look up or down the stack */
+{
+ Interp *iPtr = (Interp *) interp;
+ int level, result;
+ CallFrame *framePtr; /* frame currently being searched */
+
+ CallFrame *curFramePtr = iPtr->varFramePtr;
+
+ /*
+ * Parse string to figure out which level number to go to.
+ */
+
+ result = 1;
+ if (*string == '#') {
+ if (Tcl_GetInt(interp, string+1, &level) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (level < 0) {
+ levelError:
+ Tcl_AppendResult(interp, "bad level \"", string, "\"",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+ framePtr = origFramePtr; /* start search here */
+
+ } else if (isdigit(*string)) {
+ if (Tcl_GetInt(interp, string, &level) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (dir == up) {
+ if (curFramePtr == 0) {
+ Tcl_SetResult(interp,already_at_top_level,TCL_STATIC);
+ return TCL_ERROR;
+ }
+ level = curFramePtr->level - level;
+ framePtr = curFramePtr; /* start search here */
+ } else {
+ if (curFramePtr != 0) {
+ level = curFramePtr->level + level;
+ }
+ framePtr = origFramePtr; /* start search here */
+ }
+ } else {
+ level = curFramePtr->level - 1;
+ result = 0;
+ }
+
+ /*
+ * Figure out which frame to use.
+ */
+
+ if (level == 0) {
+ framePtr = NULL;
+ } else {
+ for (;framePtr != NULL; framePtr = framePtr->callerVarPtr) {
+ if (framePtr->level == level) {
+ break;
+ }
+ }
+ if (framePtr == NULL) {
+ goto levelError;
+ }
+ }
+ *framePtrPtr = framePtr;
+ return result;
+}
+
+
+static char *printify(s)
+char *s;
+{
+ static int destlen = 0;
+ char *d; /* ptr into dest */
+ unsigned int need;
+ static char buf_basic[DEFAULT_WIDTH+1];
+ static char *dest = buf_basic;
+ Tcl_UniChar ch;
+
+ if (s == 0) return("<null>");
+
+ /* worst case is every character takes 4 to printify */
+ need = strlen(s)*6;
+ if (need > destlen) {
+ if (dest && (dest != buf_basic)) ckfree(dest);
+ dest = (char *)ckalloc(need+1);
+ destlen = need;
+ }
+
+ for (d = dest;*s;) {
+ s += Tcl_UtfToUniChar(s, &ch);
+ if (ch == '\b') {
+ strcpy(d,"\\b"); d += 2;
+ } else if (ch == '\f') {
+ strcpy(d,"\\f"); d += 2;
+ } else if (ch == '\v') {
+ strcpy(d,"\\v"); d += 2;
+ } else if (ch == '\r') {
+ strcpy(d,"\\r"); d += 2;
+ } else if (ch == '\n') {
+ strcpy(d,"\\n"); d += 2;
+ } else if (ch == '\t') {
+ strcpy(d,"\\t"); d += 2;
+ } else if ((unsigned)ch < 0x20) { /* unsigned strips parity */
+ sprintf(d,"\\%03o",ch); d += 4;
+ } else if (ch == 0177) {
+ strcpy(d,"\\177"); d += 4;
+ } else if ((ch < 0x80) && isprint(UCHAR(ch))) {
+ *d = (char)ch; d += 1;
+ } else {
+ sprintf(d,"\\u%04x",ch); d += 6;
+ }
+ }
+ *d = '\0';
+ return(dest);
+}
+
+static
+char *
+print_argv(interp,argc,argv)
+Tcl_Interp *interp;
+int argc;
+char *argv[];
+{
+ static int buf_width_max = DEFAULT_WIDTH;
+ static char buf_basic[DEFAULT_WIDTH+1]; /* basic buffer */
+ static char *buf = buf_basic;
+ int space; /* space remaining in buf */
+ int len;
+ char *bufp;
+ int proc; /* if current command is "proc" */
+ int arg_index;
+
+ if (buf_width > buf_width_max) {
+ if (buf && (buf != buf_basic)) ckfree(buf);
+ buf = (char *)ckalloc(buf_width + 1);
+ buf_width_max = buf_width;
+ }
+
+ proc = (0 == strcmp("proc",argv[0]));
+ sprintf(buf,"%.*s",buf_width,argv[0]);
+ len = strlen(buf);
+ space = buf_width - len;
+ bufp = buf + len;
+ argc--; argv++;
+ arg_index = 1;
+
+ while (argc && (space > 0)) {
+ CONST char *elementPtr;
+ CONST char *nextPtr;
+ int wrap;
+
+ /* braces/quotes have been stripped off arguments */
+ /* so put them back. We wrap everything except lists */
+ /* with one argument. One exception is to always wrap */
+ /* proc's 2nd arg (the arg list), since people are */
+ /* used to always seeing it this way. */
+
+ if (proc && (arg_index > 1)) wrap = TRUE;
+ else {
+ (void) TclFindElement(interp,*argv,
+#if TCL_MAJOR_VERSION >= 8
+ -1,
+#endif
+ &elementPtr,&nextPtr,(int *)0,(int *)0);
+ if (*elementPtr == '\0') wrap = TRUE;
+ else if (*nextPtr == '\0') wrap = FALSE;
+ else wrap = TRUE;
+ }
+
+ /* wrap lists (or null) in braces */
+ if (wrap) {
+ sprintf(bufp," {%.*s}",space-3,*argv);
+ } else {
+ sprintf(bufp," %.*s",space-1,*argv);
+ }
+ len = strlen(buf);
+ space = buf_width - len;
+ bufp = buf + len;
+ argc--; argv++;
+ arg_index++;
+ }
+
+ if (compress) {
+ /* this copies from our static buf to printify's static buf */
+ /* and back to our static buf */
+ strncpy(buf,printify(buf),buf_width);
+ }
+
+ /* usually but not always right, but assume truncation if buffer is */
+ /* full. this avoids tiny but odd-looking problem of appending "}" */
+ /* to truncated lists during {}-wrapping earlier */
+ if (strlen(buf) == buf_width) {
+ buf[buf_width-1] = buf[buf_width-2] = buf[buf_width-3] = '.';
+ }
+
+ return(buf);
+}
+
+#if TCL_MAJOR_VERSION >= 8
+static
+char *
+print_objv(interp,objc,objv)
+Tcl_Interp *interp;
+int objc;
+Tcl_Obj *objv[];
+{
+ char **argv;
+ int argc;
+ int len;
+ argv = (char **)ckalloc(objc+1 * sizeof(char *));
+ for (argc=0 ; argc<objc ; argc++) {
+ argv[argc] = Tcl_GetStringFromObj(objv[argc],&len);
+ }
+ argv[argc] = NULL;
+ return(print_argv(interp,argc,argv));
+}
+#endif
+
+static
+void
+PrintStackBelow(interp,curf,viewf)
+Tcl_Interp *interp;
+CallFrame *curf; /* current FramePtr */
+CallFrame *viewf; /* view FramePtr */
+{
+ char ptr; /* graphically indicate where we are in the stack */
+
+ /* indicate where we are in the stack */
+ ptr = ((curf == viewf)?'*':' ');
+
+ if (curf == 0) {
+ print(interp,"%c0: %s\n",
+ ptr,print_argv(interp,main_argc,main_argv));
+ } else {
+ PrintStackBelow(interp,curf->callerVarPtr,viewf);
+ print(interp,"%c%d: %s\n",ptr,curf->level,
+#if TCL_MAJOR_VERSION >= 8
+ print_objv(interp,curf->objc,curf->objv)
+#else
+ print_argv(interp,curf->argc,curf->argv)
+#endif
+ );
+ }
+}
+
+static
+void
+PrintStack(interp,curf,viewf,objc,objv,level)
+Tcl_Interp *interp;
+CallFrame *curf; /* current FramePtr */
+CallFrame *viewf; /* view FramePtr */
+ int objc;
+ Tcl_Obj *CONST objv[]; /* Argument objects. */
+char *level;
+{
+ PrintStackBelow(interp,curf,viewf);
+ print(interp," %s: %s\n",level,print_objv(interp,objc,objv));
+}
+
+/* return 0 if goal matches current frame or goal can't be found */
+/* anywere in frame stack */
+/* else return 1 */
+/* This catches things like a proc called from a Tcl_Eval which in */
+/* turn was not called from a proc but some builtin such as source */
+/* or Tcl_Eval. These builtin calls to Tcl_Eval lose any knowledge */
+/* the FramePtr from the proc, so we have to search the entire */
+/* stack frame to see if it's still there. */
+static int
+GoalFrame(goal,iptr)
+CallFrame *goal;
+Interp *iptr;
+{
+ CallFrame *cf = iptr->varFramePtr;
+
+ /* if at current level, return success immediately */
+ if (goal == cf) return 0;
+
+ while (cf) {
+ cf = cf->callerVarPtr;
+ if (goal == cf) {
+ /* found, but since it's above us, fail */
+ return 1;
+ }
+ }
+ return 0;
+}
+
+#if 0
+static char *cmd_print(cmdtype)
+enum debug_cmd cmdtype;
+{
+ switch (cmdtype) {
+ case none: return "cmd: none";
+ case step: return "cmd: step";
+ case next: return "cmd: next";
+ case ret: return "cmd: ret";
+ case cont: return "cmd: cont";
+ case up: return "cmd: up";
+ case down: return "cmd: down";
+ case where: return "cmd: where";
+ case Next: return "cmd: Next";
+ }
+ return "cmd: Unknown";
+}
+#endif
+
+/* debugger's trace handler */
+
+static int
+debugger_trap _ANSI_ARGS_ ((
+ ClientData clientData,
+ Tcl_Interp *interp,
+ int level,
+ CONST char *command,
+ Tcl_Command commandInfo,
+ int objc,
+ struct Tcl_Obj * CONST * objv));
+
+
+/*ARGSUSED*/
+static int
+debugger_trap(clientData,interp,level,command,commandInfo,objc,objv)
+ ClientData clientData; /* not used */
+ Tcl_Interp *interp;
+ int level; /* positive number if called by Tcl, -1 if */
+ /* called by Dbg_On in which case we don't */
+ /* know the level */
+ CONST char *command;
+ Tcl_Command commandInfo; /* Unused */
+ int objc;
+ struct Tcl_Obj * CONST * objv;
+{
+ char level_text[6]; /* textual representation of level */
+
+ int break_status;
+ Interp *iPtr = (Interp *)interp;
+
+ CallFrame *trueFramePtr; /* where the pc is */
+ CallFrame *viewFramePtr; /* where up/down are */
+
+ int print_command_first_time = TRUE;
+ static int debug_suspended = FALSE;
+
+ struct breakpoint *b;
+
+ char* thecmd;
+
+ /* skip commands that are invoked interactively */
+ if (debug_suspended) return TCL_OK;
+
+ thecmd = Tcl_GetString (objv[0]);
+ /* skip debugger commands */
+ if (thecmd[1] == '\0') {
+ switch (thecmd[0]) {
+ case 'n':
+ case 's':
+ case 'c':
+ case 'r':
+ case 'w':
+ case 'b':
+ case 'u':
+ case 'd': return TCL_OK;
+ }
+ }
+
+ if ((*ignoreproc)(interp,thecmd)) return TCL_OK;
+
+ /* if level is unknown, use "?" */
+ sprintf(level_text,(level == -1)?"?":"%d",level);
+
+ /* save so we can restore later */
+ trueFramePtr = iPtr->varFramePtr;
+
+ /* do not allow breaking while testing breakpoints */
+ debug_suspended = TRUE;
+
+ /* test all breakpoints to see if we should break */
+ /* if any successful breakpoints, start interactor */
+ debug_new_action = FALSE; /* reset strobe */
+ break_status = FALSE; /* no successful breakpoints yet */
+ for (b = break_base;b;b=b->next) {
+ break_status |= breakpoint_test(interp,command,b);
+ }
+ if (break_status) {
+ if (!debug_new_action) {
+ goto start_interact;
+ }
+
+ /* if s or n triggered by breakpoint, make "s 1" */
+ /* (and so on) refer to next command, not this one */
+ /* step_count++;*/
+ goto end_interact;
+ }
+
+ switch (debug_cmd) {
+ case cont:
+ goto finish;
+ case step:
+ step_count--;
+ if (step_count > 0) goto finish;
+ goto start_interact;
+ case next:
+ /* check if we are back at the same level where the next */
+ /* command was issued. Also test */
+ /* against all FramePtrs and if no match, assume that */
+ /* we've missed a return, and so we should break */
+/* if (goalFramePtr != iPtr->varFramePtr) goto finish;*/
+ if (GoalFrame(goalFramePtr,iPtr)) goto finish;
+ step_count--;
+ if (step_count > 0) goto finish;
+ goto start_interact;
+ case Next:
+ /* check if we are back at the same level where the next */
+ /* command was issued. */
+ if (goalNumLevel < iPtr->numLevels) goto finish;
+ step_count--;
+ if (step_count > 0) goto finish;
+ goto start_interact;
+ case ret:
+ /* same comment as in "case next" */
+ if (goalFramePtr != iPtr->varFramePtr) goto finish;
+ goto start_interact;
+ /* DANGER: unhandled cases! none, up, down, where */
+ }
+
+start_interact:
+ if (print_command_first_time) {
+ print(interp,"%s: %s\n",
+ level_text,print_argv(interp,1,&command));
+ print_command_first_time = FALSE;
+ }
+ /* since user is typing a command, don't interrupt it immediately */
+ debug_cmd = cont;
+ debug_suspended = TRUE;
+
+ /* interactor won't return until user gives a debugger cmd */
+ (*interactor)(interp,interdata);
+end_interact:
+
+ /* save this so it can be restored after "w" command */
+ viewFramePtr = iPtr->varFramePtr;
+
+ if (debug_cmd == up || debug_cmd == down) {
+ /* calculate new frame */
+ if (-1 == TclGetFrame2(interp,trueFramePtr,viewFrameName,
+ &iPtr->varFramePtr,debug_cmd)) {
+ print(interp,"%s\n",Tcl_GetStringResult (interp));
+ Tcl_ResetResult(interp);
+ }
+ goto start_interact;
+ }
+
+ /* reset view back to normal */
+ iPtr->varFramePtr = trueFramePtr;
+
+#if 0
+ /* allow trapping */
+ debug_suspended = FALSE;
+#endif
+
+ switch (debug_cmd) {
+ case cont:
+ case step:
+ goto finish;
+ case next:
+ goalFramePtr = iPtr->varFramePtr;
+ goto finish;
+ case Next:
+ goalNumLevel = iPtr->numLevels;
+ goto finish;
+ case ret:
+ goalFramePtr = iPtr->varFramePtr;
+ if (goalFramePtr == 0) {
+ print(interp,"nowhere to return to\n");
+ break;
+ }
+ goalFramePtr = goalFramePtr->callerVarPtr;
+ goto finish;
+ case where:
+ PrintStack(interp,iPtr->varFramePtr,viewFramePtr,objc,objv,level_text);
+ break;
+ }
+
+ /* restore view and restart interactor */
+ iPtr->varFramePtr = viewFramePtr;
+ goto start_interact;
+
+ finish:
+ debug_suspended = FALSE;
+ return TCL_OK;
+}
+
+/*ARGSUSED*/
+static
+int
+cmdNext(clientData, interp, objc, objv)
+ClientData clientData;
+Tcl_Interp *interp;
+ int objc;
+ Tcl_Obj *CONST objv[]; /* Argument objects. */
+{
+ debug_new_action = TRUE;
+ debug_cmd = *(enum debug_cmd *)clientData;
+
+ last_action_cmd = debug_cmd;
+
+ if (objc == 1) {
+ step_count = 1;
+ } else if (TCL_OK != Tcl_GetIntFromObj (interp, objv[1], &step_count)) {
+ return TCL_ERROR;
+ }
+
+ last_step_count = step_count;
+ return(TCL_RETURN);
+}
+
+/*ARGSUSED*/
+static
+int
+cmdDir(clientData, interp, objc, objv)
+ClientData clientData;
+Tcl_Interp *interp;
+ int objc;
+ Tcl_Obj *CONST objv[]; /* Argument objects. */
+{
+ char* frame;
+ debug_cmd = *(enum debug_cmd *)clientData;
+
+ if (objc == 1) {
+ frame = "1";
+ } else {
+ frame = Tcl_GetString (objv[1]);
+ }
+
+ strncpy(viewFrameName,frame,FRAMENAMELEN);
+ return TCL_RETURN;
+}
+
+/*ARGSUSED*/
+static
+int
+cmdSimple(clientData, interp, objc, objv)
+ClientData clientData;
+Tcl_Interp *interp;
+ int objc;
+ Tcl_Obj *CONST objv[]; /* Argument objects. */
+{
+ debug_new_action = TRUE;
+ debug_cmd = *(enum debug_cmd *)clientData;
+ last_action_cmd = debug_cmd;
+
+ return TCL_RETURN;
+}
+
+static
+void
+breakpoint_destroy(b)
+struct breakpoint *b;
+{
+ if (b->file) Tcl_DecrRefCount(b->file);
+ if (b->pat) Tcl_DecrRefCount(b->pat);
+ if (b->cmd) Tcl_DecrRefCount(b->cmd);
+ if (b->expr) Tcl_DecrRefCount(b->expr);
+
+ /* unlink from chain */
+ if ((b->previous == 0) && (b->next == 0)) {
+ break_base = 0;
+ } else if (b->previous == 0) {
+ break_base = b->next;
+ b->next->previous = 0;
+ } else if (b->next == 0) {
+ b->previous->next = 0;
+ } else {
+ b->previous->next = b->next;
+ b->next->previous = b->previous;
+ }
+
+ ckfree((char *)b);
+}
+
+static void
+savestr(objPtr,str)
+Tcl_Obj **objPtr;
+char *str;
+{
+ *objPtr = Tcl_NewStringObj(str, -1);
+ Tcl_IncrRefCount(*objPtr);
+}
+
+/*ARGSUSED*/
+static
+int
+cmdWhere(clientData, interp, objc, objv)
+ClientData clientData;
+Tcl_Interp *interp;
+ int objc;
+ Tcl_Obj *CONST objv[]; /* Argument objects. */
+{
+ static char* options [] = {
+ "-compress",
+ "-width",
+ NULL
+ };
+ enum options {
+ WHERE_COMPRESS,
+ WHERE_WIDTH
+ };
+ int i;
+
+ if (objc == 1) {
+ debug_cmd = where;
+ return TCL_RETURN;
+ }
+
+ /* Check and process switches */
+
+ for (i=1; i<objc; i++) {
+ char *name;
+ int index;
+
+ name = Tcl_GetString(objv[i]);
+ if (name[0] != '-') {
+ break;
+ }
+ if (Tcl_GetIndexFromObj(interp, objv[i], options, "flag", 0,
+ &index) != TCL_OK) {
+ goto usage;
+ }
+ switch ((enum options) index) {
+ case WHERE_COMPRESS:
+ i++;
+ if (i >= objc) {
+ print(interp,"%d\n",compress);
+ break;
+ }
+ if (TCL_OK != Tcl_GetBooleanFromObj (interp, objv[i], &buf_width))
+ goto usage;
+ break;
+ case WHERE_WIDTH:
+ i++;
+ if (i >= objc) {
+ print(interp,"%d\n",buf_width);
+ break;
+ }
+ if (TCL_OK != Tcl_GetIntFromObj (interp, objv[i], &buf_width))
+ goto usage;
+ break;
+ }
+ }
+
+ if (i < objc) goto usage;
+
+ return TCL_OK;
+
+ usage:
+ print(interp,"usage: w [-width #] [-compress 0|1]\n");
+ return TCL_ERROR;
+}
+
+#define breakpoint_fail(msg) {error_msg = msg; goto break_fail;}
+
+/*ARGSUSED*/
+static
+int
+cmdBreak(clientData, interp, objc, objv)
+ClientData clientData;
+Tcl_Interp *interp;
+ int objc;
+ Tcl_Obj *CONST objv[]; /* Argument objects. */
+{
+ struct breakpoint *b;
+ char *error_msg;
+
+ static char* options [] = {
+ "-glob",
+ "-regexp",
+ "if",
+ "then",
+ NULL
+ };
+ enum options {
+ BREAK_GLOB,
+ BREAK_RE,
+ BREAK_IF,
+ BREAK_THEN
+ };
+ int i;
+ int index;
+
+
+ /* No arguments, list breakpoints */
+ if (objc == 1) {
+ for (b = break_base;b;b=b->next) breakpoint_print(interp,b);
+ return(TCL_OK);
+ }
+
+ /* Process breakpoint deletion (-, -x) */
+
+ /* Copied from exp_prog.h */
+#define streq(x,y) (0 == strcmp((x),(y)))
+
+ if (objc == 2) {
+ int id;
+
+ if (streq (Tcl_GetString (objv[1]),"-")) {
+ while (break_base) {
+ breakpoint_destroy(break_base);
+ }
+ breakpoint_max_id = 0;
+ return(TCL_OK);
+ }
+
+ if ((Tcl_GetString (objv[1])[0] == '-') &&
+ (TCL_OK == Tcl_GetIntFromObj (interp, objv[1], &id))) {
+ id = -id;
+
+ for (b = break_base;b;b=b->next) {
+ if (b->id == id) {
+ breakpoint_destroy(b);
+ if (!break_base) breakpoint_max_id = 0;
+ return(TCL_OK);
+ }
+ }
+ Tcl_SetResult(interp,"no such breakpoint",TCL_STATIC);
+ return(TCL_ERROR);
+ }
+ }
+
+ b = breakpoint_new();
+
+ /* Process switches */
+
+ i = 1;
+ if (Tcl_GetIndexFromObj(interp, objv[i], options, "flag", 0,
+ &index) == TCL_OK) {
+ switch ((enum options) index) {
+ case BREAK_GLOB:
+ i++;
+ if (i == objc) breakpoint_fail("no pattern?");
+ savestr(&b->pat,Tcl_GetString (objv[i]));
+ i++;
+ break;
+ case BREAK_RE:
+ i++;
+ if (i == objc) breakpoint_fail("bad regular expression");
+ b->re = 1;
+ savestr(&b->pat,Tcl_GetString (objv[i]));
+ if (Tcl_GetRegExpFromObj(interp, b->pat, TCL_REG_ADVANCED) == NULL) {
+ breakpoint_destroy(b);
+ return TCL_ERROR;
+ }
+ i++;
+ break;
+ case BREAK_IF: break;
+ case BREAK_THEN: break;
+ }
+ } else {
+ /* look for [file:]line */
+ char *colon;
+ char *linep; /* pointer to beginning of line number */
+ char* ref = Tcl_GetString (objv[i]);
+ colon = strchr(ref,':');
+ if (colon) {
+ *colon = '\0';
+ savestr(&b->file,ref);
+ *colon = ':';
+ linep = colon + 1;
+ } else {
+ linep = ref;
+ /* get file from current scope */
+ /* savestr(&b->file, ?); */
+ }
+
+ if (TCL_OK == Tcl_GetInt(interp,linep,&b->line)) {
+ i++;
+ print(interp,"setting breakpoints by line number is currently unimplemented - use patterns or expressions\n");
+ } else {
+ /* not an int? - unwind & assume it is an expression */
+
+ if (b->file) Tcl_DecrRefCount(b->file);
+ }
+
+ }
+
+ if (i < objc) {
+ int do_if = FALSE;
+
+ if (Tcl_GetIndexFromObj(interp, objv[i], options, "flag", 0,
+ &index) == TCL_OK) {
+ switch ((enum options) index) {
+ case BREAK_IF:
+ i++;
+ do_if = TRUE;
+ /* Consider next word as expression */
+ break;
+ case BREAK_THEN:
+ /* No 'if expression' guard here, do nothing */
+ break;
+ case BREAK_GLOB:
+ case BREAK_RE:
+ do_if = TRUE;
+ /* Consider current word as expression, without a preceding 'if' */
+ break;
+ }
+ } else {
+ /* Consider current word as expression, without a preceding 'if' */
+ do_if = TRUE;
+ }
+
+ if (do_if) {
+ if (i == objc) breakpoint_fail("if what");
+ savestr(&b->expr,Tcl_GetString (objv[i]));
+ i++;
+ }
+ }
+
+ if (i < objc) {
+ /* Remainder is a command */
+ if (Tcl_GetIndexFromObj(interp, objv[i], options, "flag", 0,
+ &index) == TCL_OK) {
+ switch ((enum options) index) {
+ case BREAK_THEN:
+ i++;
+ break;
+ case BREAK_IF:
+ case BREAK_GLOB:
+ case BREAK_RE:
+ break;
+ }
+ }
+
+ if (i == objc) breakpoint_fail("then what?");
+
+ savestr(&b->cmd,Tcl_GetString (objv[i]));
+ }
+
+ Tcl_SetObjResult (interp, Tcl_NewIntObj (b->id));
+ return(TCL_OK);
+
+ break_fail:
+ breakpoint_destroy(b);
+ Tcl_SetResult(interp,error_msg,TCL_STATIC);
+ return(TCL_ERROR);
+}
+
+static char *help[] = {
+"s [#] step into procedure",
+"n [#] step over procedure",
+"N [#] step over procedures, commands, and arguments",
+"c continue",
+"r continue until return to caller",
+"u [#] move scope up level",
+"d [#] move scope down level",
+" go to absolute frame if # is prefaced by \"#\"",
+"w show stack (\"where\")",
+"w -w [#] show/set width",
+"w -c [0|1] show/set compress",
+"b show breakpoints",
+"b [-r regexp-pattern] [if expr] [then command]",
+"b [-g glob-pattern] [if expr] [then command]",
+"b [[file:]#] [if expr] [then command]",
+" if pattern given, break if command resembles pattern",
+" if # given, break on line #",
+" if expr given, break if expr true",
+" if command given, execute command at breakpoint",
+"b -# delete breakpoint",
+"b - delete all breakpoints",
+0};
+
+/*ARGSUSED*/
+static
+int
+cmdHelp(clientData, interp, objc, objv)
+ClientData clientData;
+Tcl_Interp *interp;
+ int objc;
+ Tcl_Obj *CONST objv[]; /* Argument objects. */
+{
+ char **hp;
+
+ for (hp=help;*hp;hp++) {
+ print(interp,"%s\n",*hp);
+ }
+
+ return(TCL_OK);
+}
+
+/* occasionally, we print things larger buf_max but not by much */
+/* see print statements in PrintStack routines for examples */
+#define PAD 80
+
+/*VARARGS*/
+static void
+print TCL_VARARGS_DEF(Tcl_Interp *,arg1)
+{
+ Tcl_Interp *interp;
+ char *fmt;
+ va_list args;
+
+ interp = TCL_VARARGS_START(Tcl_Interp *,arg1,args);
+ fmt = va_arg(args,char *);
+ if (!printproc) vprintf(fmt,args);
+ else {
+ static int buf_width_max = DEFAULT_WIDTH+PAD;
+ static char buf_basic[DEFAULT_WIDTH+PAD+1];
+ static char *buf = buf_basic;
+
+ if (buf_width+PAD > buf_width_max) {
+ if (buf && (buf != buf_basic)) ckfree(buf);
+ buf = (char *)ckalloc(buf_width+PAD+1);
+ buf_width_max = buf_width+PAD;
+ }
+
+ vsprintf(buf,fmt,args);
+ (*printproc)(interp,buf,printdata);
+ }
+ va_end(args);
+}
+
+/*ARGSUSED*/
+Dbg_InterStruct
+Dbg_Interactor(interp,inter_proc,data)
+Tcl_Interp *interp;
+Dbg_InterProc *inter_proc;
+ClientData data;
+{
+ Dbg_InterStruct tmp;
+
+ tmp.func = interactor;
+ tmp.data = interdata;
+ interactor = (inter_proc?inter_proc:simple_interactor);
+ interdata = data;
+ return tmp;
+}
+
+/*ARGSUSED*/
+Dbg_IgnoreFuncsProc *
+Dbg_IgnoreFuncs(interp,proc)
+Tcl_Interp *interp;
+Dbg_IgnoreFuncsProc *proc;
+{
+ Dbg_IgnoreFuncsProc *tmp = ignoreproc;
+ ignoreproc = (proc?proc:zero);
+ return tmp;
+}
+
+/*ARGSUSED*/
+Dbg_OutputStruct
+Dbg_Output(interp,proc,data)
+Tcl_Interp *interp;
+Dbg_OutputProc *proc;
+ClientData data;
+{
+ Dbg_OutputStruct tmp;
+
+ tmp.func = printproc;
+ tmp.data = printdata;
+ printproc = proc;
+ printdata = data;
+ return tmp;
+}
+
+/*ARGSUSED*/
+int
+Dbg_Active(interp)
+Tcl_Interp *interp;
+{
+ return debugger_active;
+}
+
+char **
+Dbg_ArgcArgv(argc,argv,copy)
+int argc;
+char *argv[];
+int copy;
+{
+ char **alloc;
+
+ main_argc = argc;
+
+ if (!copy) {
+ main_argv = argv;
+ alloc = 0;
+ } else {
+ main_argv = alloc = (char **)ckalloc((argc+1)*sizeof(char *));
+ while (argc-- >= 0) {
+ *main_argv++ = *argv++;
+ }
+ main_argv = alloc;
+ }
+ return alloc;
+}
+
+static struct cmd_list {
+ char *cmdname;
+ Tcl_ObjCmdProc *cmdproc;
+ enum debug_cmd cmdtype;
+} cmd_list[] = {
+ {"n", cmdNext, next},
+ {"s", cmdNext, step},
+ {"N", cmdNext, Next},
+ {"c", cmdSimple, cont},
+ {"r", cmdSimple, ret},
+ {"w", cmdWhere, none},
+ {"b", cmdBreak, none},
+ {"u", cmdDir, up},
+ {"d", cmdDir, down},
+ {"h", cmdHelp, none},
+ {0}
+};
+
+/* this may seem excessive, but this avoids the explicit test for non-zero */
+/* in the caller, and chances are that that test will always be pointless */
+/*ARGSUSED*/
+static int
+zero (Tcl_Interp *interp, char *string)
+{
+ return 0;
+}
+
+extern int expSetBlockModeProc _ANSI_ARGS_((int fd, int mode));
+
+static int
+simple_interactor(Tcl_Interp *interp, ClientData data)
+{
+ int rc;
+ char *ccmd; /* pointer to complete command */
+ char line[BUFSIZ+1]; /* space for partial command */
+ int newcmd = TRUE;
+ Interp *iPtr = (Interp *)interp;
+
+ Tcl_DString dstring;
+ Tcl_DStringInit(&dstring);
+
+ /* Force blocking if necessary */
+
+ if (stdinmode == TCL_MODE_NONBLOCKING) {
+ expSetBlockModeProc(0, TCL_MODE_BLOCKING);
+ }
+
+ newcmd = TRUE;
+ while (TRUE) {
+ struct cmd_list *c;
+
+ if (newcmd) {
+#if TCL_MAJOR_VERSION < 8
+ print(interp,"dbg%d.%d> ",iPtr->numLevels,iPtr->curEventNum+1);
+#else
+ /* unncessarily tricky coding - if nextid
+ isn't defined, maintain our own static
+ version */
+
+ static int nextid = 0;
+ CONST char *nextidstr = Tcl_GetVar2(interp,"tcl::history","nextid",0);
+ if (nextidstr) {
+ sscanf(nextidstr,"%d",&nextid);
+ }
+ print(interp,"dbg%d.%d> ",iPtr->numLevels,nextid++);
+#endif
+ } else {
+ print(interp,"dbg+> ");
+ }
+ fflush(stdout);
+
+ rc = read(0,line,BUFSIZ);
+ if (0 >= rc) {
+ if (!newcmd) line[0] = 0;
+ else exit(0);
+ } else line[rc] = '\0';
+
+ ccmd = Tcl_DStringAppend(&dstring,line,rc);
+ if (!Tcl_CommandComplete(ccmd)) {
+ newcmd = FALSE;
+ continue; /* continue collecting command */
+ }
+ newcmd = TRUE;
+
+ /* if user pressed return with no cmd, use previous one */
+ if ((ccmd[0] == '\n' || ccmd[0] == '\r') && ccmd[1] == '\0') {
+
+ /* this loop is guaranteed to exit through break */
+ for (c = cmd_list;c->cmdname;c++) {
+ if (c->cmdtype == last_action_cmd) break;
+ }
+
+ /* recreate textual version of command */
+ Tcl_DStringAppend(&dstring,c->cmdname,-1);
+
+ if (c->cmdtype == step ||
+ c->cmdtype == next ||
+ c->cmdtype == Next) {
+ char num[10];
+
+ sprintf(num," %d",last_step_count);
+ Tcl_DStringAppend(&dstring,num,-1);
+ }
+ }
+
+#if TCL_MAJOR_VERSION == 7 && TCL_MINOR_VERSION < 4
+ rc = Tcl_RecordAndEval(interp,ccmd,0);
+#else
+ rc = Tcl_RecordAndEval(interp,ccmd,TCL_NO_EVAL);
+ rc = Tcl_Eval(interp,ccmd);
+#endif
+ Tcl_DStringFree(&dstring);
+
+ switch (rc) {
+ case TCL_OK:
+ {
+ char* res = Tcl_GetStringResult (interp);
+ if (*res != 0)
+ print(interp,"%s\n",res);
+ }
+ continue;
+ case TCL_ERROR:
+ print(interp,"%s\n",Tcl_GetVar(interp,"errorInfo",TCL_GLOBAL_ONLY));
+ /* since user is typing by hand, we expect lots
+ of errors, and want to give another chance */
+ continue;
+ case TCL_BREAK:
+ case TCL_CONTINUE:
+#define finish(x) {rc = x; goto done;}
+ finish(rc);
+ case TCL_RETURN:
+ finish(TCL_OK);
+ default:
+ /* note that ccmd has trailing newline */
+ print(interp,"error %d: %s\n",rc,ccmd);
+ continue;
+ }
+ }
+ /* cannot fall thru here, must jump to label */
+ done:
+ Tcl_DStringFree(&dstring);
+
+ /* Restore old blocking mode */
+ if (stdinmode == TCL_MODE_NONBLOCKING) {
+ expSetBlockModeProc(0, TCL_MODE_NONBLOCKING);
+ }
+ return(rc);
+}
+
+static char init_auto_path[] = "lappend auto_path $dbg_library";
+
+static void
+init_debugger(interp)
+Tcl_Interp *interp;
+{
+ struct cmd_list *c;
+
+ for (c = cmd_list;c->cmdname;c++) {
+ Tcl_CreateObjCommand(interp,c->cmdname,c->cmdproc,
+ (ClientData)&c->cmdtype,(Tcl_CmdDeleteProc *)0);
+ }
+
+ debug_handle = Tcl_CreateObjTrace(interp,10000,0,
+ debugger_trap,(ClientData)0, NULL);
+
+ debugger_active = TRUE;
+ Tcl_SetVar2(interp,Dbg_VarName,"active","1",0);
+#ifdef DBG_SCRIPTDIR
+ Tcl_SetVar(interp,"dbg_library",DBG_SCRIPTDIR,0);
+#endif
+ Tcl_Eval(interp,init_auto_path);
+
+}
+
+/* allows any other part of the application to jump to the debugger */
+/*ARGSUSED*/
+void
+Dbg_On(interp,immediate)
+Tcl_Interp *interp;
+int immediate; /* if true, stop immediately */
+ /* should only be used in safe places */
+ /* i.e., when Tcl_Eval can be called */
+{
+ if (!debugger_active) init_debugger(interp);
+
+ /* Initialize debugger in single-step mode. Note: if the
+ command reader is already active, it's too late which is why
+ we also statically initialize debug_cmd to step. */
+ debug_cmd = step;
+ step_count = 1;
+
+#define LITERAL(s) Tcl_NewStringObj ((s), sizeof(s)-1)
+
+ if (immediate) {
+ Tcl_Obj* fake_cmd = LITERAL ( "--interrupted-- (command_unknown)");
+
+ Tcl_IncrRefCount (fake_cmd);
+ debugger_trap((ClientData)0,interp,-1,Tcl_GetString (fake_cmd),0,1,&fake_cmd);
+/* (*interactor)(interp);*/
+ Tcl_DecrRefCount (fake_cmd);
+ }
+}
+
+void
+Dbg_Off(interp)
+Tcl_Interp *interp;
+{
+ struct cmd_list *c;
+
+ if (!debugger_active) return;
+
+ for (c = cmd_list;c->cmdname;c++) {
+ Tcl_DeleteCommand(interp,c->cmdname);
+ }
+
+ Tcl_DeleteTrace(interp,debug_handle);
+ debugger_active = FALSE;
+ Tcl_UnsetVar(interp,Dbg_VarName,TCL_GLOBAL_ONLY);
+
+ /* initialize for next use */
+ debug_cmd = step;
+ step_count = 1;
+}
+
+/* allows any other part of the application to tell the debugger where the Tcl channel for stdin is. */
+/*ARGSUSED*/
+void
+Dbg_StdinMode(mode)
+ int mode;
+{
+ stdinmode = mode;
+}
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 4
+ * fill-column: 78
+ * End:
+ */
diff --git a/FAQ b/FAQ
new file mode 100644
index 0000000..90f70a0
--- /dev/null
+++ b/FAQ
@@ -0,0 +1,1989 @@
+Expect FAQ (Frequently Asked Questions)
+
+An HTML version of this FAQ can be found in http://expect.nist.gov/FAQ.html
+
+This FAQ lists common questions, usually about subjects that didn't
+fit well in the book for one reason or another (or weren't
+indexed sufficiently well so that people can't find the answers easily
+enough). In some cases, I've left the original questions. I suppose
+I could've stripped off the headers, but it seems more realistic to
+see actual people who've asked the questions. Thanks to everyone who
+asked.
+
+The man page and the papers listed in the README file should
+also be consulted for highly technical or philosophical discussion of
+the implementation, design, and practical application of Expect.
+
+Don
+
+======================================================================
+
+ Here is the list of questions. You can search for the corresponding
+ answer by searching for the question number. For example searching
+ for "#3." will get you that answer.
+
+
+**** General ****
+
+#1. I keep hearing about Expect. So what is it?
+#2. How do you pronounce "Ousterhout" anyway? (Or "Libes" for that matter?)
+
+#3. Why should I learn yet another language (Tcl) instead of
+writing my interaction in <a language I already know>?
+#4. What about Perl?
+#5. Do we need to pay or ask for permission to distribute Expect?
+#6. Since Expect is free, can we give you a gift?
+#7. Are there any hidden dangers in using Expect?
+
+**** Book, newsgroup, FAQ, README, ... ****
+
+#8. Why is this FAQ so short?
+#9. How was this FAQ created?
+#10. The background makes the FAQ hard to read.
+#11. Why isn't there an Expect mailing list?
+#12. Why isn't overlay covered in Exploring Expect?
+#13. Is the front cover of your book a self portrait (ha ha)?
+#14. Why don't the examples in your USENIX papers work?
+#15. Can you put the examples in your book into an anonymous ftp site?
+#16. Do you have ideas for more articles on Expect?
+
+**** Can Expect do this? ****
+
+#17. Can Expect automatically generate a script from watching a session?
+#18. Can Expect understand screen-oriented (Curses) programs?
+#19. Can Expect be run as a CGI script?
+#20. Can Expect act like a browser and retrieve pages or talk to a CGI script?
+#21. Can Expect be run from cron?
+#22. Why does my Expect script not work under inetd?
+
+**** Compilation or porting questions ****
+
+#23. Why can't I compile Expect with Tcl 8.0?
+#24. Does Expect 5.26 work with Tcl/Tk 8.0.3?
+#25. Why can't I compile Expect with Tcl/Tk 8.1aX?
+#26. Why can't I compile Expect with Tcl/Tk 8.0b1?
+#27. Why does Expect need to be setuid root on Cray?
+#28. Does Expect run on VMS?
+#29. Is it possible to use Expect and TclX together?
+#30. Is it possible to use Expect and <lots of random extensions> together?
+#31. Why does configure complain about "cross-compiling"?
+#32. Why are make/configure looping endlessly?
+#33. Why does compile fail with: Don't know how to make pty_.c?
+#34. Does Expect run on MSDOS, Win95, WinNT, MacOS, etc...?
+#35. Why does Expect dump core? Why can I run Expect as root but not as myself?
+
+**** Other... ****
+
+#36. Is it possible to prevent Expect from printing out its interactions?
+#37. Why does it send back the same string twice?
+#38. Why can't I send the line "user@hostname\r"?
+#39. How do I hide the output of the send command?
+#40. Why don't I see pauses between characters sent with send -s?
+#41. Why does "talk" fail with "Who are you? You have no entry utmp" or
+ "You don't exist. Go away"?
+#42. Why does . match a newline?
+#43. Why doesn't Expect kill telnet (or other programs) sometimes?
+#44. How come I get "ioctl(set): Inappropriate ..., bye recursed"?
+#45. How come there's no interact function in the Expect library?
+#46. Can't you make tkterm understand any terminal type?
+#47. Trapping SIGCHLD causes looping sometimes
+#48. Why do I get "invalid spawn id"?
+#49. Could you put a version number in the filename of the Expect archive?
+#50. Why does Expect work as root, but say "out of ptys" when run as myself?
+#51. Why does spawn fail with "sync byte ...."?
+#52. Why does Expect fail on RedHat 5.0?
+#53. Why does Expect fail on RedHat 5.1?
+#54. Is Expect Y2K compliant?
+
+
+*
+* Questions and Answers
+*
+
+
+
+**** General ****
+
+
+#1. I keep hearing about Expect. So what is it?
+
+From: libes (Don Libes)
+To: Charles Hymes <chymes@crew.umich.edu>
+Subject: I keep hearing about Expect. So what is it?
+
+Charles Hymes writes:
+>
+>So, what is Expect?
+
+Expect is a tool primarily for automating interactive applications
+such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really
+makes this stuff trivial. Expect is also useful for testing these
+same applications. Expect is described in many books, articles,
+papers, and FAQs. There is an entire book on it available from
+O'Reilly.
+
+Expect is free and in the public domain. Download instructions can
+be found in the Expect homepage.
+
+Don
+
+======================================================================
+
+#2. How do you pronounce "Ousterhout" anyway? (Or "Libes" for that matter?)
+
+
+From: ouster@sprite.Berkeley.EDU (John Ousterhout)
+To: libes@cme.nist.gov
+Subject: Re: pronunciation?
+Date: Tue, 29 May 90 21:26:10 PDT
+
+Those of us in the family pronounce it "OH-stir-howt", where the
+first syllable rhymes with "low", the second with "purr", and the
+third with "doubt". Unfortunately this isn't the correct Dutch
+pronounciation for a name spelled this way (someplace along
+the line it got misspelled: it was originally "Oosterhout"), nor
+is it what you'd guess if you use common sense. So, we've gotten
+used to responding to almost anything.
+
+ -John-
+
+I suppose I should say something in kind. "Libes" is pronounced
+"Lee-bis" with stress on the first syllable. Like John though, I've
+gotten used to responding to anything close.
+
+By the way, notice the date on this message. I had only written
+the first cut of Expect four months earlier. I asked John how to
+pronounce his name because I had already got a paper accepted into
+USENIX and needed to be able to say his name correctly while giving
+the talk!
+
+Don
+
+======================================================================
+
+#3. Why should I learn yet another language (Tcl) instead of
+writing my interaction in <a language I already know>?
+
+From: libes (Don Libes)
+Subject: Re: Expect, Tcl, programmed dialogue etc.
+Date: Mon, 2 Sep 91 15:47:14 EDT
+
+>>>A friend told me about "Expect". But then, I have to know the
+>>>idiocies of "tcl". I would like to know if there is an alternative
+>>>to Expect that is also useful in other places, so that I do not
+>>>have to spend time getting used to tcl for just this one tool.
+>
+>>Your reasoning is shortsighted. Tcl is a language that can be used in
+>>other applications. It won't be a waste of your time to learn it.
+>
+>I have nothing against tcl as such.
+>The reluctance to learn it comes mainly from the feeling that half my
+>life seems to be spent learning new languages that differ very little
+>from existing ones, and differ in annoying little details at that.
+>To add to the misery, every implementation has its own
+>idiosyncracies...:-(
+
+Ironically, Tcl was written specifically to halt this very problem.
+
+The author recognized that every utility seems to have its own
+idiosyncratic .rc file or programming language. Tcl was designed as a
+general-purpose language that could be included with any utility, to
+avoid having everyone hack up their own new language.
+
+ In this context, your statements do Tcl a great disservice.
+
+Don
+
+======================================================================
+
+#4. What about Perl?
+
+From: libes (Don Libes)
+To: Joe McGuckin <joe@ns.via.net>
+Subject: Re: Need Perl examples
+Date: Sun, 22 Jan 95 20:17:39 EST
+
+Joe McGuckin writes:
+>
+>Yeah, I've scanned through your book a couple of times in the last
+>week, trying to make up my mind if I should buy it.
+
+I spent three years writing it - so I'm glad to hear you're spending a
+little time considering its merit!
+
+>Pro:
+> Looks like implementing some sort of telnet daemon would be trivial.
+
+Once you see it as an Expect script, you'll realize how trivial
+these things can really be.
+
+>Con:
+> Yet another language to learn. I know perl reasonably well & would
+> like to stick with it.
+
+Good point. While I'm not a Perl guru, I've used it quite a bit
+and it's nice for many things. But I wouldn't have bothered writing
+Expect in the first place if I thought Perl was ideal. And many Perl
+experts agree - I know a lot of them who call out to Expect scripts
+rather than do this stuff in Perl - it's that much easier with Expect.
+Expect is also much more mature. It's portable, stable, robust, and
+it's fully documented - with lots of examples and a complete tutorial,
+too.
+
+In response to someone complaining about how difficult it was to do
+something in Perl, Larry Wall once remarked: "The key to using
+Perl is to focus on its strengths and avoid its weaknesses." That
+definitely applies here.
+
+Even if you do proceed with Perl, you will find the book
+helpful. Automating interactive applications has unique pitfalls to
+it and many of the descriptions and solutions in the book transcend
+the choice of language that you use to implement them.
+
+Don
+
+======================================================================
+
+#5. Do we need to pay or ask for permission to distribute Expect?
+
+From: libes (Don Libes)
+To: Mohammad Reza Jahanbin <mrj@CIS.Prime.COM>
+Subject: Copyright Question.
+Date: Tue, 26 Jan 93 23:46:24 EST
+
+Mohammad Reza Jahanbin writes:
+>Before anything let me thank you on behalf of ComputeVision R&D for
+>putting so much effort into Expect. Part of CV has been using Expect
+>for the past two years or so to build variety of tools including an
+>automated testbed for a product.
+>
+>CV is currently considering shipping the automated testbed to some of its
+>retailers, to enable them to perform their own tests before distributing
+>the product.
+>
+>The Question is, are we allowed to ship Expect? Do we need to ask
+>anyone for permission? Do we need to say or write anything in the
+>documentation? Do we need to pay for it?
+>
+>I have not been able to find any copyright (or indeed copyleft) notices
+>in the usual Expect distribution. Would you be able to clarify our position.
+
+It is my understanding that you are allowed to do just about anything
+with Expect. You can even sell it. You need not ask our permission.
+You need not pay for it. (Your tax dollars, in effect, already have
+paid for it.)
+
+You should not claim that you wrote it (since this would be a lie), nor
+should you attempt to copyright it (this would be fruitless as it is a
+work of the US government and therefore not subject to copyright).
+
+NIST would appreciate any credit you can give for this work. One line
+may suffice (as far as I'm concerned) although there should be
+something to the effect that this software was produced for research
+purposes. No warantee, guarantee, or liability is implied.
+
+My management is always interested in feedback on our work. If you
+would like to send letters of praise describing how Expect has helped
+your business, we would be delighted. Letters (on letterhead please)
+are strong evidence used by policy makers when deciding where every
+dollar goes. If you want to send these letters to NIST directly, you
+may send them to the following individuals:
+
+Robert Hebner, Director
+NIST
+Admin Bldg, Rm A-1134
+Gaithersburg, MD 20899
+
+Ric Jackson, Manufacturing Engineering Laboratory
+NIST
+Bldg 220, Rm B-322
+Gaithersburg, MD 20899
+
+Steve Ray, Manufacturing Systems Integration Division
+NIST
+Bldg 220, Rm A-127
+Gaithersburg, MD 20899
+
+Amy Knutilla, Manufacturing Collaboration Technologies Group
+NIST
+Bldg 220, Rm A-127
+Gaithersburg, MD 20899
+
+In case you're wondering about the uninformative titles, Robert Hebner
+is the director of all of NIST (about 3000 people) and
+Amy Knutilla (way down there at the bottom) is my immediate supervisor.
+
+I hope this has answered your questions. Let me know if you have
+further questions.
+
+Don
+
+======================================================================
+
+#6. Since Expect is free, can we give you a gift?
+
+This is not an actual letter but represents the gist of several
+that I've received.
+
+>>>Expect has saved us many thousands of dollars. We'd like to send
+>>>you a free copy of our product.
+>>
+>>Thanks, but please don't. As a federal employee, I'm not
+>>allowed to accept gifts of any significant value.
+>
+>But, what if it is for personal use (like at home)? I assume
+>that would be okay.
+
+It doesn't matter (much). What the rules address is whether a gift
+might cause me to make an official decision differently. This is
+especially a concern because I may very well have to decide whether or
+not to buy products from your company in the future.
+
+There is a clause that says "you may accept gifts from friends,
+regardless of value ... but you should be careful to avoid accepting
+gifts which may create an appearance of impropriety, even if permitted
+as an exception to the gift rules."
+
+I'm still permitted to accept small token gifts, such as a t-shirt
+or reasonably-priced dinner (under $20 per gift to a maximum of $50
+per year from any person or company) - so things are not totally
+ridiculous. Although the precise values in the gift rules seem rather
+arbitrary, I actually like the gift rules. They stop a lot of the
+nonsense that used to go on involving gifts.
+
+Don
+
+======================================================================
+
+#7. Are there any hidden dangers in using Expect?
+
+From: Charlton Henry Harrison <charlton@cs.utexas.edu>
+To: libes@NIST.GOV
+Date: Fri, 27 Jan 1995 23:30:56 -0600
+
+>>>Dear Don:
+>>>
+>>> I've been a fan of Expect ever since I first learned of UNIX back
+>>>in late '93. I'm young and don't have my CS degree just yet, but I worked
+>>>a while back at Texas Instruments in their Telecom Customer Support dept.
+>>>I started in late '93 (and hence, that's where I first started exploring
+>>>the UNIX environment) and immediately forsaw the need of automating a lot
+>>>of my redundant and mindless duties, but I didn't know how since we were
+>>>working over a heterogeneous LAN with multiple OSs.
+>>> Then I found out about Expect. I automated everything! My boss didn't
+>>>like hearing that I was working on something else in order to get out of
+>>>work, and I got tired of explaining it to him.
+>>> Although I accomplished all the aspects of my duties, I was infamous
+>>>for being the laziest person at work, and it showed (I made my job SO easy).
+>>>I got a new boss after a while, and he hated me from the start and fired
+>>>me soon after. Oh well, I guess my mentality didn't click with theirs.
+>>> There are a lot of people like that: they believe life is putting
+>>>in a hard day's work to get by. I hate that.
+>>> So the point is, thank you for the wonderful 'Expect'. I bought
+>>>your book and now I have the most recent version of it on my Linux system
+>>>at home. Needless to say I'm looking for another job, though.
+>>>
+>>> Charlton
+>>>
+>> Thanks very much for your nice letter. Sorry to hear about your
+>> automating yourself out of a job. Actually, I think most computer
+>> scientists have to face this dilemma. In some ways, it's a
+>> self-defeating occupation.
+>>
+>> Don
+>
+>Yeah, I'd be interested in hearing if you have a personal philosophy on
+>how to handle this kind of thing. I plan on pursuing a career in Artificial
+>Intelligence for similar reason of making life easier for everyone (me
+>in particular!) What the future holds in this category is a great
+>mystery.
+
+I'm glad you asked. My personal philosophy on this kind of thing is:
+Find someone really rich and marry them.
+
+Don
+
+======================================================================
+
+**** Book, newsgroup, FAQ, README, ... ****
+
+
+#8. Why is this FAQ so short?
+
+From: libes (Don Libes)
+To: Wade Holst <wade@cs.ualberta.ca>
+Subject: Expect question
+
+Wade Holst writes:
+>
+> 1) Is there a more up-to-date version of the FAQ than what
+> comes with expect-5.5? (For such a useful application, I
+> would expect more than 12 questions).
+
+I know that a lot of other packages have *huge* FAQs but I
+have always believed that this is an indication that their regular
+documentation sucks. As questions arise that are not addressed well
+by the original docs, the docs themselves should be fixed rather than
+new ones created.
+
+In contrast, I believe that an FAQ should literally be a list of
+frequently asked questions and little else. An FAQ should not be a
+replacement for good documentation.
+
+In that sense, I have tried to use this FAQ as a second place to
+look rather than a first place. The place you should always look
+first is Exploring Expect. At over 600 pages, the book is very
+comprehensive, well-organized, and includes three indices and two
+tables-of-contents to make it very easy to find what you want to know.
+
+The book was not a rush job. During the three years I spent
+writing it, virtually every question I was asked became incorporated
+as subject material for the book. I wanted to make sure that the book
+wouldn't need much of an FAQ!
+
+It would not make sense to try and distill the entire book into an
+FAQ (that is actually comprehensive rather that truly frequently asked
+questions). There's simply too much material there.
+
+So this FAQ is short. It really tries to stick just to *truly*
+frequently asked questions.
+
+Don
+
+======================================================================
+
+#9. How was this FAQ created?
+
+The Expect FAQ is regularly recreated by a Tcl script which
+produces either text or HTML depending on how it is called. Using Tcl
+has two nice results:
+ + I didn't have to choose one format and worry about
+converting it to the other. (Remember that the FAQ appears in HTML on
+the web and it appears in text in the Expect distribution.) The more
+common approach - doing conversions in either direction - is really
+painful - plus, it's now easy to generate other formats, too.
+ + It's much, much easier to keep track of questions and
+answers. For example, when I add a new question, I don't have to add
+it twice (once at the top and again later with the answer), nor do I
+have to worry about making the links between them. All this and a lot
+of other stuff is handled automatically - and the source is much more
+readable than the actual HTML.
+(see "FAQbuilder")
+
+You can read about these ideas in a paper that appeared at Tcl '96
+called Writing CGI Scripts in Tcl. (CGI scripts are the primary focus of the
+paper, but it also spends time on HTML generation for other purposes -
+including the example of highly stylized documents like FAQs.)
+
+I encourage you to examine the source to this FAQ - it
+comes in two parts:
+ + Expect-specific FAQ source
+ + Generic FAQ Builder source
+
+The generic FAQ builder has also been used to build several other
+FAQs (unrelated to Expect).
+
+Don
+
+======================================================================
+
+#10. The background makes the FAQ hard to read.
+
+To: bonneau@mudd.csap.af.mil (Allen Bonneau)
+Subject: FAQ background colors
+Date: Wed, 10 Apr 96 10:24:52 EDT
+
+Allen Bonneau writes:
+>... the white and gray background makes the FAQ difficult to read.
+
+It's not white and gray. It's several very close shades of gray.
+It's supposed to be very subtle. Sounds like you have your browser in
+a mode where it is mishandling colors. Turn on dithering and
+restart your browser.
+
+Don
+
+======================================================================
+
+#11. Why isn't there an Expect mailing list?
+
+From: libes (Don Libes)
+To: dclark@nas.nasa.gov (David R. Clark)
+Subject: Mailing list for Expect
+Date: Mon, 23 Sep 91 18:21:28 EDT
+
+>Would be nice if their were an Expect mailing list. I would use it more
+>often, and be made aware of other users.
+
+Perhaps I'm too myopic, but I don't see the need for it. Most of
+the questions about Expect posted to Usenet every day can be found in
+the various FAQs or in the book, so it's pretty easy getting
+answers to them.
+
+For one reason or another (occasionally a bug fix, but often, just
+adding a neat example), I update Expect every couple of weeks.
+Personally, I'd hate being on the other end of something like this.
+Who needs patches every two weeks for problems that are likely not
+even relevant to you? (Most patches these days are either extremely
+esoteric or are related to porting Expect to some unusual machine.)
+
+>It would be helpful, too, if this served as an area for swapping programs.
+>Many of the things that I want to do are done by others already.
+
+NIST doesn't distribute software written by other people but if
+you've got relatively small scripts that show off unique ideas and
+techniques that would be educational for the Expect community, I can
+include your script with Expect or put it in a publicly accessible
+directory so other people can get it. I'm also willing to list links
+in Expect's home page to other web pages about projects that use
+Expect.
+
+There is a Tcl newsgroup, comp.lang.tcl, which many Expect users
+read. It's pretty good for asking questions about Tcl, and many of
+the readers use Expect so Expect questions are encouraged. The
+newsgroup is gatewayed to a mailing list (tcl@sprite.berkeley.edu)
+which is further described in the Tcl documentation.
+
+Don
+
+======================================================================
+
+#12. Why isn't overlay covered in Exploring Expect?
+
+To: spaf@cs.purdue.edu
+
+Gene Spafford writes:
+>I'm curious as to why the "overlay" command is not mentioned anywhere
+>in the book. Is that a recent addition? A deprecated feature? I
+>ended up using it in one of my scripts....
+
+The overlay command has been in Expect for a long time. In all that
+time no one has ever asked me about it and I have never used it.
+Well, I used it once but I really didn't like the result, and so I
+rewrote the script to not use it. I left the overlay command in
+Expect because it seemed like an interesting idea, but I never really
+finished it - in the sense that I believe it needs some more options
+and controls. In comparison, the interact command is very flexible
+and makes the need for overlay pretty moot.
+
+Don
+
+======================================================================
+
+#13. Is the front cover of your book a self portrait (ha ha)?
+
+From: libes (Don Libes)
+To: pkinz@cougar.tandem.com (kinzelman_paul)
+Subject: the cover?
+
+kinzelman paul writes:
+>The book finally came in. I tried to buy 4 copies but they had only 2
+>left and they came in last Saturday. Move over Stephen King! :-)
+
+4 copies!? Wow. That's more than my mother bought!
+
+>I was discussing your book with somebody who stopped in and we began
+>to speculate about the monkey on the cover. I don't suppose it's a
+>self portrait? :-)
+
+There is some real humor here. There seems to be considerable
+debate over what the creature is! The colophon at the end of the book
+says that it is a chimpanzee. I like that idea much more than a
+monkey which is what it looks like to me. My wife, who has a degree
+in zoology, explained to me that chimps are actually the second
+smartest of primates (humans are the smartest). Chimps are very
+intelligent and can do many things (but not everything) that humans
+do. Perfect for describing Expect. Anyway, she says I should be
+honored to have it grace the cover - even in theory.
+
+I remarked to Edie (the cover designer at O'Reilly) that even though
+the cover was nice looking, everyone was going to stare at it and say,
+"Gee, but it looks like a monkey." She replied "The purpose of the
+cover is just to get people to pick the book up. This cover will do
+that. Don't worry. If you get any rude comments from anyone, at least
+you know they are paying attention."
+
+[After being inundated by people pointing out that the animal
+really is a monkey, O'Reilly subsequently decided to acquiesce and has
+changed the colophon to admit that yes it is a rhesus monkey.
+Evidentally, the book from which O'Reilly has been taking those
+pictures from was wrong on this one.]
+
+Don
+
+======================================================================
+
+#14. Why don't the examples in your USENIX papers work?
+
+From: libes (Don Libes)
+To: Will Smith (AC) <william@ritchie.acomp.usf.edu>
+Subject: Expect
+
+Will Smith (AC) writes:
+>I just entered some scripts from a USENIX paper that my boss had. I get
+>errors about my quotes in the script. Also, it doesn't seem to know
+>about expect_match. Thanks in advance for any insight you could offer.
+
+The USENIX papers are old and out-of-date as far as quoting goes. A
+couple years ago, I cleaned up and simplified this aspect of Expect.
+Similarly, expect_out is now where the results of expect's pattern
+matching are saved.
+
+The man page is always the best reference on what Expect currently
+supports. Alternatively, you can read the CHANGES files. These files
+document the changes from one major version to another.
+
+Don
+
+======================================================================
+
+#15. Can you put the examples in your book into an anonymous ftp site?
+
+From: libes (Don Libes)
+To: pren@cs.umass.edu
+Subject: Examples in your book "Exploring Expect"
+
+Peifong Ren writes:
+>
+>Hi,
+>
+>I bought your book "Exploring Expect" from O'Reilly.
+>I wonder can you put the eamples in your book into an anonymous ftp
+>site?
+
+All of the substantive examples come with recent versions of Expect.
+Just look in the example directory.
+
+The remaining 50 or so examples are short enough that typing them
+in only takes a minute or two. If I put them online, you'd spend more
+time looking for them (reading my online catalog, figuring out what
+the online descriptions meant, mapping them back to the file, etc.)
+then it would take to type them in. And since you're likely to want
+to change the examples anyway, there's nothing to be gained for short
+ones.
+
+Don
+
+======================================================================
+
+#16. Do you have ideas for more articles on Expect?
+
+From: libes (Don Libes)
+To: faught@zeppelin.convex.com (Danny R. Faught)
+Cc: libes
+Subject: Re: SQA Quarterly articles
+Date: Thu, 21 Dec 95 13:31:01 EST
+
+Danny R. Faught writes:
+>I just arranged to write an article on automating interactive
+>processes for an issue early next year. You have so many good pieces
+>on expect out there, it's going to be hard to add anything original.
+
+One thing I've never written is a good mini-tutorial. Magazine
+editors love these types of pieces and there's certainly a need for
+it. So I'd encourage that type of article.
+
+Another possibility is an article on how you or your colleagues
+personally applied Expect to solve your particular problem. Application-
+oriented papers are the kind that necessarily have to be written by
+people in the field who are applying the technology. People love this
+kind of practical paper. For example, a good paper might be "Writing
+a pager". This is a nice topic because you can start with a simple
+5-line script that solves the problem and then show progressive
+refinements that handle different twists on the same problem. (And
+"how to write a pager" is a very frequently asked question on Usenet.)
+
+Don
+
+======================================================================
+
+**** Can Expect do this? ****
+
+
+#17. Can Expect automatically generate a script from watching a session?
+
+From: libes (Don Libes)
+To: pete@willow24.cray.com
+Subject: Expect
+Date: Fri, 12 Oct 90 17:16:47 EDT
+
+>I like "Expect" and am thinking of using it to help automate the
+>testing of interactive programs. It would be useful if Expect had a
+>"watch me" mode, where it "looks over the shoulder" of the user and
+>records his keystrokes for later use in an Expect script.
+>
+>(Red Ryder and other Macintosh telecommunications packages offer this
+>sort of thing. You log onto Compuserve once in "watch me" mode, and
+>RR keeps track of the keystrokes/prompts. When you're done you have a
+>script that can be used to log onto Compuserve automatically.)
+>
+>Before I look into adding a "watch me" feature, I thought I should
+>ask: has this been done already?
+>
+>I'll say again that I like the tool a lot--nice work! There are other
+>people here using it for things like the testing of ksh, which
+>responds differently to signals when not used interactively.
+>
+>-- Pete
+
+The autoexpect script in Expect's example directory does what you
+want.
+
+Don
+
+======================================================================
+
+#18. Can Expect understand screen-oriented (Curses) programs?
+
+Yes, it can - with a little clever scripting. Look at the
+term_expect script for an example. It uses a Tk text widget to
+support screen-oriented Expect commands. This technique is described
+very thoroughly in Chapter 19 of Exploring Expect.
+
+Adrian Mariano (adrian@cam.cornell.edu) converted the term_expect
+code (see above) so that it runs without Tk (exercise 4 in Chapter
+19!) Both term_expect and virterm can be found in the example
+directory that comes with Expect.
+
+An alternative approach to screen-handling was demonstrated by Mark
+Weissman (weissman@gte.com) and Christopher Matheus who modified a
+version of Expect to include a built-in Curses emulator. It can be
+ftp'd from the Tcl archive as expecTerm1.0beta.tar.Z. (Note that
+Expecterm does not run with the current version of Expect.)
+
+I like the idea of keeping the curses emulator outside of Expect
+itself. It leaves the interface entirely defineable by the user. And
+you can do things such as define your own terminal types if you want.
+For these reasons and several others, I'm not likely to return to
+Expecterm.
+
+Don
+
+======================================================================
+
+#19. Can Expect be run as a CGI script?
+
+Expect scripts work fine as CGI scripts. A couple pointers might
+help to get you going:
+
+Many Expect scripts can be run directly with one change - the
+following line should be inserted before any other output:
+
+puts "Content-type: text/html\n"
+
+Be sure not to forget that extra newline at the end of the puts.
+
+Next, make sure you invoke external programs using full paths. For
+example, instead of "spawn telnet", use "spawn /usr/ucb/telnet" (or
+whatever). Remember that the PATH and other environment variables are
+going to be different than what you are used to. This is very similar
+to dealing with cron and you can get other good tips and advice from
+reading the Background chapter in the book.
+
+ Another tip: If a script runs fine by hand but not from CGI, just
+log in as "nobody" to the host on which your CGI script runs. Then
+try running it by hand. This generally makes it very obvious what's
+going on. (If you can't log in to the server or can't log in as
+"nobody", use the kibitz trick described in the Background chapter.)
+
+You may find it helpful to use cgi.tcl, a nice collection of
+CGI support utilities for Tcl scripts. It includes an Expect example
+among many others. The package includes just about everything:
+tables, frames, cookies, file upload, etc...., with some nice
+debugging support. It's pure Tcl, no C code - so it's very easy to
+try out and use.
+
+Don
+
+======================================================================
+
+#20. Can Expect act like a browser and retrieve pages or talk to a CGI script?
+
+From: jasont@netscape.com (Jason Tu)
+Date: Sat, 02 Nov 1996 09:51:03 -0800
+
+I read your book "Exploring Expect" and find Expect is just the tool
+to test Netscape's enterprise server product, since it is very easy to
+use and quick to develop. I figured I would use telnet to send HTTP
+protocol dialog to a HTTP server and simulate how it behaves. But I
+couldn't get it to work at all. I am wondering that there might be a
+quick example that you can share with me.
+
+Yes, this is a useful way of testing HTTP servers and running CGI
+scripts (and winning Web contests :-). You can add error checking and
+other stuff, but here's the minimum your script should have to read a
+web page:
+
+match_max 100000
+set timeout -1
+spawn telnet $host 80
+expect "Escape character is *\n"
+send "GET $page\r\n"
+expect
+puts "$expect_out(buffer)"
+
+If you want to communicate information to a CGI script, you'll want
+more. One way to see what needs to be sent is to load a real browser
+with the form and then send it to a fake daemon such as this one:
+
+#!/bin/sh
+/bin/cat -u > /tmp/catlog
+
+Enable this by adding this service to inetd. Then save the form in
+a temporary file, modify the form's host and port to correspond to
+your own host and whatever port you've chosen to associate with your
+fake daemon. Now fill out the form and you'll find the form data in
+/tmp/catlog. Using this, you can determine exactly how to amend your
+Expect script to behave like your browser.
+
+Don
+
+======================================================================
+
+#21. Can Expect be run from cron?
+
+Expect itself works fine from cron - however, you can cause
+problems if you do things that don't make sense in cron - such as
+assume that there is a terminal type predefined. There are a number
+of other pitfalls to watch out for. The list and explanations aren't
+short - which is why there's a whole chapter ("Background") on the
+subject in the book.
+
+Here's one that someone tried to stump me with recently: They told
+me that their program started up and then Expect immediately exited.
+We spent a lot of time tracking this down (Was the spawned program
+really starting up but then hanging - which would indicate a bug in
+the program; or was the program NOT starting up - which would indicate
+a bug in the environment; etc.) Turned out that Expect wasn't even
+running their program. They had assumed cron honored the #! line
+(which it doesn't) and so the first line in their script (exec date)
+was being interpreted by the shell and of course, the script did
+nothing after that - because that's what the shell's exec is supposed
+to do!)
+
+Don
+
+======================================================================
+
+#22. Why does my Expect script not work under inetd?
+
+From: dpm@bga.com (David P. Maynard)
+Subject: Re: Tcl/Expect, inetd service, and no echo password
+Date: 24 Oct 1996 13:34:57 -0500
+
+In article <54ocsh$9i1@urchin.bga.com> dpm@bga.com (David P. Maynard) writes:
+ I am fairly new to expect, so hopefully this isn't too obvious. I also
+ confess to not having looked in "Exploring Expect" becuase I haven't
+ found it in stock at a local bookstore yet.
+
+ I want to write an expect script that runs as a service from inetd.
+ (Actually, I plan to use the tcpd 'twist' command to launch the
+ binary, but that doesn't seem to affect the problem.) The script will
+ prompt the user for a password. The supplied password is used as a
+ key to decrypt some passwords stored online. The script then fires
+ off a telnet session to a remote box and does some fairly simple
+ things that require the decrypted passwords.
+
+ I have all of this working when I run the script from a UNIX prompt.
+ However, when I run it out of inetd, the 'stty -echo' commands that
+ turn off character echo when the user types the password fail with the
+ following error:
+
+ stty: impossible in this context
+ are you disconnected or in a batch, at or cron script?
+ stty: ioctl(user): Bad file descriptor
+
+ I can understand the cause of the message (no associated tty), but I
+ can't think of an easy solution. If I use 'gets' or 'expect_user,'
+ the user's input is always echoed. I tried a few variations on the
+ stty command, but didn't have any luck.
+
+ Any suggestions?
+
+Yes, read Exploring Expect, Chapter 17 (Background Processing). In
+the section "Expect as a Daemon", there's a very thorough discussion
+of this problem and how to solve it.
+
+
+In short, there's no tty when you run a process from inetd. Echoing
+is controlled by the telnet protocol, so you must send and expect
+telnet protocol packets to solve the problem. Even knowing this, the
+actual implementation is very non-obvious which is why the book goes
+into it in such detail.
+
+Don
+
+======================================================================
+
+**** Compilation or porting questions ****
+
+
+#23. Why can't I compile Expect with Tcl 8.0?
+
+Sounds like you have an old version of Expect. Get a a new version of Expect.
+
+Don
+
+======================================================================
+
+#24. Does Expect 5.26 work with Tcl/Tk 8.0.3?
+
+To: aspi@cisco.com
+Subject: Re: Expect 5.26 and TCL 8.0
+Aspi Siganporia writes:
+>
+>Hi Don,
+>
+>We are looking at upgrading Expect. Our last version was Expect5.22
+>
+>I see that Expect5.26 supports TCL 8.0.
+>
+>The question is,
+>
+>Will it work with TCL8.0.3?
+>
+>Thanks
+>Aspi
+
+It might. 8.0.3 broke a couple of the more esoteric configurations.
+If you find that you can't compile using 5.26, get 5.27.
+
+Don
+
+======================================================================
+
+#25. Why can't I compile Expect with Tcl/Tk 8.1aX?
+
+Historically, I've rarely found the time to port Expect to alphas
+and betas. I recommend you stick with 8.0 unless you're willing to do
+a little work.
+
+Don
+
+======================================================================
+
+#26. Why can't I compile Expect with Tcl/Tk 8.0b1?
+
+I don't see the point in supporting an old beta. Upgrade to the
+production release of Tcl/Tk 8.0.
+
+Don
+
+======================================================================
+
+#27. Why does Expect need to be setuid root on Cray?
+
+From: libes (Don Libes)
+To: u70217@f.nersc.gov (Lori Wong)
+Subject: setuid in Expect
+Date: Thu, 24 Oct 91 16:15:20 EDT
+
+> I have been running Expect now under UNICOS 6.1 and CSOS 1.0 (Cray
+>Computer Corporation's OS). The two machines that I am running Expect
+>on have stringent security features, one of which is to limit setuid
+>privileges to specific individuals. I was wondering if you would be
+>kind enough to explain the purpose of the setuid that is needed by Expect
+>and whether it could be compiled to run without having to have setuid
+>privilege? I know it has to do with spawning and communicating with
+>the various spawned tasks, but don't know enough of the details to be
+>able to explain why Expect specifically needs setuid and whether or not
+>it could cause a security problem (could someone use it to enter into
+>the system and wreak havoc, for example?). Right now, I've limited
+>the access of Expect to my group, but need to know what the security
+>implications are if I open it to all users. I'd appreciate any light
+>you can shed on this subject...
+
+Root-access is needed to open a pty under Unicos. Thus, all programs
+accessing ptys must be setuid root. If you do an "ls -l" of programs
+like "script", "xterm", etc, you'll see this.
+
+I have no idea why this is. The requirement was probably for security
+reasons to begin with, but it has the ironic effect of making more
+programs require setuid and therefore greater possibility of errant
+setuid programs.
+
+In fact, there is one known Unicos bug relating to the way uids are
+switched at exec time which requires further special coding. If you
+search for "Cray" in the Expect source you will see significant chunks
+of code to get around the problem.
+
+I don't know if this reassures you any. All I can tell you is that a
+number of Cray experts have looked into the situation and are happy
+with the current implementation of Expect.
+
+Don
+
+======================================================================
+
+#28. Does Expect run on VMS?
+
+From: libes (Don Libes)
+To: Cameron Laird <claird@Starbase.NeoSoft.COM>
+Subject: VMS question.
+
+Cameron Laird writes:
+>Do you know of anyone working with Expect and VMS?
+>I'd like not to re-invent wheels, but, if I'm to be
+>the first one, I want others to benefit.
+
+No, I'm not aware of anyone doing it. Since VMS claims POSIX
+conformance, it shouldn't be that hard - Expect uses the POSIX calls
+if it can. Probably the hardest part will just be modifying the Makefile
+and the configure script!
+
+However, that there might be a simpler solution. The neat thing
+about Expect is that you can control other computers easily. Run
+Expect on your UNIX box and have it log in to the VMS box and do its
+thing. (You can bypass the login garbage by using an inet daemon.)
+We've done exactly this to a number of weird pieces of hardware we
+have around the lab (robots, Lisp machines, embedded controllers, and,
+of course, a VAX running VMS). It saves time porting!
+
+Don
+
+======================================================================
+
+#29. Is it possible to use Expect and TclX together?
+
+Is it possible to use Expect and TclX together?
+From: bfriesen@iphase.com (Bob Friesenhahn)
+Date: 20 Jul 1994 04:09:43 GMT
+Organization: Interphase Corporation, Dallas TX - USA
+
+Jeffery A. Echtenkamp (echtenka@michigan.nb.rockwell.com) wrote:
+: Do Expect and tclX work together? If so, must anything special be done to
+: get them to work together?
+
+This answer courtesy of Bob Friesenhahn, Interphase (bfriesen@iphase.com):
+
+They work fine together. However, you should prepend "exp_" to your Expect
+command names. This will ensure that there are no conflicts between Expect
+commands and tclX commands of the same name (like wait).
+
+Just pick up the "make-a-wish" package, follow the instructions, and you will
+be all set. I have built a wish based on tcl, tk, Expect, tclX, and dp using
+this technique with no observed problems.
+
+Bob
+
+[If you need additional information, please read Chapter 22
+("Expect as Just Another Tcl Extension") of Exploring Expect. Its
+sole focus is how to make Expect work with other extensions. - Don]
+======================================================================
+
+#30. Is it possible to use Expect and <lots of random extensions> together?
+
+From: libes (Don Libes)
+To: Frank Winkler <winkler@eas.iis.fhg.de>
+Subject: Q Expect + TkSteal
+
+Frank Winkler writes:
+>Hi don,
+>
+>a short question considering installation of Expectk.
+>
+>Is it possible to build an Expectk-binary, which uses
+>the features of BLT, TkSteal and Expect ?
+
+I've never done it, but I know it must be possible because the tgdb
+package in the Tcl archive uses all of those extensions with Expect.
+
+Expect is a "well-behaved extension" in the sense that it requires no
+changes to the Tcl core. So Expect should work with any other Tcl
+extensions. You just need to add the usual Exp_Init call to main() or
+the other _Init calls to Expect's main.
+
+>If yes, which of them should be build first, second ... ?
+
+Order doesn't matter.
+
+I've done this kind of thing by hand. It's pretty simple. But people
+tell me the make-a-wish package in the Tcl archive automates the
+creation of multi-extension Tcl applications.
+
+[Also see the answer to the previous FAQ answer.]
+
+Don
+
+======================================================================
+
+#31. Why does configure complain about "cross-compiling"?
+
+From: libes (Don Libes)
+To: morton@hendrix.jci.tju.edu (Dan Morton)
+Subject: Re: Sorry to bother you, but...
+
+Dan Morton writes:
+>Don,
+>
+>I've posted an inquiry to comp.lang.tcl about my configure problems with
+>expect, but I've not yet gotten a reply. Perhaps you can nudge me in the
+>right direction?
+>
+>I'm running HP-UX 9.0 on a 735, and I've snagged the latest versions of Tcl
+>and expect from NIST (7.4 and 5.18 respectively). My gcc is v2.6. Tcl
+>configured and built out of the box, but I can't get expect to configure
+>properly. No matter what I do, it thinks it wants to cross-compile. I
+>think it's failing that little snippet of eval code. It gets further if I
+>specify --host=HP, but still complains about cross compiling. Here's the
+>result without options:
+>
+>{hendrix:~/expect-5.18:8} ./configure
+>checking for gcc... gcc
+>checking whether we are using GNU C... yes
+>checking whether gcc accepts -g... no
+>checking how to run the C preprocessor... gcc -E
+>checking whether cross-compiling... yes
+>checking whether cross-compiling... (cached) configure: error: You need to
+>specify --target to cross compile,
+> or the native compiler is broken
+
+I guess the error message has to be clearer. The message:
+
+ "or the native compiler is broken"
+
+means that configure tried to compile a simple program and it failed.
+Here's the program it tries to compile:
+
+ main() {
+ return(0);
+ }
+
+The configure output that you showed me says that it found gcc.
+Perhaps it was misinstalled or is just a placeholder and doesn't
+actually do anything? Try compiling a tiny C program yourself from
+the command line.
+
+Don
+
+======================================================================
+
+#32. Why are make/configure looping endlessly?
+
+To: Xiaorong Qu <aqu@cisco.com>
+Subject: Make message for Expect
+--text follows this line--
+Xiaorong Qu writes:
+>Don,
+>
+>The following is the output of make, you can find
+>that the process repeated three times.
+
+I bet what's going on is that your system clock is set to some
+ridiculous time such as last year. "Make" is sensitive to your clock.
+Please fix your clock. Then check that all the files are "older"
+than the current time. (If not, "touch" them all.)
+
+Don
+
+======================================================================
+
+#33. Why does compile fail with: Don't know how to make pty_.c?
+
+From: libes (Don Libes)
+To: wren@io.nosc.mil
+Subject: Compile fails with: Don't know how to make pty_.c
+
+> I'm trying to compile Expect on hpux 9.01,
+> downloaded from ftp.cme.nist.gov expect.tar
+
+> after running config
+> the make fails with "Don't know how to make pty_.c. (compile fails)
+> I see three versions pty_sgttyb.c, pty_termios.c and pty_unicos.c in
+> the load, but the configure picked none of them.
+> I tried forcing to pty_termios.c but that failed with other compile errors.
+
+I've seen this happen because gcc was partially installed. configure
+finds the gcc stub and uses gcc for all the tests. But because the
+compiler doesn't work, every test fails so configure doesn't select
+any of the choices.
+
+So either finish installing gcc or delete the stub.
+
+(And if it's not that, then something similar is wrong with whatever
+compiler you've got. Look closely at the output from configure, it
+will tell you what compiler it is trying to use.)
+
+By the way, Expect compiles fine on my HP (A.09.05 E 9000/735).
+
+Don
+
+======================================================================
+
+#34. Does Expect run on MSDOS, Win95, WinNT, MacOS, etc...?
+
+Gordon Chaffee has ported Expect to NT. I would like to unify the
+UNIX and NT code but I probably won't have the time to do this
+personally. Volunteers are welcome.
+
+I have no plans to do other ports. Feel free to volunteer.
+
+Don
+
+======================================================================
+
+#35. Why does Expect dump core? Why can I run Expect as root but not as myself?
+
+From: Wayne Tcheng <wmt@visi.net>
+Subject: Expect on Solaris
+Date: Wed, 2 Apr 97 21:34:50 EST
+
+I've compiled Expect 5.21 with Tcl 7.6 and Tk 4.2. Whenever I run Expect
+as a non-root user, it core dumps. When I am root, I can run it
+successfully. However, if I "su - wmt" to my own id, I can also run it
+without a problem. I've tried making the expect binary suid root, but
+that does not help either. I'm on Solaris 2.5. Any ideas?
+
+Sounds like something on your system is misconfigured. Everytime
+I've had reports like this (works as root, not as user), it's turned
+out to be /tmp was unwriteable or something equally improbable.
+
+The easiest way to find out is to use the debugger and tell me where
+Expect is dumping core. (If you don't understand this statement, ask
+a local C or C++ programmer.)
+
+As an aside, you should be using the most recent version of Expect
+(currently 5.22.1). But I don't know of any problems in 5.21 that
+caused core dumps, so it's certainly worth trying the debugger
+approach before retrieving the latest version. But if you do find a
+bug in Expect, before reporting it, please verify that it still exists
+in the current version.
+
+Don
+
+======================================================================
+
+**** Other... ****
+
+
+#36. Is it possible to prevent Expect from printing out its interactions?
+
+From: libes (Don Libes)
+To: Sunanda Iyengar <sunanda@simvax.labmed.umn.edu>
+Subject: Disabling display from Expect
+
+Sunanda Iyengar writes:
+>Is it possible to have Expect interact with a process and not print-out
+>the results of interaction? In my application, I need it to go into a
+>silent mode, communicate with a process without reporting to the user, and
+>then come back to normal mode and put the process into interactive mode.
+
+Use the following command:
+
+ log_user 0
+
+To restore output:
+
+ log_user 1
+
+See the Expect man page for more details or page 175 of Exploring
+Expect for details and examples.
+
+Don
+
+======================================================================
+
+#37. Why does it send back the same string twice?
+
+From: Don Libes
+To: yusufg@himalaya.cc.gatech.edu (Yusuf Goolamabbas)
+Subject: Duplicate pattern matches in Expectk
+--text follows this line--
+ Hi, I am trying to do a very simple thing in expectk
+
+ spawn cat
+ expect_background -re ".+" {
+ send $expect_out(0,string)
+ }
+ exp_send "Hello World\n"
+
+ Now the display in the text widget looks like this
+ Hello World\r
+ Hello World\r
+
+ whereas I was expecting only one line
+ Hello World\r
+
+ Thanks in advance, Yusuf
+ --
+ Yusuf Goolamabbas yusufg@cc.gatech.edu
+ Graphics, Visualization, & Usability Center (O) 404.894.8791
+ College of Computing Georgia Tech
+ http://www.cc.gatech.edu/grads/g/Yusuf.Goolamabbas/home.html
+
+This is correct behavior. The first "Hello World" is echoed by the
+terminal driver. The second is echoed by cat. This behavior has
+nothing to do with Expectk (or Expect for that matter). You can see
+this same thing if you type to cat interactively.
+
+% cat
+Hello World
+Hello World
+
+In the example above, I typed "cat" at the shell prompt and pressed
+return. Then I entered "Hello World" and pressed return. Looking at
+the output I *see* "Hello World" twice even though I only entered it
+once.
+
+You can account for this behavior in your patterns. Alternatively,
+just turn off the echo. In your particular case though, it's doing
+the right thing, showing you the result of an interactive cat just as
+if you had typed it yourself.
+
+In practice, this kind of problem doesn't arise - because programs
+like cat aren't spawned (except in very special situations). I assume
+that cat was just something you chose to experiment with.
+
+Don
+
+======================================================================
+
+#38. Why can't I send the line "user@hostname\r"?
+
+From: libes (Don Libes)
+To: bt@nadine.hpl.hp.com
+Subject: Re: [Q] Expect, ftp and '@'
+
+> I am attempting to use Expect to perform anonymous ftp gets without
+>my having to type all the stuff --- I mean, waaaiiiting for the
+>prompt, entering a-n-o-n-y-m-o-u-s with my fat fingers, and the rest.
+>
+> But I have a probleme: as I set the password to be my e-mail address:
+> set password "bt@hplb.hpl.hp.com"
+
+> the ftp servers seem not to receive neither my login name nor the
+>at-sign. Some of them do not care, some others say "ok, but don't do
+>that again", and the last ones throw me off.
+
+The short answer is to upgrade to Expect 5.20 or later. If you
+don't feel like doing this, here's the explanation for older versions
+of Expect:
+
+spawn initializes the terminal by using your current parameters and
+then forces them to be "sane". Unfortunately, on your system, "sane"
+says to interpret the "@" as the line-kill character.
+
+The most sensible thing to do is change "sane" in your Makefile to
+something that makes sense. (Since you work at HP, you might also
+suggest that they modernize stty!)
+
+Here's an example of a replacement line for the Makefile:
+
+ STTY = -DDFLT_STTY=\""sane kill ^U"\"
+
+Other alternatives are: quote the @, or use the -nottyinit flag, or
+set the stty_init variable.
+
+Don
+
+======================================================================
+
+#39. How do I hide the output of the send command?
+
+From: tim@mks.com (Timothy D. Prime)
+Subject: Re: hide the text of expect's send command?
+Date: 29 Mar 1996 15:41:02 GMT
+
+In article <khughesDoy1yH.5zo@netcom.com>, Kirby Hughes <khughes@netcom.com> wrote:
+> I don't want to see (on the screen) the text sent by a "send" command. Is
+> there a way to hide it? "log_user 0" works for text coming back to me, but
+> doesn't (seem to) work for sending...
+>
+> #!/usr/local/bin/expect --
+> log_user 0
+> spawn telnet proxy
+> expect Command
+> send "c [lrange $argv 0 1]\n"
+> log_user 1
+> interact
+
+This answer courtesy of Timothy Prime, Mortice Kern Systems (tim@mks.com):
+
+The output you are seeing wasn't printed by the send command.
+(I.e., the log_user command is working just fine.) The output you see
+is from the interact command. The interact command found program
+output and thus wrote it to the terminal so that you could see it.
+That's what the interact command is supposed to do!
+
+Although the expanation might take a little thought, the solution is
+easy. Simply put an expect command in before the command "log_user 1".
+Match against the last characters that you wish to suppress.
+======================================================================
+
+#40. Why don't I see pauses between characters sent with send -s?
+
+From: jcarney@mtl.mit.edu (John C. Carney)
+Newsgroups: comp.lang.tcl
+Date: 12 Aug 1996 17:32:54 GMT
+Organization: Massachvsetts Institvte of Technology
+
+I am trying to use expect to spawn the kermit program. It then
+is supposed to dial the modem and procede.
+
+When I run kermit from the shell, it has no problem dialing the
+modem. However, when kermit is spawned by expect, it will not dial.
+
+I thought perhaps the input stream was too fast for kermit and tried
+send -s. I do see a long delay before the dial message is sent, but it
+still won't dial. Also, I would expect (no pun) that I would see the
+characters sent as follows:
+
+a<pause>t<pause>d<pause>t<pause> ...
+
+But instead I see:
+
+<long_pause>atdt ...
+
+What am I doing wrong?
+
+Thanks for you help.
+
+John Carney
+jcarney@garcon.mit.edu
+
+The send command doesn't wait for responses. The echoing you see
+is from an expect command running after send has run. At that point,
+all the characters have been echoed already - thus, you see the long
+pause (while send is running) and the rush of characters (while expect
+is running).
+
+Before you ask, no, it doesn't make sense to have send pause
+briefly and wait for echoing. Sometimes there is no echoing. And
+sometimes things aren't echoed in an intuitive way. So how could send
+possibly know what to wait for and how long?
+
+The solution is to use the expect background command:
+ expect_background -re .+
+
+Just put this after your spawn command and before you start sending
+things.
+
+Don
+
+======================================================================
+
+#41. Why does "talk" fail with "Who are you? You have no entry utmp" or
+ "You don't exist. Go away"?
+
+From: libes (Don Libes)
+To: Will Smith (AC) <william@ritchie.acomp.usf.edu>
+Subject: Expect
+
+Will Smith (AC) writes:
+>Hi there. I was wondering if you had any ideas to why i am getting
+>this problem running an Expect script which tries to spawn a talk
+>process to myself on another machine. Would it have anything to do
+>with the fact that the executables are NOT installed in /usr/local/bin
+>or because it wasnt installed by ROOT or what. This is what my Expect
+>script looks like.
+>
+>#! /home/ritchie/ops/william/test/expect -f
+>
+>spawn talk william@curiac.acomp
+>set timeout 200
+>expect {*established*}
+>set send_human {.1 .3 1 .05 2}
+>send -h "This is only a test.. I swear \ Please don't bust me with expect \n >expect "{*\r*}"
+>expect "{*\r*}"
+>exec sleep 5
+>send -h "Ok, well see ya tomorrow you idiot \n"
+>exec sleep 3
+>
+>The error i get is that it returns this when i run the script.
+>
+> Who are you? You have no entry in /etc/utmp! Aborting...
+
+On most systems, Expect does not automatically make a utmp entry. (A
+utmp entry normally indicates login information which seems kind of
+pointless for Expect scripts.) This allows Expect to run non-setuid.
+
+Normally, this lack of utmp entries doesn't mean much. However, a few
+programs actually refuse to run without a utmp entry. Fortunately,
+there are workarounds:
+
+Program-dependent solutions:
+
+"talk" is the only program I'm aware of that falls into this category.
+One solution is to get ytalk. ytalk doesn't have this problem plus it
+fixes many other bugs in talk, such as being able to communicate with
+both old and new talk.
+
+Program-independent solutions:
+
+Use a program specifically intended to create utmp entries. Such
+programs are easy to write or get if you don't have them already. For
+instance, sessreg is one which comes with the xdm distribution. And
+Solaris uses utmp_update. I like this approach because it isolates
+the setuid code in a small single system utility rather than in every
+program on the system that needs this ability.
+
+Tod Olson <tao@stone.lib.uchicago.edu> sent in the following
+example of how to use sessreg. He says: sessreg works nicely. Here
+is a fragment showing how we invoke sessreg on our Linux machines.
+Note: sessreg must be able to write utmp. We decided to make utmp
+work writable, since it's a kinda bogus creature anyhow, rather than
+make sessreg suid root (or whatever).
+
+...
+spawn $shell
+expect $prompt
+send "sessreg -w /var/run/utmp -a $user\r"
+expect $prompt
+======================================================================
+
+#42. Why does . match a newline?
+
+From: libes (Don Libes)
+To: xipr@alv.teli.se (Ivan Prochazka)
+Subject: Why does . match a newline?
+Ivan Prochazka writes:
+>
+>Hello Don.
+>
+>In my opinion(and emacs) the regexp-symbol "." stands for all
+>characters except newline(\n).
+>This is not the case in Expect 5.2.
+
+Yes, there are some packages that follow this convention, but I don't
+think it is appropriate for Expect. Unlike emacs, most Expect
+patterns don't look for full lines - more often they look for prompts
+which *don't* end with newlines.
+
+I find that I actually write the [^\n] pattern very rarely. And
+if I write it frequently in a script, then the expect itself probably
+ought to be in a subroutine.
+
+In fact, the more common line-terminating sequence in Expect is \r\n,
+so that might make a more likely argument. In any case, Expect
+defines . the way POSIX does. So I feel pretty good about the
+definition of . being what it is.
+
+Don
+
+======================================================================
+
+#43. Why doesn't Expect kill telnet (or other programs) sometimes?
+
+From: libes (Don Libes)
+To: Karl.Sierka@Labyrinth.COM
+Subject: Re: need help running telnet Expect script from cron on sunos 4.1.3
+
+karl.sierka@labyrinth.com writes:
+> The only problem I am still having with the script I wrote is that
+> the telnet does not seem to die on it's own, unless I turn on debugging.
+
+Actually, Expect doesn't explicitly kill processes at all. Generally,
+processes kill themselves after reading EOF on input. So it just seems
+like Expect kills all of its children.
+
+> I was forced to save the pid of the spawned telnet, and kill it with an
+> 'exec kill $pid' in a proc that is hopefully called before the script
+> exits. This seems to work fine, but it makes me nervous since omnet
+> charges for connect time, and leaving a hung telnet lying around could
+> get expensive. I warned the rest of the staff so that they will also be
+> on the lookout for any possible hung telnets to omnet.
+
+The problem is that telnet is not recognizing EOF. (This is quite
+understandable since real users can't actually generate one from the
+telnet user interface.) The solution is to either 1) explicitly drive
+telnet to kill itself (i.e., a graceful logout) followed by "expect
+eof" or 2) "exec kill" as you are doing.
+
+This is described further in Exploring Expect beginning on page 103.
+
+Don
+
+======================================================================
+
+#44. How come I get "ioctl(set): Inappropriate ..., bye recursed"?
+
+From: libes (Don Libes)
+To: james@Solbourne.COM (James B. Davis)
+Subject: How come I get "ioctl(set): Inappropriate ..., bye recursed" ...
+Date: Tue, 10 Dec 91 10:47:21 MST
+
+>Every time I ^C out of a Expect script run I get:
+>
+>ioctl(set): Inappropriate ioctl for device
+>bye recursed
+>
+>james@solbourne.com
+
+This answer courtesy of Michael Grant (mgrant@xdr.ncsl.nist.gov):
+
+You (or whoever installed gcc) forgot to run the fixincludes shell
+script while installing gcc. Recompiled gcc with itself, then run the
+fixincludes script - and the messages will go away.
+
+Michael Grant
+======================================================================
+
+#45. How come there's no interact function in the Expect library?
+
+From: libes (Don Libes)
+To: Djamal SIMOHAND <djamal@lyohp5.in2p3.fr>
+Subject: Re: exp_expectl
+Date: Wed, 3 Jan 96 12:17:01 EST
+
+Djamal SIMOHAND writes:
+>I have already used the Expect program to write a script to connect by
+>telnet on my machine. Now I made a graphic interface in C and I need
+>the expect in C in order to have a coherent executable.
+>
+>I've already written most of the C already, but the connection is
+>closed just after my program is finished. Then I have no opportunity
+>to work on my machine. It seems I need of the equivalent of
+>"interact" in C. Is there such a function in the C library?
+>
+>Thanks for your help,
+> Djamal
+
+No, there is no interact-like function in the C library. The reason
+is three-fold:
+
+1) It is simple enough to write your own. It's just a loop after
+all:
+
+ while 1 {
+ select/poll()
+ read()
+ write()
+ }
+
+2) There's no way I could possibly provide all the options you might
+need. In Expect, it's not a problem because the environment is very
+controlled, but in C, it's impossible to control what you might want
+to do. For example, you mention that you're embedding your code in a
+graphics application. Graphics packages typically have their own
+event manager, so you wouldn't want a monolithic interact function.
+
+3) The library is intended for embedding in other applications, where
+it rarely makes sense to give the user direct control of a spawned
+process. That kind of thing makes so much more sense to handle with
+an Expect script than a C program. The C library was not intended as
+a replacement for Expect. Expect is really the tool of choice for
+interaction problems, not C.
+
+In summary, there's very little payoff for the library to supply an
+interact function. A simple one would only satisfy people who should
+be using Expect anyway - and it's impossible to create one that would
+do everything that everyone wants. It's easier just to let people
+create their own.
+
+Don
+
+======================================================================
+
+#46. Can't you make tkterm understand any terminal type?
+
+From: swig@teleport.com (Scott Swigart)
+Newsgroups: comp.lang.tcl
+Date: Tue, 13 Aug 1996 18:50:22 GMT
+
+I looked at tkterm, and it is promising, but it's missing some
+critical features. For one, I need something that understands various
+terminal types, and can get it's escape sequences from something like
+termcap or terminfo, instead of having them hard coded. Also, I
+question the ability of an Expect script to keep up if it had 50 or so
+types of escape sequences to parse. Actual C code would probably have
+to be created to do the parsing, and if you're going to go that far,
+why not just create a terminal widget so you could do something like:
+
+terminal .myterm -type vt220
+
+which is more along the lines of what I was originally looking for.
+
+Yes, that would be divine. But terminal emulators are horribly
+complex and very little of that complexity can be discerned from the
+termcap file. For example, compare xterm's human-readable docs (63k
+man page + 18k appendix) to its termcap entry (654 bytes). Now
+consider the other hundreds of terminals in termcap each with their
+own weird extensions. I can't imagine what kind of ".myterm configure"
+interface you'd present to the user. What would you allow the user to
+change? The nice thing about tkterm is that everything is accessible
+to the user, but I can't imagine doing that through a widget
+interface.
+
+Unfortunately, like everyone else, I don't have the time...
+
+Me neither. Call me lazy.
+
+As an aside, I wonder why you want the ability for a terminal emulator
+to read termcap/info. Turns out that it's useless (unless what you
+are doing is testing termcap itself). Because if your app is using
+termcap in the first place, then it doesn't care what terminal type
+you choose - so why not choose the one that tkterm does? (And if your
+app isn't using termcap, then you have the converse problem.)
+
+Actually, I and several other people did a fair amount of
+experimentation (i.e., wrote a lot of C code) to do a universal
+terminal emulator - turns out that it's not possible in a general
+sense. To support any terminal type, you are going to be forced to go
+beyond what termcap/info offers. I.e., you'll have to handedit the
+definition or add new ones and/or accept certain limitations.
+
+After many revisions, Software - Practice & Experience is
+publishing a paper on tkterm. The paper includes more insights on the
+difficulties I've mentioned here. You can get a draft of the paper
+at: http://www.cme.nist.gov/msid/pubs/libes96d.ps
+
+Don
+
+======================================================================
+
+#47. Trapping SIGCHLD causes looping sometimes
+
+From: Bryan Kramer <bryan.kramer@hydro.on.ca>
+Sender: kramer@hydro.on.ca
+Cc: libes@NIST.GOV
+Subject: Problem with trap in expect on Solaris
+Date: Tue, 17 Sep 1996 11:09:50 -0400
+
+I'm getting an infinite loop running the attached script foo.tcl on my
+solaris machine (Ultra Sparc, SunOS 5.5). This does not happen when I
+run the version of the same expect that I compiled on a Sparc 20 with
+SunOS 4.1.3UI (even though I am running it on the Solaris 5.5. ultra).
+
+trap {
+ if {[catch {
+ puts stderr "CALL TRAP [trap -number] [trap -name]"
+ wait -i 1
+ } output]} {
+ puts stderr "TRAP $output"
+ return
+ }
+ puts "TRAP DONE"
+} SIGCHLD
+
+
+if {[catch {exec trivial} msg]} {
+ puts stderr "Error $msg"
+}
+
+
+Please let me know if there is an immediate work around.
+
+Thanks
+--
+|Bryan M. Kramer, Ph.D. 416-592-8865, fax 416-592-8802|
+|Ontario Hydro, 700 University Avenue, H12-C1 |
+|Toronto, Ontario, Canada M5G 1X6 |
+<A href="http://www.cs.toronto.edu/~kramer">B. Kramer Home Page</A>
+
+I haven't analyzed your script in depth, but this sounds like a
+problem I've seen before - it's due to an implementation deficiency in
+Tcl. The problem is that when an exec'd process finishes, it raises
+SIGCHLD. Expect's "wait" sees that it is Tcl's process.
+Unfortunately, there is no way to wait for one of Tcl's processes and
+tell Tcl that you've done so, nor is there any way to have Tcl wait
+itself. So Expect's wait just returns. On some systems alas, this
+just causes SIGCHLD to be reraised.
+
+The solution is multipart:
+ 1 Tell John he needs to fix this problem. (I've told him this but he
+didn't agree with me that it's a problem.) Tcl needs to provide a new
+interface - either to clean up its process or to allow extensions to
+do the wait and pass the status back to Tcl so that it can have it
+later when needed.
+ 2 Don't call exec while you are trapping SIGCHLD. Since this is a
+severe limitation, I recommend you avoid the problem by using
+"expect_before eof" to effectively trap the same event. If you're not
+already using expect, well, call it every so often anyway.
+
+Don
+
+======================================================================
+
+#48. Why do I get "invalid spawn id"?
+
+Subject: Why do I get "invalid spawn id"
+In article <53ggqe$hag@hole.sdsu.edu> khumbert@mail.sdsu.edu writes:
+ I am trying to write a general looping procedure that will handle
+ many cases that have similar prompt sequences. The function and one
+ call are below.
+ The problem is that when the "looping" function is called I get an
+ "invalid spawn id(5) while executing "expect $exp1 {send -s "$send1}
+ timeout {continue}". I only have one spawn in the entire program
+ (a telnet session). I've tried setting a spawn_id variable for the
+ telnet spawn and then setting spawn_id to that variable in "looping",
+ but no dice, same error.
+
+ Any ideas? Thanks in advance for any suggestions!!!
+
+ Kelly Humbert
+
+ proc looping {exp1 exp2 send1 send2} {
+ global max_tries ### 5 ###
+ set tries 0
+ set connected 0
+ set timeout 60
+
+ while {$tries <= $max_tries && $connected == 0} {
+ incr tries
+ expect {
+ $exp1 {send -s $send1}
+ timeout {continue}
+ }
+ expect {
+ ">? " {send -s "\n"}
+ timeout {continue}
+ }
+ expect {
+ $exp2 {incr connected;send -s $send2}
+ timeout {continue}
+ }
+ }
+ return $tries
+ };
+
+What's going on is that the spawned process has closed the
+connection. When Expect detects this, it matches the "eof" pattern,
+and the spawn id is marked "invalid". However, you aren't testing for
+"eof", so the next command in your script finds the invalid spawn id,
+hence the complaint.
+
+If you want to find out where the eof is occurring, enable Expect's
+diagnostic mode - Expect will get very chatty about what it is doing
+internally.
+
+You can handle eof in all your expect statements by add a single
+expect_before/after command to your script.
+
+Don
+
+======================================================================
+
+#49. Could you put a version number in the filename of the Expect archive?
+
+From: "Nelson H. F. Beebe" <beebe@math.utah.edu>
+Date: Mon, 23 Dec 1996 08:46:57 -0700 (MST)
+
+It would be helpful for the expect distribution to contain its version
+number, e.g. expect-5.21.6.tar.gz; I had an earlier version called
+5.21, and it took some diffing to verify that the expect.tar.gz I
+fetched from ftp://ftp.cme.nist.gov/pub/subject/expect/expect.tar.gz
+really was newer.
+
+I don't name the file with a version number because I make new
+distributions so frequently. I realize that many other distributions
+include version numbers in them, but constantly changing filenames
+really annoys the heck out of people. I've been packaging Expect this
+way for five years and I've only gotten this question twice before.
+In contrast, I'm responsible for a number of other files on our ftp
+server that do occasionally change names, and I get no end of
+questions from people about where such and such a file has gone or why
+their ftp request fails.
+
+So that people don't have to download the distribution only to find
+it hasn't changed, there is a HISTORY file in the distribution
+directory. It's relatively short and has the latest version number at
+the top (with any changes listed immediately after).
+
+Don
+
+======================================================================
+
+#50. Why does Expect work as root, but say "out of ptys" when run as myself?
+
+Expect works fine as root, but when I run it as myself it says "out of
+ptys" (which I know isn't true). Any ideas?
+
+Sounds like a misconfiguration problem on your system. For
+example, once I saw this on a Digital system where the system
+administrator had decided to remove setuid from all programs ("I heard
+that setuid is a security risk, right?"). On that particular system,
+Expect uses a system library function that internally calls an
+external program chgpt which exists solely for the purpose of managing
+ptys. Needless to say, it must be setuid. Unfortunately, the library
+function doesn't do enough error checking, and there's no way for Expect
+to know that, so there's nothing I can do to give a better diagnostic
+explaining how your system is misconfigured.
+
+Don
+
+======================================================================
+
+#51. Why does spawn fail with "sync byte ...."?
+
+When I spawned a process using Expect, I got the following
+message:
+
+parent: sync byte read: bad file number
+child: sync byte write: bad file number
+
+This is one of these "should not happen" errors. For example, the
+following question in this FAQ mentions that it could be the fault of
+the C library. Another possibility is that you've run out of some
+system resource (file descriptors). The most likely reason is that
+you're calling spawn in a loop and have neglected to call close and
+wait.
+
+Don
+
+======================================================================
+
+#52. Why does Expect fail on RedHat 5.0?
+
+Lots of people have reported the following error from Expect on
+RedHat 5.0:
+
+failed to get controlling terminal using TIOCSCTTY
+parent sync byte write: broken pipe
+
+Martin Bly <ussc@star.rl.ac.uk> reports that:
+
+The fault is/was in the GNU libc (aka glibc) provided by Red Hat
+Software. Our sysadmin updated the version of the C libraries we have
+installed and both problems have vanished - in the case of the expect
+test, without a rebuild.
+======================================================================
+
+#53. Why does Expect fail on RedHat 5.1?
+
+People have reported the following error from Expect on RedHat
+5.1:
+
+failed to get controlling terminal using TIOCSCTTY
+parent sync byte write: broken pipe
+
+If there are any people
+who have some debugging experience and can reproduce that error on
+RedHat 5.1, read on:
+
+First look in the man page (or perhaps diff the 5.1 and pre-5.1 man
+pages) governing TIOCSTTY and let me know what you find.
+Alternatively look at the source to xterm (or some other program that
+must allocate a pty) and see how it is allocating a pty.
+
+If anyone else is wondering if the problem has been fixed by the time
+you read this, just check the FAQ again. I'll update it as soon as
+the problem has been successfully diagnosed.
+
+Don
+
+======================================================================
+
+#54. Is Expect Y2K compliant?
+
+The short answer is: Yes, if you're using a modern version of Tcl
+(7.6p2 or later).
+
+Longer answer: Tcl 7.5 and 7.6p0/1 had bugs that caused them to be
+noncompliant with regard to how POSIX defines 2-character years. If
+your scripts use 2-character years, you should upgrade to a modern
+version of Tcl. If your scripts use 4-character years, than you have
+nothing to worry about.
+
+Don
+
+======================================================================
+
+
+Names of companies and products, and links to commercial pages are
+provided in order to adequately specify procedures and equipment used.
+In no case does such identification imply recommendation or
+endorsement by the National Institute of Standards and Technology, nor
+does it imply that the products are necessarily the best available for
+the purpose.
+
+Last edited: Tue Sep 22 17:52:23 EDT 1998 by Don Libes
diff --git a/HISTORY b/HISTORY
new file mode 100644
index 0000000..56be943
--- /dev/null
+++ b/HISTORY
@@ -0,0 +1,3552 @@
+This is the HISTORY file for Expect. Modifications made by Cygnus
+support are in ChangeLog. - Don
+
+Date Version Description
+------- ------- ------------------------------------------------------
+1/31/06 5.44.1 Marius Schamsula <marius173@mchsi.xcom> reported tclconfig
+ missing, evidentally for new TEA.
+
+1/20/06 5.44.0 Lots of massaging to fix TEAification of Makefile and configure
+ including that version numbers will now be full three part.
+
+ Daniel Wong <danielwong@berkeley.xedu> noted the home page
+ should note that Wikipedia has a very readable entry for
+ Expect.
+
+ Andre Alves <aalves@escloyalty.xcom> noted passmass needed some
+ fixes to handle Solaris 9 passwd prompt changes.
+
+ Andreas fixed several things: changes to better support TEA,
+ fix debugger interaction with nonblocking mode, and probably
+ other things I'm overlooking.
+
+ Martin Dietze <di@fh-wedel.xde> noted that autoconf 2.59 is
+ confused by C comment after undefs in expect_cf.h.in.
+
+ Added additional code to unbuffer -p so that if a process
+ earlier in the pipeline exits, unbuffer attempts to
+ recover any remaining output from the spawned proc before
+ unbuffer itself exits.
+
+ Jeffrey Hobbs noted that once stty was called, a bg'd script
+ would be suspended at exit. Turned out to be overaggressive
+ code in stty that recorded what 'damage' the user might have
+ caused when calling stty in the first place.
+
+ Jens Petersen provided patch to make setpgrp configure better
+ on some Linux systems.
+
+ Added example/getpassck script to test for getpass bug.
+
+ multixterm had debugging stuff leftover ("hello").
+
+2/7/05 5.43.0 Martin Forssen <maf@tkrat.xorg> fixed bug in ExpOutputProc
+ that caused misbehavior during partial writes.
+
+ Someone noted that gets stdin behaves differently (returns -1
+ immediately) from tclsh because with 5.42, stdin is unblocked
+ by defaults.
+
+ Robroy Gregg <robroy@armory.xcom> noted that expect_background
+ ignores timeouts. Added to documentation.
+
+ Jens Petersen <peterson@redhat.xcom> provided patch for
+ "mkpasswd -vo".
+
+ Gary Bliesener <gary.bliesener@nextel.xcom> noted that
+ multixterm failed on his system which had an old Tk that didn't
+ support the Tk package.
+
+8/3/04 5.42.1 Removed beta designation.
+
+ Daniel A. Steffen <steffen@ics.mq.edu.xau> provided patch for
+ MacOS to avoid panic-redefinition.
+
+7/6/04 5.42b0 Releasing as beta because nonblocking mode is a big change in
+ the code. http://expect.nist.gov/beta.tar.gz
+
+ Alexander Doktorovich <alexander.doktorovich@ericsson.xcom>
+ wanted to use Expect as a filter. This is possible but 'too
+ hard'. To make it easier, added close_on_eof command to
+ control whether expect/interact automatically close the
+ channel on eof. This should simplify/enable other scripts.
+
+ Kurt Heberlein <kurth@3pardata.xcom> noted that Expect would
+ hang. Andreas tracked it down to a change in Tcl such that
+ when Tcl had data left in its buffers, it would check for more
+ data rather than returning what it had to Expect first. If
+ no data was forthcoming then Tcl would hang because the pty
+ driver runs in blocked mode. Recoded to use nonblocking mode.
+
+ Yi Luo <yluo@brocade.xcom> noted that multixterm xterms were
+ reporting the parent's X window ids (via the WINDOWID env
+ variable) instead of the new ones.
+
+ Dick Van Deun <dirk@dinf.vub.ac.xbe> noted that kibitz expects
+ to find write in /bin but it is in /usr/bin on Slackware.
+ Seems safe to drop the prefix.
+
+ Steve Lee <steve@tuxsoft.xcom> noted that building Expect
+ failed on Linux when built from scratch because stty ends up
+ in /usr/local/bin rather than the assumed /bin. Added code to
+ support this.
+
+4/20/04 5.41.0 Simon Taylor <simon@unisolve.com.xau> provided fix for
+ interact -o which was completely broken by 5.40.1.
+
+4/6/04 5.40.1 Added scroll support to official tkterm. Copied all fixes
+ from/to term_expect to/from tkterm.
+
+ Kiran Madabhushi <maskiran@hotmail.xcom> encountered interact
+ diagnostics incorrectly pointing to expect_background. Also,
+ found multiple -o flags behaving unexpectedly. Added diag.
+
+ Kristoffer Eriksson <ske@pkmab.xse> noted typo in SIMPLE code
+ in exp_inter.c. However, this is extremely unlikely to affect
+ any machines.
+
+ Reinhard Max <max@suse.xcom> noted that "make test" failed when
+ run in the background. The log testcase was testing the
+ send_tty command. Added code in both Expect and in the test
+ to handle this.
+
+1/30/04 5.40.0 Eric Raymond <esr@snark.thyrsus.xcom> provided troff-related
+ fixes for the expect, lib, and dislocate man pages.
+
+ Rich Kennedy <rickenne@cisco.xcom> noted a bug having to do
+ with our caching of whether we have registered a filehandler.
+ This broke when Tcl was setting a handler on the same file.
+
+ Ken Pizzini <ken.pizzini@explicate.xorg> provided patch for
+ leak in spawn error handling.
+
+ Pete Lancashire <plancashire@columbia.xcom> noted autopasswd
+ example broke on Solaris which capitalized prompts.
+
+7/31/03 5.39.0 Poorva Gupta <poorva@cup.hp.xcom> noted that grantpt/unlockpt
+ order was backward. Strange that this was never a prob before!
+
+ Andreas Kupries <andreask@pliers.activestate.xcom> noted that
+ in exp_command.c, Tcl_GetChannelHandle expected a ClientData*,
+ but got an int*. sizeof(int) != sizeof(ClientData) on 64bit
+ platforms. Crashed the command on a PA-RISC 2.0 machine with
+ --enable-64bit set. Fix: Use temp. variables of type ClientData
+ to retrieve the fd's, and copy this into the actual variables,
+ with a cast to int.
+
+ More fixes from Andreas to sync this version with SF.
+ Fixed: exp_chan, weather, exp_main_tk.
+
+ Eric Raymond <esr@snark.thyrsus.xcom> provided a troff-related
+ fix for the multixterm man page.
+
+7/29/03 5.38.4 Nicolas Roeser <n-roeser@gmx.xnet> noted confusion with md5 so
+ I made the Expect page more explicit about which file that hash
+ was based on.
+
+7/11/03 5.38.3 Josh Purinton noted that earlier fix wasn't quite right. Exit
+ on INT/TERM should cause Expect to exit with signal embedded in
+ status. He also requested I obfuscate email addresses in this
+ file.
+
+7/7/03 5.38.2 Guido Ostkamp <Guido.Ostkamp@t-online.xde> and Igor Sobrado
+ <sobrado@string1.ciencias.uniovi.xes> noted that fixline1
+ rewrote scripts to be expect scripts even if they were expectk
+ scripts.
+
+5/27/03 5.38.1 Dirk Petera <dirkpetera@yahoo.xcom> noted that any_spawn_id
+ used to work but did no longer. Looks like a bug left over
+ from the the I18L conversion. Fixed.
+
+ Steve Szabo noted exp_log_file -open channel failed. Fixed.
+
+ Fixed bug from 5.31 that prevent stty from returning messages
+ from underlying program.
+
+ Thomas Dickey <dickey@herndon4.his.xcom> noted that ncurses
+ ignores 2-char term names because of, well, poor assumptions
+ and coding. Changed tkterm to use longer names.
+
+ Heath Moore <hmoore@systran.xcom> noted that exp_clib could
+ lock up if remtime happened to be precisely 0. Recoded to
+ avoid.
+
+ At request of Per Otterholm <otterholm@telia.xcom>, wrote
+ script to read from stdin and echo passwords (exercise 9 in Tk
+ chapter of Expect book). Added to example directory as
+ passwdprompt.
+
+ Josh Purinton <josh@purinton.xorg> pointed out that
+ by default, SIGINT/TERM should cause expect's return status to
+ be 1, not 0.
+
+ Paul Reithmuller <paul.reithmuller@eng.sun.xcom> noted that
+ unbuffer shouldn't postprocess its output. Added stty_init.
+
+ Mordechai T. Abzug <morty@sanctuary.arbutus.md.xus> noted that
+ log_file wasn't recording -append status.
+
+ James Kelly <macubergeek@comcast.xnet> noted weather example
+ needed new source.
+
+ Dimitar Haralanov <mitko@tahoenetworks.xcom> noted that
+ interact dumped core with interact { timeout 1 }
+
+7/18/02 5.38.0 At request of Hugh Sasse <hgs@dmu.ac.xuk> added md5 hash of gz
+ to homepage.
+
+ Dave Schooler <dave@stashtea.xcom> reported that send -s wasn't
+ handling certains chars correctly. Turned out to be those
+ that had multibyte UTF8 reps. send -s was just pumping out
+ hunks of bytes without regard to UTF boundaries and evidentally
+ Tcl's I/O engine thought that it should translate a partial
+ UTF8 character into, uh, something else.
+
+ Curt Shroeder <c.schroeder@computer.xorg> fixed bug in rftp - a
+ a filename looked enough like a 3-digit diagnostic that the
+ script got confused.
+
+4/16/02 5.37.2 Multixterm couldn't find man page all the time.
+
+4/16/02 5.37.1 Made multixterm handle user-supplied args.
+
+4/15/02 5.37.0 Added multixterm to example directory.
+
+4/8/02 5.36.1 Backed out CONST qualifiers. Too much trouble with older
+ versions of Tcl. I'll let someone else worry about them.
+
+4/8/02 5.36.0 Made first cut at multixterm, a replacement for crlogin.
+
+ Fixed bug in background handler. If an action waited on the
+ same spawn id, esPtr would become invalidated.
+
+ Ryan Schmidt <rschmidt@mac.xcom> noted configure didn't
+ recognize MacOS X. Downloaded new config.guess.
+
+ Andreas Kupries <andreask@activestate.xcom> provided CONST
+ patches to accomodate Tcl changes per TIP 27.
+
+2/25/02 5.35.0 Joe Eggleston <joe@arbor.xnet> noted bug in full_buffer test.
+ The test hadn't been I18'd properly and was testing chars
+ instead of bytes. Also fixed diagnostics so it printed when
+ it was testing full buffer even if there wasn't one.
+
+2/7/02 5.34.1 Bruce Hartweg <brhartweg@bigfoot.xcom> noted that direct spawn
+ ids were not being tested so something like "expect -i exp9999"
+ would dump core. Evidentally a bug from the 5.31 transition.
+
+12/20/01 5.34.0 Don Porter <don.porter@nist.xgov> provided package-related
+ fixes for test suite.
+
+ Brian Theado <brian.theado@usa.xnet> noted that interact's -re
+ support broke when offsets kicked in. Turned out that the
+ regexp engine supports them during execution but the results
+ are delivered RELATIVE to the offset. (I suspect this was done
+ due to expediency.)
+
+10/1/01 5.33.0 <mark@doradosoftware.xcom> found that expect's diagnostics
+ didn't include the "no" after testing for a full buffer.
+
+ Hemang Lavana <hlavana@cisco.xcom> noted that "debug" (Dbg_On)
+ calls didn't always force the debugger into step mode.
+
+ Martin Kammerhofer <dada@sbox.tugraz.xat> noted that the man
+ page neglected to document interpreter -eof.
+
+ Chris Clare <clarec@nortelnetworks.xcom> provided fix for
+ multiple decl in C lib.
+
+ Sheng Wang <wangs@sh.bel.alcatel.xbe> found interact's
+ can-match code had broken. It was missing the special hook
+ that Henry had added just for this purpose. How strange.
+
+ Dieter Fiebelkorn <dieter@fiebelkorn.xnet> requested addition
+ to config.guess for Power*Macintosh:Darwin for MacOSX.
+ Aside - to download latest config.guess:
+ cvs -d :pserver:anoncvs@subversions.gnu.org:/cvs co \
+ autoconf/config
+
+ Added pipeline example to unbuffer man page.
+
+8/4/00 5.32.2 Allen J. Newton <anewton@alturia.fleet.xorg> provided code for
+ generating passwords with special characters in mkpasswd.
+
+ Brent Welch <welch@ajubasolutions.xcom> changed the fix1line
+ install script so that "autoexpect" and other scripts that
+ get installed into the platform-independent bin directory
+ generically invoke "expect" from the users PATH instead
+ of hardwiring the platform-specific expect pathname.
+
+ TclPro 1.4 released with 5.32.2 bundled.
+
+7/13/00 5.32.1 Uwe Klein <uwe-klein@foni.xnet> reported segfaults from reading
+ nulls. Due to code rewrite in 5.30->5.31 transition.
+
+5/14/00 5.32.0 New version for timing with Ajuba TclPro 1.4. This version
+ of Expect has no new features or behaviors but a lot has been
+ fixed since 5.31.0.
+
+ Martin Buchholz <martin@xemacs.xorg> noted that his
+ alphaev56-dec-osf4.0e has ptmx and ptmx_bsd (and ptm, pts,
+ pty, ptym). He suggested that BSD things are now usually
+ deprecated so to skip ptmx_bsd if ptmx avail.
+
+ Chang Li <changl@neatware.xcom> noted that debugger's bp cmd
+ broke on every command. Was a bug in breakpoint_trace from
+ when we installed the new regexp engine.
+
+ Jonathan Kamens fixed printf formats in several pty diags.
+
+ rm_nulls -d was set to wrong value.
+
+5/12/00 5.31.8 After receiving yet another request for fully versioned
+ archives, gave in.
+
+ Signal handler sometimes sent error to stderr inappropriately.
+
+4/27/00 5.31.7 Rob Savoye fixed Debian ptys and properly checking of libpt.
+
+3/8/00 5.31.6 Petrus Vloet <petrus.vloet@siemens.xat> noted that Expect
+ installed tclRegexp.h which included regex.h which of course
+ misbehaves when it reads the system's version. This is new
+ since 8.0. Since I need to revise the Clib anyway (which
+ is what this install was for), I'll back this out for now.
+
+3/6/00 5.31.5 Larry Virden noted that configure checked for threads twice.
+
+2/19/00 5.31.4 Omer Azmon <oazmon@telsoft-solutions.xcom> note errors in
+ pty_termios.c in exp_pty_test that caused problems during
+ pty testing.
+
+ Jeffrey Hobbs recommended having configure accept and warn
+ about --enable-threads.
+
+ John Ellson <ellson@lucent.xcom> noted configure's autoconf
+ testing had leftover debugging code. Also provided a fix for
+ building w/shared libs on HP - appeared to be leftover from
+ earlier Tcl-required configuration that has now disappeared.
+
+ Susan Muston <smuston@crosskeys.xcom> noted that exp_wait with
+ no spawned processes exited immediately which is different
+ than 5.29 behavior which reported "no children". This new
+ behavior was evidentally a gratuitous change during the
+ channel driver addition. Backed out. At the same time,
+ neither behavior matches documentation - doc should be fixed
+ and improved except I'm not sure if the behavior should yet
+ be something else (depending if stdin closed or not).
+
+ istvan.nadas@epfl.ch reported "spawn cat;exp_open" failed.
+ Uninited variable.
+
+ Scriptics reported memory leak. Was bug in parse_expect_args.
+
+ "Michael P. Reilly" <arcege@shore.xnet> noted clib was hanging
+ in spawn code. status_pipe wasn't being closed.
+
+ Egil Kvaleberg <egil@kvaleberg.xno> provided fix due to new gcc
+ which defines strchr as a macro.
+
+ Dave Morrison <drmorris@corp.phone.xcom> noted some printfs
+ in exp_log.c that misinterpreted embedded %'s with resulting
+ core dumps.
+
+ Dick Goodwin <goodwin@qosnetics.xcom> noted that "system echo
+ foo" returned with no apparent effect. Due to closeonexec
+ in expect's channel driver. Added skip if std channel.
+ Fixed similar bug in stty command. Minor bug left in stty
+ which isn't passing output back from underlying exec.
+
+ Stacy W. Smith <stacy@ixc-comm.xcom> provided patch that uses
+ sigsetjmp instead of setjmp that he says fixes a problem he
+ encountered with C lib where it stopped timing out in expect()
+ as if the signals were corrupted. The man page doesn't
+ explain the difference between these calls in a way that makes
+ sense as to why they should make a difference, but I'll the
+ names are certainly suggestive so I'll try it. He says "it
+ appears that the linux setjmp behaves a little differently
+ compared to setjmp on some other OSs. Specifically, setjmp
+ on linux does not save the signal context. It seems most
+ BSDish OSs do save the signal context with setjmp. On those
+ machines, it appears setjmp(env) is equivalent to
+ sigsetjmp(env,1) whereas on linux, setjmp(env) is equivalent
+ to sigsetjmp(env,0). My patch made a (probably bad)
+ assumption that if siglongjmp() exists that we should use
+ the sigXXX versions. I specifically tested for siglongjmp
+ rather than sigsetjmp because on linux, sigsetjmp is just a
+ #define for __sigsetjmp. It appears that linux will give
+ the BSD behaviour if __FAVOR_BSD is defined, but I didn't
+ know what other implications that might have.
+
+ Michael Schumacher provided fix so that test for whether
+ configure was out-of-date worked when not using the default
+ build dir.
+
+11/1/99 5.31.3 Shlomi Mahlab <shlomi@seagull.co.xil> noted all.tcl in CVS
+ but not distribution.
+
+ More notes from Keith Brown on HP cc complaints in exp_pty.c.
+
+10/28/99 5.31.2 "Keith Brown" <surely@nortelnetworks.xcom> noted that HP cc
+ objected to auto aggregate initialization in
+ expLogChannelOpen.
+
+10/22/99 5.31.1 Official release!
+
+ P Darcy Barnett <pdb@cam.nist.xgov> noted Makefile could
+ produce "autoconf not found" for non-developers using CVS.
+ Made configure detect and provide advice on workaround.
+
+ Fixed bug in interact -echo exhibited in rftp example.
+
+ Ryan Murray <rmurray@cyberhqz.xcom> noted Expect wasn't
+ handling handling 8-bit bytes correctly. I had accidentally
+ used Tcl_Write instead of Tcl_WriteChar.
+
+ Ashley Pittman <ashley@ilo.dec.xcom> noted that digital unix
+ V5.0 prefers openpty (4000 ptys) over ptmx (60 ptys), so I'm
+ reversing the login in pty_termios.c. This also controls
+ linux, but no linux hackers have weighed in on this subject
+ yet.
+
+ Andrew Tannenbaum <trb@world.std.xcom> noted exp_internal
+ command and "expect -exact" were broken.
+
+6/29/99 5.31.0 See the NEWS file for this date for an overview. (I'm
+ too tired to add all the details. Maybe later.)
+
+ Fixed exp_clib so that it immediately reported failure of
+ exec (in spawn) rather than passing it back through pipe.
+
+ Removed error checking from ioctl(TIOCSCTTY) to pacify the
+ variety of (but not all) Linux systems and a few others which
+ define TIOCSCTTY but return an error although seem to work
+ anyway.
+
+ Added configure test for 0 vs 2-arg setpgrp.
+
+ Kenji Kamizono <kenji@math.columbia.xedu> noted it was possible
+ to compile Linux (2.2.5) so that it recognized both openpty
+ and ptmx leading to conflicts. I arbitrarily chose ptmx.
+
+10/15/99 5.30.2 Herve Tireford <tdes46@email.sps.mot.xcom> noted extraneous
+ sleep(20) in clib. Apparently left over from debugging, oops.
+
+8/18/99 5.30.1 Added test for newer versions of Tcl that are incompatible.
+
+ Kenji Kamizono <kenji@math.columbia.xedu> noted it was possible
+ to compile Linux (2.2.5) so that it recognized both openpty
+ and ptmx leading to conflicts. I arbitrarily chose ptmx.
+
+4/1/99 5.30.0 Martin Forssen <maf@crt.xse> provided fix to allow configure
+ to start with LDFLAGS from environment.
+
+ Paul Tazzyman <Paul.Tazzyman@one.xat> noted that log_file
+ didn't check for logging twice without turning off logging
+ first.
+
+ Ben <spy@calvin.iconoclasm.xorg> provided updated host for
+ weather example.
+
+ Jonathon Kamens noted that Expect didn't build properly if
+ Tcl and/or Tk used build/install directories out of the usual
+ hierarchy. At the same time, I fixed a number of other related
+ problems in Makefile/configure.
+
+ Pierre Pomes <ppomes@it.marseille-innov.assoc.xfr> provided fix
+ to ftp-inband. It blew up from an unprotected send that
+ was handed a uuencoded line that started with a -.
+
+ Autoexpect was thrown off by simple-minded [file executable]
+ test picking up expect directory while searching for
+ executable.
+
+1/21/99 5.29.0 Martin Forssen provides mods to support INSTALL_ROOT.
+
+ Bryan Surles <surles@scriptics.xcom> modified configure.in to
+ map DBGX to the same value as TCL_DBGX so the .so is named
+ correctly.
+
+ Suresh Sastry <suresh@scriptics.xcom> forced $LIBS to be
+ added to EXP_SHLIB_LD_LIBS. It's not clear to me why this is
+ necessary (since Tk doesn't) but he was having a problem
+ with openpty not being found during runtime on Linux.
+
+ Martin Forssen noted expectk was crashing if a Tcl error was
+ encountered. He found that exp_exit_handlers() was trying
+ to write into interp->result after interp had been deleted.
+
+ Added another copy to distribution site - with version number.
+
+ Stanislav Shalunov <shalunov@mccme.xru> closed race in pty
+ code.
+
+ Fixed man page: -brace should be -nobrace.
+
+ Dan O'Brien <dmobrien@lucent.xcom> noted that Expect needed to
+ call Tcl_FindExecutable at startup for info nameofexecutable.
+
+ Robbie Gilbert <rwg@nc.fnc.fujitsu.xcom> noted indirect spawn
+ ids occasionally failed. Fixed.
+
+9/30/98 5.28.1 Brian France <franceb@fsj.co.xjp> noted that his compiler
+ rejected label with no statement.
+
+9/28/98 5.28.0 Fixed two bugs in tcl-debugger (see that HISTORY file).
+
+ Submitted Expect documentation for official NIST review. At
+ their request, modified a couple things.
+
+9/21/98 5.27.0 Added support for Tcl 8.0.3. Simple compiles already work
+ fine but exotic things break. In particular, Expect needed to
+ understand new TCL_DBGX feature. Massaged debugger interface
+ which was recently revised.
+
+ Karun Krishnaswamy <karun@transarc.xcom> noted that pine didn't
+ run in term_expect. The problem was that pine uses curses
+ (or terminfo) directly (!!) and insists on clear-to-eol (a
+ really dumb thing to insist on since it's so easily emulated).
+
+ bert@xpilot.org (Bert Gijsbers) (of xpilot fame) provided patch
+ to passmass to handle ssh protocol and explanation of how to
+ create new password entries.
+
+6/15/98 5.26.1 Dean Sauder <dsauder@dcn.att.xcom> noted C-preprocessor lines in
+ configure must start in column 0.
+
+5/18/98 5.26.0 Kevin Schleicher <kms@lucent.xcom> noted xkibitz leaves xterms
+ if first xterm is HUP'd. Kevin also noticed a resource leak
+ in dislocate. Both problems fixed.
+
+ Robbie Gilbert <rwg@fns.xcom> noted expect_devtty was logging
+ devtty (twice) to stdout. Fixed.
+
+ Added support inttypes.h, required on Solaris 5.6 for termios.h
+
+ Kristina <kristina@greatbasin.xnet> noted that tip failed when
+ spawned from a cgi script (BSDI BSD/OS 3.1 i386) because tip
+ didn't see a definition for SHELL and HOME. They need to be
+ set. (Doesn't have to be anything useful; the empty string is
+ fine!) Solution: documented this in Expect man page.
+
+ Zachariah Baum <zack@studioarchetype.xcom> noted that
+ config.sub didn't recognize Intel 686. Found a newer version
+ that did in autoconf-2.11.
+
+ POTENTIAL INCOMPATIBILITY: Changed interact so that it observes
+ parity while matching. It used to ignore parity. This impacts
+ people who use interact to connect through to a real serial
+ device that generates parity. If matches don't work, use the
+ exp_parity command. (This fix should have been made years ago,
+ when the exp_parity command was added. It is now absolutely
+ necessary now that people are doing matching with 8 bits.)
+
+ After the second occurrence of a system admin who broke grantpt
+ by removing setuid from the relevant system util, I added an
+ explicit test and explanation.
+
+ Disabled history in xkibitz. There seems to be some new
+ incestuous relationship between history and unknown now so that
+ redefining unknown leaves Tcl calling history but without
+ knowing what it is because it's never been defined (as it would
+ be by the traditional unknown).
+
+ Fixed quoting bug in passwd.cgi example.
+
+9/28/97 5.25.0 Switched back to hand-generating pkgIndex.tcl file after too
+ many complaints about problems running pkg_mkIndex.
+
+8/12/97 5.24.1 Chris Schanzle <chris@goof2.ncsl.nist.xgov> pointed out that
+ install fails on a virgin file system because install_shared_
+ lib depends on a directory that hasn't yet been created.
+
+ Larry Virden gave corrections to URLs in README.
+
+8/21/97 5.24.0 Bo Johansson <bo.johansson@mbox2.swipnet.xse> noted TclWordEnd
+ had changed and provided fix. This caused crash in expect.
+
+8/18/97 5.23.0 This version supports Tcl 8.0 and continues support for 7.6.
+ Refs to Tcl_Files dropped. inter_return and close became
+ obj cmds. Rewrote notifier (again) to accomodate new notifier
+ model. Lots of other miscellaneous tweaks. Also see debugger
+ HISTORY file.
+
+ Finally removed long-deprecated commands "continue -expect",
+ "send_spawn", and "getpid" and their exp_ versions.
+
+ Harold Brauer <harold.brauer@canada.cdev.xcom> reported problem
+ with an old SCO system (i386-unknown-sco3.2v5.0) that turned
+ out to be due to a typo in the configure script.
+
+ Jimmy Aitken supplied mods to config.guess for brand new and
+ very old Pyramid systems.
+
+ Buz Owen noted memory leak in use of expect_background (with
+ no args).
+
+ Jonathon Kamens noted provided patch for pty_termios.c for
+ modern Sequent (which ptmx).
+
+ Jonathon Kamens noted that TCL defined RANLIB for shared lib
+ (if --enabled-shared) which isn't appropriate when Expect tries
+ to build both shared and unshared libs.
+
+ Jonathon Kamens noted that shared lib config didn't work on
+ SunOS. I had used Tcl's SHLIB_SUFFIX instead of its
+ SHARED_LIB_SUFFIX.
+
+ Qingyi Liao <liao@casabyte.xcom> encountered core dump when
+ exp_bg -i $exp_spawn_any was retracted. Bug in ecmd_remove_fd.
+
+ Fixed a bunch of bugs in example/gethostbyaddr.
+
+ Josef Sachs noted that stty cannot be caught when no /dev/tty.
+ It calls exit instead of returning an error.
+
+ Gordon Chaffee <chaffee@plateau.CS.Berkeley.XEDU> patched
+ Exp_WaitCmd - it was zeroing pid element instead of wait.
+
+ Bob Manson <manson@cygnus.xcom> provided fix for HP on which it
+ was possible for timer to be mistakenly deleted in
+ exp_get_next_event while processing a pty open event.
+
+ Jeff Slonaker <JSlonaker@osc.uscg.xmil> noted that exp_poll.c
+ had wrong signature and poll had arguments out of order! That
+ would suggest that no one has ever used exp_poll.c before...
+
+ 5.22.1 Larry Virden noted that TCL_BUILD_LIB_SPEC can't be used if
+ build directory has been removed. Added check to configure.
+
+ Worked more on package command. Buz Owen pointed out that my
+ code wouldn't support redefinition of TCL_LIBRARY. Bumped up
+ minor version to avoid package loading mishaps.
+
+ Nigel Standing <nigel@idiom.xcom> noted lack of C-u binding in
+ tkpasswd - must be due to change in tk4.2.
+
+ Forced env(SHELL) to be defined inside kibitz for when using
+ with CGI.
+
+ Charles Packer <packer@fermi.gsfc.nasa.xgov> noted that
+ CRAY-YMP needed sys/types.h in exp_console.c
+
+ Extra / when developing defn of TCL_LIBRARY. Shouldn't
+ actually cause any problems though.
+
+2/3/97 5.22.0 Fixed package support - again. Sigh.
+
+ David Pasirstein <dpasirst@sun.cs.wcupa.xedu> noted that RedHat
+ Linux 2nd passwd prompt requires slightly different pattern -
+ modified mkpasswd and tkpasswd.
+
+ Toshiaki Nomura <nom@yk.fujitsu.co.xjp> provided patch to
+ config.guess for Fujitsu DS/90.
+
+ Roger Brooks <R.S.Brooks@liverpool.ac.xuk> noted C lib passed
+ argv[0] instead of file to first arg of execvp.
+
+ Cary D. Renzema <caryr@mxim.xcom> noted that a simple puts -nnl
+ might never appear - Expect closes all of its fds before Tcl
+ gets a chance to flush. Stdout is the obvious problem since
+ Expect thinks it can cavalierly close that too. Hmm.
+
+ At request of Tom Tromey, solved possible missing tclRegexp.h
+ problem by having Expect install it. Cleaned up TCLHDIR and
+ TCL_LIBRARY hackery in Makefile.
+
+12/27/96 5.21.7 Nelson Beebe noted unset is not portable in /bin/sh. Removed
+ and converted everything to understand CONFIG_SHELL.
+
+ Modified cryptdir to strip out shell metachars from filenames.
+
+12/10/96 5.21.6 Michael Schumacher noted that some systems cannot build
+ unshared libs from shared objects. Chose to go with BLT's
+ approach of building shared objs in separate shared directory.
+
+ Buz Owen <ado@bbn.xcom> noted that "package require Expect"
+ didn't work because it looked for Expect lib in the wrong
+ place (well, the "documented" place). The problem is that Tcl
+ insists libraries should be in the same directory as the
+ pkgIndex.tcl file while the natural thing to do would be to
+ split them up and put the .tcl file in the arch-indepent
+ app-specific scripts dir and the lib in the arch-dependent
+ common dir. Sigh. If this is ever fixed/changed, the
+ instructions in the Makefile should be fixed.
+
+ <Van.Trinh@siemenscom.xcom> noted that expect library name
+ exceed filename max on some systems - like his old SCO.
+
+12/4/96 5.21.5 Michael Schumacher noted new configure wasn't passing on Tcl's
+ shared lib cflags.
+
+10/26/96 5.21.4 Achyutram Bhamidipaty <ram@epic.xcom> ran into bugs in Expect's
+ file event handler which prevented expectk from entering
+ implied event loop. Also found one memory problem - thanks
+ to CenterLine.
+
+ Tom Tromey fixed handling of --enable-shared when overriding
+ Tcl's value et al. Tom also added missing "else true" to
+ Makefile: "In a Makefile, you have to always supply an "else"
+ clause for an "if", to work around a bug in certain versions of
+ sh. In some versions of sh, an "if" whose test fails will
+ return the status of the test if there is no "else" clause --
+ causing spurious make failures." See ChangeLog.
+
+10/18/96 5.21.3 Example directory was missing several examples.
+
+10/17/96 5.21.2 Debugger section of configure file corrupted.
+
+10/10/96 5.21.1 Oops, distribution unpacked into wrong version.
+
+ Tom Tromey provided patch for stty to understand OSF 4.0.
+
+9/28/96 5.21.0 Official Expect release for Tcl 7.5.
+
+ Junio Hamano <junio@twinsun.xcom> provided fixes for aclocal
+ for with_tcl/tkconfig.
+
+ Roger Billau <rfbilla@amtnet.sandia.xgov> noted that C library
+ didn't work on Solaris 2.5. Turns out Solaris requires fflush
+ be called between input and output operations on FILE pointers.
+
+ Lots of Cygnus mods - see ChangeLog.
+
+ Sid Cowles <scowles@incyte.xcom> and Hans Riethmann
+ <hans@F1.telekurs.xch> noted relative path specs of
+ tcl-includes (and others) caused debugger config to fail since
+ it is at a different directory level.
+
+ Al Snow <asnow@fuwutai.att.xcom> noted -C failed due to typo.
+
+8/17/96 5.20b18 Andrew Rakowski <andrew.rakowski@nr.usu.xedu> noted no defn of
+ LIB_RUNTIME_DIR, a creation of Tcl7.5p1.
+
+ Tom Tromey added -v to Expect and -version to Expectk.
+
+ Ben Boule <bboule@xylogics.xcom> noted that Interactive (IUNIX)
+ requires 9 char max length after -l. Looks like squeezing out
+ the "." is sufficient. He also noted that IUNIX needs -Xp in
+ LIBS to find strftime. This test should really be done by Tcl.
+
+8/12/96 5.20b17 Glen Biagioni <glen@prosoft.xcom> noted interact -re "A(xx)"
+ failed to match. Problem turned out to be that Tcl 7.5 changed
+ a constant which in the regexp code, which Expect didn't see
+ because it provides its own defn for interact. Alas, the one
+ thing Expect reuses from Tcl was where the change was. This
+ should really be fixed so Expect doesn't rely on Tcl in this
+ way, but there's no point in putting in a lot of work on regexp
+ when we're anticipating a new one soon anyway.
+
+ Bjorn S. Nilsson <nilsson@nbivms.nbi.xdk> noted fixcat hangs.
+ Turned out that new Tcl (7.5p1) now waits for all children to
+ disappear. But Expect still had a handle to a child. I added
+ an exit handler to close the connections before Tcl's exit
+ handler.
+
+ Tom Tromey provided patch to support augmenting CFLAGS on
+ Makefile invocation.
+
+ Gary Merinstein <gmerin@panix.xcom> noted that configure failed
+ on his linux unless it had --enabled-shared. Not quite sure
+ about how this can be, but the flag wasn't being passed to the
+ debugger's configure, so I've fixed that and hopefully this
+ will cure the original prob.
+
+ Added initial announcement of full version at beginning of
+ configure. This should ease my pain in responding to people
+ sending me config output without including version numbers.
+
+ Tom Tromey noted expect_cf.h was machine dependent. Fixed
+ expect_comm.h so that it no longer required expect_cf.h (which
+ should be renamed to indicate it is no longer public).
+
+ Bart Robinson <lomew@cs.utah.xedu> provides mods to support
+ openpty() in FreeBSD/NetBSD. Without openpty, Expect doesn't
+ see the full pty namespace (ptyX[0-v]).
+
+7/15/96 5.20b16 Nathan Estey <nfe@the-hermes.xnet> noted that Makefile failed
+ on SunOS when shared libs were enabled due to incomplete dot
+ stripping in lib prefix.
+
+7/6/96 5.20b15 Malcolm Tredinnick <malcolmt@geko.net.xau> noted that shared
+ lib has to be installed before building expect. Also noted
+ that ldconfig should be run on Linux 2.0 systems and maybe
+ others.
+
+6/25/96 5.20b14 Tim Mooney provided fixes to obey --includedir and similar
+ configure conventions.
+
+6/25/96 5.20b13 A bug when installing Expect using new _installed targets.
+
+6/24/96 5.20b12 Numerous complaints from Solaris users about shared libraries.
+ Unfortunately, no one is giving me configure-ready fixes so
+ (and Tk's configure seems to have bugs as well) so fixing
+ these is like throwing darts.
+
+ Stan Brown <stanb@netcom.xcom> noted noidle example broke when
+ fed "-".
+
+ Gordon Irlam <gordoni@cygnus.xcom> noted typo in install-sh.
+
+ David Sheinberg <sheinb@bcmvision.neusc.bcm.tmc.xedu> noted no
+ args test for spawn -open/leaveopen.
+
+ Misc patches from Tim Mooney to pacify much of gcc -wall.
+
+ Kayvan Sylvan insists Linux stty reads from stdin so added
+ hardcoding to configure.in for that. In xkibitz, Linux stty
+ -raw didn't disable all post-processing. How odd that it is
+ not a problem in interact. In the meantime, added extra stty
+ to xkibitz to do what was missed.
+
+5/30/96 5.20b11 Kayvan Sylvan <kayvan@sylvan.xcom> noted quoting bug in
+ autoexpect.
+
+5/22/96 5.20.b10 Patches from Larry Virden in Makefile.in and exp_int.h
+
+5/20/96 5.20.b9 Too many substitutions in configure caused sed failures on
+ DEC (limit 99) and HP (100). Commented out definitions
+ that weren't absolutely critical. Hopefully, this gets us
+ under the limit but can't be sure since there's no easy way
+ of knowing.
+
+ Numerous mods from Mark Diekhans to support clist-style ptys
+ on SCO OpenServer. (He says SVR4 ptys are broken on that
+ platform.)
+
+ Simon J. Gerraty <sjg@zen.void.oz.xau> says that write()
+ returns 0 inside of exact_write on SunOS. This is outside the
+ SunOS spec so of course we have no idea what's going on. So I
+ added code to try and recover from (or at least warn of) this.
+
+ Tom Tromey unified decls of errno to #includes.
+
+5/13/96 5.20b8 Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.xedu> pointed out
+ backwards stty test - this would have corrupted every platform!
+ He also pointed out that alpha-dec-osf3.2 (3.2c) complained
+ too many args to sed. Someone earlier said similarly about
+ HPUX 10, but I assumed it was the quotes in the weird stty
+ flag I was passing, so that "fix" wasn't. GNU sed has no
+ problem, but obviously this is not sufficient for many people.
+
+5/10/96 5.20b7 Renamed/numbered versions so that it's easier for others to
+ track.
+
+ Upgraded to autoconf 2.10.
+
+ Matthias Kurz <mk@baerlap.north.xde> noted Makefile problems
+ with final Tcl7.5.
+
+ Blair Zajac <blair@gps.caltech.xedu> noted configure mishandled
+ stty defaults on HP and shared lib must be installed executable
+ on HP.
+
+ autoconf insists on adding -O to CFLAGS when using gcc. Ack!
+
+3/23/96 5.20b1 Beta release 1 of Expect for Tcl 7.5.
+
+ Michael Hunter <mphunter@qnx.xcom> provided misc mods for QNX.
+
+ Various people reported problems with IRIX. Removing from the
+ stty list fixed the problem. Similar problem with Solaris.
+
+ Added explicit close to autoexpect. Added a mechanism for
+ enabling conservative mode after script is generated.
+
+ Hal Schechner <hal-j@netusa.xnet> pointed out passwd.cgi must
+ meet passwd's requirement that it not be run by an unrelated
+ user. Easy enough - just do an su first.
+
+3/26/96 5.20a5 Alpha release 5 of Expect for Tcl 7.5b3.
+
+ Added example passwd.{html,cgi} to change a password.
+
+ Many fixes from Stephen Williams <steve@icarus.xcom>
+ and Jonathon Kamens for Makefile and configure.
+
+3/22/96 5.20a4 Alpha release 4 of Expect for Tcl 7.5b3.
+
+ Added version number to lib directories (POTENTIAL
+ INCOMPATIBILITY).
+
+ Revised gethostbyaddr example - evidentally hadn't worked for
+ some time!
+
+ Jan Nijtmans <nijtmans@nici.kun.xnl> provided pkgIndex.tcl.in.
+ Renamed Exp_Init to Expect_Init to support package cmd.
+ Provided #define so that Exp_Init will continue to work.
+
+ Revised exit handling so that it works if Expect is dynamically
+ loaded.
+
+ aclocal.m4 Patches from Tom Tromey.
+
+3/15/96 5.20a3 Alpha release 3 of Expect for Tcl 7.5b3.
+
+ Edward Haletky <elh@astroarch.xcom> noted that Machten required
+ inclusion of types.h in exp_tty_in.h.
+
+ Added various patches from Rob Savoye. One incompatibility
+ is that the static lib now ends with the version number.
+
+ Added support for TCL_SHLIB_{LD_LIBS,VERSION} in Tcl b3.
+
+ Jonathan Karges <J.Karges@dkfz-heidelberg.xde> found that clib
+ was timing out immediately on -1.
+
+3/6/96 5.20a2 Alpha release 2 of Expect for Tcl 7.5b2.
+
+ Leland Joseph <leland@tec.tetd.bellcore.xcom> noted
+ expect-tests.exp exceeds the 14 character filename length.
+
+ Added config.{sub,guess} to support AC_CANONICAL_....
+
+ Rewrote much of aclocal, configure.in, and Makefile.in
+ to handle Tcl/Tk config.sh files and shared/dl support.
+
+ Simplified varargs/stdarg mess for Expect's C library.
+
+ Threw away closetcl junk. No longer required because
+ Tcl finally started doing close-on-exec.
+
+ Incorporated various fixes from Tom Tromey at Cygnus.
+ See ChangeLog for details.
+
+ Added require/provide support.
+
+ Rejiggered event handling to support new Tcl_File interface.
+
+ Removed libexpectk. Because event loop was moved into Tcl, it
+ is no longer necessary for it to be different than libexpect.
+
+ Removed all support for earlier versions of Tcl and Tk.
+
+ Numerous misc patches from Paul Eggert <eggert@twinsun.xcom>
+ most to support Tcl 7.5.
+
+ Arnold Robbins supplied yet another patch to fix earlier
+ problem noted by Hume Smith.
+
+ David Engel <david@ods.xcom> reported problem with Linux
+ dumping core. CenterLine, of course, immediately found the
+ problem - uninit'd lowercase buffer.
+
+ Peter Haggerty <haggerty@borg.lib.vt.xedu> noted that his Next
+ died in cron. It seems that Next doesn't support O_NOCTTY
+ (even though the man pages says it does) and so during pty
+ testing, control terminal would get allocated and then kill
+ the process (by generating a HUP) when deallocated. Avoid
+ by ignoring HUP when doing pty testing on such machines.
+
+1/3/96 5.19.0 Fixed bug that made expect report wrong string when using
+ a terminating anchor in a positive-length glob match,
+ reported by Graham L. Randall <grandall@nit.airtouch.xcom>.
+
+ Added rlogin-display to included examples. rlogin-display
+ automatically propagates your $DISPLAY when you rlogin.
+
+ Hume Smith <hclsmith@localhost.isisnet.xcom> noted problem
+ with day of the week calc at year end/start. Arnold Robbins
+ supplied fixes.
+
+ Jonathan Kamens provided fix to make sync byte reads
+ recover from EINTR.
+
+ Henry Spencer noted errant line of spaces in Makefile.
+
+10/21/95 5.18.1 Began adding support for tcl7.5a1/tk4.1a1. (not finished!!)
+ - Make aclocal understand new Tcl/Tk directory layout
+ for finding tclInt.h and private libraries.
+ - Added support for Tcl_AsyncReady.
+
+ Paul Townsend <aab@aab.cc.purdue.xedu> noted that distclean did
+ not remove some config cruft. Also recommended unsetting
+ M*FLAGS that cause make called from configure to fail.
+
+ Various fixes from Cygnus. See Changelog.
+
+ Deleted "-" before rm in loop in deinstall in Makefile as per
+ Doug Claar <dclaar@hprtnyc.ptp.hp.xcom>. Doug also found prob
+ involving recent STTY fix. Symptom was that pty wasn't
+ correctly inited in cgi scripts on HPs - and Cray pty support
+ blew up entirely.
+
+ Added exp_ prefix to tests so that they can be run with other
+ extensions.
+
+ Seth Ornstein <pp001465@pop3.interramp.xcom> noted bug in the
+ way rftp detected symlinks.
+
+ Upgraded to autoconf 2.4. This fixes a bug in AC_PROC_CPP
+ which blew up when CPP was defined in the environment. Noted
+ by John Pfuntner.
+
+ Jonathan Kamens noted that library didn't check return pipe()
+ return value.
+
+ Added vrfy example.
+
+ Przemek Klosowski <przemek@rrdjazz.nist.xgov> Irix 6.0 fails
+ to use ptys that have been used by someone else. SGI admitted
+ this is a bug and the solution is to upgrade to 6.1.
+
+ Yoad Grinberg noted "expect -timeout" mistakenly ate next arg
+ as pattern.
+
+8/24/95 5.18.0 Wayne Christopher noted that the way exp_eval_with_one_arg
+ modifies the original argv makes the ICEM Tcl compiler unhappy
+ so I rewrote it to avoid that.
+
+ Ian Zimmerman <itz@rahul.xnet> found that a braced arg list of
+ a single pattern beginning with a \n caused expect to reeval
+ for multiple args twice. I added a -nobrace flag that expect
+ and/interact can use internally to prevent this.
+
+ Florian La Roche <florian@jurix.jura.uni-sb.xde> noted a few
+ glitches in the way -ltcl was searched for in aclocal.
+
+ Joachim Posegga <posegga@ira.uka.xde> noted lack of Tcl
+ internal includes should be an error during configure.
+
+8/10/95 5.17.8 Martin Wunderli <wunderli@baloo.limmat.net.xch> found missing
+ quote in config.
+
+ Danny Faught noted problems in Makefile when passing STTY defn
+ with quotes. Created another a STTY-less CPPFLAGS for cases
+ where additional reexpansion occurs.
+
+ Danny Faught noted bug in error handling for checking
+ permission problem with /tmp.
+
+8/1/95 5.17.7 Todd Rimmer <trimmer@mantis.ssw.xcom> noted that HP 10 with
+ optional streams package has both PTYM and PTMX which conflict
+ in pty_termios.
+
+ Rainer Wilcke provides fixes: scripts not listed as dependency.
+ distclean target used Makefile after deleting, and many fixes
+ to man pages.
+
+ Saad Mufti <mufti@hobbit.pls.xcom> noted bug in how C library
+ handled polling (when handling multiple fds).
+
+ Jeff Bowyer noted more autoexpect bugs.
+
+7/22/95 5.17.6 More features added to autoexpect (now version 1.3).
+
+ Sanjay <sanjay@clef.lcs.mit.xedu> noted bug in TCLH config
+ macro which caused it to use 7.3 instead of 7.4.
+
+ Rodney Barnett <rlb@us.teltech.xcom> noted expectd.proto had a
+ few refs to interact_out where it should've had expect_out.
+
+ Terry Rhodes <tbr@88open.xorg> noted that Expect returned a 0
+ exit status upon syntax error unlike tclsh and wish.
+
+ Fred Obermann <fredo@conan.ids.xnet> noted that Unixware 2.01
+ native development tools don't permit configure to find memcpy
+ because memcpy is handled specially by the compiler and it
+ complains when it finds configure's default test with no args.
+ Changed to a hand-crafted test with args.
+
+7/12/95 5.17.5 Jeff Bowyer <jbowyer@muni.xcz> noted minor bugs in autoexpect.
+
+ Rob Saul <robs@sco.xcom> noted that configure failed on SCO
+ OSR5 because trap requested by Cygnus (to allow config in bg)
+ used higher traps than SCO sh knows about.
+
+ Changed "can't happen" to "xmkmf is broken" when configure
+ fails to compile simple C-Tk program.
+
+ John H. Chauvin <jchauvin@netcom.xcom> noted exp_tty_current
+ and cooked raised multiple def errors on SGI 5.3 with native
+ cc.
+
+7/9/95 5.17.4 Wolfhardt Lotz <s11@blue.lrw.uni-bremen.xde> noted Solaris
+ doesn't do case-insensitive man page lookups so I lowerized
+ the beginning of the .SH lines.
+
+ Henry Spencer noted unbackslashed quotes in the autoexpect
+ boilerplate.
+
+7/3/95 5.17.3 Modified VARARGS decls to support new Tcl 7.4 definitions.
+
+ Fine-tuned aclocal so that it would prefer later versions.
+
+ Added autoexpect example and man page.
+
+6/30/95 5.17.2 select-based dsleep() was returning an internal expect-style
+ return code instead of a Tcl-style.
+
+6/30/95 5.17.1 Kannan Varadhan <kannan@isi.xedu> noted aclocal didn't
+ look in right directories to find Tk.
+
+6/30/95 5.17.0 Modified regexp interfaces to support Tcl 7.4b4.
+
+ Mods from Tony Isles <ittony@traf.xcom> for Sequent Dynix/ptx
+ V2.1.5 (which is really old).
+
+ Michael Schumacher <hightec@rz.uni-sb.xde> noted that Solaris
+ 2.4 header files require __EXTENSIONS__ for all sorts of
+ traditional but non-standard definitions.
+
+ Modified aclocal to support new Tcl/Tk library names.
+
+ George Forman <forman@cs.washington.xedu> requested support in
+ C lib for fds that already exist. I added exp_spawnfd.
+
+ Fixed bug preventing signal rearming on Linux (using SV-style
+ signal handling).
+
+ Wayne Christopher <wayne@pmac.icemcfd.xcom> noted missing
+ interp in call to exp_error.
+
+ Added null support to interact's exact matching.
+
+ Bruce Jerrick noted INSTALL was being used rather than
+ INSTALL_PROGRAM/DATA.
+
+ Dennis Ferguson <dennis@mci.xnet> noted that on Solaris 2.4
+ close(pty) occasionally returns EINVAL.
+
+ Added tests so that if we can't get a pty, we can give the user
+ much more help with what to do about it.
+
+ Steven Byrnes noted that Solaris has replaced TIOCCONS with
+ SRIOCISREDIR interface.
+
+ Technically speaking, interact shouldn't do buffer-shuffling
+ but I've added as a fail-safe mechanism to catch people who
+ use preposterous patterns.
+
+ Alan Heckert <heckert@tiber.nist.xgov> noted missing decl in
+ Convex pty support.
+
+ Fixed all expectk examples for Tk4.
+
+ Bryan S. So <so@cs.wisc.xedu> noted that interact -o eof failed
+ if an unbuffered pattern was partially in progress.
+
+ Added -timeout flag to expect command to override timeout var.
+
+ John Pfuntner <pfuntner@VNET.IBM.XCOM> noted that OpenMVS did
+ not notice @ inside of Makefile SETUID macro as suppression
+ but instead treated it as part of the program name.
+
+ Jim Porter <James.W.Porter@att.xcom> noted that exp_free_i
+ freed the variable name even if not allocated.
+
+ Yet more mods to aclocal and various .in files from Rob Savoye.
+
+4/21/95 5.16.3 Matija Grabnar <Matija.Grabnar@ijs.xsi> noted that sleep maxed
+ out after about 36 minutes. Turned out to be a poor assumption
+ in some interfacing code.
+
+4/19/95 5.16.2 rbd <uport@netcom.xcom> noted tcl_RcFileName multiply defined
+ when compiling with Tk4.
+
+4/16/95 5.16.1 Robert Nicholson <robert@steffi.dircon.co.xuk> noted NextStep's
+ sys/wait.h is not POSIX-like so WNOHANG fails to get a defn.
+
+ Alexandre Rafalovitch <arafalov@socs.uts.edu.xau> discovered
+ example on dislocate man page didn't work. I fixed it.
+
+4/8/95 5.16.0 gcc 2.3.3 complains about internal errors so I figure: time to
+ upgrade. Switched to Cygnus 2.6-95q1. Works now but now
+ complains about wait status. I trashed all the gory wait
+ status configure code and adopted autoconf's suggestion about
+ refusing to use sys/wait.h if not POSIX.1 compatible. Nice!
+
+ Jeffrey C Honig <jch@nr-tech.cit.cornell.xedu> requested a -gmt
+ flag for timestamp command.
+
+ Chuck Ocheret <chuck@gigadactyl.xcom> noted that expect -pty
+ fails. Problem is that Tcl's exec blindly closes all the fds
+ between 3 and its own highest fd. See comments in code.
+
+ Loris Caren <loris@caren.demon.co.xuk> noted eof in fg bombs on
+ Linux. Turns out to be analogous to eof in bg problem fixed
+ in 5.14.0.
+
+ Upgraded to autoconf 2.3. Continued making changed to config
+ script to take advantage of autoconf 2 capabilities.
+
+4/1/95 5.15.4 Steve Simmons noted .x remnant from earlier dir install proc.
+
+3/31/95 5.15.3 Forgot to export TCLHDIR defn when configuring debugger.
+
+3/29/95 5.15.2 Steve Simmons <scs@aisinc.xcom> noted Makefile multiple defined
+ distclean and it might be nice to provide aclocal.m4 even
+ though it isn't normally used.
+
+ cevans@resdev1.ppco.com added prompts to passmass for AIX.
+
+3/27/95 5.15.1 Fixed tkterm script - inadvertently left tic debugging on.
+ Also add support for Ctrl-space and Ctrl-@ as requested by
+ Zbigniew Wieckowski <wieckows@cs.umn.xedu>.
+
+ Larry Virden asked that configure also check for .so libs.
+
+3/23/95 5.15.0 Everitt Beers <ebeers@scf.usc.xedu> noted that Linux doesn't
+ support kill -STOP 0. Changed 0 to [pid].
+
+ zhengping (z.) you <you@bnr.xca> found bug where a bg expect
+ did not rearm a spawn id after a first bg expect (and another
+ one) to clear it.
+
+ Elliott Wolin <wolin@physics.wm.xedu> noted that tkterm
+ complained if tic wasn't found. I'll have it override the
+ user misconfig in that case. Also noted that interact failed
+ on AIX. Evidentally, my new config tests for ISC found that
+ AIX looked just like it. Added additional test for tcsetattr
+ to distinguish them.
+
+ Rob Savoye asked for Dbg config.in to be distributed. Rob
+ supplied numerous other mods: install-sh replaced install.sh,
+ mkinstalldirs, testsuite mods, new aclocal.m4, support for
+ recursive make.
+
+ Fixed bugs in configuration of debugger.
+
+ Disabled configure's file-caching.
+
+ Kannan Varadhan <kannan@isi.xedu> noted incorrect diag
+ reporting TCLHDIR in configure.
+
+ Marty Olevitch <marty@howdy.wustl.xedu> noted that DEC Alpha
+ did not sleep correctly because configure didn't find sleep
+ and found poll (which is broken). Problem turned out to be a
+ bug in autoconf's AC_CHECK_FUNC. Got patch from Jim Meyering
+ <meyering@comco.xcom>
+
+ Fixed config probs for Edward Huie <huie@net.xcom> on Mac
+ SE/30, System 7.1, Tenon Intersystems' MachTen 2.1.1-G (BSD 4.3
+ on Mach kernel) and MachTen X11R4 3.1.
+
+ Moved libraries forward in configure to allow for AC_CHECK_FUNC
+ to succeed when funcs are in other libraries.
+
+ Made configure test for Linux and unset CFLAGS=-g if so.
+
+2/25/95 5.14.3 Larry Virden noted configure was missing brackets in raw shell
+ cmds evidentally due to m4 interpretation.
+
+2/24/95 5.14.2 Larry Virden noted configure was not correctly rewriting from
+ --(exec-)prefix. Due to new autoconf. Also noted glob was
+ finding tclX directory.
+
+ Hal Peterson noted that because configure now actually attempts
+ a link before using a library, the code to check for -ltk would
+ have to worry about all the other utility libraries first.
+
+2/23/95 5.14.1 Hal Peterson noted that configure.in checked incorrectly for
+ tcllib.
+
+2/22/95 5.14.0 Jamal <root@lonestar.tlug.xorg> noted Linux has tic in a
+ different place than on my system - affected tkterm script.
+
+ Xiaokun Zhu <xiaokun@stats.gla.ac.xuk> noted problem on DEC
+ Alpha OSF/1.3 evidentally due to backwards decl of index macro.
+
+ Greg McFarlane <gregm@nms.otc.com.xau> noted that large args in
+ send cmd cannot be passed blindly to exp_error.
+
+ david d `zoo' zuhn <zoo@armadillo.xcom> requested modifying
+ configure so that it did not require Tcl/Tk to be built - only
+ configured. This means that it may not find installed
+ libraries. Hopefully, this won't cause anyone problems but its
+ not my preference.
+
+ Fixed error which caused spurious eof when changing patterns
+ in expect_bg.
+
+ Moved to autoconf-2.1 and m4-1.4. Rewrote a LOT of the config
+ file. Finally got my hands on an ISC box and fixed configure
+ for that.
+
+ Tony Booker <tb@sequent.xcom> provides mods for Sequent ptx 2
+ and 4.
+
+ Jeffrey Friedl <jfriedl@nff.ncl.omron.co.xjp> provided fixes
+ for timezone handling in config and exp_strf.c.
+
+ David Schmitt <dschmitt@netcom.xcom> noted that library did
+ not detect eof on HP. I didn't think this was necessary for
+ read() but it evidentally is. I added the support for raw fds
+ although it is not obvious to me how to do it for FILEs.
+
+ James Carter <jimc@math.ucla.xedu> noted expect_after couldn't
+ worked in the exp_bg because I had accidentally written BEFORE
+ instead of AFTER when checking the cases. He also found that
+ the eof body could be trashed in an exp_bg.
+
+ Ousterhout apologized for the Tcl7.4 change I noted in 5.13.1
+ and said he will undo it.
+
+ Eric Frias <efrias@vt.xedu> found library bombed after
+ timeouts. exp_match_end was not updated - which makes sense
+ since there was no match - however the following expect call
+ assumed that exp_match_end was meaningful in order to do its
+ buffer shuffling.
+
+ Jonathan Kamens supplied new configure test for REARM_SIG after
+ noting old could fail if limit prevented creation of core file.
+ He also noted REARM_SIG had accidentally been commented out
+ of cf file.
+
+ Vincent D. Skahan <vds7789@aw101.iasl.ca.boeing.xcom> noted
+ that Apollo's stty reads stdout and doesn't complain if its
+ bogus.
+
+ Yoad Grinberg <grinberg@vnet.ibm.xcom> noted that SIGCHLD does
+ not work for forked processes, only spawned processes. Fixed
+ this and added counting to make sure none get lost.
+
+ Hal Peterson contributed mods for Unicos. He noted that
+ configure should be more careful adding libs to the link line.
+ On the Cray, non-existent libs generate warnings which are not
+ detected by configure but which annoy make.
+
+ Bela Gazdy <bela@euch3e.chem.emory.xedu> noted /etc/resolv.conf
+ misspelled in kibitz.
+
+ Rainer Wilcke noted that "send -null/break" mishandled return
+ code, and these and send/expect_tty were not in man page.
+
+ Dvorak example was missing -- in send -.
+
+1/12/95 5.13.2 Peter Wassenaar <peterw@stack.urc.tue.xnl> noted that kibitz
+ didn't work on AIX. My fixcat script assumed that AIX's cat
+ was like HP's cat - buffered by default.
+
+1/7/95 5.13.1 Marc Bouron <mbouron@lhr-sys.bru-ro.DHL.XCOM> noted I forgot to
+ add virterm to distribution.
+
+ Marc W. Mengel <mengel@dcdmwm.fnal.xgov> noted that configure
+ must be run in the foreground due to the stty tests. Added
+ this to documentation.
+
+ Modified interpreter to account for the change in Tcl7.4 which
+ forces Tcl_RecordAndEval to call Tcl_GlobalEval instead of
+ Tcl_Eval.
+
+ Changed ptys to be initialized based on current tty setting
+ rather than original tty setting.
+
+ Stephen Melvin <melvin@zytek.xfr> noted that set -e is the real
+ problem with ash (see 5.13). I bet "[" is returning a value
+ and triggering it. It appears that the script can live without
+ the set, so out it goes.
+
+ Braun Brelin <bbrelin@netcom.xcom> noted pipe allocs in spawn
+ could fail with meaningless error message.
+
+12/15/94 5.13.0 Synchronize with appearance of "Exploring Expect". This
+ distribution corresponds to the book both in description of
+ Expect and in containing all the substantive examples.
+
+ Graham Mark <gam@lanl.xgov> noted that his Cray (Unicos
+ 7.0.6.1) didn't recognize TCSETCTTY. Since this was in some
+ Cray-specific code, I guess Unicos must have changed some .h
+ files. I made it include either termios or termio. It, at
+ least, works on our Cray (Unicos 8.0.2.4).
+
+ Robert Withrow <witr@rwwa.xcom> noted that FreeBSD 1.1.5.1
+ supplied union wait but waitpid doesn't use it! So I modified
+ configure to be smarter. He also noted that its /bin/sh is
+ really ash which blows up on install.sh. It appears that it
+ doesn't handle uninitialized parameters correctly. I'm not
+ going to fix this because having a broken /bin/sh is so awful
+ probably other things are breaking too. He did note that it
+ worked if he switched to bash or the native install, but that
+ blows the whole point of install.sh - that we have found too
+ much variation in native installs. Rather than try and figure
+ out everyone's variation, we'd like to simplify our life and
+ use this common, simple-to-understand sh script.
+
+ Added more example scripts: Adrian Mariano's virterm (like
+ expect_term but without relying on Tk), gethostbyaddr, and
+ expectd.proto for telnet daemon.
+
+ Matt DiMeo <mdimeo@brooktree.xcom> noted that expect_background
+ failed to detect eof on HP. I had forgotten to pass the mask.
+
+ Josef Sachs noted that expect_background put Tk's event handler
+ in an infinite loop if it was listening to a pipeline that was
+ killed. I had aborted the cleanup procedure if Tcl's close
+ reported an error. That was a mistake.
+
+ Rick Lyons <rick@razorback.brisnet.org.xau> noted a bug. C lib
+ expect would turn a normal read into a poll if remtime reached
+ zero on the nose.
+
+ Added ResetResult to Exp_Init to clean up diags in Expectk.
+ Made GENFUNCs return -1 on error as per ParseArgv's convention.
+
+11/13/94 5.12.0 Alon Albert noted that in clib, exp_match_end should be init'd
+ to exp_buffer before trying to match the pattern - if the
+ expect doesn't produce a match, exp_match_end is incorrect and
+ will be wrong for subsequent expects.
+
+ Steven Diamond noted that fg expect did not react to a change
+ in an indirect spawn id list if it was just waiting for I/O
+ (rather than looping in exp_continue).
+
+ Wait fix in previous version broke system() whose return value
+ is horribly overloaded.
+
+11/10/94 5.11.0 Stephen Fitzpatrick <sfitzp@cs.qub.ac.xuk> noted that NeXT wait
+ macros do not accept int wait status. Switched to using Tcl's
+ detection of wait status type.
+
+ Made log_file -leaveopen leave file id open until close like
+ spawn -leaveopen did.
+
+ Bruce Jerrick <bruce@cse.ogi.xedu> noted public include dir
+ wasn't getting created.
+
+ Karl Vogel noted 1) Pyramid has index instead of strchr, strf.c
+ needs sys/time.h instead of time.h in strf.c, needs to call
+ timezone(), and stty reads stdout but usual stty test fails.
+
+ Made expect_out(spawn_id) always be written to assist people
+ who want to log different procs to different files. This is
+ no longer an efficiency problem because interact can do so
+ much more then it used to. Made full_buffer condition write
+ forgotten chars even when full_buffer isn't explicitly
+ specified.
+
+ Bert Robben <Bert.Robben@CS.kuleuven.ac.xbe> noted that the
+ debugger needs to know about the presence of stdlib.h. I was
+ hoping to avoid this because it's a pain getting configure to
+ call another configure.
+
+ Rainer Wilcke provide several improvements for xkibitz and man
+ page.
+
+10/6/94 5.10.0 Moved example files around. Added password generation to
+ tkpasswd. Created standalone script to generate and set
+ passwords - good for all those adduser shell scripts.
+
+ Rick Cady <rickc@NSD.3Com.XCOM> found a bug when switching log
+ files.
+
+ Rainer Wilcke <wilcke@esrf.xfr> noted that xkibitz died when
+ closing a connection. stdin was mistakenly being closed. He
+ also noted that killing xterms under HPUX 9 requires kill -9.
+
+ Enzo Michelangeli <enzo@airhk.air.xorg> noted that SCO 3.2.1
+ defined window size structure in ptem.h.
+
+ Josef Sachs <sachs@panix.xcom> found a bug when calling fg
+ expects repeatedly between bg expects. On the first fg expect,
+ it cached the fact that the filehandler was armed. The next
+ background expect disarmed it but failed to update the cache.
+
+ John P. Rouillard" <rouilj@dstar.iddis.xcom> provided configure
+ support for --with-{tcl,tk}{lib,include}.
+
+ Mike Figg <figg@pencom.xcom> noted that man page used old style
+ of continue command.
+
+8/23/94 5.9.1 Adrian Mariano noted it would be useful to have exp_continue
+ not reset the timer. Added flag to support this.
+
+ Morris Gasser <gasser@ksr.xcom> noted that lowering match_max
+ didn't work (lib was broken too).
+
+ Keith Hanlan provided a fix for exp_exact.
+
+ Added more examples: mkpasswd, tkterm, term_expect.
+
+ Put close_tcl_files in sep file for easier non-Tcl use of clib.
+
+8/21/94 5.9.0 Fixed window handling code - on AIX, termios does not define
+ TIOCGWINSZ. Instead, you have to include ioctl.h. Of course,
+ you have to avoid the trap of including both on OTHER systems
+ such as SunOS 4.1 where the include files conflict!
+
+ Dan MacDonald found that close in async routine caused sync
+ expect to blow up.
+
+ Missed deletion of last line of out macro in exp_inter.c
+
+ Simon Warfield <simonw@bwh.harvard.xedu> noted bug in xkibitz
+ help message.
+
+ Fixed exp_background to use global scope instead of current.
+
+ Steve Diamond <sdd@aplcomm.jhuapl.xedu> noted that -i "4 5"
+ only used spawn id 5.
+
+ Rob Nagler found yet another bug in log_file when called
+ incorrectly.
+
+ Expectk wasn't creating a window by default.
+
+7/25/94 5.8.1 Made exp_interp external. Users should be able to set this
+ explicitly.
+
+ David Barnett <davidb@cats.ucsc.xedu> found that Linux was not
+ getting a controlling terminal. The original test for doing
+ that was based on Stevens and tested in a very nonspecific way
+ for the presence of a Sun via CIBAUD. Replaced this with a
+ more specific test.
+
+ It seems Tcl 7.3 broke my -nostack hack. The top-level interp
+ translates unknown return codes to TCL_ERROR. Sigh. I wish
+ Ousterhout would stop all of those translations. If the user
+ wants them, they can do so themselves, but now they're forced.
+
+ Martin Buchhoz <buchhlz@vnet.ibm.xcom> suggested adding
+ XKIBITZ_XTERM_ARGS environment variable to xkibitz. He also
+ noted that stty rows/columns support doesn't seem to work on
+ AIX. I haven't yet looked into this.
+
+ Copied 2nd sync mechanism from Expect to C library.
+ Added exp_child_exec_prelude hook.
+
+ Jonathan Kamens noted that "spawn cat;close;wait" returned
+ -1 on AIX and 0 on Sun. This is "correct", however to
+ address this, I added -ignore to spawn and otherwise made
+ signals default. Also added extra information to return value
+ of wait if caused by signal.
+
+ Dan MacDonald <hfvstud@bcarh80a.bnr.xca> noted that
+ exp_continue didn't cause timeout to get reread.
+
+ Ting Tan <utan@cisco.xcom> noted that when using -b, expect
+ hangs if open brace and doesn't stop in case of error.
+
+ Oops, broke "log_file" with no args.
+
+ Removed -timestamp from documentation. Use "timestamp" command
+ instead.
+
+ Keith Hanlan noted C library didn't test already arrived data
+ before attempting to read more. He also suggested I avoid
+ forcing the user to do save/restores of per-fd globals.
+
+6/24/94 5.8.0 Hubert Halkin <hhalkin@ucsd.xedu> pointed out that interleaved
+ expect_bgs and spawns dump core. I had used the exp_f ptrs
+ as handles to TkCreateFileHandler but realloc shuffled them
+ around.
+
+ Rick Lyons <pclink@qus102.qld.tne.oz.xau> provided misc. mods
+ for Pyramid.
+
+ Keith Hanlan <keithh@bnr.xca> noted that HP-UX C compiler
+ causes odd behavior in Expect when it is compiled with "-O.
+ -g" works fine.
+
+ Peter Gasche <zrspg01@compserv.zdv.uni-tuebingen.xde> pointed
+ out that Convex 10.2 fails to build. New version of Convex OS
+ added getpty(). Naturally, it differs from old one. Testing
+ is tricky because there is no header file for it. Even worse,
+ the algorithm in the Convex man page is incorrect - it allows
+ you to allocate ptys already in use! Unfortunately, the man
+ page is too vague to allow the reader to see that immediately.
+
+ In contrast to BSD stty, Convex, Mach, and NeXT stty don't
+ complain if redirected to null. I'll just have to hardwire the
+ test in configure.
+
+ Added -nowait flag to wait command.
+
+ Upon suggestions from David Vezie <dv@xnet.ssl.berkeley.xedu>:
+ Added -noappend, -open, and -leaveopen to log_file command.
+ Added -leaveopen flag to spawn and exp_open.
+ Modified spawn to close -open immediately.
+ Modified exp_open to close spawn_id immediately.
+
+ Between Jeff Wright <wright@spock.cen.encompass.xcom>, Brad
+ Skrbec, Arup Mukherjee <arup+@cmu.xedu>, and the anonymous
+ Mach support group at CMU, finally got hard answers about Mach.
+ It is no longer supported and there is no intention to provide
+ full POSIX support. Now, at least, I can fix the configure
+ script to understand this.
+
+ Added "unbuffer" example.
+
+ Dana Chee <dana@dino.bellcore.xcom> provided configure hooks
+ for finding -lnsl and -lsocket.
+
+ Henry Spencer <henry@zoo.toronto.xedu> noted timestamp doc did
+ not jive with C defn. Fixed doc and added timezone support.
+
+ Steve Pynes <fb@steve@ucsd.xedu> noted that exp_win.c needs
+ _IBCS2 (Intel Binary Compat Standard #2!?!) before it will
+ recognize winsize. He also noted #out was redefined in inter
+ code if using simple_event.
+
+ Fixed defn of "stty cooked" to retain echo setting.
+
+ Bennett Todd noted dislocate's pidfile_read was missing close.
+ He also noted useless bind in tkpasswd.
+
+ Marty Leisner noted that ^C causes xkibitz to exit ungracefully
+ when in interpreter.
+
+ Added yet another sync mechanism (see 5.6) to spawn so that
+ child cannot eof before parent has prepped the pty (only a
+ probably on HPs, of course). I had actually written most of
+ the code, but left it disabled because I hoped that the
+ problem simply wouldn't happen in practice. Alas, Jonathon
+ Kamens found a case where it does.
+
+ Jimmy Aitken <jimmy@pyra.co.xuk> noted problem on Pyramid. My
+ original code only looked for /dev/tty##. On pyramid, ptys
+ look like /dev/pts/4. term wants the last two characters, but
+ on the Pyramid, the first of the last two characters can be a
+ / in which case xterm wants a 0. I.e., suffix of /dev/pts/4
+ is "04". xterm fails completely with 3-digit ptys! I sent
+ a suggestion and patch to X Consortium for this and the pid
+ problem - xterm has no way of telling it to which pid to send
+ the SIGWINCH.
+
+ Poul-Henning Kamp <phk@TFS.XCOM> noted that -lm would make
+ autoconf forget about other libs.
+
+ Ram Bhamidipaty noted I forgot to document sleep.
+
+ Removed disasterous performance with * at beginning of glob.
+
+ Mods from Rob Savoye. See ChangeLog.
+
+ Earnest Hua <eh@c-cube.xcom> noted expectk.man need wasn't
+ installed.
+
+ Bogus arguments to expectk were not reported correctly.
+
+ Modified clib to catch when user changes match_max between
+ expects on two different fds and then switches back.
+
+ Rewrote timestamp to get rid of 200 char limit.
+
+ Ram Bhamidipaty <ram@xor.epi.wisc.xedu> noted NetBSD .9 stty
+ complained "stdout appears redirected, but stdin is the
+ control descriptor". It compares dev(stdout) to dev(stderr)
+ and assumes if they are different then user thinks stty
+ ioctls stdout. This is one case when that assumption is wrong.
+ Fixed fd 2 so it points new 2 and is reset to old 2 if an
+ error occurs. This forced me to remove any diagnostic output
+ from child (in getptyslave) since this now went back to the
+ proc as child output rather than original stderr, sigh.
+
+ Stephan Winokur <swinokur@pinky.trevose.sgi.xcom> noted that
+ IRIX 4.2 had problems with gcc. While diagnosing, I found
+ PTY_TYPE was used before set. Make doesn't mind (how odd)
+ but I changed it anyway.
+
+ Made send understand "-null". Deprecated "-0".
+
+ Made Expect read .expect.rc from DOTDIR if present.
+
+3/30/94 5.7.0 Removed alpha status.
+
+ Added $(EVENT).o to library.
+
+ Finally deleted old shar file. Revised README.
+
+3/22/94 5.6.3 Phil Moore <phil@signals.geol.scarolina.xedu> noted termios.h
+ should not come from sys even if it exists. (SGI doesn't have
+ sys/termios.h.)
+
+3/21/94 5.6.2 Paul Kinzelman <pkinz@cougar.tandem.xcom> noted that I forgot
+ to remove -update from documentation.
+
+ Fixed interact's -i so it understands indirect spawn ids.
+
+3/21/94 5.6.1 expect_background randomly failed. I forgot to save Tk's
+ event mask so occasionally events were incorrectly classified
+ as eof.
+
+ Added -buffer to expectk and made "nobuffer" the default so
+ scripts are read in much faster.
+
+3/15/94 5.6.0 Added cat_buffers marker to avoid "catu" option to scripts.
+
+ Got temporary use of an evaluation copy of TestCenter.
+ Promptly found several memory leaks. Oops.
+
+ Added a synchronization mechanism to spawn so that user cannot
+ send to pty before it is init'd. This also deals with the HP
+ trap more simply. Removed extra open added in 5.5.1. While
+ working on this, it occurred to me stty needs to temporarily
+ disable trap. Added exp_slave_control so that C programmers
+ can get to it portably.
+
+ Added "expect -ex" to documentation.
+
+ Fixed winsize bug on Solaris.
+
+ Added functions to allow user flexibility closing fds in child.
+
+3/8/93 5.5.1 Integrated bug fixes from Arnold Robbins <arnold@skeeve.atl.
+ ga.xus> for his own strftime code.
+
+ Rob Savoye passed back a patch from OSF to cast ptsname.
+
+ Added a test for cat. R.K.Lloyd noted HP failed pid test.
+ Turned out to be another bug related to pty-trapping. The test
+ of course, was doing something that a user would never do.
+ Hope this doesn't break other HPs. Pty trapping is becoming
+ less and less clear to me. Ioctls generated by slave look like
+ modem ioctls. Added an artificial open because different
+ versions of HP's stty execute differing numbers of ioctls.
+ In test script, changed each cat to cat -u.
+
+2/17/93 5.5.0 Began a test suite based on Ousterhout's model: make test
+
+ Added passmass man page.
+ Added decl of exp_tty_original to pty_sgtty.c.
+ Added error_spawn_id
+
+ Alon Albert <al@mercury.co.xil> provided a bug fix for new
+ buffer handling code in C library.
+
+ Fix fd leak related to spawn -open.
+
+2/7/94 5.4.0 Some installation improvements from Rob Savoye and Owen Rees.
+
+ Bug in handling empty string match - crept in recently.
+
+ Finally fixed longstanding oddness: stty -raw reset echo.
+
+ Made spawn close all file descriptors. Added exp_open command
+ to get old effect.
+
+1/26/94 5.3.5 Made rftp use /bin/ls to avoid -F from people's aliases.
+
+ Initialized auto_path.
+
+ Fixed exp_version so it fails if the major #s are not equal
+ (which is what the man page said).
+
+1/18/94 5.3.4 Jim Meyering <meyering@idefix.comco.xcom> gave config fixes
+ of X handling on Irix-4.0.5 and suggested that tknewsbiff
+ observe DOTDIR.
+
+1/18/94 5.3.3 Kevin Short <short@gdc.xcom> noted some remaining use of malloc
+ and free instead of ck versions.
+
+ Initialize tcl_interactive to 0 while processing -c flag to
+ avoid unreliable handling of unknown proc.
+
+1/17/94 5.3.2 Jeffry Abramson <jra@hrcms.att.xcom> noted that "spawn -pty"
+ hung on an HP. Problem was trapping was enabled so as soon
+ as I tried to open the slave, Expect blocked waiting for ack!
+
+1/14/94 5.3.1 Forgot to delete a bad call to strcat in exp_internal.
+
+1/13/94 5.3.0 Added -info flag to log_file, log_user, exp_internal, and
+ strace, so you could get original args back out.
+
+ Wrote tknewsbiff script (and was extremely pleased).
+
+ Fixed rftp. I must have broke it when I changed to using Tcl's
+ new switch cmd. Also sped it up by replacing split/join
+ nonsense with a single regexp.
+
+ Danny Faught <faught@convex.xcom> noted that glob patterns
+ returned shortest matches. While fixing this, found that glob
+ patterns ending in $ were broken, too.
+
+ Massaged libraries and include files. The include file for
+ using Expect with Tcl or Tk is now expectcl.h. libexpect.a
+ now suffices for using Expect's funcs with C or Tcl.
+
+ Add all the features from Expect into C library including
+ null and full buffer matching. Added exp_buffer (_end) and
+ some other variables to support fd multiplexing better.
+ Made unmatched chars from previous expects remain for future
+ matches.
+
+ Chen <johnny@e0sun3.ccl.itri.org.xtw> found bug in exp_pid when
+ -i had no arg.
+
+ Rewrote expect_bg, after, and before so they all handle args
+ the same. Interact and all the expect variables now handle
+ indirects. exp_bg now handles -brace flag.
+
+ Geoff Bullen <geoff@itx.nsg.com.xau> noted that interact put
+ terminal into raw mode even if stdin was redirected.
+
+ Rob Savoye provided more configure mods to better find Tcl/Tk.
+
+ Fixed bug in wait that didn't close down "busied" fds.
+
+ Kazuro Furukawa <furukawa@apricot.kek.xjp> provided a better
+ default for SHORT_BINDIR in the Makefile and noted that DEC
+ doesn't understand "test -x".
+
+12/3/93 5.2.0 Recent fix was buggy and blew up when eof case still had data
+ in buffer.
+
+11/23/93 5.1.4 At request of Rod Beckwith <rodb@slugo.corp.sgi.xcom> fix some
+ minor things to which SGI cc was sensitive.
+
+ Fixed bug in dvorak script where eof could occur in nested
+ interact, upsetting original interact.
+
+ Forgot to change -flush to -nobuffer in man page.
+
+ Added some more places to search for X11 for Jeff Moore
+ <jbm@internet.sbi.xcom> note.
+
+ Added yet more fixes and notes for NeXT for Brad Skrbec
+ <skrbec@motcid.rtsg.mot.xcom> who found that NeXT has POSIX
+ include files but NOT the functions that go with them. Sigh.
+ Needless to say, configure is thrown off by this.
+
+11/14/93 5.1.3 John Pierce <jpierce@chem.UCSD.XEDU> noted several declarations
+ that AIX's cc couldn't handle include a struct with same elt
+ name at two different levels. Also _IO is declared twice
+ in AIX include files but only checked once.
+
+ Fixed bad args in exp_spawnl call in chesslib examples. Can't
+ imagine how it ever worked before.
+
+ Richard Weidner <richard@cicero.jpl.nasa.xgov> found a bug in
+ configure (test always treats a bare string as true!) that
+ caused NeXT to be declared as POSIX.
+
+ Fixed two bugs in Tcl_StringMatch2. One caused glob ranges to
+ succeed when they shouldn't. Another was how malformed ranges
+ are handled, and came right from Tcl. Reported to John.
+ Switched Expect library to use T_SM2 from Expect itself.
+
+ Blair Zajac <blair@olympia.gps.caltech.xedu> noted expectk used
+ CLFLAGS instead of CFLAGS.
+
+ Forgot to fix mishandling of parens inside of alternation in
+ interact.
+
+11/9/93 5.1.2 Added "null" keyword and remove_nulls command to allow matching
+ ASCII 0 in expect/interact.
+
+ Rob Nagler <nagler@olsen.xch> noted that expect_background
+ failed if pattern didn't consume all data. event handler
+ knows nothing about data already arrived but not processed.
+
+ Made Expectk understand --
+
+11/8/93 5.1.1 Fixed yet another bug in setting expectk's argv0.
+
+11/6/93 5.1.0 Provided support to work with Tcl 7.[0-1] and Tk 3.[3-4].
+
+ Pasi Kaara <ppk@atk.tpo.xfi> found an off-by-one in the buffer
+ shuffling when buffers fill up during an expect.
+
+ Changed \\\$ to \\$ in patterns that search for literal $.
+
+ Added "spawn -pty" support for xterm -S.
+
+ Fixed yet another argv problem in Expectk. When run using
+ expectk explicitly, script name was left in argv.
+
+ Fixed system command's return value to match exec new style.
+
+11/1/93 5.0.4 Mark Davies <mark@comp.vuw.ac.nz> noted that BSD4.4 sysconf
+ returns -1 (a bug). Rewrote to avoid requiring this info.
+ Switched from from explicit refs of sys_errlist to Tcl's
+ strerror.
+
+ As per Adrian Mariano <adrian@cam.cornell.xedu>, added
+ exp_sleep command primarily to allow sleeping by sub-second
+ intervals. Also avoids exec overhead. Not yet documented.
+
+ Kartik Subbarao <subbarao@concorde.fc.hp.xcom> noted that on
+ HPUX 9, SC_OPEN_MAX should be ifdef'd on itself rather than
+ HAVE_SYSCONF.
+
+ Karl Vogel <vogelke@c-17igp.wpafb.af.xmil> noted Pyramid
+ didn't like varargs included twice in exp_command.c.
+
+ Deleted expect_version variable (was never documented) and
+ deprecated expect_library to be exp_library for consistency.
+
+10/16/93 5.0.3 Lou-Salkind@deshaw.com found interpreter() could stomp past end
+ of input array. Same problem in debugger.
+
+ Bud Bach noted init.tcl wasn't being sourced, and Makefile
+ broke if all scripts were commented out.
+
+ Added interesting highlights and bindings to tkpasswd.
+
+ Made Makefile look for -ltk if libtk.a doesn't exist.
+
+ Rick Sladkey pointed out that -re patterns to look for $ should
+ "\\\$".
+
+ R.K.Lloyd noted config doesn't see prototypes with K&R cpp.
+
+10/8/93 5.0.2 Bud Bach noted tcl_interactive was not set.
+
+10/8/93 5.0.1 R.K.Lloyd noted various problems, some related to being on an
+ HP when a lot of #ifdefs kicked in.
+
+10/7/93 5.0.0 Added expect_background. In the Tk environment, this registers
+ actions to be called upon receipt of a pattern from a process.
+
+ Renamed "debug" as exp_internal" and made debugger available
+ as "debug" and "exp_debug".
+
+ Milan Gupta <mbg0@bunny.gte.xcom> noted that system() (at least
+ on his HP) hangs when SIGCLD is ignored.
+
+ <jason@vicor.xcom> noted that Tcl's exec command doesn't bother
+ to close fds, so force them with close on exec.
+
+ Renamed "continue -expect" as "exp_continue". "continue
+ -expect" will continue to work, just won't be documented. It's
+ just too dangerous when you start mixing extensions.
+ Renamed "return -tcl" as "inter_return". Had to do something
+ to avoid random return values from matching "-tcl". This
+ design was just wrong. Surprising that it never bit anyone.
+ Renamed "expect_version" as "exp_version" just to continue
+ this regularity.
+
+ Protected initial fd_new's with isatty so disconnect doesn't
+ lose redirected fds.
+
+ Allowed DFLT_STTY to be omitted entirely. Apollo doesn't need
+ it.
+
+ Modified fork to fail on failure instead of returning -1. This
+ made spawn failure match disconnect failure.
+
+ Dan Hyde <drh@citi.umich.xedu> noted missing arg in exp_error.
+
+ Jerry Whelan <guru@stasi.bradley.xedu> noted -buffer was
+ botched in man page. Hal Peterson noted that bug in man page
+ caused groff to choke.
+
+ wait now returns {pid, spawn_id, 0|-1, status (or error msg).
+ errorCode is now set if appropriate. wait -i -1 waits for any.
+
+ Propagated winsize to pty.
+
+ Documented "-open".
+
+ Quentin Stafford-Fraser <Fraser@europarc.xerox.xcom> noted that
+ interact -u was broken.
+
+ Fixed interact's default actions "return"/"interpreter" to be
+ writable. Removed ability to set default eof/timeout. Removed
+ dash from same.
+
+ Rewrote trap to use Tcl's async support.
+ Added -code switch and made interpreter understand "-nostack"
+ coming from error to use ^C to easily return to interpreter.
+ Introduced following incompatibilities:
+ - ONEXIT interface disappeared. Use "exit -onexit". (Thinking
+ of this as a signal bought nothing but complexity.)
+ Added "exit -noexit" to run all expect-related exit
+ handlers without exiting or destroying interp or ".".
+ Useful for when other apps have exit handlers.
+ - trap command takes missing action as a query. Use "" or
+ SIG_DFL to delete or reset a trap.
+ - SIGCLD gone. Now always called CHLD even if underlying
+ system only knows about CLD.
+ All sig handlers and exit handlers run at global level.
+
+ Removed setjmp/longjmp crap. Not needed since systems which
+ wait in read don't restart system calls.
+
+ Added support in expect for "-gl" and allowed longer forms to
+ match Tcl's switch command. Similarly for "-ex" in interact.
+ Rewrote arg parsing for send.
+
+ Added "stty" command to support stty of ttys other than
+ /dev/tty. Better for /dev/tty, too. This should fix
+ security complaint from BSD's Net2 stty.
+
+ <R.K.Lloyd@csc.liv.ac.xuk> gave fixes for configure and noted
+ exp_main_tk was missing exp_conf.h.
+
+ Added "exp_timestamp" command. Fixed bug in interpreter cmd.
+ It wouldn't return anything with TCL_OK.
+
+ Renamed -flush to -nobuffer.
+
+ Make interact default to executing actions in raw mode.
+ Accept -reset to execute in cooked mode. Ignore -f.
+ Fixed examples. Fixed bug in "-o -timeout".
+
+ Deprecated getpid (due to Tcl's pid), added exp_pid.
+
+ Put "rm -f" inside catch. SunOS 4.1.3 and some version of AIX
+ complain despite the -f!
+
+ Added "send -break" for Dave Mielke.
+
+ Fixed argv handling of expectk to match expect for Steve Clark.
+
+ Switching to Tcl 7.0
+
+8/21/93 4.7.7 Cygnus added support for OSF/1 style ptys.
+
+ Brian Bebeau <brian@cblph.att.xcom> found bug in PTC support,
+ HAVE__GETPTY, timestamp doc, and provides some mods for config
+ AT&T StarServer.
+
+ Detection of direct spawn ids failed on -1.
+
+8/18/93 4.7.6 Removed zone and gmtoff from timestamp. Not ANSI.
+ Removed getpid confusion.
+ Once again, added "cat -u" into kibitz (this time for AIX 3.2).
+
+8/18/93 4.7.5 De Clarke <de@lick.UCSC.XEDU> hit error in exp_global.h because
+ tcl.h had not been included.
+
+8/16/93 4.7.4 Richard Kasperowski <richk@icad.XCOM> found that Ultrix 4.1-2
+ failed to allocate controlling terminal. Ultrix's setsid is
+ evidentally buggy. Switched back to setpgrp - which fixed it.
+
+ Fixed type defn of exp_tty_original.
+
+ Dave Mielke found two bugs in interact: re-failure prevented
+ other patterns from matching a particular point in the stream,
+ and two or more -inputs didn't actually work. Also found bug
+ in HP trap handling - despite what docs say, other things
+ besides open/close have to be handled. Specifically, slave was
+ generating an ARGGET. Backed off on trying to wait immediately
+ for two OPENs to just waiting for one OPEN. Perhaps zero?
+ Also found deficiency in return -tcl - failed to return arg.
+
+ At Dave's request, made cmdfile by read in a single gulp rather
+ than line by line. Added -b (buffer) flag for old behavior.
+ Old behavior performs badly on very long procedures but is use-
+ ful for reading commands from pipes. Made "system stty" return
+ status of raw/echo.
+
+ Made log_user return previous value irrespective of args.
+
+ Fixed mishandling of parens inside of alternation noted by
+ Bud Bach <bachww@rtsg.mot.xcom>.
+
+ Added -timestamp, -iread, and -iwrite to interact and
+ expect.
+
+ Added -onexec flag to close to solve problem posed by
+ Bellave Jayaram <bjayaram@slee01.srl.ford.xcom>.
+
+ Added -0 to send. Removed capability of send to send multiple
+ strings.
+
+ Chip Rosenthal noted bug in releasing trap 0's action. Also
+ modified exit handler to allow recursive invocation. Instead
+ of complaining, it skips handlers that have already been
+ invoked and forces the process to exit.
+
+ Added new names for most command prefaced by "exp_".
+ Deprecated send_spawn.
+
+ Switched to Ousterhout's ckalloc and attitudes towards failure.
+
+ Started adding Tcl 7.0 support. getpid renamed to pid. Added
+ exp_pid to support things that Tcl 7 does with its pid.
+
+6/12/93 4.7.3 fnf@fishpond.cygnus.com noted minor type problems. Rob Savoye
+ noted trap SIGINT overrode debugger handler. Default should
+ be reverse.
+
+6/8/93 4.7.2 Added debugger to public release.
+
+6/7/93 4.7.1 Ed Oskiewicz <eo@ansa.co.xuk> noted prototype botch - exp_cook.
+ Owen Rees <rtor@ansa.co.xuk> noted missing decl for
+ tclRegexpError.
+
+6/6/93 4.7.0 Gert Bultman <bultman@dgw.rws.xnl> exposed a bug in interact's
+ -update.
+
+5/27/93 4.6.0 Rick Sladkey <jrs@world.std.xcom> fixed a bug in send_log -
+ checking a master needlessly and indexing off the end of an
+ array.
+
+ Rob Savoye made change for detecting libpt.a, modified
+ autoconf for better handling of X, exec_prefix, and ranlib.
+
+ Kris Woeppel <krisw@cs.athabascau.xca> said SVR3 doesn't have
+ wait.h.
+
+ Made libexpect.a understand regexp. Reorganized code. It
+ now requires Tcl to be installed first, although it uses only
+ a few utility routines. Hopefully this isn't a problem for
+ anyone.
+
+ Zack Xu <zack@cs.wisc.xedu> noted exp_main.h needed C++
+ support.
+
+ Pascal Meheut <pascal@cnam.cnam.xfr> gave fix for skipping over
+ null bytes while interact is pattern matching.
+
+ Added "--" to expect, interact, and send.
+
+ Added support for associating multiple -i's with a single
+ pattern, and -i's with no pattern for use with spawn_id_any.
+
+ Made interact work with systems that lack select/poll.
+
+ Added code and #defines for debugger. Debugger itself is not
+ yet available.
+
+4/19/93 4.5.2 Achim Flammenkamp <achim@HRZ.Uni-Bielefeld.XDE> noted that I
+ documented full_buffer as buffer_full.
+
+ Ted Stockwell <ted@sirius.aggregate.xcom> noted that wait arg
+ was missing an & in configure test.
+
+ Scott Hess noted that systems can have wait4 without waitpid.
+
+ Jonathan Kamens <jik@gza.xcom> noted/fixed some things that
+ weren't autoconf'd correctly: pid_t, RETSIGTYPE, malloc.
+
+ Gary Shea noted that a recent change to expectk made it not
+ default to interactive.
+
+4/12/93 4.5.1 At request of Rusty Wilson <zrlw05@hou.amoco.xcom>, added
+ "-console" to spawn.
+
+ Pang Wai Man Raymond <wmpang@cuse1.se.cuhk.hk> reported that
+ passmass didn't recognize DEC's passwd prompts for root.
+
+4/7/93 4.5.0 Fixed bug in interact regexp preventing match of multichar
+ literals.
+
+4/6/93 4.4.3 Bennett Todd <bet@sbi.xcom> noted missing example scripts
+ timed-read and time-run.
+
+3/29/93 4.4.2 Bill Houle <Bill.House@SanDiego.NCR.COM reported fixes
+ for SVR4 pty support to compile.
+
+ Made string matcher understand *$. Documented tty_spawn_id.
+ Made command line -i override -f.
+
+ For Tuan Doan <tdoan@bnr.xca> on HP, make kibitz use domainname
+ as fallback and used whoami instead of env(USER).
+
+ Fixed bug in the generic pty code that could report out of ptys
+ because an earlier slave slowly deleted the lock file.
+
+3/25/93 4.4.1 Stephen House <sdhouse@bnr.xca> reported exp_tk.c wouldn't
+ compile on HP. Fixed.
+
+3/24/93 4.4.0 Added back SVR4-style pty allocation which got omitted in the
+ autoconfig process. Fixed bug in interact's -update handling.
+ Fixed bug in weather script that cut off long reports.
+
+3/15/93 4.3.0 Cleaned up /tmp files used during pty locking.
+
+ Added command "parity" to enable parity stripping. Fixed
+ match_max to do -i correctly.
+
+3/15/93 4.2.4 Fixed to work on new SGI which returns slave-close via excep
+ (select) or POLLERR (poll) rather than thru read().
+
+3/12/93 4.2.3 Fixed to work on AIX (using /dev/ptc) and UTS (using getpty).
+
+3/11/93 4.2.1-2 Fixed numerous bugs relating to HP ptys. It's amazing that for
+ their bewildering complexity, they couldn't support generation
+ of EOF to the master (or at least enable trapping of just
+ close), rather than forcing the code to know about opens, too.
+
+3/8/93 4.2.0 Integrated Rob Savoye's autoconfig code.
+
+ Interact mishandled new -eof flag. Added -update.
+
+ Gary Shea <shea@cs.ukans.xedu> noted that tkwait hung if
+ expect had been called. Rewrote most of tk_event.c and fixed
+ some other problems related to efficiency & multiple timeouts.
+
+ E Beck <beck@qtp.ufl.xedu> suggested mods to more easily
+ support Extended Tcl.
+
+ Bill Mitchell <mitchell@mdd.comm.mot.xcom> reported problems on
+ 4.3+BSD. Added support for TIOCSCTTY.
+
+ Dana Burd <dana@wrs.xcom> noted that "exit" caused by ^C during
+ expect didn't work - just returning to expect. Fixed, and then
+ removed "feature" of ^C to abort a timeout. This feature
+ proved a lot less useful than I thought it would.
+
+2/21/93 4.1.0 Bill Tierney <wtierney@leland.stanford.xedu> noted that double
+ close dumped core. Rewrote fd_to_f and close/adjust functions.
+
+ Interactive interpreter() didn't properly wait in
+ get_next_event, so Tk stopped responding to events.
+ Wrote version of interpreter that shares expect's input buffers
+ but can't think of a use. Left as an ifdef SHARE_CMD_BUFFER.
+
+1/26/93 4.0.1 Added eof check to xpstat. Removed incorrect and unnec.
+ #includes from exp_main_exp.c
+
+ Chip Rosenthal <chip@chinacat.unicom.xcom> found my refs to
+ tclRegexpError need externs on systems that don't use Tcl's
+ string.h. string.h should probably be changed not to refer to
+ tclInt.h.
+
+ Added FAQ about Expect's copyright status.
+
+ Mark Christopher <christo@bnr.xca> pointed out some really
+ stupid errors in the HP support for select.
+
+12/16/92 4.0.0 Rewrote interact. Made re-entrant thru event-handler for Tk.
+ (Same for Expect.) Abstracted out common code so that
+ remainder is specific to select vs poll vs tk (although
+ "simple" was impossible to handle). Added timeouts, regexps
+ (at request of numerous people), ability to set up arbitrary
+ graphs of process flows, and some miscellaneous but useful
+ functionality. New flags are: -input, -output, -re, -echo,
+ -flush, -eof.
+
+ Added "-noecho" to spawn command.
+
+ Added getpid command. Something with this functionality should
+ be added to the Tcl core. When it is, this function will go
+ away.
+
+ Removed assumption of global "interp" handle. Rewrote init
+ and other routines for use as libraries. Added appropriate
+ glue to Makefile.
+
+ At request of Rob Savoye <rob@cygnus.xcom> added "send_log" and
+ disabled buffering on all output. The only affect unbuffered
+ output will cause users is if they pass large strings in
+ multiple args to send.
+
+ Ray Davis <rdavis@masschaos.de.convex.xcom> reported Convex
+ could not do job control from spawned procs. I added a symbol
+ DO_SETSID to force this.
+
+ Martin Leisner modified rftp to understand iftp. I added it
+ to the publicly donated scripts directory.
+
+11/17/92 3.24.1 Martin Leisner suggested Makefile use $(MAKE) and support Tcl
+ as a Sun shared library.
+
+ Seth Perlman <seth@welchgate.welch.jhu.xedu> suggested interact
+ support timeout. I've added this as "-timeout" in inter_select
+ but left undocumented while we experiment with interface.
+
+ Joe VanAndel <vanandel@ncar.ucar.xedu> pointed out that su2
+ script still used old syntax. Fixed.
+
+ Konrad Haedener <haedener@iacrs1.unibe.xch> fixed a bug in
+ POSIX tty handling on AIX. Surprisingly, we discovered AIX
+ worked just fine when pty_bsd is used and without -DPOSIX!
+
+ Doug (George Jetson) <pynq@midway.uchicago.xedu> pointed out
+ that a spawn_id for /dev/tty would be really handy. I added
+ tty_spawn_id for this purpose.
+
+11/4/92 3.24.0 After problem reported by James Ward <jew@sunquest.xcom> added
+ to man page describing delays required by hardware such as for
+ UART switching.
+
+ Recoded all \C sequences as \### in examples and man page in
+ anticipation of them going away in next version of Tcl.
+
+ Switched to printing errorInfo during errors instead of the
+ command and only the top-level error message. Since this
+ includes entire stack, this should be very helpful.
+
+ J. Cazander <cazander:pasichva via serigate@phcoms.seri.
+ philips.xnl> reported that purify found a write beyond the end
+ of an input buffer. Lucked, it was just before a double-word
+ boundary, so it probably isn't a problem. I fixed it anyway.
+
+10/9/92 3.23.1 Tor Lillqvist supplied support for HP 8.0.7 in POSIX-mode, and
+ a bugfix for POSIX tty mode switching
+
+10/8/92 3.23.0 Larry Rogers <lrr@Princeton.XEDU> reported that "weather" blew
+ up in spawn. I'll add a catch-all to the script to report
+ similar problems (out of ptys, processes, etc.)
+
+ Ting Leung <tleung@bnr.xca> notes that log() in human_write can
+ receive a 0 (domain error). Fixed unit_random to avoid that.
+
+ Tony Primavera <aprima@xox.ssc.af.xmil> notes that the sample
+ archie script needs to understand mcgill's limit of 10 users.
+ Tor Lillqvist <tml@tik.vtt.xfi> noted that a lesser-used
+ pattern ("unknown...") is incorrect.
+
+ Grant Taylor <gat@pecan.cray.xcom> found a problem when forking
+ (using Expect's fork) multiple processes, each of which spawned
+ something. In the BSD pty support, I had used the pid to build
+ a temporary file for testing the pty before actual use. When
+ multiple processes tried to use the same tempfile, it blew up.
+
+8/12/92 3.22.13 Corey Satten pointed out that -u on cat caused kibitz to slow
+ down on Ultrix. I see the same behavior on SunOS. I added an
+ option to fix it for systems that need it. Corey also noted
+ arg miscounting in kibitz, and pointed out that world-readable
+ fifos could be a security problem. He gave a fix for this and
+ also a fix to force ptys to be put into raw mode.
+
+ Terrence Brannon <tb06@pl122e.eecs.lehigh.xedu> reported rftp
+ referenced the undefined variable 'transfer'. Turned out to be
+ a bug in the code to handle symbolic links.
+
+7/20/92 3.22.12 Added O_NOCTTY (if defined) in pty_bsd.c to avoid gaining
+ control terminal while testing pty when running as daemon.
+
+ At request of Michael D. Riley <riley@mbeya.research.att.xcom>
+ added explanation to man page - how expect_after/before deal
+ with spawn_id.
+
+ Charles Hannum discovered the problem with AIX (see earlier)
+ was a missing "extern" in the errno declaration. Also, the
+ compiler was sensitive to a lack of access to the defn of
+ struct expect_special.
+
+ Dave Coombs gave me yet another fix for the weather server to
+ accomodate its ever continual change.
+
+7/2/92 3.22.11 Yet more work. Discovered that SunOS and Ultrix really like
+ setpgrp(0,0) much better than setpgrp(0,getpid()) but the
+ manual doesn't describe well why this seems to work better.
+ (The old call worked inconsistently.)
+
+6/30/92 3.22.10 Did more work on modifications to dissolve connection between
+ stdio and devtty. Eventually, I'd like to add a separate
+ spawn_id for devtty (expect_devtty?).
+
+6/5/92 3.22.9 Hansel Wan <hhw0@gte.xcom> noted that $errorInfo was clobbered
+ by prompt1. To prevent this, I added a default definition
+ for prompt1 (and prompt2 while I was at it).
+
+ Unnati Amin <uxa@po.cwru.xedu> noted that the example scripts
+ checked for $ in prompts which didn't work. This bug was
+ created when $ was turned into a "match end-of-input" char
+ in the transition from v2 to v3. Solution: backslash the $.
+
+ A few parts of code assumed spawn_id was always stdin, which
+ caused "send" to send to stdout, which meant succeeding
+ expect's hung, waiting forever. Fixed is_user macro.
+ This was a problem with scripts that redirected stdin or
+ somehow reused fd 0. Surprising that no one ever did that
+ before - also surprising that it didn't bother cron jobs.
+
+6/2/92 3.22.8 Man pages fixes from Matt Crawford crawdad@fncent.fnal.gov.
+
+5/12/92 3.22.7 Missing ; in Makefile, screwed up chmod.
+
+ Fixed bug that caused interact to think the modes had changed
+ when they hadn't.
+
+5/11/92 3.22.6 Added regression paper to ftp archive - published in the 1992
+ USENIX San Antonio Proceedings.
+
+ Swapped setpgrp and fork in disconnect command for sysV88.
+ According to Dave Schmitt <daves@techmpc.csg.gss.mot.xcom>,
+ original code (right out of Stevens) starts the child with
+ closed stdio fds.
+
+ Fixed bug in interact that changed /dev/tty modes even if
+ interact was used to connect two completely different ttys.
+ Had never been a problem before, but today I wrote some code
+ that actually calls interact from cron! Also, copied the
+ experimental fix from 3.22.5 to inter_poll.
+
+ Jeremy Nussbaum <jeremy@world.std.xcom> says cat needs "-u" in
+ kibitz for his HP 8.0 system to work. I wonder why this has
+ never been a problem on earlier HP and other systems?
+
+ Forced Makefile to mark scripts executable.
+
+4/12/92 3.22.5 Fixed bugs reported by Matt Ranney <mjr@uther.Calvin.XEDU>
+ including a syntax error (!) in expect.c on ecases_inuse.
+ I didn't even compile this before pushing out? He also noted
+ some # were not in column 1.
+
+ I put in an experimental fix to interact (only in select
+ version currently) to fix when pattern matching from master
+ and user needs to continue typing in order to complete match.
+
+4/3/92 3.22.4 Charles Hannum (mycroft@gnu.ai.mit.edu) pointed out that I
+ screwed up a comment in the brand new pty_aix3.c. He also gave
+ me a fix for an arg-less expect, which did a malloc(0). And
+ he said that AIX ptys return EOF in yet a new way - read()
+ returns -1 with errno == 0. Yuck.
+
+3/29/92 3.22.3 Jay Schmidgall gave me yet another pty_aix3.c. He also gave
+ ifdefs for POSIX terminal support.
+
+3/18/92 3.22.2 Jay Schmidgall <shmdgljd+@rchland.ibm.xcom> modified pty_sgi3.c
+ to make a pty interface for recent versions of AIX.
+
+ Steve Summit <scs@adam.mit.xedu> noted that "trap 0" could
+ actually call signal(0...)
+
+ Martin Leisner <Martin_A._Leisner.Henr801C@xerox.xcom> noted
+ that rftp was broken. It seems I never handled symlinks. They
+ are interesting. You can't tell from the listing whether they
+ are files or directories, so you just have to blindly go ahead
+ and assume it's one or the other and see what happens!
+
+3/11/92 3.22.1 In talking to Dave Schmitt ,daves@techmpc.csg.gss.mot.xcom>,
+ realized the documentation for wait had never been updated
+ from the way it used to work in v2 (returning any pid).
+
+3/11/92 3.22.0 Another question from Ron, prompted me to find another bug.
+ interact -o wrongly manipulated the user buffer at one point.
+
+3/10/92 3.21.0 Ron Young <ron@nevada.xedu> found that spawn failed on a
+ DECstation 3100 running Ultrix 4.2. I had forgotten to test
+ that cmdfile was valid before comparing against stdin in fix
+ related to fflush in 3.20.0.
+
+ While I was on a DECstation, I noticed that it does not accept
+ setpgrp(...,0). Changed 2nd arg to getpid().
+
+3/6/92 3.20.2 Stefan Farestam <farestam@orion.cerfacs.xfr> provided a new
+ version of pty_sgi.c which uses _getpty. I renamed the old
+ one pty_sgi3.c
+
+3/3/92 3.20.1 Brian Woodson requested I update the dates and version numbers.
+
+3/1/92 3.20.0 Prompted by a question from Ken Mandelberg, added -raw to
+ noidle and kibitz script.
+
+ Fixed fflush(cmdfile) again, having been authoritatively told
+ by net wisdom that there is no way to portably fflush a shared
+ read-stream. (I take back my claim about a bug in HP's fclose!)
+
+ John Sellens gave me some more fixes for non-DEC MIPS OS.
+
+2/22/92 3.19.1 John Sellens <jmsellen@watmath.waterloo.xedu> gave me a bug
+ fix for NOWAITPID.
+
+2/21/92 3.19.0 Found a bug in HPUX fclose!! It moves the I/O pointer in the
+ shared file table entry! This explains the symptoms I reported
+ earlier. Fortunately, it's easy to code around (by me - it is
+ no longer necessary to fudge the scripts).
+
+ Added some stuff to the man page to explain why expect behaves
+ the way it does in an emacs shell window and how to live with
+ it.
+
+2/21/92 3.18.0 Worked on the HP port some more. The HP causes a real problem
+ by insisting SIGCLD be delivered in order for wait to return
+ a status. This royally complicated the code, partly because
+ of the special casing all over the place in the trap command,
+ the asynchronous delivery of SIGCLD and also because Tcl itself
+ is not prepared to have system calls be interrupted. The HP
+ also defines both CLD and CHLD which threw my macros off.
+
+ Anyway, the end result is that on the HP, SIGCLD is ignored.
+ The manual claims wait status will not be delivered but it
+ seems to be anyway. Good grief! (Even if it were ignored,
+ it would not be such a calamity, since wait is used mainly
+ to discard zombies on other systems.)
+
+ A remaining problem is that there appears to be some odd
+ interaction, perhaps with fork, such that the script is rolled
+ back at eof if a spawned process happens to exit at the same
+ time. The solution for now is to exit all scripts via exit
+ rather than letting exit be called implicitly. There must be
+ some real bug, but I'm unable to find anything after lots of
+ testing, line and Saber. At the moment, I'm highly suspicious
+ of the HP itself rather than expect.
+
+ Bob Proulx and Jeff Okamoto supplied me with patches for
+ inter_select.c. HP transmits some pty interactions via the
+ exception field in select.
+
+ Michael Grant gave me a mod to recognize ~ in the logfile and
+ debug commands.
+
+2/17/92 3.17.1 Brian Keves <keves@meaddata.xcom> pointed out that the man page
+ still referred to "expect_match" instead of "expect_out".
+
+2/12/92 3.17.0 Eric Arnold <Eric.Arnold@corp.sun.xcom> ran into a problem
+ when running in the background. interact did ioctl(0...)s to
+ change the terminal mode, ignoring the -u flag.
+
+ Fixed a bug in kibitz which blew up when asking for a password
+ due to a spelling error. The drawbacks of interpreters...
+
+2/4/92 3.16.3 Dongchul Lim <lim@doctor.chem.yale.xedu> noted that scripts can
+ hang in the background. I had assumed isatty(0) was enough to
+ contrast bg/fg but it returns 1 if the script was started with
+ a & from the terminal. I added code to watch if any ioctl(0)s
+ were done. If so, than it is safe to do more, in particular
+ in the exit handler to reset the terminal modes.
+
+1/28/92 3.16.2 Fixed a bug on SV systems causing errors when trying to do
+ further reads after a SIGCLD had already arrived on a spawn_id.
+
+ Peter Funk <pf@artcom0.north.xde> gave mods for SCO XENIX 386.
+
+1/24/92 3.16.1 Oops. Forgot to add pty_svr4.c to shar.
+
+1/13/92 3.16.0 Karl Lehenbauer <karl@sugar.NeoSoft.xcom> a tiny change for
+ getting a clean compile on SCO 3.2.2.
+
+ My getimeofday-avoidance code wasn't right, sigh. Kibitz
+ noticed. Fixed two other bugs in kibitz - password request
+ was for wrong user and it timed out but shouldn't have.
+
+ Note: seems to work fine with new version of Tcl: 6.2
+
+1/13/92 3.15.1 Added a bit of code to avoid gettimeofday system calls when
+ timeout == -1. Fixed minor bugs in kibitz relating to cleaning
+ up and returning error messages.
+
+ Redid support for stdlib.h including making it default to fix
+ problem in Ultrix 4.2 reported by Oliver Kretzschmar <viskretz
+ @ikesg1.energietechnik.uni-stuttgart.xde>.
+
+ Ian Johnstone <ianj@sequent.xcom> said his system (DYNIX 3.2)
+ needed an additional include <ctype.h> in inter_select.
+
+ Dave Coombs <cme.nist.xgov> added logic to test/weather to
+ accomodate a new feature in the weather server.
+
+ Hal Peterson fixed some SV code that I just added for handling
+ SIGCLD properly. He made the Cray-extra-child timeout in half
+ the normal timeout to allow distinguishing between eof and real
+ timeout. Finished rest of Jeff Okamoto's fixes for HPUX.
+
+ Wally Strzelec <packman@tamuts.tamu.xedu> provided mods for
+ Amdahl which has its own pty-handling functions. Ifdef'd into
+ pty_usg.
+
+12/30/91 3.15.0 Fixed a bug that struck when eof occurred when reading from
+ multiple processes simultaneously and no user-supplied eof
+ handler.
+
+12/26/91 3.14.1 Ted Gibson <tgibson@logdis11.hq.aflc.af.xmil> gave me some mods
+ for a 3B2 having to do with termio vs termios, etc.
+
+12/24/91 3.14.0 Deprecated expect 2. Expect 3 is now the official version.
+
+ Parag Patel <parag@netcom.netcom.xcom> gave me some #includes
+ necessary for A/UX 2.
+
+ Brian Woodson noticed "send a b" generates incorrect debug
+ output.
+
+ Working with Jeff Okamoto to run expect on HP/UX 8.0, we fixed
+ SIGCLD catching (he says HPUX doesn't ignore them by default?),
+ obviating longjmp from stomping locals, fixed a bug in cmdWait
+ that would prevent the wait status from being collected in
+ rare situations.
+
+12/17/91 3.13.1 James Davis suggested fixing Makefile to handle case where no
+ example scripts should be installed. I added similar logic
+ for script man pages.
+
+ Pete Siemsen fixed a bunch of things in the Makefile including
+ where to get expect when invoking fixline1. He suggested defs
+ for supporting install and multiple MAN targets.
+
+12/12/91 3.13.0 Matthew Freedman <mattf@cac.washington.xedu> noted mismatch
+ between lib man page (said "stty_init") and lib code (said
+ "exp_stty"). He also found a screwup in the library such that
+ the pty slave wasn't being set up correctly.
+
+ Added note to kibitz man page on how to kibitz with 3 or more.
+
+12/12/91 3.12.0 "expect *" worked incorrectly if it was first expect after
+ spawn, due to buffer not being initialized.
+
+ Added a good example for "expect -continue" to man page.
+ Added an FAQ about a gcc problem that seems to be common.
+
+12/11/91 3.11.2 James Davis noted I forgot to put kibitz.man in distribution.
+ I changed kibitz to read domain from resolv.conf instead of
+ calling domainname(1) for systems upon which NIS domainname
+ differs from Internet.
+
+ Pete Siemsen <siemsen@barnard.usc.xedu> noted slight error in
+ libexpect man page.
+
+12/10/91 3.11.1 A couple tiny mods to the Makefile courtesy of James B. Davis
+ and Michael Grant (guest worker from Sun, temporarily at
+ <mgrant@xdr.ncsl.nist.xgov>. Both of them also noted a problem
+ caused by incorrect installation of gcc that caused expect to
+ say "ioctl(set): Invalid something or other" upon exit.
+
+ Fixed complaint about exit() while compiling without STDC.
+
+12/9/91 3.11.0 beta!
+
+ Hal Peterson provided fixes for UNICOS 6.1 and 7.0 on both
+ CRAY-2 and CRAY Y-MP. He also fixed a problem in interact
+ where malloc(0) could've occurred.
+
+ Added support for allowing user to set interpreter prompt.
+
+ Added forgotten -d flag to match_max in rftp script.
+ Made kibitz understand user@host.
+
+ Expect's internal buffer-full-handling incorrectly copied
+ the latter buffer half beginning from the end of the buffer.
+
+12/5/91 3.10.1 Massaged Makefile to allow for more flexibility in
+ installation, especially with regards to scripts. #! is now
+ reset.
+
+ Added "kibitz", a really cute script to let two people control
+ one program. Example users are for one person to help another
+ remotely, logging a conversation (run emacs or whatever inside
+ kibitz and your conversation can be logged, scrolled backwards,
+ etc., or of course, playing games together.
+
+12/4/91 3.10.0 Tightened up arg checking for "wait" - it core dumped when it
+ should've said "syntax error".
+
+ Rick Cady <rickc@nsd.3com.xcom> noted minor inconsistency in
+ man page describing strace.
+
+ I fixed a bug that prevented "system stty -echo raw" from
+ working. The raw data was clobbering the -echo data.
+
+12/3/91 3.9.0 Brian Woodson noted that "close -i ..." evoked a syntax error.
+ I had parsed the arguments incorrectly.
+
+ After the nth request, I finally set up pub/expect/scripts as
+ a directory for scripts.
+
+12/2/91 3.8.0 Phil Sheperd <pshepher@loki.uni.edu.xau> fixed a major bug in
+ exp_spawnv() preventing one side of the pty from being set up
+ correctly. Thus nothing worked! He also reported that his
+ system didn't have strdup, so I added an explicit defn of it.
+
+ James B. Davis fixed a couple nroff-bugs on the man page, and
+ said someone already gave him a dump script (see below).
+
+ Richard (R.C.) Vieregge <richv@bnr.xca> found a $ was missing
+ from test/ftp.exp.
+
+11/22/91 3.7.2 James B. Davis <james@solbourne.xcom> straightened out a couple
+ things in the Makefile and asked if anyone had written a script
+ for dump.
+
+ Jeff Okamoto <okamoto@hpcc25.corp.hp.xcom> had a couple changes
+ for HPUX 7 and 8 compat, involving termio stuff.
+
+ Prompted by Andy Norman, added note to man page describing how
+ to disable all argv processing while using #!.
+
+ Converted passmass and rftp over to new version.
+
+11/15/91 3.7.1 Brian Woodson asked me about the Tcl_WaitPids "got unknown
+ process" panic. This is a Tcl bug that John has promised
+ to fix. I'll document how to avoid it in the man page.
+
+ Incidentally, I'm going under the knife tomorrow for three
+ torn cartilage in my wrist. The doctors say it may be a couple
+ days to couple months. Until I get back, hang in there.
+
+11/13/91 3.7.0 Yet another bug discovered (and fixed). "expect eof" was
+ failing to remember the buffer, and expect_out(buffer) was
+ empty upon return.
+
+ Brian Woodson noted I forgot to document the -i flag of close.
+
+11/12/91 3.6.0 Sean Cunningham <sean@moorenet.xcom> reported that he couldn't
+ open /dev/tty from 'at'. 'spawn' was incorrectly not executing
+ code to claim it was a controlling tty. BSD only.
+
+11/11/91 3.5.1 Brian Woodson notes that version 2 and 3 treat the following
+ differently.
+
+ proc p {} {spawn s}; expect
+
+ In v3, spawn_id is locallized by the proc, and thrown away when
+ p returns. Unfortunately, in v2 due to some sloppy coding on
+ my part, spawn always affected the global value of spawn_id.
+ This differed from the handling of other variables, and in v3,
+ this unusual behavior had to go, because the multiprocess
+ handling and the large number of variables implicitly set
+ (especially by the expect command) demanded that I be more
+ systematic about how this was done.
+
+ Since I never depended on this behavior, I never documented it
+ as being something you should rely upon. Alas. To fix it, add
+ the line
+
+ global spawn_id
+
+ to the beginning of any proc that calls spawn and needs the
+ value of spawn_id implicitly defined outside of the proc.
+
+11/6/91 3.5.0 Drew Whitehouse <Drew.Whitehouse@anu.edu.xau> hit a bad pointer.
+ I forgot an initialization in expect.c which caused problems
+ when an EOF occurred which had no eof pattern.
+
+11/2/91 3.4.0 Added FAQ from various questions people have sent me and my
+ replies. Made CONVERTING file on converting from 2 to 3.
+
+ Nelson H. F. Beebe <beebe@math.utah.xedu> found a missing
+ declaration for exp_tty_original in bye() of main.c. How come
+ the Sun C compiler doesn't complain about this!?!!?
+
+ Nelson also reported that SunOS 4.0.3 had a problem including
+ varargs. It turned out that old varargs had check for
+ reinclusion, and tclInt.h also includes it. So I added an
+ #ifdef va_dcl and put my inclusion after tclInt.h.
+
+10/31/91 3.3.0 Converted most of the examples. Three more to go.
+ Worked on man page some more.
+
+ Modified expect so that if timeout > 0, and nothing in the
+ buffer matched, it will force a read, no matter how long the
+ preceding code took. This may be hard to understand, but is
+ the intuitive behavior that I always desired.
+
+10/30/91 3.2.0 Fixed bug in eof handling. Converted some more of the
+ examples, and added to Makefile.
+
+10/29/91 3.1.0 Fixed slight bugs in tty mode switching, pty initialization
+ (via stty).
+
+ Fixed expect library. Fixed compatibility code for non-BSD
+ systems. As usual, I could only test it so far, not having
+ all these systems at my disposal. I don't expect major
+ problems though, since the basic functions I depend on haven't
+ changed.
+
+ Completely rewrote handling of continue, return, etc in
+ expect, interact, interpreter. It's actually systematic now.
+
+ Checked with John O. about some code to bounce wild return
+ codes, which he said was a mistake and would remove, so now I
+ can pass my own return codes different from Tcl's.
+
+To get | to return -> TCL_RETURN TCL_OK (no return)
+ V
+ expect return default continue -expect
+ interact return -tcl return default
+ interpreter return -tcl return default
+
+ What this table says is, to get "interpreter" (for example) to
+ return TCL_RETURN to its caller, you must say "return -tcl",
+ because "return" makes it return TCL_OK.
+
+ The "argumented" versions are considered to be the uncommon
+ form. In particular, I'd be surprised if anyone ever uses
+ the -tcl argument, but it's there for completeness and
+ consistency now.
+
+ Put together a FAQ. Needs more work, but hopefully worthwhile
+ as is.
+
+ Computing Systems with Expect article appeared a couple days
+ ago. How ironic that it describes the old version of Expect.
+ Nonetheless, it looks ok.
+
+10/25/91 3.0.0 alpha!
+ First release of Tcl-6.0-ready code.
+ It might fly for a couple seconds.
+
+ Here is a quick list of changes. Besides Tcl incompatibilities, Expect
+ incompatibilities are flagged below as:
+
+ ** major - scripts definitely won't run if they depend on this
+ * minor - scripts probably will run but there is some subtle
+ change that should be examined).
+
+ ** Select renamed 'ready' and undocumented. Seems pointless now.
+
+ Added support to expect command for waiting on patterns from
+ different processes. The old version implemented this via
+ 'select' but but it is much simpler via expect. Added -i to
+ a number of commands to signify a spawn_id which overrides
+ the variable.
+
+ Added any_spawn_id to match any spawn_id.
+ An explicit null pattern, forces a spawn_id to be considered
+ when all it can possibly match are any_spawn_id patterns.
+
+ * output is no longer flushed to expect_match upon timeout.
+ May be multiple buffers now, so it doesn't make sense to
+ flush just one.) -n was added to disable transfers from input
+ buffer to expect_match var. I suspect it will only be used
+ for experimentation.
+
+ Added expect -re for regular expressions. Added expect_out
+ array to retain indices and strings of partial matches for
+ ** for both glob and re. expect_match has been renamed
+ expect_out(buffer).
+
+ A la Tcl, added -nocase for both types of patterns. (Oddly,
+ Tcl's case only does it for regexps.)
+
+ By popular demand, unanchored glob patterns. Old patterns
+ will continue to work, since earlier interpretation was much
+ stricter. Unfortunately, unanchored matches make certain user
+ errors easier. For instance, people will send answers before
+ seeing all of the question. Typically, output can 'look'
+ ugly, as answers land in the middle of other things.
+
+ To anchor patterns, use ^ in beginning and/or $ at end.
+
+ Added expect_out(spawn_id) to report which spawn_id was read.
+
+ Made expect and variants understand all args as one arg.
+
+ Added 'default' pattern.
+
+ Added continue_expect command.
+
+ Added expect_before, expect_after commands which take same
+ args as expect, but continue to stay in effect for all expects.
+
+ ** Added match_max command, deleted it as a variable. The old
+ way was too coarse for use over multiple spawn_ids. With no
+ arg, returns current max. Takes -i flag and -d for default.
+
+ Added globbing to spawn command.
+
+ Added optional -i spawn_id to wait.
+
+ Added optional -i to send (and all its variants).
+
+ Renamed trace to 'strace' since it conflicts with Tcl's new
+ trace command. Since 'trace' traces variables, I figured
+ 'strace' wasn't too bad (for "statement trace"). I felt
+ obliged to make it short and not as obliged to make it as
+ meaningful since it will probably invariably be typed by hand.
+
+ Made timeout == -1 mean infinity.
+
+ Made interact do pattern matching in both directions via
+ use of -o flag.
+
+ Added -F flag for convenience. If -f or -F used, interact
+ can no longer be overrun. In particular, if more characters
+ arrive then match a pattern, remaining characters will be
+ buffered rather than thrown away (old behavior).
+
+ Patterns may now be substrings of one another.
+
+ Made interact optionally take all args as one.
+
+ Default action is now 'interpreter' (see below).
+ interpreter now forces cooked mode, and echos results
+ so you don't have to constantly say "send_user [...]\n"
+
+ * Interact reads characters that have been buffered but not
+ matched by expect. And vice versa. Does anyone care?
+ (My rogue script did.)
+
+ From discussion with John Conti, I decided to make
+ 'interpreter' a separate command to start up interactive
+ command processor. Changed default action in interact to this.
+ Added eval depth and event id to prompt to interpreter.
+
+ Added expect_library which contains path for commonly
+ sourced expect scripts. Automatically source expect.rc
+ out of expect_library unless -N given. Automatically source
+ ~/.expect.rc unless -n given.
+
+ Added expect_version command to print and/or verify script
+ is compatible with running expect. Tcl version is also tested.
+ Felt it was worth making this a command because it's such a
+ pain to tear apart version strings.
+
+ Tcl's close and exit are both subsumed by expect's commands
+ of the same name.
+
+ Rewrote mode switching code so that "system stty" is handled
+ specially. This allows interact and interpret to get the modes
+ they want, without burning the user. It is now much easier
+ to leave expect in raw mode all the time, but the choice is
+ up to the user.
+
+ Added vgrindefs, courtesy of Brian Fitzgerald.
+
+9/23/91 Tcl 6.0 released. This new Tcl has some incompatibilities
+ with the old Tcl, so as long as everyone is changing their
+ scripts already, I'm taking the opportunity to make some
+ incompatible changes to Expect that I've wanted to do for a
+ long time.
+
+9/11/91 2.67 Ed Klein <eklein@syrinx.umd.xedu> added support for SVR4 in the
+ form of pty_svr4.c and mods to command.c.
+
+ Added explanation to man page of how to create unreadable but
+ executable scripts. (No, chmod 111 doesn't work.)
+
+ Mark Diekhans <markd@grizzly.XCOM> pointed out to me that there
+ is a potential problem with the trap command:
+
+ "There is no control over when the signal will cause Tcl_Eval
+ to be executed. There is a chance that code in the Tcl library
+ will be executing when the signal comes in and the interpreter
+ data structure will be in an inconsistent state. This could
+ cause all sorts of nasty things to happen. In our Extended Tcl
+ (4.0) we added signal handling. but the way we implemented it
+ was to have the signal handler set a global flag. We modified
+ Tcl_Eval to check the flag after it finishs executing each
+ command. If the signal came in, Tcl_Eval then returns an error
+ such as: "SIGINT signal received". Signals may then be caught
+ with the catch command and processed."
+
+9/10/91 2.66 Don Jackson <Don.Jackson@Eng.Sun.XCOM> found a syntax error in
+ the usage error message of the example ftp-rfc script.
+
+ Marty Olevitch <marty%cosray@wuphys.wustl.xedu> provided mods
+ to support MORE/bsd. Namely, added #include types.h to
+ expect.c and extern int errno to a number of files.
+
+ Scott Hess <scott@nic.gac.xedu> noted a potential problem in
+ interact. Since interact only checks patterns at beginning
+ of reads, user can conceivably type fast enough so that
+ patterns are typed in the middle of a read. In reality this
+ doesn't happen, but Scott was driving one expect with another
+ expect and in this way provoked the behavior.
+
+ The solution is to read chars one at a time, either by
+ read(,,1) or buffering in a stdio-like way, but I'm not going
+ to do that because the code should really be rewritten entirely
+ and it just isn't worth it, since it is so easy to get around
+ at the user level.
+
+ Steve Legowik found that spawn-disconnect sequences fail. The
+ pty testing I added in version 2.55 causes expect to regain the
+ slave as a controlling tty, which generated SIGHUPs. If anyone
+ knows a clean way to avoid regain controlling ttys, let me
+ know. For now, I just set SIGHUP to SIG_IGN in the disconnect
+ command.
+
+8/14/91 2.65 Old passmass script changed root password. I renamed it to
+ passmass.old, and made a new one which works for any account.
+ It also supports yppasswd, telnet/rlogin, different names for
+ accounts on different machines. Handles VMS machines, too.
+
+ Added Computing Systems paper to expect distribution and moved
+ all expect-related things to separate expect directory in our
+ ftp directory.
+
+8/5/91 2.64 Achille Petrilli <achille@miss.cern.xch> found that on an SGI,
+ the expect command ocassionally returned "no more processes".
+ He traced the problem back to O_NDELAY in the open, which was
+ taken as-is from the man page, by someone else who's code I
+ didn't look at too closely at the time. The result works now.
+ Oddly I thought I fixed this error myself when the SGI support
+ was first installed, but I cannot find it. I evidentally
+ screwed up.
+
+7/31/91 2.63 Steve Legowik <legowik@cme.nist.xgov> wanted to implement
+ callback by having a modem dial out and NOT go away, but
+ interact in the reverse direction. I added "interact -u" to
+ support the idea of changing the user from the default stdio
+ to a second spawned process. The result is that we can now
+ write a modem callback program that doesn't depend on the cute
+ trick of having getty recognize DTR which only worked when the
+ modem was directly connected to the computer. In Steve's case,
+ there were several network switches in the way.
+
+ Added "overlay" function which is similar to plain "exec" in
+ shell. (Too bad Tcl took the name already.)
+
+ Added robohunt scripts to the test directory. I wrote these
+ back in January, '91 and forgot about them til now. But I
+ suppose they are illustrative (at the very least of how to
+ generate truly random numbers). Ha.
+
+7/20/91 2.62 Carl Witty <cwitty@jessica.stanford.xedu> pointed out my fdset
+ implementation (for systems that don't have it) wasted some
+ space. I had commented it correctly, however, making the
+ incorrect code obvious (except to me).
+
+ Robert Howland <howland@rahjr.ame.nd.xedu> pointed out that
+ expect complained about not running from a real terminal under
+ cron. Oops! So I added a test to skip saving/restoring
+ terminal modes when fd 0 is not a tty, since this is obviously
+ pointless.
+
+7/19/91 2.61 Oops. Forgot to include getline and getline.exp examples even
+ though they have been documented!
+
+7/17/91 2.60 UMich changed interface to weather system necessitating change
+ to weather script.
+
+7/9/91 2.59 Didn't correctly comment things right in Makefile. Fixed.
+
+ Changed 'close' in gethostbyaddr example to 'catch close'.
+
+6/22/91 2.58 Made new file (pty_sgi.c) for supporting Silicon Graphics ptys.
+ Silicon Graphics select fails to see eof immediately but poll
+ works ok. Unfortunately, there was an error in inter_poll
+ (bad_io was uninitialized). Silicon Graphics works now.
+
+ Andy Norman <ange@hplb.hpl.hp.xcom> notes that linking expect
+ with the BSD compatibility library under HP-UX, libc.a must
+ be loaded before libBSD.a. Modified Makefile to reflect this.
+ He notes that there is a problem with expect not reading an EOF
+ from the current process. This should go away with HP-UX 8.0
+ when select has been enhanced to flag exceptions in the readfds
+ argument. Probably inter_poll would work.
+
+ Edward Haines <haines@bbn.xcom> notes that close returns EPERM
+ ("Not owner") on his Sun 4.0.3. This is rather startling!
+ (That's what I get for checking the return value of close!)
+ He said it is possible that they have modified things (viz.
+ DDN X.25 is loaded), but it still sounds incredible. For now,
+ I told him to either "catch" all closes or to remove the check
+ in the source code.
+
+ Added example scripts: ftp-rfc retrieves an RFC from uunet
+ via ftp. archie mails back a listing from the archie server.
+
+ Add the rest of Hal Peterson's changes for Cray support, 1)
+ fixing a problem where spawned processes flushed unread I/O
+ upon process exit, and 2) creating processes with the correct
+ uid. See his comments in command.c for more info.
+
+6/6/91 2.57 (On Cray) made signal handler declarations right. Added
+ missing #endif. Added includes to pty_unicos.c. Fixed bug
+ in two bugs in CmdSend, one involving send_stderr, the other
+ send_user. All of these are from Hal Peterson.
+
+ Added gethostbyaddr as example script. Given an internet
+ address, it returns the domain name. By querying neighboring
+ hosts if the name server fails, a much higher probability of
+ returning the name is obtained.
+
+5/30/91 2.56 Mispelled "match_max" as "max_match" in rftp script. This
+ caused files after the 2000 byte mark (per directory) to be
+ skipped.
+
+5/21/91 2.55 Revisited BSD pty code to reject ptys that have either slave or
+ master side already open. This fixes problems rare problems
+ such as expect not being able to see EOFs from the child proc.
+ (because another process still has the pty slave side open).
+ USG and Cray pty code could probably use this code, too.
+
+ Fixed bug in expect library (lib_exp.c) which caused output to
+ be copied to stderr instead of logfile when logfile_all was
+ set. Per Sreedhar Muppala <muppalla@nssdca.gsfc.nasa.xgov>.
+
+5/16/91 2.54 Fixed weather script to accomodate occasional Weather Watch
+ that would cause an unexpected initial question to pop up.
+
+5/15/91 2.53 Added comment to BUG section of man page describing pty
+ misbehavior with non-interactive programs (search for "553061"
+ below), as per Hal Peterson <hrp@cray.xcom>.
+
+ Removed note from README about asking Ousterhout for SV TCL
+ at his request.
+
+5/11/91 2.52 Fixed a syntax error that Bruce Larson <ires@kaspar.ires.xcom>
+ found in inter_poll.c
+
+4/23/91 Computing Systems accepted paper on Expect for issue 4.2.
+
+4/18/91 2.51 Added some example scripts:
+ weather - retrieves weather forecasts from National Weather
+ Service via University of Michigan server.
+ rftp - ftp a directory hierarchy (i.e., recursively).
+
+4/18/91 2.50 Changed timeout to apply to total time in expect rather than
+ per read(). Original behavior hung forever when my modem test
+ script started listening to a modem than spit out 1 spurious
+ character every 10 seconds (very consistently).
+
+ Hal Peterson <hrp@pecan.cray.xcom> noted that exp_spawnv's args
+ didn't match documentation. Fixed in favor of documentation.
+ Several other funcs don't match header file (but typechecking
+ is avoided during compilation), because it was too hard for me
+ to make the header file ANSI compliant and support varargs
+ (which is undeniably more portable than stdargs at this point).
+ Fixed prototype declarations (again) in expect.h for C++ and
+ Standard C. Verified with GNU, G++ and Sun C (proto-less).
+
+ Added exp_disconnect to library. Moved alarm calls closer
+ to read() to tighten windows.
+
+4/11/91 2.49 Changed passmass script to use timeout of 1000000 instead of
+ 10000000000 after discovering that Ultrix sleep(3) doesn't
+ sleep at all for large values!
+
+ Added support for systems without dup2 (SVR2) per
+ <elston@edwards-tems.af.xmil>.
+
+ Added test/Makefile to shar as per Chris Pribe
+ <cpribe@park.bu.xedu>.
+
+4/4/91 2.48 Fixed possible problem with poll in inter_poll.c for systems
+ that check for a valid address even though no members are used.
+
+3/27/91 2.47 Added support for Cray Unicos 6.0, which of course is different
+ from Unicos 5.1 (which was different from everything else)!
+ This and other minor bugs fixed courtesy of Pete Termaat.
+
+3/19/91 2.46 Removed a "feature" which caused patterns with no whitespace
+ not to be run through SplitList. While not documented not to
+ do so, this was mystifying even to me when I saw it. For
+ William Waite. The result actually simplified the internal
+ handling of multiple patterns, removing some excessively
+ complex logic that I thought would be helpful for speed, but
+ that in retrospect, was not that important.
+
+3/16/91 2.45 Added my own definition of FD_SET, fd_set, etc, test for
+ SIGABRT, and support different types of signal arg func
+ definitions to support SunOS 3.5 as requested by William Waite
+ <waite@scotty.colorado.xedu>.
+
+3/14/91 2.44 Removed redundant def'n of pty_stty in pty_usg.c, redef of
+ sprintf and added signal.h to command.c to make compiles
+ cleaner on SV3 and HPUX machines. All compliments of Mike
+ Gourlay.
+
+3/10/91 2.43 Added -s (for slow) and -h (for human) flags to send. This
+ had been requested by several people including Frank Terhaar-
+ Yonkers (who actually wrote and tested a "send_slow" command),
+ and Steve Simmons who suggested the "human" option (over a year
+ ago), and Brian Woodson (brianw@swqa-sun.ESD.3com.com), who
+ requested both! Thanks to NIST statistician, Keith Eberhardt,
+ who taught me about the Weibull Distribution.
+
+ According to Jim Thomas <jthomas@nmsu.xedu>, 3b2 requires
+ defines for R_OK and W_OK. Added to pty_usg.c.
+
+ Added support for "-" as file name on command line to mean
+ stdin as requested by Steve Clark <clark@cme.nist.xgov>.
+
+ Wrote passmass (change root password on a set of machines) as
+ requested by Ken Manheimer <klm@cme.nist.xgov>. Added to test
+ directory.
+
+2/21/91 2.42 Removed reinstallation of signal 0 in signal handler.
+
+ Added hook for setting initial pty parameters when started in
+ the background. Should've done this a long time ago, but I
+ was never really happy with my solution and had hoped I would
+ think of a nicer method. I only hope this is clean enough.
+
+2/10/91 2.41 Added buffer_full keyword to solve Brian Fitzgerald's problem.
+ It disables "forgetfullness" so that when expect's internal
+ buffer hits match_max, whatever it has returns at that point.
+ Didn't add this to the library version, because I want to think
+ for awhile about the cleanest way to do it.
+
+2/4/91 2.40 Per Brian Fitzgerald (fitz@mml0.meche.rpi.edu), fixed error in
+ interact example on man page which incorrectly implied that
+ "kill" was built-in.
+
+ Added fork/disconnect functions. This solved the problem of
+ Jerry Friesen (jafries@snll-arpagw.llnl.gov) who wanted to run
+ an expect script that asks for a password and then goes to
+ sleep for awhile before waking up to run in the background (to
+ run a program using Kerberos).
+
+1/30/91 2.39 Per Jim Johnson (jaj@mlb.semi.harris.com), added declaration
+ and documentation for exp_pid in libexpect.
+
+1/10/91 2.38 More mods from Frank Terhaar-Yonkers. Also, some requests
+ from Pete TerMaat (pete@willow.cray.com) for features:
+
+ 1) a single-step facility. Yeah, that would be nice. No
+ ideas on how to do this easily.
+
+ 2) Generate scripts automatically after watching a session.
+ This is hard. Read more about this in the FAQ.
+
+1/10/91 2.37 Added support for Cray Unicos 5.1, all courtesy of Frank
+ Terhaar-Yonkers (fty@sunvis.rtpnc.epa.gov). Most of it had to
+ do with pty support.
+
+1/8/91 2.36 Modified expect.h to support C++ and ANSI prototypes. Added
+ appropriate example in test directory based on chesslib.c.
+
+1/7/91 2.35 At the request of Jan Norden (jano@imdpy1.im.se) added
+ NO_MEMCPY and NO_STRING_H defines for Pyramid.
+
+1/3/91 2.34 Added a check to protect against a longjmp occurring between
+ i_read and alarm(0). Didn't think this would be a problem but
+ evidentally a function return modifies the stack, so it cannot
+ be returned to again. Drat! This appeared in the robohunt
+ script I wrote which plays hunt automatically and uses 1
+ second timeouts.
+
+12/19/90 2.33 Add signal to sighandler, to reinstall signal for those systems
+ that need it.
+
+12/12/90 2.32 Removed test for args to expect. I only recently realized that
+ no args still allows a valid way to check for timeout and eof!
+
+12/6/90 2.30-1 Mike Gourlay (mike@penguin.gatech.edu) found and fixed quite a
+ few SV-related problems that I had introduced since Clem's
+ fixes. We eventually got it to run on his HPUX machine, a
+ mixed breed of BSD/USG stuff. But spawning a shell worked but
+ always produced a complaint about "no access to tty" which we
+ were never able to get rid of, and he had a problem with
+ exp_fexpect (but not exp_expect), although it still isn't clear
+ if that was expect's fault. He said he would speak to some HP
+ engineers about what he found.
+
+12/5/90 2.29 Fixed a malloc off-by-one bug in new C library. After
+ contemplation, revised interfaces. Decided that rather than
+ following the original 'expect' style, it should be more like
+ what a C programmer is used to, so I made the file descriptors
+ be parameters to exp_expect rather than globals, added an
+ exp_popen which is a popen equivalent, and added exp_fexpect
+ versions which are stream equivalents.
+
+ Am not happy with exp_fexpect. It is much less efficient than
+ exp_expect, because there is no way to (portably) get fread()
+ to return the way read() does, with less then the number of
+ characters you supplied a buffer for. Instead, I have to call
+ fgetc for every char. Ugh.
+
+ Add a couple new examples, including lpunlock, time.exp,
+ chesslib.c (using file descriptors) and chesslib2.c (which uses
+ stream pointers).
+
+12/3/90 2.28 Created C library version of expect.
+
+11/29/90 2.27 Fixed bug in interact - when no string actions were defined,
+ the mapping table length wasn't set at all.
+
+ Made interact call printify when debugging so that crlf and
+ other nonprintables are visible. Fixed bug in printify which
+ interpreted some characters wrong due to parity.
+
+ Added some more examples to the distribution (lpunlock, dvorak,
+ timed_read) and put in another tip in the TCL HINTS section of
+ the man page.
+
+11/18/90 2.26 Fixed mismatched comment per Craig Warren (ccw@deakin.oz.xau).
+ Also improved man page entry for "interact".
+
+11/17/90 2.25 Added -f (fast) on interact options, and made default case a
+ little more efficient. Added explicit support for SIG_IGN and
+ SIG_DFL in trap command. Added ability to specify signals
+ symbolically for portability.
+
+11/15/90 2.24 Craig Warren (ccw@deakin.oz.xau) wanted to exit expect while in
+ interact with a single character. Dan Bernstein
+ (brnstnd@kramden.acf.nyu.edu) wanted to suspend with a single
+ character. So I generalized interact's escape character to
+ string-action pairs.
+
+11/7/90 2.23 Tired of getting reports that various (Ultrix 3.1, BSD4.3) C
+ compilers can't handle ternary conditionals returning ptr to
+ func returning void. Made all (2) such statements into
+ if-then-elses. Per Steve Simmons (scs@iti.org).
+
+10/8/90 2.22 Allow "log_file" even when no log is open. This makes user
+ programming a little simpler - they don't have to remember
+ whether they opened the log or not.
+
+9/27/90 2.21 Fixed bug, v2.19 introduced. debuglog(unknown string) requires
+ a "%s" as formatting for protection against %'s in the unknown
+ string.
+
+9/17/90 2.20 4 syntax errors in interact_poll.c, vik@sequent.com. Added
+ quotes to all the sends (now that this is more efficient) in
+ the examples and man pages. Also removed a misstatement in the
+ man page about the behavior of double quotes.
+
+9/15/90 2.19 Removed buffering from send command. Originally, I buffered
+ the args, so I could do it all in one write. But to send
+ variables bigger than the buffer didn't work. I didn't think
+ about this before. But Joe Gorman
+ (Joe.Gorman@elab-runit.sintef.xno) asked me if you could "send"
+ a file in one command, and of course you can using [exec cat]
+ as the argument to send, but the buffering prevented big
+ files from being sent. Anyway, now it works.
+
+9/14/90 Fixed the declarations of nflog and nferrlog. Added a #define
+ so lack of pid_t could be controlled from the Makefile. Per
+ Andy Holyer (and@ux.rfhsm.lon.ac.uk)
+
+9/4/90 2.18 Added trap command to catch signals. This is nice as (among
+ other things) it allows you to turn off the conversion of ^C to
+ timeout which was requested by John Conti <jconti@cisco.xcom>.
+
+8/21/90 2.17 Fixed bug in printify. Forgot to reset ptr to beginning of
+ print buffer. Made debugging info wrong. Possibly screwing up
+ other things on overflow.
+
+ Paper accepted into USENIX LISA!
+
+8/15/90 Cleaned up man page. Made tabs line things up correctly,
+ finally.
+
+ Found another problem with ptys (at least under SunOS 4.1 and
+ earlier). When last pty-slave fd closed, any unread output is
+ lost after a short window of time (around 10 seconds on a
+ Sun 3/60). Sent example ptybug.c to Sun demonstrating this and
+ EIO problem found earlier. (Service Order #553061)
+
+8/6/90 2.16 Added -f to debug command, -a to log_file command. This
+ required significant changes, including revisiting all the
+ logging routines, plus miscellaneous output done in special
+ places. Noted that it cannot be done with getopt, since it
+ could be called during main's getopt, and getopt is not
+ reentrant! (Guess how I discovered this!!)
+
+ I'm not particularly happy with the design, but maybe others
+ won't be. In any case, I like the benefit of it and am now
+ glad that -a was asked for. Per Harry Bochner and Ira Fuchs
+ (fuchs@pucc.bitnet).
+
+ Changed behavior of argv, so that 0 == [length $argv] when no
+ script/args supplied.
+
+8/4/90 2.15 Added debug command, so -d-ness could be changed while expect
+ is running.
+
+7/20/90 2.14 Fixed small bug in -d output from expect, which printed ^Z as
+ ^:
+
+7/18/90 2.13 Added wait command. A waitpid/waitspawnid would be nice and
+ cleaner, too, but since csh doesn't need it, it is probably not
+ worth much.
+
+ Consequently, removed SIGCHLD handling from command.c. It
+ worked under SV but not BSD. By forcing users to explicitly
+ code waits, resulting scripts are more portable.
+
+ Rewrote rogue example. rogue sometimes misses EOF (generated
+ by close on our side) and continues reading.
+
+7/16/90 2.12 Removed buffering from variadic log routines. This was
+ faulting when the buffers overflowed.
+
+ Cleaned up the -d output from expect, so it is much more
+ readable. For example, control characters are now visible.
+
+7/14/90 2.11 Added declaration for errno, to support 4.3BSD. Per Alan
+ Crosswell. Added -i flag and related behavior.
+
+7/12/90 2.10 Fixed bug where timeout = 0 waited forever rather than not
+ waiting at all.
+
+7/11/90 Fixed man page example which didn't include the blank on the
+ end of an ftp prompt.
+
+7/9/90 2.9 Fixed bug in send when spawn_id = $user_spawn_id.
+
+6/27/90 2.8 Integrated some mods from clem cole (clemc@ccc.com) to support
+ System V.3 (386/ix Version 2.02). Unfortunately, he didn't do
+ "select".
+
+6/25/90 2.7 Test that cmdfile and logfile are open before fclosing in child
+ while spawning. Per Corey Satten <corey@cac.washington.xedu>
+
+6/24/90 2.6 Pty master returns EIO instead of EOF when pty slave closes.
+ Bug in pty driver? Until I figure this out, I have put in code
+ to interpret EIO to EOF.
+
+6/21/90 Added new section to expect man page - Tcl hints.
+
+6/14/90 Spoke at USENIX. Went well. Added USENIX paper as separate
+ ftp archive.
+
+6/4/90 2.5 Fixed bug in ^C catching during expect. Changed man page to
+ accurately describe what ^C does. Fixed bug that caused "send"
+ to screw up when handed 0 arguments. All per Harry Bochner.
+
+6/1/90 2.4 Made trailing empty action in expect optional, primarily to
+ make straightline code easier to read.
+
+5/15/90 2.3 Changed expect to strip nulls from program output since there
+ is no way for Tcl to handle them, per Harry Bochner.
+
+5/5/90 Added "send_error" command.
+
+4/26/90 Got USENIX paper back from Kolstad to proof. Am depressed at
+ how awfully they formatted it.
+
+4/25/90 2.2 Eric Newton found that expect's special variables weren't being
+ found inside of user subroutines. Had to do with new Tcl,
+ which now differentiates between variables that are undefined
+ vs. empty.
+
+4/24/90 Upgraded Tcl from 2.1 to 3.3.
+
+4/22/90 Added special behaviors of ^C in expect, and when profiling.
+ Profiled rogue (at urging of Ousterhout).
+
+4/10/90 2.1 Added select command. Added support for user_spawn_id so that
+ you could treat user just like another process (i.e. with send
+ and expect). Decided to leave send_user/expect, since scripts
+ are more readable with them.
+
+4/2/90 2.0 Changed syntax of expect to provide alternatives (a la Tcl
+ case), per suggestion of John Ousterhout. Note that this
+ breaks pre-2.0 scripts.
+
+3/31/90 Got great comments from Ousterhout. (This time he said that he
+ really liked the idea. Maybe he realizes how much it will
+ promote Tcl!)
+
+3/30/90 Got comments from dpk. Made me think more about Perl.
+
+3/28/90 Evi said I should turn the paper in unformatted and they will
+ format it. (She's kidding, I hope.)
+
+3/27/90 1.8 Rewrote interface so that raw arguments can be passed in like a
+ shell. I'd been thinking about this for some time, but Eric
+ Newton finally prodded me into action.
+
+3/25/90 Got first corrections for paper - from Sue Mulroney!
+
+3/24/90 Observed that it is possible to use the #! syntax with expect.
+ I asked John O. about this (his choice of # as a comment
+ character), and he said it was pure coincidence. Deprecated
+ request to end scripts in ".exp".
+
+ Ted Hopp volunteered to be my Center WERB reader.
+
+3/23/90 Finished 1st draft of USENIX paper and sent copies to John
+ Ousterhout and panel chair, dpk@morgan.com.
+
+3/20/90 1.7 Deprecated "stty", and added more general "system" command.
+
+ Sent Evi some complaints about the business of not allowing
+ camera-ready at USENIX.
+
+3/17/90 Sent copies of man page to Doug Gwyn and Larry Wall for
+ comments. Note that gwyn downloaded it.
+
+3/16/90 Am really irritated by USENIX. My paper has been put in a
+ session against another session, the BSD people. Furthermore,
+ they called my paper an application, when it is no more so than
+ any other shell or language. Better I should be in "lessons
+ learned". But it was too late to change the schedule. On top
+ of that, our session has four people in it, so I'll have very
+ little time to speak. Grrrr.
+
+3/13/90 1.6 Added "stty", because without it you can't do things like
+ turning off echo to accept a password.
+
+3/8/90 1.5 Abstract was accepted into USENIX!!!! Time to start writing
+ it! Sent man page to Ousterhout. He didn't seem too
+ impressed.
+
+ Added "send_user/expect_user" after listening to Ken complain
+ about how shell could not do timed reads. Actually it can, but
+ expect does it much more naturally. Deprecated echo. Now, I
+ realize that expect can be viewed as a shell!
+
+ Changed logfile/loguser to log_file/log_user to match all the
+ variables with underscores in them.
+
+ Barry Warsaw asked if there was any way one could execute any
+ command from interact (apparently without any reason in mind).
+ Nonetheless, it is a wonderful idea, and I changed the "abort
+ character" in interact to an "escape mechanism". After
+ escaping, you may execute any command. return duplicates the
+ old action of the abort character. Now you can do interactive
+ job control, recursive interacts, etc. You can bet I didn't
+ get this right the first time!
+
+ At Scott's request, fixed bug related to pty initializing.
+ Scott was putting expect in the background which disassociated
+ it from a tty, and I was blindly copying the tty parameters
+ without checking to see if they were meaningful or not.
+
+ Tightened up exit code. Fixed bug in spawn so it would print
+ error messages when it failed. Spawn sends back the error
+ message in the pty, if the fork succeeds but exec fails. Cute!
+
+ Added "close" command. Makes scripts much shorter and cleaner.
+
+ Return string matched by expect directly, rather than setting a
+ special variable.
+
+ Added "match_max" feature. Probably no one will ever use it.
+
+ Added trace command.
+
+3/6/90 1.4 Rob Densock was the second user, and suggested (demanded?) the
+ idea of the loguser command. I added it and changed "log" to
+ "logfile" making the first incompatibility with existing
+ scripts (sorry, Steve).
+
+3/1/90 1.3 Trying to make pty code more robust. Many questions unanswered
+ by manuals. Did a lot of guessing. While debugging, looked
+ through pty code in gnuemacs to see if I might increase
+ portability somehow. Found lots of funky ifdefs on weird
+ ioctls. Found lots of comments like "this might work".
+
+2/28/90 Sent a short Tcl bug list to John Ousterhout. He thanked me!
+
+2/22-3/90 1.2 Hooked my first user, Steve Ray. Surprisingly, he only found
+ one bug in the code (exit didn't handle args correctly), but it
+ was obvious that I need to put more explanation in the man
+ page. Many of the examples in the man page are based upon his
+ probl.. questions. Thanks, Steve!
+
+2/20/90 Posted news about expect to "general" newsgroup locally.
+
+2/15-20/90 Talked to local POSIX reps and then to Steve Albert (AT&T)
+ about portability of select, wait and other system calls. I'm
+ not impressed by 1003.1.
+
+2/9/90 John Ousterhout answered some questions I had about Tcl syntax.
+ I like this language!
+
+2/8/90 1.1 Sandy Ressler suggested the idea of being able to spawn
+ multiple programs at the same time although he didn't say how.
+
+ It took about a day to design and code the spawn_id hook.
+ Extremely difficult to support this with uucp-style kludge.
+ Switched to using select. So much for portability.
+
+ I investigated how to do this portably, and spent some time
+ talking to NIST & AT&T POSIX representatives. Unfortunately,
+ portability (especially when it comes to select()) remains a
+ dream. Provided multiple versions of "interact" depending upon
+ what OS you are running.
+
+2/7/90 1.0 Completed first cut of "sex" (for "Smart EXec" or
+ "Send/EXpect"). Supports send, expect, echo, log, spawn,
+ interact.
+
+ Spent a lot of time making "log" write to log in just the right
+ order (across fork and while debug flag enabled). Ended up
+ writing a bunch of variadic log routines.
+
+ Fooled around with uucp-style multiple processes versus one
+ process doing select() to read asynchronously. Using
+ uucp-style for now, since it is more portable.
+
+ Gave up on pipes, and switched to ptys. Pipes seem to be
+ messed up by ftp, perhaps because it goes into raw mode? Ptys
+ are more efficient and cleaner to program albeit less
+ well-documented and portable from system to system.
+
+ Ken Manheimer helped me explain what the program does. I kept
+ saying it does "send/expect" processing, and he kept insisting
+ that was meaningless to everyone. (In fact, it comes from
+ uucp, and I guess uucp hackers are indeed a dying breed.) Ken
+ gave me an elegant enough sentence that I expanded it into an
+ abstract and sent it in to the USENIX conference the following
+ day (two days after the deadline).
+
+ I noted that the uucp documentation I referenced in the
+ submission is dated October 31, 1978!
+
+1/30/90 0.0 Got a copy of Tcl and went to work. Tcl was exactly what I
+ need. Plus, it is easy to use, AND it is documented.
+
+1/25/90 Attended Winter 1990 USENIX in DC, with the goal of banging
+ heads with some other gurus in hopes of finding a good
+ send/expect language for a generalized stelnet. Had looked at
+ uucp and kermit but found nothing general enough.
+
+ Listened to John Ousterhout's presentation on Tcl. By the
+ middle of the talk, I had found religion. At the end when he
+ said it was public-domain, I was ready to swoon.
+
+*/*/88-89 Spent a lot of time telling Scott how useful his program could
+ be if he made it more general. I thought it wouldn't be that
+ difficult to make more generic. Scott was interested but not
+ enough to do it.
+
+9/25/87 Helped Scott Paisley write a program called stelnet, that
+ forked a telnet and did very simple send/expect processing.
+ It used pipes, not ptys. It had no pattern matching, and only
+ straight-line control without error handling. Nonetheless,
+ this got me to thinking about making stelnet more generic.
+
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..0055758
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,282 @@
+This file is INSTALL. It contains installation instructions for Expect.
+
+If you do not have Tcl, get it (Expect's README explains how) and
+install it. The rest of these instructions assume that you have Tcl
+installed.
+
+If you are installing Expect on a single architecture, or are just
+trying it out to see whether it is worth installing, follow the
+"Simple Installation" below. If you are installing Expect on multiple
+architectures or the "Simple Installation" instructions are not
+sufficient, see "Sophisticated Installations" below.
+
+--------------------
+Permissions
+--------------------
+
+On a Cray, you must be root to compile Expect. See the FAQ for why
+this is.
+
+If you want shared libs on Linux, you must be root in order to run
+ldconfig. See the ldconfig man page for more info.
+
+--------------------
+Simple Installation
+--------------------
+
+By default, the Tcl source directory is assumed to be in the same
+directory as the Expect source directory. For example, in this
+listing, Expect and Tcl are both stored in /usr/local/src:
+
+ /usr/local/src/tcl8.0 (actual version may be different)
+ /usr/local/src/expect-5.24 (actual version may be different)
+
+If Tcl is stored elsewhere, the easiest way to deal with this is to
+create a symbolic link to its real directory. For example, from the
+Expect directory, type:
+
+ ln -s /some/where/else/src/tcl8.0 ..
+
+The same applies for Tk, if you have it. (Tk is optional.)
+
+Run "./configure". This will generate a Makefile (from a prototype
+called "Makefile.in") appropriate to your system. (This step must be
+done in the foreground because configure performs various tests on
+your controlling tty. If you want to do this step in the background
+in the future, automate it using Expect!)
+
+Most people will not need to make any changes to the generated
+Makefile and can go on to the next step. If you want though, you can
+edit the Makefile and change any definitions as appropriate for your
+site. All the definitions you are likely to want to change are
+clearly identified and described at the beginning of the file.
+
+To build only the stand-alone Expect program, run "make expect". This
+is appropriate even if you still haven't decided whether to install
+Expect, are still curious about it, and want to do the minimum
+possible in order to experiment with it.
+
+To build everything, run "make". If "configure" found Tk and X on
+your system, this will build "expectk" (Expect with Tk).
+
+Once expect is built, you can cd to the example directory and try out
+some of the examples (see the README file in the example directory).
+Note that if Tcl has not yet been installed, this won't work. In this
+case, see the instructions "Trying Expect Without Installing Tcl"
+below.
+
+"make install" will install Expect. If you built Expectk, that will
+be installed as well. So will the documentation and some of the most
+useful examples.
+
+If you want shared libs on Linux, you must now su to root and run
+ldconfig on the shared library. See the ldconfig man page for more
+info.
+
+A handful of people running "pure" 4.2BSD systems have noted that
+expect fails to link due to lack of getopt and vprintf. You can get
+these from uunet or any good archive site.
+
+--------------------
+Trying Expect Without Installing Tcl
+--------------------
+
+Once expect is built, you can try it out. If Tcl has not been
+installed (but it has been compiled), you will need to define the
+environment variable TCL_LIBRARY. It should name the directory
+contain the Tcl libraries. For example, if you are using csh with Tcl
+8.0.3:
+
+ $ setenv TCL_LIBRARY ../tcl8.0.3/library
+
+Now you can run expect.
+
+The same advice applies to Tk. If it is available but has not been
+installed, you can try out expectk but only after defining TK_LIBRARY.
+For example, if you are using csh with Tk 8.0.3:
+
+ $ setenv TK_LIBRARY ../tk8.0.3/library
+
+Now you can run expectk.
+
+--------------------
+Sophisticated Installations
+--------------------
+
+The following instructions provide some suggestions for handling
+complex installations.
+
+--------------------
+Changing Defaults
+--------------------
+
+The configure script allows you to customize the Expect configuration
+for your site; for details on how you can do this, type "./configure
+-help" or refer to the autoconf documentation (not included here).
+Expect's configure supports the following flags in addition to the
+standard ones:
+
+ --verbose Cause configure to describe
+ what it is checking and what it decides.
+
+ --enable-shared Compile Expect as a shared library if it
+ can figure out how to do that on this
+ platform. (You must have already
+ compiled Tcl with this flag.)
+
+ --disable-load This switch is ignored so that you can
+ configure Expect with the same configure
+ command as Tcl. If you want to disable
+ dynamic loading, configure Tcl with this
+ flag and then reconfigure Expect.
+
+ --enable-gcc This switch is ignored so that you can
+ configure Expect with the same configure
+ command as Tcl. If you want to enable gcc,
+ configure Tcl with it and then reconfigure
+ Expect. Expect will inherit the definition
+ that way. It is not safe to modify the
+ Makefile to use gcc by hand. If you do
+ this, then information related to dynamic
+ linking will be incorrect.
+
+ --enable-threads This switch is ignored so that you can
+ configure Expect with the same configure
+ command as Tcl.
+
+ --with-tcl=... Specifies the directory containing Tcl's
+ configure file (tclConfig.sh).
+
+ --with-tclinclude=... Specifies the directory containing Tcl's
+ private include files (such as tclInt.h)
+
+ --with-tk=... Specifies the directory containing Tk's
+ configure file (tkConfig.sh).
+
+ --with-tkinclude=... Specifies the directory containing Tk's
+ private include files (such as tkInt.h)
+
+Some of the defaults in "configure" can be overridden by environment
+variables. This is a convenience intended for environments that are
+likely to affect any program that you configure and install.
+
+The following environment variables are supported. If you use these,
+consider adding them to your .login file so that other installation
+scripts can make use of them.
+
+CC C compiler
+CFLAGS Flags to C compiler
+CPPFLAGS Flags to C preprocessor
+LDFLAGS Flags to linker
+LIBS Libraries
+CONFIG_SHELL Shell for configure and Make
+
+Settings can also be given on the command line. For example, you
+could tell configure about flags from a Bourne-compatible shell as
+follows:
+
+ CFLAGS=-O2 LIBS=-lposix ./configure
+
+Although configure will do some searching for Tcl (and all of this
+discussion holds true for Tk as well), configure likes to find the Tcl
+source directory in the parent directory of Expect and will use that
+Tcl if it exists. To make sure Tcl can be found this way (if it is
+located somewhere else), create a symbolic link in Expect's parent
+directory to where the Tcl directory is.
+
+By default, configure uses the latest Tcl it can find. You can
+override this by creating a symbolic link of "tcl" which points to the
+release you want.
+
+If you can't or don't want to create symbolic links, you can instead
+indicate where Tcl and Tk are by using the following environment variables:
+
+with_tcl Directory containing Tcl configure file (tclConfig.h)
+with_tclinclude Directory containing Tcl include files
+with_tkinclude Directory containing Tk include files
+with_tk Directory containing Tk binary library (tkConfig.h)
+
+--------------------
+Multiple-Architecture Installation
+--------------------
+
+You might want to compile a software package in a different directory
+from the one that contains the source code. Doing this allows you to
+compile the package for several architectures simultaneously from the
+same copy of the source code and keep multiple sets of object files on
+disk.
+
+To compile the package in a different directory from the one
+containing the source code, you must use a version of make that
+supports the VPATH variable. GNU make and most other recent make
+programs can do this.
+
+cd to the directory where you want the object files and executables to
+go and run configure. configure automatically checks for the source
+code in the directory that configure is in and in .. If configure
+reports that it cannot find the source code, run configure with the
+option --srcdir=dir, where dir is the directory that contains the
+source code.
+
+You can save some disk space by installing architecture-independent
+files (e.g., scripts, include files) in a different place than
+architecture-dependent files (e.g., binaries, libraries). To do this,
+edit the Makefile after configure builds it, or have configure create
+the Makefile with the right definitions in the first place. To have
+configure do it, use the following options to configure:
+
+ --prefix=indep
+ --exec-prefix=dep
+
+where dep is the root of the tree in which to store
+architecture-dependent files and indep is the root in which to
+store -dependent files. For example, you might invoke configure this
+way:
+
+ configure --prefix=/usr/local/bin --exec-prefix=/usr/local/bin/arch
+
+--------------------
+Test Suite
+--------------------
+
+Patterned after the Tcl test suite, I have begun building a test suite
+in the subdirectory "test". It is still incomplete however you may
+use by typing "make test" in this directory. You should then see a
+printout of the test files processed. If any errors occur, you'll see
+a much more substantial printout for each error. See the README file
+in the "tests" directory for more information on the test suite.
+
+Note that the test suite assumes the existence of certain programs to
+use as interactive programs. If you are missing these or they behave
+differently, errors may be reported. Similarly, the test suite
+assumes certain other things about your system, such as the sane stty
+parameters.
+
+You may also try some of the programs distribute in the example
+directory (see the README file in the example directory). They are a
+strong indication of whether Expect works or not. If you have any
+problems with them, let me know.
+
+--------------------
+Uninstalling
+--------------------
+
+"make uninstall" removes all the files that "make install" creates
+(excluding those in the current directory).
+
+--------------------
+Cleaning Up
+--------------------
+
+Several "clean" targets are available to reduce space consumption of
+the Expect source. The two most useful are as follows:
+
+"make clean" deletes all files from the current directory that were
+created by "make"
+
+"make distclean" is like "make clean", but it also deletes files
+created by "configure"
+
+Other targets can be found in the Makefile. They follow the GNU
+Makefile conventions.
+
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..c05c880
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,636 @@
+# Makefile.in --
+#
+# This file is a Makefile for Expect TEA Extension. If it has the name
+# "Makefile.in" then it is a template for a Makefile; to generate the
+# actual Makefile, run "./configure", which is a configuration script
+# generated by the "autoconf" program (constructs like "@foo@" will get
+# replaced in the actual Makefile.
+#
+# Copyright (c) 1999 Scriptics Corporation.
+# Copyright (c) 2002-2005 ActiveState Corporation.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# RCS: @(#) $Id: Makefile.in,v 5.51 2010/09/30 17:14:07 andreas_kupries Exp $
+
+#========================================================================
+#========================================================================
+
+# expect must be setuid on crays in order to open ptys (and accordingly,
+# you must run this Makefile as root).
+# See the FAQ for more info on why this is necessary on Crays.
+SETUID = @SETUID@
+# SETUID = chmod u+s
+
+LIB_RUNTIME_DIR = $(DESTDIR)@libdir@
+
+# The following Expect scripts are not necessary to have installed as
+# commands, but are very useful. Edit out what you don't want
+# installed. The INSTALL file describes these and others in more
+# detail. Some Make's screw up if you delete all of them because
+# SCRIPTS is a target. If this is a problem, just comment out the
+# SCRIPTS target itself.
+
+SCRIPTS = timed-run timed-read ftp-rfc autopasswd lpunlock weather \
+ passmass rftp kibitz rlogin-cwd xpstat tkpasswd dislocate xkibitz \
+ tknewsbiff unbuffer mkpasswd cryptdir decryptdir autoexpect \
+ multixterm
+
+# A couple of the scripts have man pages of their own.
+# You can delete these too if you don't want'em.
+
+SCRIPTS_MANPAGES = kibitz dislocate xkibitz tknewsbiff unbuffer mkpasswd \
+ passmass cryptdir decryptdir autoexpect multixterm
+
+
+# allow us to handle null list gracefully, "end_of_list" should not exist
+
+SCRIPT_LIST = $(SCRIPTS) end_of_list
+SCRIPT_MANPAGE_LIST = $(SCRIPTS_MANPAGES) end_of_list
+
+# Short directory path where binaries can be found to support #! hack.
+# This directory path can be the same as the directory in which the
+# binary actually sits except when the path is so long that the #!
+# mechanism breaks (usually at 32 characters). The solution is to
+# create a directory with a very short name, which consists only of
+# symbolic links back to the true binaries. Subtracting two for "#!"
+# and a couple more for arguments (typically " -f" or " --") gives you
+# 27 characters. Pathnames over this length won't be able to use the
+# #! magic. For more info on this, see the execve(2) man page.
+
+SHORT_BINDIR = $(exec_prefix)/bin
+
+#========================================================================
+# Nothing of the variables below this line should need to be changed.
+# Please check the TARGETS section below to make sure the make targets
+# are correct.
+#========================================================================
+
+#========================================================================
+# The names of the source files is defined in the configure script.
+# The object files are used for linking into the final library.
+# This will be used when a dist target is added to the Makefile.
+# It is not important to specify the directory, as long as it is the
+# $(srcdir) or in the generic, win or unix subdirectory.
+#========================================================================
+
+PKG_SOURCES = @PKG_SOURCES@
+PKG_OBJECTS = @PKG_OBJECTS@
+
+PKG_STUB_SOURCES = @PKG_STUB_SOURCES@
+PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@
+
+#========================================================================
+# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
+# this package that need to be installed, if any.
+#========================================================================
+
+PKG_TCL_SOURCES = @PKG_TCL_SOURCES@
+
+#========================================================================
+# This is a list of public header files to be installed, if any.
+#========================================================================
+
+PKG_HEADERS = @PKG_HEADERS@
+
+#========================================================================
+# "PKG_LIB_FILE" refers to the library (dynamic or static as per
+# configuration options) composed of the named objects.
+#========================================================================
+
+PKG_LIB_FILE = @PKG_LIB_FILE@
+PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
+
+lib_BINARIES = $(PKG_LIB_FILE)
+bin_BINARIES = expect
+BINARIES = $(lib_BINARIES) $(bin_BINARIES)
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+libdir = @libdir@
+datadir = @datadir@
+mandir = @mandir@
+includedir = @includedir@
+
+DESTDIR =
+
+PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION)
+pkgdatadir = $(datadir)/$(PKG_DIR)
+pkglibdir = $(libdir)/$(PKG_DIR)
+pkgincludedir = $(includedir)/$(PKG_DIR)
+
+top_builddir = .
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+CC = @CC@
+CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
+CFLAGS_WARNING = @CFLAGS_WARNING@
+CLEANFILES = @CLEANFILES@
+EXEEXT = @EXEEXT@
+LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
+MAKE_LIB = @MAKE_LIB@
+MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
+MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
+MAKE_STUB_LIB = @MAKE_STUB_LIB@
+OBJEXT = @OBJEXT@
+RANLIB = @RANLIB@
+RANLIB_STUB = @RANLIB_STUB@
+SHLIB_CFLAGS = @SHLIB_CFLAGS@
+SHLIB_LD = @SHLIB_LD@
+SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
+STLIB_LD = @STLIB_LD@
+TCL_DEFS = @TCL_DEFS@
+TCL_BIN_DIR = @TCL_BIN_DIR@
+TCL_SRC_DIR = @TCL_SRC_DIR@
+# Not used, but retained for reference of what libs Tcl required
+TCL_LIBS = @TCL_LIBS@
+
+#========================================================================
+# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
+# package without installing. The other environment variables allow us
+# to test against an uninstalled Tcl. Add special env vars that you
+# require for testing here (like TCLX_LIBRARY).
+#========================================================================
+
+EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR)
+TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
+ @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
+ PATH="$(EXTRA_PATH):$(PATH)" \
+ TCLLIBPATH="$(top_builddir)"
+TCLSH_PROG = @TCLSH_PROG@
+TCLSH = $(TCLSH_ENV) $(TCLSH_PROG)
+SHARED_BUILD = @SHARED_BUILD@
+
+INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@
+
+PKG_CFLAGS = @PKG_CFLAGS@
+
+# TCL_DEFS is not strictly need here, but if you remove it, then you
+# must make sure that configure.in checks for the necessary components
+# that your library may use. TCL_DEFS can actually be a problem if
+# you do not compile with a similar machine setup as the Tcl core was
+# compiled with.
+#DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
+DEFS = @DEFS@ $(PKG_CFLAGS)
+
+CONFIG_CLEAN_FILES = Makefile
+
+CPPFLAGS = @CPPFLAGS@
+LIBS = @PKG_LIBS@ @LIBS@
+AR = @AR@
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
+#========================================================================
+# Start of user-definable TARGETS section
+#========================================================================
+
+#========================================================================
+# TEA TARGETS. Please note that the "libraries:" target refers to platform
+# independent files, and the "binaries:" target inclues executable programs and
+# platform-dependent libraries. Modify these targets so that they install
+# the various pieces of your package. The make and install rules
+# for the BINARIES that you specified above have already been done.
+#========================================================================
+
+all: binaries libraries doc
+
+#========================================================================
+# The binaries target builds executable programs, Windows .dll's, unix
+# shared/static libraries, and any other platform-dependent files.
+# The list of targets to build for "binaries:" is specified at the top
+# of the Makefile, in the "BINARIES" variable.
+#========================================================================
+
+binaries: $(BINARIES) pkgIndex.tcl-hand
+
+libraries:
+
+doc:
+
+install: all install-binaries install-libraries install-doc
+
+install-binaries: binaries install-lib-binaries install-bin-binaries
+
+#========================================================================
+# This rule installs platform-independent files, such as header files.
+#========================================================================
+
+install-libraries: libraries $(SCRIPTS)
+ @mkdir -p $(DESTDIR)$(includedir)
+ @echo "Installing header files in $(DESTDIR)$(includedir)"
+ @list='$(PKG_HEADERS)'; for i in $$list; do \
+ echo "Installing $(srcdir)/$$i" ; \
+ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \
+ done;
+# install standalone scripts and their man pages, if requested
+ @mkdir -p $(DESTDIR)$(prefix)/bin
+ -for i in $(SCRIPT_LIST) ; do \
+ if [ -f $$i ] ; then \
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(prefix)/bin/$$i ; \
+ rm -f $$i ; \
+ else true; fi ; \
+ done
+
+#========================================================================
+# Install documentation. Unix manpages should go in the $(mandir)
+# directory.
+#========================================================================
+
+install-doc: doc
+ @mkdir -p $(DESTDIR)$(mandir)/man1
+ @mkdir -p $(DESTDIR)$(mandir)/man3
+ @echo "Installing documentation in $(DESTDIR)$(mandir)"
+# install Expect man page
+ $(INSTALL_DATA) $(srcdir)/expect.man $(DESTDIR)$(mandir)/man1/expect.1
+# install man page for Expect library
+ $(INSTALL_DATA) $(srcdir)/libexpect.man $(DESTDIR)$(mandir)/man3/libexpect.3
+ -for i in $(SCRIPT_MANPAGE_LIST) ; do \
+ if [ -f $(srcdir)/example/$$i.man ] ; then \
+ $(INSTALL_DATA) $(srcdir)/example/$$i.man $(DESTDIR)$(mandir)/man1/$$i.1 ; \
+ else true; fi ; \
+ done
+
+test: binaries libraries
+ $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
+
+shell: binaries libraries
+ @$(TCLSH) $(SCRIPT)
+
+expectshell: binaries libraries
+ @$(TCLSH_ENV) expect $(SCRIPT)
+
+gdb:
+ $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
+
+depend:
+
+#========================================================================
+# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
+# mentioned above. That will ensure that this target is built when you
+# run "make binaries".
+#
+# The $(PKG_OBJECTS) objects are created and linked into the final
+# library. In most cases these object files will correspond to the
+# source files above.
+#========================================================================
+
+$(PKG_LIB_FILE): $(PKG_OBJECTS)
+ -rm -f $(PKG_LIB_FILE)
+ ${MAKE_LIB}
+ $(RANLIB) $(PKG_LIB_FILE)
+
+$(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS)
+ -rm -f $(PKG_STUB_LIB_FILE)
+ ${MAKE_STUB_LIB}
+ $(RANLIB_STUB) $(PKG_STUB_LIB_FILE)
+
+#========================================================================
+# We need to enumerate the list of .c to .o lines here.
+#
+# In the following lines, $(srcdir) refers to the toplevel directory
+# containing your extension. If your sources are in a subdirectory,
+# you will have to modify the paths to reflect this:
+#
+# Expect.$(OBJEXT): $(srcdir)/generic/Expect.c
+# $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/Expect.c` -o $@
+#
+# Setting the VPATH variable to a list of paths will cause the makefile
+# to look into these paths when resolving .c to .obj dependencies.
+# As necessary, add $(srcdir):$(srcdir)/compat:....
+#========================================================================
+
+VPATH = $(srcdir)
+
+.c.@OBJEXT@:
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+#========================================================================
+# Create the pkgIndex.tcl file.
+# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
+# you may find that you need to customize the package. If so, either
+# modify the -hand version, or create a pkgIndex.tcl.in file and have
+# the configure script output the pkgIndex.tcl by editing configure.in.
+#========================================================================
+
+pkgIndex.tcl:
+ ( echo pkg_mkIndex . $(PKG_LIB_FILE) \; exit; ) | $(TCLSH)
+
+pkgIndex.tcl-hand:
+ (echo 'if {![package vsatisfies [package provide Tcl] @TCL_VERSION@]} {return}' ; \
+ echo 'package ifneeded Expect $(PACKAGE_VERSION) \
+ [list load [file join $$dir $(PKG_LIB_FILE)]]'\
+ ) > pkgIndex.tcl
+
+#========================================================================
+# Distribution creation
+# You may need to tweak this target to make it work correctly.
+#========================================================================
+
+TAR = tar
+#COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
+COMPRESS = $(TAR) zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
+DIST_ROOT = /tmp/dist
+DIST_DIR = $(DIST_ROOT)/$(PKG_DIR)
+
+dist-clean:
+ rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
+
+dist: dist-clean doc
+ mkdir -p $(DIST_DIR)
+ cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license* \
+ $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
+ $(srcdir)/fixline1 \
+ $(DIST_DIR)/
+ chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
+ chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
+
+ mkdir $(DIST_DIR)/tclconfig
+ cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
+ $(srcdir)/tclconfig/config.guess $(srcdir)/tclconfig/config.sub \
+ $(DIST_DIR)/tclconfig/
+ chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
+ chmod +x $(DIST_DIR)/tclconfig/install-sh
+
+ cp -p $(srcdir)/*.{c,h,man} $(srcdir)/vgrindefs $(srcdir)/NEWS \
+ $(srcdir)/INSTALL $(srcdir)/FAQ $(srcdir)/HISTORY \
+ $(DIST_DIR)/
+ chmod 664 $(DIST_DIR)/*.{c,h,man}
+
+ -list='demos example generic library tests unix win tests testsuite'; \
+ for p in $$list; do \
+ if test -d $(srcdir)/$$p ; then \
+ mkdir -p $(DIST_DIR)/$$p; \
+ cp -p $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
+ fi; \
+ done
+ (cd $(DIST_ROOT); $(COMPRESS);)
+ cp $(DIST_ROOT)/$(PKG_DIR).tar.gz $(top_builddir)
+
+$(SCRIPTS):
+ $(TCLSH) $(srcdir)/fixline1 $(SHORT_BINDIR) < $(srcdir)/example/$@ > $@
+
+## We cannot use TCL_LIBS below (after TCL_LIB_SPEC) because its
+## expansion references the contents of LIBS, which contains linker
+## options we cannot use here (and which is what we are replacing in
+## the first place).
+
+expect: exp_main_exp.o $(PKG_LIB_FILE)
+ $(CC) \
+ @CFLAGS@ \
+ @LDFLAGS_DEFAULT@ \
+ -o expect exp_main_exp.o \
+ @EXP_BUILD_LIB_SPEC@ \
+ @TCL_LIB_SPEC@ \
+ @TCL_DL_LIBS@ @PKG_LIBS@ @MATH_LIBS@ \
+ @TCL_CC_SEARCH_FLAGS@ \
+ @EXP_CC_SEARCH_FLAGS@
+ $(SETUID) expect
+
+expectk:
+ @echo "expectk remove from distribution"
+ @echo "use tclsh with package require Tk and Expect"
+
+#========================================================================
+# Produce FAQ and homepage
+#========================================================================
+
+WEBDIR = /proj/itl/www/div826/subject/expect
+VERSION = $(PACKAGE_VERSION)
+
+# create the FAQ in html form
+FAQ.html: FAQ.src FAQ.tcl
+ FAQ.src html > FAQ.html
+
+# create the FAQ in text form
+FAQ: FAQ.src FAQ.tcl
+ FAQ.src text > FAQ
+
+# generate Expect home page
+homepage.html: homepage.src homepage.tcl expect.tar.gz.md5
+ homepage.src > homepage.html
+
+expect.tar.gz.md5: expect-$(VERSION).tar.gz
+ md5 expect-$(VERSION).tar.gz > expect.tar.gz.md5
+
+# install various html docs on our web server
+install-html: FAQ.html homepage.html
+ cp homepage.html $(WEBDIR)/index.html
+ cp FAQ.html $(WEBDIR)
+
+# HTMLize man pages for examples and push them out to the web server
+example-man-pages:
+ -for i in $(SCRIPT_MANPAGE_LIST) ; do \
+ if [ -f $(srcdir)/example/$$i.man ] ; then \
+ rman -f HTML $(srcdir)/example/$$i.man > $(srcdir)/example/$$i.man.html ; \
+ cp $(srcdir)/example/$$i.man.html $(FTPDIR)/example ; \
+ else true; fi ; \
+ done
+
+#========================================================================
+# Push out releases
+#========================================================================
+
+FTPDIR = /proj/itl/www/div826/subject/expect
+
+# make a private tar file for myself
+tar: expect-$(VERSION).tar
+ mv expect-$(VERSION).tar expect.tar
+
+# make a release and install it on ftp server
+# update web page to reflect new version
+ftp: expect-$(VERSION).tar.Z expect-$(VERSION).tar.gz install-html homepage.html
+ cp expect-$(VERSION).tar.Z $(FTPDIR)/expect.tar.Z
+ cp expect-$(VERSION).tar.gz $(FTPDIR)/expect.tar.gz
+ cp expect-$(VERSION).tar.gz $(FTPDIR)/old/expect-$(VERSION).tar.gz
+ md5 $(FTPDIR)/expect.tar.gz > expect.tar.gz.md5
+ cp HISTORY $(FTPDIR)
+ cp README $(FTPDIR)/README.distribution
+ cp example/README $(FTPDIR)/example
+ cp `pubfile example` $(FTPDIR)/example
+ ls -l $(FTPDIR)/expect.tar*
+# delete .Z temp file, still need .gz though for md5 later
+ rm expect-$(VERSION).tar*
+
+# make an alpha release and install it on ftp server
+alpha: expect-$(VERSION).tar.Z expect-$(VERSION).tar.gz
+ cp expect-$(VERSION).tar.Z $(FTPDIR)/alpha.tar.Z
+ cp expect-$(VERSION).tar.gz $(FTPDIR)/alpha.tar.gz
+ cp HISTORY $(FTPDIR)
+ rm expect-$(VERSION).tar*
+ ls -l $(FTPDIR)/alpha.tar*
+
+# make a beta release and install it on ftp server
+beta: expect-$(VERSION).tar.Z expect-$(VERSION).tar.gz
+ rm -rf $(FTPDIR)/alpha.tar*
+ cp expect-$(VERSION).tar.Z $(FTPDIR)/beta.tar.Z
+ cp expect-$(VERSION).tar.gz $(FTPDIR)/beta.tar.gz
+ cp HISTORY $(FTPDIR)
+ rm expect-$(VERSION).tar*
+ ls -l $(FTPDIR)/beta.tar*
+
+expect-$(VERSION).tar: configure
+ rm -f ../expect-$(VERSION)
+ ln -s `pwd` ../expect-$(VERSION)
+ cd ..;tar cvfh $@ `pubfile expect-$(VERSION)`
+ mv ../$@ .
+
+expect-$(VERSION).tar.Z: expect-$(VERSION).tar
+ compress -fc expect-$(VERSION).tar > $@
+
+expect-$(VERSION).tar.gz: expect-$(VERSION).tar
+ gzip -fc expect-$(VERSION).tar > $@
+
+#========================================================================
+# End of user-definable section
+#========================================================================
+
+#========================================================================
+# Don't modify the file to clean here. Instead, set the "CLEANFILES"
+# variable in configure.in
+#========================================================================
+
+clean:
+ -test -z "$(BINARIES)" || rm -f $(BINARIES)
+ -rm -f *.$(OBJEXT) core *.core
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean: clean
+ -rm -f *.tab.c
+ -rm -f $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log config.status
+
+#========================================================================
+# Install binary object libraries. On Windows this includes both .dll and
+# .lib files. Because the .lib files are not explicitly listed anywhere,
+# we need to deduce their existence from the .dll file of the same name.
+# Library files go into the lib directory.
+# In addition, this will generate the pkgIndex.tcl
+# file in the install location (assuming it can find a usable tclsh shell)
+#
+# You should not have to modify this target.
+#========================================================================
+
+install-lib-binaries:
+ @mkdir -p $(DESTDIR)$(pkglibdir)
+ @list='$(lib_BINARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
+ stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
+ if test "x$$stub" = "xstub"; then \
+ echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \
+ else \
+ echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
+ fi; \
+ ext=`echo $$p|sed -e "s/.*\.//"`; \
+ if test "x$$ext" = "xdll"; then \
+ lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
+ if test -f $$lib; then \
+ echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
+ $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
+ fi; \
+ fi; \
+ fi; \
+ done
+ @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ destp=`basename $$p`; \
+ echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
+ fi; \
+ done
+ @if test "x$(SHARED_BUILD)" = "x1"; then \
+ echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \
+ $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
+ fi
+
+#========================================================================
+# Install binary executables (e.g. .exe files and dependent .dll files)
+# This is for files that must go in the bin directory (located next to
+# wish and tclsh), like dependent .dll files on Windows.
+#
+# You should not have to modify this target, except to define bin_BINARIES
+# above if necessary.
+#========================================================================
+
+install-bin-binaries:
+ @mkdir -p $(DESTDIR)$(bindir)
+ @list='$(bin_BINARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
+ fi; \
+ done
+
+.SUFFIXES: .c .$(OBJEXT) .man .n .html
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+uninstall-binaries:
+ list='$(lib_BINARIES)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(pkglibdir)/$$p; \
+ done
+ list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
+ p=`basename $$p`; \
+ rm -f $(DESTDIR)$(pkglibdir)/$$p; \
+ done
+ list='$(bin_BINARIES)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/$$p; \
+ done
+
+#========================================================================
+#
+# Target to regenerate header files and stub files from the *.decls tables.
+#
+#========================================================================
+
+genstubs:
+ $(TCLSH_PROG) \
+ $(srcdir)/tools/genStubs.tcl $(srcdir)/generic \
+ $(srcdir)/Expect.decls
+
+#========================================================================
+#
+# Target to check that all exported functions have an entry in the stubs
+# tables.
+#
+#========================================================================
+
+Expect_DECLS = \
+ $(srcdir)/expect.decls
+
+checkstubs:
+ -@for i in `nm -p $(Expect_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
+ | sort -n`; do \
+ match=0; \
+ for j in $(Expect_DECLS); do \
+ if [ `grep -c $$i $$j` -gt 0 ]; then \
+ match=1; \
+ fi; \
+ done; \
+ if [ $$match -eq 0 ]; then echo $$i; fi \
+ done
+
+
+.PHONY: all binaries clean depend distclean doc install libraries test chantest
+
+# 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/NEWS b/NEWS
new file mode 100644
index 0000000..7f0d8b7
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,715 @@
+This file is the NEWS file from the Expect distribution.
+
+======================================================================
+======================================================================
+
+Date: 08/01/00
+
+** SUMMARY
+
+Expect 5.32 is being released in conjuction with Tcl 8.3.2.
+This is a fairly minor update with no feature changes but with
+a number of useful bug fixes in the way expects uses the new
+regular expression engine and the UTF-8 features of Tcl.
+Details are in the HISTORY and ChangeLog files.
+
+======================================================================
+======================================================================
+
+Date: 10/22/99
+
+** SUMMARY
+
+Expect 5.31 now works with Tcl 8.2. Expect 5.31 does NOT work with
+prior releases of Tcl. Thanks to an incredible amount of work by
+Scott Stanton, Henry Spencer, Melissa Hirschl, and funding from
+Scriptics for making this possible.
+
+** NEW FEATURES
+
+What? You mean that working with Tcl 8.2 isn't enough?????
+
+Expect supports Tcl's new regexp engine.
+
+Expect supports null bytes in strings directly. (You no longer have
+to use the "null" keyword to send or match nulls. Of course, the
+"null" keyword will continue to be supported.) Null removal (on
+input) is still enabled by default since nulls are almost never
+intended for end-user consumption in interactive dialogues.
+
+** CHANGES IN BEHAVIOR (POTENTIAL INCOMPATIBILITIES)
+
+The interpreter command used to exit upon eof. Now it uses "-eof
+script" to control this behavior. The default behavior is to return.
+(This change was required because Expect now gives control to Tcl upon
+exit and Tcl waits (potentially forever) for all processes to die on
+exit.) Explicit calls to interpreter are almost non-existent.
+However, you should look for *implicit* calls via interact commands
+with a pattern but no action. This required changes in the examples:
+dislocate, dvorak, kibitz, and xkibitz.
+
+Indirect variables can no longer start with "exp". Such variables
+will be interpreted as channel names.
+
+Old-style regexps may need conversion. If you have been protecting
+regexps containing backslashes with {}, then you need to examine all
+your backslashes since the new regexp engine interprets backslash
+sequences (such as \n) itself. For example:
+
+ expect "\n" (works the same in Tcl 8.0 and 8.1)
+ expect {\n} (works differently in Tcl 8.0 and 8.1)
+
+Scriptics has also created a new-regexp-features page which you should
+read: http://www.scriptics.com/support/howto/regexp81.html. Some of
+the new features allow much more efficient regexps than before. For
+example, non-greedy quantifiers can replace [split] looping
+constructions with a single regexp, enabling Tcl to parse very
+efficiently. For the whole story, read the re_syntax man page.
+
+The interact command's regexp matching no longer skips nulls. (I'd be
+surprised if anyone misses this. At least I hope ....)
+
+Expect's C library now reports failures in spawn's underlying exec
+directly (by returning -1) rather than the way it used to (as data in
+the pty). This makes user code more robust. However, it requires you
+to simplify your code, alas. See the chesslib.c example.
+
+Linking with Expect's C library no longer requires the Tcl library
+(unless, of course, you make Tcl calls yourself). Tcl is still
+required to build the library in the first place, however.
+
+** CHANGES IN BEHAVIOR (SHOULD NOT CAUSE INCOMPATIBILITIES)
+
+The match_max command now controls by bytes, not chars. This won't
+cause problems unless your existing scripts are interacting using
+sizeable chunks of multibyte characters. (If you don't know what I'm
+talking about, ignore this.)
+
+The Make/configure suite now corresponds to the TEA conventions (at
+least in theory; the conventions are changing regularly so it's hard
+to be less vague on this point). Significantly, this means that you
+should be able to use the same configure flags as when compiling Tcl
+or any other TEA-compatible extension. (See the INSTALL file.)
+
+The values of special variables such as exp_spawn_id_any have changed.
+(The values were never documented so you shouldn't have been using
+them anyway.)
+
+Spawn ids now appear as "exp...". (They used to be small integers.)
+Do not assume that spawn ids will continue to be represented in any
+particular way (other than unique strings).
+
+** OTHER NOTES
+
+Expect uses channels. There is an Expect channel type. It is
+possible to use Tcl's channel commands, such as fconfigure, to change
+the encoding. However, Expect layers its own buffering system on top
+of Tcl's channel handler so don't expect intuitive behavior when using
+commands such as gets and puts. Unless you know what you're doing, I
+recommend manipulating the Expect channels only with the expect
+commands.
+
+Some effort was made to make Expect support threads, however it is not
+complete. You can compile Expect with threads enabled but don't run
+Expect in multiple threads just yet.
+
+So much code has changed, there are bound to be bugs in dark corners.
+Please let me know of such cases. The best response will come by
+supplying a simple test case that can be added to Expect's test suite.
+
+In places where the behavior of Expect was not precisely documented,
+full advantage was taken to do something different :-)
+
+Several esoteric bugs were fixed.
+
+Although Expect itself uses Henry Spencer's new regexp engine,
+Expect's C library still uses his original regexp engine.
+
+No testing has been done of the poll and non-event subsystems. (These
+are used on systems which don't support select on ptys or ttys. Some
+minor work needs to be done on them (because the event subsystem was
+rewritten) which I'll probably do only if anyone requests it.
+
+Many deprecated features (deprecated for many years!) have been
+removed. All such features were deprecated prior to Exploring Expect
+so if that's how you learned Expect, you have nothing to worry about.
+For example, Expect's getpid command predates Tcl's pid command and
+it's been deprecated for, oh.... 6 years - wow! Other deprecated features
+include:
+ expect -timestamp (flag only; behavior itself was removed years ago)
+ expect -iwrite (flag only; behavior occurs all the time)
+ expect_version (use "exp_version" command)
+ expect_library (use "exp_library" global variable)
+ interact -eof (use "eof" keyword)
+ interact -timeout (use "timeout" keyword)
+ interact -timestamp (use "clock" command)
+ getpid (use "pid" command)
+ system stty (use "stty" command)
+
+With this release, the following are deprecated:
+ timestamp (use "clock" command)
+ debugger (use a different one; there are very nice replacements
+ around. Fortunately the Expect debugger is not something anyone
+ is wiring into their scripts, so for now, consider it on the
+ endangered species list. Anyone still want this debugger?)
+
+From now on, the most current snapshots of Expect will be found in the
+Scriptics CVS repository. Not all snapshots are official releases.
+
+======================================================================
+======================================================================
+
+Date: 8/18/96
+
+Expect now works with Tcl 8.0.
+
+No changes were made to take advantage of 8.0 features such as
+namespaces. (If you want to put the Expect commands in a namespace,
+declare a namespace before loading them in.)
+
+Even though Tcl allows embedded nulls in commands, Expect still does
+not. Tcl still doesn't support embedded in patterns and regexps.
+I'll wait til Tcl supports that before rewriting Expect's null
+support.
+
+
+======================================================================
+======================================================================
+
+Date: 9/28/96
+
+There is now an Expect FAQ and home page. Feedback is encouraged.
+You can get to the FAQ from the home page and vice versa, so you only
+need to remember one of the links, but here are both for completeness:
+
+home page: http://expect.nist.gov
+FAQ: http://expect.nist.gov/FAQ.html
+
+
+
+======================================================================
+======================================================================
+This section describes the changes to Expect 5, many due to changes
+from Tcl 7.4 to 7.5.
+
+Improvements
+==============================
+
+You can now use expect_background from Tcl along with all the
+Tcl-based event stuff such as "after". You can also do fun things
+such as have "after" actions run while expect is waiting for input.
+It's worth comparing the difference between commands such as expect
+(which waits in the event loop) and gets (which doesn't).
+
+Incompatibilities
+==============================
+
+libexpectk is gone. Because of the event loop was moved into Tcl,
+this is no longer necessary. Just use the regular Expect library.
+This only affects you if are hand-linking.
+
+The name of the static C library now has the extension on the end -
+just like Tcl. This only affects you if are hand-linking.
+
+
+==============================
+Some obvious questions and answers
+
+Nothing in the user interface has changed. All your old scripts
+should run. Tcl now has commands that replace Expect functionality in
+the area of version control and date handling. I encourage you to use
+Tcl's support rather than Expect's for any new scripts that you write.
+However, I won't be removing Expect's commands, so don't worry about
+having to convert old scripts.
+
+It is my understand that shared/dl libs work. (I say "it is my
+understanding", because my own environment doesn't handle it, sigh.
+My system admins tell me that they're working on it.) So I've had to
+guess on some things - in fact, I've talked to a number of people and
+I get the feeling that a lot of people are guessing on shared/dl libs.
+I have yet to talk to anyone that REALLY understands this stuff (by
+"understand", I mean "can write the configure/Makefile portably and
+correctly". So much for my griping. In theory, the shared/dl support
+is pretty much a freebie because Tcl itself provides all the support
+for this. (There is some reorganization that could be done to improve
+shared library memory use - I'll get to it eventually - it shouldn't
+affect most people.) Don't send me complaints about shared/dl libs
+unless you are *positive* it is something that I am responsible for.
+Even if Tcl works and Expect fails, it is likely to be a Tcl error (or
+more precisely, a configuration problem that is more appropriately
+fixed from the Tcl distribution).
+
+For Tcl-package purposes, Expect is called "Expect". (Duh...)
+
+Expect's multiple interpreter support is minimal. It should work for
+most things, serendipitously. I haven't spent any time making this
+perfect.
+
+No, this release isn't portable to Windows or Mac. Let me know if
+you're seriously interested in a lot of work. I'm not saying it's not
+possible. It's definitely possible and the porting working at Sun has
+made it easier than before. But it's still not a weekend hack.
+
+==============================
+Building the code
+==============================
+
+Expect builds as usual. (See the INSTALL file for details.)
+
+The only significant change is that Expect now has to find the
+tclConfig.sh file (and tkConfig.sh if you want). So if you like to
+store Tcl where Expect can't find it, you'll need to use even more
+configure flags than you used to.
+
+Shared/dl Expect libraries are built if you configured Tcl for
+shared/dl libraries.
+
+All support for earlier versions of Tcl and Tk have been removed from
+Expect. For example, if you're still using Tcl 7.4 (or earlier),
+don't bother to install this release.
+
+======================================================================
+======================================================================
+This section describes the changes from Expect 4 to Expect 5.
+
+The changes that people will find most interesting or annoying are as
+follows. Some of them may seem rather arbitrary but fix inconsistencies
+leading to much cleaner coding both internally and externally.
+
+
+-- Expect version 5.20 and above is designed to work with Tcl 7.5 and
+Tk 4.1. Expect 5.20 and above will not work with earlier versions.
+
+-- Glob-style patterns do longest-possible matches (from the earliest
+possible position) just like regexps. Previously, they matched the
+shortest-possible strings. However, the documentation didn't actually
+say this (it didn't say anything)
+
+-- Exact patterns are now supported from expect. Use the "-ex" flag.
+Exact patterns work just like those in interact. No special handling
+is made of *, ^, etc.
+
+-- The new command "expect_background" registers patterns that are to
+be tested against spawned process output whenever it appears (i.e.,
+asynchronously). This only works in the Tk environment. The
+arguments are the same as the expect command.
+
+-- expect_before and expect_after now handle their arguments like
+expect_background. Previously, a command such as "expect_before"
+with no arguments deleted patterns for all spawn ids. Now, it only
+deletes patterns for the current spawn id. Similarly with the "-i"
+form.
+
+-- expect_background/before/after support an -info flag to query what
+the current patterns are. The results are returned in such a way that
+they can be re-used by a new expect command.
+
+The -info flag must be the first flag in the command. With no other
+arguments, it returns the setting for the current spawn id. With a -i
+descriptor, information is returned for that spawn id. The argument
+-noindirect may be used to suppress indirects which also match a
+direct spawn id. Only a single -i specification may be given with
+-info. With the argument "-all", all spawn id specifications are
+reported.
+
+-- There is now a sleep command. It understands decimal values such as
+
+ sleep .5
+
+Interrupts and other asynchronous events are processed while Expect sleeps.
+
+-- Traps now use Tcl's "Async" support. This has advantages and
+disadvantages. One advantage is that traps have no chance of screwing
+up the Tcl internals. One disadvantage is that trap handlers are
+delayed at certain specific times and places. For example, a handler
+cannot occur inside another handler. While one handler is running,
+all other handlers are blocked. This is probably the most noticable
+place where handlers are blocked. Others are generally small windows,
+so you shouldn't notice the delay in executing the handlers.
+
+Several traps are initially defined:
+
+ trap exit {SIGINT SIGTERM}
+
+If you use the -D flag to start the debugger, the following trap is
+defined:
+
+ trap {exp_debug 1} SIGINT
+
+You can, of course, override these. In particular, if you have your
+own "trap exit SIGINT", this will override the debugger trap. Because
+SIGINT is tied to exit (see above) by default anyway, you should
+remove your own "trap exit SIGINT" unless you specifically do not want
+to be able to get to the debugger by ^C.
+
+If you want to define your own trap on SIGINT but still trap to the
+debugger when it is running, use:
+
+ if ![exp_debug] {trap mystuff SIGINT}
+
+Alternatively, you can trap to the debugger using some other signal.
+
+The ONEXIT trap is no longer available. Instead, say "exit -onexit ..."
+
+Traps are now deleted by using the empty ({}) handler. The current
+handler is returned if no action is supplied. With no arguments, trap
+returns the signal number of the trap command currently being executed.
+
+-- The wait command now returns a four element list if a valid child
+was waited on.
+Element 1: pid
+Element 2: spawn id
+Element 3: 0 (or -1 if there was an OS error)
+Element 4: status (or errno if element 3 == -1)
+
+-- expect and interact notes:
+
+The timeout and eof patterns were initially named "-timeout" and
+"-eof" but have been renamed "timeout" and "eof" to match those of
+expect. The ability to define default timeout/eof actions has been
+removed. (You can do this more easily by grouping spawn ids.)
+
+expect and interact now support a "null" keyword to match an ASCII 0.
+send supports -null and -break keywords.
+
+Since a large number of special keywords have been added to interact,
+a new keyword "-ex" for "exact" was added descriptive of its default
+treatment of patterns. This protects the next token from being
+misinterpreted as a keyword. The expect command provides "-gl" for
+"glob" for analogous reasons.
+
+Any string starting with "-" should be protected by the "-ex" or "-gl"
+flag, even those that are not keywords currently. (All strings
+starting with "-" are reserved for future options.)
+
+String start/end indices are no longer written to expect_out and
+interact_out unless the -indices flag is given.
+
+expect_out(spawn_id) is set to the spawn id associated with the spawn
+id that produced the last output in an expect command. For example,
+you can use this to delete files that have closed, by removing this
+element from an indirect spawn ids spec. The same effect is
+reproducable with interact (and interact_out(spawn_id)) but for
+efficiency reasons, it requires the -iwrite flag before each pattern.
+
+Expect's -i and interact's -i, -u, -input, and -output flags can now
+describe a list of spawn ids. So you can say things like:
+
+ interact -input "$id1 $id2 $id3" .... -output "$id1 $id2" ...
+
+In this case, id1, 2, 3 would be sent to id1, and 2.
+
+The spawn id may be given as a global variable name (called an
+"indirect spawn id specification"), in which case, the variable
+contains the list of spawn ids. Whenever the variable is changed, the
+new list of spawn ids is automatically used. This is particularly
+useful with any long running expect command such as expect_before,
+expect_after, expect_background, and interact.
+
+The -update flag was removed. Use indirect spawn ids (see previous
+paragraph).
+
+-- interact notes:
+
+Interact now support -input and -output flags that provide very
+flexible means of moving data from/to multiple spawn ids in complex
+ways (but very quickly). It is possible to write most expect loops
+using a simple interact statement. For instance, the three way
+interaction inside kibitz (between two users and a process) is written
+this way:
+
+ interact {
+ -output $shell
+ -input $userin eof { . . . } -output $shell
+ -input $shell -output "$user_spawn_id $userout"
+ }
+
+-- send command notes:
+
+It is possible to send a break by using the "-break" flag.
+
+Any string starting with "-" should be protected by preceding it with
+the "--" flag, even those that are not keywords currently. (All
+strings starting "-" are reserved for future options.)
+
+-- The spawn command now takes an "-open" flag which in turns takes a
+Tcl file as an argument. This lets you treat raw devices, files, and
+pipelines as spawned processes without using a pty.
+
+This was actually in Expect 4, but I forgot to document it. Oops!
+
+-- The old "debug" command (which describes what Expect is doing
+internally) was renamed "exp_internal". "debug" (and "exp_debug") now
+invoke the interactive debugger.
+
+-- The new command "stty" now takes over the job of "system stty". It
+works much better, allowing POSIX-style redirection to affect other
+ttys. It otherwise takes arguments as "system stty" did.
+
+-- The "-tcl" option to "return" has gone away. (This was dangerous
+to anyone that actually happened to return the value "-tcl".)
+Instead, use inter_return.
+
+-- Added exp_timestamp command to produce very fast timestamps.
+
+-- Added exp_pid command to return pid of given spawn id.
+
+-- The close command now takes an argument of "-onexec" with a following
+0 or non-zero value. For example, the follow command stops the
+current spawn id from being closed when another process is exec'd or
+spawn'd.
+
+ close -onexec 0
+
+While "-onexec 1" returns it to the default condition where it will be
+closed upon exec or spawn.
+
+-- log_user now returns previous value. It is acceptable to call now,
+without arguments just to get the value.
+
+-- The following forms are deprecated. They will be allowed
+indefinitely but not advertised or supported if they break.
+
+ -eof, -timeout in interact (reason: didn't match expect.
+ Instead, use eof or timeout.)
+
+ -- in expect or interact (reason: no easier to read.
+ Instead, use -gl in expect or -ex in interact.)
+
+ continue -expect (reason: when mixing in extensions, you have
+ to use exp_continue, so -expect becomes irrelevant.
+ Instead, use exp_continue.)
+
+ getpid (reason: Tcl now supplies same functionality as "pid".
+ Instead, use pid.)
+
+ expect_version and expect_library (reason: the name implies
+ they have something to do with the expect command,
+ which they doesn't.
+ Instead, use exp_version and exp_library.)
+
+ -timestamp for obtaining tm and ctime in expect and interact
+ (reason: separate command now exists for this purpose.
+ Instead, use exp_timestamp.)
+
+ system stty (reason: bad interaction with redirection.
+ Instead, use stty.)
+
+-- New examples have been added:
+
+"dislocate" lets you disconnect and reconnect to processes.
+
+"tkpasswd" illustrates passwd embedded in a GUI.
+
+They may not be overwhelmingly useful, but run them once to see what
+they do. If you ever need to do anything similar, you can look back
+at them.
+
+"tknewsbiff" pops up a window or plays a audio clip when you have
+unread news.
+
+-- Changes to the Expect libraries:
+
+The expect-tcl library (libexpectcl.a) has been integrated with the
+expect library (libexpect.a). So references to libexpectcl.a should
+be removed.
+
+The Expect C library now supports buffering, multiplexing, null
+matching, full buffer matching. Basically, all of the features in
+Expect are now in the library.
+
+Buffering and multiplexing has caused the biggest change to the
+library. Previously, exp_match contained the entire buffer that
+matched. Now exp_match just points to where in the buffer the match
+started. exp_buffer points to the beginning of the buffer.
+Previously, the previous buffer was thrown away at the beginning of
+each expect function call. Now, previously unmatched characters are
+eligible for matching.
+
+To match on different file descriptors, exp_match, exp_match_end,
+exp_buffer_end must be restored to their previous values. Initially,
+they should be zero.
+
+The meaning of timeout == 0 in the Expect library has been changed.
+See the man page for more info.
+
+======================================================================
+======================================================================
+This file describes the changes from Expect 3 to Expect 4.
+
+The improvements that people will find most interesting are:
+
+1) Expect version 4 is designed to work with Tcl 6.7 and Tk 3.2.
+ (Earlier versions of Expect will not work with Tcl 6.7)
+ Expect can now be layered in with any Tcl program.
+ Note that in Tk, Expect's send command is called "exp_send".
+ (It used to be called "send_spawn" but this bit the dust.)
+2) A debugger is provided.
+3) The interact command has been totally rewritten and supports regular
+ expressions, timeout/eof patterns, and a number of other new things.
+4) The default behavior of ^C (SIGINT) is exit whether or not you are in
+ a read.
+5) Expect uses "sane" terminal parameters by default, allowing scripts
+ to work the same whether inside emacs shell mode or not. (See man
+ page on "spawn" for more info.)
+6) All the hard parts of the installation process are automated. This
+ was done primarily by Rob Savoye at Cygnus. Thank you, Rob!
+7) It is now possible to buy a support contract for Expect from Cygnus.
+
+The changes that people will find most annoying are:
+
+1) send now only sends a single string. (It used to send any number of
+ strings with spaces jammed in between.)
+2) getpid was renamed pid.
+3) interact's -flush was renamed -nobuffer (much more descriptive).
+4) interact now runs all actions in raw mode unless the flag -reset
+ is used. -f and -F are ignored. send automatically understands
+ how to do the right thing. The most likely thing to watch out for
+ are actions like "exec kill -STOP 0" which almost certainly need
+ the -reset flag.
+5) argv0 is initialized to script name. argv no longer contains it.
+ argc is initialized [llength $argv]. This follows new Tcl style.
+
+All differences are described in the man page. Some of the less
+significant differences are described in the HISTORY file. The
+debugger is described in a separate document (see the README).
+
+This version also introduces one incompatibility that may require
+changes to scripts. While this may initially annoy you, the final
+result will simplify the process of writing scripts. Namely:
+
+In version 3, the expect command accepted lists of glob-style patterns
+such as:
+
+ expect "a\ b c" action
+
+where "a b" or "c" would cause action to be executed. The problem
+with this is that the pattern list is hard to write and hard to read.
+Patterns with control-characters, backslashes and dollar signs were
+very difficult to deal with.
+
+Regular-expression patterns provide a much simpler solution. Via the
+alternation feature (using a "|") the above pattern can be written as:
+
+ expect -re "a b|c" action
+
+I was concerned about people having a significant investment in code
+that depended on the old syntax but responders to a comp.lang.tcl poll
+about such a change in pattern handling were 100% in favor of it. (I
+even proposed hooks for backward compatibility, but there was no
+interest in it.)
+
+Fortunately, most simple things will work as before including:
+
+ expect foobar
+ expect {foobar}
+ expect "foobar"
+ expect "foo\ bar"
+
+However, some things won't work as before. For example, the following
+will behave differently - now the braces will be considered as part of
+the pattern.
+
+ expect "{foo bar}"
+
+Here are examples of patterns in my own code that I had to change:
+
+ was changed to
+ Version 3 pattern list Version 4 pattern
+
+ {Whois:\ } "Whois: "
+ {No\ match} "No match"
+ {250*ftp>* 200*ftp>*} -re "2(5|0)0.*ftp>.*"
+ {{Press Return to continue*}} "Press Return to continue*"
+ {*\r\n*\\\\\r\n} "\r\n*\\\r\n"
+
+
+
+Future Change Alert
+
+John Ousterhout has pre-announced a future change in Tcl that may
+affect you. In particular, backslash sequences other than those
+explicitly listed in the Tcl documentation will be handled as if the
+backslash was not present.
+
+The likely place this arises is when quoting characters that are
+special to the pattern matcher but not to Tcl.
+
+For example in Tcl 6.7, the following command matches a period.
+
+ expect -re "\."
+
+In Tcl 7.0, it will match any character, because Tcl will throw away
+the backslash. If you want to match a period, you will have to say:
+
+ expect -re "\\."
+or
+ expect -re {\.}
+
+The following command will find occurrences of this. (It may find
+other things, but it will at least find the problem cases.)
+
+ egrep '(\\$)|(\\[^][bfnrtv\0-9{}$ ;"])' *.exp
+
+======================================================================
+======================================================================
+This section describes the changes from Expect 2 to Expect 3.
+
+If you used to use Expect version 2 (any version written before
+September '91) you will find that the current version of Expect (3)
+introduced minor but significant incompatibilities.
+
+The HISTORY file describes these briefly. They are described at
+length in the man page.
+
+I'm sorry if you feel annoyed at the incompatibilities, but Expect has
+been out for a year and a half, Tcl even longer. Both Tcl and Expect
+are using this as a last chance to make significant changes, so that
+we will not disturb even more users in the future.
+
+There is no automated conversion procedure (although see note below)
+for Expect or even raw Tcl. For now, I suggest that you not bother
+fixing things that already work - just keep the old Expect around.
+The binary isn't very big after all. If you do write a translation
+script, let me know. Thanks.
+
+Of course, I felt obligated to convert the examples distributed with
+expect. I did this by hand while writing the new version itself,
+partly as an aid but mostly to test lots of variations. In 90% of the
+scripts, all I had to do was change:
+
+(changes due to Tcl)
+ 'index' to 'lindex'
+ 'range' to 'lrange'
+ 'length' to 'llength'
+ 'print' to 'send_user' or 'puts' depending on how you use it
+ 'function .... c' with '[join [function [split string ""]] ""]'
+(changes due to Expect)
+ 'expect_match' to 'expect_out(buffer)'
+ 'set match_max' to 'match_max' (perhaps with -d flag)
+ '*' to '-re .+'
+
+If anyone wants to write a script to do this, note the pitfalls:
+
+1) functions and variables do not share the same namespace, so it is a
+inappropriate to just globally rename things.
+
+A number of optimizations can be made:
+
+1) If you are doing multiple split/joins, you should probably cache the
+split string.
+
+2) Virtually all uses of scan are unnecessary now, due to exec's automatic
+stripping of terminating newlines, and expect's support of regexps.
+
+3) String manipulation can be reduced or avoided entirely if you use
+expect -re.
+
+4) exec is no longer necessary to retrieve environment variables, since
+they can now be retrieved from $env.
+
+5) If you have been really careful about testing for timeout and eof,
+you can dramatically reduce the size of your scripts by using
+expect_before and expect_after. This is more efficient, as well,
+since those actions are only parsed once.
+
diff --git a/README b/README
new file mode 100644
index 0000000..b9684f0
--- /dev/null
+++ b/README
@@ -0,0 +1,350 @@
+NOTE: ALPHA AND BETA RELEASES OF TCL/TK ARE NOT SUPPORTED!
+
+--------------------
+Introduction
+--------------------
+
+This is the README file for Expect, a program that performs programmed
+dialogue with other interactive programs. It is briefly described by
+its man page, expect(1). This directory contains the source and man
+page for Expect.
+
+This README file covers Expect 5.38 and up. These versions of Expect
+work with Tcl 8.2 and up and Tk 8.2 and up. Significant changes and
+other news can be found in the NEWS file.
+
+The Expect home page is: http://expect.nist.gov
+The Expect FAQ is: http://expect.nist.gov/FAQ.html
+
+--------------------
+Getting Started - The Preferable Way
+--------------------
+
+A book on Expect is available from O'Reilly with the title "Exploring
+Expect: A Tcl-Based Toolkit for Automating Interactive Applications",
+ISBN 1-56592-090-2.
+
+The book is filled with detailed examples and explanations, and is a
+comprehensive tutorial to Expect. The book also includes a tutorial
+on Tcl written specifically for Expect users (so you don't have to
+read the Expect papers or the man pages). Exploring Expect is 602
+pages.
+
+--------------------
+Getting Started - The Hacker Way
+--------------------
+
+While the book is the best way to learn about Expect, it is not
+absolutely necessary. There are man pages after all and there are
+numerous articles and papers on Expect. All of my own papers are in
+the public domain and can be received free. If you are a hacker on a
+tight budget, this may appeal to you. Nonetheless, I think you will
+find the book pays for itself very quickly. It is much more readable
+than the man pages, it includes well-written and explained examples,
+and it describes everything in the papers as a coherent whole. The
+concepts in the papers actually only make up a small fraction of the
+book.
+
+The 1990 USENIX paper (see "Readings" below) is probably the best one
+for understanding Expect conceptually. The 1991 Computing Systems and
+the LISA IV papers provide a nice mix of examples. The only downside
+is, the examples in these papers don't actually work anymore - some
+aspects (e.g., syntax) of both Expect and Tcl have changed. The
+papers still make interesting reading - just don't study the examples
+too closely! Fortunately, most of the examples from the papers also
+accompany this distribution - and all of these are up to date.
+
+For all the details, read the man page. It is long but you can get
+started just by skimming the sections on the following commands:
+
+ spawn (starts a process)
+ send (sends to a process)
+ expect (waits for output from a process)
+ interact (lets you interact with a process)
+
+To print out the Expect man page, invoke your local troff using the
+-man macros, such as either of:
+
+ ptroff -man expect.man
+ ditroff -man expect.man
+
+If Expect is installed, you can read the man pages using the "usual"
+man commands, such as "man expect". If not installed, view the man
+page on your screen by saying something like:
+
+ nroff -man expect.man | more
+
+Expect uses Tcl as the underlying language for expressing things such
+as procedures, loops, file I/O, and arithmetic expressions. For many
+simple scripts, it is not necessary to learn about Tcl. Just by
+studying the examples, you will learn enough Tcl to get by. But if
+you would like to learn more about Tcl or use it in your own
+applications, read the Tcl README file which provides pointers to the
+extensive Tcl documentation. Or read Exploring Expect. Chapter 2 of
+Exploring Expect is a Tcl tutorial specifically designed for Expect
+users.
+
+An interactive debugger is bundled with Expect. The debugger has its
+own documentation that comes separately. It is listed in the Readings
+below. Again, it is slightly out of date. An up-to-date description
+of the debugger appears in Chapter 18 of Exploring Expect. This
+chapter also contains additional advice and tips for debugging.
+
+You may get the feeling that the Expect documentation is somewhat
+scattered and disorganized. This was true prior to publication of
+Exploring Expect. The book contains everything you need to know, all
+up-to-date, and with examples of every concept. (The book contains no
+references to any of the Expect papers because none are necessary.)
+
+----------------------
+Examples
+----------------------
+
+This distribution contains many example scripts. (All of the
+substantive examples in the book are included.) They can be found in
+the example directory of this distribution. The README file in that
+directory briefly describes all of the example scripts. Many of the
+more sophisticated examples have man pages of their own.
+
+Other interesting scripts are available separately in the directory
+http://expect.nist.gov/scripts/ (ftpable as
+ftp://ftp.nist.gov/mel/div826/subject/expect/scripts). (See below for
+how to retrieve these.) You are welcome to send me scripts to add to
+this directory. A number of Expect scripts are also available in the
+Tcl archive, available at ftp://ftp.neosoft.com/pub/tcl.
+
+--------------------
+Readings on Expect
+--------------------
+
+The implementation, philosophy, and design are discussed in "expect:
+Curing Those Uncontrollable Fits of Interaction", Proceedings of the
+Summer 1990 USENIX Conference, Anaheim, CA, June 11-15, 1990.
+
+Examples and discussion, specifically aimed at system administrators,
+are in "Using expect to Automate System Administration Tasks",
+Proceedings of the 1990 USENIX Large Systems Administration Conference
+(LISA) IV, Colorado Springs, CO, October 17-19, 1990.
+
+A comprehensive paper of example scripts is "expect: Scripts for
+Controlling Interactive Programs", Computing Systems, Vol. 4, No. 2,
+University of California Press Journals, 1991.
+
+Regression and conformance testing is discussed in "Regression Testing
+and Conformance Testing Interactive Programs", Proceedings of the
+Summer 1992 USENIX Conference, San Antonio, TX, June 8-12, 1992.
+
+An explanation of some of the more interesting source code to an early
+version of Expect is in Chapter 36 ("Expect") of "Obfuscated C and
+Other Mysteries", John Wiley & Sons, ISBN 0-471-57805-3, January 1993.
+
+A paper on connecting multiple interactive programs together using
+Expect is "Kibitz - Connecting Multiple Interactive Programs
+Together", Software - Practice & Experience, Vol. 23, No. 5, May 1993.
+
+The debugger is discussed in "A Debugger for Tcl Applications",
+Proceedings of the 1993 Tcl/Tk Workshop, Berkeley, CA, June 10-11,
+1993.
+
+Using Expect with Tk is described in the paper "X Wrappers for
+Non-Graphic Interactive Programs", Proceedings of Xhibition '94, San
+Jose, CA, June 20-24, 1994.
+
+Simple techniques to allow secure handling of passwords in background
+processes are covered in "Handling Passwords with Security and
+Reliability in Background Processes", Proceedings of the 1994 USENIX
+LISA VIII Conference, San Diego, CA, September 19-23, 1994.
+
+More publications can be found in the Expect home page (see elsewhere).
+
+--------------------
+How to Get the Latest Version of Expect or the Readings
+--------------------
+
+Expect may be ftp'd as mel/div826/subject/expect/expect.tar.gz from
+expect.nist.gov. (Yes, the URL is much shorter:
+http://expect.nist.gov/expect.tar.Z) Request email delivery by mailing
+to "library@cme.nist.gov". The contents of the message should be (no
+subject line) "send pub/expect/expect.tar.Z".
+
+Once you have retrieved the system, read the INSTALL file. The papers
+mentioned above can be retrieved separately (from the same directories
+listed above) as:
+
+ doc/seminal.ps.Z (USENIX '90 - Intro and Implementation)
+ doc/sysadm.ps.Z (LISA '90 - System Administration)
+ doc/scripts.ps.Z (Comp. Systems '91 - Overview of Scripts)
+ doc/regress.ps.Z (USENIX '92 - Testing)
+ doc/kibitz.ps.Z (SP&E '93 - Automating Multiple
+ Interactive Programs Simultaneously)
+ doc/tcl-debug.ps.Z (Tcl/Tk '93 - Tcl/Tk Debugger)
+ doc/expectk.ps.Z (Xhibition '94 - Using Expect with Tk)
+ doc/bgpasswd.ps.Z (LISA '94 - Passwds in Background Procs)
+ doc/chargraph.ps.Z (SP&E '96 - Testing and Automation
+ of Character Graphic Applications)
+
+The book "Exploring Expect" is described in more detail earlier in
+this file.
+
+The book "Obfuscated C and Other Mysteries" is not on-line but is
+available in bookstores or directly from the publisher (Wiley).
+
+Overhead transparencies I've used at conferences are also available in
+the same way as the papers themselves. The transparencies are sketchy
+and not meant for personal education - however if you are familiar
+with Expect and just want to give a short talk on it to your
+colleagues, you may find the transparencies useful. They vary in
+length from 15 to 20 minutes in length. These are:
+
+ doc/seminal-talk.ps.Z (USENIX '90 - Intro and Implementation)
+ doc/sysadm-talk.ps.Z (LISA '90 - System Administration)
+ doc/regress-talk.ps.Z (USENIX '92 - Testing)
+ doc/tcl-debug-talk.ps.Z (Tcl/Tk '93 - Tcl/Tk Debugger)
+ doc/expectk-talk.ps.Z (Xhibition '94 - Expect + Tk = Expectk)
+ doc/bgpasswd-talk.ps.Z (LISA '94 - Passwords in the Background)
+
+All of the documents are compressed PostScript files and should be
+uncompressed and sent to a PostScript printer. The documents are
+intended for printing at 8.5"x11" and may fail on some ISO A4
+printers. According to Hans Mayer <Hans.Mayer@gmd.de>, you can make
+them A4-able by searching for "FMVERSION" and changing the next line
+from:
+
+ 1 1 0 0 612 792 0 1 13 FMDOCUMENT
+to:
+ 1 1 0 0 594 841 0 1 13 FMDOCUMENT
+
+
+--------------------
+Using Expect with and without Tcl and/or Tk.
+--------------------
+
+The usual way of using Expect is as a standalone program with Tcl as
+the control language. Since you may already have Tcl, it is available
+separately. Tcl may be retrieved as tcl.tar.Z in the same way as
+described above for Expect. When new releases of Tcl appear, I will
+try to check them out for Expect as soon as possible. If you would
+like to get the newest Tcl release without waiting, ftp it from
+ftp.scriptics.com (directory pub/tcl).
+
+Expect may also be built using the Tk library, a Tcl interface to the
+X Window System. Tk is available in the same way as Tcl.
+
+It is possible to embed the Expect/Tcl core and optionally Tk in your
+own C programs. This is described in libexpect(3).
+
+Expect can also be used from a C or C++ program without Tcl. This is
+described in libexpect(3). While I consider this library to be easy
+to use, the standalone Expect program is much, much easier to use than
+working with the C compiler and its usual edit, compile, debug cycle.
+Unlike typical programming, most of the debugging isn't getting the C
+compiler to accept your programs - rather, it is getting the dialogue
+correct. Also, translating scripts from Expect to C is usually not
+necessary. For example, the speed of interactive dialogues is
+virtually never an issue. So please try 'expect' first. It is a more
+appropriate tool than the library for most people.
+
+--------------------
+Systems Supported
+--------------------
+
+I do not know of any UNIX systems on which Expect will not run.
+Systems which do not support select or poll can use Expect, but
+without the ability to run multiple processes simultaneously. I am
+willing to work with you to complete a port.
+
+Before sending me changes, please download or verify that you have the
+latest version of Expect (see above). Then send me a "diff -c" along
+with a suitable English explanation. If your diff involves something
+specific to a machine, give me diffs for configure.in as well or give
+me a hint about when the diffs should be done so I can write the
+configure support myself. Also please include the version of the OS
+and whether it is beta, current, recent, or totally out-of-date and
+unsupported.
+
+--------------------
+Installing Expect
+--------------------
+
+Expect comes with a configure script that provides for an automated
+installation. I believe you will find that Expect is very easy to
+install. (Tcl and Tk, too.)
+
+For more information, read the INSTALL file.
+
+--------------------
+Support from Don Libes or NIST
+--------------------
+
+Although I can't promise anything in the way of support, I'd be
+interested to hear about your experiences using it (good or bad). I'm
+also interested in hearing bug reports and suggestions for improvement
+even though I can't promise to implement them.
+
+If you send me a bug, fix, or question, include the version of Expect
+(as reported by expect -d), version of Tcl, and name and version of
+the OS that you are using. Before sending mail, it may be helpful to
+verify that your problem still exists in the latest version. You can
+check on the current release and whether it addresses your problems by
+retrieving the latest HISTORY file (see "History" above).
+
+
+Awards, love letters, and bug reports may be sent to:
+
+Don Libes
+National Institute of Standards and Technology
+Bldg 220, Rm A-127
+Gaithersburg, MD 20899
+(301) 975-3535
+libes@nist.gov
+
+I hereby place this software in the public domain. NIST and I would
+appreciate credit if this program or parts of it are used.
+
+Design and implementation of this program was funded primarily by
+myself. Funding contributors include the NIST Automated Manufacturing
+Research Facility (funded by the Navy Manufacturing Technology
+Program), the NIST Scientific and Technical Research Services, the
+ARPA Persistent Object Bases project and the Computer-aided
+Acquisition and the Logistic Support (CALS) program of the Office of
+the Secretary of Defense.
+
+Especially signicant contributions were made by John Ousterhout, Henry
+Spencer, and Rob Savoye. See the HISTORY file for others.
+
+--------------------
+Commercial Support, Classes
+--------------------
+
+Several companies provide commercial support for Expect. If your
+company has a financial investment in Expect or you wish to be assured
+of continuing support for Expect, you can buy a support contract this
+way. These companies currently include:
+
+ActiveState
+#200 - 580 Granville St
+Vancouver, BC
+V6C 1W6 Canada
++1 (604) 484-6800
+http://www.activestate.com/Company/contact.plex
+
+Cygnus Support
+1937 Landings Drive
+Mountain View, CA 94043
++1 (415) 903-1400
+info@cygnus.com
+http://www.cygnus.com
+
+Computerized Processes Unlimited (CPU)
+4200 S. I-10 Service Rd., Suite 205
+Metairie, LA 70006
++1 (504) 889-2784
+info@cpu.com
+http://www.cpu.com
+http://www.cpu.com/cpu/expect.htm (Expect class page)
+
+CPU provides Expect support and also Expect classes. Contact them for
+more information.
+
+Neither NIST nor I have any financial relationship with these
+companies. Please contact me to be added to this list.
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..0b05739
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,9 @@
+#
+# Include the TEA standard macro set
+#
+
+builtin(include,tclconfig/tcl.m4)
+
+#
+# Add here whatever m4 macros you want to define for your package
+#
diff --git a/configure b/configure
new file mode 100755
index 0000000..5aabafb
--- /dev/null
+++ b/configure
@@ -0,0 +1,17741 @@
+#! /bin/sh
+# From configure.in Id: configure.in.
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for expect 5.45.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='expect'
+PACKAGE_TARNAME='expect'
+PACKAGE_VERSION='5.45'
+PACKAGE_STRING='expect 5.45'
+PACKAGE_BUGREPORT=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subdirs_all="$ac_subdirs_all testsuite"
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CYGPATH EXEEXT PKG_LIB_FILE PKG_STUB_LIB_FILE PKG_STUB_SOURCES PKG_STUB_OBJECTS PKG_TCL_SOURCES PKG_HEADERS PKG_INCLUDES PKG_LIBS PKG_CFLAGS TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC CLEANFILES TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS TCL_INCLUDES TCL_TOP_DIR_NATIVE TCL_THREADS SHARED_BUILD AR CELIB_DIR CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS LD_LIBRARY_PATH_VAR CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_DBGX build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os subdirs EXP_BUILD_LIB_SPEC EXP_CC_SEARCH_FLAGS SETUID SETPGRP_VOID DEFAULT_STTY_ARGS TCL_DL_LIBS TCL_CC_SEARCH_FLAGS PKG_SOURCES PKG_OBJECTS MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB VC_MANIFEST_EMBED_DLL VC_MANIFEST_EMBED_EXE TCLSH_PROG LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+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'
+
+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
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # 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_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$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 ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) 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 | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$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 | -n)
+ 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_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ 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 "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# 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_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ 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 "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # 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 <<_ACEOF
+\`configure' configures expect 5.45 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of expect 5.45:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-threads build with threads
+ --enable-shared build and link with shared libraries (default: on)
+ --enable-64bit enable 64bit support (default: off)
+ --enable-64bit-vis enable 64bit Sparc VIS support (default: off)
+ --disable-rpath disable rpath support (default: on)
+ --enable-wince enable Win/CE support (where applicable)
+ --enable-symbols build with debugging symbols (default: off)
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-tcl directory containing tcl configuration
+ (tclConfig.sh)
+ --with-tclinclude directory containing the public Tcl header files
+ --with-celib=DIR use Windows/CE support library from DIR
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+expect configure 5.45
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by expect $as_me 5.45, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# 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
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# 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 "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ # TEA extensions pass this us the version of TEA they think they
+ # are compatible with.
+ TEA_VERSION="3.9"
+
+ echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
+echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6
+ if test x"${PACKAGE_NAME}" = x ; then
+ { { echo "$as_me:$LINENO: error:
+The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
+echo "$as_me: error:
+The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ if test x"3.9" = x ; then
+ { { echo "$as_me:$LINENO: error:
+TEA version not specified." >&5
+echo "$as_me: error:
+TEA version not specified." >&2;}
+ { (exit 1); exit 1; }; }
+ elif test "3.9" != "${TEA_VERSION}" ; then
+ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
+echo "${ECHO_T}warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6
+ else
+ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
+echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6
+ fi
+ case "`uname -s`" in
+ *win32*|*WIN32*|*MINGW32_*)
+ # Extract the first word of "cygpath", so it can be a program name with args.
+set dummy cygpath; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CYGPATH+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CYGPATH"; then
+ ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CYGPATH="cygpath -w"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
+fi
+fi
+CYGPATH=$ac_cv_prog_CYGPATH
+if test -n "$CYGPATH"; then
+ echo "$as_me:$LINENO: result: $CYGPATH" >&5
+echo "${ECHO_T}$CYGPATH" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ EXEEXT=".exe"
+ TEA_PLATFORM="windows"
+ ;;
+ *CYGWIN_*)
+ CYGPATH=echo
+ EXEEXT=".exe"
+ # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
+ ;;
+ *)
+ CYGPATH=echo
+ EXEEXT=""
+ TEA_PLATFORM="unix"
+ ;;
+ esac
+
+ # Check if exec_prefix is set. If not use fall back to prefix.
+ # Note when adjusted, so that TEA_PREFIX can correct for this.
+ # This is needed for recursive configures, since autoconf propagates
+ # $prefix, but not $exec_prefix (doh!).
+ if test x$exec_prefix = xNONE ; then
+ exec_prefix_default=yes
+ exec_prefix=$prefix
+ fi
+
+ { echo "$as_me:$LINENO: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5
+echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;}
+
+
+
+
+ # This package name must be replaced statically for AC_SUBST to work
+
+ # Substitute STUB_LIB_FILE in case package creates a stub library too.
+
+
+ # We AC_SUBST these here to ensure they are subst'ed,
+ # in case the user doesn't call TEA_ADD_...
+
+
+
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in tclconfig $srcdir/tclconfig; 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
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in tclconfig $srcdir/tclconfig" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in tclconfig $srcdir/tclconfig" >&2;}
+ { (exit 1); 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.
+
+
+#--------------------------------------------------------------------
+# Configure script for package 'Expect'.
+# TEA compliant.
+#--------------------------------------------------------------------
+
+#--------------------------------------------------------------------
+# Load the tclConfig.sh file
+#--------------------------------------------------------------------
+
+
+
+ #
+ # Ok, lets find the tcl configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-tcl
+ #
+
+ if test x"${no_tcl}" = x ; then
+ # we reset no_tcl in case something fails here
+ no_tcl=true
+
+# Check whether --with-tcl or --without-tcl was given.
+if test "${with_tcl+set}" = set; then
+ withval="$with_tcl"
+ with_tclconfig="${withval}"
+fi;
+ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
+echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
+ if test "${ac_cv_c_tclconfig+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ # First check to see if --with-tcl was specified.
+ if test x"${with_tclconfig}" != x ; then
+ case "${with_tclconfig}" in
+ */tclConfig.sh )
+ if test -f "${with_tclconfig}"; then
+ { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
+echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
+ with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
+ fi ;;
+ esac
+ if test -f "${with_tclconfig}/tclConfig.sh" ; then
+ ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
+ else
+ { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
+echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+
+ # then check for a private Tcl installation
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ../tcl \
+ `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
+ ../../tcl \
+ `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
+ ../../../tcl \
+ `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
+ if test "${TEA_PLATFORM}" = "windows" \
+ -a -f "$i/win/tclConfig.sh" ; then
+ ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
+ break
+ fi
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
+ break
+ fi
+ done
+ fi
+
+ # on Darwin, check in Framework installation locations
+ if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+ `ls -d /Library/Frameworks 2>/dev/null` \
+ `ls -d /Network/Library/Frameworks 2>/dev/null` \
+ `ls -d /System/Library/Frameworks 2>/dev/null` \
+ ; do
+ if test -f "$i/Tcl.framework/tclConfig.sh" ; then
+ ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
+ break
+ fi
+ done
+ fi
+
+ # TEA specific: on Windows, check in common installation locations
+ if test "${TEA_PLATFORM}" = "windows" \
+ -a x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+ `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tclConfig.sh" ; then
+ ac_cv_c_tclconfig="`(cd $i; pwd)`"
+ break
+ fi
+ done
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ${libdir} 2>/dev/null` \
+ `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ `ls -d /usr/lib64 2>/dev/null` \
+ ; do
+ if test -f "$i/tclConfig.sh" ; then
+ ac_cv_c_tclconfig="`(cd $i; pwd)`"
+ break
+ fi
+ done
+ fi
+
+ # check in a few other private locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
+ if test "${TEA_PLATFORM}" = "windows" \
+ -a -f "$i/win/tclConfig.sh" ; then
+ ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
+ break
+ fi
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
+ break
+ fi
+ done
+ fi
+
+fi
+
+
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ TCL_BIN_DIR="# no Tcl configs found"
+ { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions" >&5
+echo "$as_me: error: Can't find Tcl configuration definitions" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ no_tcl=
+ TCL_BIN_DIR="${ac_cv_c_tclconfig}"
+ echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
+echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
+echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
+
+ if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
+ echo "$as_me:$LINENO: result: loading" >&5
+echo "${ECHO_T}loading" >&6
+ . "${TCL_BIN_DIR}/tclConfig.sh"
+ else
+ echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
+echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
+ fi
+
+ # eval is required to do the TCL_DBGX substitution
+ eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+ eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+
+ # If the TCL_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TCL_LIB_SPEC will be set to the value
+ # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
+ # instead of TCL_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ if test -f "${TCL_BIN_DIR}/Makefile" ; then
+ TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
+ TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
+ TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
+ elif test "`uname -s`" = "Darwin"; then
+ # If Tcl was built as a framework, attempt to use the libraries
+ # from the framework at the given location so that linking works
+ # against Tcl.framework installed in an arbitrary location.
+ case ${TCL_DEFS} in
+ *TCL_FRAMEWORK*)
+ if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
+ for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
+ "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
+ if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
+ TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
+ break
+ fi
+ done
+ fi
+ if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
+ TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}" | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
+ TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
+ fi
+ ;;
+ esac
+ fi
+
+ # eval is required to do the TCL_DBGX substitution
+ eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+ eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+ eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
+ eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ case "`uname -s`" in
+ *CYGWIN_*)
+ echo "$as_me:$LINENO: checking for cygwin variant" >&5
+echo $ECHO_N "checking for cygwin variant... $ECHO_C" >&6
+ case ${TCL_EXTRA_CFLAGS} in
+ *-mwin32*|*-mno-cygwin*)
+ TEA_PLATFORM="windows"
+ CFLAGS="$CFLAGS -mwin32"
+ echo "$as_me:$LINENO: result: win32" >&5
+echo "${ECHO_T}win32" >&6
+ ;;
+ *)
+ TEA_PLATFORM="unix"
+ echo "$as_me:$LINENO: result: unix" >&5
+echo "${ECHO_T}unix" >&6
+ ;;
+ esac
+ EXEEXT=".exe"
+ ;;
+ *)
+ ;;
+ esac
+
+ # The BUILD_$pkg is to define the correct extern storage class
+ # handling when making this package
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_${PACKAGE_NAME}
+_ACEOF
+
+ # Do this here as we have fully defined TEA_PLATFORM now
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
+ fi
+
+ # TEA specific:
+
+
+
+
+
+
+
+
+# expectk has been removed from the distribution as Tcl has supported
+# dynamic extensions everywhere for a while. We still allow 'expect'
+# to be built for the die-hard users, but expectk is just wish with
+# package require Expect
+if test "${with_tk+set}" = set ; then
+ { echo "$as_me:$LINENO: WARNING: With Tk request ignored - use package require Tk & Expect" >&5
+echo "$as_me: WARNING: With Tk request ignored - use package require Tk & Expect" >&2;}
+fi
+
+#-----------------------------------------------------------------------
+# Handle the --prefix=... option by defaulting to what Tcl gave.
+# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
+#-----------------------------------------------------------------------
+
+
+ if test "${prefix}" = "NONE"; then
+ prefix_default=yes
+ if test x"${TCL_PREFIX}" != x; then
+ { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
+echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
+ prefix=${TCL_PREFIX}
+ else
+ { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
+echo "$as_me: --prefix defaulting to /usr/local" >&6;}
+ prefix=/usr/local
+ fi
+ fi
+ if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
+ -o x"${exec_prefix_default}" = x"yes" ; then
+ if test x"${TCL_EXEC_PREFIX}" != x; then
+ { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
+echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
+ exec_prefix=${TCL_EXEC_PREFIX}
+ else
+ { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
+echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
+ exec_prefix=$prefix
+ fi
+ fi
+
+
+#-----------------------------------------------------------------------
+# Standard compiler checks.
+# This sets up CC by using the CC env var, or looks for gcc otherwise.
+# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
+# the basic setup necessary to compile executables.
+#-----------------------------------------------------------------------
+
+
+ # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
+ # in this macro, they need to go into TEA_SETUP_COMPILER instead.
+
+ # If the user did not set CFLAGS, set it now to keep
+ # the AC_PROG_CC macro from adding "-g -O2".
+ if test "${CFLAGS+set}" != "set" ; then
+ CFLAGS=""
+ fi
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+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 "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+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 $# != 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
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+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 "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&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 "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+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;
+}
+_ACEOF
+# 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"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ # 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
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# 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"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /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
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+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 "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&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'
+
+
+ #--------------------------------------------------------------------
+ # Checks to see if the make program sets the $MAKE variable.
+ #--------------------------------------------------------------------
+
+ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+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 $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 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 conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+ #--------------------------------------------------------------------
+ # Find ranlib
+ #--------------------------------------------------------------------
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+ #--------------------------------------------------------------------
+ # Determines the correct binary file extension (.o, .obj, .exe etc.)
+ #--------------------------------------------------------------------
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ 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 <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ 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 <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#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);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+ # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
+
+
+ #------------------------------------------------------------------------
+ # If we're using GCC, see if the compiler understands -pipe. If so, use it.
+ # It makes compiling go faster. (This is only a performance feature.)
+ #------------------------------------------------------------------------
+
+ if test -z "$no_pipe" -a -n "$GCC"; then
+ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
+echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6
+if test "${tcl_cv_cc_pipe+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_cc_pipe=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_cc_pipe=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$hold_cflags
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
+echo "${ECHO_T}$tcl_cv_cc_pipe" >&6
+ if test $tcl_cv_cc_pipe = yes; then
+ CFLAGS="$CFLAGS -pipe"
+ fi
+ fi
+
+ #--------------------------------------------------------------------
+ # Common compiler flag setup
+ #--------------------------------------------------------------------
+
+ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+ # try to guess the endianness by grepping values into an object file
+ ac_cv_c_bigendian=unknown
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int
+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);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+ no)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+
+ if test "${TEA_PLATFORM}" = "unix" ; then
+
+ #--------------------------------------------------------------------
+ # On a few very rare systems, all of the libm.a stuff is
+ # already in libc.a. Set compiler flags accordingly.
+ # Also, Linux requires the "ieee" library for math to work
+ # right (and it must appear before "-lm").
+ #--------------------------------------------------------------------
+
+ echo "$as_me:$LINENO: checking for sin" >&5
+echo $ECHO_N "checking for sin... $ECHO_C" >&6
+if test "${ac_cv_func_sin+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define sin to an innocuous variant, in case <limits.h> declares sin.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define sin innocuous_sin
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char sin (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef sin
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sin ();
+/* 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_sin) || defined (__stub___sin)
+choke me
+#else
+char (*f) () = sin;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != sin;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_sin=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_sin=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
+echo "${ECHO_T}$ac_cv_func_sin" >&6
+if test $ac_cv_func_sin = yes; then
+ MATH_LIBS=""
+else
+ MATH_LIBS="-lm"
+fi
+
+ echo "$as_me:$LINENO: checking for main in -lieee" >&5
+echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6
+if test "${ac_cv_lib_ieee_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lieee $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ieee_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ieee_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
+echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6
+if test $ac_cv_lib_ieee_main = yes; then
+ MATH_LIBS="-lieee $MATH_LIBS"
+fi
+
+
+ #--------------------------------------------------------------------
+ # Interactive UNIX requires -linet instead of -lsocket, plus it
+ # needs net/errno.h to define the socket-related error codes.
+ #--------------------------------------------------------------------
+
+ echo "$as_me:$LINENO: checking for main in -linet" >&5
+echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6
+if test "${ac_cv_lib_inet_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_inet_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
+echo "${ECHO_T}$ac_cv_lib_inet_main" >&6
+if test $ac_cv_lib_inet_main = yes; then
+ LIBS="$LIBS -linet"
+fi
+
+ if test "${ac_cv_header_net_errno_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for net/errno.h" >&5
+echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_net_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking net/errno.h usability" >&5
+echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <net/errno.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking net/errno.h presence" >&5
+echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <net/errno.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: net/errno.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to the expect lists. ##
+## --------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for net/errno.h" >&5
+echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_net_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_net_errno_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
+
+fi
+if test $ac_cv_header_net_errno_h = yes; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NET_ERRNO_H 1
+_ACEOF
+
+fi
+
+
+
+ #--------------------------------------------------------------------
+ # Check for the existence of the -lsocket and -lnsl libraries.
+ # The order here is important, so that they end up in the right
+ # order in the command line generated by make. Here are some
+ # special considerations:
+ # 1. Use "connect" and "accept" to check for -lsocket, and
+ # "gethostbyname" to check for -lnsl.
+ # 2. Use each function name only once: can't redo a check because
+ # autoconf caches the results of the last check and won't redo it.
+ # 3. Use -lnsl and -lsocket only if they supply procedures that
+ # aren't already present in the normal libraries. This is because
+ # IRIX 5.2 has libraries, but they aren't needed and they're
+ # bogus: they goof up name resolution if used.
+ # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
+ # To get around this problem, check for both libraries together
+ # if -lsocket doesn't work by itself.
+ #--------------------------------------------------------------------
+
+ tcl_checkBoth=0
+ echo "$as_me:$LINENO: checking for connect" >&5
+echo $ECHO_N "checking for connect... $ECHO_C" >&6
+if test "${ac_cv_func_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define connect to an innocuous variant, in case <limits.h> declares connect.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define connect innocuous_connect
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef connect
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect ();
+/* 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_connect) || defined (__stub___connect)
+choke me
+#else
+char (*f) () = connect;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != connect;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+echo "${ECHO_T}$ac_cv_func_connect" >&6
+if test $ac_cv_func_connect = yes; then
+ tcl_checkSocket=0
+else
+ tcl_checkSocket=1
+fi
+
+ if test "$tcl_checkSocket" = 1; then
+ echo "$as_me:$LINENO: checking for setsockopt" >&5
+echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
+if test "${ac_cv_func_setsockopt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define setsockopt innocuous_setsockopt
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char setsockopt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef setsockopt
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setsockopt ();
+/* 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
+char (*f) () = setsockopt;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != setsockopt;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_setsockopt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_setsockopt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
+echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
+if test $ac_cv_func_setsockopt = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
+echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* 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;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_setsockopt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_setsockopt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
+if test $ac_cv_lib_socket_setsockopt = yes; then
+ LIBS="$LIBS -lsocket"
+else
+ tcl_checkBoth=1
+fi
+
+fi
+
+ fi
+ if test "$tcl_checkBoth" = 1; then
+ tk_oldLibs=$LIBS
+ LIBS="$LIBS -lsocket -lnsl"
+ echo "$as_me:$LINENO: checking for accept" >&5
+echo $ECHO_N "checking for accept... $ECHO_C" >&6
+if test "${ac_cv_func_accept+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define accept to an innocuous variant, in case <limits.h> declares accept.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define accept innocuous_accept
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char accept (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef accept
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char accept ();
+/* 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_accept) || defined (__stub___accept)
+choke me
+#else
+char (*f) () = accept;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != accept;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_accept=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_accept=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
+echo "${ECHO_T}$ac_cv_func_accept" >&6
+if test $ac_cv_func_accept = yes; then
+ tcl_checkNsl=0
+else
+ LIBS=$tk_oldLibs
+fi
+
+ fi
+ echo "$as_me:$LINENO: checking for gethostbyname" >&5
+echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
+if test "${ac_cv_func_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define gethostbyname innocuous_gethostbyname
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gethostbyname (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef gethostbyname
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname ();
+/* 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_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+char (*f) () = gethostbyname;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != gethostbyname;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
+if test $ac_cv_func_gethostbyname = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
+if test $ac_cv_lib_nsl_gethostbyname = yes; then
+ LIBS="$LIBS -lnsl"
+fi
+
+fi
+
+
+ # TEA specific: Don't perform the eval of the libraries here because
+ # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
+
+ TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
+
+
+
+
+ echo "$as_me:$LINENO: checking dirent.h" >&5
+echo $ECHO_N "checking dirent.h... $ECHO_C" >&6
+if test "${tcl_cv_dirent_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <dirent.h>
+int
+main ()
+{
+
+#ifndef _POSIX_SOURCE
+# ifdef __Lynx__
+ /*
+ * Generate compilation error to make the test fail: Lynx headers
+ * are only valid if really in the POSIX environment.
+ */
+
+ missing_procedure();
+# endif
+#endif
+DIR *d;
+struct dirent *entryPtr;
+char *p;
+d = opendir("foobar");
+entryPtr = readdir(d);
+p = entryPtr->d_name;
+closedir(d);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_dirent_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_dirent_h=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
+echo "${ECHO_T}$tcl_cv_dirent_h" >&6
+
+ if test $tcl_cv_dirent_h = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_DIRENT_H 1
+_ACEOF
+
+ fi
+
+ # TEA specific:
+ if test "${ac_cv_header_errno_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for errno.h" >&5
+echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_errno_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking errno.h usability" >&5
+echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <errno.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking errno.h presence" >&5
+echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: errno.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: errno.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to the expect lists. ##
+## --------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for errno.h" >&5
+echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_errno_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_errno_h" >&6
+
+fi
+if test $ac_cv_header_errno_h = yes; then
+ :
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_ERRNO_H 1
+_ACEOF
+
+fi
+
+
+ if test "${ac_cv_header_float_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for float.h" >&5
+echo $ECHO_N "checking for float.h... $ECHO_C" >&6
+if test "${ac_cv_header_float_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
+echo "${ECHO_T}$ac_cv_header_float_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking float.h usability" >&5
+echo $ECHO_N "checking float.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <float.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking float.h presence" >&5
+echo $ECHO_N "checking float.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <float.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: float.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to the expect lists. ##
+## --------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for float.h" >&5
+echo $ECHO_N "checking for float.h... $ECHO_C" >&6
+if test "${ac_cv_header_float_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_float_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
+echo "${ECHO_T}$ac_cv_header_float_h" >&6
+
+fi
+if test $ac_cv_header_float_h = yes; then
+ :
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_FLOAT_H 1
+_ACEOF
+
+fi
+
+
+ if test "${ac_cv_header_values_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for values.h" >&5
+echo $ECHO_N "checking for values.h... $ECHO_C" >&6
+if test "${ac_cv_header_values_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
+echo "${ECHO_T}$ac_cv_header_values_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking values.h usability" >&5
+echo $ECHO_N "checking values.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <values.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking values.h presence" >&5
+echo $ECHO_N "checking values.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <values.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: values.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to the expect lists. ##
+## --------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for values.h" >&5
+echo $ECHO_N "checking for values.h... $ECHO_C" >&6
+if test "${ac_cv_header_values_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_values_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
+echo "${ECHO_T}$ac_cv_header_values_h" >&6
+
+fi
+if test $ac_cv_header_values_h = yes; then
+ :
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_VALUES_H 1
+_ACEOF
+
+fi
+
+
+ if test "${ac_cv_header_limits_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for limits.h" >&5
+echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
+if test "${ac_cv_header_limits_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
+echo "${ECHO_T}$ac_cv_header_limits_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking limits.h usability" >&5
+echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <limits.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking limits.h presence" >&5
+echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <limits.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: limits.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to the expect lists. ##
+## --------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for limits.h" >&5
+echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
+if test "${ac_cv_header_limits_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_limits_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
+echo "${ECHO_T}$ac_cv_header_limits_h" >&6
+
+fi
+if test $ac_cv_header_limits_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIMITS_H 1
+_ACEOF
+
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_LIMITS_H 1
+_ACEOF
+
+fi
+
+
+ if test "${ac_cv_header_stdlib_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for stdlib.h" >&5
+echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking stdlib.h usability" >&5
+echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <stdlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking stdlib.h presence" >&5
+echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: stdlib.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to the expect lists. ##
+## --------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for stdlib.h" >&5
+echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_stdlib_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
+
+fi
+if test $ac_cv_header_stdlib_h = yes; then
+ tcl_ok=1
+else
+ tcl_ok=0
+fi
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strtol" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strtoul" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strtod" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ if test $tcl_ok = 0; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_STDLIB_H 1
+_ACEOF
+
+ fi
+ if test "${ac_cv_header_string_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for string.h" >&5
+echo $ECHO_N "checking for string.h... $ECHO_C" >&6
+if test "${ac_cv_header_string_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
+echo "${ECHO_T}$ac_cv_header_string_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking string.h usability" >&5
+echo $ECHO_N "checking string.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <string.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking string.h presence" >&5
+echo $ECHO_N "checking string.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: string.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to the expect lists. ##
+## --------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for string.h" >&5
+echo $ECHO_N "checking for string.h... $ECHO_C" >&6
+if test "${ac_cv_header_string_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_string_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
+echo "${ECHO_T}$ac_cv_header_string_h" >&6
+
+fi
+if test $ac_cv_header_string_h = yes; then
+ tcl_ok=1
+else
+ tcl_ok=0
+fi
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strstr" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strerror" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+
+ # See also memmove check below for a place where NO_STRING_H can be
+ # set and why.
+
+ if test $tcl_ok = 0; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_STRING_H 1
+_ACEOF
+
+ fi
+
+ if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
+echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
+echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sys/wait.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
+echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/wait.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/wait.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to the expect lists. ##
+## --------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sys/wait.h" >&5
+echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sys_wait_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
+
+fi
+if test $ac_cv_header_sys_wait_h = yes; then
+ :
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_SYS_WAIT_H 1
+_ACEOF
+
+fi
+
+
+ if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
+echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
+if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
+echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
+echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <dlfcn.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
+echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <dlfcn.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to the expect lists. ##
+## --------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for dlfcn.h" >&5
+echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
+if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_dlfcn_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
+echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
+
+fi
+if test $ac_cv_header_dlfcn_h = yes; then
+ :
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_DLFCN_H 1
+_ACEOF
+
+fi
+
+
+
+ # OS/390 lacks sys/param.h (and doesn't need it, by chance).
+
+for ac_header in sys/param.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## --------------------------------- ##
+## Report this to the expect lists. ##
+## --------------------------------- ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+s