diff options
author | jnweiger <jnweiger> | 2005-12-16 18:41:15 +0000 |
---|---|---|
committer | jnweiger <jnweiger> | 2005-12-16 18:41:15 +0000 |
commit | f78f9e82605ea683021b074c23524c5c4d3d7aea (patch) | |
tree | f6e071cbf6c24d668a0b5ba35f8efe7848a21076 | |
parent | b3e7420c1fe103e5a3d71c3b74cf0843bee23317 (diff) | |
download | screen-f78f9e82605ea683021b074c23524c5c4d3d7aea.tar.gz |
old version screen-3.9.15 Mar 13 2003
49 files changed, 5210 insertions, 2045 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index 652b75e..31a3cd7 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -248,7 +248,7 @@ mdepend: $(CFILES) term.h echo `echo "$$i" | sed -e 's/.c$$/.o/'`": $$i" `\ cc -E $$i |\ grep '^# .*"\./.*\.h"' |\ - sort -t'"' -u +1 -2 |\ + (sort -t'"' -u -k 2,2 2>/dev/null || sort -t'"' -u +1 -2) |\ sed -e 's/.*"\.\/\(.*\)".*/\1/'\ ` >> DEPEND ; \ done @@ -1,4 +1,27 @@ ------------------------------- + What's new in screen-3.9.15 ? + ------------------------------- + +* unicode combining character support + +* new encoding: chinese GBK + +* new 'backtick' command and string escape to embed command + output into e.g. the hardstatus line + + + ------------------------------- + What's new in screen-3.9.13 ? + ------------------------------- + +* altscreen support from Gurusamy Sarathy + +* new command "maxwin" to set a limit on the number of windows + +* new keys in copy&paste mode: 'B' and 'E' + + + ------------------------------- What's new in screen-3.9.11 ? ------------------------------- @@ -5,3 +5,4 @@ - nonblock? - type into several windows at once (for cluster admins) - configurable digraph table +- command line options should overwrite config files. @@ -61,6 +61,7 @@ static int rows, cols; /* window size of the curr window */ int visual_bell = 0; int use_hardstatus = 1; /* display status line in hs */ char *printcmd = 0; +int use_altscreen = 0; /* enable alternate screen support? */ unsigned char *blank; /* line filled with spaces */ unsigned char *null; /* line filled with '\0' */ @@ -669,15 +670,74 @@ register int len; #ifdef FONT # ifdef DW_CHARS if (!curr->w_mbcs) + { +# endif + if (c < 0x80 || curr->w_gr == 0) + curr->w_rend.font = curr->w_FontL; +# ifdef ENCODINGS + else if (curr->w_gr == 2 && !curr->w_ss) + curr->w_rend.font = curr->w_FontE; +# endif + else + curr->w_rend.font = curr->w_FontR; +# ifdef DW_CHARS + } # endif - curr->w_rend.font = (c >= 0x80 ? curr->w_FontR : curr->w_FontL); # ifdef UTF8 if (curr->w_encoding == UTF8) - curr->w_rend.font = 0; + { + if (curr->w_rend.font == '0') + { + struct mchar mc, *mcp; + + debug1("SPECIAL %x\n", c); + mc.image = c; + mc.mbcs = 0; + mc.font = '0'; + mcp = recode_mchar(&mc, 0, UTF8); + debug2("%02x %02x\n", mcp->image, mcp->font); + c = mcp->image | mcp->font << 8; + } + curr->w_rend.font = 0; + } # ifdef DW_CHARS - if (curr->w_encoding == UTF8 && utf8_isdouble(c)) + if (curr->w_encoding == UTF8 && c >= 0x1100 && utf8_isdouble(c)) curr->w_mbcs = 0xff; # endif + if (curr->w_encoding == UTF8 && c >= 0x0300 && utf8_iscomb(c)) + { + int ox, oy; + struct mchar omc; + + ox = curr->w_x - 1; + oy = curr->w_y; + if (ox < 0) + { + ox = curr->w_width - 1; + oy--; + } + if (oy < 0) + oy = 0; + copy_mline2mchar(&omc, &curr->w_mlines[oy], ox); + if (omc.image == 0xff && omc.font == 0xff) + { + ox--; + if (ox >= 0) + { + copy_mline2mchar(&omc, &curr->w_mlines[oy], ox); + omc.mbcs = 0xff; + } + } + if (ox >= 0) + { + utf8_handle_comb(c, &omc); + MFixLine(curr, oy, &omc); + copy_mchar2mline(&omc, &curr->w_mlines[oy], ox); + LPutChar(&curr->w_layer, &omc, ox, oy); + LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); + } + break; + } font = curr->w_rend.font; # endif # ifdef DW_CHARS @@ -694,6 +754,8 @@ register int len; } } # endif + if (font == 031 && c == 0x80) + font = curr->w_rend.font = 0; if (is_dw_font(font) && c == ' ') font = curr->w_rend.font = 0; if (is_dw_font(font) || curr->w_mbcs) @@ -746,7 +808,7 @@ register int len; debug2("SJIS after %x %x\n", c, t); } # endif - if (t && curr->w_gr && font != 030) + if (t && curr->w_gr && font != 030 && font != 031) { t &= 0x7f; if (t < ' ') @@ -769,7 +831,12 @@ register int len; else if (curr->w_gr) # endif { - c &= 0x7f; +#ifdef ENCODINGS + if (c == 0x80 && font == 0 && curr->w_encoding == GBK) + c = 0xa4; + else +#endif + c &= 0x7f; if (c < ' ') /* this is ugly but kanji support */ goto tryagain; /* prevents nicer programming */ } @@ -1334,10 +1401,28 @@ int c, intermediate; /* case 40: 132 col enable */ /* case 42: NRCM: 7bit NRC character mode */ /* case 44: margin bell enable */ + case 47: /* xterm-like alternate screen */ + case 1047: /* xterm-like alternate screen */ + case 1049: /* xterm-like alternate screen */ + if (use_altscreen) + { + if (i) + EnterAltScreen(curr); + else + LeaveAltScreen(curr); + if (a1 == 47 && !i) + curr->w_saved = 0; + LRefreshAll(&curr->w_layer, 0); + LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); + } + break; /* case 66: NKM: Numeric keypad appl mode */ /* case 68: KBUM: Keyboard usage mode (data process) */ case 1000: /* VT200 mouse tracking */ - curr->w_mouse = i ? 1000 : 0; + case 1001: /* VT200 highlight mouse */ + case 1002: /* button event mouse*/ + case 1003: /* any event mouse*/ + curr->w_mouse = i ? a1 : 0; LMouseMode(&curr->w_layer, curr->w_mouse); break; } @@ -2097,10 +2182,18 @@ struct win *p; char *s; int l; { - if (l > 20) - l = 20; - strncpy(p->w_akachange, s, l); - p->w_akachange[l] = 0; + int i, c; + + for (i = 0; i < 20 && l > 0; l--) + { + c = (unsigned char)*s++; + if (c == 0) + break; + if (c < 32 || c == 127 || (c >= 128 && c < 160 && p->w_c1)) + continue; + p->w_akachange[i++] = c; + } + p->w_akachange[i] = 0; p->w_title = p->w_akachange; if (p->w_akachange != p->w_akabuf) if (p->w_akachange[0] == 0 || p->w_akachange[-1] == ':') @@ -127,6 +127,7 @@ enum move_t { #define BIG5 5 #define KOI8R 6 #define CP1251 7 +#define GBK 20 #define EUC EUC_JP @@ -167,4 +168,3 @@ enum move_t { # define dw_left(ml, x, enc) 0 # define dw_right(ml, x, enc) 0 #endif - diff --git a/src/attacher.c b/src/attacher.c index ff12ba8..93f298c 100644 --- a/src/attacher.c +++ b/src/attacher.c @@ -810,7 +810,7 @@ screen_builtin_lck() pam_handle_t *pamh = 0; int pam_error; #else - char *pass, mypass[9]; + char *pass, mypass[16 + 1], salt[3]; #endif #ifndef USE_PAM @@ -819,8 +819,8 @@ screen_builtin_lck() { if ((pass = getpass("Key: "))) { - strncpy(mypass, pass, 8); - mypass[8] = 0; + strncpy(mypass, pass, sizeof(mypass) - 1); + mypass[sizeof(mypass) - 1] = 0; if (*mypass == 0) return; if ((pass = getpass("Again: "))) @@ -839,7 +839,12 @@ screen_builtin_lck() sleep(2); return; } - pass = 0; + + salt[0] = 'A' + (int)(time(0) % 26); + salt[1] = 'A' + (int)((time(0) >> 6) % 26); + salt[2] = 0; + pass = crypt(mypass, salt); + pass = ppp->pw_passwd = SaveStr(pass); } #endif @@ -881,16 +886,8 @@ screen_builtin_lck() if (pam_error == PAM_SUCCESS) break; #else - if (pass) - { - if (!strncmp(crypt(cp1, pass), pass, strlen(pass))) - break; - } - else - { - if (!strcmp(cp1, mypass)) - break; - } + if (!strncmp(crypt(cp1, pass), pass, strlen(pass))) + break; #endif debug("screen_builtin_lck: NO!!!!!\n"); bzero(cp1, strlen(cp1)); diff --git a/src/braille.c b/src/braille.c index 56ecc52..d13ea45 100644 --- a/src/braille.c +++ b/src/braille.c @@ -229,17 +229,23 @@ char *tablename; FILE *fp; char buffer[80], a[10]; - if ((fp = fopen(tablename, "r")) == 0) + if ((fp = secfopen(tablename, "r")) == 0) { - Msg(0, "Braille table not found: %s ", tablename); + Msg(errno, "Braille table not found: %s ", tablename); return -1; } bzero(bd.bd_btable, 256); + /* format: + * Dec Hex Braille Description + * 7 07 (12-45--8) BEL + */ while (fgets(buffer, sizeof(buffer), fp)) { if (buffer[0] == '#') continue; - sscanf(buffer,"%d %x %s", &i, &j, a); + sscanf(buffer,"%d %x %8s", &i, &j, a); + if (i < 0 || i > 255) + continue; for (j=1, p=1, c=0; j<9; j++, p*=2) if (a[j] == '0' + j) c += p; @@ -55,6 +55,7 @@ struct comm comms[RC_LAST + 1] = { "addacl", ARGS_1234 }, #endif { "allpartial", NEED_DISPLAY|ARGS_1 }, + { "altscreen", ARGS_01 }, { "at", NEED_DISPLAY|ARGS_2|ARGS_ORMORE }, #ifdef COLOR { "attrcolor", ARGS_12 }, @@ -63,6 +64,7 @@ struct comm comms[RC_LAST + 1] = #ifdef AUTO_NUKE { "autonuke", NEED_DISPLAY|ARGS_1 }, #endif + { "backtick", ARGS_1|ARGS_ORMORE }, #ifdef COLOR { "bce", NEED_FORE|ARGS_01 }, #endif @@ -213,6 +215,7 @@ struct comm comms[RC_LAST + 1] = #ifdef COPY_PASTE { "markkeys", ARGS_1 }, #endif + { "maxwin", ARGS_1 }, { "meta", NEED_LAYER|ARGS_0 }, { "monitor", NEED_FORE|ARGS_01 }, { "msgminwait", ARGS_1 }, diff --git a/src/comm.h.dist b/src/comm.h.dist index 3ddd8e4..f6c4e7e 100644 --- a/src/comm.h.dist +++ b/src/comm.h.dist @@ -55,164 +55,167 @@ struct action #define RC_ACTIVITY 5 #define RC_ADDACL 6 #define RC_ALLPARTIAL 7 -#define RC_AT 8 -#define RC_ATTRCOLOR 9 -#define RC_AUTODETACH 10 -#define RC_AUTONUKE 11 -#define RC_BCE 12 -#define RC_BELL 13 -#define RC_BELL_MSG 14 -#define RC_BIND 15 -#define RC_BINDKEY 16 -#define RC_BREAK 17 -#define RC_BREAKTYPE 18 -#define RC_BUFFERFILE 19 -#define RC_C1 20 -#define RC_CAPTION 21 -#define RC_CHACL 22 -#define RC_CHARSET 23 -#define RC_CHDIR 24 -#define RC_CLEAR 25 -#define RC_COLON 26 -#define RC_COMMAND 27 -#define RC_COMPACTHIST 28 -#define RC_CONSOLE 29 -#define RC_COPY 30 -#define RC_CRLF 31 -#define RC_DEBUG 32 -#define RC_DEFAUTONUKE 33 -#define RC_DEFBCE 34 -#define RC_DEFBREAKTYPE 35 -#define RC_DEFC1 36 -#define RC_DEFCHARSET 37 -#define RC_DEFENCODING 38 -#define RC_DEFESCAPE 39 -#define RC_DEFFLOW 40 -#define RC_DEFGR 41 -#define RC_DEFHSTATUS 42 -#define RC_DEFKANJI 43 -#define RC_DEFLOG 44 -#define RC_DEFLOGIN 45 -#define RC_DEFMODE 46 -#define RC_DEFMONITOR 47 -#define RC_DEFOBUFLIMIT 48 -#define RC_DEFSCROLLBACK 49 -#define RC_DEFSHELL 50 -#define RC_DEFSILENCE 51 -#define RC_DEFSLOWPASTE 52 -#define RC_DEFUTF8 53 -#define RC_DEFWRAP 54 -#define RC_DEFWRITELOCK 55 -#define RC_DETACH 56 -#define RC_DIGRAPH 57 -#define RC_DINFO 58 -#define RC_DISPLAYS 59 -#define RC_DUMPTERMCAP 60 -#define RC_ECHO 61 -#define RC_ENCODING 62 -#define RC_ESCAPE 63 -#define RC_EVAL 64 -#define RC_EXEC 65 -#define RC_FIT 66 -#define RC_FLOW 67 -#define RC_FOCUS 68 -#define RC_GR 69 -#define RC_HARDCOPY 70 -#define RC_HARDCOPY_APPEND 71 -#define RC_HARDCOPYDIR 72 -#define RC_HARDSTATUS 73 -#define RC_HEIGHT 74 -#define RC_HELP 75 -#define RC_HISTORY 76 -#define RC_HSTATUS 77 -#define RC_IGNORECASE 78 -#define RC_INFO 79 -#define RC_KANJI 80 -#define RC_KILL 81 -#define RC_LASTMSG 82 -#define RC_LICENSE 83 -#define RC_LOCKSCREEN 84 -#define RC_LOG 85 -#define RC_LOGFILE 86 -#define RC_LOGIN 87 -#define RC_LOGTSTAMP 88 -#define RC_MAPDEFAULT 89 -#define RC_MAPNOTNEXT 90 -#define RC_MAPTIMEOUT 91 -#define RC_MARKKEYS 92 -#define RC_META 93 -#define RC_MONITOR 94 -#define RC_MSGMINWAIT 95 -#define RC_MSGWAIT 96 -#define RC_MULTIUSER 97 -#define RC_NETHACK 98 -#define RC_NEXT 99 -#define RC_NONBLOCK 100 -#define RC_NUMBER 101 -#define RC_OBUFLIMIT 102 -#define RC_ONLY 103 -#define RC_OTHER 104 -#define RC_PARTIAL 105 -#define RC_PASSWORD 106 -#define RC_PASTE 107 -#define RC_PASTEFONT 108 -#define RC_POW_BREAK 109 -#define RC_POW_DETACH 110 -#define RC_POW_DETACH_MSG 111 -#define RC_PREV 112 -#define RC_PRINTCMD 113 -#define RC_PROCESS 114 -#define RC_QUIT 115 -#define RC_READBUF 116 -#define RC_READREG 117 -#define RC_REDISPLAY 118 -#define RC_REGISTER 119 -#define RC_REMOVE 120 -#define RC_REMOVEBUF 121 -#define RC_RESET 122 -#define RC_RESIZE 123 -#define RC_SCREEN 124 -#define RC_SCROLLBACK 125 -#define RC_SELECT 126 -#define RC_SESSIONNAME 127 -#define RC_SETENV 128 -#define RC_SETSID 129 -#define RC_SHELL 130 -#define RC_SHELLTITLE 131 -#define RC_SILENCE 132 -#define RC_SILENCEWAIT 133 -#define RC_SLEEP 134 -#define RC_SLOWPASTE 135 -#define RC_SORENDITION 136 -#define RC_SOURCE 137 -#define RC_SPLIT 138 -#define RC_STARTUP_MESSAGE 139 -#define RC_STUFF 140 -#define RC_SU 141 -#define RC_SUSPEND 142 -#define RC_TERM 143 -#define RC_TERMCAP 144 -#define RC_TERMCAPINFO 145 -#define RC_TERMINFO 146 -#define RC_TIME 147 -#define RC_TITLE 148 -#define RC_UMASK 149 -#define RC_UNSETENV 150 -#define RC_UTF8 151 -#define RC_VBELL 152 -#define RC_VBELL_MSG 153 -#define RC_VBELLWAIT 154 -#define RC_VERBOSE 155 -#define RC_VERSION 156 -#define RC_WALL 157 -#define RC_WIDTH 158 -#define RC_WINDOWLIST 159 -#define RC_WINDOWS 160 -#define RC_WRAP 161 -#define RC_WRITEBUF 162 -#define RC_WRITELOCK 163 -#define RC_XOFF 164 -#define RC_XON 165 -#define RC_ZOMBIE 166 +#define RC_ALTSCREEN 8 +#define RC_AT 9 +#define RC_ATTRCOLOR 10 +#define RC_AUTODETACH 11 +#define RC_AUTONUKE 12 +#define RC_BACKTICK 13 +#define RC_BCE 14 +#define RC_BELL 15 +#define RC_BELL_MSG 16 +#define RC_BIND 17 +#define RC_BINDKEY 18 +#define RC_BREAK 19 +#define RC_BREAKTYPE 20 +#define RC_BUFFERFILE 21 +#define RC_C1 22 +#define RC_CAPTION 23 +#define RC_CHACL 24 +#define RC_CHARSET 25 +#define RC_CHDIR 26 +#define RC_CLEAR 27 +#define RC_COLON 28 +#define RC_COMMAND 29 +#define RC_COMPACTHIST 30 +#define RC_CONSOLE 31 +#define RC_COPY 32 +#define RC_CRLF 33 +#define RC_DEBUG 34 +#define RC_DEFAUTONUKE 35 +#define RC_DEFBCE 36 +#define RC_DEFBREAKTYPE 37 +#define RC_DEFC1 38 +#define RC_DEFCHARSET 39 +#define RC_DEFENCODING 40 +#define RC_DEFESCAPE 41 +#define RC_DEFFLOW 42 +#define RC_DEFGR 43 +#define RC_DEFHSTATUS 44 +#define RC_DEFKANJI 45 +#define RC_DEFLOG 46 +#define RC_DEFLOGIN 47 +#define RC_DEFMODE 48 +#define RC_DEFMONITOR 49 +#define RC_DEFOBUFLIMIT 50 +#define RC_DEFSCROLLBACK 51 +#define RC_DEFSHELL 52 +#define RC_DEFSILENCE 53 +#define RC_DEFSLOWPASTE 54 +#define RC_DEFUTF8 55 +#define RC_DEFWRAP 56 +#define RC_DEFWRITELOCK 57 +#define RC_DETACH 58 +#define RC_DIGRAPH 59 +#define RC_DINFO 60 +#define RC_DISPLAYS 61 +#define RC_DUMPTERMCAP 62 +#define RC_ECHO 63 +#define RC_ENCODING 64 +#define RC_ESCAPE 65 +#define RC_EVAL 66 +#define RC_EXEC 67 +#define RC_FIT 68 +#define RC_FLOW 69 +#define RC_FOCUS 70 +#define RC_GR 71 +#define RC_HARDCOPY 72 +#define RC_HARDCOPY_APPEND 73 +#define RC_HARDCOPYDIR 74 +#define RC_HARDSTATUS 75 +#define RC_HEIGHT 76 +#define RC_HELP 77 +#define RC_HISTORY 78 +#define RC_HSTATUS 79 +#define RC_IGNORECASE 80 +#define RC_INFO 81 +#define RC_KANJI 82 +#define RC_KILL 83 +#define RC_LASTMSG 84 +#define RC_LICENSE 85 +#define RC_LOCKSCREEN 86 +#define RC_LOG 87 +#define RC_LOGFILE 88 +#define RC_LOGIN 89 +#define RC_LOGTSTAMP 90 +#define RC_MAPDEFAULT 91 +#define RC_MAPNOTNEXT 92 +#define RC_MAPTIMEOUT 93 +#define RC_MARKKEYS 94 +#define RC_MAXWIN 95 +#define RC_META 96 +#define RC_MONITOR 97 +#define RC_MSGMINWAIT 98 +#define RC_MSGWAIT 99 +#define RC_MULTIUSER 100 +#define RC_NETHACK 101 +#define RC_NEXT 102 +#define RC_NONBLOCK 103 +#define RC_NUMBER 104 +#define RC_OBUFLIMIT 105 +#define RC_ONLY 106 +#define RC_OTHER 107 +#define RC_PARTIAL 108 +#define RC_PASSWORD 109 +#define RC_PASTE 110 +#define RC_PASTEFONT 111 +#define RC_POW_BREAK 112 +#define RC_POW_DETACH 113 +#define RC_POW_DETACH_MSG 114 +#define RC_PREV 115 +#define RC_PRINTCMD 116 +#define RC_PROCESS 117 +#define RC_QUIT 118 +#define RC_READBUF 119 +#define RC_READREG 120 +#define RC_REDISPLAY 121 +#define RC_REGISTER 122 +#define RC_REMOVE 123 +#define RC_REMOVEBUF 124 +#define RC_RESET 125 +#define RC_RESIZE 126 +#define RC_SCREEN 127 +#define RC_SCROLLBACK 128 +#define RC_SELECT 129 +#define RC_SESSIONNAME 130 +#define RC_SETENV 131 +#define RC_SETSID 132 +#define RC_SHELL 133 +#define RC_SHELLTITLE 134 +#define RC_SILENCE 135 +#define RC_SILENCEWAIT 136 +#define RC_SLEEP 137 +#define RC_SLOWPASTE 138 +#define RC_SORENDITION 139 +#define RC_SOURCE 140 +#define RC_SPLIT 141 +#define RC_STARTUP_MESSAGE 142 +#define RC_STUFF 143 +#define RC_SU 144 +#define RC_SUSPEND 145 +#define RC_TERM 146 +#define RC_TERMCAP 147 +#define RC_TERMCAPINFO 148 +#define RC_TERMINFO 149 +#define RC_TIME 150 +#define RC_TITLE 151 +#define RC_UMASK 152 +#define RC_UNSETENV 153 +#define RC_UTF8 154 +#define RC_VBELL 155 +#define RC_VBELL_MSG 156 +#define RC_VBELLWAIT 157 +#define RC_VERBOSE 158 +#define RC_VERSION 159 +#define RC_WALL 160 +#define RC_WIDTH 161 +#define RC_WINDOWLIST 162 +#define RC_WINDOWS 163 +#define RC_WRAP 164 +#define RC_WRITEBUF 165 +#define RC_WRITELOCK 166 +#define RC_XOFF 167 +#define RC_XON 168 +#define RC_ZOMBIE 169 -#define RC_LAST 166 +#define RC_LAST 169 diff --git a/src/config.h.in b/src/config.h.in index a18844c..2bd04dc 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -99,9 +99,13 @@ * tty to be in "your" group. * Note, screen is unable to change mode or group of the pty if it * is not installed with sufficient privilege. (e.g. set-uid-root) + * define PTYROFS if the /dev/pty devices are mounted on a read-only + * filesystem so screen should not even attempt to set mode or group + * even if running as root (e.g. on TiVo). */ #undef PTYMODE #undef PTYGROUP +#undef PTYROFS /* * If screen is NOT installed set-uid root, screen can provide tty @@ -181,6 +185,8 @@ * If you have a braille display you should define HAVE_BRAILLE. * The code inside #ifdef HAVE_BRAILLE was contributed by Hadi Bargi * Rangin (bargi@dots.physics.orst.edu). + * WARNING: this is more or less unsupported code, it may be full of + * bugs leading to security holes, enable at your own risk! */ #undef HAVE_BRAILLE @@ -290,6 +296,13 @@ */ #undef USE_PAM +/* + * Define CHECK_SCREEN_W if you want screen to set TERM to screen-w + * if the terminal width is greater than 131 columns. No longer needed + * on modern systems which use $COLUMNS or the tty settings instead. + */ +#undef CHECK_SCREEN_W + /********************************************************************** * * End of User Configuration Section @@ -622,6 +635,11 @@ */ #undef HAVE_GETPT +/* + * define HAVE_OPENPTY if your system has the openpty() call. + */ +#undef HAVE_OPENPTY + /* * define PTYRANGE0 and or PTYRANGE1 if you want to adapt screen * to unusual environments. E.g. For SunOs the defaults are "qpr" and diff --git a/src/configure b/src/configure index 7426457..d1a6abb 100755 --- a/src/configure +++ b/src/configure @@ -1,25 +1,23 @@ #! /bin/sh # From configure.in Revision: 1.18 . # Guess values for system-dependent variables and create Makefiles. -# Generated by Autoconf 2.52. +# Generated by GNU Autoconf 2.53. # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -# 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 +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi -# Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -# 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" +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -29,8 +27,165 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +# NLS nuisances. +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && + { $as_unset LANG || test "${LANG+set}" != set; } || + { LANG=C; export LANG; } +(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && + { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || + { LC_ALL=C; export LC_ALL; } +(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && + { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || + { LC_TIME=C; export LC_TIME; } +(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && + { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || + { LC_CTYPE=C; export LC_CTYPE; } +(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && + { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || + { LANGUAGE=C; export LANGUAGE; } +(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && + { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || + { LC_COLLATE=C; export LC_COLLATE; } +(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && + { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || + { LC_NUMERIC=C; export LC_NUMERIC; } +(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && + { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || + { LC_MESSAGES=C; export LC_MESSAGES; } + + # Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` +as_me=`(basename "$0") 2>/dev/null || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr @@ -58,22 +213,12 @@ rm -f conf$$ conf$$.exe conf$$.file as_executable_p="test -f" -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi +# 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" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } # IFS # We need space, tab and new line, in precisely that order. @@ -82,7 +227,8 @@ as_nl=' IFS=" $as_nl" # CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } + # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -97,7 +243,8 @@ exec 6>&1 ac_default_prefix=/usr/local cross_compiling=no subdirs= -MFLAGS= MAKEFLAGS= +MFLAGS= +MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. @@ -105,7 +252,51 @@ SHELL=${CONFIG_SHELL-/bin/sh} # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + ac_unique_file="screen.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include <stdio.h> +#if HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#if HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#if STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# if HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include <memory.h> +# endif +# include <string.h> +#endif +#if HAVE_STRINGS_H +# include <strings.h> +#endif +#if HAVE_INTTYPES_H +# include <inttypes.h> +#else +# if HAVE_STDINT_H +# include <stdint.h> +# endif +#endif +#if HAVE_UNISTD_H +# include <unistd.h> +#endif" + # Initialize some variables set by options. ac_init_help= @@ -145,13 +336,6 @@ oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - ac_prev= for ac_option do @@ -284,7 +468,7 @@ do with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -463,7 +647,7 @@ do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done @@ -475,18 +659,19 @@ do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. +# FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias -# FIXME: should be removed in autoconf 3.0. +# FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe @@ -502,13 +687,23 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. @@ -518,10 +713,10 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 + { 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 in $srcdir" >&2 + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi @@ -565,7 +760,7 @@ ac_cv_env_CPP_value=$CPP if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. - cat <<EOF + cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -586,9 +781,9 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -EOF +_ACEOF - cat <<EOF + cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -615,15 +810,15 @@ Fine tuning of the installation directories: --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] -EOF +_ACEOF - cat <<\EOF -EOF + cat <<\_ACEOF +_ACEOF fi if test -n "$ac_init_help"; then - cat <<\EOF + cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) @@ -639,6 +834,8 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-socket-dir=path where to put the per-user sockets + --with-pty-mode=mode default mode for ptys + --with-pty-group=group default group for ptys --with-sys-screenrc=path where to put the global screenrc file Some influential environment variables: @@ -653,40 +850,60 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -EOF +_ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` - for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue - cd $ac_subdir - # A "../" for each directory in /$ac_subdir. - ac_dots=`echo $ac_subdir | - sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` - - case $srcdir in - .) # No --srcdir option. We are building in place. - ac_sub_srcdir=$srcdir ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_sub_srcdir=$srcdir/$ac_subdir ;; - *) # Relative path. - ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; - esac + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# 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_sub_srcdir/configure.gnu; then + if test -f $ac_srcdir/configure.gnu; then echo - $SHELL $ac_sub_srcdir/configure.gnu --help=recursive - elif test -f $ac_sub_srcdir/configure; then + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then echo - $SHELL $ac_sub_srcdir/configure --help=recursive - elif test -f $ac_sub_srcdir/configure.ac || - test -f $ac_sub_srcdir/configure.in; then + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then echo $ac_configure --help else - echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done @@ -694,31 +911,31 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then - cat <<\EOF + cat <<\_ACEOF -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -EOF +_ACEOF exit 0 fi exec 5>config.log -cat >&5 <<EOF +cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.52. Invocation command line was +generated by GNU Autoconf 2.53. Invocation command line was $ $0 $@ -EOF +_ACEOF { cat <<_ASUNAME -## ---------- ## -## Platform. ## -## ---------- ## +## --------- ## +## Platform. ## +## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` @@ -737,17 +954,27 @@ hostinfo = `(hostinfo) 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` -PATH = $PATH - _ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + } >&5 -cat >&5 <<EOF -## ------------ ## -## Core tests. ## -## ------------ ## +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF -EOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. @@ -758,15 +985,17 @@ for ac_arg do case $ac_arg in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; + | --no-cr | --no-c | -n ) continue ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - ac_sep=" " ;; - *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" - ac_sep=" " ;; + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + ac_sep=" " ;; esac # Get rid of the leading space. done @@ -774,14 +1003,19 @@ done # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. - echo >&5 - echo "## ----------------- ##" >&5 - echo "## Cache variables. ##" >&5 - echo "## ----------------- ##" >&5 - echo >&5 - # The following way of writing the cache mishandles newlines in values, + { + echo + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in @@ -795,21 +1029,24 @@ trap 'exit_status=$? "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; -} >&5 - sed "/^$/d" confdefs.h >conftest.log - if test -s conftest.log; then - echo >&5 - echo "## ------------ ##" >&5 - echo "## confdefs.h. ##" >&5 - echo "## ------------ ##" >&5 - echo >&5 - cat conftest.log >&5 - fi - (echo; echo) >&5 - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" >&5 - echo "$as_me: exit $exit_status" >&5 - rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && +} + echo + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" 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 && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do @@ -822,6 +1059,33 @@ rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then @@ -833,9 +1097,9 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:836: loading site script $ac_site_file" >&5 + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} - cat "$ac_site_file" >&5 + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done @@ -844,7 +1108,7 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:847: loading cache $cache_file" >&5 + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; @@ -852,7 +1116,7 @@ echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { echo "$as_me:855: creating cache $cache_file" >&5 + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -868,42 +1132,42 @@ for ac_var in `(set) 2>&1 | eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:871: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:875: error: \`$ac_var' was not set in the previous run" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:881: 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:883: 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:885: 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=: fi;; esac - # Pass precious variables to config.status. It doesn't matter if - # we pass some twice (in addition to the command line arguments). + # 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_configure_args="$ac_configure_args '$ac_arg'" - ;; - *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" - ;; + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:904: error: changes in the environment can compromise the build" >&5 + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:906: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -914,87 +1178,90 @@ 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 -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac -echo "#! $SHELL" >conftest.sh -echo "exit 0" >>conftest.sh -chmod +x conftest.sh -if { (echo "$as_me:926: PATH=\".;.\"; conftest.sh") >&5 - (PATH=".;."; conftest.sh) 2>&5 - ac_status=$? - echo "$as_me:929: \$? = $ac_status" >&5 - (exit $ac_status); }; then - ac_path_separator=';' -else - ac_path_separator=: -fi -PATH_SEPARATOR="$ac_path_separator" -rm -f conftest.sh + + + + + + + + + + + + + + + + ac_config_headers="$ac_config_headers config.h" + + rev=`sed < ${srcdir}/patchlevel.h -n -e '/#define REV/s/#define REV *//p'` vers=`sed < ${srcdir}/patchlevel.h -n -e '/#define VERS/s/#define VERS *//p'` pat=`sed < ${srcdir}/patchlevel.h -n -e '/#define PATCHLEVEL/s/#define PATCHLEVEL *//p'` VERSION="$rev.$vers.$pat" echo "this is screen version $VERSION" 1>&6 + if test "x$prefix" = xNONE; then 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:950: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_SCREEN+set}" = set; then +if test "${ac_cv_path_ac_prefix_program+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $SCREEN in + case $ac_prefix_program in [\\/]* | ?:[\\/]*) - ac_cv_path_SCREEN="$SCREEN" # Let the user override the test with a path. + ac_cv_path_ac_prefix_program="$ac_prefix_program" # Let the user override the test with a path. ;; *) - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_SCREEN="$ac_dir/$ac_word" - echo "$as_me:967: found $ac_dir/$ac_word" >&5 - break -fi + 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_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 ;; esac fi -SCREEN=$ac_cv_path_SCREEN +ac_prefix_program=$ac_cv_path_ac_prefix_program -if test -n "$SCREEN"; then - echo "$as_me:978: result: $SCREEN" >&5 -echo "${ECHO_T}$SCREEN" >&6 +if test -n "$ac_prefix_program"; then + echo "$as_me:$LINENO: result: $ac_prefix_program" >&5 +echo "${ECHO_T}$ac_prefix_program" >&6 else - echo "$as_me:981: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi - if test -n "$ac_cv_path_SCREEN"; then - prefix=`$as_expr X"$ac_cv_path_SCREEN" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_cv_path_SCREEN" : 'X\(//\)[^/]' \| \ - X"$ac_cv_path_SCREEN" : 'X\(//\)$' \| \ - X"$ac_cv_path_SCREEN" : 'X\(/\)' \| \ + if test -n $ac_prefix_program; then + prefix=`(dirname "$ac_prefix_program") 2>/dev/null || +$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 || -echo X"$ac_cv_path_SCREEN" | +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=`$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + prefix=`(dirname "$prefix") 2>/dev/null || +$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$prefix" : 'X\(//\)[^/]' \| \ X"$prefix" : 'X\(//\)$' \| \ X"$prefix" : 'X\(/\)' \| \ @@ -1012,54 +1279,58 @@ if test "x$prefix" = xNONE; then 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:1015: checking for $ac_word" >&5 +echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_GZIP+set}" = set; then +if test "${ac_cv_path_ac_prefix_program+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $GZIP in + case $ac_prefix_program in [\\/]* | ?:[\\/]*) - ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path. + ac_cv_path_ac_prefix_program="$ac_prefix_program" # Let the user override the test with a path. ;; *) - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_GZIP="$ac_dir/$ac_word" - echo "$as_me:1032: found $ac_dir/$ac_word" >&5 - break -fi + 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_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 ;; esac fi -GZIP=$ac_cv_path_GZIP +ac_prefix_program=$ac_cv_path_ac_prefix_program -if test -n "$GZIP"; then - echo "$as_me:1043: result: $GZIP" >&5 -echo "${ECHO_T}$GZIP" >&6 +if test -n "$ac_prefix_program"; then + echo "$as_me:$LINENO: result: $ac_prefix_program" >&5 +echo "${ECHO_T}$ac_prefix_program" >&6 else - echo "$as_me:1046: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi - if test -n "$ac_cv_path_GZIP"; then - prefix=`$as_expr X"$ac_cv_path_GZIP" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_cv_path_GZIP" : 'X\(//\)[^/]' \| \ - X"$ac_cv_path_GZIP" : 'X\(//\)$' \| \ - X"$ac_cv_path_GZIP" : 'X\(/\)' \| \ + if test -n $ac_prefix_program; then + prefix=`(dirname "$ac_prefix_program") 2>/dev/null || +$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 || -echo X"$ac_cv_path_GZIP" | +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=`$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + prefix=`(dirname "$prefix") 2>/dev/null || +$as_expr X"$prefix" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$prefix" : 'X\(//\)[^/]' \| \ X"$prefix" : 'X\(//\)$' \| \ X"$prefix" : 'X\(/\)' \| \ @@ -1073,6 +1344,7 @@ echo X"$prefix" | fi fi + old_CFLAGS="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1082,7 +1354,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:1085: checking for $ac_word" >&5 +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 @@ -1090,25 +1362,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}gcc" -echo "$as_me:1100: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1108: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1111: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1117,7 +1392,7 @@ 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:1120: checking for $ac_word" >&5 +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 @@ -1125,25 +1400,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="gcc" -echo "$as_me:1135: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1143: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1146: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1156,7 +1434,7 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:1159: checking for $ac_word" >&5 +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 @@ -1164,25 +1442,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="${ac_tool_prefix}cc" -echo "$as_me:1174: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1182: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1185: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1191,7 +1472,7 @@ 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:1194: checking for $ac_word" >&5 +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 @@ -1199,25 +1480,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="cc" -echo "$as_me:1209: found $ac_dir/$ac_word" >&5 -break +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:1217: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1220: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1230,7 +1514,7 @@ 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:1233: checking for $ac_word" >&5 +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 @@ -1239,19 +1523,22 @@ else ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue -fi -ac_cv_prog_CC="cc" -echo "$as_me:1253: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done if test $ac_prog_rejected = yes; then @@ -1263,7 +1550,7 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" ${1+"$@"} + set dummy "$as_dir/$ac_word" ${1+"$@"} shift ac_cv_prog_CC="$@" fi @@ -1272,10 +1559,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1275: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1278: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1286,7 +1573,7 @@ if test -z "$CC"; then 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:1289: checking for $ac_word" >&5 +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 @@ -1294,25 +1581,28 @@ else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:1304: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1312: result: $CC" >&5 + echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1315: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1325,7 +1615,7 @@ if test -z "$CC"; then 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:1328: checking for $ac_word" >&5 +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 @@ -1333,25 +1623,28 @@ else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:1343: found $ac_dir/$ac_word" >&5 -break +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1351: result: $ac_ct_CC" >&5 + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1354: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1363,34 +1656,41 @@ fi fi -test -z "$CC" && { { echo "$as_me:1366: error: no acceptable cc found in \$PATH" >&5 -echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:1371:" \ +echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:1374: \"$ac_compiler --version </dev/null >&5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 (eval $ac_compiler --version </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:1377: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1379: \"$ac_compiler -v </dev/null >&5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 (eval $ac_compiler -v </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:1382: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1384: \"$ac_compiler -V </dev/null >&5\"") >&5 +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 (eval $ac_compiler -V </dev/null >&5) 2>&5 ac_status=$? - echo "$as_me:1387: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line 1391 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1404,22 +1704,26 @@ ac_clean_files="$ac_clean_files a.out a.exe" # 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:1407: checking for C compiler default output" >&5 +echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:1410: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1413: \$? = $ac_status" >&5 + 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. -for ac_file in `ls a.exe conftest.exe 2>/dev/null; + +# 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= +for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null; ls a.out conftest 2>/dev/null; ls a.* conftest.* 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;; a.out ) # We found the default executable, but exeext='' is most # certainly right. break;; @@ -1433,34 +1737,34 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1436: error: C compiler cannot create executables" >&5 +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5 echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:1442: result: $ac_file" >&5 +echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1447: checking whether the C compiler works" >&5 +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:1453: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1456: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1463: error: cannot run C compiled programs. + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&2;} @@ -1468,24 +1772,24 @@ If you meant to cross compile, use \`--host'." >&2;} fi fi fi -echo "$as_me:1471: result: yes" >&5 +echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1478: checking whether we are cross compiling" >&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:1480: result: $cross_compiling" >&5 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1483: checking for executable suffix" >&5 -echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1485: \"$ac_link\"") >&5 +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1488: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -1501,27 +1805,33 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do esac done else - { { echo "$as_me:1504: error: cannot compute EXEEXT: cannot compile and link" >&5 -echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:1510: result: $ac_cv_exeext" >&5 +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:1516: checking for object suffix" >&5 -echo $ECHO_N "checking for object suffix... $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 1522 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1531,10 +1841,10 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1534: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1537: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in @@ -1546,26 +1856,32 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1549: error: cannot compute OBJEXT: cannot compile" >&5 -echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:1556: result: $ac_cv_objext" >&5 +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:1560: checking whether we are using the GNU C compiler" >&5 +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 1566 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1578,16 +1894,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1581: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1584: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1587: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1590: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -1599,21 +1915,27 @@ rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1602: result: $ac_cv_c_compiler_gnu" >&5 +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:1608: checking whether $CC accepts -g" >&5 +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 1614 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1623,16 +1945,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1626: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1629: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1632: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1635: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else @@ -1642,7 +1964,7 @@ ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1645: result: $ac_cv_prog_cc_g" >&5 +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 @@ -1669,16 +1991,16 @@ cat >conftest.$ac_ext <<_ACEOF #endif _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1672: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1675: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1678: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1681: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ @@ -1690,10 +2012,16 @@ if { (eval echo "$as_me:1672: \"$ac_compile\"") >&5 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 1693 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <stdlib.h> $ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1703,16 +2031,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1706: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1709: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1712: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1715: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -1722,9 +2050,15 @@ continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 1725 "configure" +#line $LINENO "configure" #include "confdefs.h" $ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -1734,16 +2068,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1737: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1740: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1743: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1746: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -1775,7 +2109,7 @@ 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:1778: checking how to run the C preprocessor" >&5 +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 @@ -1796,18 +2130,18 @@ do # 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 1799 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <assert.h> Syntax error _ACEOF -if { (eval echo "$as_me:1804: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:1810: \$? = $ac_status" >&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 @@ -1830,17 +2164,17 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 1833 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <ac_nonexistent.h> _ACEOF -if { (eval echo "$as_me:1837: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:1843: \$? = $ac_status" >&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 @@ -1877,7 +2211,7 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:1880: result: $CPP" >&5 +echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -1887,18 +2221,18 @@ do # 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 1890 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <assert.h> Syntax error _ACEOF -if { (eval echo "$as_me:1895: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:1901: \$? = $ac_status" >&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 @@ -1921,17 +2255,17 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 1924 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <ac_nonexistent.h> _ACEOF -if { (eval echo "$as_me:1928: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:1934: \$? = $ac_status" >&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 @@ -1959,7 +2293,7 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:1962: error: C preprocessor \"$CPP\" fails sanity check" >&5 + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi @@ -1970,15 +2304,17 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + + if test $ac_cv_c_compiler_gnu = yes; then - echo "$as_me:1974: checking whether $CC needs -traditional" >&5 + 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 1981 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sgtty.h> Autoconf TIOCGETP @@ -1991,9 +2327,10 @@ else fi rm -f conftest* + if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF -#line 1996 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <termio.h> Autoconf TCGETA @@ -2006,63 +2343,149 @@ rm -f conftest* fi fi -echo "$as_me:2009: result: $ac_cv_prog_gcc_traditional" >&5 +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:2016: checking for POSIXized ISC" >&5 -echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6 -if test -d /etc/conf/kconfig.d && - grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 -then - echo "$as_me:2021: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - ISC=yes # If later tests want to check for ISC. +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" +#include "confdefs.h" -cat >>confdefs.h <<\EOF -#define _POSIX_SOURCE 1 -EOF +/* 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 (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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="none required" +else + echo "$as_me: failed program was:" >&5 +cat 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" +#include "confdefs.h" - if test "$GCC" = yes; then - CC="$CC -posix" - else - CC="$CC -Xp" - fi +/* 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 (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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:2035: result: no" >&5 -echo "${ECHO_T}no" >&6 - ISC= + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +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" + fi + if test "$cross_compiling" = yes; then - { { echo "$as_me:2041: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 2046 "configure" +#line $LINENO "configure" #include "confdefs.h" main(){exit(0);} _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:2051: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2054: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:2056: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2059: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) if test $CC != cc ; then echo "Your $CC failed - restarting with CC=cc" 1>&6 @@ -2079,38 +2502,39 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test "$cross_compiling" = yes; then - { { echo "$as_me:2082: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 2087 "configure" +#line $LINENO "configure" #include "confdefs.h" main(){exit(0);} _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:2092: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2095: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:2097: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2100: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) exec 5>&2 eval $ac_link echo "CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;" 1>&6 echo "$ac_compile" 1>&6 -{ { echo "$as_me:2113: error: Can't run the compiler - sorry" >&5 +{ { echo "$as_me:$LINENO: error: Can't run the compiler - sorry" >&5 echo "$as_me: error: Can't run the compiler - sorry" >&2;} { (exit 1); exit 1; }; } fi @@ -2118,12 +2542,12 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test "$cross_compiling" = yes; then - { { echo "$as_me:2121: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 2126 "configure" +#line $LINENO "configure" #include "confdefs.h" main() @@ -2134,17 +2558,17 @@ main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:2137: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2140: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:2142: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2145: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { { echo "$as_me:2147: error: Your compiler does not set the exit status - sorry" >&5 + { { echo "$as_me:$LINENO: error: Your compiler does not set the exit status - sorry" >&5 echo "$as_me: error: Your compiler does not set the exit status - sorry" >&2;} { (exit 1); exit 1; }; } else @@ -2155,11 +2579,11 @@ fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -for ac_prog in mawk gawk nawk awk +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:2162: checking for $ac_word" >&5 +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 @@ -2167,31 +2591,35 @@ else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue -ac_cv_prog_AWK="$ac_prog" -echo "$as_me:2177: found $ac_dir/$ac_word" >&5 -break +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_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:2185: result: $AWK" >&5 + echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else - echo "$as_me:2188: result: no" >&5 + 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 @@ -2209,7 +2637,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:2212: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 + { { 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 @@ -2229,43 +2657,48 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:2232: 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 else - ac_save_IFS=$IFS; IFS=$ac_path_separator - for ac_dir in $PATH; do - IFS=$ac_save_IFS - # Account for people who put trailing slashes in PATH elements. - case $ac_dir/ in - / | ./ | .// | /cC/* \ - | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \ - | /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if $as_executable_p "$ac_dir/$ac_prog"; then - if test $ac_prog = install && - grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi done - ;; - esac - done + done + ;; +esac +done + fi if test "${ac_cv_path_install+set}" = set; then @@ -2278,7 +2711,7 @@ fi INSTALL=$ac_install_sh fi fi -echo "$as_me:2281: result: $INSTALL" >&5 +echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2289,26 +2722,29 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + if test -f etc/toolcheck; then -{ echo "$as_me:2293: checking for buggy tools..." >&5 +{ echo "$as_me:$LINENO: checking for buggy tools..." >&5 echo "$as_me: checking for buggy tools..." >&6;} sh etc/toolcheck 1>&6 fi -echo "$as_me:2298: checking if a system-wide socket dir should be used" >&5 + + +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. if test "${enable_socket_dir+set}" = set; then enableval="$enable_socket_dir" - echo "$as_me:2304: result: no. ~/.screen will be used instead." >&5 + 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:2309: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - echo "$as_me:2311: checking for the socket dir" >&5 + 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\")" @@ -2317,39 +2753,49 @@ if test "${with_socket_dir+set}" = set; then withval="$with_socket_dir" SOCKDIR="\"${withval}\"" fi; - echo "$as_me:2320: result: ${SOCKDIR}" >&5 + echo "$as_me:$LINENO: result: ${SOCKDIR}" >&5 echo "${ECHO_T}${SOCKDIR}" >&6 - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define SOCKDIR $SOCKDIR -EOF +_ACEOF + + fi; + if test -n "$ISC"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define ISC 1 -EOF +_ACEOF LIBS="$LIBS -linet" fi + if test -f /sysV68 ; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define sysV68 1 -EOF +_ACEOF fi -{ echo "$as_me:2342: checking for MIPS..." >&5 +{ echo "$as_me:$LINENO: checking for MIPS..." >&5 echo "$as_me: checking for MIPS..." >&6;} if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then oldlibs="$LIBS" test -f /bin/mx || LIBS="$LIBS -lmld" # for nlist. But not on alpha. -{ echo "$as_me:2347: checking mld library..." >&5 +{ echo "$as_me:$LINENO: checking mld library..." >&5 echo "$as_me: checking mld library..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 2350 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2359,16 +2805,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2362: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2365: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2368: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2371: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -2378,16 +2824,22 @@ LIBS="$oldlibs" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test -r /dev/ptc; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define MIPS 1 -EOF +_ACEOF -{ echo "$as_me:2385: checking wait3..." >&5 +{ echo "$as_me:$LINENO: checking wait3..." >&5 echo "$as_me: checking wait3..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 2388 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2397,27 +2849,33 @@ wait3(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2400: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2403: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2406: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2409: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ echo "$as_me:2415: checking wait2..." >&5 +{ echo "$as_me:$LINENO: checking wait2..." >&5 echo "$as_me: checking wait2..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 2418 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2427,20 +2885,20 @@ wait2(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2430: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2433: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2436: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2439: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_WAIT2 1 -EOF +_ACEOF LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd" else @@ -2453,10 +2911,11 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi fi -{ echo "$as_me:2456: checking for Ultrix..." >&5 + +{ echo "$as_me:$LINENO: checking for Ultrix..." >&5 echo "$as_me: checking for Ultrix..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 2459 "configure" +#line $LINENO "configure" #include "confdefs.h" #if defined(ultrix) || defined(__ultrix) yes; @@ -2469,15 +2928,22 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | fi rm -f conftest* + if test -f /usr/lib/libpyr.a ; then oldlibs="$LIBS" LIBS="$LIBS -lpyr" -{ echo "$as_me:2475: checking Pyramid OSX..." >&5 +{ echo "$as_me:$LINENO: checking Pyramid OSX..." >&5 echo "$as_me: checking Pyramid OSX..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 2478 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2487,20 +2953,20 @@ open_controlling_pty("") } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2490: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2493: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2496: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2499: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define OSX 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 @@ -2510,10 +2976,10 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:2513: checking for butterfly..." >&5 +{ echo "$as_me:$LINENO: checking for butterfly..." >&5 echo "$as_me: checking for butterfly..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 2516 "configure" +#line $LINENO "configure" #include "confdefs.h" #if defined(butterfly) yes; @@ -2526,14 +2992,15 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | fi rm -f conftest* + if test -z "$butterfly"; then if test -n "$ULTRIX"; then test -z "$GCC" && CC="$CC -YBSD" fi -{ echo "$as_me:2533: checking for POSIX.1..." >&5 +{ echo "$as_me:$LINENO: checking for POSIX.1..." >&5 echo "$as_me: checking for POSIX.1..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 2536 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> #include <unistd.h> @@ -2546,23 +3013,29 @@ _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "yes" >/dev/null 2>&1; then echo "- you have a POSIX system" 1>&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define POSIX 1 -EOF +_ACEOF posix=1 fi rm -f conftest* fi -{ echo "$as_me:2558: checking for System V..." >&5 +{ echo "$as_me:$LINENO: checking for System V..." >&5 echo "$as_me: checking for System V..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 2561 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> #include <fcntl.h> +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2572,32 +3045,32 @@ int x = SIGCHLD | FNDELAY; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2575: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2578: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2581: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2584: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define SYSV 1 -EOF +_ACEOF fi rm -f conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:2597: checking for sequent/ptx..." >&5 +{ echo "$as_me:$LINENO: checking for sequent/ptx..." >&5 echo "$as_me: checking for sequent/ptx..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 2600 "configure" +#line $LINENO "configure" #include "confdefs.h" #ifdef _SEQUENT_ yes; @@ -2610,15 +3083,219 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | fi rm -f conftest* + oldlibs="$LIBS" LIBS="$LIBS -lelf" -{ echo "$as_me:2615: checking SVR4..." >&5 +{ 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 +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" +#include "confdefs.h" +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -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 + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f conftest.err 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" +#include "confdefs.h" +#include <string.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <stdlib.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <ctype.h> +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + cat >conftest.$ac_ext <<_ACEOF -#line 2618 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <utmpx.h> +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2628,34 +3305,72 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2631: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2634: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2637: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2640: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:2642: checking for dwarf.h" >&5 + 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 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 else - cat >conftest.$ac_ext <<_ACEOF -#line 2648 "configure" + # Is the header compilable? +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" #include "confdefs.h" +$ac_includes_default #include <dwarf.h> _ACEOF -if { (eval echo "$as_me:2652: \"$ac_cpp conftest.$ac_ext\"") >&5 +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 + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +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 + +# Is the header present? +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" +#include "confdefs.h" +#include <dwarf.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2658: \$? = $ac_status" >&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 @@ -2666,42 +3381,106 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - ac_cv_header_dwarf_h=yes + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - ac_cv_header_dwarf_h=no + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc 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;};; + 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: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: dwarf.h: proceeding with the preprocessor's result" >&2;};; +esac +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:2677: result: $ac_cv_header_dwarf_h" >&5 +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 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SVR4 1 -EOF - cat >>confdefs.h <<\EOF +_ACEOF + cat >>confdefs.h <<\_ACEOF #define BUGGYGETLOGIN 1 -EOF +_ACEOF else - echo "$as_me:2688: checking for elf.h" >&5 + 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 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 else - cat >conftest.$ac_ext <<_ACEOF -#line 2694 "configure" + # Is the header compilable? +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" #include "confdefs.h" +$ac_includes_default #include <elf.h> _ACEOF -if { (eval echo "$as_me:2698: \"$ac_cpp conftest.$ac_ext\"") >&5 +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 + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +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 + +# Is the header present? +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" +#include "confdefs.h" +#include <elf.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:2704: \$? = $ac_status" >&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 @@ -2712,28 +3491,57 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - ac_cv_header_elf_h=yes + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - ac_cv_header_elf_h=no + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc 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;};; + 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: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: elf.h: proceeding with the preprocessor's result" >&2;};; +esac +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:2723: result: $ac_cv_header_elf_h" >&5 +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 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SVR4 1 -EOF - cat >>confdefs.h <<\EOF +_ACEOF + cat >>confdefs.h <<\_ACEOF #define BUGGYGETLOGIN 1 -EOF +_ACEOF fi + fi + + else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 @@ -2741,10 +3549,10 @@ LIBS="$oldlibs" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:2744: checking for Solaris 2.x..." >&5 +{ 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 2747 "configure" +#line $LINENO "configure" #include "confdefs.h" #if defined(SVR4) && defined(sun) yes @@ -2757,14 +3565,23 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | fi rm -f conftest* -{ echo "$as_me:2760: checking BSD job jontrol..." >&5 + + + +{ echo "$as_me:$LINENO: checking BSD job jontrol..." >&5 echo "$as_me: checking BSD job jontrol..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 2763 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/ioctl.h> +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2785,21 +3602,21 @@ int y = TIOCNOTTY; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2788: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2791: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2794: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2797: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "- you have jobcontrol" 1>&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BSDJOBS 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 @@ -2809,12 +3626,18 @@ echo "- you don't have jobcontrol" 1>&6 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:2812: checking setreuid..." >&5 +{ echo "$as_me:$LINENO: checking setreuid..." >&5 echo "$as_me: checking setreuid..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 2815 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2830,32 +3653,38 @@ setreuid(0, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2833: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2836: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2839: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2842: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SETREUID 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:2853: checking seteuid..." >&5 +{ echo "$as_me:$LINENO: checking seteuid..." >&5 echo "$as_me: checking seteuid..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 2856 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2871,20 +3700,20 @@ seteuid(0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2874: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2877: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2880: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2883: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SETEUID 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 @@ -2892,12 +3721,19 @@ cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:2895: checking select..." >&5 + +{ echo "$as_me:$LINENO: checking select..." >&5 echo "$as_me: checking select..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 2898 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2907,28 +3743,34 @@ select(0, 0, 0, 0, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2910: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2913: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2916: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2919: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 LIBS="$LIBS -lnet -lnsl" -{ echo "$as_me:2926: checking select with $LIBS..." >&5 +{ echo "$as_me:$LINENO: checking select with $LIBS..." >&5 echo "$as_me: checking select with $LIBS..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 2929 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -2938,22 +3780,22 @@ select(0, 0, 0, 0, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:2941: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:2944: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:2947: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2950: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:2956: 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 @@ -2962,15 +3804,15 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:2965: checking fifos..." >&5 +{ echo "$as_me:$LINENO: checking fifos..." >&5 echo "$as_me: checking fifos..." >&6;} if test "$cross_compiling" = yes; then - { { echo "$as_me:2968: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 2973 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> @@ -3039,15 +3881,15 @@ main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:3042: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3045: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3047: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3050: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "- your fifos are usable" 1>&6 fifo=1 @@ -3055,6 +3897,7 @@ else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) echo "- your fifos are not usable" 1>&6 fi @@ -3063,15 +3906,15 @@ fi rm -f /tmp/conftest* if test -n "$fifo"; then -{ echo "$as_me:3066: checking for broken fifo implementation..." >&5 +{ echo "$as_me:$LINENO: checking for broken fifo implementation..." >&5 echo "$as_me: checking for broken fifo implementation..." >&6;} if test "$cross_compiling" = yes; then - { { echo "$as_me:3069: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 3074 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> @@ -3120,15 +3963,15 @@ main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:3123: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3126: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3128: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3131: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "- your implementation is ok" 1>&6 @@ -3136,10 +3979,11 @@ else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) echo "- you have a broken implementation" 1>&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BROKEN_PIPE 1 -EOF +_ACEOF fifobr=1 fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -3147,15 +3991,16 @@ fi rm -f /tmp/conftest* fi -{ echo "$as_me:3150: checking sockets..." >&5 + +{ echo "$as_me:$LINENO: checking sockets..." >&5 echo "$as_me: checking sockets..." >&6;} if test "$cross_compiling" = yes; then - { { echo "$as_me:3153: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 3158 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> @@ -3210,15 +4055,15 @@ main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:3213: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3216: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3218: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3221: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "- your sockets are usable" 1>&6 sock=1 @@ -3226,6 +4071,7 @@ else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) echo "- your sockets are not usable" 1>&6 fi @@ -3234,15 +4080,15 @@ fi rm -f /tmp/conftest* if test -n "$sock"; then -{ echo "$as_me:3237: checking socket implementation..." >&5 +{ echo "$as_me:$LINENO: checking socket implementation..." >&5 echo "$as_me: checking socket implementation..." >&6;} if test "$cross_compiling" = yes; then - { { echo "$as_me:3240: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 3245 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> @@ -3272,15 +4118,15 @@ main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:3275: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3278: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3280: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3283: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "- you are normal" 1>&6 @@ -3288,11 +4134,12 @@ else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) echo "- unix domain sockets are not kept in the filesystem" 1>&6 -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define SOCK_NOT_IN_FS 1 -EOF +_ACEOF socknofs=1 fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -3300,14 +4147,15 @@ fi rm -f /tmp/conftest* fi + if test -n "$fifo"; then if test -n "$sock"; then if test -n "$nore"; then echo "- hmmm... better take the fifos" 1>&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NAMEDPIPE 1 -EOF +_ACEOF elif test -n "$fifobr"; then echo "- as your fifos are broken lets use the sockets." 1>&6 @@ -3315,37 +4163,38 @@ EOF else echo "- both sockets and fifos usable. let's take fifos." 1>&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NAMEDPIPE 1 -EOF +_ACEOF fi else echo "- using named pipes" 1>&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NAMEDPIPE 1 -EOF +_ACEOF fi elif test -n "$sock"; then echo "- using unix-domain sockets" 1>&6 else - { { echo "$as_me:3335: error: you have neither usable sockets nor usable pipes -> no screen" >&5 + { { echo "$as_me:$LINENO: error: you have neither usable sockets nor usable pipes -> no screen" >&5 echo "$as_me: error: you have neither usable sockets nor usable pipes -> no screen" >&2;} { (exit 1); exit 1; }; } fi -{ echo "$as_me:3340: checking select return value..." >&5 + +{ echo "$as_me:$LINENO: checking select return value..." >&5 echo "$as_me: checking select return value..." >&6;} if test "$cross_compiling" = yes; then - { { echo "$as_me:3343: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 3348 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> @@ -3363,6 +4212,7 @@ char *nam = "/tmp/conftest$$"; #define S_IFIFO 0010000 #endif + main() { #ifdef FD_SET @@ -3432,6 +4282,7 @@ main() exit(1); #endif + #ifdef FD_SET FD_SET(0, &f); #else @@ -3446,15 +4297,15 @@ main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:3449: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3452: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3454: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3457: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "- select is ok" 1>&6 @@ -3462,21 +4313,28 @@ else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) echo "- select can't count" 1>&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SELECT_BROKEN 1 -EOF +_ACEOF fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:3474: checking for tgetent..." >&5 +{ echo "$as_me:$LINENO: checking for tgetent..." >&5 echo "$as_me: checking for tgetent..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 3477 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3486,16 +4344,16 @@ tgetent((char *)0, (char *)0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3489: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3492: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3495: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3498: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -3503,12 +4361,18 @@ else cat conftest.$ac_ext >&5 olibs="$LIBS" LIBS="-lcurses $olibs" -{ echo "$as_me:3506: checking libcurses..." >&5 +{ echo "$as_me:$LINENO: checking libcurses..." >&5 echo "$as_me: checking libcurses..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 3509 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3524,28 +4388,34 @@ tgetent((char *)0, (char *)0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3527: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3530: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3533: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3536: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 LIBS="-ltermcap $olibs" -{ echo "$as_me:3543: checking libtermcap..." >&5 +{ echo "$as_me:$LINENO: checking libtermcap..." >&5 echo "$as_me: checking libtermcap..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 3546 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3555,28 +4425,34 @@ tgetent((char *)0, (char *)0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3558: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3561: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3564: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3567: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 LIBS="-ltermlib $olibs" -{ echo "$as_me:3574: checking libtermlib..." >&5 +{ echo "$as_me:$LINENO: checking libtermlib..." >&5 echo "$as_me: checking libtermlib..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 3577 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3586,28 +4462,34 @@ tgetent((char *)0, (char *)0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3589: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3592: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3595: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3598: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 LIBS="-lncurses $olibs" -{ echo "$as_me:3605: checking libncurses..." >&5 +{ echo "$as_me:$LINENO: checking libncurses..." >&5 echo "$as_me: checking libncurses..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 3608 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3617,22 +4499,22 @@ tgetent((char *)0, (char *)0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3620: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3623: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3626: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3629: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:3635: 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 @@ -3647,12 +4529,12 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test "$cross_compiling" = yes; then - { { echo "$as_me:3650: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 3655 "configure" +#line $LINENO "configure" #include "confdefs.h" main() @@ -3661,15 +4543,15 @@ main() } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:3664: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3667: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3669: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3672: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "- you use the termcap database" 1>&6 @@ -3677,20 +4559,27 @@ else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) echo "- you use the terminfo database" 1>&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define TERMINFO 1 -EOF +_ACEOF fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:3688: checking ospeed..." >&5 +{ echo "$as_me:$LINENO: checking ospeed..." >&5 echo "$as_me: checking ospeed..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 3691 "configure" +#line $LINENO "configure" #include "confdefs.h" extern short ospeed; +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3700,44 +4589,51 @@ ospeed=5; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3703: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3706: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3709: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3712: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define NEED_OSPEED 1 -EOF +_ACEOF fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:3725: checking for /dev/ptc..." >&5 +{ echo "$as_me:$LINENO: checking for /dev/ptc..." >&5 echo "$as_me: checking for /dev/ptc..." >&6;} if test -r /dev/ptc; then -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define HAVE_DEV_PTC 1 -EOF +_ACEOF fi -{ echo "$as_me:3734: checking for SVR4 ptys..." >&5 +{ echo "$as_me:$LINENO: checking for SVR4 ptys..." >&5 echo "$as_me: checking for SVR4 ptys..." >&6;} +sysvr4ptys= if test -c /dev/ptmx ; then cat >conftest.$ac_ext <<_ACEOF -#line 3738 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3747,21 +4643,22 @@ ptsname(0);grantpt(0);unlockpt(0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3750: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3753: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3756: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3759: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_SVR4_PTYS 1 -EOF +_ACEOF +sysvr4ptys=1 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 @@ -3769,16 +4666,17 @@ fi rm -f conftest.$ac_objext 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:3775: checking for $ac_func" >&5 +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 $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 3781 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -3792,6 +4690,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -3809,16 +4713,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:3812: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3815: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:3818: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3821: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -3828,17 +4732,160 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:3831: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF fi done -{ echo "$as_me:3841: checking for ptyranges..." >&5 + +if test -z "$sysvr4ptys"; then + +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 $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include <assert.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 $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +f = $ac_func; +#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 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext 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 +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 +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" +#include "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 openpty (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +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 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_util_openpty=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_util_openpty=no +fi +rm -f conftest.$ac_objext 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 +if test $ac_cv_lib_util_openpty = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_OPENPTY 1 +_ACEOF + LIBS="$LIBS -lutil" +fi + +fi +done + +fi + +{ echo "$as_me:$LINENO: checking for ptyranges..." >&5 echo "$as_me: checking for ptyranges..." >&6;} if test -d /dev/ptym ; then pdir='/dev/ptym' @@ -3846,7 +4893,7 @@ else pdir='/dev' fi cat >conftest.$ac_ext <<_ACEOF -#line 3849 "configure" +#line $LINENO "configure" #include "confdefs.h" #ifdef M_UNIX yes; @@ -3864,26 +4911,50 @@ rm -f conftest* if test "$ptys" != "$pdir/pty??" ; then p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'` p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'` -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define PTYRANGE0 "$p0" -EOF +_ACEOF -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define PTYRANGE1 "$p1" -EOF +_ACEOF fi -{ echo "$as_me:3877: checking default tty permissions/group..." >&5 + +# Check whether --with-pty-mode or --without-pty-mode was given. +if test "${with_pty_mode+set}" = set; then + withval="$with_pty_mode" + ptymode="${withval}" +fi; + +# Check whether --with-pty-group or --without-pty-group was given. +if test "${with_pty_group+set}" = set; then + withval="$with_pty_group" + ptygrp="${withval}" +fi; +test -n "$ptymode" || ptymode=0620 +if test -n "$ptygrp" ; then +cat >>confdefs.h <<_ACEOF +#define PTYMODE $ptymode +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PTYGROUP $ptygrp +_ACEOF + +else + +{ echo "$as_me:$LINENO: checking default tty permissions/group..." >&5 echo "$as_me: checking default tty permissions/group..." >&6;} rm -f conftest_grp if test "$cross_compiling" = yes; then - { { echo "$as_me:3881: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 3886 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> @@ -3916,28 +4987,28 @@ main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:3919: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:3922: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:3924: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:3927: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then if test -f conftest_grp; then ptygrp=`cat conftest_grp` - echo "- pty mode: 0620, group: $ptygrp" 1>&6 + echo "- pty mode: $ptymode, group: $ptygrp" 1>&6 - cat >>confdefs.h <<\EOF -#define PTYMODE 0620 -EOF + cat >>confdefs.h <<_ACEOF +#define PTYMODE $ptymode +_ACEOF - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define PTYGROUP $ptygrp -EOF +_ACEOF else echo "- ptys are world accessable" 1>&6 @@ -3948,12 +5019,13 @@ else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 +( exit $ac_status ) WRITEPATH='' 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:3956: checking for $ac_word" >&5 +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 @@ -3963,16 +5035,18 @@ else ac_cv_path_WRITEPATH="$WRITEPATH" # Let the user override the test with a path. ;; *) - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_WRITEPATH="$ac_dir/$ac_word" - echo "$as_me:3973: found $ac_dir/$ac_word" >&5 - break -fi + 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_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 ;; @@ -3981,16 +5055,16 @@ fi WRITEPATH=$ac_cv_path_WRITEPATH if test -n "$WRITEPATH"; then - echo "$as_me:3984: result: $WRITEPATH" >&5 + echo "$as_me:$LINENO: result: $WRITEPATH" >&5 echo "${ECHO_T}$WRITEPATH" >&6 else - echo "$as_me:3987: result: no" >&5 + 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:3993: checking for $ac_word" >&5 +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 @@ -4000,16 +5074,18 @@ else ac_cv_path_XTERMPATH="$XTERMPATH" # Let the user override the test with a path. ;; *) - ac_save_IFS=$IFS; IFS=$ac_path_separator -ac_dummy="$PATH" -for ac_dir in $ac_dummy; do - IFS=$ac_save_IFS - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_XTERMPATH="$ac_dir/$ac_word" - echo "$as_me:4010: found $ac_dir/$ac_word" >&5 - break -fi + 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_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 ;; @@ -4018,10 +5094,10 @@ fi XTERMPATH=$ac_cv_path_XTERMPATH if test -n "$XTERMPATH"; then - echo "$as_me:4021: result: $XTERMPATH" >&5 + echo "$as_me:$LINENO: result: $XTERMPATH" >&5 echo "${ECHO_T}$XTERMPATH" >&6 else - echo "$as_me:4024: result: no" >&5 + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -4045,15 +5121,15 @@ fi found=`find $WRITEPATH $XTERMPATH $findfollow -perm -2000 -print` if test -n "$found"; then ptygrp=`ls -ln$lsfollow $found | sed -n -e 1p | $AWK '{print $4}'` - echo "- pty mode: 0620, group: $ptygrp" 1>&6 + echo "- pty mode: $ptymode, group: $ptygrp" 1>&6 - cat >>confdefs.h <<\EOF -#define PTYMODE 0620 -EOF + cat >>confdefs.h <<_ACEOF +#define PTYMODE $ptymode +_ACEOF - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define PTYGROUP $ptygrp -EOF +_ACEOF else echo "- ptys are world accessable" 1>&6 @@ -4064,15 +5140,17 @@ EOF fi + fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest_grp +fi -{ echo "$as_me:4072: checking getutent..." >&5 +{ echo "$as_me:$LINENO: checking getutent..." >&5 echo "$as_me: checking getutent..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 4075 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <time.h> /* to get time_t on SCO */ @@ -4087,6 +5165,12 @@ cat >conftest.$ac_ext <<_ACEOF #define pututline _pututline #endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4096,30 +5180,30 @@ int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4099: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4102: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4105: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4108: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define GETUTENT 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 olibs="$LIBS" LIBS="$LIBS -lgen" -{ echo "$as_me:4119: checking getutent with -lgen..." >&5 +{ echo "$as_me:$LINENO: checking getutent with -lgen..." >&5 echo "$as_me: checking getutent with -lgen..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 4122 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <time.h> @@ -4134,6 +5218,12 @@ cat >conftest.$ac_ext <<_ACEOF #define pututline _pututline #endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4143,20 +5233,20 @@ int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4146: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4149: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4152: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4155: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define GETUTENT 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 @@ -4167,10 +5257,10 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:4170: checking ut_host..." >&5 +{ echo "$as_me:$LINENO: checking ut_host..." >&5 echo "$as_me: checking ut_host..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 4173 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <time.h> @@ -4182,6 +5272,12 @@ cat >conftest.$ac_ext <<_ACEOF #include <utmp.h> #endif +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4191,43 +5287,81 @@ struct utmp u; u.ut_host[0] = 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4194: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4197: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4200: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4203: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define UTHOST 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:4214: checking for utempter.h" >&5 +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 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 else - cat >conftest.$ac_ext <<_ACEOF -#line 4220 "configure" + # Is the header compilable? +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" #include "confdefs.h" +$ac_includes_default #include <utempter.h> _ACEOF -if { (eval echo "$as_me:4224: \"$ac_cpp conftest.$ac_ext\"") >&5 +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 + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +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 + +# Is the header present? +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" +#include "confdefs.h" +#include <utempter.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:4230: \$? = $ac_status" >&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 @@ -4238,41 +5372,74 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - ac_cv_header_utempter_h=yes + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - ac_cv_header_utempter_h=no + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc 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;};; + 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: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: utempter.h: proceeding with the preprocessor's result" >&2;};; +esac +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:4249: result: $ac_cv_header_utempter_h" >&5 +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 have_utempter=yes else have_utempter=no fi + if test "$have_utempter" = yes; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define HAVE_UTEMPTER 1 -EOF +_ACEOF LIBS="$LIBS -lutempter" fi -{ echo "$as_me:4265: checking for libutil(s)..." >&5 +{ echo "$as_me:$LINENO: checking for libutil(s)..." >&5 echo "$as_me: checking for libutil(s)..." >&6;} test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils" test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil" -{ echo "$as_me:4270: checking getloadavg..." >&5 +{ echo "$as_me:$LINENO: checking getloadavg..." >&5 echo "$as_me: checking getloadavg..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 4273 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4282,20 +5449,20 @@ getloadavg((double *)0, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4285: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4288: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4291: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4294: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LOADAV_GETLOADAVG 1 -EOF +_ACEOF load=1 else echo "$as_me: failed program was:" >&5 @@ -4303,12 +5470,18 @@ cat conftest.$ac_ext >&5 if test -f /usr/lib/libkvm.a ; then olibs="$LIBS" LIBS="$LIBS -lkvm" -{ echo "$as_me:4306: checking getloadavg with -lkvm..." >&5 +{ echo "$as_me:$LINENO: checking getloadavg with -lkvm..." >&5 echo "$as_me: checking getloadavg with -lkvm..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 4309 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4318,20 +5491,20 @@ getloadavg((double *)0, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4321: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4324: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4327: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4330: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LOADAV_GETLOADAVG 1 -EOF +_ACEOF load=1 else echo "$as_me: failed program was:" >&5 @@ -4346,7 +5519,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test -z "$load" ; then cat >conftest.$ac_ext <<_ACEOF -#line 4349 "configure" +#line $LINENO "configure" #include "confdefs.h" #if defined(NeXT) || defined(apollo) || defined(linux) yes; @@ -4361,7 +5534,7 @@ rm -f conftest* fi if test -z "$load" ; then -{ echo "$as_me:4364: checking for kernelfile..." >&5 +{ echo "$as_me:$LINENO: checking for kernelfile..." >&5 echo "$as_me: checking for kernelfile..." >&6;} for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do if test -f $core || test -c $core; then @@ -4375,27 +5548,65 @@ else echo "- using kernelfile '$core'" 1>&6 if test -r $core ; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define LOADAV_UNIX "$core" -EOF +_ACEOF - echo "$as_me:4382: checking for nlist.h" >&5 + 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 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 else - cat >conftest.$ac_ext <<_ACEOF -#line 4388 "configure" + # Is the header compilable? +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" +#include "confdefs.h" +$ac_includes_default +#include <nlist.h> +_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 + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +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 + +# Is the header present? +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" #include "confdefs.h" #include <nlist.h> _ACEOF -if { (eval echo "$as_me:4392: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:4398: \$? = $ac_status" >&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 @@ -4406,27 +5617,59 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - ac_cv_header_nlist_h=yes + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - ac_cv_header_nlist_h=no + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc 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;};; + 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: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: nlist.h: proceeding with the preprocessor's result" >&2;};; +esac +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:4417: result: $ac_cv_header_nlist_h" >&5 +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 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NLIST_STRUCT 1 -EOF +_ACEOF - { echo "$as_me:4424: checking n_un in struct nlist..." >&5 + { 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 4427 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <nlist.h> +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4436,20 +5679,20 @@ struct nlist n; n.n_un.n_name = 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4439: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4442: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4445: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4448: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NLIST_NAME_UNION 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 @@ -4458,10 +5701,12 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi - { echo "$as_me:4461: checking for nlist declaration..." >&5 + + + { echo "$as_me:$LINENO: checking for nlist declaration..." >&5 echo "$as_me: checking for nlist declaration..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 4464 "configure" +#line $LINENO "configure" #include "confdefs.h" #ifdef NLIST_STRUCT @@ -4473,24 +5718,25 @@ echo "$as_me: checking for nlist declaration..." >&6;} _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "nlist(( | )( | )*.*\(|\()" >/dev/null 2>&1; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NLIST_DECLARED 1 -EOF +_ACEOF fi rm -f conftest* - { echo "$as_me:4483: checking for avenrun symbol..." >&5 + + { echo "$as_me:$LINENO: checking for avenrun symbol..." >&5 echo "$as_me: checking for avenrun symbol..." >&6;} nlist64= for av in avenrun _avenrun _Loadavg avenrun _avenrun _Loadavg; do if test "$cross_compiling" = yes; then - { { echo "$as_me:4488: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 4493 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> @@ -4523,15 +5769,15 @@ main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4526: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4529: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4531: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4534: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then avensym=$av;break else @@ -4551,16 +5797,16 @@ fi else echo "- using avenrun symbol '$avensym'" 1>&6 - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define LOADAV_AVENRUN "$avensym" -EOF +_ACEOF if test -n "$nlist64"; then echo "- used nlist64 to find it" 1>&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define LOADAV_USE_NLIST64 1 -EOF +_ACEOF fi load=1 @@ -4628,37 +5874,39 @@ eval "$ac_cpp conftest.c 2>&5 | sed -e '1,/_CUT_HERE_/d' -e 's/ //g' > conftest. . ./conftest.out rm -f conftest* -if test -n "$load" ; then cat >>confdefs.h <<\EOF + +if test -n "$load" ; then cat >>confdefs.h <<\_ACEOF #define LOADAV 1 -EOF +_ACEOF fi -if test -n "$loadtype" ; then cat >>confdefs.h <<EOF +if test -n "$loadtype" ; then cat >>confdefs.h <<_ACEOF #define LOADAV_TYPE $loadtype -EOF +_ACEOF fi -if test -n "$loadnum" ; then cat >>confdefs.h <<EOF +if test -n "$loadnum" ; then cat >>confdefs.h <<_ACEOF #define LOADAV_NUM $loadnum -EOF +_ACEOF fi -if test -n "$loadscale" ; then cat >>confdefs.h <<EOF +if test -n "$loadscale" ; then cat >>confdefs.h <<_ACEOF #define LOADAV_SCALE $loadscale -EOF +_ACEOF fi if test -n "$posix" ; then echo "assuming posix signal definition" 1>&6 -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define SIGVOID 1 -EOF +_ACEOF + else -{ echo "$as_me:4658: checking return type of signal handlers..." >&5 +{ 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 4661 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -4666,6 +5914,12 @@ cat >conftest.$ac_ext <<_ACEOF #undef signal #endif extern void (*signal ()) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4675,35 +5929,41 @@ int i; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:4678: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:4681: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:4684: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4687: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SIGVOID 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:4698: checking sigset..." >&5 +{ echo "$as_me:$LINENO: checking sigset..." >&5 echo "$as_me: checking sigset..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 4701 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4719,35 +5979,35 @@ sigset(0, (int (*)())0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4722: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4725: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4728: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4731: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USESIGSET 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:4742: checking signal implementation..." >&5 +{ echo "$as_me:$LINENO: checking signal implementation..." >&5 echo "$as_me: checking signal implementation..." >&6;} if test "$cross_compiling" = yes; then - { { echo "$as_me:4745: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 4750 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> @@ -4785,24 +6045,25 @@ main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:4788: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4791: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:4793: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4796: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -cat >>confdefs.h <<\EOF +( exit $ac_status ) +cat >>confdefs.h <<\_ACEOF #define SYSVSIGS 1 -EOF +_ACEOF fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -4810,17 +6071,24 @@ fi fi -{ echo "$as_me:4813: checking for crypt and sec libraries..." >&5 + +{ echo "$as_me:$LINENO: checking for crypt and sec libraries..." >&5 echo "$as_me: checking for crypt and sec libraries..." >&6;} test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d" oldlibs="$LIBS" LIBS="$LIBS -lcrypt" -{ echo "$as_me:4818: checking crypt..." >&5 +{ echo "$as_me:$LINENO: checking crypt..." >&5 echo "$as_me: checking crypt..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 4821 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4830,16 +6098,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4833: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4836: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4839: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4842: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -4852,12 +6120,18 @@ 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" LIBS="$LIBS -lsun" -{ echo "$as_me:4855: checking IRIX sun library..." >&5 +{ echo "$as_me:$LINENO: checking IRIX sun library..." >&5 echo "$as_me: checking IRIX sun library..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 4858 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4867,16 +6141,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4870: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4873: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4876: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4879: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -4886,12 +6160,18 @@ LIBS="$oldlibs" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:4889: checking syslog..." >&5 +{ echo "$as_me:$LINENO: checking syslog..." >&5 echo "$as_me: checking syslog..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 4892 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4901,16 +6181,16 @@ closelog(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4904: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4907: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4910: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4913: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -4918,12 +6198,18 @@ else cat conftest.$ac_ext >&5 oldlibs="$LIBS" LIBS="$LIBS -lbsd" -{ echo "$as_me:4921: checking syslog in libbsd.a..." >&5 +{ 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 4924 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4933,16 +6219,16 @@ closelog(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:4936: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:4939: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:4942: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:4945: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "- found." 1>&6 @@ -4951,9 +6237,9 @@ else cat conftest.$ac_ext >&5 LIBS="$oldlibs" echo "- bad news: syslog missing." 1>&6 - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define NOSYSLOG 1 -EOF +_ACEOF fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext @@ -4961,7 +6247,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 4964 "configure" +#line $LINENO "configure" #include "confdefs.h" #ifdef M_UNIX yes; @@ -4974,14 +6260,21 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | fi rm -f conftest* -{ echo "$as_me:4977: checking wait union..." >&5 + +{ echo "$as_me:$LINENO: checking wait union..." >&5 echo "$as_me: checking wait union..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 4980 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/wait.h> +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -4997,20 +6290,20 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5000: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5003: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5006: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5009: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BSDWAIT 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 @@ -5019,20 +6312,20 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext if test -z "$butterfly"; then -{ echo "$as_me:5022: checking for termio or termios..." >&5 +{ 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 5025 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <termio.h> _ACEOF -if { (eval echo "$as_me:5029: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:5035: \$? = $ac_status" >&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 @@ -5043,26 +6336,26 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define TERMIO 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 if test -n "$posix"; then cat >conftest.$ac_ext <<_ACEOF -#line 5055 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <termios.h> _ACEOF -if { (eval echo "$as_me:5059: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:5065: \$? = $ac_status" >&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 @@ -5073,9 +6366,9 @@ else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define TERMIO 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 @@ -5089,12 +6382,18 @@ fi rm -f conftest.err conftest.$ac_ext fi -{ echo "$as_me:5092: checking getspnam..." >&5 +{ echo "$as_me:$LINENO: checking getspnam..." >&5 echo "$as_me: checking getspnam..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 5095 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <shadow.h> +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5104,20 +6403,20 @@ getspnam("x"); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5107: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5110: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5113: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5116: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define SHADOWPW 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 @@ -5125,12 +6424,18 @@ cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:5128: checking getttyent..." >&5 +{ echo "$as_me:$LINENO: checking getttyent..." >&5 echo "$as_me: checking getttyent..." >&6;} cat >conftest.$ac_ext <<_ACEOF -#line 5131 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5140,20 +6445,20 @@ getttyent(); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5143: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5146: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5149: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5152: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define GETTTYENT 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 @@ -5161,15 +6466,15 @@ cat conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:5164: checking whether memcpy/memmove/bcopy handles overlapping arguments..." >&5 +{ 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;} if test "$cross_compiling" = yes; then - { { echo "$as_me:5167: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 5172 "configure" +#line $LINENO "configure" #include "confdefs.h" main() { @@ -5186,19 +6491,19 @@ main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:5189: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5192: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:5194: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5197: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USEBCOPY 1 -EOF +_ACEOF else echo "$as_me: program exited with status $ac_status" >&5 @@ -5209,12 +6514,12 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test "$cross_compiling" = yes; then - { { echo "$as_me:5212: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 5217 "configure" +#line $LINENO "configure" #include "confdefs.h" #define bcopy(s,d,l) memmove(d,s,l) @@ -5232,19 +6537,19 @@ main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:5235: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5238: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:5240: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5243: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USEMEMMOVE 1 -EOF +_ACEOF else echo "$as_me: program exited with status $ac_status" >&5 @@ -5254,13 +6559,14 @@ fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + if test "$cross_compiling" = yes; then - { { echo "$as_me:5258: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 5263 "configure" +#line $LINENO "configure" #include "confdefs.h" #define bcopy(s,d,l) memcpy(d,s,l) @@ -5278,19 +6584,19 @@ main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:5281: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5284: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:5286: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5289: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USEMEMCPY 1 -EOF +_ACEOF else echo "$as_me: program exited with status $ac_status" >&5 @@ -5300,30 +6606,36 @@ fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:5303: checking long file names" >&5 +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:5309: result: yes" >&5 +echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else -echo "$as_me:5312: result: no" >&5 +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 -cat >>confdefs.h <<\EOF +cat >>confdefs.h <<\_ACEOF #define NAME_MAX 14 -EOF +_ACEOF fi rm -f /tmp/conftest* -echo "$as_me:5321: checking for vsprintf" >&5 +echo "$as_me:$LINENO: checking for vsprintf" >&5 echo $ECHO_N "checking for vsprintf... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 5324 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5333,44 +6645,55 @@ vsprintf(0,0,0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5336: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5339: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5342: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5345: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:5347: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF #define USEVARARGS 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:5355: result: no" >&5 +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + + + + + 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:5363: checking for $ac_hdr that defines DIR" >&5 +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 $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5369 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5381,16 +6704,16 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:5384: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:5387: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:5390: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5393: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else @@ -5400,12 +6723,12 @@ eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:5403: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 -EOF +_ACEOF ac_header_dirent=$ac_hdr; break fi @@ -5413,15 +6736,15 @@ fi 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:5416: checking for opendir in -ldir" >&5 -echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6 -if test "${ac_cv_lib_dir_opendir+set}" = set; then + 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_check_lib_save_LIBS=$LIBS -LIBS="-ldir $LIBS" + ac_func_search_save_LIBS=$LIBS +ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF -#line 5424 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -5431,6 +6754,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5440,42 +6769,91 @@ opendir (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5443: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5446: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5449: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5452: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_dir_opendir=yes + ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_lib_dir_opendir=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +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" +#include "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 (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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 +cat conftest.$ac_ext >&5 fi -echo "$as_me:5463: result: $ac_cv_lib_dir_opendir" >&5 -echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6 -if test $ac_cv_lib_dir_opendir = yes; then - LIBS="$LIBS -ldir" +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +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" + fi else - echo "$as_me:5470: checking for opendir in -lx" >&5 -echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6 -if test "${ac_cv_lib_x_opendir+set}" = set; then + 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_check_lib_save_LIBS=$LIBS -LIBS="-lx $LIBS" + ac_func_search_save_LIBS=$LIBS +ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF -#line 5478 "configure" +#line $LINENO "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ @@ -5485,6 +6863,12 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5494,40 +6878,96 @@ opendir (); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5497: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5500: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5503: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5506: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_x_opendir=yes + ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_lib_x_opendir=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +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" +#include "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 (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done fi -echo "$as_me:5517: result: $ac_cv_lib_x_opendir" >&5 -echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6 -if test $ac_cv_lib_x_opendir = yes; then - LIBS="$LIBS -lx" +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" fi -echo "$as_me:5525: checking for setenv" >&5 +fi + + +echo "$as_me:$LINENO: checking for setenv" >&5 echo $ECHO_N "checking for setenv... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 5528 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5537,33 +6977,39 @@ setenv((char *)0,(char *)0);unsetenv((char *)0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5540: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5543: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5546: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5549: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:5551: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF #define USESETENV 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:5559: result: no" >&5 +echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 -echo "$as_me:5561: checking for putenv" >&5 +echo "$as_me:$LINENO: checking for putenv" >&5 echo $ECHO_N "checking for putenv... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 5564 "configure" +#line $LINENO "configure" #include "confdefs.h" +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5573,39 +7019,46 @@ putenv((char *)0);unsetenv((char *)0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5576: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5579: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5582: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5585: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:5587: result: yes" >&5 + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:5592: result: no" >&5 -echo "${ECHO_T}no" >&6;cat >>confdefs.h <<\EOF +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6;cat >>confdefs.h <<\_ACEOF #define NEEDPUTENV 1 -EOF +_ACEOF + fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -echo "$as_me:5601: checking for nl_langinfo(CODESET)" >&5 +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 5604 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <langinfo.h> +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5615,40 +7068,160 @@ nl_langinfo(CODESET); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5618: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5621: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5624: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5627: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:5629: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF #define HAVE_NL_LANGINFO 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:5637: result: no" >&5 +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 +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" +#include "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 (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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="none required" +else + echo "$as_me: failed program was:" >&5 +cat 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" +#include "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 (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +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 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done +fi +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" + +fi + + + + + + + + + + + + + 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:5645: checking for $ac_func" >&5 +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 $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 5651 "configure" +#line $LINENO "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -5662,6 +7235,12 @@ extern "C" char $ac_func (); char (*f) (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5679,16 +7258,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5682: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5685: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5688: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5691: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -5698,30 +7277,37 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:5701: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<EOF + cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -EOF +_ACEOF fi done + # Check whether --enable-pam or --disable-pam was given. if test "${enable_pam+set}" = set; then enableval="$enable_pam" fi; if test "$enable_pam" = "yes"; then - echo "$as_me:5717: checking for PAM support" >&5 + 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 5722 "configure" +#line $LINENO "configure" #include "confdefs.h" #include <security/pam_appl.h> +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif int main () { @@ -5735,26 +7321,26 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:5738: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5741: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:5744: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5747: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:5749: result: yes" >&5 -echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\EOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6;cat >>confdefs.h <<\_ACEOF #define USE_PAM 1 -EOF +_ACEOF else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -echo "$as_me:5757: result: no" >&5 +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 @@ -5766,9 +7352,9 @@ if test "${enable_use_locale+set}" = set; then fi; if test "$enable_use_locale" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define USE_LOCALE 1 -EOF +_ACEOF fi # Check whether --enable-telnet or --disable-telnet was given. @@ -5777,9 +7363,9 @@ if test "${enable_telnet+set}" = set; then fi; if test "$enable_telnet" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define BUILTIN_TELNET 1 -EOF +_ACEOF fi # Check whether --enable-colors256 or --disable-colors256 was given. @@ -5788,9 +7374,9 @@ if test "${enable_colors256+set}" = set; then fi; if test "$enable_colors256" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define COLORS256 1 -EOF +_ACEOF fi # Check whether --enable-rxvt_osc or --disable-rxvt_osc was given. @@ -5799,9 +7385,9 @@ if test "${enable_rxvt_osc+set}" = set; then fi; if test "$enable_rxvt_osc" = "yes"; then - cat >>confdefs.h <<\EOF + cat >>confdefs.h <<\_ACEOF #define RXVT_OSC 1 -EOF +_ACEOF fi @@ -5813,32 +7399,33 @@ fi test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq" if test "$cross_compiling" = yes; then - { { echo "$as_me:5816: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 5821 "configure" +#line $LINENO "configure" #include "confdefs.h" main(){exit(0);} _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:5826: \"$ac_link\"") >&5 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:5829: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:5831: \"$ac_try\"") >&5 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:5834: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:5841: error: Can't run the compiler - internal error. Sorry." >&5 +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: Can't run the compiler - internal error. Sorry." >&5 echo "$as_me: error: Can't run the compiler - internal error. Sorry." >&2;} { (exit 1); exit 1; }; } fi @@ -5849,7 +7436,7 @@ ETCSCREENRC="\"/usr/local/etc/screenrc\"" if test -n "$prefix"; then ETCSCREENRC="\"$prefix/etc/screenrc\"" fi -echo "$as_me:5852: checking for the global screenrc file" >&5 +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. @@ -5857,11 +7444,11 @@ if test "${with_sys_screenrc+set}" = set; then withval="$with_sys_screenrc" ETCSCREENRC="\"${withval}\"" fi; -cat >>confdefs.h <<EOF +cat >>confdefs.h <<_ACEOF #define ETCSCREENRC $ETCSCREENRC -EOF +_ACEOF -echo "$as_me:5864: result: $ETCSCREENRC" >&5 +echo "$as_me:$LINENO: result: $ETCSCREENRC" >&5 echo "${ECHO_T}$ETCSCREENRC" >&6 SCREENENCODINGS="\"/usr/local/lib/screen/utf8encodings\"" @@ -5869,13 +7456,13 @@ if test -n "$datadir"; then eval SCREENENCODINGS="$datadir/screen/utf8encodings" SCREENENCODINGS="\"$SCREENENCODINGS\"" fi -echo "$as_me:5872: checking for the utf8-encodings location" >&5 +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 <<EOF +cat >>confdefs.h <<_ACEOF #define SCREENENCODINGS $SCREENENCODINGS -EOF +_ACEOF -echo "$as_me:5878: result: $SCREENENCODINGS" >&5 +echo "$as_me:$LINENO: result: $SCREENENCODINGS" >&5 echo "${ECHO_T}$SCREENENCODINGS" >&6 ac_config_files="$ac_config_files Makefile doc/Makefile" @@ -5956,25 +7543,29 @@ fi DEFS=-DHAVE_CONFIG_H + : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:5962: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL -# Generated automatically by configure. +# Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false SHELL=\${CONFIG_SHELL-$SHELL} -ac_cs_invocation="\$0 \$@" - _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF + +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh @@ -5983,8 +7574,167 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +# NLS nuisances. +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && + { $as_unset LANG || test "${LANG+set}" != set; } || + { LANG=C; export LANG; } +(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && + { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || + { LC_ALL=C; export LC_ALL; } +(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && + { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || + { LC_TIME=C; export LC_TIME; } +(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && + { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || + { LC_CTYPE=C; export LC_CTYPE; } +(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && + { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || + { LANGUAGE=C; export LANGUAGE; } +(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && + { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || + { LC_COLLATE=C; export LC_COLLATE; } +(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && + { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || + { LC_NUMERIC=C; export LC_NUMERIC; } +(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && + { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || + { LC_MESSAGES=C; export LC_MESSAGES; } + + # Name of the executable. -as_me=`echo "$0" |sed 's,.*[\\/],,'` +as_me=`(basename "$0") 2>/dev/null || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.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 + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$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;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr @@ -6012,22 +7762,12 @@ rm -f conf$$ conf$$.exe conf$$.file as_executable_p="test -f" -# Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi +# 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" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" -# NLS nuisances. -$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } -$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } -$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } -$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } -$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } -$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } -$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } -$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } # IFS # We need space, tab and new line, in precisely that order. @@ -6036,10 +7776,34 @@ as_nl=' IFS=" $as_nl" # CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } exec 6>&1 +# Open the log real soon, 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 + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.53. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 _ACEOF # Files that config.status was made for. @@ -6059,7 +7823,7 @@ if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the @@ -6086,12 +7850,12 @@ Configuration commands: $config_commands Report bugs to <bug-autoconf@gnu.org>." -EOF +_ACEOF -cat >>$CONFIG_STATUS <<EOF +cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.52, +configured by $0, generated by GNU Autoconf 2.53, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 @@ -6100,9 +7864,9 @@ This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" -EOF +_ACEOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: @@ -6124,18 +7888,18 @@ do case $1 in # Handling of the options. -EOF -cat >>$CONFIG_STATUS <<EOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:6138: error: ambiguous option: $1 + { { 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;} @@ -6154,7 +7918,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:6157: error: unrecognized option: $1 + -*) { { 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;} @@ -6166,25 +7930,13 @@ Try \`$0 --help' for more information." >&2;} shift done -exec 5>>config.log -cat >&5 << _ACEOF +_ACEOF -## ----------------------- ## -## Running config.status. ## -## ----------------------- ## -This file was extended by $as_me 2.52, executed with - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - > $ac_cs_invocation -on `(hostname || uname -n) 2>/dev/null | sed 1q` -_ACEOF -EOF -cat >>$CONFIG_STATUS <<\EOF + +cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in @@ -6193,7 +7945,7 @@ do "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - *) { { echo "$as_me:6196: error: invalid argument: $ac_config_target" >&5 + *) { { 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 @@ -6231,9 +7983,9 @@ $debug || { (exit 1); exit 1; } } -EOF +_ACEOF -cat >>$CONFIG_STATUS <<EOF +cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. @@ -6246,6 +7998,12 @@ if test -n "\$CONFIG_FILES"; then 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 @@ -6261,23 +8019,16 @@ s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;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,@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,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@DEFS@,$DEFS,;t t s,@LIBS@,$LIBS,;t t s,@VERSION@,$VERSION,;t t -s,@SCREEN@,$SCREEN,;t t -s,@GZIP@,$GZIP,;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 @@ -6294,9 +8045,9 @@ s,@WRITEPATH@,$WRITEPATH,;t t s,@XTERMPATH@,$XTERMPATH,;t t CEOF -EOF +_ACEOF - cat >>$CONFIG_STATUS <<\EOF + 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 @@ -6335,8 +8086,8 @@ EOF fi fi # test -n "$CONFIG_FILES" -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +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 @@ -6350,7 +8101,8 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + 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\(/\)' \| \ @@ -6361,8 +8113,7 @@ echo X"$ac_file" | /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - { case "$ac_dir" in + { case "$ac_dir" in [\\/]* | ?:[\\/]* ) as_incr_dir=;; *) as_incr_dir=.;; esac @@ -6373,48 +8124,68 @@ for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do ?:) as_incr_dir=$as_mkdir_dir ;; *) as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || mkdir "$as_incr_dir" + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } ;; esac done; } - ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` - else - ac_dir_suffix= ac_dots= - fi + ac_builddir=. - case $srcdir in - .) ac_srcdir=. - if test -z "$ac_dots"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; +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_dots$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_dots$srcdir ;; - esac + 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` + case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_dots$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then - { echo "$as_me:6409: creating $ac_file" >&5 + { 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 automatically by config.status. */ - configure_input="Generated automatically from `echo $ac_file_in | - sed 's,.*/,,'` by configure." + # /* 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. @@ -6424,7 +8195,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:6427: error: cannot find input file: $f" >&5 + 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;; @@ -6437,23 +8208,29 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:6440: error: cannot find input file: $f" >&5 + { { 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; } -EOF -cat >>$CONFIG_STATUS <<EOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub -EOF -cat >>$CONFIG_STATUS <<\EOF +_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 @@ -6465,8 +8242,8 @@ s,@INSTALL@,$ac_INSTALL,;t t fi done -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. @@ -6498,7 +8275,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue * ) ac_file_in=$ac_file.in ;; esac - test x"$ac_file" != x- && { echo "$as_me:6501: creating $ac_file" >&5 + 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 @@ -6509,7 +8286,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:6512: error: cannot find input file: $f" >&5 + 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;; @@ -6522,7 +8299,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:6525: error: cannot find input file: $f" >&5 + { { 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;; @@ -6531,7 +8308,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in -EOF +_ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into @@ -6547,16 +8324,16 @@ rm -f conftest.defines conftest.undefs # `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 <<\EOF +cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear -s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp +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 -EOF +_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. @@ -6567,9 +8344,9 @@ rm -f confdef2sed.sed # This sed command replaces #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 <<\EOF +cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -EOF +_ACEOF # 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). @@ -6626,23 +8403,24 @@ do done rm -f conftest.undefs -cat >>$CONFIG_STATUS <<\EOF +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 automatically by config.status. */ + # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then - echo "/* Generated automatically by configure. */" >$tmp/config.h + echo "/* Generated by configure. */" >$tmp/config.h else - echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h + 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 cmp -s $ac_file $tmp/config.h 2>/dev/null; then - { echo "$as_me:6642: $ac_file is unchanged" >&5 + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + 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\(/\)' \| \ @@ -6653,8 +8431,7 @@ echo X"$ac_file" | /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - { case "$ac_dir" in + { case "$ac_dir" in [\\/]* | ?:[\\/]* ) as_incr_dir=;; *) as_incr_dir=.;; esac @@ -6665,12 +8442,15 @@ for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do ?:) as_incr_dir=$as_mkdir_dir ;; *) as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || mkdir "$as_incr_dir" + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } ;; esac done; } - fi rm -f $ac_file mv $tmp/config.h $ac_file fi @@ -6679,8 +8459,8 @@ done; } rm -f $tmp/config.h fi done -EOF -cat >>$CONFIG_STATUS <<\EOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. @@ -6688,7 +8468,53 @@ cat >>$CONFIG_STATUS <<\EOF 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=. + +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 ) # a hook for preserving undef directive in config.h @@ -6698,15 +8524,16 @@ rm -f conftest ;; esac done -EOF +_ACEOF -cat >>$CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } -EOF +_ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open @@ -6725,6 +8552,7 @@ if test "$no_create" != yes; then $ac_cs_success || { (exit 1); exit 1; } fi + echo "" if test -z "$AWK"; then echo "!!! Since you have no awk you must copy the files 'comm.h.dist'" @@ -6732,7 +8560,7 @@ echo "!!! and 'term.h.dist' to 'comm.h' and 'term.h'." echo "!!! Do _not_ change the user configuration section in config.h!" echo "Please check the pathnames in the Makefile." else -echo "Now please check the pathnames in the Makefile and the user" +echo "Now please check the pathnames in the Makefile and in the user" echo "configuration section in config.h." fi echo "Then type 'make' to make screen. Good luck." diff --git a/src/configure.in b/src/configure.in index faeb7e6..bc7fcca 100644 --- a/src/configure.in +++ b/src/configure.in @@ -200,8 +200,8 @@ LIBS="$LIBS -lelf" AC_CHECKING(SVR4) AC_TRY_LINK([#include <utmpx.h> ],, -AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN), -AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))) +[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN), +[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])] ,LIBS="$oldlibs") AC_CHECKING(for Solaris 2.x) @@ -681,12 +681,20 @@ AC_DEFINE(HAVE_DEV_PTC) fi AC_CHECKING(for SVR4 ptys) +sysvr4ptys= if test -c /dev/ptmx ; then -AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],AC_DEFINE(HAVE_SVR4_PTYS)) +AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS) +sysvr4ptys=1]) fi AC_CHECK_FUNCS(getpt) +dnl check for openpty() +if test -z "$sysvr4ptys"; then +AC_CHECK_FUNCS(openpty,, +[AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])]) +fi + AC_CHECKING(for ptyranges) if test -d /dev/ptym ; then pdir='/dev/ptym' @@ -714,6 +722,14 @@ fi dnl **** pty mode/group handling **** dnl dnl support provided by Luke Mewburn <lm@rmit.edu.au>, 931222 +AC_ARG_WITH(pty-mode, [ --with-pty-mode=mode default mode for ptys], [ ptymode="${withval}" ]) +AC_ARG_WITH(pty-group, [ --with-pty-group=group default group for ptys], [ ptygrp="${withval}" ]) +test -n "$ptymode" || ptymode=0620 +if test -n "$ptygrp" ; then +AC_DEFINE_UNQUOTED(PTYMODE, $ptymode) +AC_DEFINE_UNQUOTED(PTYGROUP,$ptygrp) +else + AC_CHECKING(default tty permissions/group) rm -f conftest_grp AC_TRY_RUN([ @@ -747,8 +763,8 @@ main() ],[ if test -f conftest_grp; then ptygrp=`cat conftest_grp` - AC_NOTE([- pty mode: 0620, group: $ptygrp]) - AC_DEFINE(PTYMODE, 0620) + AC_NOTE([- pty mode: $ptymode, group: $ptygrp]) + AC_DEFINE_UNQUOTED(PTYMODE, $ptymode) AC_DEFINE_UNQUOTED(PTYGROUP,$ptygrp) else AC_NOTE(- ptys are world accessable) @@ -778,8 +794,8 @@ main() found=`find $WRITEPATH $XTERMPATH $findfollow -perm -2000 -print` if test -n "$found"; then ptygrp=`ls -ln$lsfollow $found | sed -n -e 1p | $AWK '{print $4}'` - AC_NOTE([- pty mode: 0620, group: $ptygrp]) - AC_DEFINE(PTYMODE, 0620) + AC_NOTE([- pty mode: $ptymode, group: $ptygrp]) + AC_DEFINE_UNQUOTED(PTYMODE, $ptymode) AC_DEFINE_UNQUOTED(PTYGROUP,$ptygrp) else AC_NOTE(- ptys are world accessable) @@ -790,6 +806,7 @@ main() ] ) rm -f conftest_grp +fi dnl dnl **** utmp handling **** @@ -1201,6 +1218,8 @@ AC_TRY_LINK([ #include <langinfo.h> ],[nl_langinfo(CODESET);], AC_MSG_RESULT(yes);AC_DEFINE(HAVE_NL_LANGINFO), AC_MSG_RESULT(no)) +AC_SEARCH_LIBS(gethostname, nsl) + AC_CHECK_FUNCS(rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd setlocale strftime) AC_ARG_ENABLE(pam, [ --enable-pam enable PAM support]) @@ -1278,7 +1297,7 @@ echo "!!! and 'term.h.dist' to 'comm.h' and 'term.h'." echo "!!! Do _not_ change the user configuration section in config.h!" echo "Please check the pathnames in the Makefile." else -echo "Now please check the pathnames in the Makefile and the user" +echo "Now please check the pathnames in the Makefile and in the user" echo "configuration section in config.h." fi echo "Then type 'make' to make screen. Good luck." diff --git a/src/display.c b/src/display.c index 7b5b3e5..73fd56d 100644 --- a/src/display.c +++ b/src/display.c @@ -83,7 +83,7 @@ short ospeed; struct display *display, *displays; #ifdef COLOR -int attr2color[8]; +int attr2color[8][4]; int nattr2color; #endif @@ -833,6 +833,13 @@ int c; return; } # endif + if (c < 32) + { + AddCStr2(D_CS0, '0'); + AddChar(c + 0x5f); + AddCStr(D_CE0); + goto addedutf8; + } AddUtf8(c); goto addedutf8; } @@ -1021,12 +1028,19 @@ int mode; { if (display && D_mouse != mode) { + char mousebuf[20]; if (!D_CXT) return; if (D_mouse) - AddStr(D_mouse == 9 ? "\033[?9l" : "\033[?1000l"); + { + sprintf(mousebuf, "\033[?%dl", D_mouse); + AddStr(mousebuf); + } if (mode) - AddStr(mode == 9 ? "\033[?9h" : "\033[?1000h"); + { + sprintf(mousebuf, "\033[?%dl", mode); + AddStr(mousebuf); + } D_mouse = mode; } } @@ -1801,7 +1815,8 @@ void SetFont(new) int new; { - if (!display || D_rend.font == new) + int old = D_rend.font; + if (!display || old == new) return; D_rend.font = new; #ifdef ENCODINGS @@ -1819,7 +1834,11 @@ int new; } if (!D_CG0 && new != '0') - new = ASCII; + { + new = ASCII; + if (old == new) + return; + } if (new == ASCII) AddCStr(D_CE0); @@ -1902,8 +1921,17 @@ int f, b; of = rend_getfg(&D_rend); ob = rend_getbg(&D_rend); +#ifdef COLORS16 + /* intense default not invented yet */ + if (f == 0x100) + f = 0; + if (b == 0x100) + b = 0; +#endif debug2("SetColor %d %d", coli2e(of), coli2e(ob)); debug2(" -> %d %d\n", coli2e(f), coli2e(b)); + debug2("(%d %d", of, ob); + debug2(" -> %d %d)\n", f, b); if (!D_CAX && D_hascolor && ((f == 0 && f != of) || (b == 0 && b != ob))) { @@ -2018,7 +2046,16 @@ struct mchar *mc; mmc = *mc; for (i = 0; i < 8; i++) if (attr2color[i] && (mc->attr & (1 << i)) != 0) - ApplyAttrColor(attr2color[i], &mmc); + { + if (mc->color == 0 && attr2color[i][3]) + ApplyAttrColor(attr2color[i][3], &mmc); + else if ((mc->color & 0x0f) == 0 && attr2color[i][2]) + ApplyAttrColor(attr2color[i][2], &mmc); + else if ((mc->color & 0xf0) == 0 && attr2color[i][1]) + ApplyAttrColor(attr2color[i][1], &mmc); + else + ApplyAttrColor(attr2color[i][0], &mmc); + } mc = &mmc; debug2("SetRendition: mapped to %02x %02x\n", (unsigned char)mc->attr, 0x99 - (unsigned char)mc->color); } @@ -2347,7 +2384,7 @@ RefreshHStatus() evdeq(&D_hstatusev); if (D_status == STATUS_ON_HS) return; - buf = MakeWinMsgEv(hstatusstring, D_fore, '%', (D_HS && D_has_hstatus == HSTATUS_HS) ? D_WS : D_width - !D_CLP, &D_hstatusev); + buf = MakeWinMsgEv(hstatusstring, D_fore, '%', (D_HS && D_has_hstatus == HSTATUS_HS && D_WS > 0) ? D_WS : D_width - !D_CLP, &D_hstatusev, 0); if (buf && *buf) { ShowHStatus(buf); @@ -2513,7 +2550,7 @@ int y, from, to, isblank; } p = Layer2Window(cv->c_layer); - buf = MakeWinMsgEv(captionstring, p, '%', D_width - !D_CLP, &cv->c_captev); + 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); @@ -2843,11 +2880,11 @@ int ins; y--; } } - else if (y == D_bot) - ChangeScrollRegion(ys, ye); /* remove unusable region */ + else if (y == D_bot) /* remove unusable region? */ + ChangeScrollRegion(0, D_height - 1); if (D_x != D_width || D_y != y) { - if (D_CLP) /* don't even try if !LP */ + if (D_CLP && y >= 0) /* don't even try if !LP */ RefreshLine(y, D_width - 1, D_width - 1, 0); debug2("- refresh last char -> x,y now %d,%d\n", D_x, D_y); if (D_x != D_width || D_y != y) /* sorry, no bonus */ @@ -2919,6 +2956,8 @@ int newtop, newbot; { if (display == 0) return; + if (newtop == newbot) + return; /* xterm etc can't do it */ if (newtop == -1) newtop = 0; if (newbot == -1) @@ -3357,8 +3396,9 @@ char *data; #ifdef ENCODINGS if (D_encoding != (D_forecv ? D_forecv->c_layer->l_encoding : 0)) { - int i, j, c; + int i, j, c, enc; char buf2[IOSIZE * 2 + 10]; + enc = D_forecv ? D_forecv->c_layer->l_encoding : 0; for (i = j = 0; i < size; i++) { c = ((unsigned char *)buf)[i]; @@ -3370,11 +3410,11 @@ char *data; if (pastefont) { int font = 0; - j += EncodeChar(buf2 + j, c, D_forecv->c_layer->l_encoding, &font); - j += EncodeChar(buf2 + j, 0, D_forecv->c_layer->l_encoding, &font); + j += EncodeChar(buf2 + j, c, enc, &font); + j += EncodeChar(buf2 + j, -1, enc, &font); } else - j += EncodeChar(buf2 + j, c, D_forecv->c_layer->l_encoding, 0); + j += EncodeChar(buf2 + j, c, enc, 0); if (j > sizeof(buf2) - 10) /* just in case... */ break; } diff --git a/src/doc/screen.1 b/src/doc/screen.1 index aad6aef..2ba42fd 100644 --- a/src/doc/screen.1 +++ b/src/doc/screen.1 @@ -1,5 +1,5 @@ .\" vi:set wm=5 -.TH SCREEN 1 "Jan 2002" +.TH SCREEN 1 "Mar 2003" .if n .ds Q \&" .if n .ds U \&" .if t .ds Q `` @@ -130,7 +130,7 @@ deals with the contents of your .screenrc. .PP If your terminal is a \*Qtrue\*U auto-margin terminal (it doesn't allow the last position on the screen to be updated without scrolling the -screen) consider to use a version of your terminal's termcap that has +screen) consider using a version of your terminal's termcap that has automatic margins turned \fIoff\fP. This will ensure an accurate and optimal update of the screen in all circumstances. Most terminals nowadays have \*Qmagic\*U margins (automatic margins plus usable last @@ -253,9 +253,7 @@ Ask your system administrator if you are not sure. Remove sessions with the .B \-L tells .I screen -your auto-margin terminal has a writable last-position on -the screen. This can also be set in your .screenrc by specifying `LP' in a -\*Qtermcap\*U command. +to turn on automatic output logging for the windows. .TP 5 .B \-m causes @@ -284,6 +282,13 @@ emulation (only affects auto-margin terminals without `LP'). This can also be set in your .screenrc by specifying `OP' in a \*Qtermcap\*U 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 +selects the blank window. As a special case for reattach, \*Q=\*U +brings up the windowlist on the blank window. +.TP 5 .B \-q Suppress printing of error messages. In combination with \*Q-ls\*U the exit value is as follows: 9 indicates a directory without sessions. 10 @@ -748,6 +753,12 @@ on all windows overriding the \*Qpartial\*U settings. It does not change the default redraw behavior of newly created windows. .sp .ne 3 +.BR "altscreen on" | off +.PP +If set to on, "alternate screen" support is enabled in virtual terminals, +just like in xterm. Initial setting is `off'. +.sp +.ne 3 .BR "at " "[\fIidentifier\fP][" "#\fP|\fP*\fP|\fP%\fP] " .IR "command " [ args " ... ]" .PP @@ -777,7 +788,7 @@ once per window. Commands that change the internal arrangement of windows (like \*Qother\*U) may be called again. In shared windows the command will be repeated for each attached display. Beware, when issuing toggle commands like \*Qlogin\*U! -Some commands (e.g. \*Qstuff\*U, \*Qprocess\*U or \*Qpaste\*U) require that +Some commands (e.g. \*Qprocess\*U) require that a display is associated with the target windows. These commands may not work correctly under \*Qat\*U looping over windows. .sp @@ -804,7 +815,7 @@ attrcolor u "-u b" .PP Use blue text instead of underline. .IP -attrcolor b "I" +attrcolor b ".I" .PP Use bright colors for bold text. Most terminal emulators do this already. @@ -834,6 +845,35 @@ that has not been written to the terminal. See also \*Qobuflimit\*U. .sp .ne 3 +.BI "backtick " id +.I lifespan +.I autorefresh +.I cmd +.I args... +.br +.BI "backtick " id +.PP +Program the backtick command with the numerical id \fIid\fP. +The output of such a command is used for substitution of the +\*Q%`\*U string escape. The specified \fIlifespan\fP is the number +of seconds the output is considered valid. After this time, the +command is run again if a corresponding string escape is encountered. +The \fIautorefresh\fP parameter triggers an +automatic refresh for caption and hardstatus strings after the +specified number of seconds. Only the last line of output is used +for substitution. +.br +If both the \fIlifespan\fP and the \fIautorefresh\fP parameters +are zero, the backtick program is expected to stay in the +background and generate output once in a while. +In this case, the command is executed right away and screen stores +the last line of output. If a new line gets printed screen will +automatically refresh the hardstatus or the captions. +.br +The second form of the command deletes the backtick command +with the numerical id \fIid\fP. +.sp +.ne 3 .BR "bce " [ on | off ] .PP Change background-color-erase setting. If \*Qbce\*U is set to on, all @@ -1154,7 +1194,7 @@ class. See also \*Qbind\*U and \*Qbindkey\*U. .ne 3 .BR "compacthist " [ on | off ] .PP -This tells screen weather to suppress trailing blank lines when +This tells screen whether to suppress trailing blank lines when scrolling up text into the history buffer. .sp .ne 3 @@ -1200,6 +1240,9 @@ of the top, center or bottom line of the window. \fBw\fP, \fBb\fP, \fBe\fP move the cursor word by word. .br .ti -2n +\fBB\fP, \fBE\fP move the cursor WORD by WORD (as in vi). +.br +.ti -2n \fBC-u\fP and \fBC-d\fP scroll the display up/down by the specified amount of lines while preserving the cursor position. (Default: half screen-full). .br @@ -1624,7 +1667,7 @@ The default is \*Q^Aa\*U. .RI [ command2 .IR ... ] .PP -Parses and executes each argument as seperate command. +Parses and executes each argument as separate command. .sp .ne 3 .B exec @@ -1820,7 +1863,7 @@ message mechanism and \*Qignore\*U tells .I screen never to display the hardstatus. -If you prepend the word \*Qalways\*U to the type, +If you prepend the word \*Qalways\*U to the type (e.g., \*Qalwayslastline\*U), .I screen will use the type even if the terminal supports a hardstatus. .P @@ -1891,7 +1934,7 @@ Change the window's hardstatus line to the string \fIstatus\fP. .ne 3 .BR "ignorecase " [ on | off ] .PP -Tell screen to ignore the case of caracters in searches. Default is +Tell screen to ignore the case of characters in searches. Default is `off'. .sp .ne 3 @@ -1916,7 +1959,6 @@ The current line wrap setting (`+wrap' indicates enabled, `\-wrap' not) is also shown. The flags `ins', `org', `app', `log', `mon' or `nored' are displayed when the window is in insert mode, origin mode, application-keypad mode, has output logging, -insert mode, origin mode, application-keypad mode, output logging, activity monitoring or partial redraw enabled. The currently active character set (\fIG0\fP, \fIG1\fP, \fIG2\fP, @@ -1950,7 +1992,7 @@ needed as screen uses the locale setting to detect the encoding. There is also a way to select a terminal encoding depending on the terminal type by using the \*QKJ\*U termcap entry. -Supported encodings are eucJP, SJIS, eucKR, eucCN, Big5, KOI8-R, +Supported encodings are eucJP, SJIS, eucKR, eucCN, Big5, GBK, KOI8-R, CP1251, UTF-8, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, ISO8859-6, ISO8859-7, ISO8859-8, ISO8859-9, ISO8859-10, ISO8859-15, jis. @@ -2120,6 +2162,12 @@ As shown in this example, multiple keys can be assigned to one function in a single statement. .sp .ne 3 +.BI "maxwin " num +.PP +Set the maximum window number screen will create. Doesn't affect +already existing windows. The number may only be decreased. +.sp +.ne 3 .B meta .PP Insert the command character (C-a) in the current window's input stream. @@ -2583,7 +2631,7 @@ text. .PP Read and execute commands from file \fIfile\fP. Source commands may be nested to a maximum recursion level of ten. If file is not an -absolute path and screen already processes a source command, the +absolute path and screen is already processing a source command, the parent directory of the running source command file is used to search for the new command file before screen's current directory. @@ -2606,7 +2654,8 @@ The default is currently \*Q=s dd\*U (standout, default colors). .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. +window is displayed on the new region. Use the \*Qremove\*U or the +\*Qonly\*U command to delete regions. .sp .ne 3 .B "startup_message on\fP|\fBoff" @@ -2783,9 +2832,9 @@ described in the \*QSTRING ESCAPES\*U chapter. Screen uses a default of "%c:%s %M %d %H%? %l%?". .sp .ne 3 -.BR "title " [ \fIwindowalias ] +.BR "title " [ \fIwindowtitle ] .PP -Set the name of the current window to \fIwindowalias\fP. If no name is +Set the name of the current window to \fIwindowtitle\fP. If no name is specified, .I screen prompts for one. This command was known as `aka' in previous @@ -3175,8 +3224,8 @@ last two digits of the year number .IP Y full year number .IP ? -the part to the next '%?' is displayed only if an escape expands to an -nonempty string +the part to the next '%?' is displayed only if a '%' escape +inside the part expands to a non-empty string .IP : else part of '%?' .IP = @@ -3200,6 +3249,9 @@ operator.) The 'L' qualifier tells screen to mark the truncated parts with '...'. .IP { attribute/color modifier string terminated by the next \*Q}\*U +.IP ` +Substitute with the output of a 'backtick' command. The length +qualifier is misused to identify one of the commands. .P The 'c' and 'C' escape may be qualified with a '0' to make .I screen @@ -3226,9 +3278,11 @@ change the current attributes to the specified set .PP The attribute set can either be specified as a hexadecimal number or a combination of the following letters: +.IP d +dim +.PD 0 .IP u underline -.PD 0 .IP b bold .IP r @@ -3632,6 +3686,9 @@ scrolling regions. Note that this may provoke confusion, when the session is reattached on a different terminal, as the value of $TERMCAP cannot be modified by parent processes. .PP +The "alternate screen" capability is not enabled by default. +Set the \fBaltscreen\fP .screenrc command to enable it. +.PP The following is a list of control sequences recognized by .IR screen . \*Q(V)\*U and \*Q(A)\*U indicate VT100-specific and ANSI- or @@ -3959,9 +4016,18 @@ X10 mouse tracking \h'\w'ESC [ Ps = 'u'\fB?25\fP (V) Visible Cursor .TP 27 +\h'\w'ESC [ Ps = 'u'\fB?47\fP +Alternate Screen (old xterm code) +.TP 27 \h'\w'ESC [ Ps = 'u'\fB?1000\fP (V) VT200 mouse tracking .TP 27 +\h'\w'ESC [ Ps = 'u'\fB?1047\fP +Alternate Screen (new xterm code) +.TP 27 +\h'\w'ESC [ Ps = 'u'\fB?1049\fP +Alternate Screen (new xterm code) +.TP 27 .BR "ESC [ 5 i" " (A)" Start relay to printer (ANSI Media Copy) .TP 27 @@ -4313,7 +4379,7 @@ produced by Wayne Davison, Juergen Weigert and Michael Schroeder. .SH COPYLEFT .nf -Copyright (C) 1993-2002 +Copyright (C) 1993-2003 Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) Copyright (C) 1987 Oliver Laumann @@ -4357,8 +4423,8 @@ Frank van der Linden (vdlinden@fwi.uva.nl), Martin Schweikert (schweik@cpp.ob.open.de), David Vrona (dave@sashimi.lcu.com), E. Tye McQueen (tye%spillman.UUCP@uunet.uu.net), -Matthew Green (mrg@mame.mu.oz.au), -Christopher Williams (cgw@unt.edu), +Matthew Green (mrg@eterna.com.au), +Christopher Williams (cgw@pobox.com), Matt Mosley (mattm@access.digex.net), Gregory Neil Shapiro (gshapiro@wpi.WPI.EDU), Johannes Zellner (johannes@zellner.org), @@ -4367,7 +4433,7 @@ Pablo Averbuj (pablo@averbuj.com). .SH VERSION -This is version 3.9.9. Its roots are a merge of a custom version +This is version 3.9.15. Its roots are a merge of a custom version 2.3PR7 by Wayne Davison and several enhancements to Oliver Laumann's version 2.0. Note that all versions numbered 2.x are copyright by Oliver Laumann. diff --git a/src/doc/screen.info b/src/doc/screen.info index 25800d8..619ae88 100644 --- a/src/doc/screen.info +++ b/src/doc/screen.info @@ -1,4 +1,4 @@ -This is screen.info, produced by makeinfo version 4.0 from +This is screen.info, produced by makeinfo version 4.2 from ./screen.texinfo. INFO-DIR-SECTION General Commands @@ -8,7 +8,7 @@ END-INFO-DIR-ENTRY This file documents the `Screen' virtual terminal manager. - Copyright (c) 1993-2002 Free Software Foundation, Inc. + Copyright (c) 1993-2003 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -27,168 +27,170 @@ translation approved by the Foundation. Indirect: screen.info-1: 995 -screen.info-2: 50933 -screen.info-3: 100453 -screen.info-4: 149266 -screen.info-5: 195279 +screen.info-2: 50768 +screen.info-3: 99031 +screen.info-4: 148181 +screen.info-5: 198045 Tag Table: (Indirect) Node: Top995 Node: Overview3004 Node: Getting Started6634 -Node: Invoking Screen8389 -Node: Customization16916 -Node: Startup Files17462 -Node: Source19108 -Node: Colon19785 -Node: Commands20399 -Node: Default Key Bindings21356 -Node: Command Summary27035 -Node: New Window40444 -Node: Chdir41245 -Node: Screen Command42216 -Node: Setenv43917 -Node: Shell44437 -Node: Term45203 -Node: Window Types45984 -Node: Selecting50303 -Node: Next and Previous50933 -Node: Other Window51463 -Node: Select51871 -Node: Windowlist52549 -Node: Session Management53445 -Node: Detach54274 -Node: Power Detach55661 -Node: Lock56300 -Node: Multiuser Session57186 -Node: Multiuser58148 -Node: Acladd58535 -Node: Aclchg59100 -Node: Acldel60506 -Node: Aclgrp60841 -Node: Displays61492 -Node: Umask61786 -Node: Wall62735 -Node: Writelock62972 -Node: Su63868 -Node: Session Name64668 -Node: Suspend65215 -Node: Quit65547 -Node: Regions65971 -Node: Split66538 -Node: Focus66828 -Node: Only67406 -Node: Remove67570 -Node: Resize67778 -Node: Caption68426 -Node: Fit69183 -Node: Window Settings69485 -Node: Naming Windows70220 -Node: Title Command71721 -Node: Dynamic Titles71995 -Node: Title Prompts73531 -Node: Title Screenrc74612 -Node: Console76251 -Node: Kill76694 -Node: Login77583 -Node: Mode78400 -Node: Monitor78798 -Node: Windows80209 -Node: Hardstatus81269 -Node: Virtual Terminal82462 -Node: Control Sequences83520 -Node: Input Translation91007 -Node: Digraph95478 -Node: Bell96270 -Node: Clear98149 -Node: Info98352 -Node: Redisplay100453 -Node: Wrap101584 -Node: Reset102335 -Node: Window Size102653 -Node: Character Processing103506 -Node: Copy and Paste107824 -Node: Copy108429 -Node: Line Termination109276 -Node: Scrollback109685 -Node: Copy Mode Keys110422 -Node: Movement111236 -Node: Marking112390 -Node: Repeat count112765 -Node: Searching113079 -Node: Specials113470 -Node: Paste115424 -Node: Registers118182 -Node: Screen Exchange119274 -Node: History120679 -Node: Subprocess Execution121419 -Node: Exec121783 -Node: Using Exec123529 -Node: Key Binding125368 -Node: Bind126011 -Node: Bind Examples127255 -Node: Command Character128311 -Node: Help129946 -Node: Bindkey130554 -Node: Bindkey Examples132104 -Node: Bindkey Control132993 -Node: Flow Control133590 -Node: Flow Control Summary134166 -Node: Flow137100 -Node: XON/XOFF137874 -Node: Termcap138247 -Node: Window Termcap139104 -Node: Dump Termcap144345 -Node: Termcap Syntax145059 -Node: Termcap Examples147225 -Node: Special Capabilities149266 -Node: Autonuke152041 -Node: Obuflimit152691 -Node: Character Translation153520 -Node: Message Line156134 -Node: Privacy Message157045 -Node: Hardware Status Line157542 -Node: Last Message159215 -Node: Message Wait159642 -Node: Logging160068 -Node: Hardcopy160392 -Node: Log161327 -Node: Startup163104 -Node: echo163511 -Node: sleep163919 -Node: Startup Message164260 -Node: Miscellaneous164533 -Node: At165767 -Node: Break167761 -Node: Debug169407 -Node: License169884 -Node: Nethack170149 -Node: Nonblock170826 -Node: Number171280 -Node: Silence171650 -Node: Time172586 -Node: Verbose173178 -Node: Version173512 -Node: Zombie173721 -Node: Printcmd174775 -Node: Sorendition175481 -Node: Attrcolor175911 -Node: Setsid176960 -Node: Eval177477 -Node: String Escapes177671 -Node: Environment182807 -Node: Files183903 -Node: Credits184991 -Node: Bugs187001 -Node: Known Bugs187471 -Node: Reporting Bugs189565 -Node: Availability190331 -Node: Installation190875 -Node: Socket Directory191265 -Node: Compiling Screen191795 -Node: Concept Index193187 -Node: Command Index195279 -Node: Keystroke Index204113 +Node: Invoking Screen8388 +Node: Customization17073 +Node: Startup Files17619 +Node: Source19265 +Node: Colon19950 +Node: Commands20564 +Node: Default Key Bindings21521 +Node: Command Summary27200 +Node: New Window40909 +Node: Chdir41710 +Node: Screen Command42681 +Node: Setenv44382 +Node: Shell44902 +Node: Term45668 +Node: Window Types46449 +Node: Selecting50768 +Node: Next and Previous51398 +Node: Other Window51928 +Node: Select52336 +Node: Windowlist53014 +Node: Session Management53910 +Node: Detach54739 +Node: Power Detach56126 +Node: Lock56765 +Node: Multiuser Session57651 +Node: Multiuser58613 +Node: Acladd59000 +Node: Aclchg59565 +Node: Acldel60972 +Node: Aclgrp61307 +Node: Displays61958 +Node: Umask62252 +Node: Wall63201 +Node: Writelock63438 +Node: Su64334 +Node: Session Name65134 +Node: Suspend65681 +Node: Quit66013 +Node: Regions66437 +Node: Split67004 +Node: Focus67294 +Node: Only67872 +Node: Remove68036 +Node: Resize68244 +Node: Caption68892 +Node: Fit69649 +Node: Window Settings69951 +Node: Naming Windows70686 +Node: Title Command72187 +Node: Dynamic Titles72461 +Node: Title Prompts73997 +Node: Title Screenrc75078 +Node: Console76717 +Node: Kill77160 +Node: Login78049 +Node: Mode78866 +Node: Monitor79264 +Node: Windows80675 +Node: Hardstatus81735 +Node: Virtual Terminal82928 +Node: Control Sequences83986 +Node: Input Translation91686 +Node: Digraph96157 +Node: Bell96949 +Node: Clear98828 +Node: Info99031 +Node: Redisplay101060 +Node: Wrap102363 +Node: Reset103114 +Node: Window Size103432 +Node: Character Processing104285 +Node: Copy and Paste108610 +Node: Copy109215 +Node: Line Termination110062 +Node: Scrollback110471 +Node: Copy Mode Keys111208 +Node: Movement112022 +Node: Marking113227 +Node: Repeat count113602 +Node: Searching113916 +Node: Specials114308 +Node: Paste116262 +Node: Registers119317 +Node: Screen Exchange120110 +Node: History121515 +Node: Subprocess Execution122255 +Node: Exec122619 +Node: Using Exec124365 +Node: Key Binding126204 +Node: Bind126847 +Node: Bind Examples128091 +Node: Command Character129147 +Node: Help130782 +Node: Bindkey131390 +Node: Bindkey Examples132940 +Node: Bindkey Control133829 +Node: Flow Control134426 +Node: Flow Control Summary135002 +Node: Flow137936 +Node: XON/XOFF138710 +Node: Termcap139083 +Node: Window Termcap139940 +Node: Dump Termcap145301 +Node: Termcap Syntax146015 +Node: Termcap Examples148181 +Node: Special Capabilities150222 +Node: Autonuke152997 +Node: Obuflimit153647 +Node: Character Translation154476 +Node: Message Line157090 +Node: Privacy Message158001 +Node: Hardware Status Line158498 +Node: Last Message160201 +Node: Message Wait160628 +Node: Logging161054 +Node: Hardcopy161378 +Node: Log162313 +Node: Startup164090 +Node: echo164497 +Node: sleep164905 +Node: Startup Message165246 +Node: Miscellaneous165519 +Node: At166859 +Node: Break168829 +Node: Debug170475 +Node: License170952 +Node: Nethack171217 +Node: Nonblock171894 +Node: Number172348 +Node: Silence172718 +Node: Time173654 +Node: Verbose174246 +Node: Version174580 +Node: Zombie174789 +Node: Printcmd175843 +Node: Sorendition176549 +Node: Attrcolor176979 +Node: Setsid178029 +Node: Eval178546 +Node: Maxwin178755 +Node: Backtick179025 +Node: String Escapes180251 +Node: Environment185576 +Node: Files186672 +Node: Credits187760 +Node: Bugs189772 +Node: Known Bugs190242 +Node: Reporting Bugs192336 +Node: Availability193102 +Node: Installation193646 +Node: Socket Directory194036 +Node: Compiling Screen194566 +Node: Concept Index195953 +Node: Command Index198045 +Node: Keystroke Index207027 End Tag Table diff --git a/src/doc/screen.info-1 b/src/doc/screen.info-1 index 63a2c6a..c2652f9 100644 --- a/src/doc/screen.info-1 +++ b/src/doc/screen.info-1 @@ -1,4 +1,4 @@ -This is screen.info, produced by makeinfo version 4.0 from +This is screen.info, produced by makeinfo version 4.2 from ./screen.texinfo. INFO-DIR-SECTION General Commands @@ -8,7 +8,7 @@ END-INFO-DIR-ENTRY This file documents the `Screen' virtual terminal manager. - Copyright (c) 1993-2002 Free Software Foundation, Inc. + Copyright (c) 1993-2003 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -31,7 +31,7 @@ Screen ****** This file documents the `Screen' virtual terminal manager, version -3.9.11. +3.9.15. * Menu: @@ -156,7 +156,7 @@ Another section (*note Customization::) deals with the contents of your If your terminal is a "true" auto-margin terminal (it doesn't allow the last position on the screen to be updated without scrolling the -screen) consider to use a version of your terminal's termcap that has +screen) consider using a version of your terminal's termcap that has automatic margins turned _off_. This will ensure an accurate and optimal update of the screen in all circumstances. Most terminals nowadays have "magic" margins (automatic margins plus usable last @@ -235,7 +235,7 @@ Invoking `Screen' literal command character (when typed after the command character) to Y. The defaults are `C-a' and `a', which can be specified as `-e^Aa'. When creating a `screen' session, this option sets the - default command caracter. In a multiuser session all users added + default command character. In a multiuser session all users added will start off with this command character. But when attaching to an already running session, this option only changes the command character of the attaching user. This option is equivalent to the @@ -281,10 +281,7 @@ Invoking `Screen' `-wipe' option. `-L' - Tell `screen' that your auto-margin terminal allows programs to - write to the last column of the last row of the screen without - scrolling. This can also be set in your `.screenrc' by specifying - `xn' in a `termcap' command (*note Termcap::). + Tell `screen' to turn on automatic output logging for the windows. `-m' Tell `screen' to ignore the `$STY' environment variable. When @@ -301,6 +298,13 @@ Invoking `Screen' This also starts `screen' in _detached_ mode, but doesn't fork a new process. The command exits if the session terminates. +`-p 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 `-X' option + to a specific window. As with screen's select commant, `-' selects + the blank window. As a special case for reattach, `=' brings up + the windowlist on the blank window. + `-q' Suppress printing of error messages. In combination with `-ls' the exit value is set as follows: 9 indicates a directory without @@ -430,9 +434,10 @@ Source (none) Read and execute commands from file FILE. Source commands may be nested to a maximum recursion level of ten. If FILE is not an - absolute path and screen already processes a source command, - the parent directory of the running source command file is used to - search for the new command file before screen's current directory. + absolute path and screen is already processing a source + command, the parent directory of the running source command file + is used to search for the new command file before screen's + current directory. Note that termcap/terminfo/termcapinfo commands only work at startup and reattach time, so they must be reached via the @@ -785,6 +790,10 @@ Command Summary `allpartial STATE' Set all windows to partial refresh. *Note Redisplay::. +`altscreen STATE' + Enables support for the "alternate screen" terminal capability. + *Note Redisplay::. + `at [IDENT][#|*|%] COMMAND [ARGS]' Execute a command at other displays or windows. *Note At::. @@ -798,6 +807,9 @@ Command Summary Enable a clear screen to discard unwritten output. *Note Autonuke::. +`backtick ID LIFESPAN AUTOREFRESH COMMAND [ARGS]' + Define a command for the backtick string escape. *Note Backtick::. + `bce [STATE]' Change background color erase. *Note Character Processing::. @@ -1050,6 +1062,9 @@ Command Summary `markkeys STRING' Rebind keys in copy mode. *Note Copy Mode Keys::. +`maxwin N' + Set the maximum window number. *Note Maxwin::. + `meta' Insert the command character. *Note Command Character::. @@ -1516,20 +1531,3 @@ efficiently as a console with 100 or more windows. BREAK' (decimal 243) to the remote host. - -File: screen.info, Node: Selecting, Next: Session Management, Prev: New Window, Up: Top - -Selecting a Window -****************** - - This section describes the commands for switching between windows in -an `screen' session. The windows are numbered from 0 to 9, and are -created in that order by default (*note New Window::). - -* Menu: - -* Next and Previous:: Forward or back one window. -* Other Window:: Switch back and forth between two windows. -* Select:: Switch to a window (and to one after `kill'). -* Windowlist:: Present a list of all windows for selection. - diff --git a/src/doc/screen.info-2 b/src/doc/screen.info-2 index 21dfb8d..bfd1fc9 100644 --- a/src/doc/screen.info-2 +++ b/src/doc/screen.info-2 @@ -1,4 +1,4 @@ -This is screen.info, produced by makeinfo version 4.0 from +This is screen.info, produced by makeinfo version 4.2 from ./screen.texinfo. INFO-DIR-SECTION General Commands @@ -8,7 +8,7 @@ END-INFO-DIR-ENTRY This file documents the `Screen' virtual terminal manager. - Copyright (c) 1993-2002 Free Software Foundation, Inc. + Copyright (c) 1993-2003 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -25,6 +25,23 @@ versions, except that this permission notice may be stated in a translation approved by the Foundation. +File: screen.info, Node: Selecting, Next: Session Management, Prev: New Window, Up: Top + +Selecting a Window +****************** + + This section describes the commands for switching between windows in +an `screen' session. The windows are numbered from 0 to 9, and are +created in that order by default (*note New Window::). + +* Menu: + +* Next and Previous:: Forward or back one window. +* Other Window:: Switch back and forth between two windows. +* Select:: Switch to a window (and to one after `kill'). +* Windowlist:: Present a list of all windows for selection. + + File: screen.info, Node: Next and Previous, Next: Other Window, Up: Selecting Moving Back and Forth @@ -257,7 +274,7 @@ Aclchg a comma separated list of commands or windows (specified either by number or title). The special list `#' refers to all windows, `?' to all commands. If USERNAMES consists of a single `*', all known - users is affected. A command can be executed when the user has + users are affected. A command can be executed when the user has the `x' bit for it. The user can type input to a window when he has its `w' bit set and no other user obtains a writelock for this window. Other bits are currently ignored. To withdraw the @@ -608,7 +625,7 @@ Title Command - Command: title [windowtitle] (`C-a A') - Set the name of the current window to WINDOWALIAS. If no name is + Set the name of the current window to WINDOWTITLE. If no name is specified, screen prompts for one. @@ -1027,7 +1044,10 @@ functions, respectively. ?7 (V) `Wrap' Mode ?9 X10 mouse tracking ?25 (V) Visible Cursor + ?47 Alternate Screen (old xterm code) ?1000 (V) VT200 mouse tracking + ?1047 Alternate Screen (new xterm code) + ?1049 Alternate Screen (new xterm code) ESC [ 5 i (A) Start relay to printer (ANSI Media Copy) ESC [ 4 i (A) Stop relay to printer (ANSI Media Copy) ESC [ 8 ; Ph ; Pw t Resize the window to `Ph' lines and @@ -1201,49 +1221,3 @@ Clear (`C-a C') Clears the screen and saves its contents to the scrollback buffer. - -File: screen.info, Node: Info, Next: Redisplay, Prev: Clear, Up: Virtual Terminal - -Info -==== - - - Command: info - (`C-a i', `C-a C-i') - Uses the message line to display some information about the current - window: the cursor position in the form `(COLUMN,ROW)' starting - with `(1,1)', the terminal width and height plus the size of the - scrollback buffer in lines, like in `(80,24)+50', the current - state of window XON/XOFF flow control is shown like this (*note - Flow Control::): - +flow automatic flow control, currently on. - -flow automatic flow control, currently off. - +(+)flow flow control enabled. Agrees with automatic control. - -(+)flow flow control disabled. Disagrees with automatic control. - +(-)flow flow control enabled. Disagrees with automatic control. - -(-)flow flow control disabled. Agrees with automatic control. - - The current line wrap setting (`+wrap' indicates enabled, `-wrap' - not) is also shown. The flags `ins', `org', `app', `log', `mon' - and `nored' are displayed when the window is in insert mode, - origin mode, application-keypad mode, has output logging, insert - mode, origin mode, application-keypad mode, output logging, - activity monitoring or partial redraw enabled. - - The currently active character set (`G0', `G1', `G2', or `G3'), - and in square brackets the terminal character sets that are - currently designated as `G0' through `G3'. If the window is in - UTF-8 mode, the string `UTF-8' is shown instead. Additional modes - depending on the type of the window are displayed at the end of - the status line (*note Window Types::). - - If the state machine of the terminal emulator is in a non-default - state, the info line is started with a string identifying the - current state. - - For system information use `time'. - - - Command: dinfo - (none) - Show what screen thinks about your terminal. Useful if you want to - know why features like color or the alternate charset don't work. - diff --git a/src/doc/screen.info-3 b/src/doc/screen.info-3 index 298f9e3..03427a8 100644 --- a/src/doc/screen.info-3 +++ b/src/doc/screen.info-3 @@ -1,4 +1,4 @@ -This is screen.info, produced by makeinfo version 4.0 from +This is screen.info, produced by makeinfo version 4.2 from ./screen.texinfo. INFO-DIR-SECTION General Commands @@ -8,7 +8,7 @@ END-INFO-DIR-ENTRY This file documents the `Screen' virtual terminal manager. - Copyright (c) 1993-2002 Free Software Foundation, Inc. + Copyright (c) 1993-2003 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -25,6 +25,51 @@ versions, except that this permission notice may be stated in a translation approved by the Foundation. +File: screen.info, Node: Info, Next: Redisplay, Prev: Clear, Up: Virtual Terminal + +Info +==== + + - Command: info + (`C-a i', `C-a C-i') + Uses the message line to display some information about the current + window: the cursor position in the form `(COLUMN,ROW)' starting + with `(1,1)', the terminal width and height plus the size of the + scrollback buffer in lines, like in `(80,24)+50', the current + state of window XON/XOFF flow control is shown like this (*note + Flow Control::): + +flow automatic flow control, currently on. + -flow automatic flow control, currently off. + +(+)flow flow control enabled. Agrees with automatic control. + -(+)flow flow control disabled. Disagrees with automatic control. + +(-)flow flow control enabled. Disagrees with automatic control. + -(-)flow flow control disabled. Agrees with automatic control. + + The current line wrap setting (`+wrap' indicates enabled, `-wrap' + not) is also shown. The flags `ins', `org', `app', `log', `mon' + and `nored' are displayed when the window is in insert mode, + origin mode, application-keypad mode, has output logging, activity + monitoring or partial redraw enabled. + + The currently active character set (`G0', `G1', `G2', or `G3'), + and in square brackets the terminal character sets that are + currently designated as `G0' through `G3'. If the window is in + UTF-8 mode, the string `UTF-8' is shown instead. Additional modes + depending on the type of the window are displayed at the end of + the status line (*note Window Types::). + + If the state machine of the terminal emulator is in a non-default + state, the info line is started with a string identifying the + current state. + + For system information use `time'. + + - Command: dinfo + (none) + Show what screen thinks about your terminal. Useful if you want to + know why features like color or the alternate charset don't work. + + File: screen.info, Node: Redisplay, Next: Wrap, Prev: Info, Up: Virtual Terminal Redisplay @@ -40,6 +85,11 @@ Redisplay `partial' settings. It does not change the default redraw behavior of newly created windows. + - Command: altscreen state + (none) + If set to on, "alternate screen" support is enabled in virtual + terminals, just like in xterm. Initial setting is `off'. + - Command: partial state (none) Defines whether the display should be refreshed (as with @@ -151,7 +201,7 @@ Character Processing type by using the `KJ' termcap entry. *Note Special Capabilities::. Supported encodings are `eucJP', `SJIS', `eucKR', `eucCN', `Big5', - `KOI8-R', `CP1251', `UTF-8', `ISO8859-2', `ISO8859-3', + `GBK', `KOI8-R', `CP1251', `UTF-8', `ISO8859-2', `ISO8859-3', `ISO8859-4', `ISO8859-5', `ISO8859-6', `ISO8859-7', `ISO8859-8', `ISO8859-9', `ISO8859-10', `ISO8859-15', `jis'. @@ -286,7 +336,7 @@ Scrollback - Command: compacthist [state] (none) - This tells screen weather to suppress trailing blank lines when + This tells screen whether to suppress trailing blank lines when scrolling up text into the history buffer. Turn compacting `on' to hold more useful lines in your scrollback buffer. @@ -332,6 +382,8 @@ previous line. `w', `b', `e' move the cursor word by word. +`B', `E' move the cursor WORD by WORD (as in vi). + `C-u' and `C-d' scroll the display up/down by the specified amount of lines while preserving the cursor position. (Default: half screenfull). @@ -387,8 +439,8 @@ Searching - Command: ignorecase [state] (none) - Tell screen to ignore the case of caracters in searches. Default is - `off'. + Tell screen to ignore the case of characters in searches. Default + is `off'. File: screen.info, Node: Specials, Prev: Searching, Up: Copy @@ -469,9 +521,16 @@ Paste attached), as the registers are a global resource. The paste buffer exists once for every user. + - Command: stuff string + (none) + Stuff the string STRING in the input buffer of the current window. + This is like the `paste' command, but with much less overhead. + You cannot paste large buffers with the `stuff' command. It is most + useful for key bindings. *Note Bindkey::. + - Command: pastefont [state] Tell screen to include font information in the paste buffer. The - default is not to do so. This command is especially usefull for + default is not to do so. This command is especially useful for multi character fonts like kanji. - Command: slowpaste msec @@ -527,14 +586,6 @@ Registers Save the specified STRING to the register KEY. The encoding of the string can be specified via the `-e' option. - - Command: stuff string - (none) - Stuff the string STRING in the input buffer of the current window. - This is like the `paste' command, but with much less overhead. - You cannot paste large buffers with the `stuff' command. It is most - useful for key bindings. *Note Bindkey::. - - File: screen.info, Node: Screen Exchange, Next: History, Prev: Registers, Up: Copy and Paste @@ -1133,6 +1184,9 @@ session is reattached on a different terminal, as the value of `screen' to include all capabilities in `$TERMCAP' with the `-a' command-line option (*note Invoking Screen::). + The "alternate screen" capability is not enabled by default. Set +the `altscreen' `.screenrc' command to enable it. + File: screen.info, Node: Dump Termcap, Next: Termcap Syntax, Prev: Window Termcap, Up: Termcap @@ -1194,52 +1248,3 @@ unchanged (e.g. ""). The second (optional) tweak modifies all the window termcaps, and should contain definitions that screen understands (*note Virtual Terminal::). - -File: screen.info, Node: Termcap Examples, Next: Special Capabilities, Prev: Termcap Syntax, Up: Termcap - -Termcap Examples -================ - - Some examples: - - termcap xterm* xn:hs@ - -Informs `screen' that all terminals that begin with `xterm' have firm -auto-margins that allow the last position on the screen to be updated -(xn), but they don't really have a status line (no 'hs' - append `@' to -turn entries off). Note that we assume `xn' for all terminal names -that start with `vt', but only if you don't specify a termcap command -for that terminal. - - termcap vt* xn - termcap vt102|vt220 Z0=\E[?3h:Z1=\E[?3l - -Specifies the firm-margined `xn' capability for all terminals that -begin with `vt', and the second line will also add the escape-sequences -to switch into (Z0) and back out of (Z1) 132-character-per-line mode if -this is a VT102 or VT220. (You must specify Z0 and Z1 in your termcap -to use the width-changing commands.) - - termcap vt100 "" l0=PF1:l1=PF2:l2=PF3:l3=PF4 - -This leaves your vt100 termcap alone and adds the function key labels to -each window's termcap entry. - - termcap h19|z19 am@:im=\E@:ei=\EO dc=\E[P - -Takes a h19 or z19 termcap and turns off auto-margins (am@) and enables -the insert mode (im) and end-insert (ei) capabilities (the `@' in the -`im' string is after the `=', so it is part of the string). Having the -`im' and `ei' definitions put into your terminal's termcap will cause -screen to automatically advertise the character-insert capability in -each window's termcap. Each window will also get the delete-character -capability (dc) added to its termcap, which screen will translate into -a line-update for the terminal (we're pretending it doesn't support -character deletion). - - If you would like to fully specify each window's termcap entry, you -should instead set the `$SCREENCAP' variable prior to running `screen'. -*Note Virtual Terminal::, for the details of the `screen' terminal -emulation. *Note Termcap: (termcap)Top, for more information on -termcap definitions. - diff --git a/src/doc/screen.info-4 b/src/doc/screen.info-4 index 300a2ba..bc01229 100644 --- a/src/doc/screen.info-4 +++ b/src/doc/screen.info-4 @@ -1,4 +1,4 @@ -This is screen.info, produced by makeinfo version 4.0 from +This is screen.info, produced by makeinfo version 4.2 from ./screen.texinfo. INFO-DIR-SECTION General Commands @@ -8,7 +8,7 @@ END-INFO-DIR-ENTRY This file documents the `Screen' virtual terminal manager. - Copyright (c) 1993-2002 Free Software Foundation, Inc. + Copyright (c) 1993-2003 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -25,6 +25,55 @@ versions, except that this permission notice may be stated in a translation approved by the Foundation. +File: screen.info, Node: Termcap Examples, Next: Special Capabilities, Prev: Termcap Syntax, Up: Termcap + +Termcap Examples +================ + + Some examples: + + termcap xterm* xn:hs@ + +Informs `screen' that all terminals that begin with `xterm' have firm +auto-margins that allow the last position on the screen to be updated +(xn), but they don't really have a status line (no 'hs' - append `@' to +turn entries off). Note that we assume `xn' for all terminal names +that start with `vt', but only if you don't specify a termcap command +for that terminal. + + termcap vt* xn + termcap vt102|vt220 Z0=\E[?3h:Z1=\E[?3l + +Specifies the firm-margined `xn' capability for all terminals that +begin with `vt', and the second line will also add the escape-sequences +to switch into (Z0) and back out of (Z1) 132-character-per-line mode if +this is a VT102 or VT220. (You must specify Z0 and Z1 in your termcap +to use the width-changing commands.) + + termcap vt100 "" l0=PF1:l1=PF2:l2=PF3:l3=PF4 + +This leaves your vt100 termcap alone and adds the function key labels to +each window's termcap entry. + + termcap h19|z19 am@:im=\E@:ei=\EO dc=\E[P + +Takes a h19 or z19 termcap and turns off auto-margins (am@) and enables +the insert mode (im) and end-insert (ei) capabilities (the `@' in the +`im' string is after the `=', so it is part of the string). Having the +`im' and `ei' definitions put into your terminal's termcap will cause +screen to automatically advertise the character-insert capability in +each window's termcap. Each window will also get the delete-character +capability (dc) added to its termcap, which screen will translate into +a line-update for the terminal (we're pretending it doesn't support +character deletion). + + If you would like to fully specify each window's termcap entry, you +should instead set the `$SCREENCAP' variable prior to running `screen'. +*Note Virtual Terminal::, for the details of the `screen' terminal +emulation. *Note Termcap: (termcap)Top, for more information on +termcap definitions. + + File: screen.info, Node: Special Capabilities, Next: Autonuke, Prev: Termcap Examples, Up: Termcap Special Terminal Capabilities @@ -290,8 +339,9 @@ Hardware Status Line used, screen will reserve the last line of the display for the hardstatus. `message' uses `screen''s message mechanism and `ignore' tells `screen' never to display the hardstatus. If you - prepend the word `always' to the type, `screen' will use the type - even if the terminal supports a hardstatus line. + prepend the word `always' to the type (e.g., `alwayslastline'), + `screen' will use the type even if the terminal supports a + hardstatus line. The third form specifies the contents of the hardstatus line. `%h' is used as default string, i.e. the stored hardstatus of the @@ -495,6 +545,8 @@ categories. * Attrcolor:: Map attributes to colors. * Setsid:: Change process group management * Eval:: Parse and execute arguments +* Maxwin:: Set the maximum window number +* Backtick:: Program a command for a backtick string escape. File: screen.info, Node: At, Next: Break, Up: Miscellaneous @@ -528,10 +580,9 @@ At internal arrangement of windows (like `other') may be called again. In shared windows the command will be repeated for each attached display. Beware, when issuing toggle commands like - `login'! Some commands (e.g. `stuff', `\*Qprocess' or `paste') - require that a display is associated with the target windows. - These commands may not work correctly under `at' looping over - windows. + `login'! Some commands (e.g. `\*Qprocess') require that a display + is associated with the target windows. These commands may not + work correctly under `at' looping over windows. File: screen.info, Node: Break, Next: Debug, Prev: At, Up: Miscellaneous @@ -785,7 +836,7 @@ Attrcolor `attrcolor u "-u b"' Use blue text instead of underline. - `attrcolor b "I"' + `attrcolor b ".I"' Use bright colors for bold text. Most terminal emulators do this already. @@ -808,14 +859,54 @@ Setsid in rare circumstances. -File: screen.info, Node: Eval, Prev: Setsid, Up: Miscellaneous +File: screen.info, Node: Eval, Next: Maxwin, Prev: Setsid, Up: Miscellaneous Eval ==== - Command: eval COMMAND1 [COMMAND2 ...] (none) - Parses and executes each argument as seperate command. + Parses and executes each argument as separate command. + + +File: screen.info, Node: Maxwin, Next: Backtick, Prev: Eval, Up: Miscellaneous + +Maxwin +====== + + - Command: maxwin N + (none) + Set the maximum window number screen will create. Doesn't affect + already existing windows. The number may only be decreased. + + +File: screen.info, Node: Backtick, Prev: Maxwin, Up: Miscellaneous + +Backtick +======== + + - Command: backtick ID LIFESPAN AUTOREFRESH COMMAND [ARGS] + - Command: backtick ID + (none) + Program the backtick command with the numerical id ID. The output + of such a command is used for substitution of the `%`' string + escape (*note String Escapes::). The specified LIFESPAN is the + number of seconds the output is considered valid. After this time, + the command is run again if a corresponding string escape is + encountered. The AUTOREFRESH parameter triggers an automatic + refresh for caption and hardstatus strings after the specified + number of seconds. Only the last line of output is used for + substitution. + + If both the LIFESPAN and the AUTOREFRESH parameters are zero, the + backtick program is expected to stay in the background and + generate output once in a while. In this case, the command is + executed right away and screen stores the last line of output. If + a new line gets printed screen will automatically refresh the + hardstatus or the captions. + + The second form of the command deletes the backtick command with + the numerical id ID. File: screen.info, Node: String Escapes, Next: Environment, Prev: Miscellaneous, Up: Top @@ -899,8 +990,8 @@ instead. full year number `?' - the part to the next `%?' is displayed only if an escape expands - to an nonempty string + the part to the next `%?' is displayed only if a `%' escape inside + the part expands to a non-empty string `:' else part of `%?' @@ -928,12 +1019,16 @@ instead. `...'. `{' - attribute/color modifier string terminated by the next `}' The `c' -and `C' escape may be qualified with a `0' to make screen use zero -instead of space as fill character. The `n' and `=' escapes understand -a length qualifier (e.g. `%3n'), `D' and `M' can be prefixed with `L' -to generate long names, `w' and `W' also show the window flags if `L' -is given. + attribute/color modifier string terminated by the next `}' + +``' + Substitute with the output of a `backtick' command. The length + qualifier is misused to identify one of the commands. *Note + Backtick::. The `c' and `C' escape may be qualified with a `0' to +make screen use zero instead of space as fill character. The `n' and +`=' escapes understand a length qualifier (e.g. `%3n'), `D' and `M' can +be prefixed with `L' to generate long names, `w' and `W' also show the +window flags if `L' is given. An attribute/color modifier is is used to change the attributes or the color settings. Its format is `[attribute modifier] [color @@ -953,6 +1048,9 @@ change types are known: change the current attributes to the specified set The attribute set can either be specified as a hexadecimal number or a combination of the following letters: +`d' + dim + `u' underline @@ -1172,8 +1270,8 @@ Contributors Martin Schweikert (schweik@cpp.ob.open.de), David Vrona (dave@sashimi.lcu.com), E. Tye McQueen (tye%spillman.UUCP@uunet.uu.net), - Matthew Green (mrg@mame.mu.oz.au), - Christopher Williams (cgw@unt.edu), + Matthew Green (mrg@eterna.com.au), + Christopher Williams (cgw@pobox.com), Matt Mosley (mattm@access.digex.net), Gregory Neil Shapiro (gshapiro@wpi.WPI.EDU), Jason Merrill (jason@jarthur.Claremont.EDU), @@ -1183,7 +1281,7 @@ Contributors Version ======= - This manual describes version 3.9.11 of the `screen' program. Its + This manual describes version 3.9.15 of the `screen' program. Its roots are a merge of a custom version 2.3PR7 by Wayne Davison and several enhancements to Oliver Laumann's version 2.0. Note that all versions numbered 2.x are copyright by Oliver Laumann. @@ -1331,12 +1429,11 @@ Compiling Screen script. Before you compile the package run `sh ./configure' - - This will create a `config.h' and `Makefile' for your machine. If -`configure' fails for some reason, then look at the examples and -comments found in the `Makefile.in' and `config.h.in' templates. -Rename `config.status' to `config.status.MACHINE' when you want to keep -configuration data for multiple architectures. Running `sh + This will create a `config.h' and `Makefile' for your +machine. If `configure' fails for some reason, then look at the +examples and comments found in the `Makefile.in' and `config.h.in' +templates. Rename `config.status' to `config.status.MACHINE' when you +want to keep configuration data for multiple architectures. Running `sh ./config.status.MACHINE' recreates your configuration significantly faster than rerunning `configure'. Read through the "User Configuration" section of `config.h', and verify @@ -1347,9 +1444,8 @@ Check the compiler used in `Makefile', the prefix path where to install `screen'. Then run `make' - - If `make' fails to produce one of the files `term.h', `comm.h' or -`tty.c', then use `FILENAME.X.dist' instead. For additional + If `make' fails to produce one of the files `term.h', `comm.h' +or `tty.c', then use `FILENAME.X.dist' instead. For additional information about installation of `screen' refer to the file `INSTALLATION', coming with this package. diff --git a/src/doc/screen.info-5 b/src/doc/screen.info-5 index d33ae08..b6a82a8 100644 --- a/src/doc/screen.info-5 +++ b/src/doc/screen.info-5 @@ -1,4 +1,4 @@ -This is screen.info, produced by makeinfo version 4.0 from +This is screen.info, produced by makeinfo version 4.2 from ./screen.texinfo. INFO-DIR-SECTION General Commands @@ -8,7 +8,7 @@ END-INFO-DIR-ENTRY This file documents the `Screen' virtual terminal manager. - Copyright (c) 1993-2002 Free Software Foundation, Inc. + Copyright (c) 1993-2003 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -42,10 +42,12 @@ Command Index * activity: Monitor. * addacl: Acladd. * allpartial: Redisplay. +* altscreen: Redisplay. * at: At. * attrcolor: Attrcolor. * autodetach: Detach. * autonuke: Autonuke. +* backtick: Backtick. * bce: Character Processing. * bell_msg: Bell. * bind: Bind. @@ -127,6 +129,7 @@ Command Index * mapnotnext: Bindkey Control. * maptimeout: Bindkey Control. * markkeys: Copy Mode Keys. +* maxwin: Maxwin. * meta: Command Character. * monitor: Monitor. * msgminwait: Message Wait. @@ -174,7 +177,7 @@ Command Index * source: Source. * split: Split. * startup_message: Startup Message. -* stuff: Registers. +* stuff: Paste. * su: Su. * suspend: Suspend. * term: Term. diff --git a/src/doc/screen.texinfo b/src/doc/screen.texinfo index eeb0cab..cca7dcc 100644 --- a/src/doc/screen.texinfo +++ b/src/doc/screen.texinfo @@ -7,7 +7,7 @@ @finalout @setchapternewpage odd @c %**end of header -@set version 3.9.11 +@set version 3.9.15 @direntry * Screen: (screen). Full-screen window manager. @@ -24,7 +24,7 @@ @ifinfo This file documents the @code{Screen} virtual terminal manager. -Copyright (c) 1993-2002 Free Software Foundation, Inc. +Copyright (c) 1993-2003 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -52,11 +52,11 @@ by the Foundation. @title Screen @subtitle The virtual terminal manager @subtitle for Version @value{version} -@subtitle Jan 2002 +@subtitle Mar 2003 @page @vskip 0pt plus 1filll -Copyright @copyright{} 1993-2002 Free Software Foundation, Inc. +Copyright @copyright{} 1993-2003 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -203,7 +203,7 @@ Another section (@pxref{Customization}) deals with the contents of your If your terminal is a ``true'' auto-margin terminal (it doesn't allow the last position on the screen to be updated without scrolling the -screen) consider to use a version of your terminal's termcap that has +screen) consider using a version of your terminal's termcap that has automatic margins turned @emph{off}. This will ensure an accurate and optimal update of the screen in all circumstances. Most terminals nowadays have ``magic'' margins (automatic margins plus usable last @@ -279,7 +279,7 @@ Set the command character to @var{x}, and the character generating a literal command character (when typed after the command character) to @var{y}. The defaults are @kbd{C-a} and @kbd{a}, which can be specified as @samp{-e^Aa}. When creating a @code{screen} session, this option -sets the default command caracter. In a multiuser session all users +sets the default command character. In a multiuser session all users added will start off with this command character. But when attaching to an already running session, this option only changes the command character of the attaching user. @@ -325,10 +325,8 @@ Ask your system administrator if you are not sure. Remove sessions with the @samp{-wipe} option. @item -L -Tell @code{screen} that your auto-margin terminal allows programs to -write to the last column of the last row of the screen without -scrolling. This can also be set in your @file{.screenrc} by specifying -@samp{xn} in a @code{termcap} command (@pxref{Termcap}). +Tell @code{screen} to turn on automatic output logging for the +windows. @item -m Tell @code{screen} to ignore the @code{$STY} environment variable. When @@ -346,6 +344,13 @@ This also starts @code{screen} in @emph{detached} mode, but doesn't fork a new process. The command exits if the session terminates. @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{-} +selects the blank window. As a special case for reattach, @samp{=} +brings up the windowlist on the blank window. + @item -q Suppress printing of error messages. In combination with @samp{-ls} the exit value is set as follows: 9 indicates a directory without sessions. 10 @@ -473,7 +478,7 @@ contain a number of useful examples for various commands. (none)@* Read and execute commands from file @var{file}. Source commands may be nested to a maximum recursion level of ten. If @var{file} -is not an absolute path and screen already processes a +is not an absolute path and screen is already processing a source command, the parent directory of the running source command file is used to search for the new command file before screen's current directory. @@ -821,6 +826,8 @@ Set the activity notification message. @xref{Monitor}. Synonym to @code{acladd}. @xref{Multiuser Session}. @item allpartial @var{state} Set all windows to partial refresh. @xref{Redisplay}. +@item altscreen @var{state} +Enables support for the "alternate screen" terminal capability. @xref{Redisplay}. @item at [@var{ident}][@kbd{#}@var{|}@kbd{*}@var{|}@kbd{%}] @var{command} [@var{args}] Execute a command at other displays or windows. @xref{At}. @item attrcolor @var{attrib} [@var{attribute/color-modifier}] @@ -829,6 +836,8 @@ Map attributes to colors. @xref{Attrcolor}. Automatically detach the session on SIGHUP. @xref{Detach}. @item autonuke @var{state} Enable a clear screen to discard unwritten output. @xref{Autonuke}. +@item backtick @var{id} @var{lifespan} @var{autorefresh} @var{command} [@var{args}] +Define a command for the backtick string escape. @xref{Backtick}. @item bce [@var{state}] Change background color erase. @xref{Character Processing}. @item bell_msg [@var{message}] @@ -991,6 +1000,8 @@ Don't try to do keymapping on the next keystroke. @xref{Bindkey Control}. Set the inter-character timeout used for keymapping. @xref{Bindkey Control}. @item markkeys @var{string} Rebind keys in copy mode. @xref{Copy Mode Keys}. +@item maxwin @var{n} +Set the maximum window number. @xref{Maxwin}. @item meta Insert the command character. @xref{Command Character}. @item monitor [@var{state}] @@ -1603,7 +1614,7 @@ Prefixing @samp{+} grants the permission, @samp{-} removes it. The third parameter is a comma separated list of commands or windows (specified either by number or title). The special list @samp{#} refers to all windows, @samp{?} to all commands. If @var{usernames} consists of a single @samp{*}, all -known users is affected. +known users are affected. A command can be executed when the user has the @samp{x} bit for it. The user can type input to a window when he has its @samp{w} bit set and no other user obtains a writelock for this window. Other bits are currently ignored. @@ -1911,7 +1922,7 @@ name when typed. You can also bind predefined names to keys with the @kindex A @deffn Command title [windowtitle] (@kbd{C-a A})@* -Set the name of the current window to @var{windowalias}. If no name is +Set the name of the current window to @var{windowtitle}. If no name is specified, screen prompts for one. @end deffn @@ -2334,7 +2345,10 @@ ESC [ Ps ;...; Ps l Reset Mode ?7 (V) @samp{Wrap} Mode ?9 X10 mouse tracking ?25 (V) Visible Cursor + ?47 Alternate Screen (old xterm code) ?1000 (V) VT200 mouse tracking + ?1047 Alternate Screen (new xterm code) + ?1049 Alternate Screen (new xterm code) ESC [ 5 i (A) Start relay to printer (ANSI Media Copy) ESC [ 4 i (A) Stop relay to printer (ANSI Media Copy) ESC [ 8 ; Ph ; Pw t Resize the window to @samp{Ph} lines and @@ -2539,7 +2553,6 @@ The current line wrap setting (@samp{+wrap} indicates enabled, @samp{-wrap} not) is also shown. The flags @samp{ins}, @samp{org}, @samp{app}, @samp{log}, @samp{mon} and @samp{nored} are displayed when the window is in insert mode, origin mode, application-keypad mode, has output logging, -insert mode, origin mode, application-keypad mode, output logging, activity monitoring or partial redraw enabled. The currently active @@ -2575,6 +2588,12 @@ on all windows overriding the @code{partial} settings. It does not change the default redraw behavior of newly created windows. @end deffn +@deffn Command altscreen state +(none)@* +If set to on, "alternate screen" support is enabled in virtual terminals, +just like in xterm. Initial setting is @samp{off}. +@end deffn + @deffn Command partial state (none)@* Defines whether the display should be refreshed (as with @@ -2688,7 +2707,7 @@ the terminal type by using the @samp{KJ} termcap entry. @xref{Special Capabiliti Supported encodings are @code{eucJP}, @code{SJIS}, @code{eucKR}, -@code{eucCN}, @code{Big5}, @code{KOI8-R}, @code{CP1251}, +@code{eucCN}, @code{Big5}, @code{GBK}, @code{KOI8-R}, @code{CP1251}, @code{UTF-8}, @code{ISO8859-2}, @code{ISO8859-3}, @code{ISO8859-4}, @code{ISO8859-5}, @code{ISO8859-6}, @code{ISO8859-7}, @code{ISO8859-8}, @code{ISO8859-9}, @@ -2834,7 +2853,7 @@ to view the current setting. @deffn Command compacthist [state] (none)@* -This tells screen weather to suppress trailing blank lines when +This tells screen whether to suppress trailing blank lines when scrolling up text into the history buffer. Turn compacting @samp{on} to hold more useful lines in your scrollback buffer. @end deffn @@ -2885,6 +2904,9 @@ or previous line. @kbd{w}, @kbd{b}, @kbd{e} move the cursor word by word. @noindent +@kbd{B}, @kbd{E} move the cursor WORD by WORD (as in vi). + +@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). @@ -2940,7 +2962,7 @@ digits @kbd{0@dots{}9}) which is taken as a repeat count. Example: @deffn Command ignorecase [state] (none)@* -Tell screen to ignore the case of caracters in searches. Default is +Tell screen to ignore the case of characters in searches. Default is @code{off}. @end deffn @@ -3032,9 +3054,17 @@ display (terminal attached), as the registers are a global resource. The paste buffer exists once for every user. @end deffn +@deffn Command stuff string +(none)@* +Stuff the string @var{string} in the input buffer of the current window. +This is like the @code{paste} command, but with much less overhead. +You cannot paste large buffers with the @code{stuff} command. It is most +useful for key bindings. @xref{Bindkey}. +@end deffn + @deffn Command pastefont [state] Tell screen to include font information in the paste buffer. The -default is not to do so. This command is especially usefull for +default is not to do so. This command is especially useful for multi character fonts like kanji. @end deffn @@ -3095,15 +3125,6 @@ Save the specified @var{string} to the register @var{key}. The encoding of the string can be specified via the @code{-e} option. @end deffn -@deffn Command stuff string -(none)@* -Stuff the string @var{string} in the input buffer of the current window. -This is like the @code{paste} command, but with much less overhead. -You cannot paste large buffers with the @code{stuff} command. It is most -useful for key bindings. @xref{Bindkey}. - -@end deffn - @node Screen Exchange, History, Registers, Copy and Paste @section Screen Exchange @@ -3718,6 +3739,9 @@ cannot be modified by parent processes. You can force @code{screen} to include all capabilities in @code{$TERMCAP} with the @samp{-a} command-line option (@pxref{Invoking Screen}). +The "alternate screen" capability is not enabled by default. +Set the @code{altscreen} @file{.screenrc} command to enable it. + @node Dump Termcap, Termcap Syntax, Window Termcap, Termcap @section Write out the window's termcap entry @kindex . @@ -4098,7 +4122,7 @@ have a hardstatus line (i.e. the termcap/terminfo capabilities display for the hardstatus. @code{message} uses @code{screen}'s message mechanism and @code{ignore} tells @code{screen} never to display the hardstatus. -If you prepend the word @code{always} to the type, @code{screen} will use +If you prepend the word @code{always} to the type (e.g., @code{alwayslastline}), @code{screen} will use the type even if the terminal supports a hardstatus line. The third form specifies the contents of the hardstatus line. @@ -4289,6 +4313,8 @@ categories. * Attrcolor:: Map attributes to colors. * Setsid:: Change process group management * Eval:: Parse and execute arguments +* Maxwin:: Set the maximum window number +* Backtick:: Program a command for a backtick string escape. @end menu @node At, Break, , Miscellaneous @@ -4320,7 +4346,7 @@ once per window. Commands that change the internal arrangement of windows (like @code{other}) may be called again. In shared windows the command will be repeated for each attached display. Beware, when issuing toggle commands like @code{login}! -Some commands (e.g. @code{stuff}, @code{\*Qprocess} or @code{paste}) require +Some commands (e.g. @code{\*Qprocess}) require that a display is associated with the target windows. These commands may not work correctly under @code{at} looping over windows. @end deffn @@ -4540,7 +4566,7 @@ Examples: Change the color to bright red if bold text is to be printed. @item attrcolor u "-u b" Use blue text instead of underline. -@item attrcolor b "I" +@item attrcolor b ".I" Use bright colors for bold text. Most terminal emulators do this already. @item attrcolor i "+b" @@ -4560,11 +4586,46 @@ The default is @code{on}, of course. This command is probably useful only in rare circumstances. @end deffn -@node Eval, , Setsid, Miscellaneous +@node Eval, Maxwin, Setsid, Miscellaneous @section Eval @deffn Command eval @var{command1} [@var{command2} ...] (none)@* -Parses and executes each argument as seperate command. +Parses and executes each argument as separate command. +@end deffn + +@node Maxwin, Backtick, Eval, Miscellaneous +@section Maxwin +@deffn Command maxwin @var{n} +(none)@* +Set the maximum window number screen will create. Doesn't affect +already existing windows. The number may only be decreased. +@end deffn + +@node Backtick, , Maxwin, Miscellaneous +@section Backtick +@deffn Command backtick @var{id} @var{lifespan} @var{autorefresh} @var{command} [@var{args}] +@deffnx Command backtick @var{id} +(none)@* +Program the backtick command with the numerical id @var{id}. +The output of such a command is used for substitution of the +@code{%`} string escape (@pxref{String Escapes}). +The specified @var{lifespan} is the number +of seconds the output is considered valid. After this time, the +command is run again if a corresponding string escape is encountered. +The @var{autorefresh} parameter triggers an +automatic refresh for caption and hardstatus strings after the +specified number of seconds. Only the last line of output is used +for substitution. + +If both the @var{lifespan} and the @var{autorefresh} parameters +are zero, the backtick program is expected to stay in the +background and generate output once in a while. +In this case, the command is executed right away and screen stores +the last line of output. If a new line gets printed screen will +automatically refresh the hardstatus or the captions. + +The second form of the command deletes the backtick command +with the numerical id @var{id}. @end deffn @node String Escapes, Environment, Miscellaneous, Top @@ -4625,8 +4686,8 @@ last two digits of the year number @item Y full year number @item ? -the part to the next @code{%?} is displayed only if an escape expands -to an nonempty string +the part to the next @code{%?} is displayed only if a @code{%} escape +inside the part expands to a non-empty string @item : else part of @code{%?} @item = @@ -4650,6 +4711,9 @@ operator.) The @code{L} qualifier tells screen to mark the truncated parts with @samp{...}. @item @{ attribute/color modifier string terminated by the next @code{@}} +@item ` +Substitute with the output of a `backtick' command. The length +qualifier is misused to identify one of the commands. @xref{Backtick}. @end table The @code{c} and @code{C} escape may be qualified with a @code{0} to make screen use @@ -4678,6 +4742,8 @@ change the current attributes to the specified set The attribute set can either be specified as a hexadecimal number or a combination of the following letters: @table @code +@item d +dim @item u underline @item b @@ -4889,8 +4955,8 @@ Contributors @* Martin Schweikert (schweik@@cpp.ob.open.de), David Vrona (dave@@sashimi.lcu.com), E. Tye McQueen (tye%spillman.UUCP@@uunet.uu.net), - Matthew Green (mrg@@mame.mu.oz.au), - Christopher Williams (cgw@@unt.edu), + Matthew Green (mrg@@eterna.com.au), + Christopher Williams (cgw@@pobox.com), Matt Mosley (mattm@@access.digex.net), Gregory Neil Shapiro (gshapiro@@wpi.WPI.EDU), Jason Merrill (jason@@jarthur.Claremont.EDU), diff --git a/src/encoding.c b/src/encoding.c index 32a54ae..066f75f 100644 --- a/src/encoding.c +++ b/src/encoding.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1993-2002 +/* Copyright (c) 1993-2003 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann @@ -39,6 +39,15 @@ extern struct layer *flayer; extern char *screenencodings; static int encmatch __P((char *, char *)); +# ifdef UTF8 +static int recode_char __P((int, int, int)); +static int recode_char_to_encoding __P((int, int)); +static void comb_tofront __P((int, int)); +# ifdef DW_CHARS +static int recode_char_dw __P((int, int *, int, int)); +static int recode_char_dw_to_encoding __P((int, int *, int)); +# endif +# endif struct encoding { char *name; @@ -74,6 +83,7 @@ struct encoding encodings[] = { { "ISO8859-10", 0, 0x80|'V', 0, 0, 0 }, { "ISO8859-15", 0, 0x80|'b', 0, 0, 0 }, { "jis", 0, 0, 0, 0, "\002\004I" }, + { "GBK", "B\031BB01", 0x80|'b', 1, 1, "\031" } }; #ifdef UTF8 @@ -243,7 +253,7 @@ static unsigned short builtin_tabs[][2] = { { 0x007d, 0x00e7 }, { 0, 0}, - { 0xe2, 0}, /* 96-b: ISO-8859-15*/ + { 0xe2, 0}, /* 96-b: ISO-8859-15 */ { 0x00a4, 0x20ac }, { 0x00a6, 0x0160 }, { 0x00a8, 0x0161 }, @@ -293,21 +303,21 @@ InitBuiltinTabs() } } -int +static int recode_char(c, to_utf, font) int c, to_utf, font; { int f; unsigned short (*p)[2]; - if (c < 256) - return c; if (to_utf) { + if (c < 256) + return c; f = (c >> 8) & 0xff; c &= 0xff; /* map aliases to keep the table small */ - switch (c >> 8) + switch (f) { case 'C': f ^= ('C' ^ '5'); @@ -339,20 +349,24 @@ int c, to_utf, font; } if (font == -1) { - for (font = 32; font < 256; font++) + if (c < 256) + return c; /* latin1 */ + for (font = 32; font < 128; font++) { p = recodetabs[font].tab; if (p) for (; (*p)[1]; p++) { if ((p[0][0] & 0x8000) && c <= p[0][1] && c >= p[-1][1]) - return c - p[-1][1] + p[-1][0]; + return (c - p[-1][1] + p[-1][0]) | (font << 8); if ((*p)[1] == c) - return (*p)[0]; + return (*p)[0] | (font << 8); } } return '?'; } + if (c < 128 && (font & 128) != 0) + return c; if (font >= 32) { p = recodetabs[font].tab; @@ -363,15 +377,19 @@ int c, to_utf, font; } if (p) for (; (*p)[1]; p++) - if ((*p)[1] == c) - return (*p)[0]; + { + if ((p[0][0] & 0x8000) && c <= p[0][1] && c >= p[-1][1]) + return (c - p[-1][1] + p[-1][0]) | (font & 128 ? 0 : font << 8); + if ((*p)[1] == c) + return (*p)[0] | (font & 128 ? 0 : font << 8); + } } return -1; } #ifdef DW_CHARS -int +static int recode_char_dw(c, c2p, to_utf, font) int c, *c2p, to_utf, font; { @@ -403,7 +421,7 @@ int c, *c2p, to_utf, font; } if (font == -1) { - for (font = 0; font < 32; font++) + for (font = 0; font < 030; font++) { p = recodetabs[font].tab; if (p) @@ -437,7 +455,7 @@ int c, *c2p, to_utf, font; } #endif -int +static int recode_char_to_encoding(c, encoding) int c, encoding; { @@ -457,7 +475,7 @@ int c, encoding; } #ifdef DW_CHARS -int +static int recode_char_dw_to_encoding(c, c2p, encoding) int c, *c2p, encoding; { @@ -612,11 +630,24 @@ int from, to; return rl; } +struct combchar { + unsigned short c1; + unsigned short c2; + unsigned short next; + unsigned short prev; +}; +struct combchar **combchars; + void AddUtf8(c) int c; { ASSERT(D_encoding == UTF8); + if (c >= 0xd800 && c < 0xe000 && combchars && combchars[c - 0xd800]) + { + AddUtf8(combchars[c - 0xd800]->c1); + c = combchars[c - 0xd800]->c2; + } if (c >= 0x800) { AddChar((c & 0xf000) >> 12 | 0xe0); @@ -631,6 +662,21 @@ int c; } int +ToUtf8_comb(p, c) +char *p; +int c; +{ + int l; + + if (c >= 0xd800 && c < 0xe000 && combchars && combchars[c - 0xd800]) + { + l = ToUtf8_comb(p, combchars[c - 0xd800]->c1); + return l + ToUtf8(p ? p + l : 0, combchars[c - 0xd800]->c2); + } + return ToUtf8(p, c); +} + +int ToUtf8(p, c) char *p; int c; @@ -812,6 +858,7 @@ int c; (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 */ @@ -820,6 +867,157 @@ int c; } #endif +int +utf8_iscomb(c) +int c; +{ + /* taken from Markus Kuhn's wcwidth */ + static struct { + unsigned short first; + unsigned short last; + } combining[] = { + { 0x0300, 0x034F }, { 0x0360, 0x036F }, { 0x0483, 0x0486 }, + { 0x0488, 0x0489 }, { 0x0591, 0x05A1 }, { 0x05A3, 0x05B9 }, + { 0x05BB, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, + { 0x05C4, 0x05C4 }, { 0x064B, 0x0655 }, { 0x0670, 0x0670 }, + { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, + { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A }, + { 0x07A6, 0x07B0 }, { 0x0901, 0x0902 }, { 0x093C, 0x093C }, + { 0x0941, 0x0948 }, { 0x094D, 0x094D }, { 0x0951, 0x0954 }, + { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, { 0x09BC, 0x09BC }, + { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, { 0x09E2, 0x09E3 }, + { 0x0A02, 0x0A02 }, { 0x0A3C, 0x0A3C }, { 0x0A41, 0x0A42 }, + { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, { 0x0A70, 0x0A71 }, + { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, { 0x0AC1, 0x0AC5 }, + { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, { 0x0B01, 0x0B01 }, + { 0x0B3C, 0x0B3C }, { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, + { 0x0B4D, 0x0B4D }, { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, + { 0x0BC0, 0x0BC0 }, { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, + { 0x0C46, 0x0C48 }, { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, + { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, + { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D }, { 0x0DCA, 0x0DCA }, + { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, { 0x0E31, 0x0E31 }, + { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, { 0x0EB1, 0x0EB1 }, + { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, { 0x0EC8, 0x0ECD }, + { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, { 0x0F37, 0x0F37 }, + { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, { 0x0F80, 0x0F84 }, + { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 }, { 0x0F99, 0x0FBC }, + { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, { 0x1032, 0x1032 }, + { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, { 0x1058, 0x1059 }, + { 0x1160, 0x11FF }, { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, + { 0x1752, 0x1753 }, { 0x1772, 0x1773 }, { 0x17B7, 0x17BD }, + { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x180B, 0x180E }, + { 0x18A9, 0x18A9 }, { 0x200B, 0x200F }, { 0x202A, 0x202E }, + { 0x2060, 0x2063 }, { 0x206A, 0x206F }, { 0x20D0, 0x20EA }, + { 0x302A, 0x302F }, { 0x3099, 0x309A }, { 0xFB1E, 0xFB1E }, + { 0xFE00, 0xFE0F }, { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, + { 0xFFF9, 0xFFFB } + }; + int mid, min = 0, max = sizeof(combining)/sizeof(*combining) - 1; + + if (c < 0x0300 || c > 0xfffb) + return 0; + while (max >= min) + { + mid = (min + max) / 2; + if (c > combining[mid].last) + min = mid + 1; + else if (c < combining[mid].first) + max = mid - 1; + else + return 1; + } + return 0; +} + +static void +comb_tofront(root, i) +int root, i; +{ + for (;;) + { + debug1("bring to front: %x\n", i); + combchars[combchars[i]->prev]->next = combchars[i]->next; + combchars[combchars[i]->next]->prev = combchars[i]->prev; + combchars[i]->next = combchars[root]->next; + combchars[i]->prev = root; + combchars[combchars[root]->next]->prev = i; + combchars[root]->next = i; + i = combchars[i]->c1; + if (i < 0xd800 || i >= 0xe000) + return; + i -= 0xd800; + } +} + +void +utf8_handle_comb(c, mc) +int c; +struct mchar *mc; +{ + int root, i, c1; + int isdouble; + + c1 = mc->image | (mc->font << 8); + isdouble = c1 >= 0x1100 && utf8_isdouble(c1); + if (!combchars) + { + combchars = (struct combchar **)malloc(sizeof(struct combchar *) * 0x802); + if (!combchars) + return; + bzero((char *)combchars, sizeof(struct combchar *) * 0x802); + combchars[0x800] = (struct combchar *)malloc(sizeof(struct combchar)); + combchars[0x801] = (struct combchar *)malloc(sizeof(struct combchar)); + if (!combchars[0x800] || !combchars[0x801]) + { + if (combchars[0x800]) + free(combchars[0x800]); + if (combchars[0x801]) + free(combchars[0x801]); + free(combchars); + return; + } + combchars[0x800]->c1 = 0x000; + combchars[0x800]->c2 = 0x700; + combchars[0x800]->next = 0x800; + combchars[0x800]->prev = 0x800; + combchars[0x801]->c1 = 0x700; + combchars[0x801]->c2 = 0x800; + combchars[0x801]->next = 0x801; + combchars[0x801]->prev = 0x801; + } + root = isdouble ? 0x801 : 0x800; + for (i = combchars[root]->c1; i < combchars[root]->c2; i++) + { + if (!combchars[i]) + break; + if (combchars[i]->c1 == c1 && combchars[i]->c2 == c) + break; + } + if (i == combchars[root]->c2) + { + /* full, recycle old entry */ + if (c1 >= 0xd800 && c1 < 0xe000) + comb_tofront(root, c1); + i = combchars[root]->prev; + /* FIXME: delete old char from all buffers */ + } + else if (!combchars[i]) + { + combchars[i] = (struct combchar *)malloc(sizeof(struct combchar)); + if (!combchars[i]) + return; + combchars[i]->prev = i; + combchars[i]->next = i; + } + combchars[i]->c1 = c1; + combchars[i]->c2 = c; + mc->image = i & 0xff; + mc->font = (i >> 8) + 0xd8; + debug3("combinig char %x %x -> %x\n", c1, c, i + 0xd800); + comb_tofront(root, i); +} + #else /* !UTF8 */ void @@ -872,6 +1070,7 @@ char *name; { int encoding; + debug1("FindEncoding %s\n", name); if (name == 0 || *name == 0) return 0; if (encmatch(name, "euc")) @@ -923,7 +1122,12 @@ struct win *p; LoadFontTranslationsForEncoding(encoding); #endif if (encodings[encoding].usegr) - p->w_gr = 1; + { + p->w_gr = 2; + p->w_FontE = encodings[encoding].charsets[1]; + } + else + p->w_FontE = 0; if (encodings[encoding].noc1) p->w_c1 = 0; } @@ -1002,12 +1206,14 @@ int *statep; else return c | (KANJI << 16); } - if (encoding == BIG5) + if (encoding == BIG5 || encoding == GBK) { if (!*statep) { if (c & 0x80) { + if (encoding == GBK && c == 0x80) + return 0xa4 | (('b'|0x80) << 16); *statep = c; return -1; } @@ -1017,7 +1223,7 @@ int *statep; c = *statep; *statep = 0; c &= 0x7f; - return c << 8 | t | (030 << 16); + return c << 8 | t | (encoding == BIG5 ? 030 << 16 : 031 << 16); } return c | (encodings[encoding].deffont << 16); } @@ -1032,7 +1238,7 @@ int *fontp; int t, f, l; debug2("Encoding char %02x for encoding %d\n", c, encoding); - if (c == 0 && fontp) + if (c == -1 && fontp) { if (*fontp == 0) return 0; @@ -1067,7 +1273,7 @@ int *fontp; } return ToUtf8(bp, c); } - if ((c & 0xff00) && f == 0) + if ((c & 0xff00) && f == 0) /* is_utf8? */ { # ifdef DW_CHARS if (utf8_isdouble(c)) @@ -1086,7 +1292,6 @@ int *fontp; f = c >> 16; } #endif - if (f & 0x80) /* map special 96-fonts to latin1 */ f = 0; @@ -1147,7 +1352,7 @@ int *fontp; } return 2; } - if (encoding == BIG5 && f == 030) + if ((encoding == BIG5 && f == 030) || (encoding == GBK && f == 031)) { if (bp) { @@ -1156,6 +1361,8 @@ int *fontp; } return 2; } + if (encoding == GBK && f == 0 && c == 0xa4) + c = 0x80; l = 0; if (fontp && f != *fontp) @@ -1217,6 +1424,8 @@ int encoding, f; return f == 1; case BIG5: return f == 030; + case GBK: + return f == 031; default: break; } @@ -1271,7 +1480,7 @@ int c; D_mbcs = t | 0x80; return c | 0x80; } - if (encoding == BIG5 && f == 030) + if ((encoding == BIG5 && f == 030) || (encoding == GBK && f == 031)) return c | 0x80; return c; } @@ -1297,7 +1506,7 @@ unsigned char *tbuf; continue; j += EncodeChar(tbuf ? (char *)tbuf + j : 0, c, tenc, &font); } - j += EncodeChar(tbuf ? (char *)tbuf + j : 0, 0, tenc, &font); + j += EncodeChar(tbuf ? (char *)tbuf + j : 0, -1, tenc, &font); return j; } @@ -1456,7 +1665,7 @@ int encoding; int *fontp; { int f, l; - f = c >> 16; + f = (c == -1) ? 0 : c >> 16; l = 0; if (fontp && f != *fontp) { @@ -1486,7 +1695,7 @@ int *fontp; l += 3; } } - if (c == 0) + if (c == -1) return l; if (c & 0xff00) { diff --git a/src/etc/completer.zsh b/src/etc/completer.zsh index f8f0c96..bbbd01c 100644 --- a/src/etc/completer.zsh +++ b/src/etc/completer.zsh @@ -45,9 +45,9 @@ case $state in # Complete folder names. local screendir - screendir=(`screen -ls | grep Socket | tail -1 | sed -e 's/\.$//' | awk '{print $NF;}'`) + screendir=(`screen -ls | grep Socket | sed -n -e 's/\.$//' -e '$p' | awk '{print $NF;}'`) _wanted files expl 'screen process' _path_files -W screendir ;; esac -
\ No newline at end of file + diff --git a/src/etc/countmail b/src/etc/countmail new file mode 100755 index 0000000..974f143 --- /dev/null +++ b/src/etc/countmail @@ -0,0 +1,67 @@ +#!/usr/bin/perl + +sub countmsgs { + return -1 unless open(M, "<$mbox"); + my $inhdr = 0; + my $cl = undef; + my $msgread = 0; + my $count = 0; + while(<M>) { + if (!$inhdr && /^From\s+\S+\s+(?i:sun|mon|tue|wed|thu|fri|sat)\s+(?i:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\s+\d+\s/) { + $inhdr = 1; + $msgread = 0; + undef $cl; + next; + } + if ($inhdr) { + if (/^content-length:\s+(\d+)/i) { + $cl = 0+$1; + next; + } + if (/^status:\s+(\S)/i) { + $msgread = 1 unless $1 eq 'N' || $1 eq 'U'; + next; + } + if ($_ eq "\n") { + $count++ if !$msgread; + seek(M, $cl, 1) if defined $cl; + $inhdr = 0; + } + } + } + close M; + return $count; +} + +$| = 1; +$mbox = $ARGV[0] || $ENV{'MAIL'}; +$oldfmt = $ARGV[1] || "%4d "; +$newfmt = $ARGV[2] || "\005{Rk}%4d \005{-}"; + +@oldstat = stat($mbox); +if (!@oldstat) { + print "\005{Rk} ??? \005{-}\n"; + exit 1; +} +$oldcount = 0; +while(1) { + $count = countmsgs($mbox); + if ($count == -1) { + print "\005{Rk} ??? \005{-}\n"; + } elsif ($count < $oldcount || $count == 0) { + printf "$oldfmt\n", $count; + } else { + printf "$newfmt\n", $count; + } + $oldcount = $count; + while (1) { + @newstat = stat($mbox); + if (!@newstat) { + print "\005{Rk} ??? \005{-}\n"; + exit 1; + } + last if $newstat[7] != $oldstat[7] || $newstat[9] != $oldstat[9]; + sleep 1; + } + @oldstat = @newstat; +} diff --git a/src/etc/screenrc b/src/etc/screenrc index 716d86f..f2e3bab 100644 --- a/src/etc/screenrc +++ b/src/etc/screenrc @@ -35,6 +35,9 @@ defscrollback 1000 # don't kill window after the process died # zombie "^[" +# enable support for the "alternate screen" capability in all windows +# altscreen on + ################ # # xterm tweaks @@ -134,7 +137,7 @@ bind ^] paste [.] # screen -t local 0 # screen -t mail 1 elm -# screen -t 40 2 rlogin faui40 +# screen -t 40 2 rlogin server # caption always "%3n %t%? @%u%?%? [%h]%?%=%c" # hardstatus alwaysignore @@ -145,5 +148,4 @@ bind ^] paste [.] # bind - resize -1 # bind _ resize max # -# attrcolor u "-u b" -# attrcolor b "R" +# hardstatus alwayslastline "%-Lw%50>%n%f* %t%+Lw%<" diff --git a/src/etc/toolcheck b/src/etc/toolcheck index 747e9a0..1b8ee39 100755 --- a/src/etc/toolcheck +++ b/src/etc/toolcheck @@ -5,7 +5,7 @@ # 24.7.95 jw. retval=0 -reply="`sh -version 2>&1 < /dev/null | head -1`" +reply="`sh -version 2>&1 < /dev/null | sed q`" case "$reply" in GNU*1.14.3*) echo "- sh is '$reply'"; @@ -21,7 +21,7 @@ case "$reply" in *) ;; esac -reply="`sed --version 2>&1 < /dev/null | head -1`" +reply="`sed --version 2>&1 < /dev/null | sed q`" case "$reply" in GNU\ sed\ version\ 2.0[34]) echo "- sed is '$reply'"; diff --git a/src/extern.h b/src/extern.h index 961fe77..f38d284 100644 --- a/src/extern.h +++ b/src/extern.h @@ -45,9 +45,10 @@ extern void DisplaySleep __P((int, int)); extern void Finit __P((int)); extern void MakeNewEnv __P((void)); extern char *MakeWinMsg __P((char *, struct win *, int)); -extern char *MakeWinMsgEv __P((char *, struct win *, int, int, struct event *)); +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 setbacktick __P((int, int, int, char **)); /* ansi.c */ extern void ResetAnsiState __P((struct win *)); @@ -74,6 +75,7 @@ extern void WriteFile __P((struct acluser *, char *, int)); extern char *ReadFile __P((char *, int *)); extern void KillBuffers __P((void)); extern int printpipe __P((struct win *, char *)); +extern int readpipe __P((char **)); extern void do_source __P((char *)); /* tty.c */ @@ -303,6 +305,9 @@ extern char *xrealloc __P((char *, int)); extern void ResizeLayersToCanvases __P((void)); extern void ResizeLayer __P((struct layer *, int, int, struct display *)); extern int MayResizeLayer __P((struct layer *)); +extern void FreeAltScreen __P((struct win *)); +extern void EnterAltScreen __P((struct win *)); +extern void LeaveAltScreen __P((struct win *)); /* sched.c */ extern void evenq __P((struct event *)); @@ -448,18 +453,15 @@ extern char *DoNLS __P((char *)); #ifdef ENCODINGS # ifdef UTF8 extern void InitBuiltinTabs __P((void)); -extern int recode_char __P((int, int, int)); -extern int recode_char_to_encoding __P((int, int)); -# ifdef DW_CHARS -extern int recode_char_dw __P((int, int *, int, int)); -extern int recode_char_dw_to_encoding __P((int, int *, int)); -# endif extern struct mchar *recode_mchar __P((struct mchar *, int, int)); extern struct mline *recode_mline __P((struct mline *, int, int, int)); extern int FromUtf8 __P((int, int *)); extern void AddUtf8 __P((int)); extern int ToUtf8 __P((char *, int)); +extern int ToUtf8_comb __P((char *, int)); extern int utf8_isdouble __P((int)); +extern int utf8_iscomb __P((int)); +extern void utf8_handle_comb __P((int, struct mchar *)); extern int ContainsSpecialDeffont __P((struct mline *, int, int, int)); extern int LoadFontTranslation __P((int, char *)); extern void LoadFontTranslationsForEncoding __P((int)); diff --git a/src/fileio.c b/src/fileio.c index ad76886..f8e5e62 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -770,6 +770,10 @@ char *cmd; case 0: display = p->w_pdisplay; displays = 0; +#ifdef DEBUG + if (dfp && dfp != stderr) + fclose(dfp); +#endif close(0); dup(pi[0]); closeallfiles(0); @@ -786,3 +790,42 @@ char *cmd; close(pi[0]); return pi[1]; } + +int +readpipe(cmdv) +char **cmdv; +{ + int pi[2]; + if (pipe(pi)) + { + Msg(errno, "pipe"); + return -1; + } + switch (fork()) + { + case -1: + Msg(errno, "fork"); + return -1; + case 0: + displays = 0; +#ifdef DEBUG + if (dfp && dfp != stderr) + fclose(dfp); +#endif + close(1); + if (dup(pi[1]) != 1) + Panic(0, "dup"); + closeallfiles(1); + if (setgid(real_gid) || setuid(real_uid)) + Panic(errno, "setuid/setgid"); +#ifdef SIGPIPE + signal(SIGPIPE, SIG_DFL); +#endif + execvp(*cmdv, cmdv); + Panic(errno, *cmdv); + default: + break; + } + close(pi[1]); + return pi[0]; +} @@ -68,7 +68,7 @@ char *myname, *message, *arg; printf("-l Login mode on (update %s), -ln = off.\n", UTMPFILE); #endif printf("-list or -ls. Do nothing, just list our SockDir.\n"); - printf("-L Terminal's last character can be safely updated.\n"); + printf("-L Turn on output logging.\n"); printf("-m ignore $STY variable, do create a new screen session.\n"); printf("-O Choose optimal output rather than exact vt100 emulation.\n"); printf("-p window Preselect the named window if it exists.\n"); @@ -482,7 +482,7 @@ static const char cpmsg[] = "\ \n\ Screen version %v\n\ \n\ -Copyright (c) 1993-2000 Juergen Weigert, Michael Schroeder\n\ +Copyright (c) 1993-2002 Juergen Weigert, Michael Schroeder\n\ Copyright (c) 1987 Oliver Laumann\n\ \n\ This program is free software; you can redistribute it and/or \ @@ -904,13 +904,37 @@ int *plen; h = wlistdata->numwin; while (!done && *plen > 0) { + if ((unsigned char)**ppbuf >= '0' && (unsigned char)**ppbuf <= '9') + { + int n = (unsigned char)**ppbuf - '0'; + int d = 0; + if (n < MAXWIN && wtab[n]) + { + while (wlistdata->pos > n) + { + if (wtab[n]) + d--; + n++; + } + while (wlistdata->pos < n) + { + if (wtab[n]) + d++; + n--; + } + } + if (d) + WListMove(d, -1); + } switch ((unsigned char)**ppbuf) { - case 0220: + case 0220: /* up */ + case 16: /* ^P like emacs */ case 'k': WListMove(-1, -1); break; - case 0216: + case 0216: /* down */ + case 14: /* ^N like emacs */ case 'j': WListMove(1, -1); break; @@ -928,10 +952,10 @@ int *plen; case 'f': WListMove(h, -1); break; - case 0201: + case 0201: /* home */ WListMove(-wlistdata->pos, -1); break; - case 0205: + case 0205: /* end */ WListMove(MAXWIN, -1); break; case '\r': @@ -981,7 +1005,7 @@ int isblank; int n; display = 0; - str = MakeWinMsgEv(wliststr, wtab[i], '%', flayer->l_width, (struct event *)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] == ' ') @@ -1191,7 +1215,7 @@ wlistpage() wlistdata->pos = pos; display = 0; - str = MakeWinMsgEv(wlisttit, (struct win *)0, '%', flayer->l_width, (struct event *)0); + str = MakeWinMsgEv(wlisttit, (struct win *)0, '%', flayer->l_width, (struct event *)0, 0); LPutWinMsg(flayer, str, strlen(str), &mchar_blank, 0, 0); WListNormalize(); WListLines(wlistdata->numwin, -1); diff --git a/src/image.h b/src/image.h index 37c39c7..4c7772b 100644 --- a/src/image.h +++ b/src/image.h @@ -139,8 +139,8 @@ IFDWCHAR((mc)->mbcs = 0; )\ # ifdef COLORS256 # define rend_getbg(mc) (((mc)->color & 0xf0) >> 4 | ((mc)->attr & A_BBG ? 0x100 : 0) | ((mc)->colorx & 0xf0)) # define rend_setbg(mc, c) ((mc)->color = ((mc)->color & 0x0f) | (c << 4 & 0xf0), (mc)->colorx = ((mc)->colorx & 0x0f) | (c & 0xf0), (mc)->attr = ((mc)->attr | A_BBG) ^ (c & 0x100 ? 0 : A_BBG)) -# define rend_getfg(mc) (((mc)->color & 0x0f) | ((mc)->attr & A_BFG ? 0x100 : 0) | ((mc)->colorx & 0x0f << 4)) -# define rend_setfg(mc, c) ((mc)->color = ((mc)->color & 0xf0) | (c & 0x0f), (mc)->colorx = ((mc)->colorx & 0xf0) | (c & 0xf0 >> 4), (mc)->attr = ((mc)->attr | A_BFG) ^ (c & 0x100 ? 0 : A_BFG)) +# define rend_getfg(mc) (((mc)->color & 0x0f) | ((mc)->attr & A_BFG ? 0x100 : 0) | (((mc)->colorx & 0x0f) << 4)) +# define rend_setfg(mc, c) ((mc)->color = ((mc)->color & 0xf0) | (c & 0x0f), (mc)->colorx = ((mc)->colorx & 0xf0) | ((c & 0xf0) >> 4), (mc)->attr = ((mc)->attr | A_BFG) ^ (c & 0x100 ? 0 : A_BFG)) # define rend_setdefault(mc) ((mc)->color = (mc)->colorx = 0, (mc)->attr &= ~(A_BBG|A_BFG)) # else # define rend_getbg(mc) (((mc)->color & 0xf0) >> 4 | ((mc)->attr & A_BBG ? 0x100 : 0)) diff --git a/src/loadav.c b/src/loadav.c index 44fa99f..47460dd 100644 --- a/src/loadav.c +++ b/src/loadav.c @@ -310,9 +310,11 @@ InitLoadav() close(kmemf); return; } -# ifdef sgi +# if 0 /* no longer needed (Al.Smith@aeschi.ch.eu.org) */ +# ifdef sgi nl[0].n_value &= (unsigned long)-1 >> 1; /* clear upper bit */ -# endif /* sgi */ +# endif /* sgi */ +# endif debug1("AvenrunSym found (0x%lx)!!\n", nl[0].n_value); loadok = 1; } @@ -144,11 +144,13 @@ int y; * NW_BACK: search backward * NW_ENDOFWORD: find the end of the word * NW_MUSTMOVE: move at least one char + * NW_BIG: match WORDs not words */ #define NW_BACK (1<<0) #define NW_ENDOFWORD (1<<1) #define NW_MUSTMOVE (1<<2) +#define NW_BIG (1<<3) static void nextword(xp, yp, flags, num) @@ -168,6 +170,8 @@ int *xp, *yp, flags, num; { if (x >= xx || x < 0) q = 0; + else if (flags & NW_BIG) + q = ml->image[x] == ' '; else q = is_letter(ml->image[x]); if (oq >= 0 && oq != q) @@ -282,7 +286,7 @@ char *pt; c |= cf << 8; if (c == UCS_HIDDEN) continue; - c = ToUtf8(pt, c); + c = ToUtf8_comb(pt, c); l += c; if (pt) pt += c; @@ -293,6 +297,7 @@ char *pt; if (is_dw_font(cf)) { c = c << 8 | (unsigned char)*im++; + fo++; j++; } # endif @@ -702,15 +707,17 @@ int *inlenp; revto(cx, cy); break; case 'e': + case 'E': if (rep_cnt == 0) rep_cnt = 1; - nextword(&cx, &cy, NW_ENDOFWORD|NW_MUSTMOVE, rep_cnt); + nextword(&cx, &cy, NW_ENDOFWORD|NW_MUSTMOVE | (od == 'E' ? NW_BIG : 0), rep_cnt); revto(cx, cy); break; case 'b': + case 'B': if (rep_cnt == 0) rep_cnt = 1; - nextword(&cx, &cy, NW_BACK|NW_ENDOFWORD|NW_MUSTMOVE, rep_cnt); + nextword(&cx, &cy, NW_BACK|NW_ENDOFWORD|NW_MUSTMOVE | (od == 'B' ? NW_BIG : 0), rep_cnt); revto(cx, cy); break; case 'a': @@ -1156,6 +1163,10 @@ int isblank; if (markdata->second == 0) { + if (dw_right(ml, xs, fore->w_encoding) && xs > 0) + xs--; + if (dw_left(ml, xe, fore->w_encoding) && xe < fore->w_width - 1) + xe++; if (xs == 0 && y > 0 && wy > 0 && WIN(wy - 1)->image[flayer->l_width] == 0) LCDisplayLineWrap(flayer, ml, y, xs, xe, isblank); else @@ -182,7 +182,11 @@ sigret_t (*func) __P(SIGPROTOARG); struct sigaction osa, sa; sa.sa_handler = func; (void)sigemptyset(&sa.sa_mask); +#ifdef SA_RESTART + sa.sa_flags = (sig == SIGCHLD ? SA_RESTART : 0); +#else sa.sa_flags = 0; +#endif if (sigaction(sig, &sa, &osa)) return (sigret_t (*)__P(SIGPROTOARG))-1; return osa.sa_handler; @@ -639,7 +643,7 @@ char *value; # endif /* NEEDSETENV */ #else /* USESETENV */ # if defined(linux) || defined(__convex__) || (BSD >= 199103) - setenv(var, value, 0); + setenv(var, value, 1); # else setenv(var, value); # endif /* linux || convex || BSD >= 199103 */ diff --git a/src/patchlevel.h b/src/patchlevel.h index 99ff76b..1dcaabe 100644 --- a/src/patchlevel.h +++ b/src/patchlevel.h @@ -488,11 +488,30 @@ * use getpt() on linux systems. doc patches from * Adam Lazur. tty flow/intr cleanup. * -- DISTRIBUTED + * 29.08.2002 3.09.12 Port to POSIX 1003.1-2001 hosts (Paul Eggert). + * Fixed encoding for reattach password test. + * Fixed NUL characters when encodings are active. + * Fixed silly encodings bugs. Fixed bogus + * oldflayer when a window gets freed. + * Altscreen support by Gurusamy Sarathy. + * Reuse old password in builtin_screenlock. + * -- DISTRIBUTED + * 05.09.2002 3.09.13 added missing break statement that broke + * the eval command. + * -- DISTRIBUTED + * 13.03.2003 3.09.15 Console workaround for linux. Scrolling-region + * reset fix. GBK encoding added. + * support for unicode combining characters added. + * openpty() support added (thomas@xs4all.nl). + * preselect of blank window ('-') or window + * list ('=') added. Added %` string escape + * and backtick command. + * -- DISTRIBUTED */ #define ORIGIN "FAU" #define REV 3 #define VERS 9 -#define PATCHLEVEL 11 -#define DATE "14-Feb-02" -#define STATE "" +#define PATCHLEVEL 15 +#define DATE "13-Mar-03" +#define STATE "" diff --git a/src/process.c b/src/process.c index 5001b98..8ff964f 100644 --- a/src/process.c +++ b/src/process.c @@ -60,11 +60,11 @@ extern int log_flush, logtstamp_on, logtstamp_after; extern char *VisualBellString; extern int VBellWait, MsgWait, MsgMinWait, SilenceWait; extern char SockPath[], *SockName; -extern int TtyMode, auto_detach; -extern int iflag; +extern int TtyMode, auto_detach, use_altscreen; +extern int iflag, maxwin; extern int use_hardstatus, visual_bell; #ifdef COLOR -extern int attr2color[]; +extern int attr2color[][4]; extern int nattr2color; #endif extern int hardstatusemu; @@ -2622,7 +2622,7 @@ int key; { int old = fore->w_number; - if (ParseNum(act, &n) || n >= MAXWIN) + if (ParseNum(act, &n) || n >= maxwin) break; p = wtab[n]; wtab[n] = fore; @@ -2729,7 +2729,7 @@ int key; s = 0; if (ParseSaveStr(act, &s)) break; - if (!*s || strlen(s) + (SockName - SockPath) > MAXPATHLEN - 13) + if (!*s || strlen(s) + (SockName - SockPath) > MAXPATHLEN - 13 || index(s, '/')) { Msg(0, "%s: bad session name '%s'\n", rc_name, s); free(s); @@ -3165,8 +3165,16 @@ int key; break; #endif case RC_GR: +#ifdef ENCODINGS + if (fore->w_gr == 2) + fore->w_gr = 0; +#endif if (ParseSwitch(act, &fore->w_gr) == 0 && msgok) Msg(0, "Will %suse GR", fore->w_gr ? "" : "not "); +#ifdef ENCODINGS + if (fore->w_gr == 0 && fore->w_FontE) + fore->w_gr = 2; +#endif break; case RC_C1: if (ParseSwitch(act, &fore->w_c1) == 0 && msgok) @@ -3377,13 +3385,28 @@ int key; #endif #ifdef COLOR case RC_ATTRCOLOR: - if (args[0][0] >= '0' && args[0][0] <= '9') - i = args[0][0] - '0'; + s = args[0]; + if (*s >= '0' && *s <= '9') + i = *s - '0'; else for (i = 0; i < 8; i++) - if (args[0][0] == "dubrsBiI"[i]) + if (*s == "dubrsBiI"[i]) break; - if (args[0][1] || i < 0 || i >= 8) + s++; + nr = 0; + if (*s && s[1] && !s[2]) + { + if (*s == 'd' && s[1] == 'd') + nr = 3; + else if (*s == '.' && s[1] == 'd') + nr = 2; + else if (*s == 'd' && s[1] == '.') + nr = 1; + else if (*s != '.' || s[1] != '.') + s--; + s += 2; + } + if (*s || i < 0 || i >= 8) { Msg(0, "%s: attrcolor: unknown attribute '%s'.", rc_name, args[0]); break; @@ -3393,10 +3416,10 @@ int key; n = ParseAttrColor(args[1], args[2], 1); if (n == -1) break; - attr2color[i] = n; + attr2color[i][nr] = n; n = 0; for (i = 0; i < 8; i++) - if (attr2color[i]) + if (attr2color[i][0] || attr2color[i][1] || attr2color[i][2] || attr2color[i][3]) n |= 1 << i; nattr2color = n; break; @@ -3517,6 +3540,42 @@ int key; RcLine(ss); free(ss); } + break; + case RC_ALTSCREEN: + (void)ParseSwitch(act, &use_altscreen); + if (msgok) + Msg(0, "Will %sdo alternate screen switching", use_altscreen ? "" : "not "); + break; + case RC_MAXWIN: + if (ParseNum(act, &n)) + break; + if (n < 1) + Msg(0, "illegal maxwin number specified"); + else if (n > maxwin) + Msg(0, "may only decrease maxwin number"); + else + maxwin = n; + break; + case RC_BACKTICK: + if (ParseBase(act, *args, &n, 10, "decimal")) + break; + if (!args[1]) + setbacktick(n, 0, 0, (char **)0); + else + { + int lifespan, tick; + if (argc < 4) + { + Msg(0, "%s: usage: backtick num [lifespan tick cmd args...]", rc_name); + break; + } + if (ParseBase(act, args[1], &lifespan, 10, "decimal")) + break; + if (ParseBase(act, args[2], &tick, 10, "decimal")) + break; + setbacktick(n, lifespan, tick, SaveArgs(args + 3)); + } + break; default: #ifdef HAVE_BRAILLE /* key == -2: input from braille keybord, msgok always 0 */ @@ -4208,6 +4267,7 @@ PreviousWindow() static int MoreWindows() { + char *m = "No other window."; if (windows && (fore == 0 || windows->w_next)) return 1; if (fore == 0) @@ -4215,7 +4275,7 @@ MoreWindows() Msg(0, "No window available"); return 0; } - Msg(0, "No other window."+1-1, fore->w_number); /* other arg for nethack */ + Msg(0, m, fore->w_number); /* other arg for nethack */ return 0; } @@ -4510,7 +4570,21 @@ ShowInfo() # endif if (D_CC0 || (D_CS0 && *D_CS0)) { - if (wp->w_gr) + if (wp->w_gr == 2) + { + sprintf(p, " G%c", wp->w_Charset + '0'); + if (wp->w_FontE >= ' ') + p[3] = wp->w_FontE; + else + { + p[3] = '^'; + p[4] = wp->w_FontE ^ 0x40; + p++; + } + p[4] = '['; + p++; + } + else if (wp->w_gr) sprintf(p++, " G%c%c[", wp->w_Charset + '0', wp->w_CharsetR + '0'); else sprintf(p, " G%c[", wp->w_Charset + '0'); @@ -4932,7 +5006,7 @@ char *data; /* dummy */ bcopy(D_user->u_plop.buf, pp->buf, D_user->u_plop.len); } pp->len = D_user->u_plop.len; -#ifdef ENCODING +#ifdef ENCODINGS pp->enc = D_user->u_plop.enc; #endif Msg(0, "Copied %d characters into register %c", D_user->u_plop.len, *buf); @@ -5092,7 +5166,7 @@ int len; char *data; { int st; - char salt[2]; + char salt[3]; struct acluser *u = (struct acluser *)data; ASSERT(u); @@ -5117,6 +5191,7 @@ char *data; { for (st = 0; st < 2; st++) salt[st] = 'A' + (int)((time(0) >> 6 * st) % 26); + salt[2] = 0; buf = crypt(u->u_password, salt); bzero(u->u_password, strlen(u->u_password)); free((char *)u->u_password); @@ -94,6 +94,14 @@ static char TtyProto[] = "/dev/ttyXY"; static void initmaster __P((int)); +#if defined(sun) +/* sun's utmp_update program opens the salve side, thus corrupting + */ +int pty_preopen = 1; +#else +int pty_preopen = 0; +#endif + /* * Open all ptys with O_NOCTTY, just to be on the safe side * (RISCos mips breaks otherwise) @@ -281,10 +289,6 @@ char **ttyn; #if defined(_AIX) && defined(HAVE_DEV_PTC) && !defined(PTY_DONE) #define PTY_DONE -#ifdef _IBMR2 -int aixhack = -1; -#endif - int OpenPTY(ttyn) char **ttyn; @@ -303,13 +307,7 @@ char **ttyn; } initmaster(f); # ifdef _IBMR2 - if (aixhack >= 0) - close(aixhack); - if ((aixhack = open(TtyName, O_RDWR | O_NOCTTY)) < 0) - { - close(f); - return -1; - } + pty_preopen = 1; # endif *ttyn = TtyName; return f; @@ -318,6 +316,25 @@ char **ttyn; /***************************************************************/ +#if defined(HAVE_OPENPTY) && !defined(PTY_DONE) +#define PTY_DONE +int +OpenPTY(ttyn) +char **ttyn; +{ + int f, s; + if (openpty(&f, &s, TtyName, NULL, NULL) != 0) + return -1; + close(s); + initmaster(f); + pty_preopen = 1; + *ttyn = TtyName; + return f; +} +#endif + +/***************************************************************/ + #ifndef PTY_DONE int OpenPTY(ttyn) diff --git a/src/resize.c b/src/resize.c index 3b20e84..1321985 100644 --- a/src/resize.c +++ b/src/resize.c @@ -46,6 +46,7 @@ static int AllocMline __P((struct mline *ml, int)); static void MakeBlankLine __P((unsigned char *, int)); static void kaablamm __P((void)); static int BcopyMline __P((struct mline *, int, struct mline *, int, int, int)); +static void SwapAltScreen __P((struct win *)); extern struct layer *flayer; extern struct display *display, *displays; @@ -1019,10 +1020,83 @@ int wi, he, hi; { ml = OLDWIN(fy); ASSERT(ml->image); - for (l = 0; l < p->w_width; l++) - ASSERT((unsigned char)ml->image[l] >= ' '); +# ifdef UTF8 + if (p->w_encoding == UTF8) + { + for (l = 0; l < p->w_width; l++) + ASSERT(ml->image[l] >= ' ' || ml->font[l]); + } + else +#endif + for (l = 0; l < p->w_width; l++) + ASSERT(ml->image[l] >= ' '); } #endif return 0; } +void +FreeAltScreen(p) +struct win *p; +{ + int i; + + if (p->w_alt_mlines) + for (i = 0; i < p->w_alt_height; i++) + FreeMline(p->w_alt_mlines + i); + p->w_alt_mlines = 0; + p->w_alt_width = 0; + p->w_alt_height = 0; + p->w_alt_x = 0; + 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); + p->w_alt_hlines = 0; + p->w_alt_histidx = 0; +#endif + p->w_alt_histheight = 0; +} + +static void +SwapAltScreen(p) +struct win *p; +{ + struct mline *ml; + int t; + + ml = p->w_alt_mlines; p->w_alt_mlines = p->w_mlines; p->w_mlines = ml; + t = p->w_alt_width; p->w_alt_width = p->w_width; p->w_width = t; + t = p->w_alt_height; p->w_alt_height = p->w_height; p->w_height = t; + t = p->w_alt_histheight; p->w_alt_histheight = p->w_histheight; p->w_histheight = t; + t = p->w_alt_x; p->w_alt_x = p->w_x; p->w_x = t; + t = p->w_alt_y; p->w_alt_y = p->w_y; p->w_y = t; +#ifdef COPY_PASTE + ml = p->w_alt_hlines; p->w_alt_hlines = p->w_hlines; p->w_hlines = ml; + t = p->w_alt_histidx; p->w_alt_histidx = p->w_histidx; p->w_histidx = t; +#endif +} + +void +EnterAltScreen(p) +struct win *p; +{ + int ox = p->w_x, oy = p->w_y; + FreeAltScreen(p); + SwapAltScreen(p); + ChangeWindowSize(p, p->w_alt_width, p->w_alt_height, p->w_alt_histheight); + p->w_x = ox; + p->w_y = oy; +} + +void +LeaveAltScreen(p) +struct win *p; +{ + if (!p->w_alt_mlines) + return; + SwapAltScreen(p); + ChangeWindowSize(p, p->w_alt_width, p->w_alt_height, p->w_alt_histheight); + FreeAltScreen(p); +} diff --git a/src/screen.c b/src/screen.c index 5e51825..2bd2195 100644 --- a/src/screen.c +++ b/src/screen.c @@ -130,6 +130,7 @@ char *ShellProg; char *ShellArgs[2]; extern struct NewWindow nwin_undef, nwin_default, nwin_options; +struct backtick; static struct passwd *getpwbyname __P((char *, struct passwd *)); static void SigChldHandler __P((void)); @@ -141,6 +142,9 @@ static void DoWait __P((void)); static void serv_read_fn __P((struct event *, char *)); static void serv_select_fn __P((struct event *, char *)); static void logflush_fn __P((struct event *, char *)); +static void backtick_filter __P((struct backtick *)); +static void backtick_fn __P((struct event *, char *)); +static char *runbacktick __P((struct backtick *, int *, time_t, struct win *)); static int IsSymbol __P((char *, char *)); #ifdef DEBUG static void fds __P((void)); @@ -220,6 +224,7 @@ int nethackflag = 0; #ifdef MAPKEYS int maptimeout = 300000; #endif +int maxwin = MAXWIN; struct layer *flayer; @@ -713,6 +718,23 @@ char **av; else break; } + + real_uid = getuid(); + real_gid = getgid(); + eff_uid = geteuid(); + eff_gid = getegid(); + if (eff_uid != real_uid) + { + /* if running with s-bit, we must install a special signal + * handler routine that resets the s-bit, so that we get a + * core file anyway. + */ +#ifdef SIGBUS /* OOPS, linux has no bus errors! */ + signal(SIGBUS, CoreDump); +#endif /* SIGBUS */ + signal(SIGSEGV, CoreDump); + } + #ifdef USE_LOCALE setlocale(LC_ALL, ""); #endif @@ -749,21 +771,6 @@ char **av; #endif if (ac) nwin.args = av; - real_uid = getuid(); - real_gid = getgid(); - eff_uid = geteuid(); - eff_gid = getegid(); - if (eff_uid != real_uid) - { - /* if running with s-bit, we must install a special signal - * handler routine that resets the s-bit, so that we get a - * core file anyway. - */ -#ifdef SIGBUS /* OOPS, linux has no bus errors! */ - signal(SIGBUS, CoreDump); -#endif /* SIGBUS */ - signal(SIGSEGV, CoreDump); - } /* make the write() calls return -1 on all errors */ #ifdef SIGXFSZ @@ -888,7 +895,7 @@ char **av; #ifdef MULTIUSER tty_mode = (int)st.st_mode & 0777; #endif - if ((n = secopen(attach_tty, O_RDWR, 0)) < 0) + 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); @@ -1014,6 +1021,8 @@ char **av; } if ((st.st_mode & 0777) != 0700) Panic(0, "Directory %s must have mode 700.", SockPath); + if (SockMatch && index(SockMatch, '/')) + Panic(0, "Bad session name '%s'", SockMatch); SockName = SockPath + strlen(SockPath) + 1; *SockName = 0; (void) umask(oumask); @@ -2054,13 +2063,221 @@ int padlen; return pn2; } +struct backtick { + struct backtick *next; + int num; + int tick; + int lifespan; + time_t bestbefore; + char result[MAXSTR]; + char **cmdv; + struct event ev; + char *buf; + int bufi; +}; + +struct backtick *backticks; + +static void +backtick_filter(bt) +struct backtick *bt; +{ + char *p, *q; + int c; + + for (p = q = bt->result; (c = (unsigned char)*p++) != 0;) + { + if (c == '\t') + c = ' '; + if (c >= ' ' || c == '\005') + *q++ = c; + } + *q = 0; +} + +static void +backtick_fn(ev, data) +struct event *ev; +char *data; +{ + struct backtick *bt; + int i, j, k, l; + + bt = (struct backtick *)data; + debug1("backtick_fn for #%d\n", bt->num); + i = bt->bufi; + l = read(ev->fd, bt->buf + i, MAXSTR - i); + if (l <= 0) + { + debug1("EOF on backtick #%d\n", bt->num); + evdeq(ev); + close(ev->fd); + ev->fd = -1; + return; + } + debug1("read %d bytes\n", l); + i += l; + for (j = 0; j < l; j++) + if (bt->buf[i - j - 1] == '\n') + break; + if (j < l) + { + for (k = i - j - 2; k >= 0; k--) + if (bt->buf[k] == '\n') + break; + k++; + bcopy(bt->buf + k, bt->result, i - j - k); + bt->result[i - j - k - 1] = 0; + backtick_filter(bt); + WindowChanged(0, '`'); + } + if (j == l && i == MAXSTR) + { + j = MAXSTR/2; + l = j + 1; + } + if (j < l) + { + if (j) + bcopy(bt->buf + i - j, bt->buf, j); + i = j; + } + bt->bufi = i; +} + +void +setbacktick(num, lifespan, tick, cmdv) +int num; +int lifespan; +int tick; +char **cmdv; +{ + struct backtick **btp, *bt; + char **v; + + debug1("setbacktick called for backtick #%d\n", num); + for (btp = &backticks; (bt = *btp) != 0; btp = &bt->next) + if (bt->num == num) + break; + if (!bt && !cmdv) + return; + if (bt) + { + for (v = bt->cmdv; *v; v++) + free(*v); + free(bt->cmdv); + if (bt->buf) + free(bt->buf); + if (bt->ev.fd >= 0) + close(bt->ev.fd); + evdeq(&bt->ev); + } + if (bt && !cmdv) + { + *btp = bt->next; + free(bt); + return; + } + if (!bt) + { + bt = (struct backtick *)malloc(sizeof *bt); + if (!bt) + { + Msg(0, strnomem); + return; + } + bzero(bt, sizeof(*bt)); + bt->next = 0; + *btp = bt; + } + bt->num = num; + bt->tick = tick; + bt->lifespan = lifespan; + bt->bestbefore = 0; + bt->result[0] = 0; + bt->buf = 0; + bt->bufi = 0; + bt->cmdv = cmdv; + bt->ev.fd = -1; + if (bt->tick == 0 && bt->lifespan == 0) + { + debug("setbacktick: continuous mode\n"); + bt->buf = (char *)malloc(MAXSTR); + if (bt->buf == 0) + { + Msg(0, strnomem); + setbacktick(num, 0, 0, (char **)0); + return; + } + bt->ev.type = EV_READ; + bt->ev.fd = readpipe(bt->cmdv); + bt->ev.handler = backtick_fn; + bt->ev.data = (char *)bt; + if (bt->ev.fd >= 0) + evenq(&bt->ev); + } +} + +static char * +runbacktick(bt, tickp, now, win) +struct backtick *bt; +int *tickp; +time_t now; +struct win *win; +{ + int f, i, l, j; + time_t now2; + + debug1("runbacktick called for backtick #%d\n", bt->num); + if (bt->tick && (!*tickp || bt->tick < *tickp)) + *tickp = bt->tick; + if ((bt->lifespan == 0 && bt->tick == 0) || now < bt->bestbefore) + { + debug1("returning old result (%d)\n", bt->lifespan); + return bt->result; + } + f = readpipe(bt->cmdv); + if (f == -1) + return bt->result; + i = 0; + while ((l = read(f, bt->result + i, sizeof(bt->result) - i)) > 0) + { + debug1("runbacktick: read %d bytes\n", l); + i += l; + for (j = 1; j < l; j++) + if (bt->result[i - j - 1] == '\n') + break; + if (j == l && i == sizeof(bt->result)) + { + j = sizeof(bt->result) / 2; + l = j + 1; + } + if (j < l) + { + bcopy(bt->result + i - j, bt->result, j); + i = j; + } + } + close(f); + bt->result[sizeof(bt->result) - 1] = '\n'; + if (i && bt->result[i - 1] == '\n') + i--; + debug1("runbacktick: finished, %d bytes\n", i); + bt->result[i] = 0; + backtick_filter(bt); + (void)time(&now2); + bt->bestbefore = now2 + bt->lifespan; + return bt->result; +} + char * -MakeWinMsgEv(str, win, esc, padlen, ev) +MakeWinMsgEv(str, win, esc, padlen, ev, rec) char *str; struct win *win; int esc; int padlen; struct event *ev; +int rec; { static int tick; char *s = str; @@ -2081,6 +2298,7 @@ struct event *ev; int truncpos = -1; int truncper = 0; int trunclong = 0; + struct backtick *bt; if (winmsg_numrend >= 0) winmsg_numrend = 0; @@ -2182,11 +2400,12 @@ struct event *ev; tm = localtime(&nowsec); } qmflag = 1; + if (!tick || tick > 3600) + tick = 3600; switch (*s) { case 'd': sprintf(p, "%02d", tm->tm_mday % 100); - tick |= 4; break; case 'D': #ifdef USE_LOCALE @@ -2194,11 +2413,9 @@ struct event *ev; #else sprintf(p, "%3.3s", days + 3 * tm->tm_wday); #endif - tick |= 4; break; case 'm': sprintf(p, "%02d", tm->tm_mon + 1); - tick |= 4; break; case 'M': #ifdef USE_LOCALE @@ -2206,35 +2423,32 @@ struct event *ev; #else sprintf(p, "%3.3s", months + 3 * tm->tm_mon); #endif - tick |= 4; break; case 'y': sprintf(p, "%02d", tm->tm_year % 100); - tick |= 4; break; case 'Y': sprintf(p, "%04d", tm->tm_year + 1900); - tick |= 4; break; case 'a': sprintf(p, tm->tm_hour >= 12 ? "pm" : "am"); - tick |= 4; break; case 'A': sprintf(p, tm->tm_hour >= 12 ? "PM" : "AM"); - tick |= 4; break; case 's': sprintf(p, "%02d", tm->tm_sec); - tick |= 1; + tick = 1; break; case 'c': sprintf(p, zeroflg ? "%02d:%02d" : "%2d:%02d", tm->tm_hour, tm->tm_min); - tick |= 2; + if (!tick || tick > 60) + tick = 60; break; case 'C': sprintf(p, zeroflg ? "%02d:%02d" : "%2d:%02d", (tm->tm_hour + 11) % 12 + 1, tm->tm_min); - tick |= 2; + if (!tick || tick > 60) + tick = 60; break; default: break; @@ -2253,16 +2467,31 @@ struct event *ev; } else *p = '?'; - tick |= 2; + if (!tick || tick > 60) + tick = 60; #else *p = '?'; #endif p += strlen(p) - 1; break; + case '`': case 'h': - if (win == 0 || win->w_hstatus == 0 || *win->w_hstatus == 0 || str == win->w_hstatus) - p--; - else + if (rec >= 10 || (*s == 'h' && (win == 0 || win->w_hstatus == 0 || *win->w_hstatus == 0))) + { + p--; + break; + } + if (*s == '`') + { + for (bt = backticks; bt; bt = bt->next) + if (bt->num == num) + break; + if (bt == 0) + { + p--; + break; + } + } { char savebuf[sizeof(winmsg_buf)]; int oldtick = tick; @@ -2271,8 +2500,10 @@ struct event *ev; *p = 0; strcpy(savebuf, winmsg_buf); winmsg_numrend = -winmsg_numrend; - MakeWinMsg(win->w_hstatus, win, '\005'); - tick |= oldtick; /* small hack... */ + MakeWinMsgEv(*s == 'h' ? win->w_hstatus : runbacktick(bt, &oldtick, now.tv_sec, win), win, '\005', 0, (struct event *)0, rec + 1); + debug2("oldtick=%d tick=%d\n", oldtick, tick); + if (!tick || oldtick < tick) + tick = oldtick; if (strlen(winmsg_buf) < l) strcat(savebuf, winmsg_buf); strcpy(winmsg_buf, savebuf); @@ -2429,6 +2660,7 @@ struct event *ev; left = truncpos - trunc; if (left > p - winmsg_buf - num) left = p - winmsg_buf - num; + debug1("lastpad = %d, ", lastpad); debug3("truncpos = %d, trunc = %d, left = %d\n", truncpos, trunc, left); if (left > 0) { @@ -2475,6 +2707,7 @@ struct event *ev; trunclong = 0; if (lastpad > p - winmsg_buf) lastpad = p - winmsg_buf; + debug1("lastpad now %d\n", lastpad); } if (*s == '=') { @@ -2483,6 +2716,7 @@ struct event *ev; lastpad = p - winmsg_buf; truncpos = -1; trunclong = 0; + debug1("lastpad2 now %d\n", lastpad); } p--; } @@ -2528,14 +2762,13 @@ struct event *ev; } if (ev && tick) { - now.tv_usec = 0; - if (tick & 1) + now.tv_usec = 100000; + if (tick == 1) now.tv_sec++; - else if (tick & 2) - now.tv_sec += 60 - (now.tv_sec % 60); - else if (tick & 4) - now.tv_sec += 3600 - (now.tv_sec % 3600); + else + now.tv_sec += tick - (now.tv_sec % tick); ev->timeout = now; + debug2("NEW timeout %d %d\n", ev->timeout.tv_sec, tick); } return winmsg_buf; } @@ -2546,7 +2779,7 @@ char *s; struct win *win; int esc; { - return MakeWinMsgEv(s, win, esc, 0, (struct event *)0); + return MakeWinMsgEv(s, win, esc, 0, (struct event *)0, 0); } int diff --git a/src/screen.h b/src/screen.h index ac7c1ab..c58c12f 100644 --- a/src/screen.h +++ b/src/screen.h @@ -98,7 +98,7 @@ */ #define MAXHISTHEIGHT 3000 #define DEFAULTHISTHEIGHT 100 -#ifdef NAME_MAX +#if defined(NAME_MAX) && NAME_MAX < 16 # define DEFAULT_BUFFERFILE "/tmp/screen-xchg" #else # define DEFAULT_BUFFERFILE "/tmp/screen-exchange" diff --git a/src/socket.c b/src/socket.c index 57bb176..91a637e 100644 --- a/src/socket.c +++ b/src/socket.c @@ -76,6 +76,7 @@ extern char *getenv(); extern char SockPath[]; extern struct event serv_read; extern char *rc_name; +extern struct comm comms[]; #ifdef MULTIUSER # define SOCKMODE (S_IWRITE | S_IREAD | (displays ? S_IEXEC : 0) | (multi ? 1 : 0)) @@ -360,10 +361,11 @@ char *match; } if (ndead && !quietflag) { + char *m = "Remove dead screens with 'screen -wipe'."; if (wipeflag) Msg(0, "%d socket%s wiped out.", nwipe, nwipe > 1 ? "s" : ""); else - Msg(0, "Remove dead screens with 'screen -wipe'."+1-1, ndead > 1 ? "s" : "", ndead > 1 ? "" : "es"); /* other args for nethack */ + Msg(0, m, ndead > 1 ? "s" : "", ndead > 1 ? "" : "es"); /* other args for nethack */ } if (firsts != -1) { @@ -1112,6 +1114,7 @@ struct msg *m; { char *p; int pid; + int noshowwin; struct win *wi; ASSERT(display); @@ -1193,11 +1196,36 @@ struct msg *m; if (D_user->u_detachotherwin >= 0) D_other = wtab[D_user->u_detachotherwin]; - fore = FindNiceWindow(fore, *m->m.attach.preselect ? m->m.attach.preselect : 0); + noshowwin = 0; + if (*m->m.attach.preselect) + { + if (!strcmp(m->m.attach.preselect, "=")) + fore = 0; + else if (!strcmp(m->m.attach.preselect, "-")) + { + fore = 0; + noshowwin = 1; + } + else + fore = FindNiceWindow(fore, m->m.attach.preselect); + } + else + fore = FindNiceWindow(fore, 0); if (fore) SetForeWindow(fore); + else if (!noshowwin) + { +#ifdef MULTIUSER + if (!AclCheckPermCmd(D_user, ACL_EXEC, &comms[RC_WINDOWLIST])) +#endif + { + flayer = D_forecv->c_layer; + display_wlist(1); + noshowwin = 1; + } + } Activate(0); - if (!D_fore) + if (!D_fore && !noshowwin) ShowWindows(-1); if (displays->d_next == 0 && console_window) { @@ -1362,8 +1390,9 @@ struct msg *mp; display = displays; /* sigh */ if (*mp->m.command.preselect) { - int i; - i = WindowByNoN(mp->m.command.preselect); + int i = -1; + if (strcmp(mp->m.command.preselect, "-")) + i = WindowByNoN(mp->m.command.preselect); fore = i >= 0 ? wtab[i] : 0; } else if (!fore) diff --git a/src/termcap.c b/src/termcap.c index 4e2e2d1..29d2f5a 100644 --- a/src/termcap.c +++ b/src/termcap.c @@ -705,13 +705,13 @@ char *s; { register int n; - if (tcLineLen + (n = strlen(s)) > 55 && Termcaplen < TERMCAP_BUFSIZE + 8 - 4) + if (tcLineLen + (n = strlen(s)) > 55 && Termcaplen < TERMCAP_BUFSIZE - 4 - 1) { strcpy(Termcap + Termcaplen, "\\\n\t:"); Termcaplen += 4; tcLineLen = 0; } - if (Termcaplen + n < TERMCAP_BUFSIZE + 8) + if (Termcaplen + n < TERMCAP_BUFSIZE - 1) { strcpy(Termcap + Termcaplen, s); Termcaplen += n; @@ -772,12 +772,22 @@ int aflag; if (e_tgetent(buf, p) == 1) break; } +#ifdef COLOR + if (nwin_default.bce) + { + sprintf(p, "%s-bce", screenterm); + if (e_tgetent(buf, p) == 1) + break; + } +#endif +#ifdef CHECK_SCREEN_W if (wi >= 132) { sprintf(p, "%s-w", screenterm); if (e_tgetent(buf, p) == 1) break; } +#endif strcpy(p, screenterm); if (e_tgetent(buf, p) == 1) break; @@ -866,6 +876,8 @@ int aflag; AddCap("vi=\\E[?25l:"); AddCap("ve=\\E[34h\\E[?25h:"); AddCap("vs=\\E[34l:"); + AddCap("ti=\\E[?1049h:"); + AddCap("te=\\E[?1049l:"); if (display) { if (D_US) diff --git a/src/terminfo/screencap b/src/terminfo/screencap index d2becd4..0b2e562 100644 --- a/src/terminfo/screencap +++ b/src/terminfo/screencap @@ -13,9 +13,11 @@ SC|screen|VT 100/ANSI X3.64 virtual terminal:\ :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\ :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\ :kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:@7=\E[4~:kP=\E[5~:\ - :kN=\E[6~:eA=\E(B\E)0:as=^N:ae=^O:\ + :kN=\E[6~:eA=\E(B\E)0:as=^N:ae=^O:ti=\E[?1049h:te=\E[?1049l:\ :vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\ :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\ :ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00: -SW|screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols:\ - :co#132:tc=screen: +SB|screen-bce|VT 100/ANSI X3.64 virtual terminal with bce:\ + :ut:tc=screen: +SH|screen-s|VT 100/ANSI X3.64 virtual terminal with hardstatus line:\ + :ts=\E_:fs=\E\\:ds=\E_\E\\:tc=screen: diff --git a/src/terminfo/screeninfo.src b/src/terminfo/screeninfo.src index aee40a8..d1c23e2 100644 --- a/src/terminfo/screeninfo.src +++ b/src/terminfo/screeninfo.src @@ -15,16 +15,40 @@ screen|VT 100/ANSI X3.64 virtual terminal, kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kend=\E[4~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, nel=\EE, - rc=\E8, rev=\E[7m, ri=\EM, rmir=\E[4l, rmkx=\E[?1l\E>, - rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7, sgr0=\E[m, - smir=\E[4h, smkx=\E[?1h\E=, smso=\E[3m, smul=\E[4m, - tbc=\E[3g, smacs=^N, rmacs=^O, flash=\Eg, + rc=\E8, rev=\E[7m, ri=\EM, rmcup=\E[?1049l, rmir=\E[4l, + rmkx=\E[?1l\E>, rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7, + sgr0=\E[m, smcup=\E[?1049h, smir=\E[4h, smkx=\E[?1h\E=, + smso=\E[3m, smul=\E[4m, tbc=\E[3g, smacs=^N, rmacs=^O, flash=\Eg, civis=\E[?25l, cnorm=\E[34h\E[?25h, cvvis=\E[34l, op=\E[39;49m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++\054\054hhII00, -screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols, - am, km, mir, msgr, xenl, - cols#132, it#8, lines#24, colors#8, pairs#64, +screen-bce|VT 100/ANSI X3.64 virtual terminal with bce, + am, bce, km, mir, msgr, xenl, + cols#80, it#8, lines#24, colors#8, pairs#64, + bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, + clear=\E[H\E[J, cr=\r, csr=\E[%i%p1%d;%p2%dr, + cub=\E[%p1%dD, cub1=\b, cud=\E[%p1%dB, cud1=\n, + cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, + cuu=\E[%p1%dA, cuu1=\EM, dch=\E[%p1%dP, dch1=\E[P, + dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, + enacs=\E(B\E)0, home=\E[H, + ht=\t, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, + ind=\n, is2=\E)0, kbs=\b, kcub1=\EOD, kcud1=\EOB, + kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kf1=\EOP, + kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, + kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~, + kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kend=\E[4~, + kich1=\E[2~, knp=\E[6~, kpp=\E[5~, nel=\EE, + rc=\E8, rev=\E[7m, ri=\EM, rmcup=\E[?1049l, rmir=\E[4l, + rmkx=\E[?1l\E>, rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7, + sgr0=\E[m, smcup=\E[?1049h, smir=\E[4h, smkx=\E[?1h\E=, + smso=\E[3m, smul=\E[4m, tbc=\E[3g, smacs=^N, rmacs=^O, flash=\Eg, + civis=\E[?25l, cnorm=\E[34h\E[?25h, cvvis=\E[34l, + op=\E[39;49m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, + acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++\054\054hhII00, +screen-s|VT 100/ANSI X3.64 virtual terminal with hardstatus line, + am, bce, km, mir, msgr, xenl, + cols#80, it#8, lines#24, colors#8, pairs#64, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\b, cud=\E[%p1%dB, cud1=\n, @@ -39,10 +63,11 @@ screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols, kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kend=\E[4~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, nel=\EE, - rc=\E8, rev=\E[7m, ri=\EM, rmir=\E[4l, rmkx=\E[?1l\E>, - rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7, sgr0=\E[m, - smir=\E[4h, smkx=\E[?1h\E=, smso=\E[3m, smul=\E[4m, - tbc=\E[3g, smacs=^N, rmacs=^O, flash=\Eg, + rc=\E8, rev=\E[7m, ri=\EM, rmcup=\E[?1049l, rmir=\E[4l, + rmkx=\E[?1l\E>, rmso=\E[23m, rmul=\E[24m, rs2=\Ec, sc=\E7, + sgr0=\E[m, smcup=\E[?1049h, smir=\E[4h, smkx=\E[?1h\E=, + smso=\E[3m, smul=\E[4m, tbc=\E[3g, smacs=^N, rmacs=^O, flash=\Eg, + tsl=\E_, fsl=\E\\, dsl=\E_\E\\, civis=\E[?25l, cnorm=\E[34h\E[?25h, cvvis=\E[34l, op=\E[39;49m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++\054\054hhII00, diff --git a/src/tty.c.dist b/src/tty.c.dist index c5cdfe7..bd8ab17 100644 --- a/src/tty.c.dist +++ b/src/tty.c.dist @@ -66,7 +66,7 @@ RCS_ID("$Id$ FAU") extern struct display *display, *displays; extern int iflag; -#if !defined(TIOCCONS) && defined(SRIOCSREDIR) +#if (!defined(TIOCCONS) && defined(SRIOCSREDIR)) || defined(linux) extern struct win *console_window; static void consredir_readev_fn __P((struct event *, char *)); #endif @@ -1123,6 +1123,8 @@ int fd, n, type; { int i; + if (!n) + n++; for (i = 0; i < n; i++) if (tcsendbreak(fd, 0) < 0) { @@ -1248,7 +1250,7 @@ int n, closeopen; * Console grabbing */ -#if !defined(TIOCCONS) && defined(SRIOCSREDIR) +#if (!defined(TIOCCONS) && defined(SRIOCSREDIR)) || defined(linux) static struct event consredir_ev; static int consredirfd[2] = {-1, -1}; @@ -1289,7 +1291,7 @@ TtyGrabConsole(fd, on, rc_name) int fd, on; char *rc_name; { -#ifdef TIOCCONS +#if defined(TIOCCONS) && !defined(linux) struct display *d; int ret = 0; int sfd = -1; @@ -1321,7 +1323,7 @@ char *rc_name; Msg(errno, "%s: could not open detach pty master", rc_name); return -1; } - if ((sfd = open(slave, O_RDWR)) < 0) + if ((sfd = open(slave, O_RDWR | O_NOCTTY)) < 0) { Msg(errno, "%s: could not open detach pty slave", rc_name); close(fd); @@ -1341,9 +1343,14 @@ char *rc_name; return ret; #else -# ifdef SRIOCSREDIR +# if defined(SRIOCSREDIR) || defined(linux) struct display *d; +# ifdef SRIOCSREDIR int cfd; +# else + struct mode new1, new2; + char *slave; +# endif if (on > 0) { @@ -1370,6 +1377,7 @@ char *rc_name; } if (on <= 0) return 0; +# ifdef SRIOCSREDIR if ((cfd = secopen("/dev/console", O_RDWR|O_NOCTTY, 0)) == -1) { Msg(errno, "/dev/console"); @@ -1391,12 +1399,37 @@ char *rc_name; consredirfd[0] = consredirfd[1] = -1; return -1; } - + close(cfd); +# else + /* special linux workaround for a too restrictive kernel */ + if ((consredirfd[0] = OpenPTY(&slave)) < 0) + { + Msg(errno, "%s: could not open detach pty master", rc_name); + return -1; + } + if ((consredirfd[1] = open(slave, O_RDWR | O_NOCTTY)) < 0) + { + Msg(errno, "%s: could not open detach pty slave", rc_name); + close(consredirfd[0]); + return -1; + } + InitTTY(&new1, 0); + SetMode(&new1, &new2, 0, 0); + SetTTY(consredirfd[1], &new2); + if (UserContext() == 1) + UserReturn(ioctl(consredirfd[1], TIOCCONS, (char *)&on)); + if (UserStatus()) + { + Msg(errno, "%s: ioctl TIOCCONS failed", rc_name); + close(consredirfd[0]); + close(consredirfd[1]); + return -1; + } +# endif consredir_ev.fd = consredirfd[0]; consredir_ev.type = EV_READ; consredir_ev.handler = consredir_readev_fn; evenq(&consredir_ev); - close(cfd); return 0; # else if (on > 0) @@ -92,7 +92,7 @@ RCS_ID("$Id$ FAU") extern struct display *display, *displays; extern int iflag; -#if !defined(TIOCCONS) && defined(SRIOCSREDIR) +#if (!defined(TIOCCONS) && defined(SRIOCSREDIR)) || defined(linux) extern struct win *console_window; static void consredir_readev_fn __P((struct event *, char *)); #endif @@ -893,6 +893,8 @@ int fd, n, type; { int i; + if (!n) + n++; for (i = 0; i < n; i++) if (tcsendbreak(fd, 0) < 0) { @@ -1018,7 +1020,7 @@ int n, closeopen; * Console grabbing */ -#if !defined(TIOCCONS) && defined(SRIOCSREDIR) +#if (!defined(TIOCCONS) && defined(SRIOCSREDIR)) || defined(linux) static struct event consredir_ev; static int consredirfd[2] = {-1, -1}; @@ -1059,7 +1061,7 @@ TtyGrabConsole(fd, on, rc_name) int fd, on; char *rc_name; { -#ifdef TIOCCONS +#if defined(TIOCCONS) && !defined(linux) struct display *d; int ret = 0; int sfd = -1; @@ -1091,7 +1093,7 @@ char *rc_name; Msg(errno, "%s: could not open detach pty master", rc_name); return -1; } - if ((sfd = open(slave, O_RDWR)) < 0) + if ((sfd = open(slave, O_RDWR | O_NOCTTY)) < 0) { Msg(errno, "%s: could not open detach pty slave", rc_name); close(fd); @@ -1111,9 +1113,14 @@ char *rc_name; return ret; #else -# ifdef SRIOCSREDIR +# if defined(SRIOCSREDIR) || defined(linux) struct display *d; +# ifdef SRIOCSREDIR int cfd; +# else + struct mode new1, new2; + char *slave; +# endif if (on > 0) { @@ -1140,6 +1147,7 @@ char *rc_name; } if (on <= 0) return 0; +# ifdef SRIOCSREDIR if ((cfd = secopen("/dev/console", O_RDWR|O_NOCTTY, 0)) == -1) { Msg(errno, "/dev/console"); @@ -1161,12 +1169,37 @@ char *rc_name; consredirfd[0] = consredirfd[1] = -1; return -1; } - + close(cfd); +# else + /* special linux workaround for a too restrictive kernel */ + if ((consredirfd[0] = OpenPTY(&slave)) < 0) + { + Msg(errno, "%s: could not open detach pty master", rc_name); + return -1; + } + if ((consredirfd[1] = open(slave, O_RDWR | O_NOCTTY)) < 0) + { + Msg(errno, "%s: could not open detach pty slave", rc_name); + close(consredirfd[0]); + return -1; + } + InitTTY(&new1, 0); + SetMode(&new1, &new2, 0, 0); + SetTTY(consredirfd[1], &new2); + if (UserContext() == 1) + UserReturn(ioctl(consredirfd[1], TIOCCONS, (char *)&on)); + if (UserStatus()) + { + Msg(errno, "%s: ioctl TIOCCONS failed", rc_name); + close(consredirfd[0]); + close(consredirfd[1]); + return -1; + } +# endif consredir_ev.fd = consredirfd[0]; consredir_ev.type = EV_READ; consredir_ev.handler = consredir_readev_fn; evenq(&consredir_ev); - close(cfd); return 0; # else if (on > 0) diff --git a/src/utf8encodings/19 b/src/utf8encodings/19 Binary files differnew file mode 100644 index 0000000..65167a6 --- /dev/null +++ b/src/utf8encodings/19 @@ -405,14 +405,14 @@ int SetUtmp(wi) struct win *wi; { - register char *p; register slot_t slot; struct utmp u; int saved_ut; #ifdef UTHOST + char *p; char host[sizeof(D_loginhost) + 15]; #else - int host = 0; + char *host = 0; #endif /* UTHOST */ wi->w_slot = (slot_t)0; @@ -832,7 +832,7 @@ getttyent() char * getlogin() { - char *tty; + char *tty = NULL; #ifdef utmp # undef utmp #endif diff --git a/src/window.c b/src/window.c index cbcdd1f..72a4aa9 100644 --- a/src/window.c +++ b/src/window.c @@ -50,21 +50,18 @@ extern int SilenceWait; extern int real_uid, real_gid, eff_uid, eff_gid; extern char Termcap[]; extern char **NewEnv; -extern int visual_bell; +extern int visual_bell, maxwin; extern struct event logflushev; extern int log_flush, logtstamp_after; extern int ZombieKey_destroy, ZombieKey_resurrect; extern struct layer *flayer; extern int maxusercount; +extern int pty_preopen; #if defined(TIOCSWINSZ) || defined(TIOCGWINSZ) extern struct winsize glwz; #endif -#ifdef _IBMR2 -extern int aixhack; -#endif - #ifdef O_NOCTTY extern int separate_sids; #endif @@ -531,7 +528,7 @@ struct NewWindow *newwin; register int n, i; int f = -1; struct NewWindow nwin; - int type; + int type, startat; char *TtyName; #ifdef MULTIUSER extern struct acluser *users; @@ -547,16 +544,17 @@ struct NewWindow *newwin; debug1("NWin: wlock %d\n", nwin.wlock); debug1("NWin: Lflag %d\n", nwin.Lflag); - pp = wtab + nwin.StartAt; + startat = nwin.StartAt < maxwin ? nwin.StartAt : 0; + pp = wtab + startat; do { if (*pp == 0) break; - if (++pp == wtab + MAXWIN) + if (++pp == wtab + maxwin) pp = wtab; } - while (pp != wtab + nwin.StartAt); + while (pp != wtab + startat); if (*pp) { Msg(0, "No more windows."); @@ -972,6 +970,8 @@ struct win *wp; RethinkViewportOffsets(cv); } wp->w_layer.l_cvlist = 0; + if (flayer == &wp->w_layer) + flayer = 0; #ifdef MULTIUSER FreeWindowAcl(wp); @@ -1069,6 +1069,7 @@ char **namep; if (*typep != W_TYPE_PTY) return f; +#ifndef PTYROFS #ifdef PTYGROUP if (chown(*namep, real_uid, PTYGROUP) && !eff_uid) #else @@ -1089,6 +1090,7 @@ char **namep; close(f); return -1; } +#endif return f; } @@ -1119,24 +1121,19 @@ char **args, *ttyn; int i, pat, wfdused; struct pseudowin *pwin = win->w_pwin; #endif -#if (defined(sun) || defined(_IBMR2)) && defined(O_NOCTTY) - int slave; -#endif + int slave = -1; -#if defined(sun) && defined(O_NOCTTY) - /* sun's utmp_update program opens the salve side, thus corrupting - * pty semantics */ - debug("pre-opening slave...\n"); - if ((slave = open(ttyn, O_RDWR|O_NOCTTY)) == -1) +#ifdef O_NOCTTY + if (pty_preopen) { - Msg(errno, "ttyn"); - return -1; + debug("pre-opening slave...\n"); + if ((slave = open(ttyn, O_RDWR|O_NOCTTY)) == -1) + { + Msg(errno, "ttyn"); + return -1; + } } #endif -#if defined(_IBMR2) && defined(O_NOCTTY) - slave = aixhack; - aixhack = -1; -#endif debug("forking...\n"); proc = *args; if (proc == 0) @@ -1189,15 +1186,16 @@ char **args, *ttyn; if (dfp && dfp != stderr) fclose(dfp); #endif -#if (defined(sun) || defined(_IBMR2)) && defined(O_NOCTTY) - close(0); - dup(slave); - close(slave); - closeallfiles(win->w_ptyfd); - slave = dup(0); -#else - closeallfiles(win->w_ptyfd); -#endif + if (slave != -1) + { + close(0); + dup(slave); + close(slave); + closeallfiles(win->w_ptyfd); + slave = dup(0); + } + else + closeallfiles(win->w_ptyfd); #ifdef DEBUG if (dfp) /* do not produce child debug, when debug is "off" */ { @@ -1274,9 +1272,8 @@ char **args, *ttyn; dup(0); #endif /* PSEUDOS */ close(win->w_ptyfd); -#if (defined(sun) || defined(_IBMR2)) && defined(O_NOCTTY) - close(slave); -#endif + if (slave != -1) + close(slave); if (newfd >= 0) { struct mode fakemode, *modep; @@ -1375,9 +1372,8 @@ char **args, *ttyn; default: break; } -#if (defined(sun) || defined(_IBMR2)) && defined(O_NOCTTY) - close(slave); -#endif + if (slave != -1) + close(slave); return pid; } diff --git a/src/window.h b/src/window.h index 3397309..38a6908 100644 --- a/src/window.h +++ b/src/window.h @@ -168,6 +168,9 @@ struct win #ifdef FONT char w_FontL; /* character font GL */ char w_FontR; /* character font GR */ +# ifdef ENCODINGS + char w_FontE; /* character font GR locked */ +# endif int w_Charset; /* charset number GL */ int w_CharsetR; /* charset number GR */ int w_charsets[4]; /* Font = charsets[Charset] */ @@ -256,6 +259,15 @@ struct win int w_telsubidx; struct event w_telconnev; #endif + struct mline *w_alt_mlines; + int w_alt_width; + int w_alt_height; + int w_alt_histheight; + int w_alt_x, w_alt_y; +#ifdef COPY_PASTE + struct mline *w_alt_hlines; + int w_alt_histidx; +#endif }; |