--- screen-4.0.3.orig/debian/README.Debian +++ screen-4.0.3/debian/README.Debian @@ -0,0 +1,116 @@ +Screen Information +------------------ +See the copyright file for information about where to get screen, licensing, +and other assorted information. + + +Debian Modifications +-------------------- + * added Debian package maintenance files + * Use /var/run/screen as socket directory + * Make it set-gid "utmp" instead of setuid root + + +Debian Screen Q&A +----------------- + +Q: screen always complains about the permissions of /var/run/screen. + What's wrong? + +A: Simplified, the binary ensures that $SCREENDIR has just enough permission + bits enabled so that each user can create and access his socket directory. + This means: + + /usr/bin/screen setuid root -> /var/run/screen 0755 + /usr/bin/screen setgid utmp -> /var/run/screen 0775 + /usr/bin/screen without setid bits -> /var/run/screen 0777 + + These cases are all handled by the init script. However, the actual test + is a bit more complicated. And as the variable names are all quite self- + explanatory, just have a look at the C code itself: + +] n = (eff_uid == 0 && (real_uid || (st.st_mode & 0775) != 0775)) ? 0755 : +] (eff_gid == (int)st.st_gid && eff_gid != real_gid) ? 0775 : +] 0777; +] if (((int)st.st_mode & 0777) != n) +] Panic(0, "Directory '%s' must have mode %03o.", SockDir, n); + + If the invoking user has primary group utmp, the above assumption will fail. + The same holds if the underlying file system is mounted 'nosuid'. In these + cases you have to adapt the init script yourself. + + +Q: shift+page up in xterm/gnome-terminal/konsole used to let me scroll back a + bit, but now it doesn't. How can I make it work with scrollback? + +A: It doesn't scrollback consistently because screen (the program) displays in + xterm's alternate screen buffer. + + To have screen use xterm's normal screen buffer (which includes scrollback), + you can add the following to your .screenrc: + + termcapinfo xterm|xterms|xs|rxvt ti@:te@ + + +Q: Screen sets my xterm titlebar. I don't like this, how do I make it stop? + +A: The titlebar setting is set in the /etc/screenrc by telling screen that some + of the GUI terminals have a hardstatus line and that it can be set by + sending the xterm escape sequences that set the title/icon. + + # Set the hardstatus prop on gui terms to set the titlebar/icon title + termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007 + + You can override this on a system wide basis by commenting out this line in + the /etc/screenrc or you can override it in your personal screenrc by adding + the following line: + + hardstatus alwaysmessage + + +Q: Why do I get #!$@#$@!% trailing spaces when I cut and paste from mutt + running within screen? +Q: Why does the statusbar in my irc client extend to the end of the screen + in xterm but not in screen? + +A: This has to do with handling of the bce terminal attribute, or lack + thereof by default in screen. You can enable bce on a per-user basis by + adding the following to your .screenrc: + + defbce on + term screen-bce + + NOTE: if you do this your TERM will be screen-bce. When you login to + other machines they may not have a screen-bce terminal type, so you + will see errors. To fix this you must put the terminfo for screen-bce + on that remote machine. The screen terminfo is found in + /usr/share/doc/screen/terminfo/screeninfo.src and you can compile it + on the remote machine using tic(1). + + +Q: Screen doesn't notice when I resize the term - what's wrong? + +A: Firstly look for the same question in FAQ.gz. If the problem persists: + There have been reports of sshd instances blocking SIGWINCH (presumably + restarted from aptitude and thus inheriting its signal mask) which therefore + also prohibit remote screen sessions from ever seeing the signal. Have a + look at the old bugreport + for means to determine whether you are affected. (You might have to restart + sshd with a crontab entry or similar magic if ssh is your only way to access + the box.) + + +Q: Multiuser mode is not working - how can I enable it? + +A: Screen has to be setuid root to accomplish this. (Note the security implications + this has! Also bear in mind that setuid programs remove some variables from their + environment for exactly this reason - see ld.so(1).) If you still want to enable + the feature, you may do so with the following commands: + +] dpkg-statoverride --update --add root utmp 4755 /usr/bin/screen +] chmod 0755 /var/run/screen + + dpkg-statoverride will make sure that the modified permissions remain in effect + even if a new version of the screen package is installed. /var/run/screen will + be automatically recreated with the proper permissions if the directory lives + on volatile storage (doesn't persist between subsequent reboots). --- screen-4.0.3.orig/debian/copyright +++ screen-4.0.3/debian/copyright @@ -0,0 +1,39 @@ +This is the Debian prepackaged version of screen, a screen manager with +VT100/ANSI terminal emulation. + +This package was put together from sources obtained from: + http://savannah.gnu.org/projects/screen + +See the info documentation for contact information for the upstream authors. + +License: + + screen - terminal multiplexor with VT100/ANSI terminal emulation + Copyright (C) 1987 Oliver Laumann + Copyright (C) 1991 Wayne Davidson + Copyright (C) 1993-2006 Juergen Weigert + Copyright (C) 1993-2006 Michael Schroeder + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +On Debian systems, the complete text of the GNU General Public License, version 2 +can be found in /usr/share/common-licenses/GPL-2. + +Debian Modifications: + Copyright (C) 1996 Ian Murdock + Copyright (C) 1997 joost witteveen + Copyright (C) 1997-2001 Juan Cespedes + Copyright (C) 2001-2003 Adam Lazur + Copyright (C) 2007 Jan Christoph Nordholz --- screen-4.0.3.orig/debian/changelog +++ screen-4.0.3/debian/changelog @@ -0,0 +1,961 @@ +screen (4.0.3-14ubuntu7) natty; urgency=low + + * debian/patches/62-fix-term-length.dpatch + Fix "$TERM too long - sorry" error when length of $TERM is more than 20 + bytes. Upstream bug: http://savannah.gnu.org/bugs/?30880 + + -- Daniel Hahler Sat, 09 Apr 2011 04:15:46 +0200 + +screen (4.0.3-14ubuntu6) natty; urgency=low + + * Suggest byobu, rather than Depend. LP: #681831 + + -- LaMont Jones Fri, 03 Dec 2010 04:32:13 -0700 + +screen (4.0.3-14ubuntu5) natty; urgency=low + + * debian/patches/61-silence_command_from_echo.dpatch: + - print "command from..." when command is "echo" is unnecessary, + annoying, LP: #671486 + + -- Dustin Kirkland Fri, 05 Nov 2010 11:25:38 -0500 + +screen (4.0.3-14ubuntu4) maverick; urgency=low + + * Fix typo in upstart job: "filesystem" rather than "filesystems"; + LP: #595898. + * Remove debian/=screen.debhelper.log. + * Add "task" to the upstart job as it isn't a service; also use "script" + rather than "pre-start script" for clarity. + * Use find -delete rather than find -print0 | xargs rm to avoid starting two + processes. + * Rewrite "if test foo || ! test bar" into "if [ foo ] || [ ! bar ]" for + clarity. + + -- Loïc Minier Fri, 18 Jun 2010 14:12:51 +0200 + +screen (4.0.3-14ubuntu3) maverick; urgency=low + + * debian/screen-cleanup.upstart: start on filesystem, rather than + local-filesystem, in case /var is remote + + -- Dustin Kirkland Thu, 17 Jun 2010 09:25:16 -0500 + +screen (4.0.3-14ubuntu2) maverick; urgency=low + + * debian/screen-cleanup.upstart, debian/init: convert screen to an + upstart script to fix some bugs where /var/run is not mounted when + screen-cleanup runs, LP: #574773 + + -- Dustin Kirkland Mon, 14 Jun 2010 08:13:33 -0500 + +screen (4.0.3-14ubuntu1) lucid; urgency=low + + * Merge from debian testing, remaining changes: + - debian/control: + + maintainer updates, recommend byobu + - debian/patches/33increase_max_winmsg_renditions.dpatch: + + upped hardcode value from 80 to 256 + - debian/patches/56-source-file-not-found-warning.dpatch: + + sourcing a file that's not found should fail more gracefully + - debian/patches/58-show-encoding-hardstatus.dpatch: + + show encoding in hardstatus + - debian/patches/59-no-beep-on-write-acl.dpatch: + + instead of beeping on all displays, report failure to attached display + - debian/patches/60-byobu-pointer.dpatch: + + helpful text pointing new screen users to byobu + + -- Dustin Kirkland Tue, 10 Nov 2009 11:55:17 -0600 + +screen (4.0.3-14) unstable; urgency=low + + * Cherry-pick a few upstream commits: + * f6b50e17 (create windows in detached session, closes: #466072). + * 97708d58 (vertical split documentation, closes: #525998). + * bb04008e (report session identifier on detach, closes: #199747). + * Slightly adjust Homepage field. + * Add support for build option 'noopt'. + * Bump Standards version to 3.8.2, no changes. + * Specify GPL version in d/copyright. + + -- Jan Christoph Nordholz Tue, 28 Jul 2009 13:21:24 +0200 + +screen (4.0.3-13ubuntu4) karmic; urgency=low + + * debian/patches/33increase_max_winmsg_renditions.dpatch: bump max + winmsg renditions from 80 to 256 + + -- Dustin Kirkland Mon, 06 Jul 2009 00:27:39 -0500 + +screen (4.0.3-13ubuntu3) karmic; urgency=low + + * debian/control: revert last change, drop byobu back down to a + recommends, LP: #391052 + + -- Dustin Kirkland Tue, 23 Jun 2009 10:08:09 -0500 + +screen (4.0.3-13ubuntu2) karmic; urgency=low + + * debian/control: depend on byobu; this will replace the screen-profiles + version with the dpkg-diversion of /usr/bin/screen, which is causing + the permissions issue in LP: #390405 + * debian/patches/60-byobu-pointer.dpatch: add a one-liner pointing to byobu, + for upgrading users who previously just typed 'screen' to launch byobu + (now that the diversion has been removed) + + -- Dustin Kirkland Tue, 23 Jun 2009 01:47:43 -0500 + +screen (4.0.3-13ubuntu1) karmic; urgency=low + + * Merge with Debian, remaining changes: (LP: #388791) + + Add show encoding feature, using "%e" in hardstatus to show current + encoding. Ported from FreeBSD original by yzlin@cs.nctu.edu.tw. + LP: #286810 + + debian/patches/56-source-file-not-found-warning.dpatch: When sourcing a + file in a screenrc which is not found, fail more gracefully by not + interrupting normal operation; instead, print a debug message. LP: + #323756 + + debian/control: recommend byobu + + Add 59-no-beep-on-write-acl.dpatch: do not beep on all displays when the + write ACL triggers, instead report failure as done with regular screen + command ACL failures. + + -- أحمد المحمودي (Ahmed El-Mahmoudy) Thu, 18 Jun 2009 07:18:37 +0300 + +screen (4.0.3-13) unstable; urgency=low + + * Sync with Ubuntu, closes: #520359. New dpatches: + * 33increase_max_winmsg_renditions + * 35screen_invoked_with_a_command (cherry-picked from upstream) + * Bump Standards version to 3.8.1 (again, no changes). + * Accommodate initscript to adjust the $SCREENDIR permissions + correctly even if /usr/bin/screen is installed 0755. + Add a Q&A pair to README.Debian to clarify this problem. + Closes: #520317. + * Fix #433338 properly by keeping the umask instead of dropping + the 'public exchange file' concept. Modify dpatch 22. + Addresses CVE-2009-1214, CVE-2009-1215, closes: #521123. + * Depend on patch-stamp instead of patch in debian/rules. + (Phony targets as intermediates in a dep chain are braindead.) + * Fix job control and CTTY handling on our new kfreebsd archs. + Closes: #522689. Thanks to Axel Beckert for his support! + + -- Jan Christoph Nordholz Fri, 10 Apr 2009 18:20:49 +0200 + +screen (4.0.3-12) unstable; urgency=low + + * Back to work. + * Make the package build lintian-clean again. + * Add a Homepage field. Closes: #515803. + * Use the stock [un]patch targets from dpatch. Closes: #488618. + Thanks to Ryan Niebur. + * Adjust version number in the info doc. Closes: #492274, thanks + to Juhapekka Tolvanen. + * Cherry pick from upstream: + * d128abd5...: Display hostname when locked. Closes: #501201. + * Remove a spurious nethack message. Closes: #512299. + + -- Jan Christoph Nordholz Wed, 04 Feb 2009 01:14:20 +0100 + +screen (4.0.3-11ubuntu6) karmic; urgency=low + + * debian/control: account for rename of screen-profiles to byobu; + recommend byobu + + -- Dustin Kirkland Mon, 11 May 2009 07:48:56 -0500 + +screen (4.0.3-11ubuntu5) karmic; urgency=low + + * Add 59-no-beep-on-write-acl.dpatch: do not beep on all displays when + the write ACL triggers, instead report failure as done with regular + screen command ACL failures. + + -- Kees Cook Wed, 29 Apr 2009 10:30:50 -0700 + +screen (4.0.3-11ubuntu4) jaunty; urgency=low + + [ rascov ] + * Add show encoding feature, using "%e" in hardstatus to show current + encoding. Ported from FreeBSD original by yzlin@cs.nctu.edu.tw. + LP: #286810 + + -- Dustin Kirkland Wed, 11 Feb 2009 05:53:52 -0600 + +screen (4.0.3-11ubuntu3) jaunty; urgency=low + + * debian/patches/56-source-file-not-found-warning.dpatch: When sourcing a + file in a screenrc which is not found, fail more gracefully by not + interrupting normal operation; instead, print a debug message. LP: #323756 + * debian/patches/57-screen-invoked-with-a-command.dpatch: Cherry pick from + upstream source; fixes LP: #311443 + + -- Dustin Kirkland Wed, 04 Feb 2009 14:19:09 +0100 + +screen (4.0.3-11ubuntu2) jaunty; urgency=low + + * debian/control: recommend screen-profiles + + -- Dustin Kirkland Fri, 23 Jan 2009 09:50:59 -0500 + +screen (4.0.3-11ubuntu1) jaunty; urgency=low + + * debian/patches/55-increase_max_winmsg_renditions.dpatch: Increase + MAX_WINMSG_REND constant from 16 to 80, LP: #315871 + * debian/patches/00list: updated accordingly + + -- Dustin Kirkland Sat, 10 Jan 2009 12:20:42 -0600 + +screen (4.0.3-11) unstable; urgency=low + + * Unbreak and <^A Bksp> using a patch from Loïc Minier + (thanks!) - introduced as new 45suppress_remap.dpatch. + Closes: #484647. + * Bump Standards version to 3.8.0. No changes necessary. + + -- Jan Christoph Nordholz Thu, 12 Jun 2008 19:33:30 +0200 + +screen (4.0.3-10) unstable; urgency=low + + * The "Whoa, this feels like a time machine" release. + * Apply ~5k lines of unified diff to the source (CVS HEAD against + last release). Closes: #444146. + * Rediff all dpatches - drop 06 and 12 (fixed upstream). + * Add a second 16fix_gcc_warnings dpatch to get all those new + gcc warnings out of the buildlogs. + * Upstream has changed its mind and defaults to sockets now if both + sockets and fifos are available - enforce fifos for our build. + * Use the locale's timeformat for the session creation timestamps. + Closes: #481445. + * Update 40cjk_eastasian.dpatch as suggested in the BTS. Thanks + to Akira Tagoh and Deng Xiyue for providing and testing the new + version! Closes: #478884. + * Correct the bug number in the changelog entry for 4.0.3-9, item 5. + * Bump debhelper level once more to 7. + + -- Jan Christoph Nordholz Mon, 02 Jun 2008 19:16:16 +0200 + +screen (4.0.3-9) unstable; urgency=low + + * The "I broke it, I fix it" release. + * Fix a race condition that made session resumption difficult if there + was only one. Closes: #477739. + * Enhance dpatch 16fix_gcc_warnings (buildlog is now free of warnings). + * Apply initscript LSB header changes as suggested by Kel Modderman - + thanks! Closes: #477779. + * Extend the tilde expansion patch to also apply to 'chdir' commands. + Thanks to Steve Kemp! Closes: #447210. + * Document my dpatch numbering style in 00list (and move one patch to + make things fit again). + + -- Jan Christoph Nordholz Sun, 27 Apr 2008 14:34:00 +0200 + +screen (4.0.3-8) unstable; urgency=low + + * The "resuming the bughunt" release. + * Bump Standards level to 3.7.3, debhelper to level 6. + * Include Ubuntu's 07norootpassword.dpatch, thanks to Martin Pitt! + See Ubuntu #6760. Closes: #447756. + * Fix another error in the info documentation. Closes: #447668. + * Fix blankerprg semantics. Closes: #330036. + * Empty Default-Stop section in the LSB initscript header. Closes: #461438. + * Fix multiuser activation howto in README.Debian. + * New feature: sort sessions by (and show) creation time, and pick the + youngest instead of an arbitrary one when called with '-rR'. + Closes: #206572. + + -- Jan Christoph Nordholz Mon, 21 Apr 2008 23:41:42 +0200 + +screen (4.0.3-7) unstable; urgency=low + + * Completely undo the socket dir migration after discussion on #debian-devel. + * Restore original location /var/run/screen. + * Revive old version of dpatch 11. + * Readjust maintainer scripts and lintian overrides (intentionally + keeping the /tmp warning as a reminder). + + -- Jan Christoph Nordholz Tue, 25 Sep 2007 03:22:39 +0200 + +screen (4.0.3-6) unstable; urgency=low + + * One last fix for the migration. I knew this would get ugly... + Closes: #443813. + + -- Jan Christoph Nordholz Mon, 24 Sep 2007 12:14:52 +0200 + +screen (4.0.3-5) unstable; urgency=low + + * Take 5: The "(w)hacking at the wishlist" release. + * Build with 256-color support. Closes: #348099. + * Change the comments in the digraph table to give a description of the + composed char, which retains its informational value regardless of the + viewer's encoding. Closes: #437024. Thanks, Ben Finney! + * Add "defnonblock 5" to the default screenrc which ought to improve + screen's behaviour on flaky/slow ssh lines. Closes: #434014. + * Include the patch for upstream #16666 which fixes the display of certain + CJK glyphs. Thanks to Victor Hsieh for the hint and Yi-Hsuan Hsin for + providing the patch! Closes: #437223. + * Improve and augment the documentation: + * Tidy up README.Debian. Among other changes this closes: #228220. + * Add a few sentences concerning Debian's MAXWIN setting (closes: #344863) + and envvar-passing when calling screen with STY set (closes: #259684). + * Fix a thinko in the socket directory migration. Closes: #443768. + + -- Jan Christoph Nordholz Mon, 24 Sep 2007 02:03:56 +0200 + +screen (4.0.3-4) unstable; urgency=low + + * Take 4: The "the FHS is a fine thing after all" release. + * Move example config files into /usr/share/doc/screen/examples. + * Move fifo dir from /var/run/screen to /tmp/.screen. Closes: #214796. + Create preinst to make the upgrade fail early (i.e. before the unpack + phase) if /tmp/.screen is otherwise occupied. + Add another Q&A pair to README.Debian to explain how all this is done. + * Redo 11replace_doc_paths.dpatch from scratch due to these reorganisations. + * Drop po/ subdirectory (after dropping debconf usage in 4.0.3-1). + Closes: #440725 (sorry). Closes: #440410. + Also stop calling dh_installdebconf. + * Update the FSF address in the source files. + + -- Jan Christoph Nordholz Thu, 30 Aug 2007 18:31:53 +0200 + +screen (4.0.3-3) unstable; urgency=low + + * Take 3: The "less bugreports than upstream" release. Whew. + * Add full tilde expansion to the builtin 'source' command. Inspired by + a patch by Nico Golde. Thanks! Closes: #308818. + * Add a kluge to prevent screen from locking up when doing strange things + with xon and flow control enabled. Still waiting for upstream to properly + fix this problem, so this only addresses: #157873. + * Extend the documentation about the strange activation of the nethack + feature. Closes: #205531. + * Don't create /tmp/screen-exchange with default mode 0666. Closes: #433338. + * Add a Q&A pair to README.Debian on how to enable the multiuser feature. + The problem is mentioned in the manpage under '-r', too, so I consider this + sufficiently documented now. Closes: #92036. + * Fix the exitcode mess of '-q -ls' (and its combinations with -d, -r and -x) + to keep the promises the manpage makes. Doing this on my own, no comment + from upstream yet. Closes: #426328. + * More documentation typo fixes. + * Properly parse the long commandline options like '-wipe'. Don't accept + as soon as it's unambiguous - this is not getopt(). Closes: #222023. + * Increase the maximum length of the input buffer (C-a :). Closes: #379384. + + -- Jan Christoph Nordholz Thu, 09 Aug 2007 22:51:19 +0200 + +screen (4.0.3-2) unstable; urgency=low + + * Overhaul, Take 2: The "let -1 migrate to testing first" release. + * Better warnings now than worries later: add -Wextra to CFLAGS + (and counter with "-Wno-unused-parameter -Wno-missing-field-initializers" + to get the noise back to an acceptable level). + * Now that more warnings are visible, kill a few of them (new patch, ready + to be submitted upstream: 16fix_gcc_warnings). + * Drop Pre-Depends from debian/control (wasn't even used, so this is just + cosmetical). + * Clarify debian/copyright after consulting upstream. Closes: #403896. + * Increase MAXSTR by a sufficient amount. The usage pattern of this macro + doesn't justify a switch to dynamic allocation, so simply increasing it + is fine with me. Closes: #271384. + * Fix upstream #20277 by expanding SCREENENCODINGS twice during configure. + Closes: #435340. Thanks Victor Hsieh! + * Advise against using the "sessionname" command. The problem has been acked + upstream, so there's nothing more I can do - besides, there are alternatives. + Closes: #103771. + * Fix the "C-a M" toggle command that was broken when combined with a setting + of 'defmonitor on' in one's .screenrc. Closes: #310568. + * Correct a manpage error (defining a limitation that actually doesn't exist). + Closes: #197557. + + -- Jan Christoph Nordholz Sun, 05 Aug 2007 16:59:24 +0200 + +screen (4.0.3-1) unstable; urgency=low + + * New maintainer. Thanks for your work, Adam! + Move Adam to Uploaders. + * Acknowledge NMUs. Thanks to all committers! + * Start the package overhaul. Take 1: + The "wishlist stuff will have to wait at least until -2"-release. + * Bump policy compliance level to 3.7.2. + * Bump debhelper to v5, and prefer debian/compat over DH_VERSION. + * Clean up old dependencies and conflicts. Closes: #334084. + * Introduce a patch system (dpatch) and move all orig changes to patches. + * Assert that the package is built with fifos instead of sockets. + Close the accompanying bug reports - if there's still a buildd that + fails the fifo test, I'll get an FTBFS now. Closes: #387156, #413674. + * Document the SIGWINCH issue in README.Debian. As this is not a bug + in screen, this closes: #392302, #248699 as far as this package is + concerned. + * Make the clean target live up to its name again. + * Fix a syntax error in the texinfo doc that surfaced now that the clean + target really cleans everything. + * Fix the commands in doc/Makefile.in to generate splitted info files + (because that's how they are distributed by upstream). + * Clean up the maintainer scripts: + * Stop using debconf. Its only purpose was to display a warning message + when upgrading from << 3.9.5-5, which was uploaded in the 20th century. + * Drop debian/preinst completely. + * Replace case constructions in the other scripts with if blocks. + * Stop trying to remove /var/run/screens - I couldn't find any reference + to that directory. Move remove-shell call to prerm. Closes: #374471. + * Mute the init script. Closes: #385895. + * Recreate /var/run/screen on install/reboot if necessary (e.g. tmpfs) with + the appriopriate permissions (depending on the screen binary - some + admins might choose to install it setuid using dpkg-statoverride). + Closes: #357578, #390506, #397088. + * Fix a couple of manpage typos. Closes: #414241, #417647. + * Enhance the copyright message (add the GPL boilerplate, formatting fixups). + Addresses #403896, but the year issue is still pending. + + -- Jan Christoph Nordholz Sun, 22 Jul 2007 13:39:43 +0200 + +screen (4.0.3-0.4) unstable; urgency=low + + * Porter NMU. + * Fix screen on kfreebsd-amd64. Closes: #357232 + + -- Aurelien Jarno Tue, 17 Jul 2007 06:51:52 +0200 + +screen (4.0.3-0.3) unstable; urgency=low + + * Non-maintainer upload to fix pending l10n isses. + * Debconf translations: + - Galician. Closes: #407960 + - Catalan. Closes: #412581 + - Convert all PO files, but Japanese, to UTF-8 + * Add an empty binary-indep target to debian/rules. Closes: #395743 + * Provide a simple LSB header to the init script + + -- Christian Perrier Mon, 5 Mar 2007 09:14:35 +0100 + +screen (4.0.3-0.2) unstable; urgency=low + + * Non-maintainer upload to fix a forgotten l10n issue in last NMU + * Debconf translation updates: + - Added Vietnamese. Closes: #317922 + * Modify the debconf dependency to better handle the cdebconf transition + Closes: #332089 + + -- Christian Perrier Wed, 8 Nov 2006 20:46:01 +0100 + +screen (4.0.3-0.1) unstable; urgency=high + + * Non-maintainer upload to fix a security issue + * New upstream version fixing utf8 combining characters handling. The + bugs could be used to crash/hang screen by writing a special string + to a window (CVE-2006-4573). Closes: #395225 + * Debconf translation updates: + - Finnish added. Closes: #303818 + - Swedish added. Closes: #331583 + - Portuguese added. Closes: #345059 + - Italian updated. Closes: #358160 + + -- Christian Perrier Sat, 28 Oct 2006 07:35:57 +0200 + +screen (4.0.2-4.1) unstable; urgency=low + + * Non-maintainer upload + * re-run autoconf, fix ftbfs (closes: #269366) + + -- David Kimdon Sat, 13 Nov 2004 20:49:00 -0800 + +screen (4.0.2-4) unstable; urgency=low + + * new debconf translations: + * Japanese - thanks Hideki Yamane (closes: #224175) + * Italian - thanks Fabio Pani (closes: #224580) + * Simplified Chinese - thanks Carlos Z.F. Liu (closes: #230811) + * Dutch - thanks Luk Claes (closes: #244326) + * Czech - thanks Miroslav Kure (closes: #261243) + + * updated Danish translation - thanks Morten Brix Pedersen (closes: #241241) + + -- Adam Lazur Tue, 24 Aug 2004 20:09:08 -0400 + +screen (4.0.2-3) unstable; urgency=high + + * security: fix hole in stale session cleanup init script which allows + arbitrary file deletion on startup. Thanks to Roderick Schertler for + pointing this out. (closes: #238139) + + -- Adam Lazur Mon, 15 Mar 2004 20:46:35 -0500 + +screen (4.0.2-2) unstable; urgency=low + + * fix depends on passwd to include epoch (closes: #224192) + + -- Adam Lazur Tue, 6 Jan 2004 23:12:51 -0500 + +screen (4.0.2-1) unstable; urgency=low + + * ack NMU (closes: #223085, #222420) + * add rxvt to scrollback example in README.Debian and /etc/screenrc + (closes: #206193) + * fix typo in example bind line in screenrc (closes: #214727) + * add Brazilian Portuguese debconf translation (thanks Andre Luis Lopes) + (closes: #218809) + * add screen to /etc/shells (closes: #148715) + + -- Adam Lazur Sat, 6 Dec 2003 18:25:10 -0500 + +screen (4.0.2-0.1) unstable; urgency=medium + + * NMU + * New upstream release. No upstream changelog found. ansi.c has been changed + to fix CAN-2003-0972, a signed integer overflow that allowed for arbitrary + code execution as group utmp (or as root on systems where screen was + installed setuid root). (Addresses #222385 for sid) + * [debian/rules] Changed the order of chmod/chown of the screen binary and + the run directory to chown, chmod as chown no longer preserves setuid and + setgid bits as of coreutils 5.0.1. (Closes: #222420) + + -- J.H.M. Dassen (Ray) Sat, 6 Dec 2003 18:43:11 +0100 + +screen (4.0.1-3) unstable; urgency=low + + * fix autoconf varargs detection (using vsprintf) on alpha, which leads to + a binary that segfaults (closes: #213842) + + -- Adam Lazur Thu, 2 Oct 2003 23:14:39 -0400 + +screen (4.0.1-2) unstable; urgency=low + + * build-depend on libncursesw5 to get autoconf to pick it up... doh + + -- Adam Lazur Tue, 30 Sep 2003 23:40:11 -0400 + +screen (4.0.1-1) unstable; urgency=low + + * New Upstream Release (closes: #210280) + * rewritten command parser + * zmodem support (catch & passthrough) + * new screenblanker + + * remove bindkey -kb from system screenrc as advised by upstream + (closes: #187302) + * link against libncursesw (closes: #211511) + * fix Hurd build problem (closes: #201909) + * bump up debhelper versioned dependency (closes: #197432) + * switch to gettext-based debconf templates (closes: #202549) + + -- Adam Lazur Tue, 30 Sep 2003 23:14:05 -0400 + +screen (3.9.15-1) unstable; urgency=low + + * New Upstream Release + * unicode combining character support + * chinese GBK encoding added + * backtick screen escape to substitute command output + + * add Danish translation (thanks Morten Brix Pedersen) (closes: #174745) + * add startup script to reap stale screen named pipes (closes: #164447) + * remove extraneous /etc/pam.d/screen as other works fine + + -- Adam Lazur Mon, 17 Mar 2003 22:56:01 -0500 + +screen (3.9.13-3) unstable; urgency=low + + * add note about xterm scrollback and screen to README.Debian and update + comment in /etc/screenrc. + + -- Adam Lazur Thu, 17 Oct 2002 16:41:11 -0400 + +screen (3.9.13-2) unstable; urgency=medium + + * avoid pkg installing docs resulting in /usr/share/info/dir.gz files in + the .deb (closes: #162940) + + * apply 2 patches from upstream: + 1) Fix console grabbing on linux. The kernel handles TIOCCONS too + restrictive, had to implement a workaround. + 2) Fix WrapChar bug that prevented removal of a bad scroll-region. + + -- Adam Lazur Thu, 10 Oct 2002 22:53:24 -0400 + +screen (3.9.13-1) unstable; urgency=low + + * New Upstream Release + * correction to a FAQ answer in README.Debian (closes: #153323) + + -- Adam Lazur Tue, 17 Sep 2002 09:19:14 -0400 + +screen (3.9.11-5) unstable; urgency=high + + * remove (%n.%t) from hardstatus string (closes: #137095) + * bump up max window title length to 60 (closes: #135391) + * debconf templates: + * add french translation (thanks Philippe Batailler) (closes: #141676) + * add russian translation (thanks Ilgiz Kalmetev) (closes: #137682) + * split translations out into their own files + * fix debconf prompt when upgrading from versions < 3.9.5-5 (closes: #137743) + * edit the long description a bit + * update README.Debian as to current state of screen-bce + + -- Adam Lazur Wed, 10 Apr 2002 22:01:46 -0400 + +screen (3.9.11-4) unstable; urgency=low + + * patches to fix Japanese support: + screen-3.9.11.hcGR-patch + screen-3.9.11.paste-patch + screen-3.9.11.encoding-patch (closes: #136740) + * add spanish debconf template translation (closes: #136447) + + -- Adam Lazur Thu, 7 Mar 2002 09:13:56 -0500 + +screen (3.9.11-3) unstable; urgency=high + + * Security Fix: override autoconf detected default group and mode on ptys + as it is not autodetected properly for buildd's that run + as cronjobs (closes: #135018) + * add note to README.Debian about setting xterm titlebar/icon and how to + override the default + * add note to README.Debian about mutt padding lines with whitespace (bce) + * add patchlevel.h (the real upstream changelog) to /usr/share/doc/screen + + -- Adam Lazur Thu, 21 Feb 2002 17:25:12 -0500 + +screen (3.9.11-2) unstable; urgency=high + + * Apply patch to fix non utf8 locales (closes: #134200) + * fix problems with screenrc changes that affected konsole (closes: #134198) + * remove line that was borking TERM=xterm + * re-add line which mods xterm initialization string + * Add screen-bce terminal type to screeninfo.src and add a note about it in + README.Debian + + -- Adam Lazur Sat, 16 Feb 2002 13:49:38 -0500 + +screen (3.9.11-1) unstable; urgency=low + + * New upstream release + * New commands: windowlist (bound to C-a "), source, eval, ignorecase, + deflogin, setsid + * Support for double-width utf-8 characters. + * bugfixes and other features, see /usr/share/doc/screen/NEWS.gz for more + info + + * Removed patches: + * pam support, hurd fix, getpt fix: accepted upstream + * md5 password support: obsoleted by pam support + * bufferfile default change: screen is tmpfile safe + + * Updates to /etc/screenrc: + * Bump up defscrollback from 100 (compiled in default) to 1024 + (thanks to overfiend for pointing this out) + * Add examples of running programs at screen startup + + * Add german template translation (closes: #126180) + * Now (ab)use upstream's makefile for most of the file installation + * compile with --enable-rxvt_osc to allow rxvt icon setting from within + screen (closes: #133333) + + -- Adam Lazur Fri, 15 Feb 2002 10:18:07 -0500 + +screen (3.9.10-1) unstable; urgency=low + + * New Maintainer + * migrate package build to debhelper + * debconfify prompt when upgrading from screen < 3.9.5-5 + + -- Adam Lazur Sat, 15 Dec 2001 21:20:58 -0500 + +screen (3.9.10-0.1) unstable; urgency=high + + * NMU. + * New upstream version with security fix. (Closes: #111339) + (Thanks Adam Lazur ) + + -- Eric Gillespie, Jr. Wed, 12 Sep 2001 22:11:23 -0500 + +screen (3.9.9-2) unstable; urgency=low + + * New Standards-Version (3.5.4) + * Get rid of suidmanager, install screen setgid (closes: Bug#96858) + + -- Juan Cespedes Tue, 5 Jun 2001 23:50:42 +0200 + +screen (3.9.9-1) unstable; urgency=low + + * New upstream version + * Really fix Bug#80337 (thanks to Michael Schroeder ) + + -- Juan Cespedes Sat, 2 Jun 2001 19:40:37 +0200 + +screen (3.9.8-6.1) unstable; urgency=HIGH + + * Non-maintainer upload. + * Disable -DDEBUG which is a massive security hole, closes: #98839. + + -- James Troup Sun, 27 May 2001 01:09:31 +0100 + +screen (3.9.8-6) unstable; urgency=low + + * Updated copyright file + * Applied patch from Ryan King to be + able to work correctly on many-lined terminals (closes: Bug#80337) + + -- Juan Cespedes Tue, 22 May 2001 00:23:00 +0200 + +screen (3.9.8-5) unstable; urgency=low + + * Fixed small typo in info file + * Clean up small lintian bugs + * Make commands related to bufferfile (readbuf, writebuf) + work again (Oops) (closes: Bug#45359, Bug#69275, Bug#83759) + + -- Juan Cespedes Sat, 19 May 2001 15:12:11 +0200 + +screen (3.9.8-4) unstable; urgency=low + + * Make /etc/pam.d/screen be a conffile (closes: Bug#58696) + * Remove option "autofixterm" from manual page (closes: Bug#97019) + * Applied patch to make screen work OK on Hurd (closes: Bug#97343) + + -- Juan Cespedes Mon, 14 May 2001 03:00:34 +0200 + +screen (3.9.8-3) unstable; urgency=low + + * Fixed small bug which caused `aterm' to display + everything underlined (closes: Bug#97327) + + -- Juan Cespedes Sun, 13 May 2001 15:39:19 +0200 + +screen (3.9.8-2) unstable; urgency=low + + * New version uploaded to unstable instead of "stable unstable" (sorry) + + -- Juan Cespedes Tue, 8 May 2001 22:28:35 +0200 + +screen (3.9.8-1) stable unstable; urgency=medium + + * New upstream version (closes: Bug#74310, Bug#89215) + * New Standards-Version (3.5.3) + * Applied patch to build cleanly on ia64 (closes: #91964) + * Fixed small bug regarding creation of sockets dir + when running as root + + -- Juan Cespedes Mon, 7 May 2001 23:26:40 +0200 + +screen (3.9.5-9) stable unstable; urgency=HIGH + + * Fixed security bug (group utmp compromise) + + -- Juan Cespedes Sat, 2 Sep 2000 17:51:28 +0200 + +screen (3.9.5-8) frozen unstable; urgency=low + + * Correct wrong build-dependency (libncurses5-dev + instead of libncurses4-dev) (closes: Bug#57989) + * Include a /etc/pam.d/screen file (closes: Bug#57592) + + -- Juan Cespedes Mon, 14 Feb 2000 10:07:52 +0100 + +screen (3.9.5-7) frozen unstable; urgency=low + + * Built against libncurses5 instead of obsoleted libncurses4 + + -- Juan Cespedes Sun, 6 Feb 2000 21:26:59 +0100 + +screen (3.9.5-6) unstable; urgency=low + + * Make `screen' work correctly both as root and non-root + (closes: Bug#53290, Bug#53329) + + -- Juan Cespedes Thu, 23 Dec 1999 16:48:02 +0100 + +screen (3.9.5-5) unstable; urgency=low + + * New Standards-Version (3.1.1) + * Acknowledge NMU-fixed bugs (closes: Bug#50394, Bug#51058, Bug#51316) + * Changed screens directory from $HOME to /var/run/screen (closes: Bug#51088) + * Removed debconf support: no configuration is necessary in this program + + -- Juan Cespedes Sun, 19 Dec 1999 06:04:48 +0100 + +screen (3.9.5-4.1) unstable; urgency=low + + * Non-maintainer release. + * Run autoconf to resync configure with configure.in + (closes:Bug#50394,#51058). + + -- Joel Klecker Mon, 29 Nov 1999 08:38:18 -0800 + +screen (3.9.5-4) unstable; urgency=low + + * Used debconf + + -- Juan Cespedes Sun, 14 Nov 1999 23:51:10 +0100 + +screen (3.9.5-3) unstable; urgency=low + + * Applied patch from Joel Klecker to use getpt() + to get PTYs (closes: Bug#45628, Bug#48856) + + -- Juan Cespedes Tue, 2 Nov 1999 16:42:41 +0100 + +screen (3.9.5-2.1) unstable; urgency=low + + * NMU. Backed out pty which didn't free ptys correctly. (Fixes: #45628) + + -- J.H.M. Dassen (Ray) Sat, 30 Oct 1999 17:07:08 +0200 + +screen (3.9.5-2) unstable; urgency=low + + * Added missing "prerm" file (lintian) + + -- Juan Cespedes Fri, 1 Oct 1999 10:13:17 +0200 + +screen (3.9.5-1) unstable; urgency=low + + * New upstream version (closes: Bug#45173) + * FHS (/usr/doc/screen -> /usr/share/screen) + * PAM support + * Move "screen-exchange" file to ${HOME} (closes: Bug#45449) + + -- Juan Cespedes Sun, 19 Sep 1999 20:24:56 +0200 + +screen (3.9.4-1) unstable; urgency=low + + * New upstream version, lots of improvements (closes: Bug#43932) + * Removed setuid, make it setgid "utmp" (closes: Bug#43909, Bug#43931) + * Uses "vlock" to lock screen if available + * Avoid braces in debian/rules (closes: Bug#36888) + * Use Unix98 style PTYs (closes: Bug#34578, Bug#37208, Bug#37863) + * Closed old bugs (closes: Bug#29523, Bug#35469) + * "screen" now defaults to MAXWIN=40 (closes: Bug#42420) + * Compile cleanly on glibc-2.1 systems (closes: Bug#26645) + * New Standards-Version: 3.0.1 (but keeping docs in /usr/doc) + + -- Juan Cespedes Fri, 10 Sep 1999 16:14:41 +0200 + +screen (3.7.6-1) unstable; urgency=low + + * New upstream version: + Wayne's resize.c patch to keep the cursor onscreen. FindWindow + corrected. AIX4 patch from robert@mayday.cix.co.uk. Fixed + kanji am & markcursor bugs. SCO support (Gert Doering). + Wayne's statusline extra space. New flag nospc for MakeWinMsg. + New TF capability: add missing termcap/info caps. + screen-exchange security fix. Use kstat for Solaris' loadavg. + Check for mode 775 if screen runs setgid. Fixed typo in silence + command. Allow detach with no tty. HPUX10.20 ltchars hack. + Use @1/@7 as replacement for kh/kH. Use seteuid before calling + tgetent. Check for displays in Msg(). Linux ncurses hack: + redefine _nc_timed_wait. Configure check for ncurses (sigh). + ITOH Yasufumi: kanji fixes, osf support, bug fixes. More secure + Rewrite(). Increased line buffer size to 2048 bytes. + SCO-5 Fixes (Brian L. Gentry). resize code now handles tabs + correctly. + * Applied NMU from Christian Meder for glibc-2.1: Bug#32814 + + -- Juan Cespedes Thu, 11 Feb 1999 18:32:01 +0100 + +screen (3.7.4-9.1) frozen unstable; urgency=low + + * non maintainer, sparc only upload + * apply patch for glibc2.1 from BTS + * undefine SVR4 from configure script: glibc2.1's utmpx.h is incompatible + with SVR4 + + -- Christian Meder Thu, 26 Nov 1998 15:40:30 +0100 + +screen (3.7.4-9) frozen unstable; urgency=medium + + * Recompile against libncurses4 + * /etc/terminfo/s/screen is now in ncurses-base, so screen doesn't + depend on ncurses-term anymore + + -- Juan Cespedes Wed, 11 Nov 1998 18:17:37 +0100 + +screen (3.7.4-8) stable unstable; urgency=HIGH + + * Fix critical bug #25970: /tmp race problem + + -- Juan Cespedes Thu, 27 Aug 1998 23:08:40 +0200 + +screen (3.7.4-7) unstable; urgency=low + + * Add support for MD5 passwords (Bug#22740, Bug#25487) + + -- Juan Cespedes Fri, 7 Aug 1998 10:40:16 +0200 + +screen (3.7.4-6) unstable; urgency=low + + * Pass SIGWINCH to applications when size changes (fixes:Bug#18471) + + -- Juan Cespedes Sun, 22 Feb 1998 11:16:46 +0100 + +screen (3.7.4-5) unstable; urgency=low + + * Fixed minor bug in debian/rules clean + * `screen' now depends on `ncurses-term', so it doesn't install its + own terminfo entry + * New Standards-Version: 2.4.0.0 + + -- Juan Cespedes Thu, 12 Feb 1998 16:10:22 +0100 + +screen (3.7.4-4) unstable; urgency=low + + * Changed upstream changelog name (ChangeLog.gz -> changelog.gz) + * Changed sockets from /tmp to /var/run (closes:Bug#6487) + * New Standards-Version: 2.3.0.1 + * Changed behaviour of backspace key (now sends `DEL' == 0177) + + -- Juan Cespedes Sun, 4 Jan 1998 21:13:51 +0100 + +screen (3.7.4-3) unstable; urgency=low + + * New maintainer + * New Standards-Version: 2.3.0.0 + * Minor fixes in /usr/doc/screen + * Pristine Source + * Fixed Bug#12626 + + -- Juan Cespedes Sat, 11 Oct 1997 02:14:43 +0200 + +screen (3.7.4-2) unstable; urgency=low + + * Added definition of kend to screeninfo.src. + * Recompiled for libc6. + + -- joost witteveen Fri, 3 Oct 1997 22:18:45 +0200 + +screen (3.7.4-1) unstable; urgency=low + + * Upgraded to upstream version. + * fixed /etc/screenrc problem (used to read: /usr/etc/screenrc). + + -- joost witteveen Sat, 2 Aug 1997 22:26:08 +0200 + +screen (3.7.2-5) unstable; urgency=low + + * Recompiled for libc6 (now should be using libc functions for utmp access) + + -- joost witteveen Thu, 19 Jun 1997 17:48:26 +0200 + +screen (3.7.2-4) unstable; urgency=low + + * After suggestions from David Luyer, increase the number of tty's to 256. + + -- joost witteveen Sun, 4 May 1997 17:25:00 +0200 + +screen (3.7.2-3) stable unstable; urgency=high + + * Security fix for buffer-overrun posted to bugtraq. + + -- joost witteveen Fri, 21 Feb 1997 17:02:30 +0100 + +screen (3.7.2-2) unstable; urgency=low + + * This package contained a /usr/doc/screen/screeninfo.src.gz (compressed) + that is apparently needed by the install phase. uncompressed it. + + -- joost witteveen Tue, 7 Jan 1997 21:22:32 +0100 + +screen (3.7.2-1) unstable; urgency=low + + * Upgraded to upstream version + * converted to new source format + + -- joost witteveen Sat, 4 Jan 1997 11:40:40 +0100 + --- screen-4.0.3.orig/debian/docs +++ screen-4.0.3/debian/docs @@ -0,0 +1,8 @@ +NEWS +README +TODO +doc/FAQ +doc/fdpat.ps +doc/window_to_display.ps +terminfo +debian/README.Debian --- screen-4.0.3.orig/debian/info +++ screen-4.0.3/debian/info @@ -0,0 +1,6 @@ +doc/screen.info +doc/screen.info-1 +doc/screen.info-2 +doc/screen.info-3 +doc/screen.info-4 +doc/screen.info-5 --- screen-4.0.3.orig/debian/control +++ screen-4.0.3/debian/control @@ -0,0 +1,23 @@ +Source: screen +Section: misc +Priority: optional +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Jan Christoph Nordholz +Uploaders: Adam Lazur +Standards-Version: 3.8.2 +Build-Depends: libncursesw5-dev, texinfo, libpam0g-dev, debhelper (>> 7), dpatch +Homepage: http://savannah.gnu.org/projects/screen + +Package: screen +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Suggests: byobu +Description: terminal multiplexor with VT100/ANSI terminal emulation + screen is a terminal multiplexor that runs several separate "screens" on a + single physical character-based terminal. Each virtual terminal emulates a + DEC VT100 plus several ANSI X3.64 and ISO 2022 functions. Screen sessions + can be detached and resumed later on a different terminal. + . + Screen also supports a whole slew of other features. Some of these are: + configurable input and output translation, serial port support, configurable + logging, multi-user support, and utf8 charset support. --- screen-4.0.3.orig/debian/watch +++ screen-4.0.3/debian/watch @@ -0,0 +1,5 @@ +# $Id: watch,v 1.1 2002/07/08 14:07:18 laz Exp $ +version=2 +# This is a variant HTTP format with more possibilities: +# Homepage Pattern [Version [Action]] +opts=pasv ftp://ftp.uni-erlangen.de/pub/utilities/screen/screen-(\d.*)\.tar\.gz --- screen-4.0.3.orig/debian/examples +++ screen-4.0.3/debian/examples @@ -0,0 +1,2 @@ +etc/screenrc +etc/etcscreenrc --- screen-4.0.3.orig/debian/README.terminfo +++ screen-4.0.3/debian/README.terminfo @@ -0,0 +1,5 @@ +Debian uses ncurses/terminfo, not curses/termcap, so you really shouldn't need +the screencap file in this directory. + +The screeninfo.src file is installed by the `ncurses-term' package +-- it's here for reference, and to recover from stupid errors (like?). --- screen-4.0.3.orig/debian/manpages +++ screen-4.0.3/debian/manpages @@ -0,0 +1 @@ +doc/screen.1 --- screen-4.0.3.orig/debian/prerm +++ screen-4.0.3/debian/prerm @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "$1" = remove ] || [ "$1" = deconfigure ]; then + remove-shell /usr/bin/screen || true +fi + +#DEBHELPER# --- screen-4.0.3.orig/debian/rules +++ screen-4.0.3/debian/rules @@ -0,0 +1,99 @@ +#!/usr/bin/make -f +# +# Copyright (C) 1997 joost witteveen +# Copyright (C) 1997-2001 Juan Cespedes +# Copyright (C) 2001 Adam Lazur + +# Uncomment me to turn on debugging +#export DH_VERBOSE=1 + +include /usr/share/dpatch/dpatch.make + +package := screen +ROOT := $(CURDIR)/debian/$(package) +# statically define this... sucko +TTYGROUP := 5 + +ifeq ($(findstring noopt,$(DEB_BUILD_OPTIONS)),noopt) +CC_OPTFLAGS := -O0 -g3 +else +CC_OPTFLAGS := -O2 -g +endif + +clean: unpatch + dh_testdir + dh_testroot + rm -f configure-stamp build-stamp install-stamp + test ! -s doc/Makefile || $(MAKE) -C doc realclean + test ! -s Makefile || ! grep -q clean Makefile || $(MAKE) realclean + rm -f config.log config.status Makefile + dh_clean + +configure: configure-stamp +configure-stamp: patch-stamp + dh_testdir + ./configure --prefix=/usr \ + --infodir='$$(prefix)/share/info' \ + --mandir='$$(prefix)/share/man' \ + --with-socket-dir=/var/run/screen \ + --enable-pam \ + --with-pty-mode=0620 \ + --with-pty-group=${TTYGROUP} \ + --enable-rxvt_osc \ + --with-sys-screenrc=/etc/screenrc \ + --enable-colors256 + # Assert the use of fifos instead of sockets + grep -q "define.*NAMEDPIPE.*1" config.h || echo "#define NAMEDPIPE 1" >> config.h + touch $@ + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + $(MAKE) CFLAGS+='$(CC_OPTFLAGS) -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers' + $(MAKE) CFLAGS+='$(CC_OPTFLAGS) -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers' -C doc + touch $@ + +install: install-stamp +install-stamp: build-stamp + dh_testdir + dh_testroot + dh_clean + dh_installdirs + # can't call the normal install target b/c it installs the info files + # and other crud + $(MAKE) prefix=$(ROOT)/usr SCREENENCODINGS='$$(prefix)/share/screen/utf8encodings' installdirs install_bin + # install the debian screenrc to etc + install -m 644 debian/screenrc $(ROOT)/etc + # hack around the fact that the install target makes screen a symlink to screen-$$(VERSION) + rm -f $(ROOT)/usr/bin/screen + mv -f $(ROOT)/usr/bin/screen* $(ROOT)/usr/bin/screen + # make it setgid utmp + chown root:utmp $(ROOT)/usr/bin/screen + chmod 2755 $(ROOT)/usr/bin/screen + # lintian overrides for the setgid bin etc + install -m 755 -d $(ROOT)/usr/share/lintian/overrides + install -m 644 debian/screen.lintian.overrides $(ROOT)/usr/share/lintian/overrides/screen + touch $@ + +binary: binary-arch +binary-indep: install +binary-arch: install + dh_testdir + dh_testroot + dh_installdocs + cp debian/README.terminfo $(ROOT)/usr/share/doc/screen/terminfo/ + dh_installexamples + dh_installman || true + dh_installinfo + dh_installchangelogs -k patchlevel.h + dh_installinit --no-start -p screen --name screen-cleanup + dh_strip + dh_compress + dh_fixperms -X/usr/bin/screen + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +.PHONY: patch configure build clean binary-indep binary-arch binary install --- screen-4.0.3.orig/debian/screenrc +++ screen-4.0.3/debian/screenrc @@ -0,0 +1,108 @@ +# $Id: screenrc,v 1.15 2003/10/08 11:39:03 zal Exp $ +# +# /etc/screenrc +# +# This is the system wide screenrc. +# +# You can use this file to change the default behavior of screen system wide +# or copy it to ~/.screenrc and use it as a starting point for your own +# settings. +# +# Commands in this file are used to set options, bind screen functions to +# keys, redefine terminal capabilities, and to automatically establish one or +# more windows at the beginning of your screen session. +# +# This is not a comprehensive list of options, look at the screen manual for +# details on everything that you can put in this file. +# + +# ------------------------------------------------------------------------------ +# SCREEN SETTINGS +# ------------------------------------------------------------------------------ + +#startup_message off +#nethack on + +#defflow on # will force screen to process ^S/^Q +deflogin on +#autodetach off + +# turn visual bell on +vbell on +vbell_msg " Wuff ---- Wuff!! " + +# define a bigger scrollback, default is 100 lines +defscrollback 1024 + +# ------------------------------------------------------------------------------ +# SCREEN KEYBINDINGS +# ------------------------------------------------------------------------------ + +# Remove some stupid / dangerous key bindings +bind ^k +#bind L +bind ^\ +# Make them better +bind \\ quit +bind K kill +bind I login on +bind O login off +bind } history + +# An example of a "screen scraper" which will launch urlview on the current +# screen window +# +#bind ^B eval "hardcopy_append off" "hardcopy -h $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview" + +# ------------------------------------------------------------------------------ +# TERMINAL SETTINGS +# ------------------------------------------------------------------------------ + +# The vt100 description does not mention "dl". *sigh* +termcapinfo vt100 dl=5\E[M + +# turn sending of screen messages to hardstatus off +hardstatus off +# Set the hardstatus prop on gui terms to set the titlebar/icon title +termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007 +# use this for the hard status string +hardstatus string "%h%? users: %u%?" + +# An alternative hardstatus to display a bar at the bottom listing the +# windownames and highlighting the current windowname in blue. (This is only +# enabled if there is no hardstatus setting for your terminal) +# +#hardstatus lastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" + +# set these terminals up to be 'optimal' instead of vt100 +termcapinfo xterm*|linux*|rxvt*|Eterm* OP + +# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E> +# (This fixes the "Aborted because of window size change" konsole symptoms found +# in bug #134198) +termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' + +# To get screen to add lines to xterm's scrollback buffer, uncomment the +# following termcapinfo line which tells xterm to use the normal screen buffer +# (which has scrollback), not the alternate screen buffer. +# +#termcapinfo xterm|xterms|xs|rxvt ti@:te@ + +# Enable non-blocking mode to better cope with flaky ssh connections. +defnonblock 5 + +# ------------------------------------------------------------------------------ +# STARTUP SCREENS +# ------------------------------------------------------------------------------ + +# Example of automatically running some programs in windows on screen startup. +# +# The following will open top in the first window, an ssh session to monkey +# in the next window, and then open mutt and tail in windows 8 and 9 +# respectively. +# +# screen top +# screen -t monkey ssh monkey +# screen -t mail 8 mutt +# screen -t daemon 9 tail -f /var/log/daemon.log + --- screen-4.0.3.orig/debian/screen-cleanup.upstart +++ screen-4.0.3/debian/screen-cleanup.upstart @@ -0,0 +1,29 @@ +# screen + +description "GNU Screen Cleanup" +author "Dustin Kirkland " + +start on filesystem + +task + +script + SCREENDIR=/var/run/screen + if [ -L $SCREENDIR ] || [ ! -d $SCREENDIR ]; then + rm -f $SCREENDIR + mkdir $SCREENDIR + chown root:utmp $SCREENDIR + fi + find $SCREENDIR -type p -delete + # If the local admin has used dpkg-statoverride to install the screen + # binary with different set[ug]id bits, change the permissions of + # $SCREENDIR accordingly + BINARYPERM=`stat -c%a /usr/bin/screen` + if [ "$BINARYPERM" -ge 4000 ]; then + chmod 0755 $SCREENDIR + elif [ "$BINARYPERM" -ge 2000 ]; then + chmod 0775 $SCREENDIR + else + chmod 0777 $SCREENDIR + fi +end script --- screen-4.0.3.orig/debian/postrm +++ screen-4.0.3/debian/postrm @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +if [ "$1" = purge ] || [ "$1" = remove ]; then + rm -rf /var/run/screen +fi + +if [ "$1" = disappear ]; then + remove-shell /usr/bin/screen || true +fi + +#DEBHELPER# --- screen-4.0.3.orig/debian/screen.lintian.overrides +++ screen-4.0.3/debian/screen.lintian.overrides @@ -0,0 +1 @@ +screen: setgid-binary usr/bin/screen 2755 root/utmp --- screen-4.0.3.orig/debian/compat +++ screen-4.0.3/debian/compat @@ -0,0 +1 @@ +7 --- screen-4.0.3.orig/debian/dirs +++ screen-4.0.3/debian/dirs @@ -0,0 +1 @@ +etc --- screen-4.0.3.orig/debian/preinst +++ screen-4.0.3/debian/preinst @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +if [ "$1" = upgrade ]; then + if dpkg --compare-versions "$2" lt-nl 4.0.3-7 && \ + dpkg --compare-versions "$2" gt 4.0.3-3; then + if ! test -L /tmp/.screen && test -d /tmp/.screen && test -n "`find /tmp/.screen -type p 2>/dev/null`"; then + ln -s /tmp/.screen /var/run/screen + fi + fi +fi + +#DEBHELPER# --- screen-4.0.3.orig/debian/postinst +++ screen-4.0.3/debian/postinst @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +if [ "$1" = configure ]; then + if ! test -d /var/run/screen; then + install -g utmp -m 0775 -d /var/run/screen + [ `stat -c%a /usr/bin/screen` -lt 4000 ] || chmod 0755 /var/run/screen + fi + add-shell /usr/bin/screen || true +fi + +#DEBHELPER# --- screen-4.0.3.orig/debian/patches/01CVS.dpatch +++ screen-4.0.3/debian/patches/01CVS.dpatch @@ -0,0 +1,5169 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01CVS.dpatch by +## +## DP: Diff between 4.0.3 and CVS HEAD (checked out on 2008/06/01). + +@DPATCH@ +diff -Naur screen-4.0.3.orig/Makefile.in screen-4.0.3/Makefile.in +--- screen-4.0.3.orig/Makefile.in 2006-10-23 15:06:32.000000000 +0200 ++++ screen-4.0.3/Makefile.in 2008-06-01 23:39:31.000000000 +0200 +@@ -78,7 +78,7 @@ + # This doesn't work if $(bindir)/screen is a symlink + -if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi + rm -f $(DESTDIR)$(bindir)/screen +- (cd $(DESTDIR)$(bindir) && ln -sf $(SCREEN) screen) ++ (cd $(DESTDIR)$(bindir) && ln -f -s $(SCREEN) screen) + cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS) + + ############################################################################### +diff -Naur screen-4.0.3.orig/NEWS screen-4.0.3/NEWS +--- screen-4.0.3.orig/NEWS 2003-07-21 20:04:05.000000000 +0200 ++++ screen-4.0.3/NEWS 2008-06-01 23:39:31.000000000 +0200 +@@ -1,4 +1,18 @@ + ------------------------------ ++ What's new in screen-4.0.3 ? ++ ------------------------------ ++ ++* zombie command has new option 'onerror' ++ ++* buffer overflow in resize.c fixed ++ ++* minor docu update ++ ++* more robust startup ++ ++* use setresuid; SendAttachMsg() for fd-passing added; DoCSI enhanced. ++ ++ ------------------------------ + What's new in screen-4.0.0 ? + ------------------------------ + +diff -Naur screen-4.0.3.orig/ansi.c screen-4.0.3/ansi.c +--- screen-4.0.3.orig/ansi.c 2003-12-05 14:57:05.000000000 +0100 ++++ screen-4.0.3/ansi.c 2008-06-01 23:39:31.000000000 +0200 +@@ -1225,18 +1225,42 @@ + SaveCursor(); + break; + case 't': +- if (a1 != 8) +- break; +- a1 = curr->w_args[2]; +- if (a1 < 1) +- a1 = curr->w_width; +- if (a2 < 1) +- a2 = curr->w_height; +- if (a1 > 10000 || a2 > 10000) +- break; +- WChangeSize(curr, a1, a2); +- cols = curr->w_width; +- rows = curr->w_height; ++ switch(a1) ++ { ++ case 11: ++ if (curr->w_layer.l_cvlist) ++ Report("\033[1t", 0, 0); ++ else ++ Report("\033[2t", 0, 0); ++ break; ++ case 7: ++ LRefreshAll(&curr->w_layer, 0); ++ break; ++ case 21: ++ a1 = strlen(curr->w_title); ++ if ((unsigned)(curr->w_inlen + 5 + a1) <= sizeof(curr->w_inbuf)) ++ { ++ bcopy("\033]l", curr->w_inbuf + curr->w_inlen, 3); ++ bcopy(curr->w_title, curr->w_inbuf + curr->w_inlen + 3, a1); ++ bcopy("\033\\", curr->w_inbuf + curr->w_inlen + 3 + a1, 2); ++ curr->w_inlen += 5 + a1; ++ } ++ break; ++ case 8: ++ a1 = curr->w_args[2]; ++ if (a1 < 1) ++ a1 = curr->w_width; ++ if (a2 < 1) ++ a2 = curr->w_height; ++ if (a1 > 10000 || a2 > 10000) ++ break; ++ WChangeSize(curr, a1, a2); ++ cols = curr->w_width; ++ rows = curr->w_height; ++ break; ++ default: ++ break; ++ } + break; + case 'u': + RestoreCursor(); +diff -Naur screen-4.0.3.orig/ansi.h screen-4.0.3/ansi.h +--- screen-4.0.3.orig/ansi.h 2003-02-24 17:55:08.000000000 +0100 ++++ screen-4.0.3/ansi.h 2008-06-01 23:39:31.000000000 +0200 +@@ -19,7 +19,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: ansi.h,v 1.6 1994/05/31 12:31:28 mlschroe Exp $ FAU ++ * $Id: ansi.h,v 1.28 2005/12/16 18:51:07 jnweiger Exp $ FAU + */ + + #define NATTR 6 +diff -Naur screen-4.0.3.orig/attacher.c screen-4.0.3/attacher.c +--- screen-4.0.3.orig/attacher.c 2003-09-08 16:24:48.000000000 +0200 ++++ screen-4.0.3/attacher.c 2008-06-01 23:39:31.000000000 +0200 +@@ -57,7 +57,7 @@ + extern int xflag, dflag, rflag, quietflag, adaptflag; + extern struct mode attach_Mode; + extern struct NewWindow nwin_options; +-extern int MasterPid; ++extern int MasterPid, attach_fd; + + #ifdef MULTIUSER + extern char *multi; +@@ -87,6 +87,9 @@ + * returns 1 if we could attach one, or 0 if none. + * Understands MSG_ATTACH, MSG_DETACH, MSG_POW_DETACH + * MSG_CONT, MSG_WINCH and nothing else! ++ * ++ * if type == MSG_ATTACH and sockets are used, attaches ++ * tty filedescriptor. + */ + + static int +@@ -96,6 +99,11 @@ + { + int r, l = sizeof(*m); + ++#ifndef NAMEDPIPE ++ if (m->type == MSG_ATTACH) ++ return SendAttachMsg(s, m, attach_fd); ++#endif ++ + while(l > 0) + { + r = write(s, (char *)m + (sizeof(*m) - l), l); +@@ -184,8 +192,13 @@ + { + real_uid = multi_uid; + eff_uid = own_uid; ++#ifdef HAVE_SETRESUID ++ if (setresuid(multi_uid, own_uid, multi_uid)) ++ Panic(errno, "setresuid"); ++#else + xseteuid(multi_uid); + xseteuid(own_uid); ++#endif + if (chmod(attach_tty, 0666)) + Panic(errno, "chmod %s", attach_tty); + tty_oldmode = tty_mode; +diff -Naur screen-4.0.3.orig/braille.h screen-4.0.3/braille.h +--- screen-4.0.3.orig/braille.h 2001-04-28 15:26:42.000000000 +0200 ++++ screen-4.0.3/braille.h 2008-06-01 23:39:31.000000000 +0200 +@@ -22,7 +22,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: braille.h,v 1.1 1995/09/06 15:51:18 jnweiger Exp jnweiger $ FAU ++ * $Id: braille.h,v 1.12 2005/12/16 18:51:07 jnweiger Exp $ FAU + */ + + #ifdef HAVE_BRAILLE +diff -Naur screen-4.0.3.orig/comm.c screen-4.0.3/comm.c +--- screen-4.0.3.orig/comm.c 2003-09-08 16:25:08.000000000 +0200 ++++ screen-4.0.3/comm.c 2008-06-01 23:39:31.000000000 +0200 +@@ -183,7 +183,9 @@ + { "fit", NEED_DISPLAY|ARGS_0 }, + { "flow", NEED_FORE|ARGS_01 }, + { "focus", NEED_DISPLAY|ARGS_01 }, ++ { "focusminsize", ARGS_02 }, + { "gr", NEED_FORE|ARGS_01 }, ++ { "group", NEED_FORE|ARGS_01 }, + { "hardcopy", ARGS_012 }, + { "hardcopy_append", ARGS_1 }, + { "hardcopydir", ARGS_01 }, +@@ -202,6 +204,7 @@ + #endif + { "kill", NEED_FORE|ARGS_0 }, + { "lastmsg", NEED_DISPLAY|ARGS_0 }, ++ { "layout", ARGS_1|ARGS_ORMORE}, + { "license", NEED_LAYER|ARGS_0 }, + #ifdef LOCK + { "lockscreen", NEED_DISPLAY|ARGS_0 }, +@@ -267,7 +270,7 @@ + { "removebuf", ARGS_0 }, + #endif + { "reset", NEED_FORE|ARGS_0 }, +- { "resize", NEED_DISPLAY|ARGS_01 }, ++ { "resize", NEED_DISPLAY|ARGS_0|ARGS_ORMORE }, + { "screen", ARGS_0|ARGS_ORMORE }, + #ifdef COPY_PASTE + { "scrollback", NEED_FORE|ARGS_1 }, +@@ -284,7 +287,7 @@ + { "slowpaste", NEED_FORE|ARGS_01 }, + { "sorendition", ARGS_012 }, + { "source", ARGS_1 }, +- { "split", NEED_DISPLAY|ARGS_0 }, ++ { "split", NEED_DISPLAY|ARGS_01 }, + { "startup_message", ARGS_1 }, + { "stuff", NEED_LAYER|ARGS_12 }, + #ifdef MULTIUSER +@@ -311,7 +314,7 @@ + { "version", ARGS_0 }, + { "wall", NEED_DISPLAY|ARGS_1}, + { "width", ARGS_0123 }, +- { "windowlist", NEED_DISPLAY|ARGS_012 }, ++ { "windowlist", ARGS_012 }, + { "windows", NEED_DISPLAY|ARGS_0 }, + { "wrap", NEED_FORE|ARGS_01 }, + #ifdef COPY_PASTE +@@ -323,5 +326,5 @@ + #ifdef ZMODEM + { "zmodem", ARGS_012 }, + #endif +- { "zombie", ARGS_01 } ++ { "zombie", ARGS_012 } + }; +diff -Naur screen-4.0.3.orig/config.h.in screen-4.0.3/config.h.in +--- screen-4.0.3.orig/config.h.in 2006-10-23 15:06:32.000000000 +0200 ++++ screen-4.0.3/config.h.in 2008-06-01 23:39:31.000000000 +0200 +@@ -19,7 +19,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: config.h.in,v 1.12 1994/05/31 12:31:36 mlschroe Exp $ FAU ++ * $Id: config.h.in,v 1.26 2005/12/19 16:13:08 jnweiger Exp $ FAU + */ + + +@@ -458,6 +458,7 @@ + * define HAVE_SETREUID. Otherwise screen will use a forked process to + * safely create output files without retaining any special privileges. + */ ++#undef HAVE_SETRESUID + #undef HAVE_SETREUID + + /* +diff -Naur screen-4.0.3.orig/configure screen-4.0.3/configure +--- screen-4.0.3.orig/configure 2003-12-05 14:46:53.000000000 +0100 ++++ screen-4.0.3/configure 2008-06-01 23:39:31.000000000 +0200 +@@ -3911,7 +3911,7 @@ + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-#if defined(SVR4) && defined(sun) ++#if defined(__SVR4) && defined(__sun) + yes + #endif + +@@ -4042,7 +4042,7 @@ + main () + { + +-#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news) ++#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(__sun) && defined(__SVR4)) || defined(ISC) || defined(sony_news) + seteuid_is_broken(0); + #else + seteuid(0); +@@ -5572,7 +5572,7 @@ + + #include /* to get time_t on SCO */ + #include +-#if defined(SVR4) && !defined(DGUX) ++#if defined(__SVR4) && !defined(DGUX) + #include + #define utmp utmpx + #else +@@ -5624,7 +5624,7 @@ + + #include + #include +-#if defined(SVR4) && !defined(DGUX) ++#if defined(__SVR4) && !defined(DGUX) + #include + #define utmp utmpx + #else +@@ -5680,7 +5680,7 @@ + + #include + #include +-#if defined(SVR4) && !defined(DGUX) ++#if defined(__SVR4) && !defined(DGUX) + #include + #define utmp utmpx + #else +@@ -6316,7 +6316,7 @@ + + _CUT_HERE_ + +-#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || (defined(SVR4) && !defined(__hpux)) || defined(sony_news) || (!defined(__osf__) && defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k)) ++#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) && !defined(__hpux)) || defined(__sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || (defined(__SVR4) && !defined(__hpux)) || defined(sony_news) || (!defined(__osf__) && defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k)) + loadtype=long + # if defined(apollo) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) + loadscale=65536 +@@ -6329,7 +6329,7 @@ + loadtype=int + loadscale=1024 + # else +-# if defined(MIPS) || defined(SVR4) || defined(m88k) ++# if defined(MIPS) || defined(__SVR4) || defined(m88k) + loadscale=256 + # else /* not MIPS */ + loadscale=1000 /* our default value */ +diff -Naur screen-4.0.3.orig/configure.in screen-4.0.3/configure.in +--- screen-4.0.3.orig/configure.in 2003-06-03 13:58:24.000000000 +0200 ++++ screen-4.0.3/configure.in 2008-06-01 23:39:31.000000000 +0200 +@@ -1,11 +1,11 @@ + dnl Process this file with autoconf to produce a configure script. + dnl +-dnl $Id: configure.in,v 1.18 1994/09/06 16:59:54 mlschroe Exp $ FAU ++dnl $Id: configure.in,v 1.27 2006/05/02 12:58:25 mls Exp $ FAU + dnl + dnl Many thanks to David MacKenzie for writing autoconf and + dnl providing a sample configure.in file for screen. + dnl +-AC_REVISION($Revision: 1.18 $)dnl ++AC_REVISION($Revision: 1.27 $)dnl + AC_INIT(screen.c) + AC_CONFIG_HEADER(config.h) + +@@ -93,7 +93,12 @@ + AC_MSG_RESULT(yes) + AC_MSG_CHECKING(for the socket dir) + SOCKDIR="(eff_uid ? \"/tmp/uscreens\" : \"/tmp/screens\")" +- AC_ARG_WITH(socket-dir, [ --with-socket-dir=path where to put the per-user sockets], [ SOCKDIR="\"${withval}\"" ]) ++ AC_ARG_WITH(socket-dir, [ --with-socket-dir=path where to put the per-user sockets], [ ++ case "${withval}" in ++ *\"*) SOCKDIR="${withval}" ;; ++ *) SOCKDIR="\"${withval}\"" ;; ++ esac ++ ]) + AC_MSG_RESULT(${SOCKDIR}) + AC_DEFINE_UNQUOTED(SOCKDIR, $SOCKDIR) + ] +@@ -252,15 +257,15 @@ + ], AC_NOTE(- you have jobcontrol) AC_DEFINE(BSDJOBS), AC_NOTE(- you don't have jobcontrol)) + + dnl +-dnl **** setreuid(), seteuid() **** ++dnl **** setresuid(), setreuid(), seteuid() **** + dnl +-AC_CHECKING(setreuid) ++AC_CHECKING(setresuid) + AC_TRY_LINK(,[ +-#ifdef __hpux + setresuid(0, 0, 0); +-#else ++], AC_DEFINE(HAVE_SETRESUID)) ++AC_CHECKING(setreuid) ++AC_TRY_LINK(,[ + setreuid(0, 0); +-#endif + ], AC_DEFINE(HAVE_SETREUID)) + dnl + dnl seteuid() check: +@@ -518,8 +523,7 @@ + elif test -n "$fifobr"; then + AC_NOTE(- as your fifos are broken lets use the sockets.) + else +- AC_NOTE(- both sockets and fifos usable. let's take fifos.) +- AC_DEFINE(NAMEDPIPE) ++ AC_NOTE(- both sockets and fifos usable. let's take sockets.) + fi + else + AC_NOTE(- using named pipes, of course) +diff -Naur screen-4.0.3.orig/display.c screen-4.0.3/display.c +--- screen-4.0.3.orig/display.c 2003-12-05 14:45:41.000000000 +0100 ++++ screen-4.0.3/display.c 2008-06-01 23:39:31.000000000 +0200 +@@ -60,6 +60,8 @@ + #ifdef COLOR + static void SetBackColor __P((int)); + #endif ++static void FreePerp __P((struct canvas *)); ++static struct canvas *AddPerp __P((struct canvas *)); + + + extern struct layer *flayer; +@@ -121,6 +123,8 @@ + int captionalways; + int hardstatusemu = HSTATUS_IGNORE; + ++int focusminwidth, focusminheight; ++ + /* + * Default layer management + */ +@@ -312,7 +316,6 @@ + FreeDisplay() + { + struct win *p; +- struct canvas *cv, *cvp; + #ifdef MULTI + struct display *d, **dp; + #endif +@@ -379,15 +382,16 @@ + if (D_obuf) + free(D_obuf); + *dp = display->d_next; +- cv = display->d_cvlist; + #else /* MULTI */ + ASSERT(display == displays); + ASSERT(display == &TheDisplay); +- cv = display->d_cvlist; +- display->d_cvlist = 0; + displays = 0; + #endif /* MULTI */ + ++ while (D_canvas.c_slperp) ++ FreeCanvas(D_canvas.c_slperp); ++ D_cvlist = 0; ++ + for (p = windows; p; p = p->w_next) + { + if (p->w_pdisplay == display) +@@ -397,11 +401,6 @@ + if (p->w_readev.condneg == &D_status || p->w_readev.condneg == &D_obuflenmax) + p->w_readev.condpos = p->w_readev.condneg = 0; + } +- for (; cv; cv = cvp) +- { +- cvp = cv->c_next; +- FreeCanvas(cv); +- } + #ifdef ZMODEM + for (p = windows; p; p = p->w_next) + if (p->w_zdisplay == display) +@@ -425,11 +424,23 @@ + cv->c_xe = D_width - 1; + cv->c_ys = 0; + cv->c_ye = D_height - 1 - (D_has_hstatus == HSTATUS_LASTLINE) - captionalways; ++ debug2("MakeDefaultCanvas 0,0 %d,%d\n", cv->c_xe, cv->c_ye); + cv->c_xoff = 0; + cv->c_yoff = 0; + cv->c_next = 0; + cv->c_display = display; + cv->c_vplist = 0; ++ cv->c_slnext = 0; ++ cv->c_slprev = 0; ++ cv->c_slperp = 0; ++ cv->c_slweight = 1; ++ cv->c_slback = &D_canvas; ++ D_canvas.c_slperp = cv; ++ D_canvas.c_xs = cv->c_xs; ++ D_canvas.c_xe = cv->c_xe; ++ D_canvas.c_ys = cv->c_ys; ++ D_canvas.c_ye = cv->c_ye; ++ cv->c_slorient = SLICE_UNKN; + cv->c_captev.type = EV_TIMEOUT; + cv->c_captev.data = (char *)cv; + cv->c_captev.handler = cv_winid_fn; +@@ -452,14 +463,68 @@ + return 0; + } + ++static struct canvas ** ++CreateCanvasChainRec(cv, cvp) ++struct canvas *cv; ++struct canvas **cvp; ++{ ++ for (; cv; cv = cv->c_slnext) ++ { ++ if (cv->c_slperp) ++ cvp = CreateCanvasChainRec(cv->c_slperp, cvp); ++ else ++ { ++ *cvp = cv; ++ cvp = &cv->c_next; ++ } ++ } ++ return cvp; ++} ++ ++void ++RecreateCanvasChain() ++{ ++ struct canvas **cvp; ++ cvp = CreateCanvasChainRec(D_canvas.c_slperp, &D_cvlist); ++ *cvp = 0; ++} ++ + static void + FreeCanvas(cv) + struct canvas *cv; + { + struct viewport *vp, *nvp; ++ struct canvas **cvp; + struct win *p; + +- p = Layer2Window(cv->c_layer); ++ if (cv->c_slprev) ++ cv->c_slprev->c_slnext = cv->c_slnext; ++ if (cv->c_slnext) ++ cv->c_slnext->c_slprev = cv->c_slprev; ++ if (cv->c_slback && cv->c_slback->c_slperp == cv) ++ cv->c_slback->c_slperp = cv->c_slnext; ++ if (cv->c_slperp) ++ { ++ while (cv->c_slperp) ++ FreeCanvas(cv->c_slperp); ++ free(cv); ++ return; ++ } ++ ++ if (display) ++ { ++ if (D_forecv == cv) ++ D_forecv = 0; ++ /* remove from canvas chain as SetCanvasWindow might call ++ * some layer function */ ++ for (cvp = &D_cvlist; *cvp ; cvp = &(*cvp)->c_next) ++ if (*cvp == cv) ++ { ++ *cvp = cv->c_next; ++ break; ++ } ++ } ++ p = cv->c_layer ? Layer2Window(cv->c_layer) : 0; + SetCanvasWindow(cv, 0); + if (p) + WindowChanged(p, 'u'); +@@ -477,31 +542,371 @@ + } + + int +-AddCanvas() ++CountCanvas(cv) ++struct canvas *cv; ++{ ++ int num = 0; ++ for (; cv; cv = cv->c_slnext) ++ { ++ if (cv->c_slperp) ++ { ++ struct canvas *cvp; ++ int nump = 1, n; ++ for (cvp = cv->c_slperp; cvp; cvp = cvp->c_slnext) ++ if (cvp->c_slperp) ++ { ++ n = CountCanvas(cvp->c_slperp); ++ if (n > nump) ++ nump = n; ++ } ++ num += nump; ++ } ++ else ++ num++; ++ } ++ return num; ++} ++ ++int ++CountCanvasPerp(cv) ++struct canvas *cv; + { +- int hh, h, i, j; +- struct canvas *cv, **cvpp; ++ struct canvas *cvp; ++ int num = 1, n; ++ for (cvp = cv->c_slperp; cvp; cvp = cvp->c_slnext) ++ if (cvp->c_slperp) ++ { ++ n = CountCanvas(cvp->c_slperp); ++ if (n > num) ++ num = n; ++ } ++ return num; ++} + +- for (cv = D_cvlist, j = 0; cv; cv = cv->c_next) +- j++; +- j++; /* new canvas */ +- h = D_height - (D_has_hstatus == HSTATUS_LASTLINE); +- if (h / j <= 1) +- return -1; ++void ++EqualizeCanvas(cv, gflag) ++struct canvas *cv; ++int gflag; ++{ ++ struct canvas *cv2; ++ for (; cv; cv = cv->c_slnext) ++ { ++ if (cv->c_slperp && gflag) ++ { ++ cv->c_slweight = CountCanvasPerp(cv); ++ for (cv2 = cv->c_slperp; cv2; cv2 = cv2->c_slnext) ++ if (cv2->c_slperp) ++ EqualizeCanvas(cv2->c_slperp, gflag); ++ } ++ else ++ cv->c_slweight = 1; ++ } ++} + +- for (cv = D_cvlist; cv; cv = cv->c_next) +- if (cv == D_forecv) +- break; +- ASSERT(cv); +- cvpp = &cv->c_next; ++void ++ResizeCanvas(cv) ++struct canvas *cv; ++{ ++ struct canvas *cv2, *cvn, *fcv; ++ int nh, i, maxi, hh, m, w, wsum; ++ int need, got; ++ int xs, ys, xe, ye; ++ int focusmin = 0; ++ ++ xs = cv->c_xs; ++ ys = cv->c_ys; ++ xe = cv->c_xe; ++ ye = cv->c_ye; ++ cv = cv->c_slperp; ++ debug2("ResizeCanvas: %d,%d", xs, ys); ++ debug2(" %d,%d\n", xe, ye); ++ if (cv == 0) ++ return; ++ if (cv->c_slorient == SLICE_UNKN) ++ { ++ ASSERT(!cv->c_slnext && !cv->c_slperp); ++ cv->c_xs = xs; ++ cv->c_xe = xe; ++ cv->c_ys = ys; ++ cv->c_ye = ye; ++ cv->c_xoff = cv->c_xs; ++ cv->c_yoff = cv->c_ys; ++ return; ++ } ++ ++ fcv = 0; ++ if (focusminwidth || focusminheight) ++ { ++ debug("searching for focus canvas\n"); ++ cv2 = D_forecv; ++ while (cv2->c_slback) ++ { ++ if (cv2->c_slback == cv->c_slback) ++ { ++ fcv = cv2; ++ focusmin = cv->c_slorient == SLICE_VERT ? focusminheight : focusminwidth; ++ if (focusmin > 0) ++ focusmin--; ++ else if (focusmin < 0) ++ focusmin = cv->c_slorient == SLICE_VERT ? ye - ys + 2 : xe - xs + 2; ++ debug1("found, focusmin=%d\n", focusmin); ++ } ++ cv2 = cv2->c_slback; ++ } ++ } ++ if (focusmin) ++ { ++ m = CountCanvas(cv) * 2; ++ nh = cv->c_slorient == SLICE_VERT ? ye - ys + 2 : xe - xs + 2; ++ nh -= m; ++ if (nh < 0) ++ nh = 0; ++ if (focusmin > nh) ++ focusmin = nh; ++ debug1("corrected to %d\n", focusmin); ++ } ++ ++ /* pass 1: calculate weight sum */ ++ for (cv2 = cv, wsum = 0; cv2; cv2 = cv2->c_slnext) ++ { ++ debug1(" weight %d\n", cv2->c_slweight); ++ wsum += cv2->c_slweight; ++ } ++ debug1("wsum = %d\n", wsum); ++ if (wsum == 0) ++ wsum = 1; ++ w = wsum; ++ ++ /* pass 2: calculate need/excess space */ ++ nh = cv->c_slorient == SLICE_VERT ? ye - ys + 2 : xe - xs + 2; ++ for (cv2 = cv, need = got = 0; cv2; cv2 = cv2->c_slnext) ++ { ++ m = cv2->c_slperp ? CountCanvasPerp(cv2) * 2 - 1 : 1; ++ if (cv2 == fcv) ++ m += focusmin; ++ hh = cv2->c_slweight ? nh * cv2->c_slweight / w : 0; ++ w -= cv2->c_slweight; ++ nh -= hh; ++ debug2(" should %d min %d\n", hh, m); ++ if (hh <= m + 1) ++ need += m + 1 - hh; ++ else ++ got += hh - m - 1; ++ } ++ debug2("need: %d, got %d\n", need, got); ++ if (need > got) ++ need = got; ++ ++ /* pass 3: distribute space */ ++ nh = cv->c_slorient == SLICE_VERT ? ye - ys + 2 : xe - xs + 2; ++ i = cv->c_slorient == SLICE_VERT ? ys : xs; ++ maxi = cv->c_slorient == SLICE_VERT ? ye : xe; ++ w = wsum; ++ for (; cv; cv = cvn) ++ { ++ cvn = cv->c_slnext; ++ if (i > maxi) ++ { ++ if (cv->c_slprev && !cv->c_slback->c_slback && !cv->c_slprev->c_slperp && !cv->c_slprev->c_slprev) ++ { ++ cv->c_slprev->c_slorient = SLICE_UNKN; ++ if (!captionalways) ++ { ++ cv->c_slback->c_ye++; ++ cv->c_slprev->c_ye++; ++ } ++ } ++ SetCanvasWindow(cv, 0); ++ FreeCanvas(cv); ++ continue; ++ } ++ m = cv->c_slperp ? CountCanvasPerp(cv) * 2 - 1 : 1; ++ if (cv == fcv) ++ m += focusmin; ++ hh = cv->c_slweight ? nh * cv->c_slweight / w : 0; ++ w -= cv->c_slweight; ++ nh -= hh; ++ debug2(" should %d min %d\n", hh, m); ++ if (hh <= m + 1) ++ { ++ hh = m + 1; ++ debug1(" -> %d\n", hh); ++ } ++ else ++ { ++ int hx = need * (hh - m - 1) / got; ++ debug3(" -> %d - %d = %d\n", hh, hx, hh - hx); ++ got -= (hh - m - 1); ++ hh -= hx; ++ need -= hx; ++ debug2(" now need=%d got=%d\n", need, got); ++ } ++ ASSERT(hh >= m + 1); ++ /* hh is window size plus pation line */ ++ if (i + hh > maxi + 2) ++ { ++ hh = maxi + 2 - i; ++ debug1(" not enough space, reducing to %d\n", hh); ++ } ++ if (i + hh == maxi + 1) ++ { ++ hh++; ++ debug(" incrementing as no other canvas will fit\n"); ++ } ++ if (cv->c_slorient == SLICE_VERT) ++ { ++ cv->c_xs = xs; ++ cv->c_xe = xe; ++ cv->c_ys = i; ++ cv->c_ye = i + hh - 2; ++ cv->c_xoff = xs; ++ cv->c_yoff = i; ++ } ++ else ++ { ++ cv->c_xs = i; ++ cv->c_xe = i + hh - 2; ++ cv->c_ys = ys; ++ cv->c_ye = ye; ++ cv->c_xoff = i; ++ cv->c_yoff = ys; ++ } ++ cv->c_xoff = cv->c_xs; ++ cv->c_yoff = cv->c_ys; ++ if (cv->c_slperp) ++ { ++ ResizeCanvas(cv); ++ if (!cv->c_slperp->c_slnext) ++ { ++ debug("deleting perp node\n"); ++ FreePerp(cv->c_slperp); ++ FreePerp(cv); ++ } ++ } ++ i += hh; ++ } ++} ++ ++static struct canvas * ++AddPerp(cv) ++struct canvas *cv; ++{ ++ struct canvas *pcv; ++ debug("Creating new perp node\n"); ++ if ((pcv = (struct canvas *)calloc(1, sizeof *cv)) == 0) ++ return 0; ++ pcv->c_next = 0; ++ pcv->c_display = cv->c_display; ++ pcv->c_slnext = cv->c_slnext; ++ pcv->c_slprev = cv->c_slprev; ++ pcv->c_slperp = cv; ++ pcv->c_slback = cv->c_slback; ++ if (cv->c_slback && cv->c_slback->c_slperp == cv) ++ cv->c_slback->c_slperp = pcv; ++ pcv->c_slorient = cv->c_slorient; ++ pcv->c_xoff = 0; ++ pcv->c_yoff = 0; ++ pcv->c_xs = cv->c_xs; ++ pcv->c_xe = cv->c_xe; ++ pcv->c_ys = cv->c_ys; ++ pcv->c_ye = cv->c_ye; ++ if (pcv->c_slnext) ++ pcv->c_slnext->c_slprev = pcv; ++ if (pcv->c_slprev) ++ pcv->c_slprev->c_slnext = pcv; ++ pcv->c_slweight = cv->c_slweight; ++ cv->c_slweight = 1; ++ cv->c_slnext = 0; ++ cv->c_slprev = 0; ++ cv->c_slperp = 0; ++ cv->c_slback = pcv; ++ cv->c_slorient = SLICE_UNKN; ++ return pcv; ++} ++ ++static void ++FreePerp(pcv) ++struct canvas *pcv; ++{ ++ struct canvas *cv; ++ ++ if (!pcv->c_slperp) ++ return; ++ cv = pcv->c_slperp; ++ cv->c_slprev = pcv->c_slprev; ++ if (cv->c_slprev) ++ cv->c_slprev->c_slnext = cv; ++ cv->c_slback = pcv->c_slback; ++ if (cv->c_slback && cv->c_slback->c_slperp == pcv) ++ cv->c_slback->c_slperp = cv; ++ cv->c_slorient = pcv->c_slorient; ++ cv->c_slweight = pcv->c_slweight; ++ while (cv->c_slnext) ++ { ++ cv = cv->c_slnext; ++ cv->c_slorient = pcv->c_slorient; ++ cv->c_slback = pcv->c_slback; ++ cv->c_slweight = pcv->c_slweight; ++ } ++ cv->c_slnext = pcv->c_slnext; ++ if (cv->c_slnext) ++ cv->c_slnext->c_slprev = cv; ++ free(pcv); ++} ++ ++int ++AddCanvas(orient) ++int orient; ++{ ++ struct canvas *cv; ++ int xs, xe, ys, ye; ++ int h, num; ++ ++ cv = D_forecv; ++ debug2("AddCanvas orient %d, forecv is %d\n", orient, cv->c_slorient); ++ ++ if (cv->c_slorient != SLICE_UNKN && cv->c_slorient != orient) ++ if (!AddPerp(cv)) ++ return -1; ++ ++ cv = D_forecv; ++ xs = cv->c_slback->c_xs; ++ xe = cv->c_slback->c_xe; ++ ys = cv->c_slback->c_ys; ++ ye = cv->c_slback->c_ye; ++ if (!captionalways && cv == D_canvas.c_slperp && !cv->c_slnext) ++ ye--; /* need space for caption */ ++ debug2("Adding Canvas to slice %d,%d ", xs, ys); ++ debug2("%d,%d\n", xe, ye); ++ ++ num = CountCanvas(cv->c_slback->c_slperp) + 1; ++ debug1("Num = %d\n", num); ++ if (orient == SLICE_VERT) ++ h = ye - ys + 1; ++ else ++ h = xe - xs + 1; ++ ++ h -= 2 * num - 1; ++ if (h < 0) ++ return -1; /* can't fit in */ + + if ((cv = (struct canvas *)calloc(1, sizeof *cv)) == 0) + return -1; + +- cv->c_xs = 0; +- cv->c_xe = D_width - 1; +- cv->c_ys = 0; +- cv->c_ye = D_height - 1; ++ D_forecv->c_slback->c_ye = ye; /* in case we modified it above */ ++ D_forecv->c_slorient = orient; /* in case it was UNKN */ ++ cv->c_slnext = D_forecv->c_slnext; ++ cv->c_slprev = D_forecv; ++ D_forecv->c_slnext = cv; ++ if (cv->c_slnext) ++ cv->c_slnext->c_slprev = cv; ++ cv->c_slorient = orient; ++ cv->c_slback = D_forecv->c_slback; ++ ++ cv->c_xs = xs; ++ cv->c_xe = xe; ++ cv->c_ys = ys; ++ cv->c_ye = ye; + cv->c_xoff = 0; + cv->c_yoff = 0; + cv->c_display = display; +@@ -522,20 +927,12 @@ + cv->c_layer = &cv->c_blank; + cv->c_lnext = 0; + +- cv->c_next = *cvpp; +- *cvpp = cv; +- +- i = 0; +- for (cv = D_cvlist; cv; cv = cv->c_next) +- { +- hh = h / j-- - 1; +- cv->c_ys = i; +- cv->c_ye = i + hh - 1; +- cv->c_yoff = i; +- i += hh + 1; +- h -= hh + 1; +- } ++ cv->c_next = 0; + ++ cv = cv->c_slback; ++ EqualizeCanvas(cv->c_slperp, 0); ++ ResizeCanvas(cv); ++ RecreateCanvasChain(); + RethinkDisplayViewports(); + ResizeLayersToCanvases(); + return 0; +@@ -544,40 +941,55 @@ + void + RemCanvas() + { +- int hh, h, i, j; +- struct canvas *cv, **cvpp; +- int did = 0; +- +- h = D_height - (D_has_hstatus == HSTATUS_LASTLINE); +- for (cv = D_cvlist, j = 0; cv; cv = cv->c_next) +- j++; +- if (j == 1) +- return; +- i = 0; +- j--; +- for (cvpp = &D_cvlist; (cv = *cvpp); cvpp = &cv->c_next) ++ int xs, xe, ys, ye; ++ struct canvas *cv; ++ ++ debug("RemCanvas\n"); ++ cv = D_forecv; ++ if (cv->c_slorient == SLICE_UNKN) ++ return; ++ while (cv->c_slprev) ++ cv = cv->c_slprev; ++ if (!cv->c_slnext) ++ return; ++ if (!cv->c_slnext->c_slnext && cv->c_slback->c_slback) + { +- if (cv == D_forecv && !did) +- { +- *cvpp = cv->c_next; +- FreeCanvas(cv); +- cv = *cvpp; +- D_forecv = cv ? cv : D_cvlist; +- D_fore = Layer2Window(D_forecv->c_layer); +- flayer = D_forecv->c_layer; +- if (cv == 0) +- break; +- did = 1; +- } +- hh = h / j-- - 1; +- if (!captionalways && i == 0 && j == 0) +- hh++; +- cv->c_ys = i; +- cv->c_ye = i + hh - 1; +- cv->c_yoff = i; +- i += hh + 1; +- h -= hh + 1; +- } ++ /* two canvases in slice, kill perp node */ ++ cv = D_forecv; ++ debug("deleting perp node\n"); ++ FreePerp(cv->c_slprev ? cv->c_slprev : cv->c_slnext); ++ FreePerp(cv->c_slback); ++ } ++ xs = cv->c_slback->c_xs; ++ xe = cv->c_slback->c_xe; ++ ys = cv->c_slback->c_ys; ++ ye = cv->c_slback->c_ye; ++ /* free canvas */ ++ cv = D_forecv; ++ D_forecv = cv->c_slprev; ++ if (!D_forecv) ++ D_forecv = cv->c_slnext; ++ FreeCanvas(cv); ++ ++ cv = D_forecv; ++ while (D_forecv->c_slperp) ++ D_forecv = D_forecv->c_slperp; ++ ++ /* if only one canvas left, set orient back to unknown */ ++ if (!cv->c_slnext && !cv->c_slprev && !cv->c_slback->c_slback) ++ { ++ cv->c_slorient = SLICE_UNKN; ++ if (!captionalways) ++ cv->c_slback->c_ye = ++ye; /* caption line no longer needed */ ++ } ++ cv = cv->c_slback; ++ EqualizeCanvas(cv->c_slperp, 0); ++ ResizeCanvas(cv); ++ ++ D_fore = Layer2Window(D_forecv->c_layer); ++ flayer = D_forecv->c_layer; ++ ++ RecreateCanvasChain(); + RethinkDisplayViewports(); + ResizeLayersToCanvases(); + } +@@ -585,24 +997,35 @@ + void + OneCanvas() + { +- struct canvas *mycv = D_forecv; +- struct canvas *cv, **cvpp; ++ struct canvas *cv = D_forecv, *ocv = 0; + +- for (cvpp = &D_cvlist; (cv = *cvpp);) ++ if (cv->c_slprev) + { +- if (cv == mycv) +- { +- cv->c_ys = 0; +- cv->c_ye = D_height - 1 - (D_has_hstatus == HSTATUS_LASTLINE) - captionalways; +- cv->c_yoff = 0; +- cvpp = &cv->c_next; +- } +- else +- { +- *cvpp = cv->c_next; +- FreeCanvas(cv); +- } ++ ocv = cv->c_slprev; ++ cv->c_slprev->c_slnext = cv->c_slnext; ++ } ++ if (cv->c_slnext) ++ { ++ ocv = cv->c_slnext; ++ cv->c_slnext->c_slprev = cv->c_slprev; + } ++ if (!ocv) ++ return; ++ if (cv->c_slback && cv->c_slback->c_slperp == cv) ++ cv->c_slback->c_slperp = ocv; ++ cv->c_slorient = SLICE_UNKN; ++ while (D_canvas.c_slperp) ++ FreeCanvas(D_canvas.c_slperp); ++ cv = D_forecv; ++ D_canvas.c_slperp = cv; ++ cv->c_slback = &D_canvas; ++ cv->c_slnext = 0; ++ cv->c_slprev = 0; ++ ASSERT(!cv->c_slperp); ++ if (!captionalways) ++ D_canvas.c_ye++; /* caption line no longer needed */ ++ ResizeCanvas(&D_canvas); ++ RecreateCanvasChain(); + RethinkDisplayViewports(); + ResizeLayersToCanvases(); + } +@@ -2383,7 +2806,7 @@ + ShowHStatus(str) + char *str; + { +- int l, i, ox, oy, max; ++ int l, ox, oy, max; + + if (D_status == STATUS_ON_WIN && D_has_hstatus == HSTATUS_LASTLINE && STATLINE == D_height-1) + return; /* sorry, in use */ +@@ -2422,9 +2845,7 @@ + l = D_width; + GotoPos(0, D_height - 1); + SetRendition(captionalways || D_cvlist == 0 || D_cvlist->c_next ? &mchar_null: &mchar_so); +- if (!PutWinMsg(str, 0, l)) +- for (i = 0; i < l; i++) +- PUTCHARLP(str[i]); ++ PutWinMsg(str, 0, l); + if (!captionalways && D_cvlist && !D_cvlist->c_next) + while (l++ < D_width) + PUTCHARLP(' '); +@@ -2510,7 +2931,7 @@ + struct viewport *vp, *lvp; + struct canvas *cv, *lcv, *cvlist, *cvlnext; + struct layer *oldflayer; +- int xx, yy; ++ int xx, yy, l; + char *buf; + struct win *p; + +@@ -2522,6 +2943,12 @@ + if (D_status == STATUS_ON_WIN && y == STATLINE) + return; /* can't refresh status */ + ++ if (y == D_height - 1 && D_has_hstatus == HSTATUS_LASTLINE) ++ { ++ RefreshHStatus(); ++ return; ++ } ++ + if (isblank == 0 && D_CE && to == D_width - 1 && from < to) + { + GotoPos(from, y); +@@ -2536,6 +2963,32 @@ + lvp = 0; + for (cv = display->d_cvlist; cv; cv = cv->c_next) + { ++ if (y == cv->c_ye + 1 && from >= cv->c_xs && from <= cv->c_xe) ++ { ++ p = Layer2Window(cv->c_layer); ++ buf = MakeWinMsgEv(captionstring, p, '%', cv->c_xe - cv->c_xs + (cv->c_xe + 1 < D_width || D_CLP), &cv->c_captev, 0); ++ if (cv->c_captev.timeout.tv_sec) ++ evenq(&cv->c_captev); ++ xx = to > cv->c_xe ? cv->c_xe : to; ++ l = strlen(buf); ++ GotoPos(from, y); ++ SetRendition(&mchar_so); ++ if (l > xx - cv->c_xs + 1) ++ l = xx - cv->c_xs + 1; ++ PutWinMsg(buf, from - cv->c_xs, l); ++ from = cv->c_xs + l; ++ for (; from <= xx; from++) ++ PUTCHARLP(' '); ++ break; ++ } ++ if (from == cv->c_xe + 1 && y >= cv->c_ys && y <= cv->c_ye + 1) ++ { ++ GotoPos(from, y); ++ SetRendition(&mchar_so); ++ PUTCHARLP(' '); ++ from++; ++ break; ++ } + if (y < cv->c_ys || y > cv->c_ye || to < cv->c_xs || from > cv->c_xe) + continue; + debug2("- canvas hit: %d %d", cv->c_xs, cv->c_ys); +@@ -2552,6 +3005,8 @@ + } + } + } ++ if (cv) ++ continue; /* we advanced from */ + if (lvp == 0) + break; + if (from < lvp->v_xs) +@@ -2600,44 +3055,8 @@ + + from = xx + 1; + } +- if (from > to) +- return; /* all done */ +- +- if (y == D_height - 1 && D_has_hstatus == HSTATUS_LASTLINE) +- { +- RefreshHStatus(); +- return; +- } +- +- for (cv = display->d_cvlist; cv; cv = cv->c_next) +- if (y == cv->c_ye + 1) +- break; +- if (cv == 0) +- { +- if (!isblank) +- DisplayLine(&mline_null, &mline_blank, y, from, to); +- return; +- } +- +- p = Layer2Window(cv->c_layer); +- buf = MakeWinMsgEv(captionstring, p, '%', D_width - !D_CLP, &cv->c_captev, 0); +- if (cv->c_captev.timeout.tv_sec) +- evenq(&cv->c_captev); +- xx = strlen(buf); +- GotoPos(from, y); +- SetRendition(&mchar_so); +- if (PutWinMsg(buf, from, to + 1)) +- from = xx > to + 1 ? to + 1 : xx; +- else +- { +- while (from <= to && from < xx) +- { +- PUTCHARLP(buf[from]); +- from++; +- } +- } +- while (from++ <= to) +- PUTCHARLP(' '); ++ if (!isblank && from <= to) ++ DisplayLine(&mline_null, &mline_blank, y, from, to); + } + + /*********************************************************************/ +@@ -3920,3 +4339,296 @@ + } + + #endif ++ ++struct layout *layouts; ++struct layout *laytab[MAXLAY]; ++struct layout *layout_last, layout_last_marker; ++struct layout *layout_attach = &layout_last_marker; ++ ++void ++FreeLayoutCv(cv) ++struct canvas *cv; ++{ ++ for (; cv; cv = cv->c_slnext) ++ if (cv->c_slperp) ++ { ++ FreeLayoutCv(cv->c_slperp); ++ free(cv->c_slperp); ++ cv->c_slperp = 0; ++ } ++} ++ ++void ++DupLayoutCv(cvf, cvt, save) ++struct canvas *cvf, *cvt; ++int save; ++{ ++ while(cvf) ++ { ++ cvt->c_slorient = cvf->c_slorient; ++ cvt->c_slweight = cvf->c_slweight; ++ if (cvf == D_forecv) ++ D_forecv = cvt; ++ if (!save) ++ { ++ cvt->c_display = display; ++ if (!cvf->c_slperp) ++ { ++ cvt->c_captev.type = EV_TIMEOUT; ++ cvt->c_captev.data = (char *)cvt; ++ cvt->c_captev.handler = cv_winid_fn; ++ cvt->c_blank.l_cvlist = 0; ++ cvt->c_blank.l_layfn = &BlankLf; ++ cvt->c_blank.l_bottom = &cvt->c_blank; ++ } ++ cvt->c_layer = cvf->c_layer; ++ } ++ else ++ { ++ struct win *p = cvf->c_layer ? Layer2Window(cvf->c_layer) : 0; ++ cvt->c_layer = p ? &p->w_layer : 0; ++ } ++ if (cvf->c_slperp) ++ { ++ cvt->c_slperp = (struct canvas *)calloc(1, sizeof(struct canvas)); ++ cvt->c_slperp->c_slback = cvt; ++ DupLayoutCv(cvf->c_slperp, cvt->c_slperp, save); ++ } ++ if (cvf->c_slnext) ++ { ++ cvt->c_slnext = (struct canvas *)calloc(1, sizeof(struct canvas)); ++ cvt->c_slnext->c_slprev = cvt; ++ cvt->c_slnext->c_slback = cvt->c_slback; ++ } ++ cvf = cvf->c_slnext; ++ cvt = cvt->c_slnext; ++ } ++} ++ ++void ++PutWindowCv(cv) ++struct canvas *cv; ++{ ++ struct win *p; ++ for (; cv; cv = cv->c_slnext) ++ { ++ if (cv->c_slperp) ++ { ++ PutWindowCv(cv->c_slperp); ++ continue; ++ } ++ p = cv->c_layer ? (struct win *)cv->c_layer->l_data : 0; ++ cv->c_layer = 0; ++ SetCanvasWindow(cv, p); ++ } ++} ++ ++struct lay * ++CreateLayout(title, startat) ++char *title; ++int startat; ++{ ++ struct layout *lay; ++ int i; ++ ++ if (startat >= MAXLAY || startat < 0) ++ startat = 0; ++ for (i = startat; ;) ++ { ++ if (!laytab[i]) ++ break; ++ if (++i == MAXLAY) ++ i = 0; ++ if (i == startat) ++ { ++ Msg(0, "No more layouts\n"); ++ return 0; ++ } ++ } ++ lay = (struct layout *)calloc(1, sizeof(*lay)); ++ lay->lay_title = SaveStr(title); ++ lay->lay_autosave = 1; ++ lay->lay_number = i; ++ laytab[i] = lay; ++ lay->lay_next = layouts; ++ layouts = lay; ++ return lay; ++} ++ ++void ++SaveLayout(name, cv) ++char *name; ++struct canvas *cv; ++{ ++ struct layout *lay; ++ struct canvas *fcv; ++ for (lay = layouts; lay; lay = lay->lay_next) ++ if (!strcmp(lay->lay_title, name)) ++ break; ++ if (lay) ++ FreeLayoutCv(&lay->lay_canvas); ++ else ++ lay = CreateLayout(name, 0); ++ if (!lay) ++ return; ++ fcv = D_forecv; ++ DupLayoutCv(cv, &lay->lay_canvas, 1); ++ lay->lay_forecv = D_forecv; ++ D_forecv = fcv; ++ D_layout = lay; ++} ++ ++void ++AutosaveLayout(lay) ++struct layout *lay; ++{ ++ struct canvas *fcv; ++ if (!lay || !lay->lay_autosave) ++ return; ++ FreeLayoutCv(&lay->lay_canvas); ++ fcv = D_forecv; ++ DupLayoutCv(&D_canvas, &lay->lay_canvas, 1); ++ lay->lay_forecv = D_forecv; ++ D_forecv = fcv; ++} ++ ++struct layout * ++FindLayout(name) ++char *name; ++{ ++ struct layout *lay; ++ char *s; ++ int i; ++ for (i = 0, s = name; *s >= '0' && *s <= '9'; s++) ++ i = i * 10 + (*s - '0'); ++ if (!*s && s != name && i >= 0 && i < MAXLAY) ++ return laytab[i]; ++ for (lay = layouts; lay; lay = lay->lay_next) ++ if (!strcmp(lay->lay_title, name)) ++ break; ++ return lay; ++} ++ ++void ++LoadLayout(lay, cv) ++struct layout *lay; ++struct canvas *cv; ++{ ++ AutosaveLayout(D_layout); ++ if (!lay) ++ { ++ while (D_canvas.c_slperp) ++ FreeCanvas(D_canvas.c_slperp); ++ MakeDefaultCanvas(); ++ SetCanvasWindow(D_forecv, 0); ++ D_layout = 0; ++ return; ++ } ++ while (D_canvas.c_slperp) ++ FreeCanvas(D_canvas.c_slperp); ++ D_cvlist = 0; ++ D_forecv = lay->lay_forecv; ++ DupLayoutCv(&lay->lay_canvas, &D_canvas, 0); ++ D_canvas.c_ye = D_height - 1 - ((D_canvas.c_slperp && D_canvas.c_slperp->c_slnext) || captionalways) - (D_has_hstatus == HSTATUS_LASTLINE); ++ ResizeCanvas(&D_canvas); ++ RecreateCanvasChain(); ++ RethinkDisplayViewports(); ++ PutWindowCv(&D_canvas); ++ ResizeLayersToCanvases(); ++ D_layout = lay; ++} ++ ++void ++NewLayout(title, startat) ++char *title; ++int startat; ++{ ++ struct layout *lay; ++ struct canvas *fcv; ++ ++ lay = CreateLayout(title, startat); ++ if (!lay) ++ return; ++ LoadLayout(0, &D_canvas); ++ fcv = D_forecv; ++ DupLayoutCv(&D_canvas, &lay->lay_canvas, 1); ++ lay->lay_forecv = D_forecv; ++ D_forecv = fcv; ++ D_layout = lay; ++ lay->lay_autosave = 1; ++} ++ ++static char * ++AddLayoutsInfo(buf, len, where) ++char *buf; ++int len; ++int where; ++{ ++ char *s, *ss, *t; ++ struct layout *p, **pp; ++ int l; ++ ++ s = ss = buf; ++ for (pp = laytab; pp < laytab + MAXLAY; pp++) ++ { ++ if (pp - laytab == where && ss == buf) ++ ss = s; ++ if ((p = *pp) == 0) ++ continue; ++ t = p->lay_title; ++ l = strlen(t); ++ if (l > 20) ++ l = 20; ++ if (s - buf + l > len - 24) ++ break; ++ if (s > buf) ++ { ++ *s++ = ' '; ++ *s++ = ' '; ++ } ++ sprintf(s, "%d", p->lay_number); ++ if (p->lay_number == where) ++ ss = s; ++ s += strlen(s); ++ if (display && p == D_layout) ++ *s++ = '*'; ++ *s++ = ' '; ++ strncpy(s, t, l); ++ s += l; ++ } ++ *s = 0; ++ return ss; ++} ++ ++void ++ShowLayouts(where) ++int where; ++{ ++ char buf[1024]; ++ char *s, *ss; ++ ++ if (!display) ++ return; ++ if (!layouts) ++ { ++ Msg(0, "No layouts defined\n"); ++ return; ++ } ++ if (where == -1 && D_layout) ++ where = D_layout->lay_number; ++ ss = AddLayoutsInfo(buf, sizeof(buf), where); ++ s = buf + strlen(buf); ++ if (ss - buf > D_width / 2) ++ { ++ ss -= D_width / 2; ++ if (s - ss < D_width) ++ { ++ ss = s - D_width; ++ if (ss < buf) ++ ss = buf; ++ } ++ } ++ else ++ ss = buf; ++ Msg(0, "%s", ss); ++} +diff -Naur screen-4.0.3.orig/display.h screen-4.0.3/display.h +--- screen-4.0.3.orig/display.h 2003-07-01 16:01:42.000000000 +0200 ++++ screen-4.0.3/display.h 2008-06-01 23:39:31.000000000 +0200 +@@ -19,17 +19,18 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: display.h,v 1.9 1994/05/31 12:31:54 mlschroe Exp $ FAU ++ * $Id: display.h,v 1.26 2007/02/07 22:53:59 mls Exp $ FAU + */ + + #ifdef MAPKEYS + + #define KMAP_KEYS (T_OCAPS-T_CAPS) + #define KMAP_AKEYS (T_OCAPS-T_CURSOR) +-#define KMAP_EXT 50 + + #define KMAP_NOTIMEOUT 0x4000 + ++#define MAXLAY 10 ++ + struct kmap_ext + { + char *str; +@@ -39,14 +40,33 @@ + struct action mm; + }; + ++#else ++ ++#define KMAP_KEYS 0 ++ + #endif + + struct win; /* forward declaration */ + ++#define SLICE_UNKN 0 ++#define SLICE_VERT (1 << 0) ++#define SLICE_HORI (1 << 1) ++ ++#define SLICE_THIS (1 << 2) /* used in equal test */ ++#define SLICE_GLOBAL (1 << 3) ++ + struct canvas + { + struct canvas *c_next; /* next canvas on display */ + struct display *c_display; /* back pointer to display */ ++ ++ struct canvas *c_slnext; /* next canvas in display slice */ ++ struct canvas *c_slprev; /* prev canvas in display slice */ ++ struct canvas *c_slperp; /* perpendicular slice */ ++ struct canvas *c_slback; /* perpendicular slice back pointer */ ++ int c_slorient; /* our slice orientation */ ++ int c_slweight; /* size ratio */ ++ + struct viewport *c_vplist; + struct layer *c_layer; /* layer on this canvas */ + struct canvas *c_lnext; /* next canvas that displays layer */ +@@ -60,6 +80,17 @@ + struct event c_captev; /* caption changed event */ + }; + ++struct layout ++{ ++ struct layout *lay_next; ++ char *lay_title; ++ int lay_number; ++ struct canvas lay_canvas; ++ struct canvas *lay_forecv; ++ struct canvas *lay_cvlist; ++ int lay_autosave; ++}; ++ + struct viewport + { + struct viewport *v_next; /* next vp on canvas */ +@@ -75,9 +106,11 @@ + struct display + { + struct display *d_next; /* linked list */ +- struct acluser *d_user; /* user who owns that display */ ++ struct acluser *d_user; /* user who owns that display */ ++ struct canvas d_canvas; /* our canvas slice */ + struct canvas *d_cvlist; /* the canvases of this display */ + struct canvas *d_forecv; /* current input focus */ ++ struct layout *d_layout; /* layout we're using */ + void (*d_processinput) __P((char *, int)); + char *d_processinputdata; /* data for processinput */ + int d_vpxmin, d_vpxmax; /* min/max used position on display */ +@@ -198,7 +231,9 @@ + + #define D_user DISPLAY(d_user) + #define D_username (DISPLAY(d_user) ? DISPLAY(d_user)->u_name : 0) ++#define D_canvas DISPLAY(d_canvas) + #define D_cvlist DISPLAY(d_cvlist) ++#define D_layout DISPLAY(d_layout) + #define D_forecv DISPLAY(d_forecv) + #define D_processinput DISPLAY(d_processinput) + #define D_processinputdata DISPLAY(d_processinputdata) +diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 +--- screen-4.0.3.orig/doc/screen.1 2003-12-05 14:51:57.000000000 +0100 ++++ screen-4.0.3/doc/screen.1 2008-06-01 23:39:31.000000000 +0200 +@@ -283,9 +283,9 @@ + command. + .TP 5 + .BI "\-p " number_or_name +-Preselect a window. This is usefull when you want to reattach to a +-specific windor or you want to send a command via the \*Q-X\*U +-option to a specific window. As with screen's select commant, \*Q-\*U ++Preselect a window. This is useful when you want to reattach to a ++specific window or you want to send a command via the \*Q-X\*U ++option to a specific window. As with screen's select command, \*Q-\*U + selects the blank window. As a special case for reattach, \*Q=\*U + brings up the windowlist on the blank window. + .TP 5 +@@ -360,6 +360,9 @@ + Attach to a not detached + .I screen + session. (Multi display mode). ++.I Screen ++refuses to attach from within itself. ++But when cascading multiple screens, loops are not detected; take care. + .TP 5 + .B \-X + Send the specified command to a running screen session. You can use +@@ -396,6 +399,7 @@ + .IP "\fBC-a tab\fP (focus)" + .PD + Switch the input focus to the next region. ++See also \fIsplit, remove, only\fP. + .IP "\fBC-a C-a\fP (other)" + Toggle to the window displayed previously. + Note that this binding defaults to the command character typed twice, +@@ -492,6 +496,7 @@ + Send a control-q to the current window. + .IP "\fBC-a Q\fP (only)" + Delete all regions but the current one. ++See also \fIsplit, remove, focus\fP. + .IP "\fBC-a r\fP" + .PD 0 + .IP "\fBC-a C-r\fP (wrap)" +@@ -505,6 +510,7 @@ + Send a control-s to the current window. + .IP "\fBC-a S\fP (split)" + Split the current region into two new ones. ++See also \fIonly, remove, focus\fP. + .IP "\fBC-a t\fP" + .PD 0 + .IP "\fBC-a C-t\fP (time)" +@@ -530,6 +536,7 @@ + Lock this terminal. + .IP "\fBC-a X\fP (remove)" + Kill the current region. ++See also \fIsplit, only, focus\fP. + .IP "\fBC-a z\fP" + .PD 0 + .IP "\fBC-a C-z\fP (suspend)" +@@ -1044,7 +1051,7 @@ + This key-binding makes \*Q^T\*U an escape character for key-bindings. If + you did the above \*Qstuff barfoo\*U binding, you can enter the word + \*Qfoo\*U by typing \*Q^Tfoo\*U. If you want to insert a \*Q^T\*U +-you have to press the key twice (i.e. escape the escape binding). ++you have to press the key twice (i.e., escape the escape binding). + .sp + .nf + bindkey -k F1 command +@@ -1448,7 +1455,7 @@ + of the break, but it may be the only way to generate long breaks. + .IR Tcsendbreak " and " TIOCSBRK + may or may not produce long breaks with spikes (e.g. 4 per +-second). This is not only system dependant, this also differs between ++second). This is not only system-dependent, this also differs between + serial board drivers. + Calling \*Qdefbreaktype\*U with no parameter displays the current setting. + .sp +@@ -1724,7 +1731,7 @@ + optional arguments) in the current window. The flow of data between + newcommands stdin/stdout/stderr, the process originally started in the window + (let us call it "application-process") and screen itself (window) is +-controlled by the filedescriptor pattern fdpat. ++controlled by the file descriptor pattern fdpat. + This pattern is basically a three character sequence representing stdin, stdout + and stderr of newcommand. A dot (.) connects the file descriptor + to +@@ -1837,6 +1844,7 @@ + bind t focus top + bind b focus bottom + .fi ++Note that \fBk\fP is traditionally bound to the \fIkill\fP command. + .sp + .ne 3 + .BR "gr " [ on | off ] +@@ -1914,7 +1922,7 @@ + will use the type even if the terminal supports a hardstatus. + .P + The third form specifies the contents of the hardstatus line. '%h' is +-used as default string, i.e. the stored hardstatus of the current ++used as default string, i.e., the stored hardstatus of the current + window (settable via \*QESC]0;^G\*U or \*QESC_ESC\e\*U) + is displayed. You can customize this to any string you like including + the escapes from the \*QSTRING ESCAPES\*U chapter. If you leave out +@@ -2111,7 +2119,7 @@ + .br + .BI "logfile flush " secs + .PP +-Defines the name the logfiles will get. The default is ++Defines the name the log files will get. The default is + \*Qscreenlog.%n\*U. The second form changes the number of seconds + .I screen + will wait before flushing the logfile buffer to the file-system. The +@@ -2702,6 +2710,7 @@ + display are resized to make room for the new region. The blank + window is displayed on the new region. Use the \*Qremove\*U or the + \*Qonly\*U command to delete regions. ++Use \*Qfocus\*U to toggle between regions. + .sp + .ne 3 + .B "startup_message on\fP|\fBoff" +@@ -3091,7 +3100,7 @@ + Note also that this is an experimental feature. + .sp + .ne 3 +-.BR "zombie " [\fIkeys\fP] ++.BR "zombie " [\fIkeys\fP [ onerror ] ] + .br + .BR "defzombie " [\fIkeys\fP] + .PP +@@ -3113,6 +3122,10 @@ + should only be called \fBdefzombie\fP. Until we need this as a per window + setting, the commands \fBzombie\fP and \fBdefzombie\fP are synonymous. + ++Optionally you can put the word \*Qonerror\*U after the keys. This will cause screen ++to monitor exit status of the process running in the window. If it exits normally ('0'), ++the window disappears. Any other exit value causes the window to become a zombie. ++ + .SH "THE MESSAGE LINE" + .I Screen + displays informational messages and other diagnostics in a \fImessage line\fP. +@@ -3179,7 +3192,7 @@ + .PP + You may want to specify as many of these options as applicable. Unspecified + options cause the terminal driver to make up the parameter values of the +-connection. These values are system dependant and may be in defaults or values ++connection. These values are system dependent and may be in defaults or values + saved from a previous connection. + .PP + For tty windows, the +@@ -3293,7 +3306,7 @@ + .IP u + all other users on this window + .IP w +-all window numbers and names. With '-' quailifier: up to the current ++all window numbers and names. With '-' qualifier: up to the current + window; with '+' qualifier: starting with the window after the current + one. + .IP W +@@ -3345,7 +3358,7 @@ + color settings. Its format + is \*Q[attribute modifier] [color description]\*U. The attribute modifier + must be prefixed by a change type indicator if it can be confused with +-a color desciption. The following change types are known: ++a color description. The following change types are known: + .IP + + add the specified set to the current attributes + .IP - +@@ -3403,14 +3416,14 @@ + unchanged. + .br + A one digit/letter color description is treated as foreground or +-background color dependant on the current attributes: if reverse mode is ++background color dependent on the current attributes: if reverse mode is + set, the background color is changed instead of the foreground color. + If you don't like this, prefix the color with a \*Q.\*U. If you want +-the same behaviour for two-letter color descriptions, also prefix them ++the same behavior for two-letter color descriptions, also prefix them + with a \*Q.\*U. + .br + As a special case, \*Q%{-}\*U restores the attributes and colors that +-were set before the last change was made (i.e. pops one level of the ++were set before the last change was made (i.e., pops one level of the + color-change stack). + .PP + Examples: +@@ -4329,7 +4342,7 @@ + A \fI\fP tells + .I screen + how to map characters +-in font \fI\fP ('B': Ascii, 'A': UK, 'K': german, etc.) ++in font \fI\fP ('B': Ascii, 'A': UK, 'K': German, etc.) + to strings. Every \fI\fP describes to what string a single + character will be translated. A template mechanism is used, as + most of the time the codes have a lot in common (for example +@@ -4349,7 +4362,7 @@ + .I screen + how to translate ISOlatin1 (charset 'B') + upper case umlaut characters on a hp700 terminal that has a +-german charset. '\e304' gets translated to '\eE(K[\eE(B' and so on. ++German charset. '\e304' gets translated to '\eE(K[\eE(B' and so on. + Note that this line gets parsed *three* times before the internal + lookup table is built, therefore a lot of quoting is needed to + create a single '\e'. +@@ -4367,7 +4380,7 @@ + + termcap xterm 'XC=K%,%\eE(B,[\e304,\e\e\e\e\e326,]\e334' + +-Here, a part of the german ('K') charset is emulated on an xterm. ++Here, a part of the German ('K') charset is emulated on an xterm. + If + .I screen + has to change to the 'K' charset, '\eE(B' will be sent +diff -Naur screen-4.0.3.orig/doc/screen.texinfo screen-4.0.3/doc/screen.texinfo +--- screen-4.0.3.orig/doc/screen.texinfo 2003-12-05 14:51:46.000000000 +0100 ++++ screen-4.0.3/doc/screen.texinfo 2008-06-01 23:39:31.000000000 +0200 +@@ -345,9 +345,9 @@ + @end table + + @item -p @var{name_or_number} +-Preselect a window. This is usefull when you want to reattach to a +-specific windor or you want to send a command via the @samp{-X} +-option to a specific window. As with screen's select commant, @samp{-} ++Preselect a window. This is useful when you want to reattach to a ++specific window or you want to send a command via the @samp{-X} ++option to a specific window. As with screen's select command, @samp{-} + selects the blank window. As a special case for reattach, @samp{=} + brings up the windowlist on the blank window. + +@@ -417,7 +417,10 @@ + + @item -x + Attach to a session which is already attached elsewhere (multi-display +-mode). ++mode). ++@code{Screen} refuses to attach from within itself. ++But when cascading multiple screens, loops are not detected; take care. ++ + + @item -X + Send the specified command to a running screen session. You can use +@@ -1156,7 +1159,7 @@ + Send an XON character. @xref{XON/XOFF}. + @item zmodem [off|auto|catch|pass] + Define how screen treats zmodem requests. @xref{Zmodem}. +-@item zombie [@var{keys}] ++@item zombie [@var{keys} [onerror] ] + Keep dead windows. @xref{Zombie}. + @end table + +@@ -1332,7 +1335,7 @@ + + You may want to specify as many of these options as applicable. + Unspecified options cause the terminal driver to make up the parameter +-values of the connection. These values are system dependant and may be ++values of the connection. These values are system-dependent and may be + in defaults or values saved from a previous connection. + + For tty windows, the @code{info} command shows some of the modem +@@ -2888,7 +2891,7 @@ + users. + If your terminal sends characters, that cause you to abort copy mode, + then this command may help by binding these characters to do nothing. +-The no-op character is `@' and is used like this: @code{markkeys @@=L=H} ++The no-op character is `@@' and is used like this: @code{markkeys @@=L=H} + if you do not want to use the `H' or `L' commands any longer. + As shown in this example, multiple keys can be assigned to one function + in a single statement. +@@ -2928,7 +2931,7 @@ + @noindent + @kbd{C-u} and @kbd{C-d} scroll the display up/down by the specified + amount of lines while preserving the cursor position. (Default: half +-screenfull). ++screenful). + + @noindent + @kbd{C-b} and @kbd{C-f} move the cursor up/down a full screen. +@@ -3224,7 +3227,7 @@ + its optional arguments) in the current window. The flow of data between + newcommands stdin/stdout/stderr, the process originally started (let us call it + "application-process") and +-screen itself (window) is controlled by the filedescriptor pattern @var{fdpat}. ++screen itself (window) is controlled by the file descriptor pattern @var{fdpat}. + This pattern is basically a three character sequence representing stdin, stdout + and stderr of newcommand. A dot (@code{.}) connects the file descriptor + to screen. An exclamation mark (@code{!}) causes the file descriptor to be +@@ -3466,7 +3469,7 @@ + changes the copy mode table and with neither option the user + table is selected. The argument @samp{string} is the sequence of + characters to which an action is bound. This can either be a fixed +-tring or a termcap keyboard capability name (selectable with the ++string or a termcap keyboard capability name (selectable with the + @samp{-k} option). + + Some keys on a VT100 terminal can send a different +@@ -3516,7 +3519,7 @@ + This key-binding makes @samp{C-t} an escape character for key-bindings. If + you did the above @samp{stuff barfoo} binding, you can enter the word + @samp{foo} by typing @samp{C-t foo}. If you want to insert a +-@samp{C-t} you have to press the key twice (i.e. escape the escape ++@samp{C-t} you have to press the key twice (i.e., escape the escape + binding). + + @example +@@ -3539,7 +3542,7 @@ + @end deffn + @deffn Command maptimeout timo + (none)@* +-Set the intercharacter timer for input sequence detection to a timeout ++Set the inter-character timer for input sequence detection to a timeout + of @var{timo} ms. The default timeout is 300ms. Maptimeout with no + arguments shows the current setting. + @end deffn +@@ -4061,7 +4064,7 @@ + + This tells @code{screen}, how to translate ISOlatin1 (charset @samp{B}) + upper case umlaut characters on a @code{hp700} terminal that has a +-german charset. @samp{\304} gets translated to ++German charset. @samp{\304} gets translated to + @samp{\E(K[\E(B} and so on. + Note that this line gets parsed *three* times before the internal + lookup table is built, therefore a lot of quoting is needed to +@@ -4080,7 +4083,7 @@ + termcap xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334' + @end example + +-Here, a part of the german (@samp{K}) charset is emulated on an xterm. ++Here, a part of the German (@samp{K}) charset is emulated on an xterm. + If screen has to change to the @samp{K} charset, @samp{\E(B} will be + sent + to the terminal, i.e. the ASCII charset is used instead. The +@@ -4145,7 +4148,7 @@ + the type even if the terminal supports a hardstatus line. + + The third form specifies the contents of the hardstatus line. +-@code{%h} is used as default string, i.e. the stored hardstatus of the ++@code{%h} is used as default string, i.e., the stored hardstatus of the + current window (settable via @samp{ESC]0;^G} or @samp{ESC_\\}) is + displayed. + You can customize this to any string you like including +@@ -4217,7 +4220,7 @@ + @deffn Command hardcopydir directory + (none)@* + Defines a directory where hardcopy files will be placed. +-If unset hardcopys are dumped in screen's current working ++If unset, hardcopys are dumped in screen's current working + directory. + @end deffn + +@@ -4247,7 +4250,7 @@ + @deffn Command logfile filename + @deffnx Command logfile flush secs + (none)@* +-Defines the name the logfiles will get. The default is @samp{screenlog.%n}. ++Defines the name the log files will get. The default is @samp{screenlog.%n}. + The second form changes the number of seconds @code{screen} + will wait before flushing the logfile buffer to the file-system. The + default value is 10 seconds. +@@ -4407,7 +4410,7 @@ + session for the duration of the break, but it may be the only way to + generate long breaks. @code{tcsendbreak} and @code{TIOCSBRK} may or may not + produce long breaks with spikes (e.g. 4 per second). This is not only system +-dependant, this also differs between serial board drivers. ++dependent, this also differs between serial board drivers. + Calling @code{defbreaktype} with no parameter displays the current setting. + @end deffn + +@@ -4530,7 +4533,7 @@ + + @node Zombie, Printcmd, Version, Miscellaneous + @section Zombie +-@deffn Command zombie [@var{keys}] ++@deffn Command zombie [@var{keys} [onerror] ] + @deffnx Command defzombie [@var{keys}] + (none)@* + Per default windows are removed from the window list as soon as the +@@ -4546,6 +4549,11 @@ + As the zombie setting is affected globally for all windows, this command + should only be called @code{defzombie}. Until we need this as a per window + setting, the commands @code{zombie} and @code{defzombie} are synonymous. ++ ++Optionally you can put the word @code{onerror} after the keys. This will ++cause screen to monitor exit status of the process running in the window. ++If it exits normally ('0'), the window disappears. Any other exit value ++causes the window to become a zombie. + @end deffn + + @node Printcmd, Sorendition, Zombie, Miscellaneous +@@ -4759,7 +4767,7 @@ + @item u + all other users on this window + @item w +-all window numbers and names. With @code{-} quailifier: up to the current ++all window numbers and names. With @code{-} qualifier: up to the current + window; with @code{+} qualifier: starting with the window after the current + one. + @item W +@@ -4811,7 +4819,7 @@ + color settings. Its format + is @samp{[attribute modifier] [color description]}. The attribute modifier + must be prefixed by a change type indicator if it can be confused with +-a color desciption. The following change types are known: ++a color description. The following change types are known: + @table @code + @item + + add the specified set to the current attributes +@@ -4868,10 +4876,10 @@ + unchanged. + + A one digit/letter color description is treated as foreground or +-background color dependant on the current attributes: if reverse mode is ++background color dependent on the current attributes: if reverse mode is + set, the background color is changed instead of the foreground color. + If you don't like this, prefix the color with a @samp{.}. If you want +-the same behaviour for two-letter color descriptions, also prefix them ++the same behavior for two-letter color descriptions, also prefix them + with a @samp{.}. + + As a special case, @samp{%@{-@}} restores the attributes and colors that +@@ -5069,7 +5077,7 @@ + @menu + * Known Bugs:: Problems we know about. + * Reporting Bugs:: How to contact the maintainers. +-* Availability:: Where to find the lastest screen version. ++* Availability:: Where to find the latest screen version. + @end menu + + @node Known Bugs, Reporting Bugs, , Bugs +diff -Naur screen-4.0.3.orig/encoding.c screen-4.0.3/encoding.c +--- screen-4.0.3.orig/encoding.c 2006-10-23 14:58:14.000000000 +0200 ++++ screen-4.0.3/encoding.c 2008-06-01 23:39:31.000000000 +0200 +@@ -997,7 +997,7 @@ + if (c1 >= 0xd800 && c1 < 0xe000) + comb_tofront(root, c1 - 0xd800); + i = combchars[root]->prev; +- if (c1 == i + 0xd800) ++ if (c1 == i + 0xd800) + { + /* completely full, can't recycle */ + debug("utf8_handle_comp: completely full!\n"); +@@ -1159,6 +1159,8 @@ + *statep = c; + return -1; + } ++ if (c < 0x80) ++ return c; + return c | (KANA << 16); + } + t = c; +@@ -1166,11 +1168,16 @@ + *statep = 0; + if (0x40 <= t && t <= 0xfc && t != 0x7f) + { +- if (c <= 0x9f) c = (c - 0x81) * 2 + 0x21; +- else c = (c - 0xc1) * 2 + 0x21; +- if (t <= 0x7e) t -= 0x1f; +- else if (t <= 0x9e) t -= 0x20; +- else t -= 0x7e, c++; ++ if (c <= 0x9f) ++ c = (c - 0x81) * 2 + 0x21; ++ else ++ c = (c - 0xc1) * 2 + 0x21; ++ if (t <= 0x7e) ++ t -= 0x1f; ++ else if (t <= 0x9e) ++ t -= 0x20; ++ else ++ t -= 0x7e, c++; + return (c << 8) | t | (KANJI << 16); + } + return t; +diff -Naur screen-4.0.3.orig/extern.h screen-4.0.3/extern.h +--- screen-4.0.3.orig/extern.h 2003-08-22 14:27:57.000000000 +0200 ++++ screen-4.0.3/extern.h 2008-06-01 23:39:31.000000000 +0200 +@@ -19,7 +19,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: extern.h,v 1.18 1994/05/31 12:31:57 mlschroe Exp $ FAU ++ * $Id: extern.h,v 1.33 2007/02/06 20:44:37 mls Exp $ FAU + */ + + #if !defined(__GNUC__) || __GNUC__ < 2 +@@ -45,8 +45,8 @@ + extern void MakeNewEnv __P((void)); + extern char *MakeWinMsg __P((char *, struct win *, int)); + extern char *MakeWinMsgEv __P((char *, struct win *, int, int, struct event *, int)); +-extern int PutWinMsg __P((char *, int, int)); +-extern void WindowDied __P((struct win *)); ++extern void PutWinMsg __P((char *, int, int)); ++extern void WindowDied __P((struct win *, int, int)); + extern void setbacktick __P((int, int, int, char **)); + + /* ansi.c */ +@@ -65,7 +65,7 @@ + extern int MFindUsedLine __P((struct win *, int, int)); + + /* fileio.c */ +-extern void StartRc __P((char *)); ++extern int StartRc __P((char *, int)); + extern void FinishRc __P((char *)); + extern void RcLine __P((char *, int)); + extern FILE *secfopen __P((char *, char *)); +@@ -113,7 +113,7 @@ + + /* input.c */ + extern void inp_setprompt __P((char *, char *)); +-extern void Input __P((char *, int, int, void (*)(char *, int, char *), char *)); ++extern void Input __P((char *, int, int, void (*)(char *, int, char *), char *, int)); + extern int InInput __P((void)); + + /* help.c */ +@@ -122,7 +122,7 @@ + extern void display_copyright __P((void)); + extern void display_displays __P((void)); + extern void display_bindkey __P((char *, struct action *)); +-extern void display_wlist __P((int, int)); ++extern void display_wlist __P((int, int, struct win *)); + extern int InWList __P((void)); + extern void WListUpdatecv __P((struct canvas *, struct win *)); + extern void WListLinkChanged __P((void)); +@@ -289,7 +289,7 @@ + #endif + extern void SetCanvasWindow __P((struct canvas *, struct win *)); + extern int MakeDefaultCanvas __P((void)); +-extern int AddCanvas __P((void)); ++extern int AddCanvas __P((int)); + extern void RemCanvas __P((void)); + extern void OneCanvas __P((void)); + extern int RethinkDisplayViewports __P((void)); +@@ -335,6 +335,7 @@ + extern void ReceiveMsg __P((void)); + extern void SendCreateMsg __P((char *, struct NewWindow *)); + extern int SendErrorMsg __P((char *, char *)); ++extern int SendAttachMsg __P((int, struct msg *, int)); + + /* misc.c */ + extern char *SaveStr __P((const char *)); +diff -Naur screen-4.0.3.orig/fileio.c screen-4.0.3/fileio.c +--- screen-4.0.3.orig/fileio.c 2003-09-08 16:25:28.000000000 +0200 ++++ screen-4.0.3/fileio.c 2008-06-01 23:39:31.000000000 +0200 +@@ -128,9 +128,10 @@ + * 1) rcfilename = "/etc/screenrc" + * 2) rcfilename = RcFileName + */ +-void +-StartRc(rcfilename) ++int ++StartRc(rcfilename, nopanic) + char *rcfilename; ++int nopanic; + { + register int argc, len; + register char *p, *cp; +@@ -159,13 +160,13 @@ + * the file. + */ + debug3("StartRc: '%s','%s', '%s'\n", RcFileName, rc_name, rcfilename); +- Panic(0, "Unable to open \"%s\".", rc_name); +- /* NOTREACHED */ ++ if (!nopanic) Panic(0, "Unable to open \"%s\".", rc_name); ++ /* possibly NOTREACHED */ + } + debug1("StartRc: '%s' no good. ignored\n", rc_name); + Free(rc_name); + rc_name = oldrc_name; +- return; ++ return 1; + } + while (fgets(buf, sizeof buf, fp) != NULL) + { +@@ -238,7 +239,7 @@ + if (rc_recursion <= 10) + { + rc_recursion++; +- StartRc(args[1]); ++ (void)StartRc(args[1], 0); + rc_recursion--; + } + } +@@ -246,6 +247,7 @@ + fclose(fp); + Free(rc_name); + rc_name = oldrc_name; ++ return 0; + } + + void +@@ -779,7 +781,7 @@ + #ifdef SIGPIPE + signal(SIGPIPE, SIG_DFL); + #endif +- execl("/bin/sh", "sh", "-c", cmd, 0); ++ execl("/bin/sh", "sh", "-c", cmd, (char *)0); + Panic(errno, "/bin/sh"); + default: + break; +diff -Naur screen-4.0.3.orig/help.c screen-4.0.3/help.c +--- screen-4.0.3.orig/help.c 2003-09-08 16:25:33.000000000 +0200 ++++ screen-4.0.3/help.c 2008-06-01 23:39:31.000000000 +0200 +@@ -37,6 +37,9 @@ + extern struct mchar mchar_blank, mchar_so; + extern unsigned char *blank; + extern struct win *wtab[]; ++#ifdef MAPKEYS ++extern struct term term[]; ++#endif + + static void PadStr __P((char *, int, int, int)); + +@@ -161,7 +164,7 @@ + used[n] = 0; + mcom = 0; + mkey = 0; +- for (key = 0; key < 256; key++) ++ for (key = 0; key < 256 + KMAP_KEYS; key++) + { + n = ktabp[key].nr; + if (n == RC_ILLEGAL) +@@ -314,7 +317,7 @@ + x += helpdata->inter - !col; + n = helpdata->nact[n]; + buf[0] = '\0'; +- for (key = 0; key < 256; key++) ++ for (key = 0; key < 256 + KMAP_KEYS; key++) + if (ktabp[key].nr == n && ktabp[key].args == noargs && strlen(buf) < sizeof(buf) - 7) + { + strcat(buf, " "); +@@ -333,13 +336,13 @@ + while ((n = ktabp[helpdata->command_search].nr) == RC_ILLEGAL + || ktabp[helpdata->command_search].args == noargs) + { +- if (++helpdata->command_search >= 256) ++ if (++helpdata->command_search >= 256 + KMAP_KEYS) + return -1; + } + buf[0] = '\0'; + add_key_to_buf(buf, helpdata->command_search); +- PadStr(buf, 4, 0, crow); +- AddAction(&ktabp[helpdata->command_search++], 4, crow); ++ PadStr(buf, 5, 0, crow); ++ AddAction(&ktabp[helpdata->command_search++], 5, crow); + helpdata->grow++; + } + else +@@ -425,6 +428,17 @@ + strcpy(buf, "unset"); + else if (key == ' ') + strcpy(buf, "sp"); ++#ifdef MAPKEYS ++ else if (key >= 256) ++ { ++ key = key - 256 + T_CAPS; ++ buf[0] = ':'; ++ buf[1] = term[key].tcname[0]; ++ buf[2] = term[key].tcname[1]; ++ buf[3] = ':'; ++ buf[4] = 0; ++ } ++#endif + else + buf[AddXChar(buf, key)] = 0; + } +@@ -865,6 +879,7 @@ + int last; + int start; + int order; ++ struct win *group; + }; + + static struct LayFuncs WListLf = +@@ -878,6 +893,8 @@ + DefRestore + }; + ++#define WTAB_GROUP_MATCHES(i) (group == wtab[i]->w_group) ++ + static int + WListResize(wi, he) + int wi, he; +@@ -904,9 +921,11 @@ + struct wlistdata *wlistdata; + struct display *olddisplay = display; + int h; ++ struct win *group; + + ASSERT(flayer); + wlistdata = (struct wlistdata *)flayer->l_data; ++ group = wlistdata->group; + h = wlistdata->numwin; + while (!done && *plen > 0) + { +@@ -914,7 +933,7 @@ + { + int n = (unsigned char)**ppbuf - '0'; + int d = 0; +- if (n < MAXWIN && wtab[n]) ++ if (n < MAXWIN && wtab[n] && WTAB_GROUP_MATCHES(n)) + { + int i; + for (d = -wlistdata->npos, i = WListNext(wlistdata, -1, 0); i != n; i = WListNext(wlistdata, i, 1), d++) +@@ -960,7 +979,7 @@ + case ' ': + done = 1; + h = wlistdata->pos; +- if (!display || !wtab[h] || wtab[h] == D_fore || (flayer->l_cvlist && flayer->l_cvlist->c_lnext)) ++ if (!display || h == MAXWIN || !wtab[h] || wtab[h] == D_fore || (flayer->l_cvlist && flayer->l_cvlist->c_lnext)) + HelpAbort(); + #ifdef MULTIUSER + else if (AclCheckPermWin(D_user, ACL_READ, wtab[h])) +@@ -970,7 +989,8 @@ + ExitOverlayPage(); /* no need to redisplay */ + /* restore display, don't switch wrong user */ + display = olddisplay; +- SwitchWindow(h); ++ if (h != MAXWIN) ++ SwitchWindow(h); + break; + case 0033: + case 0007: +@@ -1003,29 +1023,37 @@ + { + char *str; + int n; ++ int yoff; ++ struct wlistdata *wlistdata; + +- display = 0; ++ if (i == MAXWIN) ++ return; ++ wlistdata = (struct wlistdata *)flayer->l_data; ++ yoff = wlistdata->group ? 3 : 2; ++ display = Layer2Window(flayer) ? 0 : flayer->l_cvlist ? flayer->l_cvlist->c_display : 0; + str = MakeWinMsgEv(wliststr, wtab[i], '%', flayer->l_width, (struct event *)0, 0); + n = strlen(str); + if (i != pos && isblank) + while (n && str[n - 1] == ' ') + n--; +- LPutWinMsg(flayer, str, (i == pos || !isblank) ? flayer->l_width : n, i == pos ? &mchar_so : &mchar_blank, 0, y + 2); ++ LPutWinMsg(flayer, str, (i == pos || !isblank) ? flayer->l_width : n, i == pos ? &mchar_so : &mchar_blank, 0, y + yoff); + #if 0 +- LPutStr(flayer, str, n, i == pos ? &mchar_so : &mchar_blank, 0, y + 2); ++ LPutStr(flayer, str, n, i == pos ? &mchar_so : &mchar_blank, 0, y + yoff); + if (i == pos || !isblank) + while(n < flayer->l_width) +- LPutChar(flayer, i == pos ? &mchar_so : &mchar_blank, n++, y + 2); ++ LPutChar(flayer, i == pos ? &mchar_so : &mchar_blank, n++, y + yoff); + #endif + return; + } + ++ + static int + WListNext(wlistdata, old, delta) + struct wlistdata *wlistdata; + int old, delta; + { + int i, j; ++ struct win *group = wlistdata->group; + + if (old == MAXWIN) + return MAXWIN; +@@ -1034,22 +1062,22 @@ + if (old == -1) + { + for (old = 0; old < MAXWIN; old++) +- if (wtab[old]) ++ if (wtab[old] && WTAB_GROUP_MATCHES(old)) + break; + if (old == MAXWIN) + return old; + } +- if (!wtab[old]) ++ if (!wtab[old] || !WTAB_GROUP_MATCHES(old)) + return MAXWIN; + i = old; + while (delta > 0 && i < MAXWIN - 1) +- if (wtab[++i]) ++ if (wtab[++i] && WTAB_GROUP_MATCHES(i)) + { + old = i; + delta--; + } + while (delta < 0 && i > 0) +- if (wtab[--i]) ++ if (wtab[--i] && WTAB_GROUP_MATCHES(i)) + { + old = i; + delta++; +@@ -1186,14 +1214,15 @@ + } + + void +-display_wlist(onblank, order) ++display_wlist(onblank, order, group) + int onblank; + int order; ++struct win *group; + { + struct win *p; + struct wlistdata *wlistdata; + +- if (flayer->l_width < 10 || flayer->l_height < 5) ++ if (flayer->l_width < 10 || flayer->l_height < 6) + { + LMsg(0, "Window size too small for window list page"); + return; +@@ -1207,17 +1236,26 @@ + return; + } + p = D_fore; +- SetForeWindow((struct win *)0); +- Activate(0); +- if (flayer->l_width < 10 || flayer->l_height < 5) ++ if (p) ++ { ++ SetForeWindow((struct win *)0); ++ if (p->w_group) ++ { ++ D_fore = p->w_group; ++ flayer->l_data = (char *)p->w_group; ++ } ++ Activate(0); ++ } ++ if (flayer->l_width < 10 || flayer->l_height < 6) + { + LMsg(0, "Window size too small for window list page"); + return; + } +- debug3("flayer %x %d %x\n", flayer, flayer->l_width, flayer->l_height); + } + else + p = Layer2Window(flayer); ++ if (!group && p) ++ group = p->w_group; + if (InitOverlayPage(sizeof(*wlistdata), &WListLf, 0)) + return; + wlistdata = (struct wlistdata *)flayer->l_data; +@@ -1225,9 +1263,10 @@ + flayer->l_y = flayer->l_height - 1; + wlistdata->start = onblank && p ? p->w_number : -1; + wlistdata->order = order; ++ wlistdata->group = group; + wlistdata->pos = p ? p->w_number : WListNext(wlistdata, -1, 0); + wlistdata->ypos = wlistdata->npos = 0; +- wlistdata->numwin= flayer->l_height - 3; ++ wlistdata->numwin= flayer->l_height - (group ? 4 : 3); + wlistpage(); + } + +@@ -1237,35 +1276,49 @@ + struct wlistdata *wlistdata; + char *str; + int pos; ++ struct win *group; + + wlistdata = (struct wlistdata *)flayer->l_data; ++ group = wlistdata->group; + + LClearAll(flayer, 0); + if (wlistdata->start >= 0 && wtab[wlistdata->start] == 0) + wlistdata->start = -2; + + pos = wlistdata->pos; +- if (wtab[pos] == 0) ++ if (pos == MAXWIN || !wtab[pos] || !WTAB_GROUP_MATCHES(pos)) + { + if (wlistdata->order == WLIST_MRU) + pos = WListNext(wlistdata, -1, wlistdata->npos); + else + { + /* find new position */ +- while(++pos < MAXWIN) +- if (wtab[pos]) +- break; ++ if (pos < MAXWIN) ++ while(++pos < MAXWIN) ++ if (wtab[pos] && WTAB_GROUP_MATCHES(pos)) ++ break; + if (pos == MAXWIN) +- while (--pos > 0) +- if (wtab[pos]) ++ while (--pos >= 0) ++ if (wtab[pos] && WTAB_GROUP_MATCHES(pos)) + break; ++ if (pos == -1) ++ pos == MAXWIN; + } + } + wlistdata->pos = pos; + + display = 0; + str = MakeWinMsgEv(wlisttit, (struct win *)0, '%', flayer->l_width, (struct event *)0, 0); +- LPutWinMsg(flayer, str, strlen(str), &mchar_blank, 0, 0); ++ if (wlistdata->group) ++ { ++ LPutWinMsg(flayer, "Group: ", 7, &mchar_blank, 0, 0); ++ LPutWinMsg(flayer, wlistdata->group->w_title, strlen(wlistdata->group->w_title), &mchar_blank, 7, 0); ++ LPutWinMsg(flayer, str, strlen(str), &mchar_blank, 0, 1); ++ } ++ else ++ { ++ LPutWinMsg(flayer, str, strlen(str), &mchar_blank, 0, 0); ++ } + WListNormalize(); + WListLines(wlistdata->numwin, -1); + LaySetCursor(); +@@ -1320,7 +1373,7 @@ + for (display = displays; display; display = display->d_next) + for (cv = D_cvlist; cv; cv = cv->c_next) + { +- if (cv->c_layer->l_layfn != &WListLf) ++ if (!cv->c_layer || cv->c_layer->l_layfn != &WListLf) + continue; + wlistdata = (struct wlistdata *)cv->c_layer->l_data; + if (wlistdata->order != WLIST_MRU) +@@ -1347,8 +1400,6 @@ + */ + + #ifdef MAPKEYS +- +-extern struct term term[]; + extern struct kmap_ext *kmap_exts; + extern int kmap_extn; + extern struct action dmtab[]; +diff -Naur screen-4.0.3.orig/image.h screen-4.0.3/image.h +--- screen-4.0.3.orig/image.h 2003-12-05 14:45:41.000000000 +0100 ++++ screen-4.0.3/image.h 2008-06-01 23:39:31.000000000 +0200 +@@ -19,7 +19,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: image.h,v 1.9 1994/05/31 12:31:54 mlschroe Exp $ FAU ++ * $Id: image.h,v 1.17 2005/12/16 18:51:07 jnweiger Exp $ FAU + */ + + +diff -Naur screen-4.0.3.orig/input.c screen-4.0.3/input.c +--- screen-4.0.3.orig/input.c 2003-09-08 16:25:37.000000000 +0200 ++++ screen-4.0.3/input.c 2008-06-01 23:39:31.000000000 +0200 +@@ -55,6 +55,7 @@ + int inpmode; /* INP_NOECHO, INP_RAW, INP_EVERY */ + void (*inpfinfunc) __P((char *buf, int len, char *priv)); + char *priv; /* private data for finfunc */ ++ int privdata; /* private data space */ + }; + + static struct LayFuncs InpLf = +@@ -93,6 +94,8 @@ + inpdata->inp.pos = inpdata->inp.len = strlen(inpdata->inp.buf); + } + InpRedisplayLine(INPUTLINE, 0, flayer->l_width - 1, 0); ++ flayer->l_x = inpdata->inpstringlen + (inpdata->inpmode & INP_NOECHO ? 0 : inpdata->inp.pos); ++ flayer->l_y = INPUTLINE; + } + + /* +@@ -106,12 +109,13 @@ + * INP_EVERY == digraph mode. + */ + void +-Input(istr, len, mode, finfunc, data) ++Input(istr, len, mode, finfunc, priv, data) + char *istr; + int len; + int mode; +-void (*finfunc) __P((char *buf, int len, char *data)); +-char *data; ++void (*finfunc) __P((char *buf, int len, char *priv)); ++char *priv; ++int data; + { + int maxlen; + struct inpdata *inpdata; +@@ -136,10 +140,14 @@ + inpdata->inpfinfunc = finfunc; + inpdata->inp.pos = inpdata->inp.len = 0; + inpdata->inpmode = mode; +- inpdata->priv = data; +- inp_setprompt(istr, (char *)NULL); +- flayer->l_x = inpdata->inpstringlen; +- flayer->l_y = INPUTLINE; ++ inpdata->privdata = data; ++ if (!priv) ++ priv = &inpdata->privdata; ++ inpdata->priv = priv; ++ inpdata->inpstringlen = 0; ++ inpdata->inpstring = NULL; ++ if (istr) ++ inp_setprompt(istr, (char *)NULL); + } + + static void +@@ -174,10 +182,12 @@ + if (inpdata->inpmode & INP_EVERY) + { + inpdata->inp.buf[inpdata->inp.len] = ch; +- inpdata->inp.buf[inpdata->inp.len + 1] = ch; /* gross */ +- display = inpdisplay; +- (*inpdata->inpfinfunc)(inpdata->inp.buf, inpdata->inp.len, inpdata->priv); +- ch = inpdata->inp.buf[inpdata->inp.len]; ++ if (ch) ++ { ++ display = inpdisplay; ++ (*inpdata->inpfinfunc)(inpdata->inp.buf, inpdata->inp.len, inpdata->priv); ++ ch = inpdata->inp.buf[inpdata->inp.len]; ++ } + } + else if (inpdata->inpmode & INP_RAW) + { +@@ -313,7 +323,7 @@ + if (inpdata->inp.len && inpdata->inpmode == 0) + inphist = inpdata->inp; /* structure copy */ + +- flayer->l_data = 0; ++ flayer->l_data = 0; /* so inpdata does not get freed */ + InpAbort(); /* redisplays... */ + *ppbuf = pbuf; + *plen = len; +diff -Naur screen-4.0.3.orig/layer.c screen-4.0.3/layer.c +--- screen-4.0.3.orig/layer.c 2003-09-08 16:25:46.000000000 +0200 ++++ screen-4.0.3/layer.c 2008-06-01 23:39:31.000000000 +0200 +@@ -436,17 +436,8 @@ + len2 = xe2 - (x + vp->v_xoff) + 1; + if (len2 > len) + len2 = len; +- if (!PutWinMsg(s, xs2 - x - vp->v_xoff, len2)) +- { +- s2 = s + xs2 - x - vp->v_xoff; +- while (len2-- > 0) +- { +- PUTCHARLP(*s2++); +- xs2++; +- } +- } +- else +- xs2 = x + vp->v_xoff + len2; ++ PutWinMsg(s, xs2 - x - vp->v_xoff, len2); ++ xs2 = x + vp->v_xoff + len2; + if (xs2 < vp->v_xs) + xs2 = vp->v_xs; + or = D_rend; +@@ -849,9 +840,6 @@ + } + } + +- +-/*******************************************************************/ +- + void + LClearAll(l, uself) + struct layer *l; +@@ -880,6 +868,53 @@ + flayer = oldflayer; + } + ++void ++/*VARARGS2*/ ++#if defined(USEVARARGS) && defined(__STDC__) ++LMsg(int err, char *fmt, VA_DOTS) ++#else ++LMsg(err, fmt, VA_DOTS) ++int err; ++char *fmt; ++VA_DECL ++#endif ++{ ++ VA_LIST(ap) ++ char buf[MAXPATHLEN*2]; ++ char *p = buf; ++ struct canvas *cv; ++ ++ VA_START(ap, fmt); ++ fmt = DoNLS(fmt); ++ (void)vsnprintf(p, sizeof(buf) - 100, fmt, VA_ARGS(ap)); ++ VA_END(ap); ++ if (err) ++ { ++ p += strlen(p); ++ *p++ = ':'; ++ *p++ = ' '; ++ strncpy(p, strerror(err), buf + sizeof(buf) - p - 1); ++ buf[sizeof(buf) - 1] = 0; ++ } ++ debug2("LMsg('%s') (%#x);\n", buf, (unsigned int)flayer); ++ for (display = displays; display; display = display->d_next) ++ { ++ for (cv = D_cvlist; cv; cv = cv->c_next) ++ if (cv->c_layer == flayer) ++ break; ++ if (cv == 0) ++ continue; ++ MakeStatus(buf); ++ } ++} ++ ++ ++/*******************************************************************/ ++/*******************************************************************/ ++ ++/* ++ * Layer creation / removal ++ */ + + void + KillLayerChain(lay) +@@ -911,12 +946,6 @@ + } + + +-/*******************************************************************/ +-/*******************************************************************/ +- +-/* +- * Layer creation / removal +- */ + + int + InitOverlayPage(datasize, lf, block) +@@ -1009,6 +1038,8 @@ + return 0; + } + ++extern struct layout *layouts; ++ + void + ExitOverlayPage() + { +@@ -1016,6 +1047,7 @@ + struct win *p; + int doredisplay = 0; + struct canvas *cv, *ocv; ++ struct layout *lay; + + ASSERT(flayer); + debug1("Exiting layer %#x\n", (unsigned int)flayer); +@@ -1050,6 +1082,11 @@ + p->w_paster.pa_pastelayer = 0; + #endif + ++ for (lay = layouts; lay; lay = lay->lay_next) ++ for (cv = lay->lay_cvlist; cv; cv = cv->c_next) ++ if (cv->c_layer == oldlay) ++ cv->c_layer = flayer; ++ + /* add all canvases back into next layer's canvas list */ + for (ocv = 0, cv = oldlay->l_cvlist; cv; cv = cv->c_lnext) + { +@@ -1071,44 +1108,3 @@ + LayRestore(); + LaySetCursor(); + } +- +-void +-/*VARARGS2*/ +-#if defined(USEVARARGS) && defined(__STDC__) +-LMsg(int err, char *fmt, VA_DOTS) +-#else +-LMsg(err, fmt, VA_DOTS) +-int err; +-char *fmt; +-VA_DECL +-#endif +-{ +- VA_LIST(ap) +- char buf[MAXPATHLEN*2]; +- char *p = buf; +- struct canvas *cv; +- +- VA_START(ap, fmt); +- fmt = DoNLS(fmt); +- (void)vsnprintf(p, sizeof(buf) - 100, fmt, VA_ARGS(ap)); +- VA_END(ap); +- if (err) +- { +- p += strlen(p); +- *p++ = ':'; +- *p++ = ' '; +- strncpy(p, strerror(err), buf + sizeof(buf) - p - 1); +- buf[sizeof(buf) - 1] = 0; +- } +- debug2("LMsg('%s') (%#x);\n", buf, (unsigned int)flayer); +- for (display = displays; display; display = display->d_next) +- { +- for (cv = D_cvlist; cv; cv = cv->c_next) +- if (cv->c_layer == flayer) +- break; +- if (cv == 0) +- continue; +- MakeStatus(buf); +- } +-} +- +diff -Naur screen-4.0.3.orig/layer.h screen-4.0.3/layer.h +--- screen-4.0.3.orig/layer.h 2002-01-08 16:42:25.000000000 +0100 ++++ screen-4.0.3/layer.h 2008-06-01 23:39:31.000000000 +0200 +@@ -19,7 +19,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: overlay.h,v 1.3 1994/05/31 12:32:31 mlschroe Exp $ FAU ++ * $Id: layer.h,v 1.12 2005/12/16 18:51:07 jnweiger Exp $ FAU + */ + + /* +diff -Naur screen-4.0.3.orig/logfile.h screen-4.0.3/logfile.h +--- screen-4.0.3.orig/logfile.h 2002-01-08 16:42:27.000000000 +0100 ++++ screen-4.0.3/logfile.h 2008-06-01 23:39:31.000000000 +0200 +@@ -19,7 +19,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: logfile.h,v 1.11 1994/05/31 12:33:27 jnweiger Exp $ FAU ++ * $Id: logfile.h,v 1.12 2005/12/16 18:51:07 jnweiger Exp $ FAU + */ + + struct logfile +diff -Naur screen-4.0.3.orig/mark.h screen-4.0.3/mark.h +--- screen-4.0.3.orig/mark.h 2002-01-08 16:42:30.000000000 +0100 ++++ screen-4.0.3/mark.h 2008-06-01 23:39:31.000000000 +0200 +@@ -19,7 +19,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: mark.h,v 1.1.1.1 1993/06/16 23:51:13 jnweiger Exp $ FAU ++ * $Id: mark.h,v 1.21 2005/12/16 18:51:07 jnweiger Exp $ FAU + */ + + struct markdata +diff -Naur screen-4.0.3.orig/misc.c screen-4.0.3/misc.c +--- screen-4.0.3.orig/misc.c 2003-12-05 14:45:41.000000000 +0100 ++++ screen-4.0.3/misc.c 2008-06-01 23:39:31.000000000 +0200 +@@ -613,7 +613,7 @@ + */ + # endif /* NEEDSETENV */ + #else /* USESETENV */ +-# if defined(linux) || defined(__convex__) || (BSD >= 199103) ++# if defined(linux) || defined(__convex__) || (BSD >= 199103) || defined(_AIX) || defined(__GLIBC__) + setenv(var, value, 1); + # else + setenv(var, value); +diff -Naur screen-4.0.3.orig/os.h screen-4.0.3/os.h +--- screen-4.0.3.orig/os.h 2002-01-08 16:42:33.000000000 +0100 ++++ screen-4.0.3/os.h 2008-06-01 23:39:31.000000000 +0200 +@@ -19,7 +19,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: os.h,v 1.10 1994/05/31 12:32:22 mlschroe Exp $ FAU ++ * $Id: os.h,v 1.22 2005/12/19 16:13:08 jnweiger Exp $ FAU + */ + + #include +@@ -156,12 +156,12 @@ + # endif + #endif + +-#ifdef hpux ++#if defined(HAVE_SETRESUID) && !defined(HAVE_SETREUID) + # define setreuid(ruid, euid) setresuid(ruid, euid, -1) + # define setregid(rgid, egid) setresgid(rgid, egid, -1) + #endif + +-#if defined(HAVE_SETEUID) || defined(HAVE_SETREUID) ++#if defined(HAVE_SETEUID) || defined(HAVE_SETREUID) || defined(HAVE_SETRESUID) + # define USE_SETEUID + #endif + +diff -Naur screen-4.0.3.orig/osdef.h.in screen-4.0.3/osdef.h.in +--- screen-4.0.3.orig/osdef.h.in 2001-04-28 15:26:43.000000000 +0200 ++++ screen-4.0.3/osdef.h.in 2008-06-01 23:39:31.000000000 +0200 +@@ -19,7 +19,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: osdef.h.in,v 1.2 1994/05/31 12:32:25 mlschroe Exp $ FAU ++ * $Id: osdef.h.in,v 1.20 2005/12/19 16:13:08 jnweiger Exp $ FAU + */ + + /**************************************************************** +@@ -82,14 +82,13 @@ + + extern int getdtablesize __P((void)); + +-#ifdef HAVE_SETREUID +-# ifdef hpux ++#ifdef HAVE_SETRESUID + extern int setresuid __P((int, int, int)); + extern int setresgid __P((int, int, int)); +-# else ++#endif ++#ifdef HAVE_SETREUID + extern int setreuid __P((int, int)); + extern int setregid __P((int, int)); +-# endif + #endif + #ifdef HAVE_SETEUID + extern int seteuid __P((int)); +diff -Naur screen-4.0.3.orig/patchlevel.h screen-4.0.3/patchlevel.h +--- screen-4.0.3.orig/patchlevel.h 2006-10-23 15:04:11.000000000 +0200 ++++ screen-4.0.3/patchlevel.h 2008-06-01 23:39:31.000000000 +0200 +@@ -19,7 +19,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: patchlevel.h,v 1.17 1994/05/31 12:32:35 mlschroe Exp $ FAU ++ * $Id: patchlevel.h,v 1.34 2006/05/02 12:58:25 mls Exp $ FAU + */ + + /**************************************************************** +@@ -519,14 +519,15 @@ + * 05.12.2003 4.00.02 fixed a bug in the ansi parser. fixed execs + * on ttys. fixed hardstatus line on blanked screen. + * -- DISTRIBUTED +- * 23.10.2006 4.00.03 fixed two bug in combining characters handling +- * (cstone & Rich Felker). +- * -- DISTRIBUTED ++ * 11.10.2004, 4.00.03jw handle StartRc errors nonfatal if due to a msg. ++ * 12.10.2004, 4.00.03jw1 let docu of 'split' 'focus' 'remove' and 'only' refer to each other. ++ * 01.11.2004, 4.00.03jw2 zombie command has new option 'onerror' ++ * 2005-12-19, 4.00.03jw3 syntax error. + */ + + #define ORIGIN "FAU" + #define REV 4 + #define VERS 0 + #define PATCHLEVEL 3 +-#define DATE "23-Oct-06" +-#define STATE "" ++#define DATE "2-May-06" ++#define STATE "jw4" +diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c +--- screen-4.0.3.orig/process.c 2003-09-18 14:53:54.000000000 +0200 ++++ screen-4.0.3/process.c 2008-06-01 23:39:31.000000000 +0200 +@@ -59,6 +59,7 @@ + extern char SockPath[], *SockName; + extern int TtyMode, auto_detach, use_altscreen; + extern int iflag, maxwin; ++extern int focusminwidth, focusminheight; + extern int use_hardstatus, visual_bell; + #ifdef COLOR + extern int attr2color[][4]; +@@ -71,6 +72,7 @@ + extern int defnonblock; + extern int ZombieKey_destroy; + extern int ZombieKey_resurrect; ++extern int ZombieKey_onerror; + #ifdef AUTO_NUKE + extern int defautonuke; + #endif +@@ -145,15 +147,19 @@ + static void digraph_fn __P((char *, int, char *)); + static void confirm_fn __P((char *, int, char *)); + static int IsOnDisplay __P((struct win *)); +-static void ResizeRegions __P((char*)); ++static void ResizeRegions __P((char *, int)); + static void ResizeFin __P((char *, int, char *)); + static struct action *FindKtab __P((char *, int)); ++static void SelectFin __P((char *, int, char *)); ++static void SelectLayoutFin __P((char *, int, char *)); + + + extern struct layer *flayer; + extern struct display *display, *displays; + extern struct win *fore, *console_window, *windows; + extern struct acluser *users; ++extern struct layout *layouts, *layout_attach, layout_last_marker; ++extern struct layout *laytab[]; + + extern char screenterm[], HostName[], version[]; + extern struct NewWindow nwin_undef, nwin_default; +@@ -197,11 +203,11 @@ + char **blankerprg; + #endif + +-struct action ktab[256]; /* command key translation table */ ++struct action ktab[256 + KMAP_KEYS]; /* command key translation table */ + struct kclass { + struct kclass *next; + char *name; +- struct action ktab[256]; ++ struct action ktab[256 + KMAP_KEYS]; + }; + struct kclass *kclasses; + +@@ -390,6 +396,20 @@ + {'"', '~', 223} /* ß */ + }; + ++#define RESIZE_FLAG_H 1 ++#define RESIZE_FLAG_V 2 ++#define RESIZE_FLAG_L 4 ++ ++static char *resizeprompts[] = { ++ "resize # lines: ", ++ "resize -h # lines: ", ++ "resize -v # lines: ", ++ "resize -b # lines: ", ++ "resize -l # lines: ", ++ "resize -l -h # lines: ", ++ "resize -l -v # lines: ", ++ "resize -l -b # lines: ", ++}; + + char *noargs[1]; + +@@ -552,6 +572,18 @@ + ktab['X'].nr = RC_REMOVE; + ktab['F'].nr = RC_FIT; + ktab['\t'].nr = RC_FOCUS; ++ { ++ char *args[2]; ++ args[0] = "up"; ++ args[1] = 0; ++ SaveAction(ktab + T_BACKTAB - T_CAPS + 256, RC_FOCUS, args, 0); ++ } ++ { ++ char *args[2]; ++ args[0] = "-v"; ++ args[1] = 0; ++ SaveAction(ktab + '|', RC_SPLIT, args, 0); ++ } + /* These come last; they may want overwrite others: */ + if (DefaultEsc >= 0) + { +@@ -1174,9 +1206,9 @@ + if (key >= 0) + { + #ifdef PSEUDOS +- Input(fore->w_pwin ? "Really kill this filter [y/n]" : "Really kill this window [y/n]", 1, INP_RAW, confirm_fn, (char *)RC_KILL); ++ Input(fore->w_pwin ? "Really kill this filter [y/n]" : "Really kill this window [y/n]", 1, INP_RAW, confirm_fn, NULL, RC_KILL); + #else +- Input("Really kill this window [y/n]", 1, INP_RAW, confirm_fn, (char *)RC_KILL); ++ Input("Really kill this window [y/n]", 1, INP_RAW, confirm_fn, NULL, RC_KILL); + #endif + break; + } +@@ -1199,7 +1231,7 @@ + case RC_QUIT: + if (key >= 0) + { +- Input("Really quit and kill all your windows [y/n]", 1, INP_RAW, confirm_fn, (char *)RC_QUIT); ++ Input("Really quit and kill all your windows [y/n]", 1, INP_RAW, confirm_fn, NULL, RC_QUIT); + break; + } + Finit(0); +@@ -1218,7 +1250,7 @@ + static char buf[2]; + + buf[0] = key; +- Input(buf, 1, INP_RAW, pow_detach_fn, NULL); ++ Input(buf, 1, INP_RAW, pow_detach_fn, NULL, 0); + } + else + Detach(D_POWER); /* detach and kill Attacher's parent */ +@@ -1307,6 +1339,17 @@ + Msg(0, "%s:zombie: one or two characters expected.", rc_name); + break; + } ++ if (args[1]) ++ { ++ if (!strcmp(args[1], "onerror")) ++ { ++ ZombieKey_onerror = 1; ++ } else { ++ Msg(0, "usage: zombie [keys [onerror]]"); ++ break; ++ } ++ } else ++ ZombieKey_onerror = 0; + ZombieKey_destroy = args[0][0]; + ZombieKey_resurrect = *argl == 2 ? args[0][1] : 0; + } +@@ -1504,7 +1547,7 @@ + */ + if ((s = *args) == NULL) + { +- Input("Copy to register:", 1, INP_RAW, copy_reg_fn, NULL); ++ Input("Copy to register:", 1, INP_RAW, copy_reg_fn, NULL, 0); + break; + } + if (*argl != 1) +@@ -1602,7 +1645,7 @@ + case RC_PROCESS: + if ((s = *args) == NULL) + { +- Input("Process register:", 1, INP_RAW, process_fn, NULL); ++ Input("Process register:", 1, INP_RAW, process_fn, NULL, 0); + break; + } + if (*argl != 1) +@@ -1891,7 +1934,7 @@ + ChangeAKA(fore, *args, strlen(*args)); + break; + case RC_COLON: +- Input(":", 100, INP_COOKED, Colonfin, NULL); ++ Input(":", 100, INP_COOKED, Colonfin, NULL, 0); + if (*args && **args) + { + s = *args; +@@ -2027,15 +2070,15 @@ + #endif + case RC_WINDOWLIST: + if (!*args) +- display_wlist(0, WLIST_NUM); ++ display_wlist(0, WLIST_NUM, (char *)0); + else if (!strcmp(*args, "-m") && !args[1]) +- display_wlist(0, WLIST_MRU); ++ display_wlist(0, WLIST_MRU, (char *)0); + else if (!strcmp(*args, "-b") && !args[1]) +- display_wlist(1, WLIST_NUM); ++ display_wlist(1, WLIST_NUM, (char *)0); + else if (!strcmp(*args, "-b") && !strcmp(args[1], "-m") && !args[2]) +- display_wlist(1, WLIST_MRU); ++ display_wlist(1, WLIST_MRU, (char *)0); + else if (!strcmp(*args, "-m") && !strcmp(args[1], "-b") && !args[2]) +- display_wlist(1, WLIST_MRU); ++ display_wlist(1, WLIST_MRU, (char *)0); + else if (!strcmp(*args, "string")) + { + if (args[1]) +@@ -2118,7 +2161,7 @@ + */ + if ((s = *args) == NULL) + { +- Input("Paste from register:", 1, INP_RAW, ins_reg_fn, NULL); ++ Input("Paste from register:", 1, INP_RAW, ins_reg_fn, NULL, 0); + break; + } + if (args[1] == 0 && !fore) /* no window? */ +@@ -3004,28 +3047,59 @@ + Msg(0, "%s: password: window required", rc_name); + break; + } +- Input("New screen password:", 100, INP_NOECHO, pass1, display ? (char *)D_user : (char *)users); ++ Input("New screen password:", 100, INP_NOECHO, pass1, display ? (char *)D_user : (char *)users, 0); + } + break; + #endif /* PASSWORD */ + case RC_BIND: + { + struct action *ktabp = ktab; ++ int kflag = 0; + +- if (argc > 2 && !strcmp(*args, "-c")) ++ for (;;) + { +- ktabp = FindKtab(args[1], 1); +- if (ktabp == 0) +- break; +- args += 2; +- argl += 2; ++ if (argc > 2 && !strcmp(*args, "-c")) ++ { ++ ktabp = FindKtab(args[1], 1); ++ if (ktabp == 0) ++ break; ++ args += 2; ++ argl += 2; ++ argc -= 2; ++ } ++ else if (argc > 1 && !strcmp(*args, "-k")) ++ { ++ kflag = 1; ++ args++; ++ argl++; ++ argc--; ++ } ++ else ++ break; ++ } ++#ifdef MAPKEYS ++ if (kflag) ++ { ++ for (n = 0; n < KMAP_KEYS; n++) ++ if (strcmp(term[n + T_CAPS].tcname, *args) == 0) ++ break; ++ if (n == KMAP_KEYS) ++ { ++ Msg(0, "%s: bind: unknown key '%s'", rc_name, *args); ++ break; ++ } ++ n += 256; + } ++ else ++#endif + if (*argl != 1) + { + Msg(0, "%s: bind: character, ^x, or (octal) \\032 expected.", rc_name); + break; + } +- n = (unsigned char)args[0][0]; ++ else ++ n = (unsigned char)args[0][0]; ++ + if (args[1]) + { + if ((i = FindCommnr(args[1])) == RC_ILLEGAL) +@@ -3496,7 +3570,7 @@ + break; + + case RC_DIGRAPH: +- Input("Enter digraph: ", 10, INP_EVERY, digraph_fn, NULL); ++ Input("Enter digraph: ", 10, INP_EVERY, digraph_fn, NULL, 0); + if (*args && **args) + { + s = *args; +@@ -3649,7 +3723,11 @@ + break; + #endif /* MULTIUSER */ + case RC_SPLIT: +- AddCanvas(); ++ s = args[0]; ++ if (s && !strcmp(s, "-v")) ++ AddCanvas(SLICE_HORI); ++ else ++ AddCanvas(SLICE_VERT); + Activate(-1); + break; + case RC_REMOVE: +@@ -3692,6 +3770,14 @@ + Msg(0, "%s: usage: focus [up|down|top|bottom]", rc_name); + break; + } ++ if ((focusminwidth && (focusminwidth < 0 || D_forecv->c_xe - D_forecv->c_xs + 1 < focusminwidth)) || ++ (focusminheight && (focusminheight < 0 || D_forecv->c_ye - D_forecv->c_ys + 1 < focusminheight))) ++ { ++ ResizeCanvas(&D_canvas); ++ RecreateCanvasChain(); ++ RethinkDisplayViewports(); ++ ResizeLayersToCanvases(); /* redisplays */ ++ } + fore = D_fore = Layer2Window(D_forecv->c_layer); + flayer = D_forecv->c_layer; + #ifdef RXVT_OSC +@@ -3710,22 +3796,49 @@ + WindowChanged(0, 'F'); + break; + case RC_RESIZE: ++ i = 0; ++ if (D_forecv->c_slorient == SLICE_UNKN) ++ { ++ Msg(0, "resize: need more than one region"); ++ break; ++ } ++ for (; *args; args++) ++ { ++ if (!strcmp(*args, "-h")) ++ i |= RESIZE_FLAG_H; ++ else if (!strcmp(*args, "-v")) ++ i |= RESIZE_FLAG_V; ++ else if (!strcmp(*args, "-b")) ++ i |= RESIZE_FLAG_H | RESIZE_FLAG_V; ++ else if (!strcmp(*args, "-p")) ++ i |= D_forecv->c_slorient == SLICE_VERT ? RESIZE_FLAG_H : RESIZE_FLAG_V; ++ else if (!strcmp(*args, "-l")) ++ i |= RESIZE_FLAG_L; ++ else ++ break; ++ } ++ if (*args && args[1]) ++ { ++ Msg(0, "%s: usage: resize [-h] [-v] [-l] [num]\n", rc_name); ++ break; ++ } + if (*args) +- ResizeRegions(*args); ++ ResizeRegions(*args, 0); + else +- Input("resize # lines: ", 20, INP_COOKED, ResizeFin, (char*)0); ++ Input(resizeprompts[i], 20, INP_EVERY, ResizeFin, (char*)0, i); + break; + case RC_SETSID: + (void)ParseSwitch(act, &separate_sids); + break; + case RC_EVAL: +- for (; *args; args++) ++ args = SaveArgs(args); ++ for (i = 0; args[i]; i++) + { +- char *ss = SaveStr(*args); +- if (*ss) +- Colonfin(ss, strlen(ss), (char *)0); +- free(ss); ++ if (args[i][0]) ++ Colonfin(args[i], strlen(args[i]), (char *)0); ++ free(args[i]); + } ++ free(args); + break; + case RC_ALTSCREEN: + (void)ParseSwitch(act, &use_altscreen); +@@ -3821,6 +3934,223 @@ + Msg(0, "idle off"); + } + break; ++ case RC_FOCUSMINSIZE: ++ for (i = 0; i < 2 && args[i]; i++) ++ { ++ if (!strcmp(args[i], "max") || !strcmp(args[i], "_")) ++ n = -1; ++ else ++ n = atoi(args[i]); ++ if (i == 0) ++ focusminwidth = n; ++ else ++ focusminheight = n; ++ } ++ if (msgok) ++ { ++ char b[2][20]; ++ for (i = 0; i < 2; i++) ++ { ++ n = i == 0 ? focusminwidth : focusminheight; ++ if (n == -1) ++ strcpy(b[i], "max"); ++ else ++ sprintf(b[i], "%d", n); ++ } ++ Msg(0, "focus min size is %s %s\n", b[0], b[1]); ++ } ++ break; ++ case RC_GROUP: ++ if (*args) ++ { ++ fore->w_group = 0; ++ if (args[0][0]) ++ { ++ fore->w_group = WindowByName(*args); ++ if (fore->w_group && fore->w_group != W_TYPE_GROUP) ++ fore->w_group = 0; ++ } ++ } ++ if (msgok) ++ { ++ if (fore->w_group) ++ Msg(0, "window group is %d (%s)\n", fore->w_group->w_number, fore->w_group->w_title); ++ else ++ Msg(0, "window belongs to no group"); ++ } ++ break; ++ case RC_LAYOUT: ++ if (!strcmp(args[0], "title")) ++ { ++ if (!D_layout) ++ { ++ Msg(0, "not on a layout"); ++ break; ++ } ++ if (!args[1]) ++ { ++ Msg(0, "current layout is %d (%s)", D_layout->lay_number, D_layout->lay_title); ++ break; ++ } ++ free(D_layout->lay_title); ++ D_layout->lay_title= SaveStr(args[1]); ++ } ++ else if (!strcmp(args[0], "number")) ++ { ++ int old; ++ struct layout *lay; ++ if (!args[1]) ++ { ++ Msg(0, "This is layout %d (%s).\n", D_layout->lay_number, D_layout->lay_title); ++ break; ++ } ++ old = D_layout->lay_number; ++ n = atoi(args[1]); ++ if (n < 0 || n >= MAXLAY) ++ break; ++ lay = laytab[n]; ++ laytab[n] = D_layout; ++ D_layout->lay_number = n; ++ laytab[old] = lay; ++ if (lay) ++ lay->lay_number = old; ++ break; ++ } ++ else if (!strcmp(args[0], "autosave")) ++ { ++ if (!D_layout) ++ { ++ Msg(0, "not on a layout"); ++ break; ++ } ++ if (args[1]) ++ { ++ if (!strcmp(args[1], "on")) ++ D_layout->lay_autosave = 1; ++ else if (!strcmp(args[1], "off")) ++ D_layout->lay_autosave = 0; ++ else ++ { ++ Msg(0, "invalid argument. Give 'on' or 'off"); ++ break; ++ } ++ } ++ if (msgok) ++ Msg(0, "autosave is %s", D_layout->lay_autosave ? "on" : "off"); ++ } ++ else if (!strcmp(args[0], "new")) ++ { ++ char *t = args[1]; ++ n = 0; ++ if (t) ++ { ++ while (*t >= '0' && *t <= '9') ++ t++; ++ if (t != args[1] && (!*t || *t == ':')) ++ { ++ n = atoi(args[1]); ++ if (*t) ++ t++; ++ } ++ else ++ t = args[1]; ++ } ++ if (!t || !*t) ++ t = "layout"; ++ NewLayout(t, n); ++ Activate(-1); ++ } ++ else if (!strcmp(args[0], "save")) ++ { ++ if (!args[1]) ++ { ++ Msg(0, "usage: layout save "); ++ break; ++ } ++ SaveLayout(args[1], &D_canvas); ++ } ++ else if (!strcmp(args[0], "select")) ++ { ++ struct layout *lay; ++ if (!args[1]) ++ { ++ Input("Switch to layout: ", 20, INP_COOKED, SelectLayoutFin, NULL, 0); ++ break; ++ } ++ SelectLayoutFin(args[1], strlen(args[1]), (char *)0); ++ } ++ else if (!strcmp(args[0], "next")) ++ { ++ struct layout *lay = D_layout; ++ if (lay) ++ lay = lay->lay_next ? lay->lay_next : layouts; ++ else ++ lay = layouts; ++ if (!lay) ++ { ++ Msg(0, "no layout defined"); ++ break; ++ } ++ if (lay == D_layout) ++ break; ++ LoadLayout(lay, &D_canvas); ++ Activate(-1); ++ } ++ else if (!strcmp(args[0], "prev")) ++ { ++ struct layout *lay = D_layout; ++ if (lay) ++ { ++ for (lay = layouts; lay->lay_next && lay->lay_next != D_layout; lay = lay->lay_next) ++ ; ++ } ++ else ++ lay = layouts; ++ if (!lay) ++ { ++ Msg(0, "no layout defined"); ++ break; ++ } ++ if (lay == D_layout) ++ break; ++ LoadLayout(lay, &D_canvas); ++ Activate(-1); ++ } ++ else if (!strcmp(args[0], "attach")) ++ { ++ if (!args[1]) ++ { ++ if (!layout_attach) ++ Msg(0, "no attach layout set"); ++ else if (layout_attach == &layout_last_marker) ++ Msg(0, "will attach to last layout"); ++ else ++ Msg(0, "will attach to layout %d (%s)", layout_attach->lay_number, layout_attach->lay_title); ++ break; ++ } ++ if (!strcmp(args[1], ":last")) ++ layout_attach = &layout_last_marker; ++ else if (!args[1][0]) ++ layout_attach = 0; ++ else ++ { ++ struct layout *lay; ++ lay = FindLayout(args[1]); ++ if (!lay) ++ { ++ Msg(0, "unknown layout '%s'", args[1]); ++ break; ++ } ++ layout_attach = lay; ++ } ++ } ++ else if (!strcmp(args[0], "show")) ++ { ++ ShowLayouts(-1); ++ } ++ else ++ Msg(0, "unknown layout subcommand"); ++ break; + default: + #ifdef HAVE_BRAILLE + /* key == -2: input from braille keybord, msgok always 0 */ +@@ -4480,16 +4810,23 @@ + } + + /* find right layer to display on canvas */ +- if (wi) ++ if (wi && wi->w_type != W_TYPE_GROUP) + { + l = &wi->w_layer; + if (wi->w_savelayer && (wi->w_blocked || wi->w_savelayer->l_cvlist == 0)) + l = wi->w_savelayer; + } + else +- l = &cv->c_blank; ++ { ++ l = &cv->c_blank; ++ if (wi) ++ l->l_data = (char *)wi; ++ else ++ l->l_data = 0; ++ } + + /* add our canvas to the layer's canvaslist */ ++ ASSERT(l->l_cvlist != cv); + cv->c_lnext = l->l_cvlist; + l->l_cvlist = cv; + cv->c_layer = l; +@@ -4500,6 +4837,17 @@ + if (flayer == 0) + flayer = l; + ++ if (wi && wi->w_type == W_TYPE_GROUP) ++ { ++ /* auto-start windowlist on groups */ ++ struct display *d = display; ++ struct layer *oldflayer = flayer; ++ flayer = l; ++ display_wlist(0, 0, wi); ++ flayer = oldflayer; ++ display = d; ++ } ++ + if (wi && D_other == wi) + D_other = wi->w_next; /* Might be 0, but that's OK. */ + if (cv == D_forecv) +@@ -4603,15 +4951,21 @@ + NextWindow() + { + register struct win **pp; +- int n = fore ? fore->w_number : -1; ++ int n = fore ? fore->w_number : MAXWIN; ++ char *group = fore ? fore->w_group : 0; + +- for (pp = wtab + n + 1; pp != wtab + n; pp++) ++ for (pp = fore ? wtab + n + 1 : wtab; pp != wtab + n; pp++) + { + if (pp == wtab + MAXWIN) + pp = wtab; + if (*pp) +- break; ++ { ++ if (!fore || group == (*pp)->w_group) ++ break; ++ } + } ++ if (pp == wtab + n) ++ return -1; + return pp - wtab; + } + +@@ -4619,15 +4973,21 @@ + PreviousWindow() + { + register struct win **pp; +- int n = fore ? fore->w_number : MAXWIN - 1; ++ int n = fore ? fore->w_number : -1; ++ char *group = fore ? fore->w_group : 0; + + for (pp = wtab + n - 1; pp != wtab + n; pp--) + { +- if (pp < wtab) ++ if (pp == wtab - 1) + pp = wtab + MAXWIN - 1; + if (*pp) +- break; ++ { ++ if (!fore || group == (*pp)->w_group) ++ break; ++ } + } ++ if (pp == wtab + n) ++ return -1; + return pp - wtab; + } + +@@ -4756,6 +5116,8 @@ + continue; + if ((flags & 1) && display && p == D_fore) + continue; ++ if (D_fore && D_fore->w_group != p->w_group) ++ continue; + + cmd = p->w_title; + l = strlen(cmd); +@@ -4821,7 +5183,7 @@ + strcpy(s, "(L)"); + s += 3; + } +- if (p->w_ptyfd < 0) ++ if (p->w_ptyfd < 0 && p->w_type != W_TYPE_GROUP) + *s++ = 'Z'; + *s = 0; + return s; +@@ -4841,7 +5203,7 @@ + s = buf; + for (display = displays; display; display = display->d_next) + { +- if (D_user == olddisplay->d_user) ++ if (olddisplay && D_user == olddisplay->d_user) + continue; + for (cv = D_cvlist; cv; cv = cv->c_next) + if (Layer2Window(cv->c_layer) == p) +@@ -5062,7 +5424,7 @@ + { + char *s, *ss; + int n; +- Input("Set window's title to: ", sizeof(fore->w_akabuf) - 1, INP_COOKED, AKAfin, NULL); ++ Input("Set window's title to: ", sizeof(fore->w_akabuf) - 1, INP_COOKED, AKAfin, NULL, 0); + s = fore->w_title; + if (!s) + return; +@@ -5116,11 +5478,41 @@ + return; + SwitchWindow(n); + } ++ ++static void ++SelectLayoutFin(buf, len, data) ++char *buf; ++int len; ++char *data; /* dummy */ ++{ ++ int n; ++ struct layout *lay; ++ ++ if (!len || !display) ++ return; ++ if (len == 1 && *buf == '-') ++ { ++ LoadLayout((struct layout *)0); ++ Activate(0); ++ return; ++ } ++ lay = FindLayout(buf); ++ if (!lay) ++ Msg(0, "No such layout\n"); ++ else if (lay == D_layout) ++ Msg(0, "This IS layout %d (%s).\n", lay->lay_number, lay->lay_title); ++ else ++ { ++ LoadLayout(lay, &D_canvas); ++ Activate(0); ++ } ++} ++ + + static void + InputSelect() + { +- Input("Switch to window: ", 20, INP_COOKED, SelectFin, NULL); ++ Input("Switch to window: ", 20, INP_COOKED, SelectFin, NULL, 0); + } + + static char setenv_var[31]; +@@ -5160,10 +5552,10 @@ + { + strncpy(setenv_var, arg, sizeof(setenv_var) - 1); + sprintf(setenv_buf, "Enter value for %s: ", setenv_var); +- Input(setenv_buf, 30, INP_COOKED, SetenvFin2, NULL); ++ Input(setenv_buf, 30, INP_COOKED, SetenvFin2, NULL, 0); + } + else +- Input("Setenv: Enter variable name: ", 30, INP_COOKED, SetenvFin1, NULL); ++ Input("Setenv: Enter variable name: ", 30, INP_COOKED, SetenvFin1, NULL, 0); + } + + /* +@@ -5413,16 +5805,15 @@ + { + struct plop *pp = plop_tab + (int)(unsigned char)*buf; + +- +- if (!fore) +- return; /* Input() should not call us w/o fore, but you never know... */ +- if (*buf == '.') +- Msg(0, "ins_reg_fn: Warning: pasting real register '.'!"); + if (len) + { + *buf = 0; + return; + } ++ if (!fore) ++ return; /* Input() should not call us w/o fore, but you never know... */ ++ if (*buf == '.') ++ Msg(0, "ins_reg_fn: Warning: pasting real register '.'!"); + if (pp->buf) + { + MakePaster(&fore->w_paster, pp->buf, pp->len, 0); +@@ -5457,7 +5848,7 @@ + confirm_fn(buf, len, data) + char *buf; + int len; +-char *data; /* dummy */ ++char *data; + { + struct action act; + +@@ -5466,7 +5857,7 @@ + *buf = 0; + return; + } +- act.nr = (int)data; ++ act.nr = *(int *)data; + act.args = noargs; + act.argl = 0; + DoAction(&act, -1); +@@ -5500,11 +5891,11 @@ + if (buf && len) + strncpy(p, buf, 1 + (l < len) ? l : len); + if (!*i->name) +- Input("Screen User: ", sizeof(i->name) - 1, INP_COOKED, su_fin, (char *)i); ++ Input("Screen User: ", sizeof(i->name) - 1, INP_COOKED, su_fin, (char *)i, 0); + else if (!*i->pw1) +- Input("User's UNIX Password: ", sizeof(i->pw1)-1, INP_COOKED|INP_NOECHO, su_fin, (char *)i); ++ Input("User's UNIX Password: ", sizeof(i->pw1)-1, INP_COOKED|INP_NOECHO, su_fin, (char *)i, 0); + else if (!*i->pw2) +- Input("User's Screen Password: ", sizeof(i->pw2)-1, INP_COOKED|INP_NOECHO, su_fin, (char *)i); ++ Input("User's Screen Password: ", sizeof(i->pw2)-1, INP_COOKED|INP_NOECHO, su_fin, (char *)i, 0); + else + { + if ((p = DoSu(i->up, i->name, i->pw2, i->pw1))) +@@ -5550,7 +5941,7 @@ + free((char *)u->u_password); + u->u_password = SaveStr(buf); + bzero(buf, strlen(buf)); +- Input("Retype new password:", 100, INP_NOECHO, pass2, data); ++ Input("Retype new password:", 100, INP_NOECHO, pass2, data, 0); + } + + static void +@@ -5623,6 +6014,7 @@ + ch = buf[len]; + if (ch) + { ++ buf[len + 1] = ch; /* so we can restore it later */ + if (ch < ' ' || ch == '\177') + return; + if (len >= 1 && ((*buf == 'U' && buf[1] == '+') || (*buf == '0' && (buf[1] == 'x' || buf[1] == 'X')))) +@@ -5653,8 +6045,13 @@ + buf[len] = '\n'; + return; + } +- buf[len] = buf[len + 1]; /* gross */ +- len++; ++ if (len < 1) ++ return; ++ if (buf[len + 1]) ++ { ++ buf[len] = buf[len + 1]; /* stored above */ ++ len++; ++ } + if (len < 2) + return; + if (len >= 1 && ((*buf == 'U' && buf[1] == '+') || (*buf == '0' && (buf[1] == 'x' || buf[1] == 'X')))) +@@ -5711,12 +6108,26 @@ + int i; + { + struct action *act; ++ int discard = 0; + + debug1("StuffKey #%d", i); + #ifdef DEBUG + if (i < KMAP_KEYS) + debug1(" - %s", term[i + T_CAPS].tcname); + #endif ++ ++ if (i < KMAP_KEYS && D_ESCseen) ++ { ++ struct action *act = &D_ESCseen[i + 256]; ++ if (act->nr != RC_ILLEGAL) ++ { ++ D_ESCseen = 0; ++ DoAction(act, i + 256); ++ return 0; ++ } ++ discard = 1; ++ } ++ + if (i >= T_CURSOR - T_CAPS && i < T_KEYPAD - T_CAPS && D_cursorkeys) + i += T_OCAPS - T_CURSOR; + else if (i >= T_KEYPAD - T_CAPS && i < T_OCAPS - T_CAPS && D_keypad) +@@ -5731,9 +6142,16 @@ + #endif + if ((!act || act->nr == RC_ILLEGAL) && !D_mapdefault) + act = i < KMAP_KEYS+KMAP_AKEYS ? &umtab[i] : &kmap_exts[i - (KMAP_KEYS+KMAP_AKEYS)].um; +- D_mapdefault = 0; + if (!act || act->nr == RC_ILLEGAL) + act = i < KMAP_KEYS+KMAP_AKEYS ? &dmtab[i] : &kmap_exts[i - (KMAP_KEYS+KMAP_AKEYS)].dm; ++ ++ if (discard && (!act || act->nr != RC_COMMAND)) ++ { ++ D_ESCseen = 0; ++ return 0; ++ } ++ D_mapdefault = 0; ++ + if (act == 0 || act->nr == RC_ILLEGAL) + return -1; + DoAction(act, 0); +@@ -5873,53 +6291,243 @@ + + #endif + ++static int ++CalcSlicePercent(cv, percent) ++struct canvas *cv; ++int percent; ++{ ++ int w, wsum, up; ++ if (!cv || !cv->c_slback) ++ return percent; ++ up = CalcSlicePercent(cv->c_slback->c_slback, percent); ++ w = cv->c_slweight; ++ for (cv = cv->c_slback->c_slperp, wsum = 0; cv; cv = cv->c_slnext) ++ wsum += cv->c_slweight; ++ if (wsum == 0) ++ return 0; ++ return (up * w) / wsum; ++} ++ ++static int ++ChangeCanvasSize(fcv, abs, diff, gflag, percent) ++struct canvas *fcv; /* make this canvas bigger */ ++int abs; /* mode: 0:rel 1:abs 2:max */ ++int diff; /* change this much */ ++int gflag; /* go up if neccessary */ ++int percent; ++{ ++ struct canvas *cv; ++ int done, have, m, dir; ++ ++ debug3("ChangeCanvasSize abs %d diff %d percent=%d\n", abs, diff, percent); ++ if (abs == 0 && diff == 0) ++ return 0; ++ if (abs == 2) ++ { ++ if (diff == 0) ++ fcv->c_slweight = 0; ++ else ++ { ++ for (cv = fcv->c_slback->c_slperp; cv; cv = cv->c_slnext) ++ cv->c_slweight = 0; ++ fcv->c_slweight = 1; ++ cv = fcv->c_slback->c_slback; ++ if (gflag && cv && cv->c_slback) ++ ChangeCanvasSize(cv, abs, diff, gflag, percent); ++ } ++ return diff; ++ } ++ if (abs) ++ { ++ if (diff < 0) ++ diff = 0; ++ if (percent && diff > percent) ++ diff = percent; ++ } ++ if (percent) ++ { ++ int wsum, up; ++ for (cv = fcv->c_slback->c_slperp, wsum = 0; cv; cv = cv->c_slnext) ++ wsum += cv->c_slweight; ++ if (wsum) ++ { ++ up = gflag ? CalcSlicePercent(fcv->c_slback->c_slback, percent) : percent; ++ debug3("up=%d, wsum=%d percent=%d\n", up, wsum, percent); ++ if (wsum < 1000) ++ { ++ int scale = wsum < 10 ? 1000 : 100; ++ for (cv = fcv->c_slback->c_slperp; cv; cv = cv->c_slnext) ++ cv->c_slweight *= scale; ++ wsum *= scale; ++ debug1("scaled wsum to %d\n", wsum); ++ } ++ for (cv = fcv->c_slback->c_slperp; cv; cv = cv->c_slnext) ++ { ++ if (cv->c_slweight) ++ { ++ cv->c_slweight = (cv->c_slweight * up) / percent; ++ if (cv->c_slweight == 0) ++ cv->c_slweight = 1; ++ } ++ debug1(" - weight %d\n", cv->c_slweight); ++ } ++ diff = (diff * wsum) / percent; ++ percent = wsum; ++ } ++ } ++ else ++ { ++ if (abs && diff == (fcv->c_slorient == SLICE_VERT ? fcv->c_ye - fcv->c_ys + 2 : fcv->c_xe - fcv->c_xs + 2)) ++ return 0; ++ /* fix weights to real size (can't be helped, sorry) */ ++ for (cv = fcv->c_slback->c_slperp; cv; cv = cv->c_slnext) ++ { ++ cv->c_slweight = cv->c_slorient == SLICE_VERT ? cv->c_ye - cv->c_ys + 2 : cv->c_xe - cv->c_xs + 2; ++ debug1(" - weight %d\n", cv->c_slweight); ++ } ++ } ++ if (abs) ++ diff = diff - fcv->c_slweight; ++ debug1("diff = %d\n", diff); ++ if (diff == 0) ++ return 0; ++ if (diff < 0) ++ { ++ cv = fcv->c_slnext ? fcv->c_slnext : fcv->c_slprev; ++ fcv->c_slweight += diff; ++ cv->c_slweight -= diff; ++ return diff; ++ } ++ done = 0; ++ dir = 1; ++ for (cv = fcv->c_slnext; diff > 0; cv = dir > 0 ? cv->c_slnext : cv->c_slprev) ++ { ++ if (!cv) ++ { ++ debug1("reached end, dir is %d\n", dir); ++ if (dir == -1) ++ break; ++ dir = -1; ++ cv = fcv; ++ continue; ++ } ++ if (percent) ++ m = 1; ++ else ++ m = cv->c_slperp ? CountCanvasPerp(cv) * 2 : 2; ++ debug2("min is %d, have %d\n", m, cv->c_slweight); ++ if (cv->c_slweight > m) ++ { ++ have = cv->c_slweight - m; ++ if (have > diff) ++ have = diff; ++ debug1("subtract %d\n", have); ++ cv->c_slweight -= have; ++ done += have; ++ diff -= have; ++ } ++ } ++ if (diff && gflag) ++ { ++ /* need more room! */ ++ cv = fcv->c_slback->c_slback; ++ if (cv && cv->c_slback) ++ done += ChangeCanvasSize(fcv->c_slback->c_slback, 0, diff, gflag, percent); ++ } ++ fcv->c_slweight += done; ++ debug1("ChangeCanvasSize returns %d\n", done); ++ return done; ++} ++ + static void +-ResizeRegions(arg) ++ResizeRegions(arg, flags) + char *arg; ++int flags; + { + struct canvas *cv; +- int nreg, dsize, diff, siz; ++ int nreg, dsize, diff, siz, nsiz, l, done; ++ int gflag = 0, abs = 0, percent = 0; ++ int orient = 0; + + ASSERT(display); +- for (nreg = 0, cv = D_cvlist; cv; cv = cv->c_next) +- nreg++; +- if (nreg < 2) ++ if (D_forecv->c_slorient == SLICE_UNKN) + { + Msg(0, "resize: need more than one region"); + return; + } +- dsize = D_height - (D_has_hstatus == HSTATUS_LASTLINE); ++ gflag = flags & RESIZE_FLAG_L ? 0 : 1; ++ orient |= flags & RESIZE_FLAG_H ? SLICE_HORI : 0; ++ orient |= flags & RESIZE_FLAG_V ? SLICE_VERT : 0; ++ if (orient == 0) ++ orient = D_forecv->c_slorient; ++ l = strlen(arg); + if (*arg == '=') + { + /* make all regions the same height */ +- int h = dsize; +- int hh, i = 0; +- for (cv = D_cvlist; cv; cv = cv->c_next) +- { +- hh = h / nreg-- - 1; +- cv->c_ys = i; +- cv->c_ye = i + hh - 1; +- cv->c_yoff = i; +- i += hh + 1; +- h -= hh + 1; ++ struct canvas *cv = gflag ? &D_canvas : D_forecv->c_slback; ++ if (cv->c_slperp->c_slorient & orient) ++ EqualizeCanvas(cv->c_slperp, gflag); ++ /* can't use cv->c_slorient directly as it can be D_canvas */ ++ if ((cv->c_slperp->c_slorient ^ (SLICE_HORI ^ SLICE_VERT)) & orient) ++ { ++ if (cv->c_slback) ++ { ++ cv = cv->c_slback; ++ EqualizeCanvas(cv->c_slperp, gflag); ++ } ++ else ++ EqualizeCanvas(cv, gflag); + } ++ ResizeCanvas(cv); ++ RecreateCanvasChain(); + RethinkDisplayViewports(); + ResizeLayersToCanvases(); + return; + } +- siz = D_forecv->c_ye - D_forecv->c_ys + 1; +- if (*arg == '+') +- diff = atoi(arg + 1); +- else if (*arg == '-') +- diff = -atoi(arg + 1); +- else if (!strcmp(arg, "min")) +- diff = 1 - siz; +- else if (!strcmp(arg, "max")) +- diff = dsize - (nreg - 1) * 2 - 1 - siz; ++ if (!strcmp(arg, "min") || !strcmp(arg, "0")) ++ { ++ abs = 2; ++ diff = 0; ++ } ++ else if (!strcmp(arg, "max") || !strcmp(arg, "_")) ++ { ++ abs = 2; ++ diff = 1; ++ } + else +- diff = atoi(arg) - siz; +- if (diff == 0) ++ { ++ if (l > 0 && arg[l - 1] == '%') ++ percent = 1000; ++ if (*arg == '+') ++ diff = atoi(arg + 1); ++ else if (*arg == '-') ++ diff = -atoi(arg + 1); ++ else ++ { ++ diff = atoi(arg); /* +1 because of caption line */ ++ if (diff < 0) ++ diff = 0; ++ abs = diff == 0 ? 2 : 1; ++ } ++ } ++ if (!abs && !diff) + return; ++ if (percent) ++ diff = diff * percent / 100; ++ cv = D_forecv; ++ if (cv->c_slorient & orient) ++ ChangeCanvasSize(cv, abs, diff, gflag, percent); ++ if (cv->c_slback->c_slorient & orient) ++ ChangeCanvasSize(cv->c_slback, abs, diff, gflag, percent); ++ ++ ResizeCanvas(&D_canvas); ++ RecreateCanvasChain(); ++ RethinkDisplayViewports(); ++ ResizeLayersToCanvases(); ++ return; ++ ++#if 0 ++ + if (siz + diff < 1) + diff = 1 - siz; + if (siz + diff > dsize - (nreg - 1) * 2 - 1) +@@ -5977,6 +6585,7 @@ + } + RethinkDisplayViewports(); + ResizeLayersToCanvases(); ++#endif + } + + static void +@@ -5985,7 +6594,29 @@ + int len; + char *data; + { +- ResizeRegions(buf); ++ int ch; ++ int flags = *(int *)data; ++ ch = ((unsigned char *)buf)[len]; ++ if (ch == 0) ++ { ++ ResizeRegions(buf, flags); ++ return; ++ } ++ if (ch == 'h') ++ flags ^= RESIZE_FLAG_H; ++ else if (ch == 'v') ++ flags ^= RESIZE_FLAG_V; ++ else if (ch == 'b') ++ flags |= RESIZE_FLAG_H|RESIZE_FLAG_V; ++ else if (ch == 'p') ++ flags ^= D_forecv->c_slorient == SLICE_VERT ? RESIZE_FLAG_H : RESIZE_FLAG_V; ++ else if (ch == 'l') ++ flags ^= RESIZE_FLAG_L; ++ else ++ return; ++ inp_setprompt(resizeprompts[flags], NULL); ++ *(int *)data = flags; ++ buf[len] = '\034'; + } + + #ifdef RXVT_OSC +diff -Naur screen-4.0.3.orig/resize.c screen-4.0.3/resize.c +--- screen-4.0.3.orig/resize.c 2003-09-08 16:26:31.000000000 +0200 ++++ screen-4.0.3/resize.c 2008-06-01 23:39:31.000000000 +0200 +@@ -148,58 +148,20 @@ + struct win *p; + struct canvas *cv, **cvpp; + int wwi; +- int y, h, hn; ++ int y, h, hn, xe, ye; + + debug2("ChangeScreenSize from (%d,%d) ", D_width, D_height); + debug3("to (%d,%d) (change_fore: %d)\n",wi, he, change_fore); + +- /* +- * STRATEGY: keep the ratios. +- * if canvas doesn't fit anymore, throw it off. +- * (ATTENTION: cvlist must be sorted!) +- */ +- y = 0; +- h = he; +- if (D_has_hstatus == HSTATUS_LASTLINE) +- { +- if (h > 1) +- h--; +- else +- D_has_hstatus = 0; /* sorry */ +- } +- for (cvpp = &D_cvlist; (cv = *cvpp); ) +- { +- if (h < 2 && cvpp != &D_cvlist) +- { +- /* kill canvas */ +- SetCanvasWindow(cv, 0); +- *cvpp = cv->c_next; +- free(cv); +- if (D_forecv == cv) +- D_forecv = 0; +- continue; +- } +- hn = (cv->c_ye - cv->c_ys + 1) * he / D_height; +- if (hn == 0) +- hn = 1; +- if (hn + 2 >= h || cv->c_next == 0) +- hn = h - 1; +- if ((!captionalways && cv == D_cvlist && h - hn < 2) || hn == 0) +- hn = h; +- ASSERT(hn > 0); +- cv->c_xs = 0; +- cv->c_xe = wi - 1; +- cv->c_ys = y; +- cv->c_ye = y + hn - 1; +- +- cv->c_xoff = cv->c_xs; +- cv->c_yoff = cv->c_ys; +- +- y += hn + 1; +- h -= hn + 1; +- cvpp = &cv->c_next; ++ cv = &D_canvas; ++ cv->c_xe = wi - 1; ++ cv->c_ye = he - 1 - ((cv->c_slperp && cv->c_slperp->c_slnext) || captionalways) - (D_has_hstatus == HSTATUS_LASTLINE); ++ if (cv->c_slperp) ++ { ++ ResizeCanvas(cv); ++ RecreateCanvasChain(); ++ RethinkDisplayViewports(); + } +- RethinkDisplayViewports(); + if (D_forecv == 0) + D_forecv = D_cvlist; + if (D_forecv) +@@ -682,6 +644,8 @@ + if (wi == 0) + he = hi = 0; + ++ if (p->w_type == W_TYPE_GROUP) ++ return 0; + if (p->w_width == wi && p->w_height == he && p->w_histheight == hi) + { + debug("ChangeWindowSize: No change.\n"); +@@ -1044,8 +1008,11 @@ + int i; + + if (p->w_alt_mlines) +- for (i = 0; i < p->w_alt_height; i++) +- FreeMline(p->w_alt_mlines + i); ++ { ++ for (i = 0; i < p->w_alt_height; i++) ++ FreeMline(p->w_alt_mlines + i); ++ free(p->w_alt_mlines); ++ } + p->w_alt_mlines = 0; + p->w_alt_width = 0; + p->w_alt_height = 0; +@@ -1053,8 +1020,11 @@ + p->w_alt_y = 0; + #ifdef COPY_PASTE + if (p->w_alt_hlines) +- for (i = 0; i < p->w_alt_histheight; i++) +- FreeMline(p->w_alt_hlines + i); ++ { ++ for (i = 0; i < p->w_alt_histheight; i++) ++ FreeMline(p->w_alt_hlines + i); ++ free(p->w_alt_hlines); ++ } + p->w_alt_hlines = 0; + p->w_alt_histidx = 0; + #endif +diff -Naur screen-4.0.3.orig/sched.h screen-4.0.3/sched.h +--- screen-4.0.3.orig/sched.h 2002-01-08 16:42:43.000000000 +0100 ++++ screen-4.0.3/sched.h 2008-06-01 23:39:31.000000000 +0200 +@@ -19,7 +19,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: sched.h,v 1.1.1.1 1993/06/16 23:51:13 jnweiger Exp $ FAU ++ * $Id: sched.h,v 1.11 2005/12/16 18:51:07 jnweiger Exp $ FAU + */ + + struct event +diff -Naur screen-4.0.3.orig/screen.c screen-4.0.3/screen.c +--- screen-4.0.3.orig/screen.c 2003-09-08 16:26:41.000000000 +0200 ++++ screen-4.0.3/screen.c 2008-06-01 23:39:31.000000000 +0200 +@@ -124,6 +124,7 @@ + extern char *zmodem_sendcmd; + extern char *zmodem_recvcmd; + #endif ++extern struct layout *layout_last; + + + char *ShellProg; +@@ -158,6 +159,7 @@ + /* the attacher */ + struct passwd *ppp; + char *attach_tty; ++int attach_fd = -1; + char *attach_term; + char *LoginName; + struct mode attach_Mode; +@@ -211,10 +213,10 @@ + #endif + + char HostName[MAXSTR]; +-int MasterPid; ++int MasterPid, PanicPid; + int real_uid, real_gid, eff_uid, eff_gid; + int default_startup; +-int ZombieKey_destroy, ZombieKey_resurrect; ++int ZombieKey_destroy, ZombieKey_resurrect, ZombieKey_onerror; + char *preselect = NULL; /* only used in Attach() */ + + #ifdef UTF8 +@@ -889,6 +891,10 @@ + attach_tty = ""; + if (!detached && !lsflag && !cmdflag && !(dflag && !mflag && !rflag && !xflag)) + { ++#ifndef NAMEDPIPE ++ int fl; ++#endif ++ + /* ttyname implies isatty */ + if (!(attach_tty = ttyname(0))) + Panic(0, "Must be connected to a terminal."); +@@ -899,10 +905,20 @@ + #ifdef MULTIUSER + tty_mode = (int)st.st_mode & 0777; + #endif +- if ((n = secopen(attach_tty, O_RDWR | O_NONBLOCK, 0)) < 0) +- Panic(0, "Cannot open your terminal '%s' - please check.", attach_tty); +- close(n); +- debug1("attach_tty is %s\n", attach_tty); ++ ++#ifndef NAMEDPIPE ++ fl = fcntl(0, F_GETFL, 0); ++ if (fl != -1 && (fl & (O_RDWR|O_RDONLY|O_WRONLY)) == O_RDWR) ++ attach_fd = 0; ++#endif ++ if (attach_fd == -1) ++ { ++ if ((n = secopen(attach_tty, O_RDWR | O_NONBLOCK, 0)) < 0) ++ Panic(0, "Cannot open your terminal '%s' - please check.", attach_tty); ++ close(n); ++ } ++ debug2("attach_tty is %s, attach_fd is %d\n", attach_tty, attach_fd); ++ + if ((attach_term = getenv("TERM")) == 0 || *attach_term == 0) + Panic(0, "Please set a terminal type."); + if (strlen(attach_term) > sizeof(D_termname) - 1) +@@ -1163,6 +1179,9 @@ + /* NOTREACHED */ + } + ++ if (!detached) ++ PanicPid = getppid(); ++ + if (DefaultEsc == -1) + DefaultEsc = Ctrl('a'); + if (DefaultMetaEsc == -1) +@@ -1196,9 +1215,13 @@ + #endif + if (!detached) + { +- /* reopen tty. must do this, because fd 0 may be RDONLY */ +- if ((n = secopen(attach_tty, O_RDWR, 0)) < 0) +- Panic(0, "Cannot reopen '%s' - please check.", attach_tty); ++ if (attach_fd == -1) ++ { ++ if ((n = secopen(attach_tty, O_RDWR, 0)) < 0) ++ Panic(0, "Cannot reopen '%s' - please check.", attach_tty); ++ } ++ else ++ n = dup(attach_fd); + } + else + n = -1; +@@ -1222,6 +1245,7 @@ + { + if (MakeDisplay(LoginName, attach_tty, attach_term, n, getppid(), &attach_Mode) == 0) + Panic(0, "Could not alloc display"); ++ PanicPid = 0; + #ifdef ENCODINGS + D_encoding = nwin_options.encoding > 0 ? nwin_options.encoding : 0; + debug1("D_encoding = %d\n", D_encoding); +@@ -1255,12 +1279,12 @@ + #ifdef ETCSCREENRC + # ifdef ALLOW_SYSSCREENRC + if ((ap = getenv("SYSSCREENRC"))) +- StartRc(ap); ++ (void)StartRc(ap, 0); + else + # endif +- StartRc(ETCSCREENRC); ++ (void)StartRc(ETCSCREENRC, 0); + #endif +- StartRc(RcFileName); ++ (void)StartRc(RcFileName, 0); + # ifdef UTMPOK + # ifndef UTNOKEEP + InitUtmp(); +@@ -1340,7 +1364,7 @@ + if (display && default_startup) + display_copyright(); + signal(SIGINT, SigInt); +- if (rflag && (rflag & 1) == 0) ++ if (rflag && (rflag & 1) == 0 && !quietflag) + { + Msg(0, "New screen..."); + rflag = 0; +@@ -1365,14 +1389,38 @@ + } + + void +-WindowDied(p) ++WindowDied(p, wstat, wstat_valid) + struct win *p; ++int wstat; ++int wstat_valid; + { +- if (ZombieKey_destroy) ++ int killit = 0; ++ ++ if (ZombieKey_destroy && ZombieKey_onerror && wstat_valid && ++ WIFEXITED(wstat) && WEXITSTATUS(wstat) == 0) ++ killit = 1; ++ ++ if (ZombieKey_destroy && !killit) + { +- char buf[100], *s; ++ char buf[100], *s, reason[100]; + time_t now; + ++ if (wstat_valid) { ++ if (WIFEXITED(wstat)) ++ if (WEXITSTATUS(wstat)) ++ sprintf(reason, "terminated with exit status %d", WEXITSTATUS(wstat)); ++ else ++ sprintf(reason, "terminated normally"); ++ else if (WIFSIGNALED(wstat)) ++ sprintf(reason, "terminated with signal %d%s", WTERMSIG(wstat), ++#ifdef WCOREDUMP ++ WCOREDUMP(wstat) ? " (core file generated)" : ""); ++#else ++ ""); ++#endif ++ } else ++ sprintf(reason, "detached from window"); ++ + (void) time(&now); + s = ctime(&now); + if (s && *s) +@@ -1388,11 +1436,12 @@ + #endif + CloseDevice(p); + ++ p->w_deadpid = p->w_pid; + p->w_pid = 0; + ResetWindow(p); + /* p->w_y = p->w_bot; */ + p->w_y = MFindUsedLine(p, p->w_bot, 1); +- sprintf(buf, "\n\r=== Window terminated (%s) ===", s ? s : "?"); ++ sprintf(buf, "\n\r=== Command %s (%s) ===", reason, s ? s : "?"); + WriteString(p, buf, strlen(buf)); + WindowChanged(p, 'f'); + } +@@ -1555,12 +1604,16 @@ + for (p = windows; p; p = next) + { + next = p->w_next; +- if (pid == p->w_pid) ++ if ( (p->w_pid && pid == p->w_pid) || ++ (p->w_deadpid && pid == p->w_deadpid) ) + { ++ /* child has ceased to exist */ ++ p->w_pid = 0; ++ + #ifdef BSDJOBS + if (WIFSTOPPED(wstat)) + { +- debug3("Window %d pid %d: WIFSTOPPED (sig %d)\n", p->w_number, p->w_pid, WSTOPSIG(wstat)); ++ debug3("Window %d pid %d: WIFSTOPPED (sig %d)\n", p->w_number, pid, WSTOPSIG(wstat)); + #ifdef SIGTTIN + if (WSTOPSIG(wstat) == SIGTTIN) + { +@@ -1577,13 +1630,13 @@ + #endif + /* Try to restart process */ + Msg(0, "Child has been stopped, restarting."); +- if (killpg(p->w_pid, SIGCONT)) +- kill(p->w_pid, SIGCONT); ++ if (killpg(pid, SIGCONT)) ++ kill(pid, SIGCONT); + } + else + #endif + { +- WindowDied(p); ++ WindowDied(p, wstat, 1); + } + break; + } +@@ -1812,6 +1865,8 @@ + D_user->u_detachwin = D_fore->w_number; + D_user->u_detachotherwin = D_other ? D_other->w_number : -1; + } ++ AutosaveLayout(D_layout); ++ layout_last = D_layout; + for (cv = D_cvlist; cv; cv = cv->c_next) + { + p = Layer2Window(cv->c_layer); +@@ -1965,7 +2020,11 @@ + } + debug3("Panic('%s'); display=%x displays=%x\n", buf, display, displays); + if (displays == 0 && display == 0) +- printf("%s\r\n", buf); ++ { ++ printf("%s\r\n", buf); ++ if (PanicPid) ++ Kill(PanicPid, SIG_BYE); ++ } + else if (displays == 0) + { + /* no displays but a display - must have forked. +@@ -2605,6 +2664,8 @@ + p--; + /* small hack */ + if (display && ((ev && ev == &D_forecv->c_captev) || (!ev && win && win == D_fore))) ++ minusflg = !minusflg; ++ if (minusflg) + qmflag = 1; + break; + case '>': +@@ -2785,7 +2846,7 @@ + return MakeWinMsgEv(s, win, esc, 0, (struct event *)0, 0); + } + +-int ++void + PutWinMsg(s, start, max) + char *s; + int start, max; +@@ -2796,7 +2857,18 @@ + int rendstackn = 0; + + if (s != winmsg_buf) +- return 0; ++ { ++ /* sorry, no fancy coloring available */ ++ debug1("PutWinMsg %s plain\n", s); ++ l = strlen(s); ++ if (l > max) ++ l = max; ++ l -= start; ++ s += start; ++ while (l-- > 0) ++ PUTCHARLP(*s++); ++ return; ++ } + rend = D_rend; + p = 0; + l = strlen(s); +@@ -2846,7 +2918,6 @@ + PUTCHARLP(*s++); + } + } +- return 1; + } + + +diff -Naur screen-4.0.3.orig/screen.h screen-4.0.3/screen.h +--- screen-4.0.3.orig/screen.h 2003-08-22 14:28:43.000000000 +0200 ++++ screen-4.0.3/screen.h 2008-06-01 23:39:31.000000000 +0200 +@@ -19,7 +19,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: screen.h,v 1.12 1994/05/31 12:32:54 mlschroe Exp $ FAU ++ * $Id: screen.h,v 1.35 2005/12/16 18:51:07 jnweiger Exp $ FAU + */ + + #include "os.h" +diff -Naur screen-4.0.3.orig/search.c screen-4.0.3/search.c +--- screen-4.0.3.orig/search.c 2003-09-08 16:26:45.000000000 +0200 ++++ screen-4.0.3/search.c 2008-06-01 23:39:31.000000000 +0200 +@@ -62,7 +62,7 @@ + } + else + Input((dir > 0 ? "/" : "?"), sizeof(markdata->isstr)-1, INP_COOKED, +- (dir > 0 ? searchend : backsearchend), NULL); ++ (dir > 0 ? searchend : backsearchend), NULL, 0); + } + + static void +@@ -364,7 +364,7 @@ + if (W2D(markdata->cy) == INPUTLINE) + revto_line(markdata->cx, markdata->cy, INPUTLINE > 0 ? INPUTLINE - 1 : 1); + Input(isprompts[dir + 1], sizeof(markdata->isstr) - 1, INP_RAW, +- is_process, NULL); ++ is_process, NULL, 0); + LGotoPos(flayer, markdata->cx, W2D(markdata->cy)); + flayer->l_x = markdata->cx; + flayer->l_y = W2D(markdata->cy); +diff -Naur screen-4.0.3.orig/socket.c screen-4.0.3/socket.c +--- screen-4.0.3.orig/socket.c 2003-09-08 16:26:50.000000000 +0200 ++++ screen-4.0.3/socket.c 2008-06-01 23:39:31.000000000 +0200 +@@ -63,6 +63,7 @@ + extern struct display *display, *displays; + extern struct win *fore, *wtab[], *console_window, *windows; + extern struct layer *flayer; ++extern struct layout *layout_attach, *layout_last, layout_last_marker; + extern struct NewWindow nwin_undef; + #ifdef MULTIUSER + extern char *multi; +@@ -789,25 +790,77 @@ + struct display *next; + #endif + struct display *olddisplays = displays; ++ int recvfd = -1; + + #ifdef NAMEDPIPE + debug("Ha, there was someone knocking on my fifo??\n"); + if (fcntl(ServerSocket, F_SETFL, 0) == -1) + Panic(errno, "BLOCK fcntl"); ++ p = (char *) &m; ++ left = sizeof(m); + #else + struct sockaddr_un a; ++ struct msghdr msg; ++ struct iovec iov; ++ char control[1024]; + + len = sizeof(a); + debug("Ha, there was someone knocking on my socket??\n"); +- if ((ns = accept(ns, (struct sockaddr *) &a, &len)) < 0) ++ if ((ns = accept(ns, (struct sockaddr *) &a, (void *)&len)) < 0) + { + Msg(errno, "accept"); + return; + } +-#endif /* NAMEDPIPE */ + + p = (char *) &m; + left = sizeof(m); ++ bzero(&msg, sizeof(msg)); ++ iov.iov_base = &m; ++ iov.iov_len = left; ++ msg.msg_iov = &iov; ++ msg.msg_iovlen = 1; ++ msg.msg_controllen = sizeof(control); ++ msg.msg_control = &control; ++ while (left > 0) ++ { ++ len = recvmsg(ns, &msg, 0); ++ if (len < 0 && errno == EINTR) ++ continue; ++ if (len < 0) ++ { ++ close(ns); ++ Msg(errno, "read"); ++ return; ++ } ++ if (msg.msg_controllen) ++ { ++ struct cmsghdr *cmsg; ++ for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) ++ { ++ int cl; ++ char *cp; ++ if (cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) ++ continue; ++ cp = (char *)CMSG_DATA(cmsg); ++ cl = cmsg->cmsg_len; ++ while(cl >= CMSG_LEN(sizeof(int))) ++ { ++ int passedfd; ++ bcopy(cp, &passedfd, sizeof(int)); ++ if (recvfd >= 0 && passedfd != recv) ++ close(recvfd); ++ recvfd = passedfd; ++ cl -= CMSG_LEN(sizeof(int)); ++ } ++ } ++ } ++ p += len; ++ left -= len; ++ break; ++ } ++ ++#endif ++ + while (left > 0) + { + len = read(ns, p, left); +@@ -836,6 +889,8 @@ + if (len < 0) + { + Msg(errno, "read"); ++ if (recvfd != -1) ++ close(recvfd); + return; + } + if (left > 0) +@@ -848,11 +903,19 @@ + } + if (m.protocol_revision != MSG_REVISION) + { ++ if (recvfd != -1) ++ close(recvfd); + Msg(0, "Invalid message (magic 0x%08x).", m.protocol_revision); + return; + } + + debug2("*** RecMsg: type %d tty %s\n", m.type, m.m_tty); ++ if (m.type != MSG_ATTACH && recvfd != -1) ++ { ++ close(recvfd); ++ recvfd = -1; ++ } ++ + for (display = displays; display; display = display->d_next) + if (TTYCMP(D_usertty, m.m_tty) == 0) + break; +@@ -876,7 +939,11 @@ + RemoveStatus(); + + if (display && !D_tcinited && m.type != MSG_HANGUP) +- return; /* ignore messages for bad displays */ ++ { ++ if (recvfd != -1) ++ close(recvfd); ++ return; /* ignore messages for bad displays */ ++ } + + switch (m.type) + { +@@ -908,7 +975,21 @@ + Msg(0, "Attach attempt with bad pid(%d)!", m.m.attach.apid); + break; + } +- if ((i = secopen(m.m_tty, O_RDWR | O_NONBLOCK, 0)) < 0) ++ if (recvfd != -1) ++ { ++ char *myttyname; ++ i = recvfd; ++ recvfd = -1; ++ myttyname = ttyname(i); ++ if (myttyname == 0 || strcmp(myttyname, m.m_tty)) ++ { ++ Msg(errno, "Attach: passed fd does not match tty: %s - %s!", m.m_tty, myttyname ? myttyname : "NULL"); ++ close(i); ++ Kill(m.m.attach.apid, SIG_BYE); ++ break; ++ } ++ } ++ else if ((i = secopen(m.m_tty, O_RDWR | O_NONBLOCK, 0)) < 0) + { + Msg(errno, "Attach: Could not open %s!", m.m_tty); + Kill(m.m.attach.apid, SIG_BYE); +@@ -1112,6 +1193,7 @@ + char *p; + int pid; + int noshowwin; ++ int r = 0; + struct win *wi; + + ASSERT(display); +@@ -1143,12 +1225,12 @@ + #ifdef ETCSCREENRC + # ifdef ALLOW_SYSSCREENRC + if ((p = getenv("SYSSCREENRC"))) +- StartRc(p); ++ StartRc(p, 1); + else + # endif +- StartRc(ETCSCREENRC); ++ StartRc(ETCSCREENRC, 1); + #endif +- StartRc(RcFileName); ++ StartRc(RcFileName, 1); + if (InitTermcap(m->m.attach.columns, m->m.attach.lines)) + { + FreeDisplay(); +@@ -1180,6 +1262,17 @@ + #endif + + D_fore = NULL; ++ if (layout_attach) ++ { ++ struct layout *lay = layout_attach; ++ if (lay == &layout_last_marker) ++ lay = layout_last; ++ if (lay) ++ { ++ LoadLayout(lay, &D_canvas); ++ SetCanvasWindow(D_forecv, 0); ++ } ++ } + /* + * there may be a window that we remember from last detach: + */ +@@ -1203,6 +1296,14 @@ + fore = 0; + noshowwin = 1; + } ++ else if (!strcmp(m->m.attach.preselect, "+")) ++ { ++ struct action newscreen; ++ char *na = 0; ++ newscreen.nr = RC_SCREEN; ++ newscreen.args = &na; ++ DoAction(&newscreen, -1); ++ } + else + fore = FindNiceWindow(fore, m->m.attach.preselect); + } +@@ -1217,7 +1318,7 @@ + #endif + { + flayer = D_forecv->c_layer; +- display_wlist(1, WLIST_NUM); ++ display_wlist(1, WLIST_NUM, (char *)0); + noshowwin = 1; + } + } +@@ -1424,3 +1525,45 @@ + EffectiveAclUser = 0; + #endif + } ++ ++#ifndef NAMEDPIPE ++ ++int ++SendAttachMsg(s, m, fd) ++int s; ++struct msg *m; ++int fd; ++{ ++ int r; ++ struct msghdr msg; ++ struct iovec iov; ++ char buf[CMSG_SPACE(sizeof(int))]; ++ struct cmsghdr *cmsg; ++ ++ iov.iov_base = (char *)m; ++ iov.iov_len = sizeof(*m); ++ bzero(&msg, sizeof(msg)); ++ msg.msg_name = 0; ++ msg.msg_namelen = 0; ++ msg.msg_iov = &iov; ++ msg.msg_iovlen = 1; ++ msg.msg_control = buf; ++ msg.msg_controllen = sizeof(buf); ++ cmsg = CMSG_FIRSTHDR(&msg); ++ cmsg->cmsg_level = SOL_SOCKET; ++ cmsg->cmsg_type = SCM_RIGHTS; ++ cmsg->cmsg_len = CMSG_LEN(sizeof(int)); ++ bcopy(&fd, CMSG_DATA(cmsg), sizeof(int)); ++ msg.msg_controllen = cmsg->cmsg_len; ++ while(1) ++ { ++ r = sendmsg(s, &msg, 0); ++ if (r == -1 && errno == EINTR) ++ continue; ++ if (r == -1) ++ return -1; ++ return 0; ++ } ++} ++ ++#endif +diff -Naur screen-4.0.3.orig/teln.c screen-4.0.3/teln.c +--- screen-4.0.3.orig/teln.c 2003-09-08 16:26:56.000000000 +0200 ++++ screen-4.0.3/teln.c 2008-06-01 23:39:31.000000000 +0200 +@@ -64,6 +64,7 @@ + #define TO_NAWS 31 + #define TO_TSPEED 32 + #define TO_LFLOW 33 ++#define TO_LINEMODE 34 + #define TO_XDISPLOC 35 + #define TO_NEWENV 39 + +@@ -90,7 +91,7 @@ + strncpy(buf + 1, strerror(errno), sizeof(buf) - 2); + buf[sizeof(buf) - 1] = 0; + WriteString(p, buf, strlen(buf)); +- WindowDied(p); ++ WindowDied(p, 0, 0); + return; + } + WriteString(p, "connected.\r\n", 12); +@@ -406,13 +407,13 @@ + int repl = 0; + + if (cmd == TC_WONT) +- debug2("[WONT %c %d]\n", TO_S[opt], opt); ++ debug2("[<-WONT %c %d]\n", TO_S[opt], opt); + if (cmd == TC_WILL) +- debug2("[WILL %c %d]\n", TO_S[opt], opt); ++ debug2("[<-WILL %c %d]\n", TO_S[opt], opt); + if (cmd == TC_DONT) +- debug2("[DONT %c %d]\n", TO_S[opt], opt); ++ debug2("[<-DONT %c %d]\n", TO_S[opt], opt); + if (cmd == TC_DO) +- debug2("[DO %c %d]\n", TO_S[opt], opt); ++ debug2("[<-DO %c %d]\n", TO_S[opt], opt); + + switch(cmd) + { +@@ -458,6 +459,16 @@ + b[0] = TC_IAC; + b[1] = repl; + b[2] = opt; ++ ++ if (repl == TC_WONT) ++ debug2("[->WONT %c %d]\n", TO_S[opt], opt); ++ if (repl == TC_WILL) ++ debug2("[->WILL %c %d]\n", TO_S[opt], opt); ++ if (repl == TC_DONT) ++ debug2("[->DONT %c %d]\n", TO_S[opt], opt); ++ if (repl == TC_DO) ++ debug2("[->DO %c %d]\n", TO_S[opt], opt); ++ + TelReply(p, (char *)b, 3); + if (cmd == TC_DO && opt == TO_NAWS) + TelWindowSize(p); +diff -Naur screen-4.0.3.orig/termcap.c screen-4.0.3/termcap.c +--- screen-4.0.3.orig/termcap.c 2003-09-08 16:45:36.000000000 +0200 ++++ screen-4.0.3/termcap.c 2008-06-01 23:39:31.000000000 +0200 +@@ -39,6 +39,7 @@ + extern struct action umtab[]; + extern struct action mmtab[]; + extern struct action dmtab[]; ++extern struct action ktab[]; + extern struct kmap_ext *kmap_exts; + extern int kmap_extn; + extern int DefaultEsc; +@@ -547,7 +548,8 @@ + else + break; + } +- ++ if (n < KMAP_KEYS) ++ domap = 1; + if (map == 0 && domap) + return 0; + if (map && !domap) +diff -Naur screen-4.0.3.orig/tty.sh screen-4.0.3/tty.sh +--- screen-4.0.3.orig/tty.sh 2003-09-08 16:24:25.000000000 +0200 ++++ screen-4.0.3/tty.sh 2008-06-01 23:39:31.000000000 +0200 +@@ -622,6 +622,10 @@ + D_NewMode.tio.c_iflag &= ~IXON; + } + # ifdef POSIX ++# ifdef TCOON ++ if (!on) ++ tcflow(D_userfd, TCOON); ++# endif + if (tcsetattr(D_userfd, TCSANOW, &D_NewMode.tio)) + # else + if (ioctl(D_userfd, TCSETAW, (char *)&D_NewMode.tio) != 0) +diff -Naur screen-4.0.3.orig/utmp.c screen-4.0.3/utmp.c +--- screen-4.0.3.orig/utmp.c 2003-09-08 16:27:17.000000000 +0200 ++++ screen-4.0.3/utmp.c 2008-06-01 23:39:31.000000000 +0200 +@@ -604,6 +604,7 @@ + char *line, *user; + int pid; + { ++ time_t now; + u->ut_type = USER_PROCESS; + strncpy(u->ut_user, user, sizeof(u->ut_user)); + /* Now the tricky part... guess ut_id */ +@@ -618,7 +619,10 @@ + #endif /* sgi */ + strncpy(u->ut_line, line, sizeof(u->ut_line)); + u->ut_pid = pid; +- (void)time((time_t *)&u->ut_time); ++ /* must use temp variable because of NetBSD/sparc64, where ++ * ut_xtime is long(64) but time_t is int(32) */ ++ (void)time(&now); ++ u->ut_time = now; + } + + static slot_t +@@ -726,9 +730,11 @@ + char *line, *user; + int pid; + { ++ time_t now; + strncpy(u->ut_line, line, sizeof(u->ut_line)); + strncpy(u->ut_name, user, sizeof(u->ut_name)); +- (void)time((time_t *)&u->ut_time); ++ (void)time(&now); ++ u->ut_time = now; + } + + static slot_t +diff -Naur screen-4.0.3.orig/window.c screen-4.0.3/window.c +--- screen-4.0.3.orig/window.c 2003-12-05 14:45:41.000000000 +0100 ++++ screen-4.0.3/window.c 2008-06-01 23:39:31.000000000 +0200 +@@ -50,7 +50,7 @@ + extern int visual_bell, maxwin; + extern struct event logflushev; + extern int log_flush, logtstamp_after; +-extern int ZombieKey_destroy, ZombieKey_resurrect; ++extern int ZombieKey_destroy, ZombieKey_resurrect, ZombieKey_onerror; + extern struct layer *flayer; + extern int maxusercount; + extern int pty_preopen; +@@ -244,6 +244,12 @@ + debug1("WinProcess: %d bytes\n", *lenp); + fore = (struct win *)flayer->l_data; + ++ if (fore->w_type == W_TYPE_GROUP) ++ { ++ *bufpp += *lenp; ++ *lenp = 0; ++ return; ++ } + if (fore->w_ptyfd < 0) /* zombie? */ + { + ZombieProcess(bufpp, lenp); +@@ -466,7 +472,7 @@ + { + struct canvas *cv; + fore = (struct win *)flayer->l_data; +- debug1("WinRestore: win %x\n", fore); ++ debug1("WinRestore: win %p\n", fore); + for (cv = flayer->l_cvlist; cv; cv = cv->c_next) + { + display = cv->c_display; +@@ -584,6 +590,8 @@ + + if ((f = OpenDevice(nwin.args, nwin.lflag, &type, &TtyName)) < 0) + return -1; ++ if (type == W_TYPE_GROUP) ++ f = -1; + + if ((p = (struct win *)malloc(sizeof(struct win))) == 0) + { +@@ -610,6 +618,11 @@ + p->w_term = SaveStr(nwin.term); + + p->w_number = n; ++ p->w_group = 0; ++ if (p->w_type != W_TYPE_GROUP && fore && fore->w_type == W_TYPE_GROUP) ++ p->w_group = fore; ++ else if (p->w_type != W_TYPE_GROUP && fore && fore->w_group) ++ p->w_group = fore->w_group; + #ifdef MULTIUSER + /* + * This is dangerous: without a display we use creators umask +@@ -712,7 +725,7 @@ + SetCharsets(p, nwin.charset); + #endif + +- if (VerboseCreate) ++ if (VerboseCreate && type != W_TYPE_GROUP) + { + struct display *d = display; /* WriteString zaps display */ + +@@ -728,6 +741,7 @@ + display = d; + } + ++ p->w_deadpid = 0; + p->w_pid = 0; + #ifdef PSEUDOS + p->w_pwin = 0; +@@ -762,6 +776,17 @@ + *pp = p; + p->w_next = windows; + windows = p; ++ ++ if (type == W_TYPE_GROUP) ++ { ++ SetForeWindow(p); ++ Activate(p->w_norefresh); ++ WindowChanged((struct win*)0, 'w'); ++ WindowChanged((struct win*)0, 'W'); ++ WindowChanged((struct win*)0, 0); ++ return n; ++ } ++ + p->w_lflag = nwin.lflag; + #ifdef UTMPOK + p->w_slot = (slot_t)-1; +@@ -860,6 +885,7 @@ + display = d; + } + ++ p->w_deadpid = 0; + p->w_pid = 0; + #ifdef BUILTIN_TELNET + if (p->w_type == W_TYPE_TELNET) +@@ -1007,6 +1033,12 @@ + + if (!arg) + return -1; ++ if (strcmp(arg, "//group") == 0) ++ { ++ *typep = W_TYPE_GROUP; ++ *namep = "telnet"; ++ return 0; ++ } + #ifdef BUILTIN_TELNET + if (strcmp(arg, "//telnet") == 0) + { +@@ -1117,7 +1149,7 @@ + { + int pid; + char tebuf[25]; +- char ebuf[10]; ++ char ebuf[20]; + char shellbuf[7 + MAXPATHLEN]; + char *proc; + #ifndef TIOCSWINSZ +@@ -1807,13 +1839,13 @@ + return; + #endif + debug2("Window %d: read error (errno %d) - killing window\n", p->w_number, errno); +- WindowDied(p); ++ WindowDied(p, 0, 0); + return; + } + if (len == 0) + { + debug1("Window %d: EOF - killing window\n", p->w_number); +- WindowDied(p); ++ WindowDied(p, 0, 0); + return; + } + debug1(" -> %d bytes\n", len); +@@ -2139,7 +2171,7 @@ + return; + } + flayer = &p->w_layer; +- Input(":", 100, INP_COOKED, zmodem_fin, NULL); ++ Input(":", 100, INP_COOKED, zmodem_fin, NULL, 0); + s = send ? zmodem_sendcmd : zmodem_recvcmd; + n = strlen(s); + LayProcess(&s, &n); +diff -Naur screen-4.0.3.orig/window.h screen-4.0.3/window.h +--- screen-4.0.3.orig/window.h 2003-08-21 16:57:30.000000000 +0200 ++++ screen-4.0.3/window.h 2008-06-01 23:39:31.000000000 +0200 +@@ -19,7 +19,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + **************************************************************** +- * $Id: window.h,v 1.11 1994/05/31 12:33:27 mlschroe Exp $ FAU ++ * $Id: window.h,v 1.23 2007/02/06 20:44:37 mls Exp $ FAU + */ + + +@@ -150,6 +150,7 @@ + char *w_akachange; /* autoaka hack */ + char w_akabuf[MAXSTR]; /* aka buffer */ + int w_autoaka; /* autoaka hack */ ++ struct win *w_group; /* window group we belong to */ + int w_intermediate; /* char used while parsing ESC-seq */ + int w_args[MAXARGS]; /* emulator args */ + int w_NumArgs; +@@ -236,6 +237,7 @@ + int w_histheight; /* always 0 */ + #endif + int w_pid; /* process at the other end of ptyfd */ ++ int w_deadpid; /* saved w_pid of a process that closed the ptyfd to us */ + + char *w_cmdargs[MAXARGS]; /* command line argument vector */ + char *w_dir; /* directory for chdir */ +@@ -286,6 +288,7 @@ + #define W_TYPE_PTY 0 + #define W_TYPE_PLAIN 1 + #define W_TYPE_TELNET 2 ++#define W_TYPE_GROUP 3 + + + /* --- screen-4.0.3.orig/debian/patches/51EXP_session_creation_time.dpatch +++ screen-4.0.3/debian/patches/51EXP_session_creation_time.dpatch @@ -0,0 +1,323 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 51EXP_session_creation_time.dpatch by +## +## DP: Add lookup code for the creation time of each session. Requires +## DP: digging in /proc/$pid and /proc/uptime, though, so it's definitely +## DP: no candidate for the Beautiful C contest. +## DP: Affects screen's behaviour in the following situations: +## DP: * 'screen -ls' lists available sessions sorted chronologically +## DP: * 'screen -RR' now picks the youngest session instead of an +## DP: arbitrary one + +@DPATCH@ +diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 +--- screen-4.0.3.orig/doc/screen.1 2008-06-01 23:45:00.000000000 +0200 ++++ screen-4.0.3/doc/screen.1 2008-06-01 23:45:02.000000000 +0200 +@@ -238,7 +238,7 @@ + .IR screen , + but prints a list of + .I pid.tty.host +-strings identifying your ++strings and creation timestamps identifying your + .I screen + sessions. + Sessions marked `detached' can be resumed with \*Qscreen -r\*U. Those marked +@@ -317,7 +317,7 @@ + sessions in another user's directory. This requires setuid-root. + .TP 5 + .B \-R +-attempts to resume the first detached ++attempts to resume the youngest (in terms of creation time) detached + .I screen + session it finds. If successful, all other command-line options are ignored. + If no detached session exists, starts a new session using the specified +@@ -327,6 +327,8 @@ + .I screen + is run as a login-shell (actually screen uses \*Q-xRR\*U in that case). + For combinations with the \fB\-d\fP/\fB\-D\fP option see there. ++.B Note: ++Time-based session selection is a Debian addition. + .TP 5 + .B \-s + sets the default shell to the program specified, instead of the value +diff -Naur screen-4.0.3.orig/doc/screen.texinfo screen-4.0.3/doc/screen.texinfo +--- screen-4.0.3.orig/doc/screen.texinfo 2008-06-01 23:45:00.000000000 +0200 ++++ screen-4.0.3/doc/screen.texinfo 2008-06-01 23:45:02.000000000 +0200 +@@ -315,7 +315,8 @@ + @itemx -list [@var{match}] + Do not start @code{screen}, but instead print a list of session + identification strings (usually of the form @var{pid.tty.host}; +-@pxref{Session Name}). Sessions marked @samp{detached} can be resumed ++@pxref{Session Name}) and the corresponding creation timestamps. ++Sessions marked @samp{detached} can be resumed + with @code{screen -r}. Those marked @samp{attached} are running and + have a controlling terminal. If the session runs in multiuser mode, + it is marked @samp{multi}. Sessions marked as @samp{unreachable} either +@@ -376,14 +377,15 @@ + sessions in another user's directory. This requires setuid-root. + + @item -R +-Resume the first appropriate detached @code{screen} session. If +-successful, all other command-line options are ignored. If no detached ++Resume the most-recently created appropriate detached @code{screen} session. ++If successful, all other command-line options are ignored. If no detached + session exists, start a new session using the specified options, just as + if @samp{-R} had not been specified. This option is set by default if + screen is run as a login-shell (actually screen uses @samp{-xRR} in + that case). + For combinations with the + @samp{-D}/@samp{-d} option see there. ++@samp{Note:} Time-based session selection is a Debian addition. + + @item -s @var{program} + Set the default shell to be @var{program}. By default, @code{screen} +diff -Naur screen-4.0.3.orig/extern.h screen-4.0.3/extern.h +--- screen-4.0.3.orig/extern.h 2008-06-01 23:45:02.000000000 +0200 ++++ screen-4.0.3/extern.h 2008-06-01 23:45:02.000000000 +0200 +@@ -391,6 +391,8 @@ + #else + extern int xsnprintf __P(()); + #endif ++extern time_t SessionCreationTime __P((const char *)); ++extern time_t GetUptime __P((void)); + + + /* acl.c */ +diff -Naur screen-4.0.3.orig/misc.c screen-4.0.3/misc.c +--- screen-4.0.3.orig/misc.c 2008-06-01 23:39:49.000000000 +0200 ++++ screen-4.0.3/misc.c 2008-06-01 23:45:02.000000000 +0200 +@@ -24,6 +24,7 @@ + #include + #include /* mkdir() declaration */ + #include ++#include + + #include "config.h" + #include "screen.h" +@@ -796,3 +797,40 @@ + } + + #endif ++ ++time_t SessionCreationTime(const char *fifo) { ++ char ppath[20]; ++ int pfd; ++ char pdata[512]; ++ char *jiffies; ++ ++ int pid = atoi(fifo); ++ if (pid <= 0) return 0; ++ sprintf(ppath, "/proc/%u/stat", pid); ++ pfd = open(ppath, O_RDONLY); ++ if (pfd < 0) return 0; ++ while (1) { ++ int R=0, RR; ++ RR = read(pfd, pdata + R, 512-R); ++ if (RR < 0) {close(pfd); return 0;} ++ else if (RR == 0) break; ++ } ++ close(pfd); ++ ++ for (pfd=21, jiffies=pdata; pfd; --pfd) { ++ jiffies = strchr(jiffies, ' '); ++ if (!jiffies) break; else ++jiffies; ++ } ++ if (!jiffies) return 0; ++ ++ return atol(jiffies) / 100; ++} ++ ++time_t GetUptime(void) { ++ char uptimestr[32]; ++ int fd = open("/proc/uptime", O_RDONLY); ++ if (fd < 0) return 0; ++ (void)read(fd, uptimestr, 32); ++ close(fd); ++ return atol(uptimestr); ++} +diff -Naur screen-4.0.3.orig/socket.c screen-4.0.3/socket.c +--- screen-4.0.3.orig/socket.c 2008-06-01 23:41:50.000000000 +0200 ++++ screen-4.0.3/socket.c 2008-06-01 23:45:02.000000000 +0200 +@@ -116,15 +116,17 @@ + int sdirlen; + int matchlen = 0; + char *name, *n; +- int firsts = -1, sockfd; +- char *firstn = NULL; ++ int sockfd = -1; + int nfound = 0, ngood = 0, ndead = 0, nwipe = 0, npriv = 0; ++ time_t sysboot = time(NULL) - GetUptime(); + struct sent + { + struct sent *next; + int mode; + char *name; +- } *slist, **slisttail, *sent, *nsent; ++ time_t created; ++ int good; ++ } *slist, **slisttail, *sent, *nsent, *schosen = NULL; + + if (match) + { +@@ -151,7 +153,6 @@ + Panic(errno, "Cannot opendir %s", SockPath); + + slist = 0; +- slisttail = &slist; + while ((dp = readdir(dirp))) + { + name = dp->d_name; +@@ -162,7 +163,7 @@ + { + n = name; + /* if we don't want to match digits. Skip them */ +- if ((*match <= '0' || *match > '9') && (*n > '0' && *n <= '9')) ++ if ((*match < '0' || *match > '9') && (*n >= '0' && *n <= '9')) + { + while (*n >= '0' && *n <= '9') + n++; +@@ -227,12 +228,24 @@ + debug(" store it.\n"); + if ((sent = (struct sent *)malloc(sizeof(struct sent))) == 0) + continue; +- sent->next = 0; + sent->name = SaveStr(name); + sent->mode = mode; ++ sent->created = sysboot + SessionCreationTime(name); ++ sent->good = 0; ++ ++ for (slisttail = &slist; *slisttail; slisttail = &((*slisttail)->next)) ++ { ++ if ((*slisttail)->created < sent->created) break; ++ } ++ ++ sent->next = *slisttail; + *slisttail = sent; +- slisttail = &sent->next; + nfound++; ++ if (sockfd >= 0) ++ { ++ close(sockfd); ++ sockfd = -1; ++ } + sockfd = MakeClientSocket(0); + #ifdef USE_SETEUID + /* MakeClientSocket sets ids back to eff */ +@@ -291,22 +304,14 @@ + (!dflag && !rflag && !xflag)) + { + close(sockfd); ++ sockfd = -1; + debug(" no!\n"); + npriv++; /* a good socket that was not for us */ + continue; + } + ngood++; +- if (fdp && firsts == -1) +- { +- firsts = sockfd; +- firstn = sent->name; +- debug(" taken.\n"); +- } +- else +- { +- debug(" discarded.\n"); +- close(sockfd); +- } ++ sent->good = 1; ++ debug(" added to list.\n"); + } + (void)closedir(dirp); + if (nfound && (lsflag || ngood != 1) && !quietflag) +@@ -325,34 +330,42 @@ + } + for (sent = slist; sent; sent = sent->next) + { ++ char timestr[64]; ++ if (sent->created == 0) ++ { ++ sprintf(timestr, "???"); ++ } else { ++ strftime(timestr, 64, "%x %X", localtime(&sent->created)); ++ } ++ printf("\t%s\t(%s)", sent->name, timestr); + switch (sent->mode) + { + case 0700: +- printf("\t%s\t(Attached)\n", sent->name); ++ printf("\t(Attached)\n"); + break; + case 0600: +- printf("\t%s\t(Detached)\n", sent->name); ++ printf("\t(Detached)\n"); + break; + #ifdef MULTIUSER + case 0701: +- printf("\t%s\t(Multi, attached)\n", sent->name); ++ printf("\t(Multi, attached)\n"); + break; + case 0601: +- printf("\t%s\t(Multi, detached)\n", sent->name); ++ printf("\t(Multi, detached)\n"); + break; + #endif + case -1: + /* No trigraphs here! */ +- printf("\t%s\t(Dead ?%c?)\n", sent->name, '?'); ++ printf("\t(Dead ?%c?)\n", '?'); + break; + case -2: +- printf("\t%s\t(Removed)\n", sent->name); ++ printf("\t(Removed)\n"); + break; + case -3: +- printf("\t%s\t(Remote or dead)\n", sent->name); ++ printf("\t(Remote or dead)\n"); + break; + case -4: +- printf("\t%s\t(Private)\n", sent->name); ++ printf("\t(Private)\n"); + break; + } + } +@@ -365,13 +378,37 @@ + else + Msg(0, m, ndead > 1 ? "s" : "", ndead > 1 ? "" : "es"); /* other args for nethack */ + } +- if (firsts != -1) ++ for (sent = slist; sent; sent = sent->next) + { +- sprintf(SockPath + sdirlen, "/%s", firstn); +- *fdp = firsts; ++ if (sent->good) ++ { ++ schosen = sent; ++ break; ++ } ++ } ++ if (schosen && fdp) ++ { ++ if (sockfd >= 0 && !strcmp(SockPath + sdirlen + 1, schosen->name)) ++ { ++ *fdp = sockfd; ++ sockfd = -1; ++ } ++ else ++ { ++ sprintf(SockPath + sdirlen, "/%s", schosen->name); ++ *fdp = MakeClientSocket(0); ++#ifdef USE_SETEUID ++ xseteuid(real_uid); ++ xsetegid(real_gid); ++#endif ++ } + } + else + SockPath[sdirlen] = 0; ++ if (sockfd >= 0) ++ { ++ close(sockfd); ++ } + for (sent = slist; sent; sent = nsent) + { + nsent = sent->next; --- screen-4.0.3.orig/debian/patches/05fix_osdef_include.dpatch +++ screen-4.0.3/debian/patches/05fix_osdef_include.dpatch @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 05fix_osdef_include.dpatch by +## +## DP: Add a missing include to get a few prototypes that caused build +## DP: issues on kfreebsd-amd64. (See #357232) + +@DPATCH@ +diff -Naur screen-4.0.3.orig/osdef.h.in screen-4.0.3/osdef.h.in +--- screen-4.0.3.orig/osdef.h.in 2008-06-01 23:39:49.000000000 +0200 ++++ screen-4.0.3/osdef.h.in 2008-06-01 23:40:11.000000000 +0200 +@@ -106,6 +106,7 @@ + extern char *tgoto __P((char *, int, int)); + + #ifdef POSIX ++#include + extern int setsid __P((void)); + extern int setpgid __P((int, int)); + extern int tcsetpgrp __P((int, int)); --- screen-4.0.3.orig/debian/patches/09CHERRY_97708d58.dpatch +++ screen-4.0.3/debian/patches/09CHERRY_97708d58.dpatch @@ -0,0 +1,94 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 09CHERRY_97708d58.dpatch +## +## DP: Cherry-pick commit 97708d5800ac845b4c3a25d96d544f0dafa735d7 +## DP: (documentation for the vertical split feature). + +@DPATCH@ +diff --git a/doc/screen.1 b/doc/screen.1 +index 80c6483..b781e3a 100644 +--- a/doc/screen.1 ++++ b/doc/screen.1 +@@ -509,7 +509,7 @@ automatic margins on and off). + .PD + Send a control-s to the current window. + .IP "\fBC-a S\fP (split)" +-Split the current region into two new ones. ++Split the current region horizontally into two new ones. + See also \fIonly, remove, focus\fP. + .IP "\fBC-a t\fP" + .PD 0 +@@ -582,6 +582,8 @@ Shows where + comes from, where it went to and why you can use it. + .IP "\fBC-a _\fP (silence)" + Start/stop monitoring the current window for inactivity. ++.IP "\fBC-a |\fP (split -v)" ++Split the current region vertically into two new ones. + .IP "\fBC-a *\fP (displays)" + Show a listing of all currently attached displays. + +@@ -2729,12 +2731,13 @@ The default is currently \*Q=s dd\*U (standout, default colors). + .sp + .ne 3 + .B split ++.RB [ -v ] + .PP + Split the current region into two new ones. All regions on the + display are resized to make room for the new region. The blank +-window is displayed on the new region. Use the \*Qremove\*U or the +-\*Qonly\*U command to delete regions. +-Use \*Qfocus\*U to toggle between regions. ++window is displayed on the new region. Splits are made horizontally ++unless -v is used. Use the \*Qremove\*U or the \*Qonly\*U command ++to delete regions. Use \*Qfocus\*U to toggle between regions. + .sp + .ne 3 + .B "startup_message on\fP|\fBoff" +diff --git a/doc/screen.texinfo b/doc/screen.texinfo +index 1acabe2..cfcbafe 100644 +--- a/doc/screen.texinfo ++++ b/doc/screen.texinfo +@@ -705,7 +705,7 @@ Send a ^S (ASCII XOFF) to the current window. @xref{XON/XOFF}. + + @item @kbd{C-a S} + (split)@* +-Split the current region into two new ones. @xref{Regions}. ++Split the current region horizontally into two new ones. @xref{Regions}. + + @item @kbd{C-a t} + @itemx @kbd{C-a C-t} +@@ -799,6 +799,10 @@ Delete the screen-exchange file. @xref{Screen Exchange}. + (silence)@* + Start/stop monitoring the current window for inactivity. @xref{Silence}, + ++@item @kbd{C-a |} ++(split -v)@* ++Split the current region vertically into two new ones. @xref{Regions}. ++ + @item @kbd{C-a ,} + (license)@* + Show the copyright page. +@@ -1808,11 +1812,20 @@ which can contain different windows. + @node Split, Focus, , Regions + @section Split + @kindex S +-@deffn Command split +-(@kbd{C-a S})@* ++@kindex | ++@deffn Command split [-v] ++(@kbd{C-a S}, @kbd{C-a |})@* + Split the current region into two new ones. All regions on the + display are resized to make room for the new region. The blank +-window is displayed on the new region. ++window is displayed on the new region. The default is to create ++a horizontal split, putting the new regions on the top and ++bottom of each other. Using -v will create a vertical split, ++causing the new regions to appear side by side of each other. ++ ++With this current implementation of @code{screen}, scrolling data ++will appear much slower in a vertically splited region than one ++that is not. This should be taken into consideration if you need ++to use system commands such as @code{cat} or @code{tail -f}. + @end deffn + + @node Focus, Only, Split, Regions --- screen-4.0.3.orig/debian/patches/40cjk_eastasian.dpatch +++ screen-4.0.3/debian/patches/40cjk_eastasian.dpatch @@ -0,0 +1,150 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 40cjk_eastasian.dpatch by Yi-Hsuan Hsin +## +## DP: Fix display of characters with ambiguous width depending on the +## DP: user's display locale. See upstream #16666. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/ansi.c screen-4.0.3/ansi.c +--- screen-4.0.3.orig/ansi.c 2008-06-01 23:39:48.000000000 +0200 ++++ screen-4.0.3/ansi.c 2008-06-01 23:45:01.000000000 +0200 +@@ -681,7 +681,7 @@ + curr->w_rend.font = 0; + } + # ifdef DW_CHARS +- if (curr->w_encoding == UTF8 && c >= 0x1100 && utf8_isdouble(c)) ++ if (curr->w_encoding == UTF8 && utf8_isdouble(c)) + curr->w_mbcs = 0xff; + # endif + if (curr->w_encoding == UTF8 && c >= 0x0300 && utf8_iscomb(c)) +diff -Naur screen-4.0.3.orig/comm.c screen-4.0.3/comm.c +--- screen-4.0.3.orig/comm.c 2008-06-01 23:45:00.000000000 +0200 ++++ screen-4.0.3/comm.c 2008-06-01 23:45:01.000000000 +0200 +@@ -112,6 +112,9 @@ + #endif + { "charset", NEED_FORE|ARGS_1 }, + { "chdir", ARGS_01 }, ++#ifdef DW_CHARS ++ { "cjkwidth", ARGS_01 }, ++#endif + { "clear", NEED_FORE|ARGS_0 }, + { "colon", NEED_LAYER|ARGS_01 }, + { "command", NEED_DISPLAY|ARGS_02 }, +diff -Naur screen-4.0.3.orig/encoding.c screen-4.0.3/encoding.c +--- screen-4.0.3.orig/encoding.c 2008-06-01 23:39:49.000000000 +0200 ++++ screen-4.0.3/encoding.c 2008-06-01 23:45:01.000000000 +0200 +@@ -22,6 +22,7 @@ + */ + + #include ++#include + + #include "config.h" + #include "screen.h" +@@ -35,6 +36,10 @@ + + extern char *screenencodings; + ++#ifdef DW_CHARS ++extern int cjkwidth; ++#endif ++ + static int encmatch __P((char *, char *)); + # ifdef UTF8 + static int recode_char __P((int, int, int)); +@@ -849,18 +854,10 @@ + utf8_isdouble(c) + int c; + { +- return +- (c >= 0x1100 && +- (c <= 0x115f || /* Hangul Jamo init. consonants */ +- (c >= 0x2e80 && c <= 0xa4cf && (c & ~0x0011) != 0x300a && +- c != 0x303f) || /* CJK ... Yi */ +- (c >= 0xac00 && c <= 0xd7a3) || /* Hangul Syllables */ +- (c >= 0xdf00 && c <= 0xdfff) || /* dw combining sequence */ +- (c >= 0xf900 && c <= 0xfaff) || /* CJK Compatibility Ideographs */ +- (c >= 0xfe30 && c <= 0xfe6f) || /* CJK Compatibility Forms */ +- (c >= 0xff00 && c <= 0xff5f) || /* Fullwidth Forms */ +- (c >= 0xffe0 && c <= 0xffe6) || +- (c >= 0x20000 && c <= 0x2ffff))); ++ /* convert Unicode to UCS-4 */ ++ wchar_t w = c; ++ ++ return wcswidth(&w, 1) > 1; + } + #endif + +diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c +--- screen-4.0.3.orig/process.c 2008-06-01 23:45:00.000000000 +0200 ++++ screen-4.0.3/process.c 2008-06-01 23:45:01.000000000 +0200 +@@ -105,6 +105,9 @@ + #ifdef UTF8 + extern char *screenencodings; + #endif ++#ifdef DW_CHARS ++extern int cjkwidth; ++#endif + + static int CheckArgNum __P((int, char **)); + static void ClearAction __P((struct action *)); +@@ -4155,6 +4158,15 @@ + else + Msg(0, "unknown layout subcommand"); + break; ++#ifdef DW_CHARS ++ case RC_CJKWIDTH: ++ if(ParseSwitch(act, &cjkwidth) == 0) ++ { ++ if(msgok) ++ Msg(0, "Treat ambiguous width characters as %s width", cjkwidth ? "full" : "half"); ++ } ++ break; ++#endif + default: + #ifdef HAVE_BRAILLE + /* key == -2: input from braille keybord, msgok always 0 */ +diff -Naur screen-4.0.3.orig/screen.c screen-4.0.3/screen.c +--- screen-4.0.3.orig/screen.c 2008-06-01 23:44:59.000000000 +0200 ++++ screen-4.0.3/screen.c 2008-06-01 23:45:01.000000000 +0200 +@@ -223,6 +223,10 @@ + char *screenencodings; + #endif + ++#ifdef DW_CHARS ++int cjkwidth; ++#endif ++ + #ifdef NETHACK + int nethackflag = 0; + #endif +@@ -470,6 +474,9 @@ + InitBuiltinTabs(); + screenencodings = SaveStr(SCREENENCODINGS); + #endif ++#ifdef DW_CHARS ++ cjkwidth = 0; ++#endif + nwin = nwin_undef; + nwin_options = nwin_undef; + strcpy(screenterm, "screen"); +@@ -766,6 +773,19 @@ + debug1("environment says encoding=%d\n", nwin_options.encoding); + #endif + } ++# ifdef DW_CHARS ++ { ++ char *s; ++ if((s = getenv("LC_ALL")) || (s = getenv("LC_CTYPE")) || ++ (s = getenv("LANG"))) ++ { ++ if(!strncmp(s, "zh_", 3) || !strncmp(s, "ja_", 3) || !strncmp(s, "ko_", 3)) ++ { ++ cjkwidth = 1; ++ } ++ } ++ } ++#endif + #endif + if (SockMatch && strlen(SockMatch) >= MAXSTR) + Panic(0, "Ridiculously long socketname - try again."); --- screen-4.0.3.orig/debian/patches/33increase_max_winmsg_renditions.dpatch +++ screen-4.0.3/debian/patches/33increase_max_winmsg_renditions.dpatch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 33increase_max_winmsg_renditions.dpatch +## by Dustin Kirkland +## +## DP: Increase MAX_WINMSG_REND constant from 16 to 256 +## DP: Allows for up to 256 formatting changes on a status line +## DP: https://bugs.launchpad.net/ubuntu/+source/screen/+bug/315871 + +@DPATCH@ +diff -uprN screen-4.0.3.orig/screen.c screen-4.0.3/screen.c +--- screen-4.0.3.orig/screen.c 2003-09-08 09:26:41.000000000 -0500 ++++ screen-4.0.3/screen.c 2009-01-10 12:06:34.698560196 -0600 +@@ -2026,7 +2026,7 @@ static const char months[] = "JanFebMarA + #endif + + static char winmsg_buf[MAXSTR]; +-#define MAX_WINMSG_REND 16 /* rendition changes */ ++#define MAX_WINMSG_REND 256 /* rendition changes */ + static int winmsg_rend[MAX_WINMSG_REND]; + static int winmsg_rendpos[MAX_WINMSG_REND]; + static int winmsg_numrend; --- screen-4.0.3.orig/debian/patches/13split_info_files.dpatch +++ screen-4.0.3/debian/patches/13split_info_files.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 13split_info_files.dpatch by +## +## DP: Split the info files at 50k to match the distribution style +## DP: of the orig tarball. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/doc/Makefile.in screen-4.0.3/doc/Makefile.in +--- screen-4.0.3.orig/doc/Makefile.in 2006-10-23 15:06:32.000000000 +0200 ++++ screen-4.0.3/doc/Makefile.in 2008-06-01 23:40:33.000000000 +0200 +@@ -27,7 +27,7 @@ + + info screen.info: screen.texinfo + @rm -f screen.info* +- $(MAKEINFO) $(srcdir)/screen.texinfo -o screen.info ++ $(MAKEINFO) --split 50000 $(srcdir)/screen.texinfo -o screen.info + + install: installdirs + $(INSTALL_DATA) $(srcdir)/screen.1 $(DESTDIR)$(mandir)/man1/screen.1 --- screen-4.0.3.orig/debian/patches/50EXP_tilde_expansion.dpatch +++ screen-4.0.3/debian/patches/50EXP_tilde_expansion.dpatch @@ -0,0 +1,126 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 50EXP_tilde_expansion.dpatch by +## +## DP: Add full tilde expansion to the builtin commands 'source' +## DP: and 'chdir'. Thanks to Nico Golde (#308818) and Steve Kemp +## DP: (#477210) for patch suggestions. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/extern.h screen-4.0.3/extern.h +--- screen-4.0.3.orig/extern.h 2008-06-01 23:41:50.000000000 +0200 ++++ screen-4.0.3/extern.h 2008-06-01 23:45:01.000000000 +0200 +@@ -65,6 +65,7 @@ + extern int MFindUsedLine __P((struct win *, int, int)); + + /* fileio.c */ ++extern char *ExpandFilename __P((const char *)); + extern int StartRc __P((char *, int)); + extern void FinishRc __P((char *)); + extern void RcLine __P((char *, int)); +diff -Naur screen-4.0.3.orig/fileio.c screen-4.0.3/fileio.c +--- screen-4.0.3.orig/fileio.c 2008-06-01 23:44:59.000000000 +0200 ++++ screen-4.0.3/fileio.c 2008-06-01 23:45:01.000000000 +0200 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #ifndef SIGINT + # include +@@ -87,6 +88,56 @@ + return cp; + } + ++/** ++ * Private simple tilde expansion function, to avoid pulling in ++ * libreadline or similar monster libraries. ++ * ++ * Note: We are applying a conservative match on usernames here. ++ * Jan Nordholz , 2008/04/27 ++ */ ++char * ++ExpandFilename(fn) ++const char *fn; ++{ ++ char *ret = 0; ++ ++ ret = malloc(MAXPATHLEN + 1); ++ snprintf(ret, MAXPATHLEN, "%s", fn); ++ ++ if (*fn == '~') ++ { ++ int userlen = strspn(fn+1, "abcdefghijklmnopqrstuvwxyz0123456789-_"); ++ if (!userlen) ++ { ++ if (home && *home) ++ { ++ snprintf(ret, MAXPATHLEN, "%s%s", home, fn+1+userlen); ++ } ++ else ++ { ++ Msg(0, "%s: source: tilde expansion failed.", rc_name); ++ } ++ } ++ else ++ { ++ struct passwd *p; ++ ret[userlen+1] = 0; ++ p = getpwnam(ret+1); ++ ret[userlen+1] = fn[userlen+1]; ++ if (p && p->pw_dir) ++ { ++ snprintf(ret, MAXPATHLEN, "%s%s", p->pw_dir, fn+1+userlen); ++ } ++ else ++ { ++ Msg(0, "%s: source: tilde expansion failed.", rc_name); ++ } ++ } ++ } ++ ++ return ret; ++} ++ + static char * + findrcfile(rcfile) + char *rcfile; +@@ -293,17 +344,21 @@ + do_source(rcfilename) + char *rcfilename; + { ++ char *expanded_rcfilename; ++ + if (rc_recursion > 10) + { + Msg(0, "%s: source: recursion limit reached", rc_name); + return; + } ++ + rc_recursion++; +- FinishRc(rcfilename); ++ expanded_rcfilename = ExpandFilename(rcfilename); ++ FinishRc(expanded_rcfilename); ++ free(expanded_rcfilename); + rc_recursion--; + } + +- + /* + * Running a Command Line in the environment determined by the display. + * The fore window is taken from the display as well as the user. +diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c +--- screen-4.0.3.orig/process.c 2008-06-01 23:45:01.000000000 +0200 ++++ screen-4.0.3/process.c 2008-06-01 23:45:01.000000000 +0200 +@@ -2418,9 +2418,10 @@ + #endif + break; + case RC_CHDIR: +- s = *args ? *args : home; ++ s = ExpandFilename(*args ? *args : home); + if (chdir(s) == -1) + Msg(errno, "%s", s); ++ free(s); + break; + case RC_SHELL: + case RC_DEFSHELL: --- screen-4.0.3.orig/debian/patches/02configure_use_ncursesw.dpatch +++ screen-4.0.3/debian/patches/02configure_use_ncursesw.dpatch @@ -0,0 +1,36 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02configure_use_ncursesw.dpatch by +## +## DP: Add libncursesw support to configure.in. +## DP: (And rerun autoconf afterwards, because adding autoconf as build-dependency +## DP: is more of a hassle than running it manually from time to time.) + +@DPATCH@ +diff -Naur screen-4.0.3.orig/configure.in screen-4.0.3/configure.in +--- screen-4.0.3.orig/configure.in 2008-06-01 23:39:57.000000000 +0200 ++++ screen-4.0.3/configure.in 2008-06-01 23:39:59.000000000 +0200 +@@ -647,6 +647,12 @@ + AC_CHECKING(for tgetent) + AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, + olibs="$LIBS" ++LIBS="-lncursesw $olibs" ++AC_CHECKING(libncursesw) ++AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, ++LIBS="-lncurses $olibs" ++AC_CHECKING(libncurses) ++AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, + LIBS="-lcurses $olibs" + AC_CHECKING(libcurses) + AC_TRY_LINK(,[ +@@ -662,10 +668,7 @@ + LIBS="-ltermlib $olibs" + AC_CHECKING(libtermlib) + AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, +-LIBS="-lncurses $olibs" +-AC_CHECKING(libncurses) +-AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, +-AC_MSG_ERROR(!!! no tgetent - no screen)))))) ++AC_MSG_ERROR(!!! no tgetent - no screen))))))) + + AC_TRY_RUN([ + main() --- screen-4.0.3.orig/debian/patches/26source_encoding.dpatch +++ screen-4.0.3/debian/patches/26source_encoding.dpatch @@ -0,0 +1,358 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 26source_encoding.dpatch by Ben Finney +## +## DP: Replace the composed characters with their respective description. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c +--- screen-4.0.3.orig/process.c 2008-06-01 23:44:58.000000000 +0200 ++++ screen-4.0.3/process.c 2008-06-01 23:45:00.000000000 +0200 +@@ -223,177 +223,177 @@ + + /* digraph table taken from old vim and rfc1345 */ + static const unsigned char digraphs[][3] = { +- {' ', ' ', 160}, /*   */ +- {'N', 'S', 160}, /*   */ +- {'~', '!', 161}, /* ¡ */ +- {'!', '!', 161}, /* ¡ */ +- {'!', 'I', 161}, /* ¡ */ +- {'c', '|', 162}, /* ¢ */ +- {'c', 't', 162}, /* ¢ */ +- {'$', '$', 163}, /* £ */ +- {'P', 'd', 163}, /* £ */ +- {'o', 'x', 164}, /* ¤ */ +- {'C', 'u', 164}, /* ¤ */ +- {'C', 'u', 164}, /* ¤ */ +- {'E', 'u', 164}, /* ¤ */ +- {'Y', '-', 165}, /* ¥ */ +- {'Y', 'e', 165}, /* ¥ */ +- {'|', '|', 166}, /* ¦ */ +- {'B', 'B', 166}, /* ¦ */ +- {'p', 'a', 167}, /* § */ +- {'S', 'E', 167}, /* § */ +- {'"', '"', 168}, /* ¨ */ +- {'\'', ':', 168}, /* ¨ */ +- {'c', 'O', 169}, /* © */ +- {'C', 'o', 169}, /* © */ +- {'a', '-', 170}, /* ª */ +- {'<', '<', 171}, /* « */ +- {'-', ',', 172}, /* ¬ */ +- {'N', 'O', 172}, /* ¬ */ +- {'-', '-', 173}, /* ­ */ +- {'r', 'O', 174}, /* ® */ +- {'R', 'g', 174}, /* ® */ +- {'-', '=', 175}, /* ¯ */ +- {'\'', 'm', 175}, /* ¯ */ +- {'~', 'o', 176}, /* ° */ +- {'D', 'G', 176}, /* ° */ +- {'+', '-', 177}, /* ± */ +- {'2', '2', 178}, /* ² */ +- {'2', 'S', 178}, /* ² */ +- {'3', '3', 179}, /* ³ */ +- {'3', 'S', 179}, /* ³ */ +- {'\'', '\'', 180}, /* ´ */ +- {'j', 'u', 181}, /* µ */ +- {'M', 'y', 181}, /* µ */ +- {'p', 'p', 182}, /* ¶ */ +- {'P', 'I', 182}, /* ¶ */ +- {'~', '.', 183}, /* · */ +- {'.', 'M', 183}, /* · */ +- {',', ',', 184}, /* ¸ */ +- {'\'', ',', 184}, /* ¸ */ +- {'1', '1', 185}, /* ¹ */ +- {'1', 'S', 185}, /* ¹ */ +- {'o', '-', 186}, /* º */ +- {'>', '>', 187}, /* » */ +- {'1', '4', 188}, /* ¼ */ +- {'1', '2', 189}, /* ½ */ +- {'3', '4', 190}, /* ¾ */ +- {'~', '?', 191}, /* ¿ */ +- {'?', '?', 191}, /* ¿ */ +- {'?', 'I', 191}, /* ¿ */ +- {'A', '`', 192}, /* À */ +- {'A', '!', 192}, /* À */ +- {'A', '\'', 193}, /* Á */ +- {'A', '^', 194}, /*  */ +- {'A', '>', 194}, /*  */ +- {'A', '~', 195}, /* à */ +- {'A', '?', 195}, /* à */ +- {'A', '"', 196}, /* Ä */ +- {'A', ':', 196}, /* Ä */ +- {'A', '@', 197}, /* Å */ +- {'A', 'A', 197}, /* Å */ +- {'A', 'E', 198}, /* Æ */ +- {'C', ',', 199}, /* Ç */ +- {'E', '`', 200}, /* È */ +- {'E', '!', 200}, /* È */ +- {'E', '\'', 201}, /* É */ +- {'E', '^', 202}, /* Ê */ +- {'E', '>', 202}, /* Ê */ +- {'E', '"', 203}, /* Ë */ +- {'E', ':', 203}, /* Ë */ +- {'I', '`', 204}, /* Ì */ +- {'I', '!', 204}, /* Ì */ +- {'I', '\'', 205}, /* Í */ +- {'I', '^', 206}, /* Î */ +- {'I', '>', 206}, /* Î */ +- {'I', '"', 207}, /* Ï */ +- {'I', ':', 207}, /* Ï */ +- {'D', '-', 208}, /* Ð */ +- {'N', '~', 209}, /* Ñ */ +- {'N', '?', 209}, /* Ñ */ +- {'O', '`', 210}, /* Ò */ +- {'O', '!', 210}, /* Ò */ +- {'O', '\'', 211}, /* Ó */ +- {'O', '^', 212}, /* Ô */ +- {'O', '>', 212}, /* Ô */ +- {'O', '~', 213}, /* Õ */ +- {'O', '?', 213}, /* Õ */ +- {'O', '"', 214}, /* Ö */ +- {'O', ':', 214}, /* Ö */ +- {'/', '\\', 215}, /* × */ +- {'*', 'x', 215}, /* × */ +- {'O', '/', 216}, /* Ø */ +- {'U', '`', 217}, /* Ù */ +- {'U', '!', 217}, /* Ù */ +- {'U', '\'', 218}, /* Ú */ +- {'U', '^', 219}, /* Û */ +- {'U', '>', 219}, /* Û */ +- {'U', '"', 220}, /* Ü */ +- {'U', ':', 220}, /* Ü */ +- {'Y', '\'', 221}, /* Ý */ +- {'I', 'p', 222}, /* Þ */ +- {'T', 'H', 222}, /* Þ */ +- {'s', 's', 223}, /* ß */ +- {'s', '"', 223}, /* ß */ +- {'a', '`', 224}, /* à */ +- {'a', '!', 224}, /* à */ +- {'a', '\'', 225}, /* á */ +- {'a', '^', 226}, /* â */ +- {'a', '>', 226}, /* â */ +- {'a', '~', 227}, /* ã */ +- {'a', '?', 227}, /* ã */ +- {'a', '"', 228}, /* ä */ +- {'a', ':', 228}, /* ä */ +- {'a', 'a', 229}, /* å */ +- {'a', 'e', 230}, /* æ */ +- {'c', ',', 231}, /* ç */ +- {'e', '`', 232}, /* è */ +- {'e', '!', 232}, /* è */ +- {'e', '\'', 233}, /* é */ +- {'e', '^', 234}, /* ê */ +- {'e', '>', 234}, /* ê */ +- {'e', '"', 235}, /* ë */ +- {'e', ':', 235}, /* ë */ +- {'i', '`', 236}, /* ì */ +- {'i', '!', 236}, /* ì */ +- {'i', '\'', 237}, /* í */ +- {'i', '^', 238}, /* î */ +- {'i', '>', 238}, /* î */ +- {'i', '"', 239}, /* ï */ +- {'i', ':', 239}, /* ï */ +- {'d', '-', 240}, /* ð */ +- {'n', '~', 241}, /* ñ */ +- {'n', '?', 241}, /* ñ */ +- {'o', '`', 242}, /* ò */ +- {'o', '!', 242}, /* ò */ +- {'o', '\'', 243}, /* ó */ +- {'o', '^', 244}, /* ô */ +- {'o', '>', 244}, /* ô */ +- {'o', '~', 245}, /* õ */ +- {'o', '?', 245}, /* õ */ +- {'o', '"', 246}, /* ö */ +- {'o', ':', 246}, /* ö */ +- {':', '-', 247}, /* ÷ */ +- {'o', '/', 248}, /* ø */ +- {'u', '`', 249}, /* ù */ +- {'u', '!', 249}, /* ù */ +- {'u', '\'', 250}, /* ú */ +- {'u', '^', 251}, /* û */ +- {'u', '>', 251}, /* û */ +- {'u', '"', 252}, /* ü */ +- {'u', ':', 252}, /* ü */ +- {'y', '\'', 253}, /* ý */ +- {'i', 'p', 254}, /* þ */ +- {'t', 'h', 254}, /* þ */ +- {'y', '"', 255}, /* ÿ */ +- {'y', ':', 255}, /* ÿ */ +- {'"', '[', 196}, /* Ä */ +- {'"', '\\', 214}, /* Ö */ +- {'"', ']', 220}, /* Ü */ +- {'"', '{', 228}, /* ä */ +- {'"', '|', 246}, /* ö */ +- {'"', '}', 252}, /* ü */ +- {'"', '~', 223} /* ß */ ++ {' ', ' ', 0x00a0}, /* NO-BREAK SPACE */ ++ {'N', 'S', 0x00a0}, /* NO-BREAK SPACE */ ++ {'~', '!', 0x00a1}, /* INVERTED EXCLAMATION MARK */ ++ {'!', '!', 0x00a1}, /* INVERTED EXCLAMATION MARK */ ++ {'!', 'I', 0x00a1}, /* INVERTED EXCLAMATION MARK */ ++ {'c', '|', 0x00a2}, /* CENT SIGN */ ++ {'c', 't', 0x00a2}, /* CENT SIGN */ ++ {'$', '$', 0x00a3}, /* POUND SIGN */ ++ {'P', 'd', 0x00a3}, /* POUND SIGN */ ++ {'o', 'x', 0x00a4}, /* CURRENCY SIGN */ ++ {'C', 'u', 0x00a4}, /* CURRENCY SIGN */ ++ {'C', 'u', 0x00a4}, /* CURRENCY SIGN */ ++ {'E', 'u', 0x00a4}, /* CURRENCY SIGN */ ++ {'Y', '-', 0x00a5}, /* YEN SIGN */ ++ {'Y', 'e', 0x00a5}, /* YEN SIGN */ ++ {'|', '|', 0x00a6}, /* BROKEN BAR */ ++ {'B', 'B', 0x00a6}, /* BROKEN BAR */ ++ {'p', 'a', 0x00a7}, /* SECTION SIGN */ ++ {'S', 'E', 0x00a7}, /* SECTION SIGN */ ++ {'"', '"', 0x00a8}, /* DIAERESIS */ ++ {'\'', ':', 0x00a8}, /* DIAERESIS */ ++ {'c', 'O', 0x00a9}, /* COPYRIGHT SIGN */ ++ {'C', 'o', 0x00a9}, /* COPYRIGHT SIGN */ ++ {'-', 'a', 0x00aa}, /* FEMININE ORDINAL INDICATOR */ ++ {'<', '<', 0x00ab}, /* LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */ ++ {'-', ',', 0x00ac}, /* NOT SIGN */ ++ {'N', 'O', 0x00ac}, /* NOT SIGN */ ++ {'-', '-', 0x00ad}, /* SOFT HYPHEN */ ++ {'r', 'O', 0x00ae}, /* REGISTERED SIGN */ ++ {'R', 'g', 0x00ae}, /* REGISTERED SIGN */ ++ {'-', '=', 0x00af}, /* MACRON */ ++ {'\'', 'm', 0x00af}, /* MACRON */ ++ {'~', 'o', 0x00b0}, /* DEGREE SIGN */ ++ {'D', 'G', 0x00b0}, /* DEGREE SIGN */ ++ {'+', '-', 0x00b1}, /* PLUS-MINUS SIGN */ ++ {'2', '2', 0x00b2}, /* SUPERSCRIPT TWO */ ++ {'2', 'S', 0x00b2}, /* SUPERSCRIPT TWO */ ++ {'3', '3', 0x00b3}, /* SUPERSCRIPT THREE */ ++ {'3', 'S', 0x00b3}, /* SUPERSCRIPT THREE */ ++ {'\'', '\'', 0x00b4}, /* ACUTE ACCENT */ ++ {'j', 'u', 0x00b5}, /* MICRO SIGN */ ++ {'M', 'y', 0x00b5}, /* MICRO SIGN */ ++ {'p', 'p', 0x00b6}, /* PILCROW SIGN */ ++ {'P', 'I', 0x00b6}, /* PILCROW SIGN */ ++ {'~', '.', 0x00b7}, /* MIDDLE DOT */ ++ {'.', 'M', 0x00b7}, /* MIDDLE DOT */ ++ {',', ',', 0x00b8}, /* CEDILLA */ ++ {'\'', ',', 0x00b8}, /* CEDILLA */ ++ {'1', '1', 0x00b9}, /* SUPERSCRIPT ONE */ ++ {'1', 'S', 0x00b9}, /* SUPERSCRIPT ONE */ ++ {'-', 'o', 0x00ba}, /* MASCULINE ORDINAL INDICATOR */ ++ {'>', '>', 0x00bb}, /* RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */ ++ {'1', '4', 0x00bc}, /* VULGAR FRACTION ONE QUARTER */ ++ {'1', '2', 0x00bd}, /* VULGAR FRACTION ONE HALF */ ++ {'3', '4', 0x00be}, /* VULGAR FRACTION THREE QUARTERS */ ++ {'~', '?', 0x00bf}, /* INVERTED QUESTION MARK */ ++ {'?', '?', 0x00bf}, /* INVERTED QUESTION MARK */ ++ {'?', 'I', 0x00bf}, /* INVERTED QUESTION MARK */ ++ {'A', '`', 0x00c0}, /* LATIN CAPITAL LETTER A WITH GRAVE */ ++ {'A', '!', 0x00c0}, /* LATIN CAPITAL LETTER A WITH GRAVE */ ++ {'A', '\'', 0x00c1}, /* LATIN CAPITAL LETTER A WITH ACUTE */ ++ {'A', '^', 0x00c2}, /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ ++ {'A', '>', 0x00c2}, /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ ++ {'A', '~', 0x00c3}, /* LATIN CAPITAL LETTER A WITH TILDE */ ++ {'A', '?', 0x00c3}, /* LATIN CAPITAL LETTER A WITH TILDE */ ++ {'A', '"', 0x00c4}, /* LATIN CAPITAL LETTER A WITH DIAERESIS */ ++ {'A', ':', 0x00c4}, /* LATIN CAPITAL LETTER A WITH DIAERESIS */ ++ {'A', '@', 0x00c5}, /* LATIN CAPITAL LETTER A WITH RING ABOVE */ ++ {'A', 'A', 0x00c5}, /* LATIN CAPITAL LETTER A WITH RING ABOVE */ ++ {'A', 'E', 0x00c6}, /* LATIN CAPITAL LETTER AE */ ++ {'C', ',', 0x00c7}, /* LATIN CAPITAL LETTER C WITH CEDILLA */ ++ {'E', '`', 0x00c8}, /* LATIN CAPITAL LETTER E WITH GRAVE */ ++ {'E', '!', 0x00c8}, /* LATIN CAPITAL LETTER E WITH GRAVE */ ++ {'E', '\'', 0x00c9}, /* LATIN CAPITAL LETTER E WITH ACUTE */ ++ {'E', '^', 0x00ca}, /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */ ++ {'E', '>', 0x00ca}, /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */ ++ {'E', '"', 0x00cb}, /* LATIN CAPITAL LETTER E WITH DIAERESIS */ ++ {'E', ':', 0x00cb}, /* LATIN CAPITAL LETTER E WITH DIAERESIS */ ++ {'I', '`', 0x00cc}, /* LATIN CAPITAL LETTER I WITH GRAVE */ ++ {'I', '!', 0x00cc}, /* LATIN CAPITAL LETTER I WITH GRAVE */ ++ {'I', '\'', 0x00cd}, /* LATIN CAPITAL LETTER I WITH ACUTE */ ++ {'I', '^', 0x00ce}, /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ ++ {'I', '>', 0x00ce}, /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ ++ {'I', '"', 0x00cf}, /* LATIN CAPITAL LETTER I WITH DIAERESIS */ ++ {'I', ':', 0x00cf}, /* LATIN CAPITAL LETTER I WITH DIAERESIS */ ++ {'D', '-', 0x00d0}, /* LATIN CAPITAL LETTER ETH */ ++ {'N', '~', 0x00d1}, /* LATIN CAPITAL LETTER N WITH TILDE */ ++ {'N', '?', 0x00d1}, /* LATIN CAPITAL LETTER N WITH TILDE */ ++ {'O', '`', 0x00d2}, /* LATIN CAPITAL LETTER O WITH GRAVE */ ++ {'O', '!', 0x00d2}, /* LATIN CAPITAL LETTER O WITH GRAVE */ ++ {'O', '\'', 0x00d3}, /* LATIN CAPITAL LETTER O WITH ACUTE */ ++ {'O', '^', 0x00d4}, /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ ++ {'O', '>', 0x00d4}, /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ ++ {'O', '~', 0x00d5}, /* LATIN CAPITAL LETTER O WITH TILDE */ ++ {'O', '?', 0x00d5}, /* LATIN CAPITAL LETTER O WITH TILDE */ ++ {'O', '"', 0x00d6}, /* LATIN CAPITAL LETTER O WITH DIAERESIS */ ++ {'O', ':', 0x00d6}, /* LATIN CAPITAL LETTER O WITH DIAERESIS */ ++ {'/', '\\', 0x00d7}, /* MULTIPLICATION SIGN */ ++ {'*', 'x', 0x00d7}, /* MULTIPLICATION SIGN */ ++ {'O', '/', 0x00d8}, /* LATIN CAPITAL LETTER O WITH STROKE */ ++ {'U', '`', 0x00d9}, /* LATIN CAPITAL LETTER U WITH GRAVE */ ++ {'U', '!', 0x00d9}, /* LATIN CAPITAL LETTER U WITH GRAVE */ ++ {'U', '\'', 0x00da}, /* LATIN CAPITAL LETTER U WITH ACUTE */ ++ {'U', '^', 0x00db}, /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */ ++ {'U', '>', 0x00db}, /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */ ++ {'U', '"', 0x00dc}, /* LATIN CAPITAL LETTER U WITH DIAERESIS */ ++ {'U', ':', 0x00dc}, /* LATIN CAPITAL LETTER U WITH DIAERESIS */ ++ {'Y', '\'', 0x00dd}, /* LATIN CAPITAL LETTER Y WITH ACUTE */ ++ {'I', 'p', 0x00de}, /* LATIN CAPITAL LETTER THORN */ ++ {'T', 'H', 0x00de}, /* LATIN CAPITAL LETTER THORN */ ++ {'s', 's', 0x00df}, /* LATIN SMALL LETTER SHARP S */ ++ {'s', '"', 0x00df}, /* LATIN SMALL LETTER SHARP S */ ++ {'a', '`', 0x00e0}, /* LATIN SMALL LETTER A WITH GRAVE */ ++ {'a', '!', 0x00e0}, /* LATIN SMALL LETTER A WITH GRAVE */ ++ {'a', '\'', 0x00e1}, /* LATIN SMALL LETTER A WITH ACUTE */ ++ {'a', '^', 0x00e2}, /* LATIN SMALL LETTER A WITH CIRCUMFLEX */ ++ {'a', '>', 0x00e2}, /* LATIN SMALL LETTER A WITH CIRCUMFLEX */ ++ {'a', '~', 0x00e3}, /* LATIN SMALL LETTER A WITH TILDE */ ++ {'a', '?', 0x00e3}, /* LATIN SMALL LETTER A WITH TILDE */ ++ {'a', '"', 0x00e4}, /* LATIN SMALL LETTER A WITH DIAERESIS */ ++ {'a', ':', 0x00e4}, /* LATIN SMALL LETTER A WITH DIAERESIS */ ++ {'a', 'a', 0x00e5}, /* LATIN SMALL LETTER A WITH RING ABOVE */ ++ {'a', 'e', 0x00e6}, /* LATIN SMALL LETTER AE */ ++ {'c', ',', 0x00e7}, /* LATIN SMALL LETTER C WITH CEDILLA */ ++ {'e', '`', 0x00e8}, /* LATIN SMALL LETTER E WITH GRAVE */ ++ {'e', '!', 0x00e8}, /* LATIN SMALL LETTER E WITH GRAVE */ ++ {'e', '\'', 0x00e9}, /* LATIN SMALL LETTER E WITH ACUTE */ ++ {'e', '^', 0x00ea}, /* LATIN SMALL LETTER E WITH CIRCUMFLEX */ ++ {'e', '>', 0x00ea}, /* LATIN SMALL LETTER E WITH CIRCUMFLEX */ ++ {'e', '"', 0x00eb}, /* LATIN SMALL LETTER E WITH DIAERESIS */ ++ {'e', ':', 0x00eb}, /* LATIN SMALL LETTER E WITH DIAERESIS */ ++ {'i', '`', 0x00ec}, /* LATIN SMALL LETTER I WITH GRAVE */ ++ {'i', '!', 0x00ec}, /* LATIN SMALL LETTER I WITH GRAVE */ ++ {'i', '\'', 0x00ed}, /* LATIN SMALL LETTER I WITH ACUTE */ ++ {'i', '^', 0x00ee}, /* LATIN SMALL LETTER I WITH CIRCUMFLEX */ ++ {'i', '>', 0x00ee}, /* LATIN SMALL LETTER I WITH CIRCUMFLEX */ ++ {'i', '"', 0x00ef}, /* LATIN SMALL LETTER I WITH DIAERESIS */ ++ {'i', ':', 0x00ef}, /* LATIN SMALL LETTER I WITH DIAERESIS */ ++ {'d', '-', 0x00f0}, /* LATIN SMALL LETTER ETH */ ++ {'n', '~', 0x00f1}, /* LATIN SMALL LETTER N WITH TILDE */ ++ {'n', '?', 0x00f1}, /* LATIN SMALL LETTER N WITH TILDE */ ++ {'o', '`', 0x00f2}, /* LATIN SMALL LETTER O WITH GRAVE */ ++ {'o', '!', 0x00f2}, /* LATIN SMALL LETTER O WITH GRAVE */ ++ {'o', '\'', 0x00f3}, /* LATIN SMALL LETTER O WITH ACUTE */ ++ {'o', '^', 0x00f4}, /* LATIN SMALL LETTER O WITH CIRCUMFLEX */ ++ {'o', '>', 0x00f4}, /* LATIN SMALL LETTER O WITH CIRCUMFLEX */ ++ {'o', '~', 0x00f5}, /* LATIN SMALL LETTER O WITH TILDE */ ++ {'o', '?', 0x00f5}, /* LATIN SMALL LETTER O WITH TILDE */ ++ {'o', '"', 0x00f6}, /* LATIN SMALL LETTER O WITH DIAERESIS */ ++ {'o', ':', 0x00f6}, /* LATIN SMALL LETTER O WITH DIAERESIS */ ++ {'-', ':', 0x00f7}, /* DIVISION SIGN */ ++ {'o', '/', 0x00f8}, /* LATIN SMALL LETTER O WITH STROKE */ ++ {'u', '`', 0x00f9}, /* LATIN SMALL LETTER U WITH GRAVE */ ++ {'u', '!', 0x00f9}, /* LATIN SMALL LETTER U WITH GRAVE */ ++ {'u', '\'', 0x00fa}, /* LATIN SMALL LETTER U WITH ACUTE */ ++ {'u', '^', 0x00fb}, /* LATIN SMALL LETTER U WITH CIRCUMFLEX */ ++ {'u', '>', 0x00fb}, /* LATIN SMALL LETTER U WITH CIRCUMFLEX */ ++ {'u', '"', 0x00fc}, /* LATIN SMALL LETTER U WITH DIAERESIS */ ++ {'u', ':', 0x00fc}, /* LATIN SMALL LETTER U WITH DIAERESIS */ ++ {'y', '\'', 0x00fd}, /* LATIN SMALL LETTER Y WITH ACUTE */ ++ {'i', 'p', 0x00fe}, /* LATIN SMALL LETTER THORN */ ++ {'t', 'h', 0x00fe}, /* LATIN SMALL LETTER THORN */ ++ {'y', '"', 0x00ff}, /* LATIN SMALL LETTER Y WITH DIAERESIS */ ++ {'y', ':', 0x00ff}, /* LATIN SMALL LETTER Y WITH DIAERESIS */ ++ {'"', '[', 0x00c4}, /* LATIN CAPITAL LETTER A WITH DIAERESIS */ ++ {'"', '\\', 0x00d6}, /* LATIN CAPITAL LETTER O WITH DIAERESIS */ ++ {'"', ']', 0x00dc}, /* LATIN CAPITAL LETTER U WITH DIAERESIS */ ++ {'"', '{', 0x00e4}, /* LATIN SMALL LETTER A WITH DIAERESIS */ ++ {'"', '|', 0x00f6}, /* LATIN SMALL LETTER O WITH DIAERESIS */ ++ {'"', '}', 0x00fc}, /* LATIN SMALL LETTER U WITH DIAERESIS */ ++ {'"', '~', 0x00df}, /* LATIN SMALL LETTER SHARP S */ + }; + + #define RESIZE_FLAG_H 1 --- screen-4.0.3.orig/debian/patches/23exitcode_q_ls.dpatch +++ screen-4.0.3/debian/patches/23exitcode_q_ls.dpatch @@ -0,0 +1,25 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 23exitcode_q_ls.dpatch by +## +## DP: Make the exitcode of '-q -ls' and friends ('-qr -ls' and even +## DP: '-qdr -ls') match the documentation. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/screen.c screen-4.0.3/screen.c +--- screen-4.0.3.orig/screen.c 2008-06-01 23:41:11.000000000 +0200 ++++ screen-4.0.3/screen.c 2008-06-01 23:44:59.000000000 +0200 +@@ -1073,8 +1073,12 @@ + eff_uid = real_uid; + eff_gid = real_gid; + i = FindSocket((int *)NULL, &fo, &oth, SockMatch); +- if (quietflag) +- exit(8 + (fo ? ((oth || i) ? 2 : 1) : 0) + i); ++ if (quietflag) { ++ if (rflag) ++ exit(10 + i); ++ else ++ exit(9 + (fo || oth ? 1 : 0) + fo); ++ } + if (fo == 0) + Panic(0, "No Sockets found in %s.\n", SockPath); + Panic(0, "%d Socket%s in %s.\n", fo, fo > 1 ? "s" : "", SockPath); --- screen-4.0.3.orig/debian/patches/15manpage_typos.dpatch +++ screen-4.0.3/debian/patches/15manpage_typos.dpatch @@ -0,0 +1,27 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 15manpage_typos.dpatch by +## +## DP: Fix a few typos and groff errors in the documentation. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 +--- screen-4.0.3.orig/doc/screen.1 2008-06-01 23:40:31.000000000 +0200 ++++ screen-4.0.3/doc/screen.1 2008-06-01 23:40:42.000000000 +0200 +@@ -3185,7 +3185,7 @@ + Specify the transmission of eight (or seven) bits per byte. + .IP "ixon or -ixon" + Enables (or disables) software flow-control (CTRL-S/CTRL-Q) for sending data. +-.IP "ixoff or -ixon" ++.IP "ixoff or -ixoff" + Enables (or disables) software flow-control for receiving data. + .IP "istrip or -istrip" + Clear (or keep) the eight bit in each received byte. +@@ -4028,7 +4028,7 @@ + Background Black + .TP 27 + \h'\w'ESC [ Ps = 'u'\fB...\fP +-... ++\&... + .TP 27 + \h'\w'ESC [ Ps = 'u'\fB49\fP (A) + Background Default --- screen-4.0.3.orig/debian/patches/30fix_fsf_address.dpatch +++ screen-4.0.3/debian/patches/30fix_fsf_address.dpatch @@ -0,0 +1,36 @@ +#! /bin/bash +## 30fix_fsf_address.dpatch by Jan Christoph Nordholz +## +## DP: Update the FSF address in the GPL header of the source files +## DP: until upstream does. + +set -o errexit + +non_ascii_source_files="acls.c process.c help.c" +original_encoding=iso-8859-1 +patched_encoding=utf-8 + +convert_encoding () { + local in_encoding=$1 + local out_encoding=$2 + local in_file=$3 + local out_file=$(tempfile) + iconv --from-code $in_encoding --to-code $out_encoding $in_file > $out_file + mv $out_file $in_file +} + +dpatch_patch () { + for file in *.c; do + sed -i -e 's/59 Temple Place - Suite 330, Boston, MA 02111-1307, USA/51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA/' $file + done +} + +dpatch_unpatch () { + for file in *.c; do + sed -i -e 's/51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA/59 Temple Place - Suite 330, Boston, MA 02111-1307, USA/' $file + done +} + +DPATCH_LIB_NO_DEFAULT=1 + +. /usr/share/dpatch/dpatch.lib.sh --- screen-4.0.3.orig/debian/patches/00list +++ screen-4.0.3/debian/patches/00list @@ -0,0 +1,50 @@ +# before doing anything else, advance to CVS HEAD +01CVS +# 01-08: fixes to configure, altering preprocessor macros etc. +01configure_fix_alpha_vsprintf +02configure_use_ncursesw +03fully_expand_screenencodings +04AUTOCONF +05fix_osdef_include +# 09 : Cherry-picked upstream commits +09CHERRY_f6b50e17 +09CHERRY_97708d58 +09CHERRY_bb04008e +# 10-49: "regular" code and documentation fixes +10norootpassword +11replace_doc_paths +12kfreebsd_ctty +13split_info_files +14size_matters +15manpage_typos +16fix_gcc_warnings +16fix_gcc_warnings_II +17manpage_sessionname_warning +18manpage_maxwin_limit +19flowcontrol_lockup +20defmonitor +21manpage_nethack_activation +22exchange_file_mode +23exitcode_q_ls +24option_parser +25allow_symlink_sockdir +26source_encoding +27doc_sty_noenvpassing +28blankerprg_callsemantics +29infodoc_version +30fix_fsf_address +31upstream_cherries +32misc_minor_fixes +33increase_max_winmsg_renditions +35screen_invoked_with_a_command +40cjk_eastasian +45suppress_remap +# 50-99: experimental patches, new features etc. +50EXP_tilde_expansion +51EXP_session_creation_time +56-source-file-not-found-warning.dpatch +58-show-encoding-hardstatus.dpatch +59-no-beep-on-write-acl.dpatch +60-byobu-pointer.dpatch +61-silence_command_from_echo.dpatch +62-fix-term-length.dpatch --- screen-4.0.3.orig/debian/patches/10norootpassword.dpatch +++ screen-4.0.3/debian/patches/10norootpassword.dpatch @@ -0,0 +1,65 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10norootpassword.dpatch by Martin Pitt +## +## DP: When locking a root-owned screen, check that root has a +## DP: password set. If not, ask for an unlocking key. +## DP: See https://bugs.launchpad.net/bugs/6760 + +@DPATCH@ +diff -Naur screen-4.0.3.orig/attacher.c screen-4.0.3/attacher.c +--- screen-4.0.3.orig/attacher.c 2008-06-01 23:39:48.000000000 +0200 ++++ screen-4.0.3/attacher.c 2008-06-01 23:40:21.000000000 +0200 +@@ -819,11 +819,15 @@ + #ifdef USE_PAM + pam_handle_t *pamh = 0; + int pam_error; +-#else +- char *pass, mypass[16 + 1], salt[3]; + #endif ++ char *pass, mypass[16 + 1], salt[3]; ++ int using_pam = 1; + +-#ifndef USE_PAM ++#ifdef USE_PAM ++ if (!ppp->pw_uid) ++ { ++#endif ++ using_pam = 0; + pass = ppp->pw_passwd; + if (pass == 0 || *pass == 0) + { +@@ -856,6 +860,8 @@ + pass = crypt(mypass, salt); + pass = ppp->pw_passwd = SaveStr(pass); + } ++#ifdef USE_PAM ++ } + #endif + + debug("screen_builtin_lck looking in gcos field\n"); +@@ -885,6 +891,8 @@ + AttacherFinit(SIGARG); + /* NOTREACHED */ + } ++ if (using_pam) ++ { + #ifdef USE_PAM + PAM_conversation.appdata_ptr = cp1; + pam_error = pam_start("screen", ppp->pw_name, &PAM_conversation, &pamh); +@@ -895,10 +903,13 @@ + PAM_conversation.appdata_ptr = 0; + if (pam_error == PAM_SUCCESS) + break; +-#else +- if (!strncmp(crypt(cp1, pass), pass, strlen(pass))) +- break; + #endif ++ } ++ else ++ { ++ if (!strncmp(crypt(cp1, pass), pass, strlen(pass))) ++ break; ++ } + debug("screen_builtin_lck: NO!!!!!\n"); + bzero(cp1, strlen(cp1)); + } --- screen-4.0.3.orig/debian/patches/56-source-file-not-found-warning.dpatch +++ screen-4.0.3/debian/patches/56-source-file-not-found-warning.dpatch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 56-source-file-not-found-warning.dpatch +## by Dustin Kirkland +## +## DP: sourcing a file that's not found should fail more gracefully, +## DP: by emitting a debug message rather than a work-flow-interrupting +## DP: error message directly to the screen +## DP: https://bugs.launchpad.net/ubuntu/+source/screen/+bug/323756 + +@DPATCH@ +--- screen-4.0.3/fileio.c 2003-09-08 16:25:28.000000000 +0200 ++++ screen-4.0.3/fileio.c.new 2009-02-01 20:15:12.479816708 +0100 +@@ -261,7 +261,7 @@ char *rcfilename; + if ((fp = secfopen(rc_name, "r")) == NULL) + { + if (rc_recursion) +- Msg(errno, "%s: source %s", oldrc_name, rc_name); ++ debug2("%s: source %s\n", oldrc_name, rc_name); + else if (RcFileName && !strcmp(RcFileName, rc_name)) + { + /* --- screen-4.0.3.orig/debian/patches/59-no-beep-on-write-acl.dpatch +++ screen-4.0.3/debian/patches/59-no-beep-on-write-acl.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 59-no-beep-on-write-acl.dpatch by Kees Cook +## DP: Description: instead of beeping on all displays, report failure to attached display. +## DP: Upstream: https://savannah.gnu.org/bugs/index.php?26401 + +@DPATCH@ +diff -uNrp screen-4.0.3~/window.c screen-4.0.3/window.c +--- screen-4.0.3~/window.c 2009-04-29 10:25:28.000000000 -0700 ++++ screen-4.0.3/window.c 2009-04-29 10:27:21.000000000 -0700 +@@ -275,8 +275,7 @@ int *lenp; + debug2("window %d, user %s: ", fore->w_number, D_user->u_name); + debug2("writelock %d (wlockuser %s)\n", fore->w_wlock, + fore->w_wlockuser ? fore->w_wlockuser->u_name : "NULL"); +- /* XXX FIXME only display !*/ +- WBell(fore, visual_bell); ++ Msg(0, "write: permission denied (user %s)", D_user->u_name); + *bufpp += *lenp; + *lenp = 0; + return; --- screen-4.0.3.orig/debian/patches/58-show-encoding-hardstatus.dpatch +++ screen-4.0.3/debian/patches/58-show-encoding-hardstatus.dpatch @@ -0,0 +1,42 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 58-show-encoding-hardstatus.dpatch +## DP: From: rascov@rascov.tw +## DP: Date: Wed Feb 11 05:51:31 CST 2009 +## DP: Subject: show encoding in hardstatus, orginal from BSD by +## DP: yzlin@cs.nctu.edu.tw + +## DP: https://bugs.launchpad.net/ubuntu/+source/screen/+bug/286810 + +@DPATCH@ + +--- screen-4.0.3.orig/screen.c ++++ screen-4.0.3/screen.c +@@ -2564,6 +2564,18 @@ + } + p += strlen(p) - 1; + break; ++ #ifdef ENCODINGS ++ case 'e': ++ *p = 0; ++ D_encoding = nwin_options.encoding > 0 ? nwin_options.encoding : 0; ++ if (win && win->w_encoding) ++ { ++ *p++ = ' '; ++ strcpy(p, EncodingName(win->w_encoding)); ++ } ++ p += strlen(p) - 1; ++ break; ++ #endif + case '{': + { + char rbuf[128]; +--- screen-4.0.3.orig/process.c ++++ screen-4.0.3/process.c +@@ -3419,6 +3419,7 @@ + { + WinSwitchEncoding(fore, n); + ResetCharsets(fore); ++ RedisplayDisplays(0); + } + else if (i && display) + D_encoding = n; --- screen-4.0.3.orig/debian/patches/21manpage_nethack_activation.dpatch +++ screen-4.0.3/debian/patches/21manpage_nethack_activation.dpatch @@ -0,0 +1,33 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 21manpage_nethack_activation.dpatch by +## +## DP: Document that there are two possible causes for 'nethack on' +## DP: being activated by default... + +@DPATCH@ +diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 +--- screen-4.0.3.orig/doc/screen.1 2008-06-01 23:44:57.000000000 +0200 ++++ screen-4.0.3/doc/screen.1 2008-06-01 23:44:58.000000000 +0200 +@@ -2268,7 +2268,8 @@ + .I screen + was compiled with the NETHACK flag defined. The + default setting is then determined by the presence of the environment +-variable $NETHACKOPTIONS. ++variable $NETHACKOPTIONS and the file ~/.nethackrc - if either one is present, ++the default is \fBon\fP. + .sp + .ne 3 + .B next +diff -Naur screen-4.0.3.orig/doc/screen.texinfo screen-4.0.3/doc/screen.texinfo +--- screen-4.0.3.orig/doc/screen.texinfo 2008-06-01 23:44:57.000000000 +0200 ++++ screen-4.0.3/doc/screen.texinfo 2008-06-01 23:44:58.000000000 +0200 +@@ -4447,7 +4447,8 @@ + This option is only available if @code{screen} was compiled with the + NETHACK flag defined (@pxref{Installation}). The default setting is then + determined by the presence of the environment variable +-@code{$NETHACKOPTIONS}. ++@code{$NETHACKOPTIONS} and the file @code{~/.nethackrc} - if either one is ++present, the default is @code{on}. + @end deffn + + @node Nonblock, Number, Nethack, Miscellaneous --- screen-4.0.3.orig/debian/patches/20defmonitor.dpatch +++ screen-4.0.3/debian/patches/20defmonitor.dpatch @@ -0,0 +1,26 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 20defmonitor.dpatch by +## +## DP: Fix defmonitor / ^a-M behaviour. +## DP: Note that this is only one half of it - ^A-i still shows +## DP: the "mon" flag based solely on fore->w_monitor, which is +## DP: tremendously ugly. Fix pending. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c +--- screen-4.0.3.orig/process.c 2008-06-01 23:41:50.000000000 +0200 ++++ screen-4.0.3/process.c 2008-06-01 23:44:58.000000000 +0200 +@@ -2029,7 +2029,12 @@ + WriteString(fore, "\033c", 2); + break; + case RC_MONITOR: +- n = fore->w_monitor != MON_OFF; ++#ifdef MULTIUSER ++ if (display) ++ n = !!(ACLBYTE(fore->w_mon_notify, D_user->u_id) & ACLBIT(D_user->u_id)); ++ else ++#endif ++ n = fore->w_monitor != MON_OFF; + if (ParseSwitch(act, &n)) + break; + if (n) --- screen-4.0.3.orig/debian/patches/11replace_doc_paths.dpatch +++ screen-4.0.3/debian/patches/11replace_doc_paths.dpatch @@ -0,0 +1,203 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 11replace_doc_paths.dpatch by +## +## DP: Fix the references to configuration and pipe paths to match the +## DP: locations Debian uses. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 +--- screen-4.0.3.orig/doc/screen.1 2008-06-01 23:39:48.000000000 +0200 ++++ screen-4.0.3/doc/screen.1 2008-06-01 23:40:25.000000000 +0200 +@@ -99,7 +99,7 @@ + The above example would start the emacs editor (editing prog.c) and switch + to its window. + .PP +-If \*Q/etc/utmp\*U is writable by ++If \*Q/var/run/utmp\*U is writable by + .IR screen , + an appropriate record will be written to this file for each window, and + removed when the window is terminated. +@@ -228,7 +228,7 @@ + The use of this option is discouraged. + .TP 5 + .BR \-l " and " \-ln +-turns login mode on or off (for /etc/utmp updating). ++turns login mode on or off (for /var/run/utmp updating). + This can also be defined through the \*Qdeflogin\*U .screenrc command. + .TP 5 + .BR \-ls " and " \-list +@@ -588,7 +588,7 @@ + + .SH CUSTOMIZATION + The \*Qsocket directory\*U defaults either to $HOME/.screen or simply to +-/tmp/screens or preferably to /usr/local/screens chosen at compile-time. If ++/tmp/screens or preferably to /var/run/screen chosen at compile-time. If + .I screen + is installed setuid-root, then the administrator + should compile +@@ -601,7 +601,7 @@ + When + .I screen + is invoked, it executes initialization commands from the files +-\*Q/usr/local/etc/screenrc\*U and ++\*Q/etc/screenrc\*U and + \*Q.screenrc\*U in the user's home directory. These are the \*Qprogrammer's + defaults\*U that can be overridden in the following ways: for the + global screenrc file +@@ -1676,7 +1676,7 @@ + The echo command may be used to annoy + .I screen + users with a 'message of the +-day'. Typically installed in a global /local/etc/screenrc. ++day'. Typically installed in a global /etc/screenrc. + The option \*Q-n\*U may be used to suppress the line feed. + See also \*Qsleep\*U. + Echo is also useful for online checking of environment variables. +@@ -4429,14 +4429,14 @@ + .I screen + distribution package for private and global initialization files. + .IP $SYSSCREENRC +-.IP /usr/local/etc/screenrc ++.IP /etc/screenrc + .I screen + initialization commands + .IP $SCREENRC + .IP $HOME/.screenrc +-Read in after /usr/local/etc/screenrc ++Read in after /etc/screenrc + .IP $SCREENDIR/S- +-.IP /local/screens/S- ++.IP /var/run/screen/S- + Socket directories (default) + .IP /usr/tmp/screens/S- + Alternate socket directories. +@@ -4455,7 +4455,7 @@ + or + .IP /etc/termcap + Terminal capability databases +-.IP /etc/utmp ++.IP /var/run/utmp + Login records + .IP $LOCKPRG + Program that locks a terminal. +@@ -4568,9 +4568,9 @@ + must be installed as set-uid with owner root on most systems in order + to be able to correctly change the owner of the tty device file for + each window. +-Special permission may also be required to write the file \*Q/etc/utmp\*U. ++Special permission may also be required to write the file \*Q/var/run/utmp\*U. + .IP \(bu +-Entries in \*Q/etc/utmp\*U are not removed when ++Entries in \*Q/var/run/utmp\*U are not removed when + .I screen + is killed with SIGKILL. + This will cause some programs (like "w" or "rwho") +diff -Naur screen-4.0.3.orig/doc/screen.texinfo screen-4.0.3/doc/screen.texinfo +--- screen-4.0.3.orig/doc/screen.texinfo 2008-06-01 23:39:48.000000000 +0200 ++++ screen-4.0.3/doc/screen.texinfo 2008-06-01 23:40:25.000000000 +0200 +@@ -176,7 +176,7 @@ + variable) who will use it to create the new window. The above example would + start the @code{emacs} editor (editing @file{prog.c}) and switch to its window. + +-If @file{/etc/utmp} is writable by @code{screen}, an appropriate record ++If @file{/var/run/utmp} is writable by @code{screen}, an appropriate record + will be written to this file for each window, and removed when the + window is closed. This is useful for working with @code{talk}, + @code{script}, @code{shutdown}, @code{rsend}, @code{sccs} and other +@@ -305,7 +305,7 @@ + + @item -l + @itemx -ln +-Turn login mode on or off (for @file{/etc/utmp} updating). This option ++Turn login mode on or off (for @file{/var/run/utmp} updating). This option + is equivalent to the @code{deflogin} command (@pxref{Login}). + + @item -ls [@var{match}] +@@ -450,7 +450,7 @@ + @cindex screenrc + When @code{screen} is invoked, it executes initialization commands from + the files @file{.screenrc} in the user's home directory and +-@file{/usr/local/etc/screenrc}. These defaults can be overridden in the ++@file{/etc/screenrc}. These defaults can be overridden in the + following ways: + For the global screenrc file @code{screen} searches for the environment + variable @code{$SYSSCREENRC} (this override feature may be disabled at +@@ -1000,7 +1000,7 @@ + @item logfile @var{filename} + Place where to collect logfiles. @xref{Log}. + @item login [@var{state}] +-Log the window in @file{/etc/utmp}. @xref{Login}. ++Log the window in @file{/var/run/utmp}. @xref{Login}. + @item logtstamp [@var{state}] + Configure logfile time-stamps. @xref{Log}. + @item mapdefault +@@ -1903,7 +1903,7 @@ + * Naming Windows:: Control the name of the window + * Console:: See the host's console messages + * Kill:: Destroy an unwanted window +-* Login:: Control @file{/etc/utmp} logging ++* Login:: Control @file{/var/run/utmp} logging + * Mode:: Control the file mode of the pty + * Monitor:: Watch for activity in a window + * Windows:: List the active windows +@@ -2112,7 +2112,7 @@ + @kindex L + @deffn Command login [state] + (@kbd{C-a L})@* +-Adds or removes the entry in @file{/etc/utmp} for the current window. ++Adds or removes the entry in @file{/var/run/utmp} for the current window. + This controls whether or not the window is @dfn{logged in}. In addition + to this toggle, it is convenient to have ``log in'' and ``log out'' + keys. For instance, @code{bind I login on} and @code{bind O +@@ -4970,17 +4970,17 @@ + global initialization files. + + @item @code{$SYSSCREENRC} +-@itemx /local/etc/screenrc ++@itemx /etc/screenrc + @code{screen} initialization commands + + @item @code{$SCREENRC} + @itemx @code{$HOME}/.iscreenrc + @itemx @code{$HOME}/.screenrc +-Read in after /local/etc/screenrc ++Read in after /etc/screenrc + + @item @code{$SCREENDIR}/S-@var{login} + +-@item /local/screens/S-@var{login} ++@item /var/run/screen/S-@var{login} + Socket directories (default) + + @item /usr/tmp/screens/S-@var{login} +@@ -5003,7 +5003,7 @@ + @itemx /etc/termcap + Terminal capability databases + +-@item /etc/utmp ++@item /var/run/utmp + Login records + + @item @code{$LOCKPRG} +@@ -5108,10 +5108,10 @@ + in order to be able to + correctly change the owner of the tty device file for each window. + Special permission may also be required to write the file +-@file{/etc/utmp}. ++@file{/var/run/utmp}. + + @item +-Entries in @file{/etc/utmp} are not removed when @code{screen} is killed ++Entries in @file{/var/run/utmp} are not removed when @code{screen} is killed + with SIGKILL. This will cause some programs (like "w" or "rwho") to + advertise that a user is logged on who really isn't. + +@@ -5192,7 +5192,7 @@ + @cindex socket directory + + The socket directory defaults either to @file{$HOME/.screen} or simply to +-@file{/tmp/screens} or preferably to @file{/usr/local/screens} chosen at ++@file{/tmp/screens} or preferably to @file{/var/run/screen} chosen at + compile-time. If @code{screen} is installed + setuid root, then the administrator should compile screen with an + adequate (not NFS mounted) @code{SOCKDIR}. If @code{screen} is not --- screen-4.0.3.orig/debian/patches/16fix_gcc_warnings.dpatch +++ screen-4.0.3/debian/patches/16fix_gcc_warnings.dpatch @@ -0,0 +1,54 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 16fix_gcc_warnings.dpatch by +## +## DP: Get rid of several minor gcc warnings. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/attacher.c screen-4.0.3/attacher.c +--- screen-4.0.3.orig/attacher.c 2008-06-01 23:40:23.000000000 +0200 ++++ screen-4.0.3/attacher.c 2008-06-01 23:41:01.000000000 +0200 +@@ -820,7 +820,7 @@ + pam_handle_t *pamh = 0; + int pam_error; + #endif +- char *pass, mypass[16 + 1], salt[3]; ++ char *pass = 0, mypass[16 + 1], salt[3]; + int using_pam = 1; + + #ifdef USE_PAM +diff -Naur screen-4.0.3.orig/layer.c screen-4.0.3/layer.c +--- screen-4.0.3.orig/layer.c 2008-06-01 23:39:49.000000000 +0200 ++++ screen-4.0.3/layer.c 2008-06-01 23:41:01.000000000 +0200 +@@ -451,7 +451,7 @@ + void + LClearLine(l, y, xs, xe, bce, ol) + struct layer *l; +-int xs, xe, bce; ++int y, xs, xe, bce; + struct mline *ol; + { + struct canvas *cv; +diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c +--- screen-4.0.3.orig/process.c 2008-06-01 23:40:40.000000000 +0200 ++++ screen-4.0.3/process.c 2008-06-01 23:41:01.000000000 +0200 +@@ -3123,7 +3123,7 @@ + int newnr, fl = 0, kf = 0, af = 0, df = 0, mf = 0; + struct display *odisp = display; + int used = 0; +- struct kmap_ext *kme; ++ struct kmap_ext *kme = 0; + + for (; *args && **args == '-'; args++, argl++) + { +diff -Naur screen-4.0.3.orig/screen.c screen-4.0.3/screen.c +--- screen-4.0.3.orig/screen.c 2008-06-01 23:39:49.000000000 +0200 ++++ screen-4.0.3/screen.c 2008-06-01 23:41:01.000000000 +0200 +@@ -2360,7 +2360,7 @@ + int truncpos = -1; + int truncper = 0; + int trunclong = 0; +- struct backtick *bt; ++ struct backtick *bt = 0; + + if (winmsg_numrend >= 0) + winmsg_numrend = 0; --- screen-4.0.3.orig/debian/patches/45suppress_remap.dpatch +++ screen-4.0.3/debian/patches/45suppress_remap.dpatch @@ -0,0 +1,17 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 45suppress_remap.dpatch by Loic Minier +## +## DP: Unbreak several useful keybindings. + +@DPATCH@ +--- screen-4.0.3.orig/termcap.c 2008-06-05 12:24:28.000000000 +0200 ++++ screen-4.0.3/termcap.c 2008-06-05 12:24:59.000000000 +0200 +@@ -548,8 +548,6 @@ + else + break; + } +- if (n < KMAP_KEYS) +- domap = 1; + if (map == 0 && domap) + return 0; + if (map && !domap) --- screen-4.0.3.orig/debian/patches/61-silence_command_from_echo.dpatch +++ screen-4.0.3/debian/patches/61-silence_command_from_echo.dpatch @@ -0,0 +1,51 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 61-silence_command_from_echo.dpatch by Dustin Kirkland +## DP: print "command from..." when command is "echo" is unnecessary, annoying + +@DPATCH@ + +--- a/process.c 2004-09-03 15:15:33 +0000 ++++ b/process.c 2010-11-05 16:20:36 +0000 +@@ -1368,7 +1368,7 @@ + continue; + debug1("AT display %s\n", D_usertty); + DoCommand(args + 1, argl + 1); +- if (display) ++ if (display && strncmp(args[1], "echo", 4) != 0) + Msg(0, "command from %s: %s %s", + s, args[1], args[2] ? args[2] : ""); + display = NULL; +@@ -1397,7 +1397,7 @@ + continue; + debug1("AT display %s\n", D_usertty); + DoCommand(args + 1, argl + 1); +- if (display) ++ if (display && strncmp(args[1], "echo", 4) != 0) + Msg(0, "command from %s: %s %s", + s, args[1], args[2] ? args[2] : ""); + display = NULL; +@@ -1443,8 +1443,9 @@ + if (fore && fore->w_layer.l_cvlist) + { + display = fore->w_layer.l_cvlist->c_display; +- Msg(0, "command from %s: %s %s", +- s, args[1], args[2] ? args[2] : ""); ++ if (display && strncmp(args[1], "echo", 4) != 0) ++ Msg(0, "command from %s: %s %s", ++ s, args[1], args[2] ? args[2] : ""); + } + } + display = NULL; +@@ -1464,8 +1465,9 @@ + if (fore && fore->w_layer.l_cvlist) + { + display = fore->w_layer.l_cvlist->c_display; +- Msg(0, "command from %s: %s %s", +- s, args[1], args[2] ? args[2] : ""); ++ if (display && strncmp(args[1], "echo", 4) != 0) ++ Msg(0, "command from %s: %s %s", ++ s, args[1], args[2] ? args[2] : ""); + } + display = NULL; + fore = NULL; + --- screen-4.0.3.orig/debian/patches/04AUTOCONF.dpatch +++ screen-4.0.3/debian/patches/04AUTOCONF.dpatch @@ -0,0 +1,11090 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04AUTOCONF.dpatch by +## +## DP: Rerun autoconf. Adding it as a build-dep is likely to cause surprises +## DP: when versions change, so I'd rather take the burden to run it manually +## DP: and check its output. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/configure screen-4.0.3/configure +--- screen-4.0.3.orig/configure 2008-06-01 23:39:48.000000000 +0200 ++++ screen-4.0.3/configure 2008-06-01 23:40:07.000000000 +0200 +@@ -1,37 +1,101 @@ + #! /bin/sh +-# From configure.in Revision: 1.18 . ++# From configure.in Revision: 1.27 . + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.57. ++# Generated by GNU Autoconf 2.61. + # +-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +-# Free Software Foundation, Inc. ++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, ++# 2002, 2003, 2004, 2005, 2006 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 ++# Be more Bourne compatible ++DUALCASE=1; export DUALCASE # for MKS sh + 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 ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++ ++ ++# PATH needs CR ++# 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 + + # Support unset when possible. +-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then ++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset + else + as_unset=false + fi + + ++# IFS ++# We need space, tab and new line, in precisely that order. Quoting is ++# there to prevent editors from complaining about space-tab. ++# (If _AS_PATH_WALK were called with IFS unset, it would disable word ++# splitting by setting IFS to empty value.) ++as_nl=' ++' ++IFS=" "" $as_nl" ++ ++# Find who we are. Look in the path if we contain no directory separator. ++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 ++IFS=$as_save_IFS ++ ++ ;; ++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_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ { (exit 1); exit 1; } ++fi ++ + # Work around bugs in pre-3.0 UWIN ksh. +-$as_unset ENV MAIL MAILPATH ++for as_var in ENV MAIL MAILPATH ++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++done + PS1='$ ' + PS2='> ' + PS4='+ ' +@@ -42,21 +106,22 @@ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME + do +- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then ++ 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 ++ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi + done + + # Required to use basename. +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + +-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename + else + as_basename=false +@@ -64,206 +129,447 @@ + + + # Name of the executable. +-as_me=`$as_basename "$0" || ++as_me=`$as_basename -- "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)$' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$0" : 'X\(/\)' \| . 2>/dev/null || + echo X/"$0" | +- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } +- /^X\/\(\/\/\)$/{ s//\1/; q; } +- /^X\/\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ sed '/^.*\/\([^/][^/]*\)\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + ++# CDPATH. ++$as_unset CDPATH + +-# 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 ++if test "x$CONFIG_SHELL" = x; then ++ if (eval ":") 2>/dev/null; then ++ as_have_required=yes ++else ++ as_have_required=no ++fi ++ ++ if test $as_have_required = yes && (eval ": ++(as_func_return () { ++ (exit \$1) ++} ++as_func_success () { ++ as_func_return 0 ++} ++as_func_failure () { ++ as_func_return 1 ++} ++as_func_ret_success () { ++ return 0 ++} ++as_func_ret_failure () { ++ return 1 ++} ++ ++exitcode=0 ++if as_func_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_success failed. + fi + ++if as_func_failure; then ++ exitcode=1 ++ echo as_func_failure succeeded. ++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 ++if as_func_ret_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_ret_success failed. ++fi + +- ;; +- 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 +- '') ++if as_func_ret_failure; then ++ exitcode=1 ++ echo as_func_ret_failure succeeded. ++fi ++ ++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then ++ : ++else ++ exitcode=1 ++ echo positional parameters were not saved. ++fi ++ ++test \$exitcode = 0) || { (exit 1); exit 1; } ++ ++( ++ as_lineno_1=\$LINENO ++ as_lineno_2=\$LINENO ++ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && ++ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ++") 2> /dev/null; then ++ : ++else ++ as_candidate_shells= + 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 ++ case $as_dir in + /*) +- if ("$as_dir/$as_base" -c ' ++ for as_base in sh bash ksh sh5; do ++ as_candidate_shells="$as_candidate_shells $as_dir/$as_base" ++ done;; ++ esac ++done ++IFS=$as_save_IFS ++ ++ ++ for as_shell in $as_candidate_shells $SHELL; do ++ # Try only shells that exist, to save several forks. ++ if { test -f "$as_shell" || test -f "$as_shell.exe"; } && ++ { ("$as_shell") 2> /dev/null <<\_ASEOF ++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+"$@"}'='"$@"' ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++: ++_ASEOF ++}; then ++ CONFIG_SHELL=$as_shell ++ as_have_required=yes ++ if { "$as_shell" 2> /dev/null <<\_ASEOF ++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+"$@"}'='"$@"' ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++: ++(as_func_return () { ++ (exit $1) ++} ++as_func_success () { ++ as_func_return 0 ++} ++as_func_failure () { ++ as_func_return 1 ++} ++as_func_ret_success () { ++ return 0 ++} ++as_func_ret_failure () { ++ return 1 ++} ++ ++exitcode=0 ++if as_func_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_success failed. ++fi ++ ++if as_func_failure; then ++ exitcode=1 ++ echo as_func_failure succeeded. ++fi ++ ++if as_func_ret_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_ret_success failed. ++fi ++ ++if as_func_ret_failure; then ++ exitcode=1 ++ echo as_func_ret_failure succeeded. ++fi ++ ++if ( set x; as_func_ret_success y && test x = "$1" ); then ++ : ++else ++ exitcode=1 ++ echo positional parameters were not saved. ++fi ++ ++test $exitcode = 0) || { (exit 1); exit 1; } ++ ++( + 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 ++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } ++ ++_ASEOF ++}; then ++ break ++fi ++ ++fi ++ ++ done ++ ++ if test "x$CONFIG_SHELL" != x; then ++ for as_var in BASH_ENV ENV ++ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++ done ++ export CONFIG_SHELL ++ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} ++fi ++ ++ ++ if test $as_have_required = no; then ++ echo This script requires a shell more modern than all the ++ echo shells that I found on your system. Please install a ++ echo modern shell, or manually run the script under such a ++ echo shell if you do have one. ++ { (exit 1); exit 1; } ++fi ++ ++ ++fi ++ ++fi ++ ++ ++ ++(eval "as_func_return () { ++ (exit \$1) ++} ++as_func_success () { ++ as_func_return 0 ++} ++as_func_failure () { ++ as_func_return 1 ++} ++as_func_ret_success () { ++ return 0 ++} ++as_func_ret_failure () { ++ return 1 ++} ++ ++exitcode=0 ++if as_func_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_success failed. ++fi ++ ++if as_func_failure; then ++ exitcode=1 ++ echo as_func_failure succeeded. ++fi ++ ++if as_func_ret_success; then ++ : ++else ++ exitcode=1 ++ echo as_func_ret_success failed. ++fi ++ ++if as_func_ret_failure; then ++ exitcode=1 ++ echo as_func_ret_failure succeeded. ++fi ++ ++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then ++ : ++else ++ exitcode=1 ++ echo positional parameters were not saved. ++fi ++ ++test \$exitcode = 0") || { ++ echo No shell found that supports shell functions. ++ echo Please tell autoconf@gnu.org about your system, ++ echo including any error possibly output before this ++ echo message ++} ++ ++ ++ ++ as_lineno_1=$LINENO ++ as_lineno_2=$LINENO ++ test "x$as_lineno_1" != "x$as_lineno_2" && ++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # 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. ++ # line-number line after each line using $LINENO; the second 'sed' ++ # does the real work. The second script uses 'N' to pair each ++ # line-number line with the line containing $LINENO, 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 | ++ # scripts with optimization help from Paolo Bonzini. Blame Lee ++ # E. McMahon (1931-1989) for sed's syntax. :-) ++ sed -n ' ++ p ++ /[$]LINENO/= ++ ' <$as_myself | + sed ' ++ s/[$]LINENO.*/&-/ ++ t lineno ++ b ++ :lineno + N +- s,$,-, +- : loop +- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ++ :loop ++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop +- s,-$,, +- s,^['$as_cr_digits']*\n,, ++ s/-\n.*// + ' >$as_me.lineno && +- chmod +x $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 ++ # original and so on. Autoconf is especially sensitive 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= ;; ++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then ++ as_dirname=dirname ++else ++ as_dirname=false ++fi ++ ++ECHO_C= ECHO_N= ECHO_T= ++case `echo -n x` in ++-n*) ++ case `echo 'x\c'` in ++ *c*) ECHO_T=' ';; # ECHO_T is single tab character. ++ *) ECHO_C='\c';; ++ esac;; ++*) ++ ECHO_N='-n';; + esac + +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + + rm -f conf$$ conf$$.exe conf$$.file ++if test -d conf$$.dir; then ++ rm -f conf$$.dir/conf$$.file ++else ++ rm -f conf$$.dir ++ mkdir conf$$.dir ++fi + 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='ln -s' ++ # ... but there are two gotchas: ++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. ++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. ++ # In both cases, we have to default to `cp -p'. ++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + 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 ++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file ++rmdir conf$$.dir 2>/dev/null + + 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" ++if test -x / >/dev/null 2>&1; then ++ as_test_x='test -x' ++else ++ if ls -dL / >/dev/null 2>&1; then ++ as_ls_L_option=L ++ else ++ as_ls_L_option= ++ fi ++ as_test_x=' ++ eval sh -c '\'' ++ if test -d "$1"; then ++ test -d "$1/."; ++ else ++ case $1 in ++ -*)set "./$1";; ++ esac; ++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ++ ???[sx]*):;;*)false;;esac;fi ++ '\'' sh ++ ' ++fi ++as_executable_p=$as_test_x + + # Sed expression to map a string onto a valid CPP name. +-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" ++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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" ++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 + ++exec 7<&0 &1 + + # 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_clean_files= + ac_config_libobj_dir=. ++LIBOBJS= + 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= + PACKAGE_TARNAME= +@@ -275,42 +581,107 @@ + # Factoring default headers for most tests. + ac_includes_default="\ + #include +-#if HAVE_SYS_TYPES_H ++#ifdef HAVE_SYS_TYPES_H + # include + #endif +-#if HAVE_SYS_STAT_H ++#ifdef HAVE_SYS_STAT_H + # include + #endif +-#if STDC_HEADERS ++#ifdef STDC_HEADERS + # include + # include + #else +-# if HAVE_STDLIB_H ++# ifdef HAVE_STDLIB_H + # include + # endif + #endif +-#if HAVE_STRING_H +-# if !STDC_HEADERS && HAVE_MEMORY_H ++#ifdef HAVE_STRING_H ++# if !defined STDC_HEADERS && defined HAVE_MEMORY_H + # include + # endif + # include + #endif +-#if HAVE_STRINGS_H ++#ifdef HAVE_STRINGS_H + # include + #endif +-#if HAVE_INTTYPES_H ++#ifdef HAVE_INTTYPES_H + # include +-#else +-# if HAVE_STDINT_H +-# include +-# endif + #endif +-#if HAVE_UNISTD_H ++#ifdef HAVE_STDINT_H ++# include ++#endif ++#ifdef HAVE_UNISTD_H + # include + #endif" + +-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 VERSION ac_prefix_program CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA WRITEPATH XTERMPATH LIBOBJS LTLIBOBJS' ++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 ++datarootdir ++datadir ++sysconfdir ++sharedstatedir ++localstatedir ++includedir ++oldincludedir ++docdir ++infodir ++htmldir ++dvidir ++pdfdir ++psdir ++libdir ++localedir ++mandir ++DEFS ++ECHO_C ++ECHO_N ++ECHO_T ++LIBS ++build_alias ++host_alias ++target_alias ++VERSION ++ac_prefix_program ++CC ++CFLAGS ++LDFLAGS ++CPPFLAGS ++ac_ct_CC ++EXEEXT ++OBJEXT ++CPP ++GREP ++EGREP ++AWK ++INSTALL_PROGRAM ++INSTALL_SCRIPT ++INSTALL_DATA ++WRITEPATH ++XTERMPATH ++LIBOBJS ++LTLIBOBJS' + ac_subst_files='' ++ ac_precious_vars='build_alias ++host_alias ++target_alias ++CC ++CFLAGS ++LDFLAGS ++LIBS ++CPPFLAGS ++CPP' ++ + + # Initialize some variables set by options. + ac_init_help= +@@ -337,34 +708,48 @@ + # 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. ++# (The list follows the same order as the GNU Coding Standards.) + bindir='${exec_prefix}/bin' + sbindir='${exec_prefix}/sbin' + libexecdir='${exec_prefix}/libexec' +-datadir='${prefix}/share' ++datarootdir='${prefix}/share' ++datadir='${datarootdir}' + 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' ++docdir='${datarootdir}/doc/${PACKAGE}' ++infodir='${datarootdir}/info' ++htmldir='${docdir}' ++dvidir='${docdir}' ++pdfdir='${docdir}' ++psdir='${docdir}' ++libdir='${exec_prefix}/lib' ++localedir='${datarootdir}/locale' ++mandir='${datarootdir}/man' + + ac_prev= ++ac_dashdash= + for ac_option + do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then +- eval "$ac_prev=\$ac_option" ++ eval $ac_prev=\$ac_option + ac_prev= + continue + fi + +- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` ++ case $ac_option in ++ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; ++ *) ac_optarg=yes ;; ++ esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + +- case $ac_option in ++ case $ac_dashdash$ac_option in ++ --) ++ ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; +@@ -386,33 +771,45 @@ + --config-cache | -C) + cache_file=config.cache ;; + +- -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ++ -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; +- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ +- | --da=*) ++ -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + ++ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ ++ | --dataroo | --dataro | --datar) ++ ac_prev=datarootdir ;; ++ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ ++ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) ++ datarootdir=$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 && ++ 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" ;; ++ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` ++ eval enable_$ac_feature=no ;; ++ ++ -docdir | --docdir | --docdi | --doc | --do) ++ ac_prev=docdir ;; ++ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) ++ docdir=$ac_optarg ;; ++ ++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ++ ac_prev=dvidir ;; ++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) ++ dvidir=$ac_optarg ;; + + -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 && ++ 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'" ;; ++ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` ++ eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ +@@ -439,6 +836,12 @@ + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + ++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ++ ac_prev=htmldir ;; ++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ ++ | --ht=*) ++ htmldir=$ac_optarg ;; ++ + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; +@@ -463,13 +866,16 @@ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + ++ -localedir | --localedir | --localedi | --localed | --locale) ++ ac_prev=localedir ;; ++ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) ++ localedir=$ac_optarg ;; ++ + -localstatedir | --localstatedir | --localstatedi | --localstated \ +- | --localstate | --localstat | --localsta | --localst \ +- | --locals | --local | --loca | --loc | --lo) ++ | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ +- | --localstate=* | --localstat=* | --localsta=* | --localst=* \ +- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ++ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) +@@ -534,6 +940,16 @@ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + ++ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ++ ac_prev=pdfdir ;; ++ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) ++ pdfdir=$ac_optarg ;; ++ ++ -psdir | --psdir | --psdi | --psd | --ps) ++ ac_prev=psdir ;; ++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) ++ psdir=$ac_optarg ;; ++ + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; +@@ -586,24 +1002,20 @@ + -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 && ++ 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'" ;; ++ ac_package=`echo $ac_package | sed 's/[-.]/_/g'` ++ 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 && ++ 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" ;; ++ ac_package=`echo $ac_package | sed 's/[-.]/_/g'` ++ eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. +@@ -634,8 +1046,7 @@ + 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'" ++ eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) +@@ -655,27 +1066,19 @@ + { (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 ++# Be sure to have absolute directory names. ++for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ ++ datadir sysconfdir sharedstatedir localstatedir includedir \ ++ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ ++ libdir localedir mandir + do +- eval ac_val=$`echo $ac_var` ++ eval ac_val=\$$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; }; };; ++ [\\/$]* | ?:[\\/]* ) continue;; ++ NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac ++ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 ++ { (exit 1); exit 1; }; } + done + + # There might be people who depend on the old broken behavior: `$host' +@@ -702,76 +1105,78 @@ + test "$silent" = yes && exec 6>/dev/null + + ++ac_pwd=`pwd` && test -n "$ac_pwd" && ++ac_ls_di=`ls -di .` && ++ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || ++ { echo "$as_me: error: Working directory cannot be determined" >&2 ++ { (exit 1); exit 1; }; } ++test "X$ac_ls_di" = "X$ac_pwd_ls_di" || ++ { echo "$as_me: error: pwd does not report name of working directory" >&2 ++ { (exit 1); exit 1; }; } ++ ++ + # 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 || ++ # Try the directory containing this script, then the parent directory. ++ ac_confdir=`$as_dirname -- "$0" || + $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$0" : 'X\(//\)[^/]' \| \ +- X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ 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'` ++ 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 ++ 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 +- +-# ++if test ! -r "$srcdir/$ac_unique_file"; then ++ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." ++ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 ++ { (exit 1); exit 1; }; } ++fi ++ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ++ac_abs_confdir=`( ++ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 ++ { (exit 1); exit 1; }; } ++ pwd)` ++# When building in place, set srcdir=. ++if test "$ac_abs_confdir" = "$ac_pwd"; then ++ srcdir=. ++fi ++# Remove unnecessary trailing slashes from srcdir. ++# Double slashes in file names in object file debugging info ++# mess up M-x gdb in Emacs. ++case $srcdir in ++*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; ++esac ++for ac_var in $ac_precious_vars; do ++ eval ac_env_${ac_var}_set=\${${ac_var}+set} ++ eval ac_env_${ac_var}_value=\$${ac_var} ++ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} ++ eval ac_cv_env_${ac_var}_value=\$${ac_var} ++done ++ ++# + # Report the --help message. + # + if test "$ac_init_help" = "long"; then +@@ -798,14 +1203,11 @@ + -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] ++ [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX +- [PREFIX] ++ [PREFIX] + + By default, \`make install' will install all the files in + \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +@@ -818,15 +1220,22 @@ + --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] ++ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] ++ --datadir=DIR read-only architecture-independent data [DATAROOTDIR] ++ --infodir=DIR info documentation [DATAROOTDIR/info] ++ --localedir=DIR locale-dependent data [DATAROOTDIR/locale] ++ --mandir=DIR man documentation [DATAROOTDIR/man] ++ --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] ++ --htmldir=DIR html documentation [DOCDIR] ++ --dvidir=DIR dvi documentation [DOCDIR] ++ --pdfdir=DIR pdf documentation [DOCDIR] ++ --psdir=DIR ps documentation [DOCDIR] + _ACEOF + + cat <<\_ACEOF +@@ -860,94 +1269,95 @@ + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory +- CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have +- headers in a nonstandard directory ++ LIBS libraries to pass to the linker, e.g. -l ++ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if ++ you have headers in a nonstandard directory + 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 ++ac_status=$? + 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 ++ test -d "$ac_dir" || continue + ac_builddir=. + +-if test "$ac_dir" != .; then ++case "$ac_dir" in ++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; ++*) + 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 ++ # A ".." for each directory in $ac_dir_suffix. ++ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` ++ case $ac_top_builddir_sub in ++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;; ++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; ++ esac ;; ++esac ++ac_abs_top_builddir=$ac_pwd ++ac_abs_builddir=$ac_pwd$ac_dir_suffix ++# for backward compatibility: ++ac_top_builddir=$ac_top_build_prefix + + case $srcdir in +- .) # No --srcdir option. We are building in place. ++ .) # 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_top_srcdir=$ac_top_builddir_sub ++ ac_abs_top_srcdir=$ac_pwd ;; ++ [\\/]* | ?:[\\/]* ) # Absolute name. + 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 +-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +-# absolute. +-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` +- +- 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 ++ ac_top_srcdir=$srcdir ++ ac_abs_top_srcdir=$srcdir ;; ++ *) # Relative name. ++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ++ ac_top_srcdir=$ac_top_build_prefix$srcdir ++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;; ++esac ++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix ++ ++ cd "$ac_dir" || { ac_status=$?; continue; } ++ # Check for guested 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 + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 +- fi +- cd $ac_popdir ++ fi || ac_status=$? ++ cd "$ac_pwd" || { ac_status=$?; break; } + done + fi + +-test -n "$ac_init_help" && exit 0 ++test -n "$ac_init_help" && exit $ac_status + if $ac_init_version; then + cat <<\_ACEOF ++configure ++generated by GNU Autoconf 2.61 + +-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +-Free Software Foundation, Inc. ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, ++2002, 2003, 2004, 2005, 2006 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 ++ exit + fi +-exec 5>config.log +-cat >&5 <<_ACEOF ++cat >config.log <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + + It was created by $as_me, which was +-generated by GNU Autoconf 2.57. Invocation command line was ++generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + + _ACEOF ++exec 5>>config.log + { + cat <<_ASUNAME + ## --------- ## +@@ -966,7 +1376,7 @@ + /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` ++/usr/bin/hostinfo = `(/usr/bin/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` +@@ -980,6 +1390,7 @@ + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" + done ++IFS=$as_save_IFS + + } >&5 + +@@ -1001,7 +1412,6 @@ + ac_configure_args= + ac_configure_args0= + ac_configure_args1= +-ac_sep= + ac_must_keep_next=false + for ac_pass in 1 2 + do +@@ -1012,7 +1422,7 @@ + -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 +@@ -1020,23 +1430,21 @@ + 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. ++ 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 ++ 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=" " ++ ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +@@ -1047,8 +1455,8 @@ + # 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. ++# WARNING: Use '\'' to represent an apostrophe within the trap. ++# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. + trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { +@@ -1061,20 +1469,34 @@ + _ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +-{ ++( ++ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do ++ eval ac_val=\$$ac_var ++ case $ac_val in #( ++ *${as_nl}*) ++ case $ac_var in #( ++ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 ++echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; ++ esac ++ case $ac_var in #( ++ _ | IFS | as_nl) ;; #( ++ *) $as_unset $ac_var ;; ++ esac ;; ++ esac ++ done + (set) 2>&1 | +- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in +- *ac_space=\ *) ++ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( ++ *${as_nl}ac_space=\ *) + sed -n \ +- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; +- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" +- ;; ++ "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" ++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; +- esac; +-} ++ esac | ++ sort ++) + echo + + cat <<\_ASBOX +@@ -1085,22 +1507,28 @@ + echo + for ac_var in $ac_subst_vars + do +- eval ac_val=$`echo $ac_var` +- echo "$ac_var='"'"'$ac_val'"'"'" ++ eval ac_val=\$$ac_var ++ case $ac_val in ++ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; ++ esac ++ echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +-## ------------- ## +-## Output files. ## +-## ------------- ## ++## ------------------- ## ++## File substitutions. ## ++## ------------------- ## + _ASBOX + echo + for ac_var in $ac_subst_files + do +- eval ac_val=$`echo $ac_var` +- echo "$ac_var='"'"'$ac_val'"'"'" ++ eval ac_val=\$$ac_var ++ case $ac_val in ++ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; ++ esac ++ echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi +@@ -1112,26 +1540,24 @@ + ## ----------- ## + _ASBOX + echo +- sed "/^$/d" confdefs.h | sort ++ cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 +- rm -f core core.* *.core && +- rm -rf conftest* confdefs* conf$$* $ac_clean_files && ++ rm -f core *.core core.conftest.* && ++ rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +- ' 0 ++' 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 ++rm -f -r conftest* confdefs.h + + # Predefined preprocessor variables. + +@@ -1162,14 +1588,17 @@ + + # 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 ++if test -n "$CONFIG_SITE"; then ++ set x "$CONFIG_SITE" ++elif test "x$prefix" != xNONE; then ++ set x "$prefix/share/config.site" "$prefix/etc/config.site" ++else ++ set x "$ac_default_prefix/share/config.site" \ ++ "$ac_default_prefix/etc/config.site" + fi +-for ac_site_file in $CONFIG_SITE; do ++shift ++for ac_site_file ++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;} +@@ -1185,8 +1614,8 @@ + { 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;; ++ [\\/]* | ?:[\\/]* ) . "$cache_file";; ++ *) . "./$cache_file";; + esac + fi + else +@@ -1198,12 +1627,11 @@ + # 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 ++for ac_var in $ac_precious_vars; 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" ++ 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 +@@ -1216,20 +1644,19 @@ + ,);; + *) + 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:$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:$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:$LINENO: current value: $ac_new_val" >&5 + echo "$as_me: current value: $ac_new_val" >&2;} +- ac_cache_corrupted=: ++ 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=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in +@@ -1246,12 +1673,6 @@ + { (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 +- + + + +@@ -1268,9 +1689,14 @@ + + + ++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_config_headers="$ac_config_headers config.h" ++ac_config_headers="$ac_config_headers config.h" + + + +@@ -1285,8 +1711,8 @@ + echo $ECHO_N "checking for prefix by $ECHO_C" >&6 + # Extract the first word of "screen", so it can be a program name with args. + set dummy screen; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_ac_prefix_program+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -1301,52 +1727,75 @@ + 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_prefix_program="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + ;; + esac + fi + ac_prefix_program=$ac_cv_path_ac_prefix_program +- + if test -n "$ac_prefix_program"; then +- echo "$as_me:$LINENO: result: $ac_prefix_program" >&5 +-echo "${ECHO_T}$ac_prefix_program" >&6 ++ { echo "$as_me:$LINENO: result: $ac_prefix_program" >&5 ++echo "${ECHO_T}$ac_prefix_program" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- if test -n $ac_prefix_program; then +- prefix=`(dirname "$ac_prefix_program") 2>/dev/null || ++ ++ if test -n "$ac_prefix_program"; then ++ prefix=`$as_dirname -- "$ac_prefix_program" || + $as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$ac_prefix_program" : 'X\(//\)[^/]' \| \ +- X"$ac_prefix_program" : 'X\(//\)$' \| \ +- X"$ac_prefix_program" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$ac_prefix_program" : 'X\(//\)[^/]' \| \ ++ X"$ac_prefix_program" : 'X\(//\)$' \| \ ++ X"$ac_prefix_program" : 'X\(/\)' \| . 2>/dev/null || + echo X"$ac_prefix_program" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- prefix=`(dirname "$prefix") 2>/dev/null || ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ prefix=`$as_dirname -- "$prefix" || + $as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$prefix" : 'X\(//\)[^/]' \| \ +- X"$prefix" : 'X\(//\)$' \| \ +- X"$prefix" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$prefix" : 'X\(//\)[^/]' \| \ ++ X"$prefix" : 'X\(//\)$' \| \ ++ X"$prefix" : 'X\(/\)' \| . 2>/dev/null || + echo X"$prefix" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + fi + fi + +@@ -1354,8 +1803,8 @@ + echo $ECHO_N "checking for prefix by $ECHO_C" >&6 + # Extract the first word of "gzip", so it can be a program name with args. + set dummy gzip; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_ac_prefix_program+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -1370,52 +1819,75 @@ + 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_prefix_program="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + ;; + esac + fi + ac_prefix_program=$ac_cv_path_ac_prefix_program +- + if test -n "$ac_prefix_program"; then +- echo "$as_me:$LINENO: result: $ac_prefix_program" >&5 +-echo "${ECHO_T}$ac_prefix_program" >&6 ++ { echo "$as_me:$LINENO: result: $ac_prefix_program" >&5 ++echo "${ECHO_T}$ac_prefix_program" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- if test -n $ac_prefix_program; then +- prefix=`(dirname "$ac_prefix_program") 2>/dev/null || ++ ++ if test -n "$ac_prefix_program"; then ++ prefix=`$as_dirname -- "$ac_prefix_program" || + $as_expr X"$ac_prefix_program" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$ac_prefix_program" : 'X\(//\)[^/]' \| \ +- X"$ac_prefix_program" : 'X\(//\)$' \| \ +- X"$ac_prefix_program" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$ac_prefix_program" : 'X\(//\)[^/]' \| \ ++ X"$ac_prefix_program" : 'X\(//\)$' \| \ ++ X"$ac_prefix_program" : 'X\(/\)' \| . 2>/dev/null || + echo X"$ac_prefix_program" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- prefix=`(dirname "$prefix") 2>/dev/null || ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ prefix=`$as_dirname -- "$prefix" || + $as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$prefix" : 'X\(//\)[^/]' \| \ +- X"$prefix" : 'X\(//\)$' \| \ +- X"$prefix" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$prefix" : 'X\(//\)[^/]' \| \ ++ X"$prefix" : 'X\(//\)$' \| \ ++ X"$prefix" : 'X\(/\)' \| . 2>/dev/null || + echo X"$prefix" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + fi + fi + +@@ -1429,8 +1901,8 @@ + 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 ++{ 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 +@@ -1443,32 +1915,34 @@ + 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 ++IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 ++ { 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 ++ { 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 ++{ 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 +@@ -1481,36 +1955,51 @@ + 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 ++IFS=$as_save_IFS + + 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 ++ { 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 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + +- CC=$ac_ct_CC ++ if test "x$ac_ct_CC" = x; then ++ CC="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ CC=$ac_ct_CC ++ fi + 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. ++ 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 ++{ 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 +@@ -1523,74 +2012,34 @@ + 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 ++IFS=$as_save_IFS + + 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 ++ { 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 ++ { 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 + 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 ++{ 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 +@@ -1604,7 +2053,7 @@ + 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 +@@ -1615,6 +2064,7 @@ + fi + done + done ++IFS=$as_save_IFS + + if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. +@@ -1632,22 +2082,23 @@ + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 ++ { 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 ++ { 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 ++ for ac_prog in cl.exe + 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 ++{ 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 +@@ -1660,36 +2111,38 @@ + 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 ++IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- echo "$as_me:$LINENO: result: $CC" >&5 +-echo "${ECHO_T}$CC" >&6 ++ { 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 ++ { 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 ++ for ac_prog in cl.exe + 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 ++{ 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 +@@ -1702,29 +2155,45 @@ + 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 ++IFS=$as_save_IFS + + 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 ++ { 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 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + test -n "$ac_ct_CC" && break + done + +- CC=$ac_ct_CC ++ if test "x$ac_ct_CC" = x; then ++ CC="" ++ else ++ case $cross_compiling:$ac_tool_warned in ++yes:) ++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&5 ++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools ++whose name does not start with the host triplet. If you think this ++configuration is useful to you, please write to autoconf@gnu.org." >&2;} ++ac_tool_warned=yes ;; ++esac ++ CC=$ac_ct_CC ++ fi + fi + + fi +@@ -1737,27 +2206,40 @@ + { (exit 1); exit 1; }; } + + # Provide some information about the compiler. +-echo "$as_me:$LINENO:" \ +- "checking for C compiler version" >&5 ++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 &5\"") >&5 +- (eval $ac_compiler --version &5) 2>&5 ++{ (ac_try="$ac_compiler --version >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 +- (eval $ac_compiler -v &5) 2>&5 ++{ (ac_try="$ac_compiler -v >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 +- (eval $ac_compiler -V &5) 2>&5 ++{ (ac_try="$ac_compiler -V >&5" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -1777,47 +2259,77 @@ + # 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" >&5 +-echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ++{ 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 ++# ++# List of possible output files, starting from the most likely. ++# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) ++# only as a last resort. b.out is created by i960 compilers. ++ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' ++# ++# The IRIX 6 linker writes into existing files which may not be ++# executable, retaining their permissions. Remove them first so a ++# subsequent execution test works. ++ac_rmfiles= ++for ac_file in $ac_files ++do ++ case $ac_file in ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; ++ * ) ac_rmfiles="$ac_rmfiles $ac_file";; ++ esac ++done ++rm -f $ac_rmfiles ++ ++if { (ac_try="$ac_link_default" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. ++# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' ++# in a Makefile. We should not override ac_cv_exeext if it was cached, ++# so that the user can short-circuit this test for compilers unknown to ++# Autoconf. ++for ac_file in $ac_files '' + 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. +- ;; ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ++ ;; + [ab].out ) +- # We found the default executable, but exeext='' is most +- # certainly right. +- break;; ++ # 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;; ++ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; ++ then :; else ++ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ++ fi ++ # We set ac_cv_exeext here because the later test for it is not ++ # safe: cross compilers may not add the suffix if given an `-o' ++ # argument, so we may need to know it at that point already. ++ # Even if this section looks crufty: it has the advantage of ++ # actually working. ++ break;; + * ) +- break;; ++ break;; + esac + done ++test "$ac_cv_exeext" = no && ac_cv_exeext= ++ + else ++ ac_file='' ++fi ++ ++{ echo "$as_me:$LINENO: result: $ac_file" >&5 ++echo "${ECHO_T}$ac_file" >&6; } ++if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +@@ -1829,19 +2341,21 @@ + 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 ++# Check that 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 ++{ 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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -1860,22 +2374,27 @@ + fi + fi + fi +-echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++{ 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 ++# Check that 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 ++{ 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 { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then +@@ -1886,10 +2405,9 @@ + 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_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` +- export ac_cv_exeext +- break;; ++ break;; + * ) break;; + esac + done +@@ -1902,19 +2420,18 @@ + fi + + rm -f conftest$ac_cv_exeext +-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +-echo "${ECHO_T}$ac_cv_exeext" >&6 ++{ 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 ++{ 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 +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -1930,14 +2447,20 @@ + } + _ACEOF + rm -f conftest.o conftest.obj +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ for ac_file in conftest.o conftest.obj conftest.*; do ++ test -f "$ac_file" || continue; + case $ac_file in +- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; ++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +@@ -1955,17 +2478,16 @@ + + 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 ++{ 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 ++{ 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 +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -1984,41 +2506,87 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-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); } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_compiler_gnu=no ++ ac_compiler_gnu=no + fi +-rm -f conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core 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 ++{ 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 ++{ 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 +-#line $LINENO "configure" ++ ac_save_c_werror_flag=$ac_c_werror_flag ++ ac_c_werror_flag=yes ++ ac_cv_prog_cc_g=no ++ CFLAGS="-g" ++ 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 { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_prog_cc_g=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ CFLAGS="" ++ cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -2034,28 +2602,80 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ : ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ac_c_werror_flag=$ac_save_c_werror_flag ++ CFLAGS="-g" ++ 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 { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; 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.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_c_werror_flag=$ac_save_c_werror_flag + fi +-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 ++{ 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 +@@ -2071,15 +2691,14 @@ + 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 "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 ++echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } ++if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +- ac_cv_prog_cc_stdc=no ++ ac_cv_prog_cc_c89=no + ac_save_CC=$CC + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -2107,6 +2726,21 @@ + 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 -std 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 -std. */ ++int osf4_cc_array ['\x00' == 0 ? 1 : -1]; ++ ++/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters ++ inside strings and character constants. */ ++#define FOO(x) 'x' ++int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; ++ + int test (int i, double x); + struct s1 {int (*f) (int a);}; + struct s2 {int (*f) (double a);}; +@@ -2121,232 +2755,119 @@ + 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__" ++for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ ++ -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>&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 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then +- ac_cv_prog_cc_stdc=$ac_arg +-break ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then ++ ac_cv_prog_cc_c89=$ac_arg + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.$ac_objext ++ ++rm -f core conftest.err conftest.$ac_objext ++ test "x$ac_cv_prog_cc_c89" != "xno" && break + done +-rm -f conftest.$ac_ext conftest.$ac_objext ++rm -f conftest.$ac_ext + 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 ;; ++# AC_CACHE_VAL ++case "x$ac_cv_prog_cc_c89" in ++ x) ++ { echo "$as_me:$LINENO: result: none needed" >&5 ++echo "${ECHO_T}none needed" >&6; } ;; ++ xno) ++ { echo "$as_me:$LINENO: result: unsupported" >&5 ++echo "${ECHO_T}unsupported" >&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" ;; ++ CC="$CC $ac_cv_prog_cc_c89" ++ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 ++echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + 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>&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 \ +- ''\ +- '#include ' \ +- '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);' ++ ++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 to if __STDC__ is defined, since ++ # 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 +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-#include +-$ac_declaration +-int +-main () +-{ +-exit (42); +- ; +- return 0; +-} ++#ifdef __STDC__ ++# include ++#else ++# include ++#endif ++ Syntax error + _ACEOF +-rm -f conftest.$ac_objext +-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); } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then +- : +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-continue +-fi +-rm -f conftest.$ac_objext conftest.$ac_ext +- cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" +-/* 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>&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.$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.$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 to if __STDC__ is defined, since +- # 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 +-#line $LINENO "configure" +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#ifdef __STDC__ +-# include +-#else +-# include +-#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 +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + : + else + echo "$as_me: failed program was:" >&5 +@@ -2355,12 +2876,12 @@ + # 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 ++ # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -2368,23 +2889,22 @@ + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + # Broken: success on invalid input. + continue + else +@@ -2395,6 +2915,7 @@ + ac_preproc_ok=: + break + fi ++ + rm -f conftest.err conftest.$ac_ext + + done +@@ -2412,8 +2933,8 @@ + else + ac_cv_prog_CPP=$CPP + fi +-echo "$as_me:$LINENO: result: $CPP" >&5 +-echo "${ECHO_T}$CPP" >&6 ++{ 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 +@@ -2424,7 +2945,6 @@ + # 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 +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -2435,25 +2955,24 @@ + #else + # include + #endif +- Syntax error ++ Syntax error + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + : + else + echo "$as_me: failed program was:" >&5 +@@ -2462,12 +2981,12 @@ + # 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 ++ # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -2475,23 +2994,22 @@ + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + # Broken: success on invalid input. + continue + else +@@ -2502,6 +3020,7 @@ + ac_preproc_ok=: + break + fi ++ + rm -f conftest.err conftest.$ac_ext + + done +@@ -2525,30 +3044,176 @@ + + + +-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 "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 ++echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } ++if test "${ac_cv_path_GREP+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ # Extract the first word of "grep ggrep" to use in msg output ++if test -z "$GREP"; then ++set dummy grep ggrep; ac_prog_name=$2 ++if test "${ac_cv_path_GREP+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_path_GREP_found=false ++# Loop through the user's path and test for each of PROGNAME-LIST ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_prog in grep ggrep; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue ++ # Check for GNU ac_path_GREP and select it if it is found. ++ # Check for GNU $ac_path_GREP ++case `"$ac_path_GREP" --version 2>&1` in ++*GNU*) ++ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; ++*) ++ ac_count=0 ++ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" ++ while : ++ do ++ cat "conftest.in" "conftest.in" >"conftest.tmp" ++ mv "conftest.tmp" "conftest.in" ++ cp "conftest.in" "conftest.nl" ++ echo 'GREP' >> "conftest.nl" ++ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break ++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ++ ac_count=`expr $ac_count + 1` ++ if test $ac_count -gt ${ac_path_GREP_max-0}; then ++ # Best one so far, save it but keep looking for a better one ++ ac_cv_path_GREP="$ac_path_GREP" ++ ac_path_GREP_max=$ac_count ++ fi ++ # 10*(2^10) chars as input seems more than enough ++ test $ac_count -gt 10 && break ++ done ++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; ++esac ++ ++ ++ $ac_path_GREP_found && break 3 ++ done ++done ++ ++done ++IFS=$as_save_IFS ++ ++ ++fi ++ ++GREP="$ac_cv_path_GREP" ++if test -z "$GREP"; then ++ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 ++echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} ++ { (exit 1); exit 1; }; } ++fi ++ ++else ++ ac_cv_path_GREP=$GREP ++fi ++ ++ ++fi ++{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 ++echo "${ECHO_T}$ac_cv_path_GREP" >&6; } ++ GREP="$ac_cv_path_GREP" ++ ++ ++{ echo "$as_me:$LINENO: checking for egrep" >&5 ++echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } ++if test "${ac_cv_path_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_path_EGREP="$GREP -E" ++ else ++ # Extract the first word of "egrep" to use in msg output ++if test -z "$EGREP"; then ++set dummy egrep; ac_prog_name=$2 ++if test "${ac_cv_path_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' ++ ac_path_EGREP_found=false ++# Loop through the user's path and test for each of PROGNAME-LIST ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_prog in egrep; do ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" ++ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue ++ # Check for GNU ac_path_EGREP and select it if it is found. ++ # Check for GNU $ac_path_EGREP ++case `"$ac_path_EGREP" --version 2>&1` in ++*GNU*) ++ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; ++*) ++ ac_count=0 ++ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" ++ while : ++ do ++ cat "conftest.in" "conftest.in" >"conftest.tmp" ++ mv "conftest.tmp" "conftest.in" ++ cp "conftest.in" "conftest.nl" ++ echo 'EGREP' >> "conftest.nl" ++ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break ++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ++ ac_count=`expr $ac_count + 1` ++ if test $ac_count -gt ${ac_path_EGREP_max-0}; then ++ # Best one so far, save it but keep looking for a better one ++ ac_cv_path_EGREP="$ac_path_EGREP" ++ ac_path_EGREP_max=$ac_count + fi ++ # 10*(2^10) chars as input seems more than enough ++ test $ac_count -gt 10 && break ++ done ++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; ++esac ++ ++ ++ $ac_path_EGREP_found && break 3 ++ done ++done ++ ++done ++IFS=$as_save_IFS ++ ++ ++fi ++ ++EGREP="$ac_cv_path_EGREP" ++if test -z "$EGREP"; then ++ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 ++echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} ++ { (exit 1); exit 1; }; } ++fi ++ ++else ++ ac_cv_path_EGREP=$EGREP ++fi ++ ++ ++ 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: result: $ac_cv_path_EGREP" >&5 ++echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } ++ EGREP="$ac_cv_path_EGREP" + + + if test $ac_cv_c_compiler_gnu = yes; then +- echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 +-echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 ++echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6; } + if test "${ac_cv_prog_gcc_traditional+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_pattern="Autoconf.*'x'" + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -2568,7 +3233,6 @@ + + if test $ac_cv_prog_gcc_traditional = no; then + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -2585,116 +3249,93 @@ + + fi + fi +-echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 +-echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 ++echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6; } + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi + fi + +-echo "$as_me:$LINENO: checking for library containing strerror" >&5 +-echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for library containing strerror" >&5 ++echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; } + if test "${ac_cv_search_strerror+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_func_search_save_LIBS=$LIBS +-ac_cv_search_strerror=no + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* 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. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #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 strerror (); + int + main () + { +-strerror (); ++return strerror (); + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++for ac_lib in '' cposix; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ rm -f conftest.$ac_objext conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then +- ac_cv_search_strerror="none required" ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ ac_cv_search_strerror=$ac_res + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +-if test "$ac_cv_search_strerror" = no; then +- for ac_lib in cposix; do +- LIBS="-l$ac_lib $ac_func_search_save_LIBS" +- cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" +-/* 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 strerror (); +-int +-main () +-{ +-strerror (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext 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='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_search_strerror="-l$ac_lib" +-break +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++fi + ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext ++ if test "${ac_cv_search_strerror+set}" = set; then ++ break + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +- done ++done ++if test "${ac_cv_search_strerror+set}" = set; then ++ : ++else ++ ac_cv_search_strerror=no + fi ++rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 +-echo "${ECHO_T}$ac_cv_search_strerror" >&6 +-if test "$ac_cv_search_strerror" != no; then +- test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" ++{ echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 ++echo "${ECHO_T}$ac_cv_search_strerror" >&6; } ++ac_res=$ac_cv_search_strerror ++if test "$ac_res" != no; then ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + fi + +@@ -2707,7 +3348,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -2716,13 +3356,22 @@ + main(){exit(0);} + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -2745,9 +3394,11 @@ + fi + + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + ++ ++ + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + See \`config.log' for more details." >&5 +@@ -2756,7 +3407,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -2765,13 +3415,22 @@ + main(){exit(0);} + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -2792,9 +3451,11 @@ + echo "$as_me: error: Can't run the compiler - sorry" >&2;} + { (exit 1); exit 1; }; } + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + ++ ++ + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + See \`config.log' for more details." >&5 +@@ -2803,7 +3464,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -2818,13 +3478,22 @@ + + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -2837,15 +3506,17 @@ + sed 's/^/| /' conftest.$ac_ext >&5 + + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + ++ ++ + for ac_prog in gawk mawk nawk awk + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -2858,53 +3529,61 @@ + 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + fi + fi + AWK=$ac_cv_prog_AWK + if test -n "$AWK"; then +- echo "$as_me:$LINENO: result: $AWK" >&5 +-echo "${ECHO_T}$AWK" >&6 ++ { echo "$as_me:$LINENO: result: $AWK" >&5 ++echo "${ECHO_T}$AWK" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + test -n "$AWK" && break + done + + + ac_aux_dir= +-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do +- if test -f $ac_dir/install-sh; then ++for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do ++ if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break +- elif test -f $ac_dir/install.sh; then ++ 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 ++ 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 $srcdir $srcdir/.. $srcdir/../.." >&5 +-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} ++ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 ++echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&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. ++ ++# These three variables are undocumented and unsupported, ++# and are intended to be withdrawn in a future Autoconf release. ++# They can cause serious problems if a builder's source tree is in a directory ++# whose full name contains unusual characters. ++ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ++ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ++ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ++ + + # Find a good install program. We prefer a C program (faster), + # so one script is as good as another. But avoid the broken or +@@ -2917,9 +3596,10 @@ + # 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 ++{ 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 +@@ -2933,6 +3613,7 @@ + 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. +@@ -2940,40 +3621,41 @@ + # 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 ++ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 ++IFS=$as_save_IFS + + + fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else +- # As a last resort, use the slow shell script. We don't cache a +- # path for INSTALL within a source directory, because that will ++ # As a last resort, use the slow shell script. Don't cache a ++ # value 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. ++ # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi + fi +-echo "$as_me:$LINENO: result: $INSTALL" >&5 +-echo "${ECHO_T}$INSTALL" >&6 ++{ 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. +@@ -2992,37 +3674,42 @@ + + + +-echo "$as_me:$LINENO: checking if a system-wide socket dir should be used" >&5 +-echo $ECHO_N "checking if a system-wide socket dir should be used... $ECHO_C" >&6 +-# Check whether --enable-socket-dir or --disable-socket-dir was given. ++{ echo "$as_me:$LINENO: checking if a system-wide socket dir should be used" >&5 ++echo $ECHO_N "checking if a system-wide socket dir should be used... $ECHO_C" >&6; } ++# Check whether --enable-socket-dir was given. + if test "${enable_socket_dir+set}" = set; then +- enableval="$enable_socket_dir" +- +- echo "$as_me:$LINENO: result: no. ~/.screen will be used instead." >&5 +-echo "${ECHO_T}no. ~/.screen will be used instead." >&6 ++ enableval=$enable_socket_dir; ++ { echo "$as_me:$LINENO: result: no. ~/.screen will be used instead." >&5 ++echo "${ECHO_T}no. ~/.screen will be used instead." >&6; } + + else + +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 +- echo "$as_me:$LINENO: checking for the socket dir" >&5 +-echo $ECHO_N "checking for the socket dir... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } ++ { echo "$as_me:$LINENO: checking for the socket dir" >&5 ++echo $ECHO_N "checking for the socket dir... $ECHO_C" >&6; } + SOCKDIR="(eff_uid ? \"/tmp/uscreens\" : \"/tmp/screens\")" + +-# Check whether --with-socket-dir or --without-socket-dir was given. ++# Check whether --with-socket-dir was given. + if test "${with_socket_dir+set}" = set; then +- withval="$with_socket_dir" +- SOCKDIR="\"${withval}\"" +-fi; +- echo "$as_me:$LINENO: result: ${SOCKDIR}" >&5 +-echo "${ECHO_T}${SOCKDIR}" >&6 ++ withval=$with_socket_dir; ++ case "${withval}" in ++ *\"*) SOCKDIR="${withval}" ;; ++ *) SOCKDIR="\"${withval}\"" ;; ++ esac ++ ++fi ++ ++ { echo "$as_me:$LINENO: result: ${SOCKDIR}" >&5 ++echo "${ECHO_T}${SOCKDIR}" >&6; } + cat >>confdefs.h <<_ACEOF + #define SOCKDIR $SOCKDIR + _ACEOF + + + +-fi; ++fi ++ + + + if test -n "$ISC"; then +@@ -3048,7 +3735,6 @@ + { echo "$as_me:$LINENO: checking mld library..." >&5 + echo "$as_me: checking mld library..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3064,25 +3750,33 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-LIBS="$oldlibs" ++ LIBS="$oldlibs" + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + if test -r /dev/ptc; then + cat >>confdefs.h <<\_ACEOF + #define MIPS 1 +@@ -3091,7 +3785,6 @@ + { echo "$as_me:$LINENO: checking wait3..." >&5 + echo "$as_me: checking wait3..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3107,26 +3800,31 @@ + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 -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 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-{ echo "$as_me:$LINENO: checking wait2..." >&5 ++ { echo "$as_me:$LINENO: checking wait2..." >&5 + echo "$as_me: checking wait2..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3142,17 +3840,23 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + cat >>confdefs.h <<\_ACEOF + #define USE_WAIT2 1 + _ACEOF +@@ -3162,10 +3866,15 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi + fi + +@@ -3173,7 +3882,6 @@ + { echo "$as_me:$LINENO: checking for Ultrix..." >&5 + echo "$as_me: checking for Ultrix..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3197,7 +3905,6 @@ + { echo "$as_me:$LINENO: checking Pyramid OSX..." >&5 + echo "$as_me: checking Pyramid OSX..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3213,17 +3920,23 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + cat >>confdefs.h <<\_ACEOF + #define OSX 1 + _ACEOF +@@ -3232,15 +3945,16 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-LIBS="$oldlibs" ++ LIBS="$oldlibs" + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi + + { echo "$as_me:$LINENO: checking for butterfly..." >&5 + echo "$as_me: checking for butterfly..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3265,7 +3979,6 @@ + { echo "$as_me:$LINENO: checking for POSIX.1..." >&5 + echo "$as_me: checking for POSIX.1..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3294,7 +4007,6 @@ + { echo "$as_me:$LINENO: checking for System V..." >&5 + echo "$as_me: checking for System V..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3312,33 +4024,38 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-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); } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-cat >>confdefs.h <<\_ACEOF ++ cat >>confdefs.h <<\_ACEOF + #define SYSV 1 + _ACEOF + + fi +-rm -f conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { echo "$as_me:$LINENO: checking for sequent/ptx..." >&5 + echo "$as_me: checking for sequent/ptx..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3360,13 +4077,12 @@ + LIBS="$LIBS -lelf" + { echo "$as_me:$LINENO: checking SVR4..." >&5 + echo "$as_me: checking SVR4..." >&6;} +-echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 ++{ 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 +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3386,30 +4102,35 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-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); } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; 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 ++ ac_cv_header_stdc=no + fi +-rm -f conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core 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 +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3431,7 +4152,6 @@ + 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 +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3456,21 +4176,21 @@ + : + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include ++#include + #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')) ++ (('a' <= (c) && (c) <= 'i') \ ++ || ('j' <= (c) && (c) <= 'r') \ ++ || ('s' <= (c) && (c) <= 'z')) + # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) + #endif + +@@ -3481,19 +4201,28 @@ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) +- || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ || toupper (i) != TOUPPER (i)) ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -3506,12 +4235,14 @@ + ( exit $ac_status ) + ac_cv_header_stdc=no + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* 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 ++{ 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 +@@ -3531,16 +4262,15 @@ + + + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ +- inttypes.h stdint.h unistd.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 "$as_me:$LINENO: checking for $ac_header" >&5 ++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3551,28 +4281,35 @@ + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext +-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); } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; 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" ++ eval "$as_ac_Header=no" + fi +-rm -f conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core 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 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +@@ -3584,7 +4321,6 @@ + + + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3601,31 +4337,36 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + if test "${ac_cv_header_dwarf_h+set}" = set; then +- echo "$as_me:$LINENO: checking for dwarf.h" >&5 +-echo $ECHO_N "checking for dwarf.h... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for dwarf.h" >&5 ++echo $ECHO_N "checking for dwarf.h... $ECHO_C" >&6; } + if test "${ac_cv_header_dwarf_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi +-echo "$as_me:$LINENO: result: $ac_cv_header_dwarf_h" >&5 +-echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_header_dwarf_h" >&5 ++echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6; } + else + # Is the header compilable? +-echo "$as_me:$LINENO: checking dwarf.h usability" >&5 +-echo $ECHO_N "checking dwarf.h usability... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking dwarf.h usability" >&5 ++echo $ECHO_N "checking dwarf.h usability... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3635,33 +4376,38 @@ + #include + _ACEOF + rm -f conftest.$ac_objext +-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); } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_header_compiler=no ++ ac_header_compiler=no + fi +-rm -f conftest.$ac_objext conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++rm -f core 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 dwarf.h presence" >&5 +-echo $ECHO_N "checking dwarf.h presence... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking dwarf.h presence" >&5 ++echo $ECHO_N "checking dwarf.h presence... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3669,23 +4415,22 @@ + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + ac_header_preproc=yes + else + echo "$as_me: failed program was:" >&5 +@@ -3693,52 +4438,45 @@ + + 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 ++{ 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 in +- yes:no ) ++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in ++ yes:no: ) + { echo "$as_me:$LINENO: WARNING: dwarf.h: accepted by the compiler, rejected by the preprocessor!" >&5 + echo "$as_me: WARNING: dwarf.h: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { echo "$as_me:$LINENO: WARNING: dwarf.h: proceeding with the preprocessor's result" >&5 +-echo "$as_me: WARNING: dwarf.h: proceeding with the preprocessor's result" >&2;} +- ( +- cat <<\_ASBOX +-## ------------------------------------ ## +-## Report this to bug-autoconf@gnu.org. ## +-## ------------------------------------ ## +-_ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ { echo "$as_me:$LINENO: WARNING: dwarf.h: proceeding with the compiler's result" >&5 ++echo "$as_me: WARNING: dwarf.h: proceeding with the compiler's result" >&2;} ++ ac_header_preproc=yes + ;; +- no:yes ) ++ no:yes:* ) + { echo "$as_me:$LINENO: WARNING: dwarf.h: present but cannot be compiled" >&5 + echo "$as_me: WARNING: dwarf.h: present but cannot be compiled" >&2;} +- { echo "$as_me:$LINENO: WARNING: dwarf.h: check for missing prerequisite headers?" >&5 +-echo "$as_me: WARNING: dwarf.h: check for missing prerequisite headers?" >&2;} ++ { echo "$as_me:$LINENO: WARNING: dwarf.h: check for missing prerequisite headers?" >&5 ++echo "$as_me: WARNING: dwarf.h: check for missing prerequisite headers?" >&2;} ++ { echo "$as_me:$LINENO: WARNING: dwarf.h: see the Autoconf documentation" >&5 ++echo "$as_me: WARNING: dwarf.h: see the Autoconf documentation" >&2;} ++ { echo "$as_me:$LINENO: WARNING: dwarf.h: section \"Present But Cannot Be Compiled\"" >&5 ++echo "$as_me: WARNING: dwarf.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: dwarf.h: proceeding with the preprocessor's result" >&5 + echo "$as_me: WARNING: dwarf.h: proceeding with the preprocessor's result" >&2;} +- ( +- cat <<\_ASBOX +-## ------------------------------------ ## +-## Report this to bug-autoconf@gnu.org. ## +-## ------------------------------------ ## +-_ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ { echo "$as_me:$LINENO: WARNING: dwarf.h: in the future, the compiler will take precedence" >&5 ++echo "$as_me: WARNING: dwarf.h: in the future, the compiler will take precedence" >&2;} ++ + ;; + esac +-echo "$as_me:$LINENO: checking for dwarf.h" >&5 +-echo $ECHO_N "checking for dwarf.h... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for dwarf.h" >&5 ++echo $ECHO_N "checking for dwarf.h... $ECHO_C" >&6; } + if test "${ac_cv_header_dwarf_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_header_dwarf_h=$ac_header_preproc + fi +-echo "$as_me:$LINENO: result: $ac_cv_header_dwarf_h" >&5 +-echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_header_dwarf_h" >&5 ++echo "${ECHO_T}$ac_cv_header_dwarf_h" >&6; } + + fi + if test $ac_cv_header_dwarf_h = yes; then +@@ -3751,19 +4489,18 @@ + + else + if test "${ac_cv_header_elf_h+set}" = set; then +- echo "$as_me:$LINENO: checking for elf.h" >&5 +-echo $ECHO_N "checking for elf.h... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for elf.h" >&5 ++echo $ECHO_N "checking for elf.h... $ECHO_C" >&6; } + if test "${ac_cv_header_elf_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi +-echo "$as_me:$LINENO: result: $ac_cv_header_elf_h" >&5 +-echo "${ECHO_T}$ac_cv_header_elf_h" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_header_elf_h" >&5 ++echo "${ECHO_T}$ac_cv_header_elf_h" >&6; } + else + # Is the header compilable? +-echo "$as_me:$LINENO: checking elf.h usability" >&5 +-echo $ECHO_N "checking elf.h usability... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking elf.h usability" >&5 ++echo $ECHO_N "checking elf.h usability... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3773,33 +4510,38 @@ + #include + _ACEOF + rm -f conftest.$ac_objext +-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); } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_header_compiler=no ++ ac_header_compiler=no + fi +-rm -f conftest.$ac_objext conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++rm -f core 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 elf.h presence" >&5 +-echo $ECHO_N "checking elf.h presence... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking elf.h presence" >&5 ++echo $ECHO_N "checking elf.h presence... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3807,23 +4549,22 @@ + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + ac_header_preproc=yes + else + echo "$as_me: failed program was:" >&5 +@@ -3831,52 +4572,45 @@ + + 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 ++{ 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 in +- yes:no ) ++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in ++ yes:no: ) + { echo "$as_me:$LINENO: WARNING: elf.h: accepted by the compiler, rejected by the preprocessor!" >&5 + echo "$as_me: WARNING: elf.h: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { echo "$as_me:$LINENO: WARNING: elf.h: proceeding with the preprocessor's result" >&5 +-echo "$as_me: WARNING: elf.h: proceeding with the preprocessor's result" >&2;} +- ( +- cat <<\_ASBOX +-## ------------------------------------ ## +-## Report this to bug-autoconf@gnu.org. ## +-## ------------------------------------ ## +-_ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ { echo "$as_me:$LINENO: WARNING: elf.h: proceeding with the compiler's result" >&5 ++echo "$as_me: WARNING: elf.h: proceeding with the compiler's result" >&2;} ++ ac_header_preproc=yes + ;; +- no:yes ) ++ no:yes:* ) + { echo "$as_me:$LINENO: WARNING: elf.h: present but cannot be compiled" >&5 + echo "$as_me: WARNING: elf.h: present but cannot be compiled" >&2;} +- { echo "$as_me:$LINENO: WARNING: elf.h: check for missing prerequisite headers?" >&5 +-echo "$as_me: WARNING: elf.h: check for missing prerequisite headers?" >&2;} ++ { echo "$as_me:$LINENO: WARNING: elf.h: check for missing prerequisite headers?" >&5 ++echo "$as_me: WARNING: elf.h: check for missing prerequisite headers?" >&2;} ++ { echo "$as_me:$LINENO: WARNING: elf.h: see the Autoconf documentation" >&5 ++echo "$as_me: WARNING: elf.h: see the Autoconf documentation" >&2;} ++ { echo "$as_me:$LINENO: WARNING: elf.h: section \"Present But Cannot Be Compiled\"" >&5 ++echo "$as_me: WARNING: elf.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: elf.h: proceeding with the preprocessor's result" >&5 + echo "$as_me: WARNING: elf.h: proceeding with the preprocessor's result" >&2;} +- ( +- cat <<\_ASBOX +-## ------------------------------------ ## +-## Report this to bug-autoconf@gnu.org. ## +-## ------------------------------------ ## +-_ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ { echo "$as_me:$LINENO: WARNING: elf.h: in the future, the compiler will take precedence" >&5 ++echo "$as_me: WARNING: elf.h: in the future, the compiler will take precedence" >&2;} ++ + ;; + esac +-echo "$as_me:$LINENO: checking for elf.h" >&5 +-echo $ECHO_N "checking for elf.h... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for elf.h" >&5 ++echo $ECHO_N "checking for elf.h... $ECHO_C" >&6; } + if test "${ac_cv_header_elf_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_header_elf_h=$ac_header_preproc + fi +-echo "$as_me:$LINENO: result: $ac_cv_header_elf_h" >&5 +-echo "${ECHO_T}$ac_cv_header_elf_h" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_header_elf_h" >&5 ++echo "${ECHO_T}$ac_cv_header_elf_h" >&6; } + + fi + if test $ac_cv_header_elf_h = yes; then +@@ -3898,20 +4632,21 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-LIBS="$oldlibs" ++ LIBS="$oldlibs" + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + + { echo "$as_me:$LINENO: checking for Solaris 2.x..." >&5 + echo "$as_me: checking for Solaris 2.x..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-#if defined(__SVR4) && defined(__sun) ++#if defined(SVR4) && defined(sun) + yes + #endif + +@@ -3928,7 +4663,6 @@ + { echo "$as_me:$LINENO: checking BSD job jontrol..." >&5 + echo "$as_me: checking BSD job jontrol..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3957,17 +4691,23 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + echo "- you have jobcontrol" 1>&6 + cat >>confdefs.h <<\_ACEOF + #define BSDJOBS 1 +@@ -3977,15 +4717,16 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-echo "- you don't have jobcontrol" 1>&6 ++ echo "- you don't have jobcontrol" 1>&6 + + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + +-{ echo "$as_me:$LINENO: checking setreuid..." >&5 +-echo "$as_me: checking setreuid..." >&6;} ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++ ++{ echo "$as_me:$LINENO: checking setresuid..." >&5 ++echo "$as_me: checking setresuid..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -3996,28 +4737,80 @@ + main () + { + +-#ifdef __hpux + setresuid(0, 0, 0); +-#else +-setreuid(0, 0); +-#endif + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ cat >>confdefs.h <<\_ACEOF ++#define HAVE_SETRESUID 1 ++_ACEOF ++ ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++{ echo "$as_me:$LINENO: checking setreuid..." >&5 ++echo "$as_me: checking setreuid..." >&6;} ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++setreuid(0, 0); ++ ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + cat >>confdefs.h <<\_ACEOF + #define HAVE_SETREUID 1 + _ACEOF +@@ -4026,12 +4819,14 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + { echo "$as_me:$LINENO: checking seteuid..." >&5 + echo "$as_me: checking seteuid..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4042,7 +4837,7 @@ + main () + { + +-#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(__sun) && defined(__SVR4)) || defined(ISC) || defined(sony_news) ++#if defined(linux) || defined(NeXT) || defined(_AUX_SOURCE) || defined(AUX) || defined(ultrix) || (defined(sun) && defined(SVR4)) || defined(ISC) || defined(sony_news) + seteuid_is_broken(0); + #else + seteuid(0); +@@ -4053,17 +4848,23 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + cat >>confdefs.h <<\_ACEOF + #define HAVE_SETEUID 1 + _ACEOF +@@ -4072,14 +4873,16 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + + + { echo "$as_me:$LINENO: checking select..." >&5 + echo "$as_me: checking select..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4095,27 +4898,32 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-LIBS="$LIBS -lnet -lnsl" ++ LIBS="$LIBS -lnet -lnsl" + { echo "$as_me:$LINENO: checking select with $LIBS..." >&5 + echo "$as_me: checking select with $LIBS..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4131,30 +4939,40 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-{ { echo "$as_me:$LINENO: error: !!! no select - no screen" >&5 ++ { { echo "$as_me:$LINENO: error: !!! no select - no screen" >&5 + echo "$as_me: error: !!! no select - no screen" >&2;} + { (exit 1); exit 1; }; } + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + + { echo "$as_me:$LINENO: checking fifos..." >&5 + echo "$as_me: checking fifos..." >&6;} +@@ -4166,7 +4984,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4239,13 +5056,22 @@ + + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -4260,8 +5086,10 @@ + echo "- your fifos are not usable" 1>&6 + + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi ++ ++ + rm -f /tmp/conftest* + + if test -n "$fifo"; then +@@ -4275,7 +5103,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4328,13 +5155,22 @@ + + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -4352,8 +5188,10 @@ + _ACEOF + fifobr=1 + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi ++ ++ + rm -f /tmp/conftest* + fi + +@@ -4368,7 +5206,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4427,13 +5264,22 @@ + + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -4448,8 +5294,10 @@ + echo "- your sockets are not usable" 1>&6 + + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi ++ ++ + rm -f /tmp/conftest* + + if test -n "$sock"; then +@@ -4463,7 +5311,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4497,13 +5344,22 @@ + + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -4522,8 +5378,10 @@ + _ACEOF + socknofs=1 + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi ++ ++ + rm -f /tmp/conftest* + fi + +@@ -4541,11 +5399,7 @@ + echo "- as your fifos are broken lets use the sockets." 1>&6 + + else +- echo "- both sockets and fifos usable. let's take fifos." 1>&6 +- +- cat >>confdefs.h <<\_ACEOF +-#define NAMEDPIPE 1 +-_ACEOF ++ echo "- both sockets and fifos usable. let's take sockets." 1>&6 + + fi + else +@@ -4576,7 +5430,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4683,13 +5536,22 @@ + + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -4707,13 +5569,14 @@ + _ACEOF + + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + ++ ++ + { echo "$as_me:$LINENO: checking for tgetent..." >&5 + echo "$as_me: checking for tgetent..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4729,28 +5592,33 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-olibs="$LIBS" +-LIBS="-lcurses $olibs" +-{ echo "$as_me:$LINENO: checking libcurses..." >&5 +-echo "$as_me: checking libcurses..." >&6;} ++ olibs="$LIBS" ++LIBS="-lncursesw $olibs" ++{ echo "$as_me:$LINENO: checking libncursesw..." >&5 ++echo "$as_me: checking libncursesw..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4760,39 +5628,38 @@ + int + main () + { +- +-#ifdef __hpux +-__sorry_hpux_libcurses_is_totally_broken_in_10_10(); +-#else + tgetent((char *)0, (char *)0); +-#endif +- + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-LIBS="-ltermcap $olibs" +-{ echo "$as_me:$LINENO: checking libtermcap..." >&5 +-echo "$as_me: checking libtermcap..." >&6;} ++ LIBS="-lncurses $olibs" ++{ echo "$as_me:$LINENO: checking libncurses..." >&5 ++echo "$as_me: checking libncurses..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4808,27 +5675,32 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-LIBS="-ltermlib $olibs" +-{ echo "$as_me:$LINENO: checking libtermlib..." >&5 +-echo "$as_me: checking libtermlib..." >&6;} ++ LIBS="-lcurses $olibs" ++{ echo "$as_me:$LINENO: checking libcurses..." >&5 ++echo "$as_me: checking libcurses..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4838,33 +5710,44 @@ + int + main () + { ++ ++#ifdef __hpux ++__sorry_hpux_libcurses_is_totally_broken_in_10_10(); ++#else + tgetent((char *)0, (char *)0); ++#endif ++ + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 -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 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-LIBS="-lncurses $olibs" +-{ echo "$as_me:$LINENO: checking libncurses..." >&5 +-echo "$as_me: checking libncurses..." >&6;} ++ LIBS="-ltermcap $olibs" ++{ echo "$as_me:$LINENO: checking libtermcap..." >&5 ++echo "$as_me: checking libtermcap..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4880,35 +5763,96 @@ + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ : ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++ LIBS="-ltermlib $olibs" ++{ echo "$as_me:$LINENO: checking libtermlib..." >&5 ++echo "$as_me: checking libtermlib..." >&6;} ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++tgetent((char *)0, (char *)0); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-{ { echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5 ++ { { echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5 + echo "$as_me: error: !!! no tgetent - no screen" >&2;} + { (exit 1); exit 1; }; } + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +@@ -4918,7 +5862,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4931,13 +5874,22 @@ + } + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -4955,12 +5907,13 @@ + _ACEOF + + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi ++ ++ + { echo "$as_me:$LINENO: checking ospeed..." >&5 + echo "$as_me: checking ospeed..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -4976,28 +5929,36 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-cat >>confdefs.h <<\_ACEOF ++ cat >>confdefs.h <<\_ACEOF + #define NEED_OSPEED 1 + _ACEOF + + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + + { echo "$as_me:$LINENO: checking for /dev/ptc..." >&5 + echo "$as_me: checking for /dev/ptc..." >&6;} +@@ -5013,7 +5974,6 @@ + sysvr4ptys= + if test -c /dev/ptmx ; then + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -5029,17 +5989,23 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + cat >>confdefs.h <<\_ACEOF + #define HAVE_SVR4_PTYS 1 + _ACEOF +@@ -5049,86 +6015,99 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi + + + for ac_func in getpt + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +-echo "$as_me:$LINENO: checking for $ac_func" >&5 +-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_var+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } ++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ ++/* Define $ac_func to an innocuous variant, in case declares $ac_func. ++ For example, HP-UX 11i declares gettimeofday. */ ++#define $ac_func innocuous_$ac_func ++ + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ ++ + #ifdef __STDC__ + # include + #else + # include + #endif +-/* Override any gcc2 internal prototype to avoid an error. */ ++ ++#undef $ac_func ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #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 $ac_func (); + /* 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_$ac_func) || defined (__stub___$ac_func) ++#if defined __stub_$ac_func || defined __stub___$ac_func + choke me +-#else +-char (*f) () = $ac_func; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != $ac_func; ++return $ac_func (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-eval "$as_ac_var=no" ++ eval "$as_ac_var=no" + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_var'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +@@ -5143,138 +6122,155 @@ + for ac_func in openpty + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +-echo "$as_me:$LINENO: checking for $ac_func" >&5 +-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_var+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } ++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ ++/* Define $ac_func to an innocuous variant, in case declares $ac_func. ++ For example, HP-UX 11i declares gettimeofday. */ ++#define $ac_func innocuous_$ac_func ++ + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ ++ + #ifdef __STDC__ + # include + #else + # include + #endif +-/* Override any gcc2 internal prototype to avoid an error. */ ++ ++#undef $ac_func ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #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 $ac_func (); + /* 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_$ac_func) || defined (__stub___$ac_func) ++#if defined __stub_$ac_func || defined __stub___$ac_func + choke me +-#else +-char (*f) () = $ac_func; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != $ac_func; ++return $ac_func (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-eval "$as_ac_var=no" ++ eval "$as_ac_var=no" + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_var'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF + + else +- echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 +-echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 ++echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; } + if test "${ac_cv_lib_util_openpty+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS + LIBS="-lutil $LIBS" + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* 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. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #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 openpty (); + int + main () + { +-openpty (); ++return openpty (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + ac_cv_lib_util_openpty=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_util_openpty=no ++ ac_cv_lib_util_openpty=no + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 +-echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 ++echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; } + if test $ac_cv_lib_util_openpty = yes; then + cat >>confdefs.h <<\_ACEOF + #define HAVE_OPENPTY 1 +@@ -5295,7 +6291,6 @@ + pdir='/dev' + fi + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -5328,17 +6323,17 @@ + fi + + +-# Check whether --with-pty-mode or --without-pty-mode was given. ++# Check whether --with-pty-mode was given. + if test "${with_pty_mode+set}" = set; then +- withval="$with_pty_mode" +- ptymode="${withval}" +-fi; ++ withval=$with_pty_mode; ptymode="${withval}" ++fi + +-# Check whether --with-pty-group or --without-pty-group was given. ++ ++# Check whether --with-pty-group was given. + if test "${with_pty_group+set}" = set; then +- withval="$with_pty_group" +- ptygrp="${withval}" +-fi; ++ withval=$with_pty_group; ptygrp="${withval}" ++fi ++ + test -n "$ptymode" || ptymode=0620 + if test -n "$ptygrp" ; then + cat >>confdefs.h <<_ACEOF +@@ -5362,7 +6357,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -5399,13 +6393,22 @@ + + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -5438,8 +6441,8 @@ + XTERMPATH='' + # Extract the first word of "write", so it can be a program name with args. + set dummy write; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_WRITEPATH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -5454,31 +6457,32 @@ + 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_WRITEPATH="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + ;; + esac + fi + WRITEPATH=$ac_cv_path_WRITEPATH +- + if test -n "$WRITEPATH"; then +- echo "$as_me:$LINENO: result: $WRITEPATH" >&5 +-echo "${ECHO_T}$WRITEPATH" >&6 ++ { echo "$as_me:$LINENO: result: $WRITEPATH" >&5 ++echo "${ECHO_T}$WRITEPATH" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + # Extract the first word of "xterm", so it can be a program name with args. + set dummy xterm; ac_word=$2 +-echo "$as_me:$LINENO: checking for $ac_word" >&5 +-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for $ac_word" >&5 ++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } + if test "${ac_cv_path_XTERMPATH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else +@@ -5493,27 +6497,28 @@ + 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_XTERMPATH="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done + done ++IFS=$as_save_IFS + + ;; + esac + fi + XTERMPATH=$ac_cv_path_XTERMPATH +- + if test -n "$XTERMPATH"; then +- echo "$as_me:$LINENO: result: $XTERMPATH" >&5 +-echo "${ECHO_T}$XTERMPATH" >&6 ++ { echo "$as_me:$LINENO: result: $XTERMPATH" >&5 ++echo "${ECHO_T}$XTERMPATH" >&6; } + else +- echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi + ++ + found= + if test -n "$WRITEPATH$XTERMPATH"; then + findfollow= +@@ -5555,15 +6560,16 @@ + + + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi ++ ++ + rm -f conftest_grp + fi + + { echo "$as_me:$LINENO: checking getutent..." >&5 + echo "$as_me: checking getutent..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -5572,7 +6578,7 @@ + + #include /* to get time_t on SCO */ + #include +-#if defined(__SVR4) && !defined(DGUX) ++#if defined(SVR4) && !defined(DGUX) + #include + #define utmp utmpx + #else +@@ -5591,17 +6597,23 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + cat >>confdefs.h <<\_ACEOF + #define GETUTENT 1 + _ACEOF +@@ -5610,12 +6622,11 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-olibs="$LIBS" ++ olibs="$LIBS" + LIBS="$LIBS -lgen" + { echo "$as_me:$LINENO: checking getutent with -lgen..." >&5 + echo "$as_me: checking getutent with -lgen..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -5624,7 +6635,7 @@ + + #include + #include +-#if defined(__SVR4) && !defined(DGUX) ++#if defined(SVR4) && !defined(DGUX) + #include + #define utmp utmpx + #else +@@ -5643,17 +6654,23 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + cat >>confdefs.h <<\_ACEOF + #define GETUTENT 1 + _ACEOF +@@ -5662,16 +6679,19 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-LIBS="$olibs" ++ LIBS="$olibs" + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + { echo "$as_me:$LINENO: checking ut_host..." >&5 + echo "$as_me: checking ut_host..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -5680,7 +6700,7 @@ + + #include + #include +-#if defined(__SVR4) && !defined(DGUX) ++#if defined(SVR4) && !defined(DGUX) + #include + #define utmp utmpx + #else +@@ -5696,17 +6716,22 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-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); } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + cat >>confdefs.h <<\_ACEOF + #define UTHOST 1 + _ACEOF +@@ -5715,22 +6740,23 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "${ac_cv_header_utempter_h+set}" = set; then +- echo "$as_me:$LINENO: checking for utempter.h" >&5 +-echo $ECHO_N "checking for utempter.h... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for utempter.h" >&5 ++echo $ECHO_N "checking for utempter.h... $ECHO_C" >&6; } + if test "${ac_cv_header_utempter_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi +-echo "$as_me:$LINENO: result: $ac_cv_header_utempter_h" >&5 +-echo "${ECHO_T}$ac_cv_header_utempter_h" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_header_utempter_h" >&5 ++echo "${ECHO_T}$ac_cv_header_utempter_h" >&6; } + else + # Is the header compilable? +-echo "$as_me:$LINENO: checking utempter.h usability" >&5 +-echo $ECHO_N "checking utempter.h usability... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking utempter.h usability" >&5 ++echo $ECHO_N "checking utempter.h usability... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -5740,33 +6766,38 @@ + #include + _ACEOF + rm -f conftest.$ac_objext +-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); } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_header_compiler=no ++ ac_header_compiler=no + fi +-rm -f conftest.$ac_objext conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++rm -f core 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 utempter.h presence" >&5 +-echo $ECHO_N "checking utempter.h presence... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking utempter.h presence" >&5 ++echo $ECHO_N "checking utempter.h presence... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -5774,23 +6805,22 @@ + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + ac_header_preproc=yes + else + echo "$as_me: failed program was:" >&5 +@@ -5798,52 +6828,45 @@ + + 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 ++{ 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 in +- yes:no ) ++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in ++ yes:no: ) + { echo "$as_me:$LINENO: WARNING: utempter.h: accepted by the compiler, rejected by the preprocessor!" >&5 + echo "$as_me: WARNING: utempter.h: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { echo "$as_me:$LINENO: WARNING: utempter.h: proceeding with the preprocessor's result" >&5 +-echo "$as_me: WARNING: utempter.h: proceeding with the preprocessor's result" >&2;} +- ( +- cat <<\_ASBOX +-## ------------------------------------ ## +-## Report this to bug-autoconf@gnu.org. ## +-## ------------------------------------ ## +-_ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ { echo "$as_me:$LINENO: WARNING: utempter.h: proceeding with the compiler's result" >&5 ++echo "$as_me: WARNING: utempter.h: proceeding with the compiler's result" >&2;} ++ ac_header_preproc=yes + ;; +- no:yes ) ++ no:yes:* ) + { echo "$as_me:$LINENO: WARNING: utempter.h: present but cannot be compiled" >&5 + echo "$as_me: WARNING: utempter.h: present but cannot be compiled" >&2;} +- { echo "$as_me:$LINENO: WARNING: utempter.h: check for missing prerequisite headers?" >&5 +-echo "$as_me: WARNING: utempter.h: check for missing prerequisite headers?" >&2;} ++ { echo "$as_me:$LINENO: WARNING: utempter.h: check for missing prerequisite headers?" >&5 ++echo "$as_me: WARNING: utempter.h: check for missing prerequisite headers?" >&2;} ++ { echo "$as_me:$LINENO: WARNING: utempter.h: see the Autoconf documentation" >&5 ++echo "$as_me: WARNING: utempter.h: see the Autoconf documentation" >&2;} ++ { echo "$as_me:$LINENO: WARNING: utempter.h: section \"Present But Cannot Be Compiled\"" >&5 ++echo "$as_me: WARNING: utempter.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: utempter.h: proceeding with the preprocessor's result" >&5 + echo "$as_me: WARNING: utempter.h: proceeding with the preprocessor's result" >&2;} +- ( +- cat <<\_ASBOX +-## ------------------------------------ ## +-## Report this to bug-autoconf@gnu.org. ## +-## ------------------------------------ ## +-_ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ { echo "$as_me:$LINENO: WARNING: utempter.h: in the future, the compiler will take precedence" >&5 ++echo "$as_me: WARNING: utempter.h: in the future, the compiler will take precedence" >&2;} ++ + ;; + esac +-echo "$as_me:$LINENO: checking for utempter.h" >&5 +-echo $ECHO_N "checking for utempter.h... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for utempter.h" >&5 ++echo $ECHO_N "checking for utempter.h... $ECHO_C" >&6; } + if test "${ac_cv_header_utempter_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_header_utempter_h=$ac_header_preproc + fi +-echo "$as_me:$LINENO: result: $ac_cv_header_utempter_h" >&5 +-echo "${ECHO_T}$ac_cv_header_utempter_h" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_header_utempter_h" >&5 ++echo "${ECHO_T}$ac_cv_header_utempter_h" >&6; } + + fi + if test $ac_cv_header_utempter_h = yes; then +@@ -5869,7 +6892,6 @@ + { echo "$as_me:$LINENO: checking getloadavg..." >&5 + echo "$as_me: checking getloadavg..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -5885,17 +6907,23 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + cat >>confdefs.h <<\_ACEOF + #define LOADAV_GETLOADAVG 1 + _ACEOF +@@ -5904,13 +6932,12 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-if test -f /usr/lib/libkvm.a ; then ++ if test -f /usr/lib/libkvm.a ; then + olibs="$LIBS" + LIBS="$LIBS -lkvm" + { echo "$as_me:$LINENO: checking getloadavg with -lkvm..." >&5 + echo "$as_me: checking getloadavg with -lkvm..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -5926,17 +6953,23 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + cat >>confdefs.h <<\_ACEOF + #define LOADAV_GETLOADAVG 1 + _ACEOF +@@ -5945,17 +6978,20 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-LIBS="$olibs" ++ LIBS="$olibs" + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi + + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + + if test -z "$load" ; then + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -5993,19 +7029,18 @@ + _ACEOF + + if test "${ac_cv_header_nlist_h+set}" = set; then +- echo "$as_me:$LINENO: checking for nlist.h" >&5 +-echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for nlist.h" >&5 ++echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6; } + if test "${ac_cv_header_nlist_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi +-echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5 +-echo "${ECHO_T}$ac_cv_header_nlist_h" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5 ++echo "${ECHO_T}$ac_cv_header_nlist_h" >&6; } + else + # Is the header compilable? +-echo "$as_me:$LINENO: checking nlist.h usability" >&5 +-echo $ECHO_N "checking nlist.h usability... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking nlist.h usability" >&5 ++echo $ECHO_N "checking nlist.h usability... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6015,33 +7050,38 @@ + #include + _ACEOF + rm -f conftest.$ac_objext +-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); } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_header_compiler=no ++ ac_header_compiler=no + fi +-rm -f conftest.$ac_objext conftest.$ac_ext +-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-echo "${ECHO_T}$ac_header_compiler" >&6 ++ ++rm -f core 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 nlist.h presence" >&5 +-echo $ECHO_N "checking nlist.h presence... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking nlist.h presence" >&5 ++echo $ECHO_N "checking nlist.h presence... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6049,23 +7089,22 @@ + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + ac_header_preproc=yes + else + echo "$as_me: failed program was:" >&5 +@@ -6073,52 +7112,45 @@ + + 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 ++{ 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 in +- yes:no ) ++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in ++ yes:no: ) + { echo "$as_me:$LINENO: WARNING: nlist.h: accepted by the compiler, rejected by the preprocessor!" >&5 + echo "$as_me: WARNING: nlist.h: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { echo "$as_me:$LINENO: WARNING: nlist.h: proceeding with the preprocessor's result" >&5 +-echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;} +- ( +- cat <<\_ASBOX +-## ------------------------------------ ## +-## Report this to bug-autoconf@gnu.org. ## +-## ------------------------------------ ## +-_ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ { echo "$as_me:$LINENO: WARNING: nlist.h: proceeding with the compiler's result" >&5 ++echo "$as_me: WARNING: nlist.h: proceeding with the compiler's result" >&2;} ++ ac_header_preproc=yes + ;; +- no:yes ) ++ no:yes:* ) + { echo "$as_me:$LINENO: WARNING: nlist.h: present but cannot be compiled" >&5 + echo "$as_me: WARNING: nlist.h: present but cannot be compiled" >&2;} +- { echo "$as_me:$LINENO: WARNING: nlist.h: check for missing prerequisite headers?" >&5 +-echo "$as_me: WARNING: nlist.h: check for missing prerequisite headers?" >&2;} ++ { echo "$as_me:$LINENO: WARNING: nlist.h: check for missing prerequisite headers?" >&5 ++echo "$as_me: WARNING: nlist.h: check for missing prerequisite headers?" >&2;} ++ { echo "$as_me:$LINENO: WARNING: nlist.h: see the Autoconf documentation" >&5 ++echo "$as_me: WARNING: nlist.h: see the Autoconf documentation" >&2;} ++ { echo "$as_me:$LINENO: WARNING: nlist.h: section \"Present But Cannot Be Compiled\"" >&5 ++echo "$as_me: WARNING: nlist.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: nlist.h: proceeding with the preprocessor's result" >&5 + echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;} +- ( +- cat <<\_ASBOX +-## ------------------------------------ ## +-## Report this to bug-autoconf@gnu.org. ## +-## ------------------------------------ ## +-_ASBOX +- ) | +- sed "s/^/$as_me: WARNING: /" >&2 ++ { echo "$as_me:$LINENO: WARNING: nlist.h: in the future, the compiler will take precedence" >&5 ++echo "$as_me: WARNING: nlist.h: in the future, the compiler will take precedence" >&2;} ++ + ;; + esac +-echo "$as_me:$LINENO: checking for nlist.h" >&5 +-echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for nlist.h" >&5 ++echo $ECHO_N "checking for nlist.h... $ECHO_C" >&6; } + if test "${ac_cv_header_nlist_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_header_nlist_h=$ac_header_preproc + fi +-echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5 +-echo "${ECHO_T}$ac_cv_header_nlist_h" >&6 ++{ echo "$as_me:$LINENO: result: $ac_cv_header_nlist_h" >&5 ++echo "${ECHO_T}$ac_cv_header_nlist_h" >&6; } + + fi + if test $ac_cv_header_nlist_h = yes; then +@@ -6129,7 +7161,6 @@ + { echo "$as_me:$LINENO: checking n_un in struct nlist..." >&5 + echo "$as_me: checking n_un in struct nlist..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6145,17 +7176,22 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-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); } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + cat >>confdefs.h <<\_ACEOF + #define NLIST_NAME_UNION 1 + _ACEOF +@@ -6164,8 +7200,10 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + +@@ -6173,7 +7211,6 @@ + { echo "$as_me:$LINENO: checking for nlist declaration..." >&5 + echo "$as_me: checking for nlist declaration..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6209,7 +7246,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6246,13 +7282,22 @@ + + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -6263,8 +7308,10 @@ + sed 's/^/| /' conftest.$ac_ext >&5 + + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi ++ ++ + if test "$av" = _Loadavg; then + nlist64='#define nlist nlist64' + fi +@@ -6316,7 +7363,7 @@ + + _CUT_HERE_ + +-#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) && !defined(__hpux)) || defined(__sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || (defined(__SVR4) && !defined(__hpux)) || defined(sony_news) || (!defined(__osf__) && defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k)) ++#if !defined(LOADAV_GETLOADAVG) && ((defined(hp300) && !defined(__hpux)) || defined(sun) || (defined(ultrix) && defined(mips)) || defined(_SEQUENT_) || defined(sgi) || (defined(SVR4) && !defined(__hpux)) || defined(sony_news) || (!defined(__osf__) && defined(__alpha)) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) || defined(m88k)) + loadtype=long + # if defined(apollo) || defined(_IBMR2) || defined(_AUX_SOURCE) || defined(AUX) + loadscale=65536 +@@ -6329,7 +7376,7 @@ + loadtype=int + loadscale=1024 + # else +-# if defined(MIPS) || defined(__SVR4) || defined(m88k) ++# if defined(MIPS) || defined(SVR4) || defined(m88k) + loadscale=256 + # else /* not MIPS */ + loadscale=1000 /* our default value */ +@@ -6384,7 +7431,6 @@ + { echo "$as_me:$LINENO: checking return type of signal handlers..." >&5 + echo "$as_me: checking return type of signal handlers..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6405,17 +7451,22 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-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); } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + cat >>confdefs.h <<\_ACEOF + #define SIGVOID 1 + _ACEOF +@@ -6424,12 +7475,13 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { echo "$as_me:$LINENO: checking sigset..." >&5 + echo "$as_me: checking sigset..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6454,17 +7506,23 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + cat >>confdefs.h <<\_ACEOF + #define USESIGSET 1 + _ACEOF +@@ -6473,8 +7531,11 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + { echo "$as_me:$LINENO: checking signal implementation..." >&5 + echo "$as_me: checking signal implementation..." >&6;} + if test "$cross_compiling" = yes; then +@@ -6485,7 +7546,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6527,13 +7587,22 @@ + + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -6549,9 +7618,11 @@ + _ACEOF + + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + ++ ++ + fi + + +@@ -6563,7 +7634,6 @@ + { echo "$as_me:$LINENO: checking crypt..." >&5 + echo "$as_me: checking crypt..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6579,25 +7649,33 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-LIBS="$oldlibs" ++ LIBS="$oldlibs" + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec" + test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow" + oldlibs="$LIBS" +@@ -6605,7 +7683,6 @@ + { echo "$as_me:$LINENO: checking IRIX sun library..." >&5 + echo "$as_me: checking IRIX sun library..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6621,30 +7698,37 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-LIBS="$oldlibs" ++ LIBS="$oldlibs" + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + + { echo "$as_me:$LINENO: checking syslog..." >&5 + echo "$as_me: checking syslog..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6660,28 +7744,33 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + : + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-oldlibs="$LIBS" ++ oldlibs="$LIBS" + LIBS="$LIBS -lbsd" + { echo "$as_me:$LINENO: checking syslog in libbsd.a..." >&5 + echo "$as_me: checking syslog in libbsd.a..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6697,36 +7786,45 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + echo "- found." 1>&6 + + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-LIBS="$oldlibs" ++ LIBS="$oldlibs" + echo "- bad news: syslog missing." 1>&6 + cat >>confdefs.h <<\_ACEOF + #define NOSYSLOG 1 + _ACEOF + + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6747,7 +7845,6 @@ + { echo "$as_me:$LINENO: checking wait union..." >&5 + echo "$as_me: checking wait union..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6771,17 +7868,22 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-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); } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then + cat >>confdefs.h <<\_ACEOF + #define BSDWAIT 1 + _ACEOF +@@ -6790,14 +7892,15 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test -z "$butterfly"; then + { echo "$as_me:$LINENO: checking for termio or termios..." >&5 + echo "$as_me: checking for termio or termios..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6805,23 +7908,22 @@ + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + cat >>confdefs.h <<\_ACEOF + #define TERMIO 1 + _ACEOF +@@ -6832,7 +7934,6 @@ + + if test -n "$posix"; then + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6840,23 +7941,22 @@ + /* end confdefs.h. */ + #include + _ACEOF +-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 +- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ++if { (ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 +- else +- ac_cpp_err= +- fi +-else +- ac_cpp_err=yes +-fi +-if test -z "$ac_cpp_err"; then ++ (exit $ac_status); } >/dev/null && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then + cat >>confdefs.h <<\_ACEOF + #define TERMIO 1 + _ACEOF +@@ -6867,17 +7967,18 @@ + + + fi ++ + rm -f conftest.err conftest.$ac_ext + fi + + fi ++ + rm -f conftest.err conftest.$ac_ext + fi + + { echo "$as_me:$LINENO: checking getspnam..." >&5 + echo "$as_me: checking getspnam..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6893,17 +7994,23 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + cat >>confdefs.h <<\_ACEOF + #define SHADOWPW 1 + _ACEOF +@@ -6912,13 +8019,15 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + + { echo "$as_me:$LINENO: checking getttyent..." >&5 + echo "$as_me: checking getttyent..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6934,17 +8043,23 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + cat >>confdefs.h <<\_ACEOF + #define GETTTYENT 1 + _ACEOF +@@ -6953,13 +8068,15 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + + { echo "$as_me:$LINENO: checking fdwalk..." >&5 + echo "$as_me: checking fdwalk..." >&6;} + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -6975,17 +8092,23 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + cat >>confdefs.h <<\_ACEOF + #define HAVE_FDWALK 1 + _ACEOF +@@ -6994,8 +8117,11 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + + { echo "$as_me:$LINENO: checking whether memcpy/memmove/bcopy handles overlapping arguments..." >&5 + echo "$as_me: checking whether memcpy/memmove/bcopy handles overlapping arguments..." >&6;} +@@ -7007,7 +8133,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -7028,13 +8153,22 @@ + } + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -7048,9 +8182,11 @@ + sed 's/^/| /' conftest.$ac_ext >&5 + + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + ++ ++ + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + See \`config.log' for more details." >&5 +@@ -7059,7 +8195,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -7081,13 +8216,22 @@ + } + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -7101,10 +8245,12 @@ + sed 's/^/| /' conftest.$ac_ext >&5 + + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + + ++ ++ + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling + See \`config.log' for more details." >&5 +@@ -7113,7 +8259,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -7135,13 +8280,22 @@ + } + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -7155,20 +8309,22 @@ + sed 's/^/| /' conftest.$ac_ext >&5 + + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + +-echo "$as_me:$LINENO: checking long file names" >&5 +-echo $ECHO_N "checking long file names... $ECHO_C" >&6 ++ ++ ++{ echo "$as_me:$LINENO: checking long file names" >&5 ++echo $ECHO_N "checking long file names... $ECHO_C" >&6; } + (echo 1 > /tmp/conftest9012345) 2>/dev/null + (echo 2 > /tmp/conftest9012346) 2>/dev/null + val=`cat /tmp/conftest9012345 2>/dev/null` + if test -f /tmp/conftest9012345 && test "$val" = 1; then +-echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++{ echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } + else +-echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++{ echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + cat >>confdefs.h <<\_ACEOF + #define NAME_MAX 14 + _ACEOF +@@ -7176,38 +8332,43 @@ + fi + rm -f /tmp/conftest* + +-echo "$as_me:$LINENO: checking for vsprintf" >&5 +-echo $ECHO_N "checking for vsprintf... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for vsprintf" >&5 ++echo $ECHO_N "checking for vsprintf... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +- ++#include + int + main () + { +-vsprintf(0,0,0); ++va_list valist; vsprintf(0,0,valist); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; };cat >>confdefs.h <<\_ACEOF + #define USEVARARGS 1 + _ACEOF + +@@ -7215,10 +8376,12 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + + + +@@ -7228,13 +8391,12 @@ + ac_header_dirent=no + for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +-echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +-echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_Header+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 ++echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } ++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -7253,28 +8415,35 @@ + } + _ACEOF + rm -f conftest.$ac_objext +-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); } && +- { ac_try='test -s conftest.$ac_objext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; 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" ++ eval "$as_ac_Header=no" + fi +-rm -f conftest.$ac_objext conftest.$ac_ext ++ ++rm -f core 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 ++ac_res=`eval echo '${'$as_ac_Header'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +@@ -7286,226 +8455,179 @@ + done + # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. + if test $ac_header_dirent = dirent.h; then +- echo "$as_me:$LINENO: checking for library containing opendir" >&5 +-echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for library containing opendir" >&5 ++echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } + if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_func_search_save_LIBS=$LIBS +-ac_cv_search_opendir=no + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* 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. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #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 opendir (); + int + main () + { +-opendir (); ++return opendir (); + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++for ac_lib in '' dir; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ rm -f conftest.$ac_objext conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then +- ac_cv_search_opendir="none required" ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ ac_cv_search_opendir=$ac_res + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +-if test "$ac_cv_search_opendir" = no; then +- for ac_lib in dir; do +- LIBS="-l$ac_lib $ac_func_search_save_LIBS" +- cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" +-/* 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 opendir (); +-int +-main () +-{ +-opendir (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext 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='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_search_opendir="-l$ac_lib" +-break +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++fi + ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext ++ if test "${ac_cv_search_opendir+set}" = set; then ++ break + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +- done ++done ++if test "${ac_cv_search_opendir+set}" = set; then ++ : ++else ++ ac_cv_search_opendir=no + fi ++rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +-echo "${ECHO_T}$ac_cv_search_opendir" >&6 +-if test "$ac_cv_search_opendir" != no; then +- test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" ++{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 ++echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ++ac_res=$ac_cv_search_opendir ++if test "$ac_res" != no; then ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + fi + + else +- echo "$as_me:$LINENO: checking for library containing opendir" >&5 +-echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for library containing opendir" >&5 ++echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } + if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_func_search_save_LIBS=$LIBS +-ac_cv_search_opendir=no + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* 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. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #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 opendir (); + int + main () + { +-opendir (); ++return opendir (); + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++for ac_lib in '' x; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ rm -f conftest.$ac_objext conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then +- ac_cv_search_opendir="none required" ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ ac_cv_search_opendir=$ac_res + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +-if test "$ac_cv_search_opendir" = no; then +- for ac_lib in x; do +- LIBS="-l$ac_lib $ac_func_search_save_LIBS" +- cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" +-/* 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 opendir (); +-int +-main () +-{ +-opendir (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext 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='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_search_opendir="-l$ac_lib" +-break +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++fi + ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext ++ if test "${ac_cv_search_opendir+set}" = set; then ++ break + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +- done ++done ++if test "${ac_cv_search_opendir+set}" = set; then ++ : ++else ++ ac_cv_search_opendir=no + fi ++rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +-echo "${ECHO_T}$ac_cv_search_opendir" >&6 +-if test "$ac_cv_search_opendir" != no; then +- test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" ++{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 ++echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ++ac_res=$ac_cv_search_opendir ++if test "$ac_res" != no; then ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + fi + + fi + + +-echo "$as_me:$LINENO: checking for setenv" >&5 +-echo $ECHO_N "checking for setenv... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for setenv" >&5 ++echo $ECHO_N "checking for setenv... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -7521,19 +8643,25 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; };cat >>confdefs.h <<\_ACEOF + #define USESETENV 1 + _ACEOF + +@@ -7541,12 +8669,11 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 +-echo "$as_me:$LINENO: checking for putenv" >&5 +-echo $ECHO_N "checking for putenv... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } ++{ echo "$as_me:$LINENO: checking for putenv" >&5 ++echo $ECHO_N "checking for putenv... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -7562,37 +8689,46 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6 ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; } + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6;cat >>confdefs.h <<\_ACEOF ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; };cat >>confdefs.h <<\_ACEOF + #define NEEDPUTENV 1 + _ACEOF + + + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +-echo "$as_me:$LINENO: checking for nl_langinfo(CODESET)" >&5 +-echo $ECHO_N "checking for nl_langinfo(CODESET)... $ECHO_C" >&6 ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++{ echo "$as_me:$LINENO: checking for nl_langinfo(CODESET)" >&5 ++echo $ECHO_N "checking for nl_langinfo(CODESET)... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -7610,19 +8746,25 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; };cat >>confdefs.h <<\_ACEOF + #define HAVE_NL_LANGINFO 1 + _ACEOF + +@@ -7630,114 +8772,93 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6 ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; } + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + +-echo "$as_me:$LINENO: checking for library containing gethostname" >&5 +-echo $ECHO_N "checking for library containing gethostname... $ECHO_C" >&6 ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext ++ ++{ echo "$as_me:$LINENO: checking for library containing gethostname" >&5 ++echo $ECHO_N "checking for library containing gethostname... $ECHO_C" >&6; } + if test "${ac_cv_search_gethostname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_func_search_save_LIBS=$LIBS +-ac_cv_search_gethostname=no + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* 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. */ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #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 gethostname (); + int + main () + { +-gethostname (); ++return gethostname (); + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++for ac_lib in '' nsl; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ rm -f conftest.$ac_objext conftest$ac_exeext ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then +- ac_cv_search_gethostname="none required" ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ ac_cv_search_gethostname=$ac_res + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + ++ + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +-if test "$ac_cv_search_gethostname" = no; then +- for ac_lib in nsl; do +- LIBS="-l$ac_lib $ac_func_search_save_LIBS" +- cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" +-/* 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 gethostname (); +-int +-main () +-{ +-gethostname (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext 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='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_search_gethostname="-l$ac_lib" +-break +-else +- echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext ++ if test "${ac_cv_search_gethostname+set}" = set; then ++ break + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +- done ++done ++if test "${ac_cv_search_gethostname+set}" = set; then ++ : ++else ++ ac_cv_search_gethostname=no + fi ++rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_search_gethostname" >&5 +-echo "${ECHO_T}$ac_cv_search_gethostname" >&6 +-if test "$ac_cv_search_gethostname" != no; then +- test "$ac_cv_search_gethostname" = "none required" || LIBS="$ac_cv_search_gethostname $LIBS" ++{ echo "$as_me:$LINENO: result: $ac_cv_search_gethostname" >&5 ++echo "${ECHO_T}$ac_cv_search_gethostname" >&6; } ++ac_res=$ac_cv_search_gethostname ++if test "$ac_res" != no; then ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + fi + +@@ -7756,78 +8877,88 @@ + for ac_func in rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd setlocale strftime + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +-echo "$as_me:$LINENO: checking for $ac_func" >&5 +-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +-if eval "test \"\${$as_ac_var+set}\" = set"; then ++{ echo "$as_me:$LINENO: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } ++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ ++/* Define $ac_func to an innocuous variant, in case declares $ac_func. ++ For example, HP-UX 11i declares gettimeofday. */ ++#define $ac_func innocuous_$ac_func ++ + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ ++ + #ifdef __STDC__ + # include + #else + # include + #endif +-/* Override any gcc2 internal prototype to avoid an error. */ ++ ++#undef $ac_func ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ + #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 $ac_func (); + /* 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_$ac_func) || defined (__stub___$ac_func) ++#if defined __stub_$ac_func || defined __stub___$ac_func + choke me +-#else +-char (*f) () = $ac_func; +-#endif +-#ifdef __cplusplus +-} + #endif + + int + main () + { +-return f != $ac_func; ++return $ac_func (); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-eval "$as_ac_var=no" ++ eval "$as_ac_var=no" + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++ac_res=`eval echo '${'$as_ac_var'}'` ++ { echo "$as_me:$LINENO: result: $ac_res" >&5 ++echo "${ECHO_T}$ac_res" >&6; } + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +@@ -7837,18 +8968,17 @@ + done + + +-# Check whether --enable-pam or --disable-pam was given. ++# Check whether --enable-pam was given. + if test "${enable_pam+set}" = set; then +- enableval="$enable_pam" ++ enableval=$enable_pam; ++fi + +-fi; + if test "$enable_pam" = "yes"; then +- echo "$as_me:$LINENO: checking for PAM support" >&5 +-echo $ECHO_N "checking for PAM support... $ECHO_C" >&6 ++ { echo "$as_me:$LINENO: checking for PAM support" >&5 ++echo $ECHO_N "checking for PAM support... $ECHO_C" >&6; } + oldlibs="$LIBS" + LIBS="$LIBS -lpam" + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -7868,19 +8998,25 @@ + } + _ACEOF + rm -f conftest.$ac_objext 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='test -s conftest$ac_exeext' +- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +- (eval $ac_try) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); }; }; then +- echo "$as_me:$LINENO: result: yes" >&5 +-echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF ++ (exit $ac_status); } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && ++ $as_test_x conftest$ac_exeext; then ++ { echo "$as_me:$LINENO: result: yes" >&5 ++echo "${ECHO_T}yes" >&6; };cat >>confdefs.h <<\_ACEOF + #define USE_PAM 1 + _ACEOF + +@@ -7888,50 +9024,52 @@ + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-echo "$as_me:$LINENO: result: no" >&5 +-echo "${ECHO_T}no" >&6;LIBS="$oldlibs" ++ { echo "$as_me:$LINENO: result: no" >&5 ++echo "${ECHO_T}no" >&6; };LIBS="$oldlibs" + fi +-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ++ ++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ ++ conftest$ac_exeext conftest.$ac_ext + fi + +-# Check whether --enable-use_locale or --disable-use_locale was given. ++# Check whether --enable-use_locale was given. + if test "${enable_use_locale+set}" = set; then +- enableval="$enable_use_locale" ++ enableval=$enable_use_locale; ++fi + +-fi; + if test "$enable_use_locale" = "yes"; then + cat >>confdefs.h <<\_ACEOF + #define USE_LOCALE 1 + _ACEOF + + fi +-# Check whether --enable-telnet or --disable-telnet was given. ++# Check whether --enable-telnet was given. + if test "${enable_telnet+set}" = set; then +- enableval="$enable_telnet" ++ enableval=$enable_telnet; ++fi + +-fi; + if test "$enable_telnet" = "yes"; then + cat >>confdefs.h <<\_ACEOF + #define BUILTIN_TELNET 1 + _ACEOF + + fi +-# Check whether --enable-colors256 or --disable-colors256 was given. ++# Check whether --enable-colors256 was given. + if test "${enable_colors256+set}" = set; then +- enableval="$enable_colors256" ++ enableval=$enable_colors256; ++fi + +-fi; + if test "$enable_colors256" = "yes"; then + cat >>confdefs.h <<\_ACEOF + #define COLORS256 1 + _ACEOF + + fi +-# Check whether --enable-rxvt_osc or --disable-rxvt_osc was given. ++# Check whether --enable-rxvt_osc was given. + if test "${enable_rxvt_osc+set}" = set; then +- enableval="$enable_rxvt_osc" ++ enableval=$enable_rxvt_osc; ++fi + +-fi; + if test "$enable_rxvt_osc" = "yes"; then + cat >>confdefs.h <<\_ACEOF + #define RXVT_OSC 1 +@@ -7954,7 +9092,6 @@ + { (exit 1); exit 1; }; } + else + cat >conftest.$ac_ext <<_ACEOF +-#line $LINENO "configure" + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext +@@ -7963,13 +9100,22 @@ + main(){exit(0);} + _ACEOF + rm -f conftest$ac_exeext +-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 ++if { (ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 ++ { (case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ++ (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +@@ -7984,44 +9130,48 @@ + echo "$as_me: error: Can't run the compiler - internal error. Sorry." >&2;} + { (exit 1); exit 1; }; } + fi +-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + ++ ++ + ETCSCREENRC="\"/usr/local/etc/screenrc\"" + if test -n "$prefix"; then + ETCSCREENRC="\"$prefix/etc/screenrc\"" + fi +-echo "$as_me:$LINENO: checking for the global screenrc file" >&5 +-echo $ECHO_N "checking for the global screenrc file... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for the global screenrc file" >&5 ++echo $ECHO_N "checking for the global screenrc file... $ECHO_C" >&6; } + +-# Check whether --with-sys-screenrc or --without-sys-screenrc was given. ++# Check whether --with-sys-screenrc was given. + if test "${with_sys_screenrc+set}" = set; then +- withval="$with_sys_screenrc" +- ETCSCREENRC="\"${withval}\"" +-fi; ++ withval=$with_sys_screenrc; ETCSCREENRC="\"${withval}\"" ++fi ++ + cat >>confdefs.h <<_ACEOF + #define ETCSCREENRC $ETCSCREENRC + _ACEOF + +-echo "$as_me:$LINENO: result: $ETCSCREENRC" >&5 +-echo "${ECHO_T}$ETCSCREENRC" >&6 ++{ echo "$as_me:$LINENO: result: $ETCSCREENRC" >&5 ++echo "${ECHO_T}$ETCSCREENRC" >&6; } + + SCREENENCODINGS="\"/usr/local/lib/screen/utf8encodings\"" + if test -n "$datadir"; then + eval SCREENENCODINGS="$datadir/screen/utf8encodings" +-SCREENENCODINGS="\"$SCREENENCODINGS\"" ++eval SCREENENCODINGS="\\\"$SCREENENCODINGS\\\"" + fi +-echo "$as_me:$LINENO: checking for the utf8-encodings location" >&5 +-echo $ECHO_N "checking for the utf8-encodings location... $ECHO_C" >&6 ++{ echo "$as_me:$LINENO: checking for the utf8-encodings location" >&5 ++echo $ECHO_N "checking for the utf8-encodings location... $ECHO_C" >&6; } + cat >>confdefs.h <<_ACEOF + #define SCREENENCODINGS $SCREENENCODINGS + _ACEOF + +-echo "$as_me:$LINENO: result: $SCREENENCODINGS" >&5 +-echo "${ECHO_T}$SCREENENCODINGS" >&6 ++{ echo "$as_me:$LINENO: result: $SCREENENCODINGS" >&5 ++echo "${ECHO_T}$SCREENENCODINGS" >&6; } ++ ++ac_config_files="$ac_config_files Makefile doc/Makefile" ++ ++ac_config_commands="$ac_config_commands default" + +- ac_config_files="$ac_config_files Makefile doc/Makefile" +- ac_config_commands="$ac_config_commands default" + cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure + # tests run on this system so they can be shared between configure +@@ -8040,39 +9190,58 @@ + + # The following way of writing the cache mishandles newlines in values, + # but we know of no workaround that is simple, portable, and efficient. +-# So, don't put newlines in cache variables' values. ++# So, we kill variables containing newlines. + # Ultrix sh set writes to stderr and can't be redirected directly, + # and sets the high bit in the cache file unless we assign to the vars. +-{ ++( ++ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do ++ eval ac_val=\$$ac_var ++ case $ac_val in #( ++ *${as_nl}*) ++ case $ac_var in #( ++ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 ++echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; ++ esac ++ case $ac_var in #( ++ _ | IFS | as_nl) ;; #( ++ *) $as_unset $ac_var ;; ++ esac ;; ++ esac ++ done ++ + (set) 2>&1 | +- case `(ac_space=' '; set | grep ac_space) 2>&1` in +- *ac_space=\ *) ++ case $as_nl`(ac_space=' '; set) 2>&1` in #( ++ *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ +- "s/'/'\\\\''/g; +- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" +- ;; ++ "s/'/'\\\\''/g; ++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ++ ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. +- sed -n \ +- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; +- esac; +-} | ++ esac | ++ sort ++) | + sed ' ++ /^ac_cv_env_/b end + t clear +- : clear ++ :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end +- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ +- : end' >>confcache +-if diff $cache_file confcache >/dev/null 2>&1; then :; else +- if test -w $cache_file; then +- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" ++ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ ++ :end' >>confcache ++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else ++ if test -w "$cache_file"; then ++ test "x$cache_file" != "x/dev/null" && ++ { echo "$as_me:$LINENO: updating cache $cache_file" >&5 ++echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else +- echo "not updating unwritable cache $cache_file" ++ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 ++echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi + fi + rm -f confcache +@@ -8081,32 +9250,18 @@ + # Let make expand exec_prefix. + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +-# VPATH may cause trouble with some makes, so we remove $(srcdir), +-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +-# trailing colons and then remove the whole line if VPATH becomes empty +-# (actually we leave an empty line to preserve line numbers). +-if test "x$srcdir" = x.; then +- ac_vpsub='/^[ ]*VPATH[ ]*=/{ +-s/:*\$(srcdir):*/:/; +-s/:*\${srcdir}:*/:/; +-s/:*@srcdir@:*/:/; +-s/^\([^=]*=[ ]*\):*/\1/; +-s/:*$//; +-s/^[^=]*=[ ]*$//; +-}' +-fi +- + DEFS=-DHAVE_CONFIG_H + + ac_libobjs= + ac_ltlibobjs= + for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. +- ac_i=`echo "$ac_i" | +- sed 's/\$U\././;s/\.o$//;s/\.obj$//'` +- # 2. Add them. +- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" +- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' ++ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ++ ac_i=`echo "$ac_i" | sed "$ac_script"` ++ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR ++ # will be set to the directory where LIBOBJS objects are built. ++ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ++ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + done + LIBOBJS=$ac_libobjs + +@@ -8137,27 +9292,91 @@ + ## M4sh Initialization. ## + ## --------------------- ## + +-# Be Bourne compatible ++# Be more Bourne compatible ++DUALCASE=1; export DUALCASE # for MKS sh + 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 ++ setopt NO_GLOB_SUBST ++else ++ case `(set -o) 2>/dev/null` in ++ *posix*) set -o posix ;; ++esac ++ ++fi ++ ++ ++ ++ ++# PATH needs CR ++# 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 + + # Support unset when possible. +-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then ++if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset + else + as_unset=false + fi + + ++# IFS ++# We need space, tab and new line, in precisely that order. Quoting is ++# there to prevent editors from complaining about space-tab. ++# (If _AS_PATH_WALK were called with IFS unset, it would disable word ++# splitting by setting IFS to empty value.) ++as_nl=' ++' ++IFS=" "" $as_nl" ++ ++# Find who we are. Look in the path if we contain no directory separator. ++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 ++IFS=$as_save_IFS ++ ++ ;; ++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_myself: error: cannot find myself; rerun with an absolute file name" >&2 ++ { (exit 1); exit 1; } ++fi ++ + # Work around bugs in pre-3.0 UWIN ksh. +-$as_unset ENV MAIL MAILPATH ++for as_var in ENV MAIL MAILPATH ++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++done + PS1='$ ' + PS2='> ' + PS4='+ ' +@@ -8168,21 +9387,22 @@ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME + do +- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then ++ 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 ++ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi + done + + # Required to use basename. +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + +-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then ++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename + else + as_basename=false +@@ -8190,200 +9410,166 @@ + + + # Name of the executable. +-as_me=`$as_basename "$0" || ++as_me=`$as_basename -- "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)$' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$0" : 'X\(/\)' \| . 2>/dev/null || + echo X/"$0" | +- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } +- /^X\/\(\/\/\)$/{ s//\1/; q; } +- /^X\/\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- ++ 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 ++# CDPATH. ++$as_unset CDPATH + +-# 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:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +-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 ++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # 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. ++ # line-number line after each line using $LINENO; the second 'sed' ++ # does the real work. The second script uses 'N' to pair each ++ # line-number line with the line containing $LINENO, 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 | ++ # scripts with optimization help from Paolo Bonzini. Blame Lee ++ # E. McMahon (1931-1989) for sed's syntax. :-) ++ sed -n ' ++ p ++ /[$]LINENO/= ++ ' <$as_myself | + sed ' ++ s/[$]LINENO.*/&-/ ++ t lineno ++ b ++ :lineno + N +- s,$,-, +- : loop +- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, ++ :loop ++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop +- s,-$,, +- s,^['$as_cr_digits']*\n,, ++ s/-\n.*// + ' >$as_me.lineno && +- chmod +x $as_me.lineno || +- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} ++ 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 ++ # original and so on. Autoconf is especially sensitive 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= ;; ++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then ++ as_dirname=dirname ++else ++ as_dirname=false ++fi ++ ++ECHO_C= ECHO_N= ECHO_T= ++case `echo -n x` in ++-n*) ++ case `echo 'x\c'` in ++ *c*) ECHO_T=' ';; # ECHO_T is single tab character. ++ *) ECHO_C='\c';; ++ esac;; ++*) ++ ECHO_N='-n';; + esac + +-if expr a : '\(a\)' >/dev/null 2>&1; then ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr + else + as_expr=false + fi + + rm -f conf$$ conf$$.exe conf$$.file ++if test -d conf$$.dir; then ++ rm -f conf$$.dir/conf$$.file ++else ++ rm -f conf$$.dir ++ mkdir conf$$.dir ++fi + 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='ln -s' ++ # ... but there are two gotchas: ++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. ++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. ++ # In both cases, we have to default to `cp -p'. ++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + 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 ++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file ++rmdir conf$$.dir 2>/dev/null + + 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" ++if test -x / >/dev/null 2>&1; then ++ as_test_x='test -x' ++else ++ if ls -dL / >/dev/null 2>&1; then ++ as_ls_L_option=L ++ else ++ as_ls_L_option= ++ fi ++ as_test_x=' ++ eval sh -c '\'' ++ if test -d "$1"; then ++ test -d "$1/."; ++ else ++ case $1 in ++ -*)set "./$1";; ++ esac; ++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ++ ???[sx]*):;;*)false;;esac;fi ++ '\'' sh ++ ' ++fi ++as_executable_p=$as_test_x + + # Sed expression to map a string onto a valid CPP name. +-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" ++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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +- ++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 + + exec 6>&1 + +-# Open the log real soon, to keep \$[0] and so on meaningful, and to ++# Save the log message, to keep $[0] and so on meaningful, and to + # report actual input values of CONFIG_FILES etc. instead of their +-# values after options handling. Logging --version etc. is OK. +-exec 5>>config.log +-{ +- echo +- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +-## Running $as_me. ## +-_ASBOX +-} >&5 +-cat >&5 <<_CSEOF +- ++# values after options handling. ++ac_log=" + This file was extended by $as_me, which was +-generated by GNU Autoconf 2.57. Invocation command line was ++generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS +@@ -8391,30 +9577,20 @@ + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +-_CSEOF +-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +-echo >&5 ++on `(hostname || uname -n) 2>/dev/null | sed 1q` ++" ++ + _ACEOF + ++cat >>$CONFIG_STATUS <<_ACEOF + # Files that config.status was made for. +-if test -n "$ac_config_files"; then +- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +-fi +- +-if test -n "$ac_config_headers"; then +- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +-fi +- +-if test -n "$ac_config_links"; then +- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +-fi ++config_files="$ac_config_files" ++config_headers="$ac_config_headers" ++config_commands="$ac_config_commands" + +-if test -n "$ac_config_commands"; then +- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +-fi ++_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF +- + ac_cs_usage="\ + \`$as_me' instantiates files from templates according to the + current configuration. +@@ -8422,14 +9598,14 @@ + Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit +- -V, --version print version number, then exit ++ -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] +- instantiate the configuration file FILE ++ instantiate the configuration file FILE + --header=FILE[:TEMPLATE] +- instantiate the configuration header FILE ++ instantiate the configuration header FILE + + Configuration files: + $config_files +@@ -8441,20 +9617,21 @@ + $config_commands + + Report bugs to ." +-_ACEOF + ++_ACEOF + cat >>$CONFIG_STATUS <<_ACEOF + ac_cs_version="\\ + config.status +-configured by $0, generated by GNU Autoconf 2.57, +- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" ++configured by $0, generated by GNU Autoconf 2.61, ++ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +-Free Software Foundation, Inc. ++Copyright (C) 2006 Free Software Foundation, Inc. + This config.status script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it." +-srcdir=$srcdir +-INSTALL="$INSTALL" ++ ++ac_pwd='$ac_pwd' ++srcdir='$srcdir' ++INSTALL='$INSTALL' + _ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF +@@ -8465,39 +9642,24 @@ + do + case $1 in + --*=*) +- ac_option=`expr "x$1" : 'x\([^=]*\)='` +- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ++ ac_option=`expr "X$1" : 'X\([^=]*\)='` ++ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; +- -*) ++ *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; +- *) # This is not an option, so the user has probably given explicit +- # arguments. +- ac_option=$1 +- ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +-_ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; +- --version | --vers* | -V ) +- echo "$ac_cs_version"; exit 0 ;; +- --he | --h) +- # Conflict between --help and --header +- { { echo "$as_me:$LINENO: error: ambiguous option: $1 +-Try \`$0 --help' for more information." >&5 +-echo "$as_me: error: ambiguous option: $1 +-Try \`$0 --help' for more information." >&2;} +- { (exit 1); exit 1; }; };; +- --help | --hel | -h ) +- echo "$ac_cs_usage"; exit 0 ;; +- --debug | --d* | -d ) ++ --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) ++ echo "$ac_cs_version"; exit ;; ++ --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift +@@ -8507,18 +9669,24 @@ + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; ++ --he | --h) ++ # Conflict between --help and --header ++ { echo "$as_me: error: ambiguous option: $1 ++Try \`$0 --help' for more information." >&2 ++ { (exit 1); exit 1; }; };; ++ --help | --hel | -h ) ++ echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. +- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +-Try \`$0 --help' for more information." >&5 +-echo "$as_me: error: unrecognized option: $1 +-Try \`$0 --help' for more information." >&2;} ++ -*) { echo "$as_me: error: unrecognized option: $1 ++Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + +- *) ac_config_targets="$ac_config_targets $1" ;; ++ *) ac_config_targets="$ac_config_targets $1" ++ ac_need_defaults=false ;; + + esac + shift +@@ -8534,31 +9702,45 @@ + _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF + if \$ac_cs_recheck; then +- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 +- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ++ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 ++ CONFIG_SHELL=$SHELL ++ export CONFIG_SHELL ++ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + fi + + _ACEOF ++cat >>$CONFIG_STATUS <<\_ACEOF ++exec 5>>config.log ++{ ++ echo ++ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ++## Running $as_me. ## ++_ASBOX ++ echo "$ac_log" ++} >&5 + +- +- +- ++_ACEOF ++cat >>$CONFIG_STATUS <<_ACEOF ++_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF ++ ++# Handling of arguments. + for ac_config_target in $ac_config_targets + do +- case "$ac_config_target" in +- # Handling of arguments. +- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; +- "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; +- "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; +- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ++ case $ac_config_target in ++ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ++ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; ++ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; ++ "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; ++ + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 + echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac + done + ++ + # If the user did not use the arguments to specify the items to instantiate, + # then the envvar interface is used. Set only those that are not. + # We use the long form for the default assignment because of an extremely +@@ -8570,587 +9752,521 @@ + fi + + # Have a temporary directory for convenience. Make it in the build tree +-# simply because there is no reason to put it here, and in addition, ++# simply because there is no reason against having it here, and in addition, + # creating and moving files from /tmp can sometimes cause problems. +-# Create a temporary directory, and hook for its removal unless debugging. ++# Hook for its removal unless debugging. ++# Note that there is a small window in which the directory will not be cleaned: ++# after its creation but before its name has been assigned to `$tmp'. + $debug || + { +- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 ++ tmp= ++ trap 'exit_status=$? ++ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ++' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 + } +- + # Create a (secure) tmp directory for tmp files. + + { +- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && ++ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" + } || + { +- tmp=./confstat$$-$RANDOM +- (umask 077 && mkdir $tmp) ++ tmp=./conf$$-$RANDOM ++ (umask 077 && mkdir "$tmp") + } || + { + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } + } + +-_ACEOF +- +-cat >>$CONFIG_STATUS <<_ACEOF +- + # +-# CONFIG_FILES section. ++# Set up the sed scripts for CONFIG_FILES section. + # + + # No need to generate the scripts if there are no CONFIG_FILES. + # This happens for instance when ./config.status config.h +-if test -n "\$CONFIG_FILES"; then +- # Protect against being on the right side of a sed subst in config.status. +- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; +- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +-s,@SHELL@,$SHELL,;t t +-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +-s,@exec_prefix@,$exec_prefix,;t t +-s,@prefix@,$prefix,;t t +-s,@program_transform_name@,$program_transform_name,;t t +-s,@bindir@,$bindir,;t t +-s,@sbindir@,$sbindir,;t t +-s,@libexecdir@,$libexecdir,;t t +-s,@datadir@,$datadir,;t t +-s,@sysconfdir@,$sysconfdir,;t t +-s,@sharedstatedir@,$sharedstatedir,;t t +-s,@localstatedir@,$localstatedir,;t t +-s,@libdir@,$libdir,;t t +-s,@includedir@,$includedir,;t t +-s,@oldincludedir@,$oldincludedir,;t t +-s,@infodir@,$infodir,;t t +-s,@mandir@,$mandir,;t t +-s,@build_alias@,$build_alias,;t t +-s,@host_alias@,$host_alias,;t t +-s,@target_alias@,$target_alias,;t t +-s,@DEFS@,$DEFS,;t t +-s,@ECHO_C@,$ECHO_C,;t t +-s,@ECHO_N@,$ECHO_N,;t t +-s,@ECHO_T@,$ECHO_T,;t t +-s,@LIBS@,$LIBS,;t t +-s,@VERSION@,$VERSION,;t t +-s,@ac_prefix_program@,$ac_prefix_program,;t t +-s,@CC@,$CC,;t t +-s,@CFLAGS@,$CFLAGS,;t t +-s,@LDFLAGS@,$LDFLAGS,;t t +-s,@CPPFLAGS@,$CPPFLAGS,;t t +-s,@ac_ct_CC@,$ac_ct_CC,;t t +-s,@EXEEXT@,$EXEEXT,;t t +-s,@OBJEXT@,$OBJEXT,;t t +-s,@CPP@,$CPP,;t t +-s,@EGREP@,$EGREP,;t t +-s,@AWK@,$AWK,;t t +-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +-s,@INSTALL_DATA@,$INSTALL_DATA,;t t +-s,@WRITEPATH@,$WRITEPATH,;t t +-s,@XTERMPATH@,$XTERMPATH,;t t +-s,@LIBOBJS@,$LIBOBJS,;t t +-s,@LTLIBOBJS@,$LTLIBOBJS,;t t +-CEOF +- +-_ACEOF +- +- cat >>$CONFIG_STATUS <<\_ACEOF +- # Split the substitutions into bite-sized pieces for seds with +- # small command number limits, like on Digital OSF/1 and HP-UX. +- ac_max_sed_lines=48 +- ac_sed_frag=1 # Number of current file. +- ac_beg=1 # First line for current file. +- ac_end=$ac_max_sed_lines # Line after last line for current file. +- ac_more_lines=: +- ac_sed_cmds= +- while $ac_more_lines; do +- if test $ac_beg -gt 1; then +- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag +- else +- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag +- fi +- if test ! -s $tmp/subs.frag; then +- ac_more_lines=false +- else +- # The purpose of the label and of the branching condition is to +- # speed up the sed processing (if there are no `@' at all, there +- # is no need to browse any of the substitutions). +- # These are the two extra sed commands mentioned above. +- (echo ':t +- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed +- if test -z "$ac_sed_cmds"; then +- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" +- else +- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" +- fi +- ac_sed_frag=`expr $ac_sed_frag + 1` +- ac_beg=$ac_end +- ac_end=`expr $ac_end + $ac_max_sed_lines` +- fi +- done +- if test -z "$ac_sed_cmds"; then +- ac_sed_cmds=cat ++if test -n "$CONFIG_FILES"; then ++ ++_ACEOF ++ ++ ++ ++ac_delim='%!_!# ' ++for ac_last_try in false false false false false :; do ++ cat >conf$$subs.sed <<_ACEOF ++SHELL!$SHELL$ac_delim ++PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim ++PACKAGE_NAME!$PACKAGE_NAME$ac_delim ++PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim ++PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim ++PACKAGE_STRING!$PACKAGE_STRING$ac_delim ++PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim ++exec_prefix!$exec_prefix$ac_delim ++prefix!$prefix$ac_delim ++program_transform_name!$program_transform_name$ac_delim ++bindir!$bindir$ac_delim ++sbindir!$sbindir$ac_delim ++libexecdir!$libexecdir$ac_delim ++datarootdir!$datarootdir$ac_delim ++datadir!$datadir$ac_delim ++sysconfdir!$sysconfdir$ac_delim ++sharedstatedir!$sharedstatedir$ac_delim ++localstatedir!$localstatedir$ac_delim ++includedir!$includedir$ac_delim ++oldincludedir!$oldincludedir$ac_delim ++docdir!$docdir$ac_delim ++infodir!$infodir$ac_delim ++htmldir!$htmldir$ac_delim ++dvidir!$dvidir$ac_delim ++pdfdir!$pdfdir$ac_delim ++psdir!$psdir$ac_delim ++libdir!$libdir$ac_delim ++localedir!$localedir$ac_delim ++mandir!$mandir$ac_delim ++DEFS!$DEFS$ac_delim ++ECHO_C!$ECHO_C$ac_delim ++ECHO_N!$ECHO_N$ac_delim ++ECHO_T!$ECHO_T$ac_delim ++LIBS!$LIBS$ac_delim ++build_alias!$build_alias$ac_delim ++host_alias!$host_alias$ac_delim ++target_alias!$target_alias$ac_delim ++VERSION!$VERSION$ac_delim ++ac_prefix_program!$ac_prefix_program$ac_delim ++CC!$CC$ac_delim ++CFLAGS!$CFLAGS$ac_delim ++LDFLAGS!$LDFLAGS$ac_delim ++CPPFLAGS!$CPPFLAGS$ac_delim ++ac_ct_CC!$ac_ct_CC$ac_delim ++EXEEXT!$EXEEXT$ac_delim ++OBJEXT!$OBJEXT$ac_delim ++CPP!$CPP$ac_delim ++GREP!$GREP$ac_delim ++EGREP!$EGREP$ac_delim ++AWK!$AWK$ac_delim ++INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim ++INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim ++INSTALL_DATA!$INSTALL_DATA$ac_delim ++WRITEPATH!$WRITEPATH$ac_delim ++XTERMPATH!$XTERMPATH$ac_delim ++LIBOBJS!$LIBOBJS$ac_delim ++LTLIBOBJS!$LTLIBOBJS$ac_delim ++_ACEOF ++ ++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 57; then ++ break ++ elif $ac_last_try; then ++ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 ++echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} ++ { (exit 1); exit 1; }; } ++ else ++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +-fi # test -n "$CONFIG_FILES" ++done + ++ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` ++if test -n "$ac_eof"; then ++ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ++ ac_eof=`expr $ac_eof + 1` ++fi ++ ++cat >>$CONFIG_STATUS <<_ACEOF ++cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof ++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end + _ACEOF ++sed ' ++s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g ++s/^/s,@/; s/!/@,|#_!!_#|/ ++:n ++t n ++s/'"$ac_delim"'$/,g/; t ++s/$/\\/; p ++N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ++' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF ++:end ++s/|#_!!_#|//g ++CEOF$ac_eof ++_ACEOF ++ ++ ++# VPATH may cause trouble with some makes, so we remove $(srcdir), ++# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and ++# trailing colons and then remove the whole line if VPATH becomes empty ++# (actually we leave an empty line to preserve line numbers). ++if test "x$srcdir" = x.; then ++ ac_vpsub='/^[ ]*VPATH[ ]*=/{ ++s/:*\$(srcdir):*/:/ ++s/:*\${srcdir}:*/:/ ++s/:*@srcdir@:*/:/ ++s/^\([^=]*=[ ]*\):*/\1/ ++s/:*$// ++s/^[^=]*=[ ]*$// ++}' ++fi ++ + cat >>$CONFIG_STATUS <<\_ACEOF +-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue +- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". +- case $ac_file in +- - | *:- | *:-:* ) # input from stdin +- cat >$tmp/stdin +- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- * ) ac_file_in=$ac_file.in ;; ++fi # test -n "$CONFIG_FILES" ++ ++ ++for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS ++do ++ case $ac_tag in ++ :[FHLC]) ac_mode=$ac_tag; continue;; ++ esac ++ case $ac_mode$ac_tag in ++ :[FHL]*:*);; ++ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 ++echo "$as_me: error: Invalid tag $ac_tag." >&2;} ++ { (exit 1); exit 1; }; };; ++ :[FH]-) ac_tag=-:-;; ++ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; ++ esac ++ ac_save_IFS=$IFS ++ IFS=: ++ set x $ac_tag ++ IFS=$ac_save_IFS ++ shift ++ ac_file=$1 ++ shift ++ ++ case $ac_mode in ++ :L) ac_source=$1;; ++ :[FH]) ++ ac_file_inputs= ++ for ac_f ++ do ++ case $ac_f in ++ -) ac_f="$tmp/stdin";; ++ *) # Look for the file first in the build tree, then in the source tree ++ # (if the path is not absolute). The absolute path cannot be DOS-style, ++ # because $ac_f cannot contain `:'. ++ test -f "$ac_f" || ++ case $ac_f in ++ [\\/$]*) false;; ++ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; ++ esac || ++ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 ++echo "$as_me: error: cannot find input file: $ac_f" >&2;} ++ { (exit 1); exit 1; }; };; ++ esac ++ ac_file_inputs="$ac_file_inputs $ac_f" ++ done ++ ++ # Let's still pretend it is `configure' which instantiates (i.e., don't ++ # use $as_me), people would be surprised to read: ++ # /* config.h. Generated by config.status. */ ++ configure_input="Generated from "`IFS=: ++ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." ++ if test x"$ac_file" != x-; then ++ configure_input="$ac_file. $configure_input" ++ { echo "$as_me:$LINENO: creating $ac_file" >&5 ++echo "$as_me: creating $ac_file" >&6;} ++ fi ++ ++ case $ac_tag in ++ *:-:* | *:-) cat >"$tmp/stdin";; ++ esac ++ ;; + esac + +- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. +- ac_dir=`(dirname "$ac_file") 2>/dev/null || ++ ac_dir=`$as_dirname -- "$ac_file" || + $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$ac_file" : 'X\(//\)[^/]' \| \ +- X"$ac_file" : 'X\(//\)$' \| \ +- X"$ac_file" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$ac_file" : 'X\(//\)[^/]' \| \ ++ X"$ac_file" : 'X\(//\)$' \| \ ++ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || + echo X"$ac_file" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- { if $as_mkdir_p; then +- mkdir -p "$ac_dir" +- else +- as_dir="$ac_dir" ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ { as_dir="$ac_dir" ++ case $as_dir in #( ++ -*) as_dir=./$as_dir;; ++ esac ++ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= +- while test ! -d "$as_dir"; do +- as_dirs="$as_dir $as_dirs" +- as_dir=`(dirname "$as_dir") 2>/dev/null || ++ while :; do ++ case $as_dir in #( ++ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( ++ *) as_qdir=$as_dir;; ++ esac ++ as_dirs="'$as_qdir' $as_dirs" ++ as_dir=`$as_dirname -- "$as_dir" || + $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$as_dir" : 'X\(//\)[^/]' \| \ +- X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || ++ X"$as_dir" : 'X\(//\)[^/]' \| \ ++ X"$as_dir" : 'X\(//\)$' \| \ ++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || + echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ test -d "$as_dir" && break + done +- test ! -n "$as_dirs" || mkdir $as_dirs +- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} ++ test -z "$as_dirs" || eval "mkdir $as_dirs" ++ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 ++echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } +- + ac_builddir=. + +-if test "$ac_dir" != .; then ++case "$ac_dir" in ++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; ++*) + 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 ++ # A ".." for each directory in $ac_dir_suffix. ++ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` ++ case $ac_top_builddir_sub in ++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;; ++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; ++ esac ;; ++esac ++ac_abs_top_builddir=$ac_pwd ++ac_abs_builddir=$ac_pwd$ac_dir_suffix ++# for backward compatibility: ++ac_top_builddir=$ac_top_build_prefix + + case $srcdir in +- .) # No --srcdir option. We are building in place. ++ .) # 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_top_srcdir=$ac_top_builddir_sub ++ ac_abs_top_srcdir=$ac_pwd ;; ++ [\\/]* | ?:[\\/]* ) # Absolute name. + 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 +-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +-# absolute. +-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` ++ ac_top_srcdir=$srcdir ++ ac_abs_top_srcdir=$srcdir ;; ++ *) # Relative name. ++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ++ ac_top_srcdir=$ac_top_build_prefix$srcdir ++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;; ++esac ++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix ++ + ++ case $ac_mode in ++ :F) ++ # ++ # CONFIG_FILE ++ # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; +- *) ac_INSTALL=$ac_top_builddir$INSTALL ;; ++ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac ++_ACEOF + +- if test x"$ac_file" != x-; then +- { echo "$as_me:$LINENO: creating $ac_file" >&5 +-echo "$as_me: creating $ac_file" >&6;} +- rm -f "$ac_file" +- fi +- # Let's still pretend it is `configure' which instantiates (i.e., don't +- # use $as_me), people would be surprised to read: +- # /* config.h. Generated by config.status. */ +- if test x"$ac_file" = x-; then +- configure_input= +- else +- configure_input="$ac_file. " +- fi +- configure_input=$configure_input"Generated from `echo $ac_file_in | +- sed 's,.*/,,'` by configure." +- +- # First look for the input files in the build tree, otherwise in the +- # src tree. +- ac_file_inputs=`IFS=: +- for f in $ac_file_in; do +- case $f in +- -) echo $tmp/stdin ;; +- [\\/$]*) +- # Absolute (can't be DOS-style, as IFS=:) +- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- echo $f;; +- *) # Relative +- if test -f "$f"; then +- # Build tree +- echo $f +- elif test -f "$srcdir/$f"; then +- # Source tree +- echo $srcdir/$f +- else +- # /dev/null tree +- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- fi;; +- esac +- done` || { (exit 1); exit 1; } ++cat >>$CONFIG_STATUS <<\_ACEOF ++# If the template does not know about datarootdir, expand it. ++# FIXME: This hack should be removed a few years after 2.60. ++ac_datarootdir_hack=; ac_datarootdir_seen= ++ ++case `sed -n '/datarootdir/ { ++ p ++ q ++} ++/@datadir@/p ++/@docdir@/p ++/@infodir@/p ++/@localedir@/p ++/@mandir@/p ++' $ac_file_inputs` in ++*datarootdir*) ac_datarootdir_seen=yes;; ++*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) ++ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 ++echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF ++ ac_datarootdir_hack=' ++ s&@datadir@&$datadir&g ++ s&@docdir@&$docdir&g ++ s&@infodir@&$infodir&g ++ s&@localedir@&$localedir&g ++ s&@mandir@&$mandir&g ++ s&\\\${datarootdir}&$datarootdir&g' ;; ++esac ++_ACEOF ++ ++# Neutralize VPATH when `$srcdir' = `.'. ++# Shell code in configure.ac might set extrasub. ++# FIXME: do we really want to maintain this feature? ++cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub + $extrasub + _ACEOF + cat >>$CONFIG_STATUS <<\_ACEOF + :t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b +-s,@configure_input@,$configure_input,;t t +-s,@srcdir@,$ac_srcdir,;t t +-s,@abs_srcdir@,$ac_abs_srcdir,;t t +-s,@top_srcdir@,$ac_top_srcdir,;t t +-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +-s,@builddir@,$ac_builddir,;t t +-s,@abs_builddir@,$ac_abs_builddir,;t t +-s,@top_builddir@,$ac_top_builddir,;t t +-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +-s,@INSTALL@,$ac_INSTALL,;t t +-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out +- rm -f $tmp/stdin +- if test x"$ac_file" != x-; then +- mv $tmp/out $ac_file +- else +- cat $tmp/out +- rm -f $tmp/out +- fi +- +-done +-_ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF +- +-# +-# CONFIG_HEADER section. +-# +- +-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +-# NAME is the cpp macro being defined and VALUE is the value it is being given. +-# +-# ac_d sets the value in "#define NAME VALUE" lines. +-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +-ac_dB='[ ].*$,\1#\2' +-ac_dC=' ' +-ac_dD=',;t' +-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +-ac_uB='$,\1#\2define\3' +-ac_uC=' ' +-ac_uD=',;t' ++s&@configure_input@&$configure_input&;t t ++s&@top_builddir@&$ac_top_builddir_sub&;t t ++s&@srcdir@&$ac_srcdir&;t t ++s&@abs_srcdir@&$ac_abs_srcdir&;t t ++s&@top_srcdir@&$ac_top_srcdir&;t t ++s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t ++s&@builddir@&$ac_builddir&;t t ++s&@abs_builddir@&$ac_abs_builddir&;t t ++s&@abs_top_builddir@&$ac_abs_top_builddir&;t t ++s&@INSTALL@&$ac_INSTALL&;t t ++$ac_datarootdir_hack ++" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out ++ ++test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && ++ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && ++ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && ++ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' ++which seems to be undefined. Please make sure it is defined." >&5 ++echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' ++which seems to be undefined. Please make sure it is defined." >&2;} + +-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue +- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ++ rm -f "$tmp/stdin" + case $ac_file in +- - | *:- | *:-:* ) # input from stdin +- cat >$tmp/stdin +- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; +- * ) ac_file_in=$ac_file.in ;; ++ -) cat "$tmp/out"; rm -f "$tmp/out";; ++ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac ++ ;; ++ :H) ++ # ++ # CONFIG_HEADER ++ # ++_ACEOF ++ ++# Transform confdefs.h into a sed script `conftest.defines', that ++# substitutes the proper values into config.h.in to produce config.h. ++rm -f conftest.defines conftest.tail ++# First, append a space to every undef/define line, to ease matching. ++echo 's/$/ /' >conftest.defines ++# Then, protect against being on the right side of a sed subst, or in ++# an unquoted here document, in config.status. If some macros were ++# called several times there might be several #defines for the same ++# symbol, which is useless. But do not sort them, since the last ++# AC_DEFINE must be honored. ++ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* ++# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where ++# NAME is the cpp macro being defined, VALUE is the value it is being given. ++# PARAMS is the parameter list in the macro definition--in most cases, it's ++# just an empty string. ++ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ++ac_dB='\\)[ (].*,\\1define\\2' ++ac_dC=' ' ++ac_dD=' ,' + +- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +-echo "$as_me: creating $ac_file" >&6;} +- +- # First look for the input files in the build tree, otherwise in the +- # src tree. +- ac_file_inputs=`IFS=: +- for f in $ac_file_in; do +- case $f in +- -) echo $tmp/stdin ;; +- [\\/$]*) +- # Absolute (can't be DOS-style, as IFS=:) +- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- echo $f;; +- *) # Relative +- if test -f "$f"; then +- # Build tree +- echo $f +- elif test -f "$srcdir/$f"; then +- # Source tree +- echo $srcdir/$f +- else +- # /dev/null tree +- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +-echo "$as_me: error: cannot find input file: $f" >&2;} +- { (exit 1); exit 1; }; } +- fi;; +- esac +- done` || { (exit 1); exit 1; } +- # Remove the trailing spaces. +- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in +- +-_ACEOF +- +-# Transform confdefs.h into two sed scripts, `conftest.defines' and +-# `conftest.undefs', that substitutes the proper values into +-# config.h.in to produce config.h. The first handles `#define' +-# templates, and the second `#undef' templates. +-# And first: Protect against being on the right side of a sed subst in +-# config.status. Protect against being in an unquoted here document +-# in config.status. +-rm -f conftest.defines conftest.undefs +-# Using a here document instead of a string reduces the quoting nightmare. +-# Putting comments in sed scripts is not portable. +-# +-# `end' is used to avoid that the second main sed command (meant for +-# 0-ary CPP macros) applies to n-ary macro definitions. +-# See the Autoconf documentation for `clear'. +-cat >confdef2sed.sed <<\_ACEOF +-s/[\\&,]/\\&/g +-s,[\\$`],\\&,g +-t clear +-: clear +-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +-t end +-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +-: end +-_ACEOF +-# If some macros were called several times there might be several times +-# the same #defines, which is useless. Nevertheless, we may not want to +-# sort them, since we want the *last* AC-DEFINE to be honored. +-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +-rm -f confdef2sed.sed ++uniq confdefs.h | ++ sed -n ' ++ t rset ++ :rset ++ s/^[ ]*#[ ]*define[ ][ ]*// ++ t ok ++ d ++ :ok ++ s/[\\&,]/\\&/g ++ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p ++ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ++ ' >>conftest.defines + +-# This sed command replaces #undef with comments. This is necessary, for ++# Remove the space that was appended to ease matching. ++# Then replace #undef with comments. This is necessary, for + # example, in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. +-cat >>conftest.undefs <<\_ACEOF +-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +-_ACEOF ++# (The regexp can be short, since the line contains either #define or #undef.) ++echo 's/ $// ++s,^[ #]*u.*,/* & */,' >>conftest.defines ++ ++# Break up conftest.defines: ++ac_max_sed_lines=50 ++ ++# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" ++# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" ++# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" ++# et cetera. ++ac_in='$ac_file_inputs' ++ac_out='"$tmp/out1"' ++ac_nxt='"$tmp/out2"' + +-# Break up conftest.defines because some shells have a limit on the size +-# of here documents, and old seds have small limits too (100 cmds). +-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +-echo ' :' >>$CONFIG_STATUS +-rm -f conftest.tail +-while grep . conftest.defines >/dev/null ++while : + do +- # Write a limited-size here document to $tmp/defines.sed. +- echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS +- # Speed up: don't consider the non `#define' lines. +- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS +- # Work around the forget-to-reset-the-flag bug. +- echo 't clr' >>$CONFIG_STATUS +- echo ': clr' >>$CONFIG_STATUS +- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS ++ # Write a here document: ++ cat >>$CONFIG_STATUS <<_ACEOF ++ # First, check the format of the line: ++ cat >"\$tmp/defines.sed" <<\\CEOF ++/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def ++/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def ++b ++:def ++_ACEOF ++ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF +- sed -f $tmp/defines.sed $tmp/in >$tmp/out +- rm -f $tmp/in +- mv $tmp/out $tmp/in +-' >>$CONFIG_STATUS +- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail ++ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ++ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in ++ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail ++ grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines + done +-rm -f conftest.defines +-echo ' fi # grep' >>$CONFIG_STATUS +-echo >>$CONFIG_STATUS +- +-# Break up conftest.undefs because some shells have a limit on the size +-# of here documents, and old seds have small limits too (100 cmds). +-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +-rm -f conftest.tail +-while grep . conftest.undefs >/dev/null +-do +- # Write a limited-size here document to $tmp/undefs.sed. +- echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS +- # Speed up: don't consider the non `#undef' +- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS +- # Work around the forget-to-reset-the-flag bug. +- echo 't clr' >>$CONFIG_STATUS +- echo ': clr' >>$CONFIG_STATUS +- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS +- echo 'CEOF +- sed -f $tmp/undefs.sed $tmp/in >$tmp/out +- rm -f $tmp/in +- mv $tmp/out $tmp/in +-' >>$CONFIG_STATUS +- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail +- rm -f conftest.undefs +- mv conftest.tail conftest.undefs +-done +-rm -f conftest.undefs ++rm -f conftest.defines conftest.tail + ++echo "ac_result=$ac_in" >>$CONFIG_STATUS + cat >>$CONFIG_STATUS <<\_ACEOF +- # Let's still pretend it is `configure' which instantiates (i.e., don't +- # use $as_me), people would be surprised to read: +- # /* config.h. Generated by config.status. */ +- if test x"$ac_file" = x-; then +- echo "/* Generated by configure. */" >$tmp/config.h +- else +- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h +- fi +- cat $tmp/in >>$tmp/config.h +- rm -f $tmp/in + if test x"$ac_file" != x-; then +- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then ++ echo "/* $configure_input */" >"$tmp/config.h" ++ cat "$ac_result" >>"$tmp/config.h" ++ if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 + echo "$as_me: $ac_file is unchanged" >&6;} + else +- ac_dir=`(dirname "$ac_file") 2>/dev/null || +-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$ac_file" : 'X\(//\)[^/]' \| \ +- X"$ac_file" : 'X\(//\)$' \| \ +- X"$ac_file" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$ac_file" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- { if $as_mkdir_p; then +- mkdir -p "$ac_dir" +- else +- as_dir="$ac_dir" +- as_dirs= +- while test ! -d "$as_dir"; do +- as_dirs="$as_dir $as_dirs" +- as_dir=`(dirname "$as_dir") 2>/dev/null || +-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$as_dir" : 'X\(//\)[^/]' \| \ +- X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- done +- test ! -n "$as_dirs" || mkdir $as_dirs +- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} +- { (exit 1); exit 1; }; }; } +- + rm -f $ac_file +- mv $tmp/config.h $ac_file ++ mv "$tmp/config.h" $ac_file + fi + else +- cat $tmp/config.h +- rm -f $tmp/config.h ++ echo "/* $configure_input */" ++ cat "$ac_result" + fi +-done +-_ACEOF +-cat >>$CONFIG_STATUS <<\_ACEOF ++ rm -f "$tmp/out12" ++ ;; + +-# +-# CONFIG_COMMANDS section. +-# +-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue +- ac_dest=`echo "$ac_file" | sed 's,:.*,,'` +- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` +- ac_dir=`(dirname "$ac_dest") 2>/dev/null || +-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$ac_dest" : 'X\(//\)[^/]' \| \ +- X"$ac_dest" : 'X\(//\)$' \| \ +- X"$ac_dest" : 'X\(/\)' \| \ +- . : '\(.\)' 2>/dev/null || +-echo X"$ac_dest" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } +- /^X\(\/\/\)[^/].*/{ s//\1/; q; } +- /^X\(\/\/\)$/{ s//\1/; q; } +- /^X\(\/\).*/{ s//\1/; q; } +- s/.*/./; q'` +- ac_builddir=. ++ :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 ++echo "$as_me: executing $ac_file commands" >&6;} ++ ;; ++ esac + +-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 +-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +-# absolute. +-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` +- +- +- { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +-echo "$as_me: executing $ac_dest commands" >&6;} +- case $ac_dest in +- default ) ++ case $ac_file$ac_mode in ++ "default":C) + # a hook for preserving undef directive in config.h + mv config.h conftest + sed -e 's@^\(.*\)defin.\( .*\) .*/\*\(.*KEEP_UNDEF_HERE\)@\1undef\2 /\*\3@' < conftest > config.h + rm -f conftest + ;; ++ + esac +-done +-_ACEOF ++done # for ac_tag + +-cat >>$CONFIG_STATUS <<\_ACEOF + + { (exit 0); exit 0; } + _ACEOF --- screen-4.0.3.orig/debian/patches/18manpage_maxwin_limit.dpatch +++ screen-4.0.3/debian/patches/18manpage_maxwin_limit.dpatch @@ -0,0 +1,57 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 18manpage_maxwin_limit.dpatch by +## +## DP: The builtin 'screen' command can directly reference window IDs +## DP: up to MAXWIN, not only {0-9}. Additionally mention Debian's +## DP: MAXWIN default in the man and info pages. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 +--- screen-4.0.3.orig/doc/screen.1 2008-06-01 23:44:57.000000000 +0200 ++++ screen-4.0.3/doc/screen.1 2008-06-01 23:44:57.000000000 +0200 +@@ -2545,9 +2545,9 @@ + and scrollback option (\fB-h\fP ) may be specified with each command. + The option (\fB-M\fP) turns monitoring on for this window. + The option (\fB-L\fP) turns output logging on for this window. +-If an optional number \fIn\fP in the range 0..9 is given, the window +-number \fIn\fP is assigned to the newly created window (or, if this +-number is already in-use, the next available number). ++If an optional number \fIn\fP in the range 0..MAXWIN-1 is given, ++the window number \fIn\fP is assigned to the newly created window ++(or, if this number is already in-use, the next available number). + If a command is specified after \*Qscreen\*U, this command (with the given + arguments) is started in the window; otherwise, a shell is created. + Thus, if your \*Q.screenrc\*U contains the lines +@@ -2593,7 +2593,7 @@ + is assigned to this window. + Thus, the first window can be activated by \*Qselect 0\*U. + The number of windows is limited at compile-time by the MAXWIN +-configuration parameter. ++configuration parameter (which defaults to 40 in Debian). + There are two special WindowIDs, \*Q-\*U selects the + internal blank window and \*Q.\*U selects the current window. The + latter is useful if used with screen's \*Q-X\*U option. +diff -Naur screen-4.0.3.orig/doc/screen.texinfo screen-4.0.3/doc/screen.texinfo +--- screen-4.0.3.orig/doc/screen.texinfo 2008-06-01 23:44:57.000000000 +0200 ++++ screen-4.0.3/doc/screen.texinfo 2008-06-01 23:44:57.000000000 +0200 +@@ -1168,9 +1168,9 @@ + + This section describes the commands for creating a new window for + running programs. When a new window is created, the first available +-number from the range 0@dots{}9 is assigned to it. ++number is assigned to it. + The number of windows is limited at compile-time by the MAXWIN +-configuration parameter. ++configuration parameter (which defaults to 40 in Debian). + + @menu + * Chdir:: Change the working directory for new windows. +@@ -1212,7 +1212,7 @@ + (@samp{-h @var{num}}) may be specified with each command. + The option (@samp{-M}) turns monitoring on for this window. + The option (@samp{-L}) turns output logging on for this window. +-If an optional number @var{n} in the range 0@dots{}9 is given, ++If an optional number @var{n} in the range 0@dots{}MAXWIN-1 is given, + the window number @var{n} is assigned to the newly created window (or, + if this number is already in-use, the next available number). If a + command is specified after @code{screen}, this command (with the given --- screen-4.0.3.orig/debian/patches/29infodoc_version.dpatch +++ screen-4.0.3/debian/patches/29infodoc_version.dpatch @@ -0,0 +1,17 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 29infodoc_version.dpatch by +## +## DP: Update software version number in info documentation. + +@DPATCH@ +--- screen-4.0.3.orig/doc/screen.texinfo 2003-12-05 14:51:46.000000000 +0100 ++++ screen-4.0.3/doc/screen.texinfo 2009-02-04 01:06:52.573469826 +0100 +@@ -7,7 +7,7 @@ + @finalout + @setchapternewpage odd + @c %**end of header +-@set version 4.0.2 ++@set version 4.0.3 + + @direntry + * Screen: (screen). Full-screen window manager. --- screen-4.0.3.orig/debian/patches/16fix_gcc_warnings_II.dpatch +++ screen-4.0.3/debian/patches/16fix_gcc_warnings_II.dpatch @@ -0,0 +1,198 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 16fix_gcc_warnings_II.dpatch +## +## DP: ... + +@DPATCH@ +diff -Naur screen-4.0.3.orig/display.c screen-4.0.3/display.c +--- screen-4.0.3.orig/display.c 2008-06-01 23:39:48.000000000 +0200 ++++ screen-4.0.3/display.c 2008-06-01 23:41:19.000000000 +0200 +@@ -4423,7 +4423,7 @@ + } + } + +-struct lay * ++struct layout * + CreateLayout(title, startat) + char *title; + int startat; +diff -Naur screen-4.0.3.orig/extern.h screen-4.0.3/extern.h +--- screen-4.0.3.orig/extern.h 2008-06-01 23:39:49.000000000 +0200 ++++ screen-4.0.3/extern.h 2008-06-01 23:41:19.000000000 +0200 +@@ -289,6 +289,10 @@ + #endif + extern void SetCanvasWindow __P((struct canvas *, struct win *)); + extern int MakeDefaultCanvas __P((void)); ++extern void RecreateCanvasChain __P((void)); ++extern int CountCanvasPerp __P((struct canvas *)); ++extern void EqualizeCanvas __P((struct canvas *, int)); ++extern void ResizeCanvas __P((struct canvas *)); + extern int AddCanvas __P((int)); + extern void RemCanvas __P((void)); + extern void OneCanvas __P((void)); +@@ -307,6 +311,12 @@ + extern void ResetIdle __P((void)); + extern void KillBlanker __P((void)); + extern void DisplaySleep1000 __P((int, int)); ++extern void SaveLayout __P((char *, struct canvas *)); ++extern void AutosaveLayout __P((struct layout *)); ++extern struct layout *FindLayout __P((char *)); ++extern void LoadLayout __P((struct layout *, struct canvas *)); ++extern void NewLayout __P((char *, int)); ++extern void ShowLayouts __P((int)); + + /* resize.c */ + extern int ChangeWindowSize __P((struct win *, int, int, int)); +diff -Naur screen-4.0.3.orig/help.c screen-4.0.3/help.c +--- screen-4.0.3.orig/help.c 2008-06-01 23:39:49.000000000 +0200 ++++ screen-4.0.3/help.c 2008-06-01 23:41:19.000000000 +0200 +@@ -1302,7 +1302,7 @@ + if (wtab[pos] && WTAB_GROUP_MATCHES(pos)) + break; + if (pos == -1) +- pos == MAXWIN; ++ pos = MAXWIN; + } + } + wlistdata->pos = pos; +diff -Naur screen-4.0.3.orig/input.c screen-4.0.3/input.c +--- screen-4.0.3.orig/input.c 2008-06-01 23:40:40.000000000 +0200 ++++ screen-4.0.3/input.c 2008-06-01 23:41:19.000000000 +0200 +@@ -142,7 +142,7 @@ + inpdata->inpmode = mode; + inpdata->privdata = data; + if (!priv) +- priv = &inpdata->privdata; ++ priv = (char *)&inpdata->privdata; + inpdata->priv = priv; + inpdata->inpstringlen = 0; + inpdata->inpstring = NULL; +diff -Naur screen-4.0.3.orig/layer.c screen-4.0.3/layer.c +--- screen-4.0.3.orig/layer.c 2008-06-01 23:41:11.000000000 +0200 ++++ screen-4.0.3/layer.c 2008-06-01 23:41:19.000000000 +0200 +@@ -398,7 +398,6 @@ + { + struct canvas *cv; + struct viewport *vp; +- char *s2; + int xs2, xe2, y2, len, len2; + struct mchar or; + +diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c +--- screen-4.0.3.orig/process.c 2008-06-01 23:41:11.000000000 +0200 ++++ screen-4.0.3/process.c 2008-06-01 23:41:19.000000000 +0200 +@@ -2070,15 +2070,15 @@ + #endif + case RC_WINDOWLIST: + if (!*args) +- display_wlist(0, WLIST_NUM, (char *)0); ++ display_wlist(0, WLIST_NUM, (struct win *)0); + else if (!strcmp(*args, "-m") && !args[1]) +- display_wlist(0, WLIST_MRU, (char *)0); ++ display_wlist(0, WLIST_MRU, (struct win *)0); + else if (!strcmp(*args, "-b") && !args[1]) +- display_wlist(1, WLIST_NUM, (char *)0); ++ display_wlist(1, WLIST_NUM, (struct win *)0); + else if (!strcmp(*args, "-b") && !strcmp(args[1], "-m") && !args[2]) +- display_wlist(1, WLIST_MRU, (char *)0); ++ display_wlist(1, WLIST_MRU, (struct win *)0); + else if (!strcmp(*args, "-m") && !strcmp(args[1], "-b") && !args[2]) +- display_wlist(1, WLIST_MRU, (char *)0); ++ display_wlist(1, WLIST_MRU, (struct win *)0); + else if (!strcmp(*args, "string")) + { + if (args[1]) +@@ -3967,7 +3967,7 @@ + if (args[0][0]) + { + fore->w_group = WindowByName(*args); +- if (fore->w_group && fore->w_group != W_TYPE_GROUP) ++ if (fore->w_group && fore->w_type != W_TYPE_GROUP) + fore->w_group = 0; + } + } +@@ -4071,7 +4071,6 @@ + } + else if (!strcmp(args[0], "select")) + { +- struct layout *lay; + if (!args[1]) + { + Input("Switch to layout: ", 20, INP_COOKED, SelectLayoutFin, NULL, 0); +@@ -4952,7 +4951,7 @@ + { + register struct win **pp; + int n = fore ? fore->w_number : MAXWIN; +- char *group = fore ? fore->w_group : 0; ++ struct win *group = fore ? fore->w_group : (struct win *)0; + + for (pp = fore ? wtab + n + 1 : wtab; pp != wtab + n; pp++) + { +@@ -4974,7 +4973,7 @@ + { + register struct win **pp; + int n = fore ? fore->w_number : -1; +- char *group = fore ? fore->w_group : 0; ++ struct win *group = fore ? fore->w_group : (struct win *)0; + + for (pp = wtab + n - 1; pp != wtab + n; pp--) + { +@@ -5485,14 +5484,13 @@ + int len; + char *data; /* dummy */ + { +- int n; + struct layout *lay; + + if (!len || !display) + return; + if (len == 1 && *buf == '-') + { +- LoadLayout((struct layout *)0); ++ LoadLayout((struct layout *)0, (struct canvas *)0); + Activate(0); + return; + } +@@ -6445,7 +6443,7 @@ + int flags; + { + struct canvas *cv; +- int nreg, dsize, diff, siz, nsiz, l, done; ++ int diff, l; + int gflag = 0, abs = 0, percent = 0; + int orient = 0; + +diff -Naur screen-4.0.3.orig/resize.c screen-4.0.3/resize.c +--- screen-4.0.3.orig/resize.c 2008-06-01 23:39:49.000000000 +0200 ++++ screen-4.0.3/resize.c 2008-06-01 23:41:19.000000000 +0200 +@@ -146,9 +146,8 @@ + int change_fore; + { + struct win *p; +- struct canvas *cv, **cvpp; ++ struct canvas *cv; + int wwi; +- int y, h, hn, xe, ye; + + debug2("ChangeScreenSize from (%d,%d) ", D_width, D_height); + debug3("to (%d,%d) (change_fore: %d)\n",wi, he, change_fore); +diff -Naur screen-4.0.3.orig/socket.c screen-4.0.3/socket.c +--- screen-4.0.3.orig/socket.c 2008-06-01 23:39:49.000000000 +0200 ++++ screen-4.0.3/socket.c 2008-06-01 23:41:19.000000000 +0200 +@@ -1193,7 +1193,6 @@ + char *p; + int pid; + int noshowwin; +- int r = 0; + struct win *wi; + + ASSERT(display); +@@ -1318,7 +1317,7 @@ + #endif + { + flayer = D_forecv->c_layer; +- display_wlist(1, WLIST_NUM, (char *)0); ++ display_wlist(1, WLIST_NUM, (struct win *)0); + noshowwin = 1; + } + } --- screen-4.0.3.orig/debian/patches/09CHERRY_bb04008e.dpatch +++ screen-4.0.3/debian/patches/09CHERRY_bb04008e.dpatch @@ -0,0 +1,75 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 09CHERRY_bb04008e.dpatch +## +## DP: Cherry-pick commit bb04008e82e2820cc2c20ee0668818a5884280d9 +## DP: (report session identifier on detach). + +@DPATCH@ +diff --git a/screen.c b/screen.c +index e1fb3f0..8160a73 100644 +--- a/screen.c ++++ b/screen.c +@@ -1832,6 +1832,17 @@ int mode; + if (display == 0) + return; + ++#define AddStrSock(msg) do { \ ++ if (SockName) \ ++ { \ ++ AddStr("[" msg " from "); \ ++ AddStr(SockName); \ ++ AddStr("]\r\n"); \ ++ } \ ++ else \ ++ AddStr("[" msg "]\r\n"); \ ++ } while (0) ++ + signal(SIGHUP, SIG_IGN); + debug1("Detach(%d)\n", mode); + if (D_status) +@@ -1845,7 +1856,7 @@ int mode; + sign = SIG_BYE; + break; + case D_DETACH: +- AddStr("[detached]\r\n"); ++ AddStrSock("detached"); + sign = SIG_BYE; + break; + #ifdef BSDJOBS +@@ -1855,14 +1866,14 @@ int mode; + #endif + #ifdef REMOTE_DETACH + case D_REMOTE: +- AddStr("[remote detached]\r\n"); ++ AddStrSock("remote detached"); + sign = SIG_BYE; + break; + #endif + #ifdef POW_DETACH + case D_POWER: +- AddStr("[power detached]\r\n"); +- if (PowDetachString) ++ AddStrSock("power detached"); ++ if (PowDetachString) + { + AddStr(PowDetachString); + AddStr("\r\n"); +@@ -1871,8 +1882,8 @@ int mode; + break; + #ifdef REMOTE_DETACH + case D_REMOTE_POWER: +- AddStr("[remote power detached]\r\n"); +- if (PowDetachString) ++ AddStrSock("remote power detached"); ++ if (PowDetachString) + { + AddStr(PowDetachString); + AddStr("\r\n"); +@@ -1948,6 +1959,7 @@ int mode; + debug2("Detach: Signal %d to Attacher(%d)!\n", sign, pid); + debug("Detach returns, we are successfully detached.\n"); + signal(SIGHUP, SigHup); ++#undef AddStrSock + } + + static int --- screen-4.0.3.orig/debian/patches/17manpage_sessionname_warning.dpatch +++ screen-4.0.3/debian/patches/17manpage_sessionname_warning.dpatch @@ -0,0 +1,41 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 17manpage_sessionname_warning.dpatch by +## +## DP: Discourage the use of 'sessionname' (see #103771). + +@DPATCH@ +diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 +--- screen-4.0.3.orig/doc/screen.1 2008-06-01 23:40:56.000000000 +0200 ++++ screen-4.0.3/doc/screen.1 2008-06-01 23:44:56.000000000 +0200 +@@ -2603,9 +2603,10 @@ + .PP + Rename the current session. Note, that for \*Qscreen -list\*U the + name shows up with the process-id prepended. If the argument \*Qname\*U +-is omitted, the name of this session is displayed. Caution: The $STY +-environment variables still reflects the old name. This may result in +-confusion. ++is omitted, the name of this session is displayed. Caution: Among other ++problems, the $STY environment variable still reflects the old name. ++Use of this command is strongly discouraged. Use the \*Q-S\*U commandline ++option if you need this feature. + The default is constructed from the tty and host names. + .sp + .ne 3 +diff -Naur screen-4.0.3.orig/doc/screen.texinfo screen-4.0.3/doc/screen.texinfo +--- screen-4.0.3.orig/doc/screen.texinfo 2008-06-01 23:40:31.000000000 +0200 ++++ screen-4.0.3/doc/screen.texinfo 2008-06-01 23:44:56.000000000 +0200 +@@ -1757,9 +1757,11 @@ + Rename the current session. Note that for @code{screen -list} the name + shows up with the process-id prepended. If the argument @var{name} is + omitted, the name of this session is displayed.@* +-@emph{Caution}: The @code{$STY} +-environment variable still reflects the old name. This may result in +-confusion. The default is constructed from the tty and host names. ++@emph{Caution}: Among other problems, the @code{$STY} ++environment variable still reflects the old name. Use of this command ++is strongly discouraged. Use the @code{-S} commandline option if you ++need this feature. ++The default is constructed from the tty and host names. + @end deffn + + @node Suspend, Quit, Session Name, Session Management --- screen-4.0.3.orig/debian/patches/31upstream_cherries.dpatch +++ screen-4.0.3/debian/patches/31upstream_cherries.dpatch @@ -0,0 +1,28 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 31upstream_cherries.dpatch by +## +## DP: Cherry-picked upstream commits: +## DP: - (#501201, git d128abd5...) + +@DPATCH@ +--- screen-4.0.3.orig/attacher.c ++++ screen-4.0.3/attacher.c +@@ -52,6 +52,7 @@ static sigret_t AttachSigCont __P(SIGPROTOARG); + + extern int real_uid, real_gid, eff_uid, eff_gid; + extern char *SockName, *SockMatch, SockPath[]; ++extern char HostName[]; + extern struct passwd *ppp; + extern char *attach_tty, *attach_term, *LoginName, *preselect; + extern int xflag, dflag, rflag, quietflag, adaptflag; +@@ -891,8 +892,8 @@ screen_builtin_lck() + *cp1 -= 'a' - 'A'; + } + +- sprintf(message, "Screen used by %s <%s>.\nPassword:\007", +- fullname, ppp->pw_name); ++ sprintf(message, "Screen used by %s%s<%s> on %s.\nPassword:\007", ++ fullname, fullname[0] ? " " : "", ppp->pw_name, HostName); + + /* loop here to wait for correct password */ + for (;;) --- screen-4.0.3.orig/debian/patches/35screen_invoked_with_a_command.dpatch +++ screen-4.0.3/debian/patches/35screen_invoked_with_a_command.dpatch @@ -0,0 +1,29 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 35screen_invoked_with_a_command.dpatch +## +## DP: Cherry-picked from upstream. +## DP: From 25c4f34d19c9f7d7262ef2a173238fdab7e283be Mon Sep 17 00:00:00 2001 +## DP: From: Sadrul Habib Chowdhury +## DP: Date: Mon, 26 Jan 2009 21:19:47 +0000 +## DP: Subject: Don't forget the startup command. + +## DP:Fixes savannah bug #25348, launchpad bug #311443. +## DP:--- +## DP:diff --git a/src/screen.c b/src/screen.c +## DP:index c914c59..7239560 100644 + +@DPATCH@ + +--- src/screen.c ++++ src/screen.c +@@ -1420,6 +1420,10 @@ char **av; + /* NOTREACHED */ + } + } ++ else if (ac) /* Screen was invoked with a command */ ++ { ++ MakeWindow(&nwin); ++ } + + #ifdef HAVE_BRAILLE + StartBraille(); --- screen-4.0.3.orig/debian/patches/14size_matters.dpatch +++ screen-4.0.3/debian/patches/14size_matters.dpatch @@ -0,0 +1,75 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 14size_matters.dpatch by +## +## DP: * Increase the MAXSTR macro to suit present-day needs. +## DP: * Increase the maximum length of the input line buffer likewise. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/input.c screen-4.0.3/input.c +--- screen-4.0.3.orig/input.c 2008-06-01 23:39:49.000000000 +0200 ++++ screen-4.0.3/input.c 2008-06-01 23:40:37.000000000 +0200 +@@ -38,7 +38,7 @@ + + struct inpline + { +- char buf[101]; /* text buffer */ ++ char buf[MAXSTR+1]; /* text buffer */ + int len; /* length of the editible string */ + int pos; /* cursor position in editable string */ + }; +@@ -49,7 +49,7 @@ + struct inpdata + { + struct inpline inp; +- int inpmaxlen; /* 100, or less, if caller has shorter buffer */ ++ int inpmaxlen; /* MAXSTR, or less, if caller has shorter buffer */ + char *inpstring; /* the prompt */ + int inpstringlen; /* length of the prompt */ + int inpmode; /* INP_NOECHO, INP_RAW, INP_EVERY */ +@@ -120,8 +120,8 @@ + int maxlen; + struct inpdata *inpdata; + +- if (len > 100) +- len = 100; ++ if (len > MAXSTR) ++ len = MAXSTR; + if (!(mode & INP_NOECHO)) + { + maxlen = flayer->l_width - 1 - strlen(istr); +diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c +--- screen-4.0.3.orig/process.c 2008-06-01 23:39:49.000000000 +0200 ++++ screen-4.0.3/process.c 2008-06-01 23:40:37.000000000 +0200 +@@ -1934,7 +1934,7 @@ + ChangeAKA(fore, *args, strlen(*args)); + break; + case RC_COLON: +- Input(":", 100, INP_COOKED, Colonfin, NULL, 0); ++ Input(":", MAXSTR, INP_COOKED, Colonfin, NULL, 0); + if (*args && **args) + { + s = *args; +diff -Naur screen-4.0.3.orig/screen.h screen-4.0.3/screen.h +--- screen-4.0.3.orig/screen.h 2008-06-01 23:39:49.000000000 +0200 ++++ screen-4.0.3/screen.h 2008-06-01 23:40:37.000000000 +0200 +@@ -86,7 +86,7 @@ + + #define Ctrl(c) ((c)&037) + +-#define MAXSTR 256 ++#define MAXSTR 768 + #define MAXARGS 64 + #define MSGWAIT 5 + #define MSGMINWAIT 1 +diff -Naur screen-4.0.3.orig/window.c screen-4.0.3/window.c +--- screen-4.0.3.orig/window.c 2008-06-01 23:39:49.000000000 +0200 ++++ screen-4.0.3/window.c 2008-06-01 23:40:37.000000000 +0200 +@@ -2171,7 +2171,7 @@ + return; + } + flayer = &p->w_layer; +- Input(":", 100, INP_COOKED, zmodem_fin, NULL, 0); ++ Input(":", MAXSTR, INP_COOKED, zmodem_fin, NULL, 0); + s = send ? zmodem_sendcmd : zmodem_recvcmd; + n = strlen(s); + LayProcess(&s, &n); --- screen-4.0.3.orig/debian/patches/01configure_fix_alpha_vsprintf.dpatch +++ screen-4.0.3/debian/patches/01configure_fix_alpha_vsprintf.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01configure_fix_alpha_vsprintf.dpatch by +## +## DP: Enhance the vsprintf() test to also succeed on Alpha. +## DP: Cf. #213842. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/configure.in screen-4.0.3/configure.in +--- screen-4.0.3.orig/configure.in 2008-06-01 23:39:48.000000000 +0200 ++++ screen-4.0.3/configure.in 2008-06-01 23:39:51.000000000 +0200 +@@ -1210,7 +1210,7 @@ + rm -f /tmp/conftest* + + AC_MSG_CHECKING(for vsprintf) +-AC_TRY_LINK(,[vsprintf(0,0,0);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) ++AC_TRY_LINK([#include ],[va_list valist; vsprintf(0,0,valist);], AC_MSG_RESULT(yes);AC_DEFINE(USEVARARGS), AC_MSG_RESULT(no)) + + AC_HEADER_DIRENT + --- screen-4.0.3.orig/debian/patches/24option_parser.dpatch +++ screen-4.0.3/debian/patches/24option_parser.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 24option_parser.dpatch by +## +## DP: This is not getopt() and we don't have two leading dashes, so +## DP: parse and match the long options in full. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/screen.c screen-4.0.3/screen.c +--- screen-4.0.3.orig/screen.c 2008-06-01 23:44:59.000000000 +0200 ++++ screen-4.0.3/screen.c 2008-06-01 23:44:59.000000000 +0200 +@@ -621,6 +621,8 @@ + } + break; + case 'w': ++ if (strcmp(ap+1, "ipe")) ++ exit_with_usage(myname, "Unknown option %s", --ap); + lsflag = 1; + wipeflag = 1; + if (ac > 1 && !SockMatch) --- screen-4.0.3.orig/debian/patches/19flowcontrol_lockup.dpatch +++ screen-4.0.3/debian/patches/19flowcontrol_lockup.dpatch @@ -0,0 +1,72 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 19flowcontrol_lockup.dpatch by +## +## DP: Make Flush() truly non-blocking by employing an extra select(). +## DP: Thus D_userfd is assured to be in non-blocking mode on return +## DP: (even if the return was premature due to select() timing out), +## DP: so the SetTTY() call in FreeDisplay() doesn't have to be +## DP: safeguarded on its own. +## DP: +## DP: Note - I'm not satisfied at all with this patch, but I consider +## DP: it an ugly but working kluge, meant only to stay around as long +## DP: as upstream hasn't come up with anything better. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/display.c screen-4.0.3/display.c +--- screen-4.0.3.orig/display.c 2008-06-01 23:41:50.000000000 +0200 ++++ screen-4.0.3/display.c 2008-06-01 23:44:57.000000000 +0200 +@@ -3556,6 +3556,8 @@ + { + register int l; + register char *p; ++ fd_set fd_s; ++ struct timeval sO; + + ASSERT(display); + l = D_obufp - D_obuf; +@@ -3570,15 +3572,29 @@ + return; + } + p = D_obuf; +- if (fcntl(D_userfd, F_SETFL, 0)) +- debug1("Warning: BLOCK fcntl failed: %d\n", errno); ++ if (fcntl(D_userfd, F_SETFL, FNBLOCK)) ++ debug1("Warning: NBLOCK fcntl failed: %d\n", errno); ++ if (D_blocked == 1) ++ D_blocked = 0; ++ D_blocked_fuzz = 0; + while (l) + { +- register int wr; ++ register int wr = 0; ++ sO.tv_sec = 5; sO.tv_usec = 0; ++ while (1) { ++ int sR; ++ FD_ZERO(&fd_s); ++ FD_SET(D_userfd, &fd_s); ++ sR = select(D_userfd+1, NULL, &fd_s, NULL, &sO); ++ if (!sR) { ++ debug("Timeout while waiting for display write fd to unblock\n"); ++ return; ++ } else if (sR > 0) break; ++ } + wr = write(D_userfd, p, l); + if (wr <= 0) + { +- if (errno == EINTR) ++ if (errno == EINTR || errno == EAGAIN) + continue; + debug1("Writing to display: %d\n", errno); + wr = l; +@@ -3591,11 +3607,6 @@ + } + D_obuffree += l; + D_obufp = D_obuf; +- if (fcntl(D_userfd, F_SETFL, FNBLOCK)) +- debug1("Warning: NBLOCK fcntl failed: %d\n", errno); +- if (D_blocked == 1) +- D_blocked = 0; +- D_blocked_fuzz = 0; + } + + void --- screen-4.0.3.orig/debian/patches/60-byobu-pointer.dpatch +++ screen-4.0.3/debian/patches/60-byobu-pointer.dpatch @@ -0,0 +1,22 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 60-byobu-pointer.dpatch by Dustin Kirkland +## DP: screen-profiles previously provided a diversion of /usr/bin/screen +## DP: to its own script. This is no longer the case, out of respect for +## DP: traditional screen users. However, screen-profiles and byobu users +## DP: will wonder what happened. This pointer in the help text is intended +## DP: to direct these users to the new binary name. + +@DPATCH@ +--- screen-4.0.3.orig/help.c ++++ screen-4.0.3/help.c +@@ -502,7 +502,9 @@ + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n\ + \n\ + Send bugreports, fixes, enhancements, t-shirts, money, beer & pizza to \ +-screen@uni-erlangen.de\n"; ++screen@uni-erlangen.de\n\ ++\n\ ++To use byobu (formerly screen-profiles), exit screen and run 'byobu'.\n"; + + + static void --- screen-4.0.3.orig/debian/patches/28blankerprg_callsemantics.dpatch +++ screen-4.0.3/debian/patches/28blankerprg_callsemantics.dpatch @@ -0,0 +1,30 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 28blankerprg_callsemantics.dpatch by +## +## DP: Allow 'blankerprg' to be called without arguments (as the manpage states). + +@DPATCH@ +diff -Naur screen-4.0.3.orig/comm.c screen-4.0.3/comm.c +--- screen-4.0.3.orig/comm.c 2008-06-01 23:39:48.000000000 +0200 ++++ screen-4.0.3/comm.c 2008-06-01 23:45:00.000000000 +0200 +@@ -98,7 +98,7 @@ + #endif + { "blanker", NEED_DISPLAY|ARGS_0}, + #ifdef BLANKER_PRG +- { "blankerprg", ARGS_1|ARGS_ORMORE }, ++ { "blankerprg", ARGS_0|ARGS_ORMORE }, + #endif + { "break", NEED_FORE|ARGS_01 }, + { "breaktype", NEED_FORE|ARGS_01 }, +diff -Naur screen-4.0.3.orig/process.c screen-4.0.3/process.c +--- screen-4.0.3.orig/process.c 2008-06-01 23:45:00.000000000 +0200 ++++ screen-4.0.3/process.c 2008-06-01 23:45:00.000000000 +0200 +@@ -3903,7 +3903,7 @@ + free(blankerprg); + blankerprg = 0; + } +- if (args[0][0]) ++ if (args[0] && args[0][0]) + blankerprg = SaveArgs(args); + break; + #endif --- screen-4.0.3.orig/debian/patches/32misc_minor_fixes.dpatch +++ screen-4.0.3/debian/patches/32misc_minor_fixes.dpatch @@ -0,0 +1,17 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 32misc_minor_fixes.dpatch by +## +## DP: Remove an unconditional nethack message. (# 512299) + +@DPATCH@ +--- screen-4.0.3.orig/attacher.c 2009-02-26 01:40:12.427283863 +0100 ++++ screen-4.0.3/attacher.c 2009-02-26 01:43:02.258234277 +0100 +@@ -579,7 +579,7 @@ + { + fcntl(0, F_SETFL, 0); + SetTTY(0, &attach_Mode); +- printf("\nSuddenly the Dungeon collapses!! - You die...\n"); ++ printf("\nError: Cannot find master process to attach to!\n"); + eexit(1); + } + #endif --- screen-4.0.3.orig/debian/patches/62-fix-term-length.dpatch +++ screen-4.0.3/debian/patches/62-fix-term-length.dpatch @@ -0,0 +1,34 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 62-fix-term-length.dpatch by Daniel Hahler +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: This patch is taken from the upstream bug tracker at +## DP: http://savannah.gnu.org/bugs/?30880#comment4 +## DP: Author: Dmitry V. Levin + +@DPATCH@ + +--- screen-4.0.3.orig/display.h ++++ screen-4.0.3/display.h +@@ -85,7 +85,7 @@ + struct win *d_fore; /* pointer to fore window */ + struct win *d_other; /* pointer to other window */ + int d_nonblock; /* -1 don't block if obufmax reached */ + /* >0: block after nonblock secs */ +- char d_termname[20 + 1]; /* $TERM */ ++ char d_termname[31 + 1]; /* $TERM */ + char *d_tentry; /* buffer for tgetstr */ + char d_tcinited; /* termcap inited flag */ +--- screen-4.0.3.orig/screen.h ++++ screen-4.0.3/screen.h +@@ -202,7 +202,7 @@ + char preselect[20]; + int esc; /* his new escape character unless -1 */ + int meta_esc; /* his new meta esc character unless -1 */ +- char envterm[20 + 1]; /* terminal type */ ++ char envterm[31 + 1]; /* terminal type */ + int encoding; /* encoding of display */ + } + attach; + char preselect[20]; + --- screen-4.0.3.orig/debian/patches/09CHERRY_f6b50e17.dpatch +++ screen-4.0.3/debian/patches/09CHERRY_f6b50e17.dpatch @@ -0,0 +1,25 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 09CHERRY_f6b50e17.dpatch +## +## DP: Cherry-pick commit f6b50e175bc39763c4660cc88d7f82e5811797de +## DP: (do not enforce the existence of a display, see #466072). + +@DPATCH@ +diff --git a/socket.c b/socket.c +index 09aa73d..4c32ed5 100644 +--- a/socket.c ++++ b/socket.c +@@ -1102,12 +1097,8 @@ ReceiveMsg() + * the window that issued the create message need not be an active + * window. Then we create the window without having a display. + * Resulting in another inactive window. +- * +- * Currently we enforce that at least one display exists. But why? +- * jw. + */ +- if (displays) +- ExecCreate(&m); ++ ExecCreate(&m); + break; + case MSG_CONT: + if (display && D_userpid != 0 && kill(D_userpid, 0) == 0) --- screen-4.0.3.orig/debian/patches/25allow_symlink_sockdir.dpatch +++ screen-4.0.3/debian/patches/25allow_symlink_sockdir.dpatch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 25allow_symlink_sockdir.dpatch by +## +## DP: I don't know why screen should not allow a symlinked SockDir; +## DP: so now it does. (Note: this is one of TWO calls to lstat() +## DP: the whole program has - and this one isn't even wrapped in +## DP: #ifdef HAVE_LSTAT as it should.) + +@DPATCH@ +diff -Naur screen-4.0.3.orig/screen.c screen-4.0.3/screen.c +--- screen-4.0.3.orig/screen.c 2008-06-01 23:44:59.000000000 +0200 ++++ screen-4.0.3/screen.c 2008-06-01 23:44:59.000000000 +0200 +@@ -989,7 +989,7 @@ + else + { + SockDir = SOCKDIR; +- if (lstat(SockDir, &st)) ++ if (stat(SockDir, &st)) + { + n = (eff_uid == 0 && (real_uid || eff_gid == real_gid)) ? 0755 : + (eff_gid != real_gid) ? 0775 : --- screen-4.0.3.orig/debian/patches/27doc_sty_noenvpassing.dpatch +++ screen-4.0.3/debian/patches/27doc_sty_noenvpassing.dpatch @@ -0,0 +1,34 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 27doc_sty_noenvpassing.dpatch by +## +## DP: Document the fact that when calling 'env=var screen app arg' from inside +## DP: screen the environment variable will go up in smoke. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/doc/screen.1 screen-4.0.3/doc/screen.1 +--- screen-4.0.3.orig/doc/screen.1 2008-06-01 23:44:58.000000000 +0200 ++++ screen-4.0.3/doc/screen.1 2008-06-01 23:45:00.000000000 +0200 +@@ -97,7 +97,9 @@ + manager (specified in the $STY environment variable) who will use it to + create the new window. + The above example would start the emacs editor (editing prog.c) and switch +-to its window. ++to its window. - Note that you cannot transport environment variables from ++the invoking shell to the application (emacs in this case), because it is ++forked from the parent screen process, not from the invoking shell. + .PP + If \*Q/var/run/utmp\*U is writable by + .IR screen , +diff -Naur screen-4.0.3.orig/doc/screen.texinfo screen-4.0.3/doc/screen.texinfo +--- screen-4.0.3.orig/doc/screen.texinfo 2008-06-01 23:44:58.000000000 +0200 ++++ screen-4.0.3/doc/screen.texinfo 2008-06-01 23:45:00.000000000 +0200 +@@ -175,6 +175,9 @@ + name and its arguments to the window manager (specified in the $STY environment + variable) who will use it to create the new window. The above example would + start the @code{emacs} editor (editing @file{prog.c}) and switch to its window. ++- Note that you cannot transport environment variables from ++the invoking shell to the application (emacs in this case), because it is ++forked from the parent screen process, not from the invoking shell. + + If @file{/var/run/utmp} is writable by @code{screen}, an appropriate record + will be written to this file for each window, and removed when the --- screen-4.0.3.orig/debian/patches/12kfreebsd_ctty.dpatch +++ screen-4.0.3/debian/patches/12kfreebsd_ctty.dpatch @@ -0,0 +1,30 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 12kfreebsd_ctty.dpatch by +## +## DP: See inline documentation. + +@DPATCH@ +--- screen-4.0.3.orig/tty.sh 2009-04-10 18:15:51.923805915 +0200 ++++ screen-4.0.3/tty.sh 2009-04-10 18:17:56.043804602 +0200 +@@ -801,18 +801,11 @@ + + mypid = getpid(); + +- /* The next lines should be obsolete. Can anybody check if they +- * are really needed on the BSD platforms? +- * +- * this is to avoid the message: +- * fgtty: Not a typewriter (25) ++ /* ++ * Under BSD we have to set the controlling terminal again explicitly. + */ +-# if defined(__osf__) || (BSD >= 199103) || defined(ISC) +- if (separate_sids) +- setsid(); /* should be already done */ +-# ifdef TIOCSCTTY ++# if defined(__FreeBSD_kernel__) && defined(TIOCSCTTY) + ioctl(fd, TIOCSCTTY, (char *)0); +-# endif + # endif + + # ifdef POSIX --- screen-4.0.3.orig/debian/patches/22exchange_file_mode.dpatch +++ screen-4.0.3/debian/patches/22exchange_file_mode.dpatch @@ -0,0 +1,38 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 22exchange_file_mode.dpatch by +## +## DP: Make it a bit harder to shoot oneself in the foot by +## DP: keeping the umask tight by default when creating the +## DP: screen exchange file. Fearless users may still chmod it. + +@DPATCH@ +--- screen-4.0.3.orig/fileio.c 2009-04-02 02:01:23.530568088 +0200 ++++ screen-4.0.3/fileio.c 2009-04-02 02:02:18.155521670 +0200 +@@ -367,11 +367,6 @@ + char *mode = "w"; + #ifdef COPY_PASTE + int public = 0; +-# ifdef _MODE_T +- mode_t old_umask; +-# else +- int old_umask; +-# endif + # ifdef HAVE_LSTAT + struct stat stb, stb2; + int fd, exists = 0; +@@ -434,7 +429,6 @@ + #ifdef COPY_PASTE + if (dump == DUMP_EXCHANGE && public) + { +- old_umask = umask(0); + # ifdef HAVE_LSTAT + if (exists) + { +@@ -455,7 +449,6 @@ + # else + f = fopen(fn, mode); + # endif +- umask(old_umask); + } + else + #endif /* COPY_PASTE */ --- screen-4.0.3.orig/debian/patches/03fully_expand_screenencodings.dpatch +++ screen-4.0.3/debian/patches/03fully_expand_screenencodings.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 03fully_expand_screenencodings.dpatch by +## +## DP: SCREENENCODINGS contains ${prefix} from $datadir, which needs +## DP: an extra expansion step. + +@DPATCH@ +diff -Naur screen-4.0.3.orig/configure.in screen-4.0.3/configure.in +--- screen-4.0.3.orig/configure.in 2008-06-01 23:40:01.000000000 +0200 ++++ screen-4.0.3/configure.in 2008-06-01 23:40:03.000000000 +0200 +@@ -1287,7 +1287,7 @@ + SCREENENCODINGS="\"/usr/local/lib/screen/utf8encodings\"" + if test -n "$datadir"; then + eval SCREENENCODINGS="$datadir/screen/utf8encodings" +-SCREENENCODINGS="\"$SCREENENCODINGS\"" ++eval SCREENENCODINGS="\\\"$SCREENENCODINGS\\\"" + fi + AC_MSG_CHECKING(for the utf8-encodings location) + AC_DEFINE_UNQUOTED(SCREENENCODINGS,$SCREENENCODINGS)