From b2d5d167edc56df47468e5836b8129dfd3d0369a Mon Sep 17 00:00:00 2001 From: Mark Peek Date: Sun, 11 Jul 2004 02:17:56 +0000 Subject: [PATCH] Import of tcsh-6.13.00 --- contrib/tcsh/FAQ | 114 +- contrib/tcsh/Fixes | 43 + contrib/tcsh/Imakefile | 22 +- contrib/tcsh/Makefile.in | 46 +- contrib/tcsh/README | 4 +- contrib/tcsh/WishList | 303 +- contrib/tcsh/complete.tcsh | 240 +- contrib/tcsh/config/bsd4.4 | 7 + contrib/tcsh/config_f.h | 6 +- contrib/tcsh/configure | 4667 +++++++++++++++++++++++------- contrib/tcsh/configure.in | 2 + contrib/tcsh/csh-mode.el | 4 +- contrib/tcsh/ed.refresh.c | 19 +- contrib/tcsh/ed.screen.c | 31 +- contrib/tcsh/ed.term.c | 6 +- contrib/tcsh/gethost.c | 6 +- contrib/tcsh/glob.c | 17 +- contrib/tcsh/glob.h | 2 +- contrib/tcsh/host.defs | 14 +- contrib/tcsh/ma.setp.c | 6 +- contrib/tcsh/nls/C/set17 | 3 +- contrib/tcsh/nls/Makefile | 5 +- contrib/tcsh/nls/et/set17 | 3 +- contrib/tcsh/nls/finnish/set14 | 4 +- contrib/tcsh/nls/finnish/set17 | 3 +- contrib/tcsh/nls/french/set11 | 4 +- contrib/tcsh/nls/french/set17 | 3 +- contrib/tcsh/nls/german/set17 | 3 +- contrib/tcsh/nls/greek/set17 | 3 +- contrib/tcsh/nls/italian/set17 | 3 +- contrib/tcsh/nls/ja/set17 | 3 +- contrib/tcsh/nls/pl/set17 | 1 + contrib/tcsh/nls/russian/set17 | 3 +- contrib/tcsh/nls/russian/set30 | 3 +- contrib/tcsh/nls/spanish/set17 | 3 +- contrib/tcsh/nls/ukrainian/set17 | 3 +- contrib/tcsh/patchlevel.h | 6 +- contrib/tcsh/sh.c | 47 +- contrib/tcsh/sh.decls.h | 3 +- contrib/tcsh/sh.dir.c | 19 +- contrib/tcsh/sh.dol.c | 12 +- contrib/tcsh/sh.exec.c | 22 +- contrib/tcsh/sh.file.c | 58 +- contrib/tcsh/sh.func.c | 70 +- contrib/tcsh/sh.glob.c | 26 +- contrib/tcsh/sh.h | 27 +- contrib/tcsh/sh.init.c | 9 +- contrib/tcsh/sh.lex.c | 21 +- contrib/tcsh/sh.misc.c | 18 +- contrib/tcsh/sh.proc.c | 20 +- contrib/tcsh/sh.sem.c | 20 +- contrib/tcsh/sh.set.c | 28 +- contrib/tcsh/sh.types.h | 4 +- contrib/tcsh/tc.const.c | 37 +- contrib/tcsh/tc.decls.h | 7 +- contrib/tcsh/tc.func.c | 10 +- contrib/tcsh/tc.os.c | 214 +- contrib/tcsh/tc.os.h | 6 +- contrib/tcsh/tc.printf.c | 9 +- contrib/tcsh/tc.prompt.c | 7 +- contrib/tcsh/tc.str.c | 31 +- contrib/tcsh/tc.who.c | 8 +- contrib/tcsh/tcsh.man | 98 +- contrib/tcsh/tw.color.c | 6 +- contrib/tcsh/tw.comp.c | 14 +- contrib/tcsh/tw.help.c | 6 +- contrib/tcsh/tw.parse.c | 62 +- 67 files changed, 5010 insertions(+), 1524 deletions(-) diff --git a/contrib/tcsh/FAQ b/contrib/tcsh/FAQ index 59175c9885ab..92aadc726683 100644 --- a/contrib/tcsh/FAQ +++ b/contrib/tcsh/FAQ @@ -11,7 +11,12 @@ be able to get ftp it... :-) _________________________________________________________________ - 1. Why is the meta key broken in tcsh-5.20 and up? + 1. Where can I find tcsh sources? + + See http://www.tcsh.org/MostRecentRelease for download locations. + _________________________________________________________________ + + 2. Why is the meta key broken in tcsh-5.20 and up? On some machines the tty is not set up to pass 8 bit characters by default. Tcsh 5.19 used to try to determine if pass8 should be set by @@ -40,7 +45,7 @@ printable meta characters for commands) setenv NOREBIND. _________________________________________________________________ - 2. I ran 'dbxtool &' and 'shelltool &' from tcsh, and they end up in + 3. I ran 'dbxtool &' and 'shelltool &' from tcsh, and they end up in cbreak and no echo mode? These programs are broken. Background jobs should not try to look at @@ -56,19 +61,19 @@ in your .dbxinit _________________________________________________________________ - 3. I tried to compile tcsh and it cannot find ? + 4. I tried to compile tcsh and it cannot find ? Your system does not support NLS. Undefine NLS in config_f.h and it should work fine. _________________________________________________________________ - 4. Where can I get csh sources? + 5. Where can I get csh sources? Csh sources are now available with the 4.4BSD networking distributions. You don't need csh sources to compile tcsh-6.0x. _________________________________________________________________ - 5. I just made tcsh my login shell, and I cannot ftp any more? + 6. I just made tcsh my login shell, and I cannot ftp any more? Newer versions of the ftp daemon check for the validity of the user's shell before they allow logins. The list of valid login shells is @@ -81,7 +86,7 @@ shells for your system, so that other people can ftp too :-) _________________________________________________________________ - 6. I am using SunView? or OpenWindows? and editing is screwed up. In + 7. I am using SunView or OpenWindows and editing is screwed up. In particular my arrow keys and backspace don't work right. What am I doing wrong? @@ -93,32 +98,36 @@ 1. Don't use suntools 2. Use shelltool instead of cmdtool. 3. Unset edit in tcsh. - - 6b. On a SPARCstation running Solaris 2.x and OpenWindows? 3.1, inside - a cmdtool, the short-cut key sequence to clear log (i.e. Meta-e or - Diamond-e) doesn't work: it just echos 'e' - - 6c. On a SPARCstation running Solaris 2.x and OpenWindows? 3.1, - maketool (within SPARCworks) doesn't work: it just does a `cd' to the - working directory then stops. - - The workaround for 6b and 6c is doing "unset edit." Using shelltool - instead of cmdtool doesn't fix 6c. _________________________________________________________________ - 7. I rlogin to another machine, and then no matter what I tell 'stty' + 8. On a SPARCstation running Solaris 2.x and OpenWindows 3.1, inside a + cmdtool, the short-cut key sequence to clear log (i.e. Meta-e or + Diamond-e) doesn't work: it just echos 'e'; or + + Unset edit in tcsh. + _________________________________________________________________ + + 9. On a SPARCstation running Solaris 2.x and OpenWindows 3.1, maketool + (within SPARCworks) doesn't work: it just does a `cd' to the working + directory then stops. + + Unset edit in tcsh. Using shelltool instead of cmdtool does not fix + this. + _________________________________________________________________ + + 10. I rlogin to another machine, and then no matter what I tell 'stty' I cannot get it to pass 8 bit characters? Maybe you need to use 'rlogin -8' to tell rlogin to pass 8 bit characters. _________________________________________________________________ - 8. Where do I get the public domain directory library? + 11. Where do I get the public domain directory library? Anonymous ftp to prep.ai.mit.edu:/pub/gnu/dirent.tar.Z _________________________________________________________________ - 9. I compiled tcsh using gcc, and when I start up it says: tcsh: + 12. I compiled tcsh using gcc, and when I start up it says: tcsh: Warning no access to tty (Invalid Argument). Thus no job control in this shell @@ -130,13 +139,13 @@ 3. Compile with cc. _________________________________________________________________ - 10. I compiled tcsh with the SunOS? unbundled compiler and now things + 13. I compiled tcsh with the SunOS unbundled compiler and now things get echo'ed twice. It is a bug in the unbundled optimizer. Lower the optimization level. _________________________________________________________________ - 11. How can I use the arrow keys with hpterm? + 14. How can I use the arrow keys with hpterm? Hp terminals use the arrow keys internally. You can tell hpterm not to do that, by sending it the termcap sequence smkx. Since this has to be @@ -151,7 +160,7 @@ if you are using termcap, replace "smkx" with "ks"... _________________________________________________________________ - 12. On POSIX machines ^C and ^Z will do not work when tcsh is a login + 15. On POSIX machines ^C and ^Z will do not work when tcsh is a login shell? Make sure that the interrupt character is set to ^C and suspend is set @@ -159,7 +168,7 @@ ^C susp ^Z' will set them to ^C and ^Z respectively. _________________________________________________________________ - 13. I am trying to compile tcsh and I am getting compile errors that + 16. I am trying to compile tcsh and I am getting compile errors that look like: >sh.c:???: `STR???' undeclared, outside of functions [gcc] @@ -169,7 +178,7 @@ headers. Type 'make clean; make' _________________________________________________________________ - 14. On the cray, sometimes the CR/LF mapping gets screwed up. + 17. On the cray, sometimes the CR/LF mapping gets screwed up. You are probably logged in to the cray via telnet. Cray's telnetd implements line mode selection the telnet client you are using does @@ -181,21 +190,21 @@ character'. _________________________________________________________________ - 15. On AU/X, I made tcsh my startup shell, but the mac desktop is not + 18. On AU/X, I made tcsh my startup shell, but the mac desktop is not starting up (no X11 or Finder), and I only get console emulation. This is another manifestation of item 5. Just add the pathname to tcsh in /etc/shells and everything should work fine. _________________________________________________________________ - 16. On machines that use YP (NIS) tilde expansion might end up in + 19. On machines that use YP (NIS) tilde expansion might end up in /dev/null If this happens complain to your vendor, to get a new version of NIS. You can fix that in tcsh by defining YPBUGS in config.h _________________________________________________________________ - 17. Script on SGI 4.0.5 does not give us a tty, so we cannot have job + 20. Script on SGI 4.0.5 does not give us a tty, so we cannot have job control. Their csh does not have job control either. Try: @@ -204,18 +213,21 @@ % cat > /dev/tty _________________________________________________________________ - 18. I start tcsh and it takes a couple of minutes to get the prompt. + 21. I start tcsh and it takes a couple of minutes to get the prompt. You have defined REMOTEHOST and your DNS is not responding. Either undefine REMOTEHOST and recompile or fix your DNS. _________________________________________________________________ - 19. If you need help generating your .cshrc file, check out: + 22. If you need help generating your .cshrc file, check out: - http://www.imada.ou.dk/~blackie/dotfile/ + http://www.imada.sdu.dk/~blackie/dotfile/ + + or + http://www.dotfiles.com _________________________________________________________________ - 20. On POSIX systems the kernel will send hup signals to all the + 23. On POSIX systems the kernel will send hup signals to all the processes in the foreground process group if 'stty hupcl' is set. For example @@ -230,27 +242,57 @@ avoid that you can set stty -hupcl, but it is not recommended. _________________________________________________________________ - 21. When I rsh the meta key stops working on the remote machine. + 24. When I rsh the meta key stops working on the remote machine. Try using rsh -8; this option is undocumented on some systems, but it works. If that does not work, get and use ssh/sshd. You'll be better off from a security point of view anyway. _________________________________________________________________ - 22. Tcsh compiled under hp/ux-10.x does not pass resource limits + 25. Tcsh compiled under hp/ux-10.x does not pass resource limits correctly when ran on hp/ux-11.x systems. This is a problem with lack of ABI compatibility between the two systems. The only solution is to recompile. _________________________________________________________________ - 23. Refreshing in command line editing can appear broken on some OS's + 26. Refreshing in command line editing can appear broken on some OS's This is because the termcap/terminfo description lies about the ability of the terminal to use tabs. At least on Compaq/DEC Alpha OSF/1 3.x and 4.x systems, stty -tabs will cause problems. _________________________________________________________________ + 27. Where can I learn the merits of tcsh vs. bash vs. csh vs. sh etc? + + You can read the manual page section titled [NEW FEATURES] listing + features that tcsh adds to csh. + + You can read Tom Christiansen's [Csh Programming Considered Harmful], + a document advocating that csh (and by extension, tcsh) should not be + used for writing shell scripts. + + XXX: Need to find something about [bash], but bash is sh-compatible + and has many of the same interactive features of tcsh (command + completion does not appear to be as flexible, though). + + [Curtains up: introducing the Z shell] has a pretty good rundown on + zsh. Aside from the arguments about csh being evil, tcsh appears to + compare well with zsh [zsh]. Zsh is sh and ksh compatible, with many + of the interactive features of tcsh. + _________________________________________________________________ + + 28. Why does FreeBSD's tcsh do history browsing differently than I + expect? + + On FreeBSD, by default, the up arrow is set to + "history-search-backward", rather than the default "up-history". As a + result, if you type (part of) a word and press up arrow, you'll see + previous commands that match the prefix. Pretty useful, actually, + although it takes some getting used to. You can use bindkey to see + your settings, and to rebind up & down differently if desired. + _________________________________________________________________ + Everything else is a bug :-( Christos @@ -258,5 +300,5 @@ Home | RecentChanges | Preferences Edit text of this page | View other revisions - Last edited April 27, 2001 13:43 (diff) + Last edited April 29, 2004 15:02 (diff) Search: ____________________ diff --git a/contrib/tcsh/Fixes b/contrib/tcsh/Fixes index 21cdebf3d016..7b8bf3edb994 100644 --- a/contrib/tcsh/Fixes +++ b/contrib/tcsh/Fixes @@ -1,3 +1,46 @@ + 36. V6.13.00 - 20040519 + 35. V6.12.03 - 20040322 + 34. turn on kanji and dspmbyte by default; add check for utf8 locales, + and turn parsing of that automatically based on $LANG. + 33. Fix compilation issue under Windows/NT and charset incorrect patch + (Yoshiyuki Sakakibara) + 32. completion additions (Tom Warzeka) + 31. compilation fix (Martin Kraemer) + 30. V6.12.02 - 20040221 + 29. Glob completion listing addition (Tom Warzeka) + 28. BS2000 bs2cmd builtin. (Martin Kraemer) + 27. Fix interrupt resetting code when /etc startup scripts have syntax errors + (Mark A. Grondona) + 26. Clarification of kill-ring commands (Per Hedeland) + 25. Debian completion additions (Martin Godisch) + 24. Japanese character set fixes (Juehiro-san) from debian + 23. NLS charset fixes; disabled since they only work with gnu gencat + (Martin Godisch) + 22. Fix HPUX >= 11 resource (Jack Cummings) + 21. Handle breaksw that jumps out of loops. + 20. Revert #16. It causes worse problems. + 19. Avoid using execl() because the last NULL does not always promoted to + a pointer because the function is variadic (Harti Brandt) + 18. revert ignoreeof to the 6.11.00 behavior and document it (Martin Godisch) + 17. do a case insensitive comparison for the multibyte vars (Martin Godisch) + 16. don't sigsuspend() for an already exited job + 15. glob all arguments in source (Martin Godisch) + 14. various debian fixes (Martin Godisch) + 13. setenv syntax check revert (Satoshi I. Nozawa) + 12. EAGAIN typo (dan harkless) + 11. filec compilation issue on hpux (beebe) + 10. win32 compilation fixes for O_LARGEFILE (amol) + 9. Don't go into an infinite loop when tcgetpgrp() returns an error. + 8. Cygwin fixes (Corinna Vinschen) + 7. NLS catclose() bug avoidance (KAJIMOTO Masato) + 6. V6.12.01 - 20030208 + 5. Misc NT cleanup. No more GPL code (amol) + 4. use strtol() to detect errors in builtin kill (Peter Jeremy) + 3. Recognize linux systems on mips* (Maciej W. Rozycki) + 2. Enable complete=igncase on unix (Stephen Krauth) + 1. Eliminate maxitems (Todd Miller) + + 58. V6.12.00 - 20020732 57. misc cleanups. 56. V6.11.05 - 20020712 55. We should have socklen_t in the INET6 case, but we leave int otherwise. diff --git a/contrib/tcsh/Imakefile b/contrib/tcsh/Imakefile index d8daca5db67e..803ed04b3867 100644 --- a/contrib/tcsh/Imakefile +++ b/contrib/tcsh/Imakefile @@ -1,5 +1,5 @@ XCOMM -XCOMM $Id: Imakefile,v 1.81 2002/07/23 16:18:31 christos Exp $ +XCOMM $Id: Imakefile,v 1.83 2003/02/08 20:03:25 christos Exp $ XCOMM XCOMM Imakefile for tcsh 6.12 XCOMM Marc Horowitz, MIT SIPB @@ -482,16 +482,18 @@ LDLIBS = MyLibs SUF = o VERSION = 6.12 -SHSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ - sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ - sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ - sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h \ - sh.decls.h glob.c glob.h ${SYSSRCS} +SHSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c \ + sh.char.c sh.exp.c sh.file.c sh.func.c \ + sh.glob.c sh.hist.c sh.init.c sh.lex.c \ + sh.misc.c sh.parse.c sh.print.c sh.proc.c \ + sh.sem.c sh.set.c sh.time.c glob.c \ + sh.char.h sh.dir.h sh.proc.h sh.h \ + sh.decls.h glob.h ${SYSSRCS} SHOBJS= sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \ - sh.char.${SUF} sh.exp.${SUF} sh.func.${SUF} sh.glob.${SUF} \ - sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} sh.misc.${SUF} \ - sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} sh.sem.${SUF} \ - sh.set.${SUF} sh.time.${SUF} glob.${SUF} ${SYSOBJS} + sh.char.${SUF} sh.exp.${SUF} sh.file.${SUF} sh.func.${SUF} \ + sh.glob.${SUF} sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} \ + sh.misc.${SUF} sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} \ + sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} ${SYSOBJS} TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ tw.comp.c tw.color.c diff --git a/contrib/tcsh/Makefile.in b/contrib/tcsh/Makefile.in index 56abb0b2f3dc..7be22bc6ffc9 100644 --- a/contrib/tcsh/Makefile.in +++ b/contrib/tcsh/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 3.19 2002/07/23 16:13:21 christos Exp $ +# $Id: Makefile.in,v 3.20 2003/03/12 19:14:50 christos Exp $ # Makefile.in 4.3 6/11/83 # # C Shell with process control; VM/UNIX VAX Makefile @@ -9,7 +9,7 @@ # SHELL=/bin/sh VERSION=6.12 -BUILD=tcsh +BUILD=tcsh$(EXEEXT) VPATH=@srcdir@ srcdir=@srcdir@ @@ -136,7 +136,7 @@ CFLAGS = @CFLAGS@ # This is set by autoconf. #DFLAGS= #DFLAGS=-D_PATH_TCSHELL='"${DESTBIN}/tcsh"' ## The following is set by autoconf. -DFLAGS = -D_PATH_TCSHELL='"${DESTBIN}/tcsh"' @DFLAGS@ @CPPFLAGS@ +DFLAGS = -D_PATH_TCSHELL='"${bindir}/tcsh"' @DFLAGS@ @CPPFLAGS@ ################################################################ @@ -284,6 +284,7 @@ DESTMAN=${DESTDIR}${mandir}/man${MANSECT} # DESTMAN=${DESTDIR}/catman/man${MANSECT} # A/UX # DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} # Stardent Vistra (SysVR4) # DESTMAN=/usr/catman/1l # Amiga unix (SysVR4) +EXEEXT=@EXEEXT@ FTPAREA=/usr/spool/ftp ASSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ @@ -340,9 +341,9 @@ OBJS= ${SHOBJS} ${TWOBJS} ${EDOBJS} ${TCOBJS} all: ${BUILD} -tcsh:$(P) ${OBJS} - rm -f tcsh core - ${CC} -o tcsh ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} ${OBJS} ${LIBES} ${EXTRALIBS} +tcsh$(EXEEXT):$(P) ${OBJS} + rm -f tcsh$(EXEEXT) core + ${CC} -o tcsh$(EXEEXT) ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} ${OBJS} ${LIBES} ${EXTRALIBS} tcsh.sbin:$(P) ${OBJS} rm -f tcsh.sbin core @@ -350,11 +351,11 @@ tcsh.sbin:$(P) ${OBJS} # Purify pure:$(P) ${OBJS} - rm -f tcsh core - purify `echo ${CC} | sed -e s,-B/bin/,,` -o tcsh ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} ${OBJS} ${LIBES} ${EXTRALIBS} + rm -f tcsh$(EXEEXT) core + purify `echo ${CC} | sed -e s,-B/bin/,,` -o tcsh$(EXEEXT) ${LDFLAGS} ${CFLAGS} ${CPPFLAGS} ${OBJS} ${LIBES} ${EXTRALIBS} # OS/2 -tcsh.exe: tcsh - emxbind tcsh +#tcsh.exe: tcsh +# emxbind tcsh gethost: gethost.c sh.err.h tc.const.h sh.h rm -f gethost @@ -474,12 +475,12 @@ vgrind: install-strip: install -install: tcsh +install: tcsh$(EXEEXT) -mkdir -p ${DESTBIN} - -mv -f ${DESTBIN}/tcsh ${DESTBIN}/tcsh.old - cp tcsh ${DESTBIN}/tcsh - -strip ${DESTBIN}/tcsh - chmod 555 ${DESTBIN}/tcsh + -mv -f ${DESTBIN}/tcsh$(EXEEXT) ${DESTBIN}/tcsh.old + cp tcsh$(EXEEXT) ${DESTBIN}/tcsh$(EXEEXT) + -strip ${DESTBIN}/tcsh$(EXEEXT) + chmod 755 ${DESTBIN}/tcsh$(EXEEXT) install.man: tcsh.man -mkdir -p ${DESTMAN} @@ -487,6 +488,19 @@ install.man: tcsh.man cp $(srcdir)/tcsh.man ${DESTMAN}/tcsh.${MANSECT} chmod 444 ${DESTMAN}/tcsh.${MANSECT} +install.cygwin: install install.man + -mkdir -p ${DESTDIR}${prefix}/doc/tcsh + cp ${srcdir}/FAQ ${srcdir}/Fixes ${DESTDIR}${prefix}/doc/tcsh + cp ${srcdir}/NewThings ${srcdir}/README ${DESTDIR}${prefix}/doc/tcsh + cp ${srcdir}/WishList ${srcdir}/Y2K ${DESTDIR}${prefix}/doc/tcsh + perl ${srcdir}/tcsh.man2html ${srcdir}/tcsh.man + cp -rp tcsh.html ${DESTDIR}${prefix}/doc/tcsh + -mkdir -p ${DESTDIR}/etc/profile.d + -mkdir -p ${DESTDIR}/etc/postinstall + cp -p ${srcdir}/cygwin/etc/csh.* ${DESTDIR}/etc + cp -p ${srcdir}/cygwin/etc/profile.d/*.tcsh ${DESTDIR}/etc/profile.d + cp -p ${srcdir}/cygwin/etc/postinstall/tcsh.sh ${DESTDIR}/etc/postinstall + # Amiga Unix #install.man: tcsh.man # compress tcsh.man @@ -500,7 +514,7 @@ install.man: tcsh.man # chmod 444 ${DESTMAN}/tcsh.${MANSECT}.Z clean: - ${RM} -f a.out strings x.c xs.c tcsh tcsh.a _MAKE_LOG core gethost + ${RM} -f a.out strings x.c xs.c tcsh$(EXEEXT) tcsh.a _MAKE_LOG core gethost ${RM} -f *.${SUF} sh.prof.c ed.defns.h tc.const.h sh.err.h tc.defs.c ${RM} -f tcsh.*.m tcsh.*.cat diff --git a/contrib/tcsh/README b/contrib/tcsh/README index 57198b96077e..2987991ee907 100644 --- a/contrib/tcsh/README +++ b/contrib/tcsh/README @@ -96,8 +96,8 @@ To install tcsh: 12) PLEASE send any bug reports (and fixes), code for new features, comments, questions, etc. (even flames) to: - The tcsh mailing list - tcsh@mx.gw.com + The tcsh bugs mailing list + tcsh-bugs@mx.gw.com Various: diff --git a/contrib/tcsh/WishList b/contrib/tcsh/WishList index 8afeceba1f79..6eb5acfbda32 100644 --- a/contrib/tcsh/WishList +++ b/contrib/tcsh/WishList @@ -4,15 +4,128 @@ Home | RecentChanges | Preferences _________________________________________________________________ + Surprised by this behavior...is this a bug? + + (Goal: e.g. distinguish between completely numeric args/names and + those containing non-numerics) + + % touch 1023 pex103 pex103a 104a z101 16a02 1999 2001 2001_A_Space_Odyssey + % ls -1 *[^0-9]* + 104a + 16a02 + 2001_A_Space_Odyssey + pex103 + pex103a + z101 + # (great, looks good to me. Got everything containing a nonnumeric, no more, n +o less.) + + % foreach p ( 1023 pex103 pex103a 104a z101 16a02 1999 2001 2001_A_Space_Odyss +ey ) + foreach? if ( $p !~ *[^0-9]* ) echo $p + foreach? end + # (no output. Huh?) + + % foreach p ( 1023 pex103 pex103a 104a z101 16a02 1999 2001 2001_A_Space_Odyss +ey ) + foreach? if ( $p =~ *[^0-9]* ) echo $p + foreach? end + 1023 (!) + pex103 + pex103a + 104a + z101 + 16a02 + 1999 (!) + 2001 (!) + 2001_A_Space_Odyssey + # (Huh?) + + The [MAN page description] for =~ and !~ just refer to "(see [Filename + substitution])', but evidently there is a (unexplained) difference. + The actual filename globbing looks correct to me, but the pattern + matching operator behavior is unexpected, if I'm not missing + something. + + tcsh 6.09.00 + + - bhooglan + _________________________________________________________________ + + I'm a long-time faithful user of tcsh, and one thing has always bugged + me -- the need to type "rehash" at a prompt when adding a new command. + My suggestions is to change tcsh so before printing "Command not + found.", it first searches its entire path and rebuilds its hash + table. Only after doing this, and if the command is still not in the + path, then print "Command not found.". I realize there are some + extreme cases in which this is suboptimal, but in most cases with + normal users this would be a big win, and simplify the manual and + perhaps even the code. + _________________________________________________________________ + + Wish "tcsh -l" would accept other flags. At least "-c". + + Currently I can't get ssh to have the right environment unless it is a + login shell. The .ssh/environment doesn't work for me because I login + to different machines with different environments. One thing to do + would be to not have the different environment for login compared to + other shells, but what I would really like is something like... + + ssh remote_application_server "tcsh -l -c application" + + The "ssh -t" doesn't work for me and I don't know why. + + Thanks Tim + + Fix limit vmemoryuse in Linux + + In Linux tcsh is unable to limit vmemoryuse. This is because + RLIMIT_VMEM isn't defined, instead Linux has RLIMIT_AS which means the + same. On Google groups I found patches suggested by Komazaki at + http://groups.google.com/groups?hl=sv&lr=&ie=UTF-8&oe=ISO-2022-JP&selm + =m3snmczvfc.wl%40thinkpad.osk.3web.ne.jp.osk.3web.ne.jp and Ogawa + Hirofumi suggests a patch at + http://groups.google.com/groups?hl=sv&lr=&ie=UTF-8&selm=87snmba4id.fsf + %40devron.myhome.or.jp None of these patches seems to have been + included in version 6.12 as 6.12 still has this problem. + + /Henrik?? + + New idea: use last line (or n'th line) of output as input to new + command. + + I often find myself typing something like: + + >locate lshort + /usr/local/stow/share/texmf/doc/latex/general/lshort.dvi . . . + /usr/local/store/share/texmf/doc/latex/general/lshort.dvi + + >xdvi /usr/local/store/share/texmf/doc/latex/general/lshort.dvi + + Now the way I accomplish writing the last line, is by moving the mouse + over the last line, and the copy paste it. It would be very nice, if + the shell could keep the last n lines of output in a buffer. This way + one could avoid using the mouse by typing something like: + + >xdvi + + which would insert the last line of output, similarly could + insert the second last line of output. (the exact commands used is of + course configured via bindkey). + + This could save me a couple of times to the mouse everyday - + di010070@diku.dk + + The shell does not capture any output from commands it runs, so + this is really more a feature for the terminal (be it hardware + or software). --Kim + Fix memory leak related to aliasrun(). Precmd, Cwdcmd etc. leak memory. - _________________________________________________________________ Fix migrate -site $$... Seems to hang... (aix370) - _________________________________________________________________ Fix history in loops. - _________________________________________________________________ New idea: sed operations on variables. @@ -21,45 +134,187 @@ variable editing to understand string operations. So I would like to be able to use: - > set a="this is a STRING" - > echo $a:[3-] - is is a STRING - > echo $a:[#] - 16 - > echo $a:[6-7] - is - > echo $a:[-2] - ng - > echo $a:[-20] - Subscript out of bounds. - > echo $a:[2-20] - Subscript out of bounds. - > echo $a:[1-1]:u$a:[2-]. - This is a string. - _________________________________________________________________ +> set a="this is a STRING" +> echo $a:[3-] +is is a STRING +> echo $a:[#] +16 +> echo $a:[6-7] +is +> echo $a:[-2] +ng +> echo $a:[-20] +Subscript out of bounds. +> echo $a:[2-20] +Subscript out of bounds. +> echo $a:[1-1]:u$a:[2-]. +This is a string. + + Fix pipelines that contain builtins so that they behave correctly. I tried to fix that (most of the code is in sh.sem.c, but it works only for non POSIX machines cause otherwise the setpgid() I added fails). - _________________________________________________________________ Fix the correct code... How to do that involves A.I.... - _________________________________________________________________ Rewrite the whole thing. It has taken to much beating over the years... - _________________________________________________________________ Add another hook like precmd to be executed after the prompt but before the command. - _________________________________________________________________ Add instructions for using configure in the README file. + + Make manual page references links in the HTML version of the manual. + + It is possible to match the words with ([0-9]) after them. Links could + be using the manual page CGI at http://www.tac.eu.org/cgi-bin/man-cgi + for content. + + Add OpenBSD?? to the Makefile, etc. + + A Csh compatability mode would be nice: I know tcsh is supposed to be + fully csh compatible, but csh scripts containing such constructs as + '$<' , 'if ( -d $file ) cd $file' or any of a great number of other + valid csh commands, will produce syntax errors or the like with tcsh, + which is frustrating when writing/maintaining csh scripts which have + to run on systems with only tcsh and systems with only csh. If such a + thing exists, I couldn't find it after searching the man page for two + hours, and it should be better documented + + Add hooks for command completion Either for a dynamically loaded + library, or a callback to another program that allows another pass to + complete the command. As a trivial example, the module could duplicate + the functionality of aliases. A tcsh_mud.so could define sigh, groan, + cheer, lol, etc to produce output if they weren't actually valid + commands. + + Properly deal with : in filename substitution + + Given something like + + blah.foo:*.foo + + expand it properly to something like + + blah.foo:baz.foo:bob.foo:bar.foo + + It already does this, if you have a file named like that... --Kim + + Directory commands don't handle blanks in filenames. If I have an + environment variable such as: + +% setenv TOMCAT '/c/Program? Files/Apache? Software Foundation/Tomcat? 5.0' +and then do the following, setenv complains that it has too many arguments. +% cd /tmp +% cd "$TOMCAT" +setenv: Too many arguments +% dirs +/c/Program? Files/Apache? Software Foundation/Tomcat? 5.0 /tmp +% pushd "$TOMCAT" +/c/Program? Files/Apache? Software Foundation/Tomcat? 5.0 +setenv: Too many arguments. +% pushd /tmp +/tmp /c/Program? Files/Apache? Software Foundation/Tomcat? 5.0 +% pushd +/c/Program? Files/Apache? Software Foundation/Tomcat? 5.0 /tmp +setenv: Too many arguments. + + Wish tcsh would feature fc (fix command) as in bash !Wish tcsh would + featuer fc (fix command) as in bash ! + + i wish for read-only CVS access to the sources (as i am on the + bleeding egde) + + Functions would be useful! As would being able to redirect stderr (or + other file descriptors) independently of stdout! -- Rohan Talip + + Don't complete commands with non-executable files. For example if I + have a file called README in a directory in the PATH, and I type R TAB + tcsh will complete README as a command. But README does not have the x + bit set, so it's kind of pointless to have that completion. + + --> Setting the shell variable "recognize_only_executables" will give + you this behavior. --Waz + + If I have in my .tcshrc: complete {cd,pushd} p/1/d/ and I type + "complete cd" at the shell prompt nothing is printed. It would be nice + if {cd,pushd} p/1/d/ was printed. + + --> I had programmed this feature a while ago but have not submitted + it because the implementation is not robust enough to keep TCSH from + crashing when special characters are part of the pattern. I'll get + back to it at some point! --Waz + + It would be nice if "set autolist" would be on by default. + + --- + + Unicode (UTF-8) doesn't seem to work. It's not even possible to "make + catalogs" in unicode environment. Also unicode support (and other + multibyte encodings) should depend on environment variables + (LC_CTYPE), not on "set dspmbyte". On unicode terminal translations + show empty characters instead of messages. + + In addition to message catalogs, there are more problems: +ipi:~/test/tcsh/bin> ls +tcsh едц +ipi:~/test/tcsh/bin> set dspmbyte utf8 +ipi:~/test/tcsh/bin> ls ??? +ls: No match. + + Unicode is used more and more, and is default on many environments, so + this really should be fixed. --mpaananen + _________________________________________________________________ + + When I have a script called from complete I would like to have the the + existing text from the command line passed to that script so that it + can look at all existing words to detemine what it should output as + the completion list. + + For example: + + complete prog 'n/-x/`myscript`' + + Then when I do this: + + > prog -a A -b B -x + + The script would get 'prog -a A -b B -x ' which would allow the script + to base its -x completions on the options given for -a and -b (or if + they aren't present give nothing - or a message saying that they are + required). Setting a temporary environment variable before executing + the command would also work and would probably be safer. + + Perhaps this info is already available as a special variable that can + be manually passed to the script: complete prog 'n/-x/`myscript + $cmd_line`'? + + Update: I looked into this further by actually downloading the code + and looking through it. It doesn't seem that this information is + available anywhere, but I did manage to achieve what I wanted by + adding the following two lines around the call to tw_complete (line + 278, tw.parse.c 6.12.00): + + added> tsetenv(STRCURRCMDLINE, (Char *)&qline); + looking = tw_complete(cmd_start, &wordp, &pat, looking, &suf); + + added> Unsetenv(STRCURRCMDLINE); + + And I added a definition for STRCURRCMDLINE to be "CURRCMDLINE". + + This provides the environment variable CURRCMDLINE to any + script/program running under complete. The only issue I see is picking + a sufficiently obscure environment variable that noone else is likely + to use, but have it readable enough to understand what it is for. It + also shouldn't overwrite an existing ENV variable if it is already in + use. _________________________________________________________________ Home | RecentChanges | Preferences Edit text of this page | View other revisions - Last edited April 28, 2001 2:04 (diff) + Last edited March 25, 2004 10:27 (diff) Search: ____________________ diff --git a/contrib/tcsh/complete.tcsh b/contrib/tcsh/complete.tcsh index 2e0df5d3df28..d79bcd03379c 100644 --- a/contrib/tcsh/complete.tcsh +++ b/contrib/tcsh/complete.tcsh @@ -1,7 +1,23 @@ # -# $Id: complete.tcsh,v 1.40 2002/07/07 15:37:20 christos Exp $ +# $Id: complete.tcsh,v 1.43 2004/02/22 15:57:15 christos Exp $ # example file using the new completion code # +# Debian GNU/Linux +# /usr/share/doc/tcsh/examples/complete.gz +# +# This file may be read from user's ~/.cshrc or ~/.tcsh file by +# decompressing it into the home directory as ~/.complete and +# then adding the line "source ~/.complete" and maybe defining +# some of the shell variables described below. +# +# Added two Debian-specific completions: dpkg and dpkg-deb (who +# wrote them?). Changed completions of several commands. The ones +# are evaluated if the `traditional_complete' shell variable is +# defined. +# +# Debian enhancements by Vadim Vygonets . +# Bugfixes and apt completions by Miklos Quartus . +# Cleanup by Martin A. Godisch . onintr - if (! $?prompt) goto end @@ -78,7 +94,11 @@ if ($?_complete) then complete unalias n/*/a/ complete xdvi n/*/f:*.dvi/ # Only files that match *.dvi complete dvips n/*/f:*.dvi/ +if ($?traditional_complete) then complete tex n/*/f:*.tex/ # Only files that match *.tex +else + complete tex n/*/f:*.{tex,texi}/ # Files that match *.tex and *.texi +endif complete latex n/*/f:*.{tex,ltx}/ complete su c/--/"(login fast preserve-environment command shell \ help version)"/ c/-/"(f l m p c s -)"/ \ @@ -158,7 +178,20 @@ if ($?_complete) then complete -co* p/0/"(compress)"/ # make compress completion # not ambiguous +if ($?traditional_complete) then complete zcat n/*/f:*.Z/ +else + # "zcat" may be linked to "compress" or "gzip" + if (-X zcat) then + zcat --version >& /dev/null + if ($status != 0) then + complete zcat n/*/f:*.Z/ + else + complete zcat c/--/"(force help license quiet version)"/ \ + c/-/"(f h L q V -)"/ n/*/f:*.{gz,Z,z,zip}/ + endif + endif +endif complete finger c/*@/\$hosts/ n/*/u/@ complete ping p/1/\$hosts/ @@ -189,7 +222,7 @@ if ($?_complete) then p/2/f:*.a/ p/*/f:*.o/ # these should be merged with the MH completion hacks below - jgotts - complete {sprev,snext} \ + complete {refile,sprev,snext,scan,pick,rmm,inc,folder,show} \ c@+@F:$HOME/Mail/@ # these and interrupt handling from Jaap Vermeulen @@ -213,6 +246,7 @@ if ($?_complete) then # these from E. Jay Berkenbilt # = isn't always followed by a filename or a path anymore - jgotts +if ($?traditional_complete) then complete ./configure 'c/--*=/f/' 'c/--{cache-file,prefix,exec-prefix,\ bindir,sbindir,libexecdir,datadir,\ sysconfdir,sharedstatedir,localstatedir,\ @@ -223,6 +257,19 @@ if ($?_complete) then sharedstatedir localstatedir libdir \ includedir oldincludedir infodir mandir \ srcdir)//' +else + complete ./configure \ + 'c@--{prefix,exec-prefix,bindir,sbindir,libexecdir,datadir,sysconfdir,sharedstatedir,localstatedir,infodir,mandir,srcdir,x-includes,x-libraries}=*@x:'@ \ + 'c/--cachefile=*/x:/' \ + 'c/--{enable,disable,with}-*/x://' \ + 'c/--*=/x://' \ + 'c/--/(prefix= exec-prefix= bindir= \ + sbindir= libexecdir= datadir= sysconfdir= \ + sharedstatedir= localstatedir= infodir= \ + mandir= srcdir= x-includes= x-libraries= cachefile= \ + enable- disable- with- \ + help no-create quiet silent version verbose )//' +endif complete gs 'c/-sDEVICE=/(x11 cdjmono cdj550 epson eps9high epsonc \ dfaxhigh dfaxlow laserjet ljet4 sparc pbm \ pbmraw pgm pgmraw ppm ppmraw bit)/' \ @@ -544,11 +591,23 @@ if ($?_complete) then n@*@'`cat ${HOME}/.muttrc-alias | awk '"'"'{print $2 }'"'"\`@ complete ndc 'n/*/(status dumpdb reload stats trace notrace \ querylog start stop restart )/' + if ($?traditional_complete) then complete nm 'c/--/(debug-syms defined-only demangle dynamic \ extern-only format= help line-numbers no-demangle \ no-sort numeric-sort portability print-armap \ print-file-name reverse-sort size-sort undefined-only \ version)/' 'p/*/f:^*.{h,C,c,cc}/' + else + complete nm 'c/--radix=/x:/' \ + 'c/--target=/x:/' \ + 'c/--format=/(bsd sysv posix)/n/' \ + 'c/--/(debugsyms extern-only demangle dynamic print-armap \ + print-file-name numeric-sort no-sort reverse-sort \ + size-sort undefined-only portability target= radix= \ + format= defined-only\ line-numbers no-demangle version \ + help)//' \ + 'n/*/f:^*.{h,c,cc,s,S}/' + endif complete nmap 'n@-e@`ifconfig -l`@' 'p/*/$hostnames/' complete perldoc 'n@*@`\ls -1 /usr/libdata/perl/5.*/pod | sed s%\\.pod.\*\$%%`@' complete postfix 'n/*/(start stop reload abort flush check)/' @@ -639,11 +698,7 @@ if ($?_complete) then endif complete unsetenv n/*/e/ - if (-r /var/spool/mail) then - set _maildir = /var/spool/mail - else - set _maildir = /usr/mail - endif + set _maildir = /var/mail if (-r $HOME/.mailrc) then complete mail c/-/"(e i f n s u v)"/ c/*@/\$hosts/ \ c@+@F:$HOME/Mail@ C@[./\$~]@f@ n/-s/x:''/ \ @@ -664,6 +719,7 @@ if ($?_complete) then endif endif + if ($?traditional_complete) then # use of $MANPATH from Dan Nicolaescu # use of 'find' adapted from Lubomir Host complete man \ @@ -686,6 +742,24 @@ if ($?_complete) then 'n@-[sS]@`\ls -1 $MANPATH:as%:% % |& sed -n s%^man%%p | sort -u`@'\ 'n@*@`find $MANPATH:as%:% % \( -type f -o -type l \) -printf "%f " |& sed -e "s%find: .*: No such file or directory%%" -e "s%\([^\.]\+\)\.\([^ ]*\) %\1 %g"`@' #n@*@c@ # old way -- commands only + else + complete man n@1@'`\ls -1 /usr/man/man1 | sed s%\\.1.\*\$%%`'@ \ + n@2@'`\ls -1 /usr/man/man2 | sed s%\\.2.\*\$%%`'@ \ + n@3@'`\ls -1 /usr/man/man3 | sed s%\\.3.\*\$%%`'@ \ + n@4@'`\ls -1 /usr/man/man4 | sed s%\\.4.\*\$%%`'@ \ + n@5@'`\ls -1 /usr/man/man5 | sed s%\\.5.\*\$%%`'@ \ + n@6@'`\ls -1 /usr/man/man6 | sed s%\\.6.\*\$%%`'@ \ + n@7@'`\ls -1 /usr/man/man7 | sed s%\\.7.\*\$%%`'@ \ + n@8@'`\ls -1 /usr/man/man8 | sed s%\\.8.\*\$%%`'@ \ + n@9@'`[ -r /usr/man/man9 ] && \ls -1 /usr/man/man9 | sed s%\\.9.\*\$%%`'@ \ + n@0@'`[ -r /usr/man/man0 ] && \ls -1 /usr/man/man0 | sed s%\\.0.\*\$%%`'@ \ + n@new@'`[ -r /usr/man/mann ] && \ls -1 /usr/man/mann | sed s%\\.n.\*\$%%`'@ \ + n@old@'`[ -r /usr/man/mano ] && \ls -1 /usr/man/mano | sed s%\\.o.\*\$%%`'@ \ +n@local@'`[ -r /usr/man/manl ] && \ls -1 /usr/man/manl | sed s%\\.l.\*\$%%`'@ \ +n@public@'`[ -r /usr/man/manp ]&& \ls -1 /usr/man/manp | sed s%\\.p.\*\$%%`'@ \ + c/-/"(- f k P s t)"/ n/-f/c/ n/-k/x:''/ n/-P/d/ \ + N@-P@'`\ls -1 $:-1/man? | sed s%\\..\*\$%%`'@ n/*/c/ + endif complete ps c/-t/x:''/ c/-/"(a c C e g k l S t u v w x)"/ \ n/-k/x:''/ N/-k/x:''/ n/*/x:''/ @@ -709,14 +783,43 @@ if ($?_complete) then N/-{z,g,remote,rgb,papercolor,t1lib,freetype,ps,paperw,paperh,upw}/f:*.{pdf,PDF}/ \ N/-/x:''/ p/1/f:*.{pdf,PDF}/ p/2/x:''/ + complete tcsh c/-D*=/'x:'/ c/-D/'x:'/ \ + c/-/"(b c d D e f F i l m n q s t v V x X -version)"/ \ + n/-c/c/ n/{-l,--version}/n/ n/*/'f:*.{,t}csh'/ + + complete rpm c/--/"(query verify nodeps nofiles nomd5 noscripts \ + nogpg nopgp install upgrade freshen erase allmatches \ + notriggers repackage test rebuild recompile initdb \ + rebuilddb addsign resign querytags showrc setperms \ + setugids all file group package querybynumber qf \ + triggeredby whatprovides whatrequires changelog \ + configfiles docfiles dump filesbypkg info last list \ + provides queryformat requires scripts state triggers \ + triggerscripts allfiles badreloc excludepath checksig \ + excludedocs force hash ignoresize ignorearch ignoreos \ + includedocs justdb noorder oldpackage percent prefix \ + relocate replace-files replacepkgs buildroot clean \ + nobuild rmsource rmspec short-circuit sign target \ + help version quiet rcfile pipe dbpath root specfile)"/\ + c/-/"(q V K i U F e ba bb bp bc bi bl bs ta tb tp tc \ + ti tl ts a f g p c d l R s h ? v vv -)"/ \ + n/{-f,--file}/f/ n/{-g,--group}/g/ n/--pipe/c/ n/--dbpath/d/ \ + n/--querybynumber/x:''/ n/--triggeredby/x:''/\ + n/--what{provides,requires}/x:''/ n/--root/d/ \ + n/--{qf,queryformat}/x:''/ n/--buildroot/d/ \ + n/--excludepath/x:''/ n/--prefix/x:''/ \ + n/--relocate/x:''/ n/--target/x:''/\ + n/--rcfile/x:''/ n/--specfile/x:''/ \ + n/{-[iUFep],--{install,upgrade,freshen,erase,package}}/f:*.rpm/ + # these conform to the latest GNU versions available at press time ... # updates by John Gotts if (-X emacs) then # TW note: if your version of GNU Emacs supports the "--version" option, # uncomment this line and comment the next to automatically - # detect the version, else replace "21.2" with your version. + # detect the version, else set "_emacs_ver" to your version. #set _emacs_ver=`emacs --version | sed -e 's%GNU Emacs %%' -e q | cut -d . -f1-2` - set _emacs_ver=21.2 + set _emacs_ver=21.3 set _emacs_dir=`which emacs | sed s%/bin/emacs%%` complete emacs c/--/"(batch terminal display no-windows no-init-file \ user debug-init unibyte multibyte version help \ @@ -729,7 +832,6 @@ if ($?_complete) then unset _emacs_ver _emacs_dir endif - # if your "zcat" is the GNU version, change "gzcat" below to just "zcat" complete gzcat c/--/"(force help license quiet version)"/ \ c/-/"(f h L q V -)"/ n/*/f:*.{gz,Z,z,zip}/ complete gzip c/--/"(stdout to-stdout decompress uncompress \ @@ -763,6 +865,11 @@ if ($?_complete) then complete ztouch n/*/f:*.{gz,Z,z,zip,taz,tgz}/ complete zforce n/*/f:^*.{gz,tgz}/ + complete dcop 'p/1/`$:0`/ /' \ + 'p/2/`$:0 $:1 | awk \{print\ \$1\}`/ /' \ + 'p/3/`$:0 $:1 $:2 | sed "s%.* \(.*\)(.*%\1%"`/ /' + + complete grep c/-*A/x:'<#_lines_after>'/ c/-*B/x:'<#_lines_before>'/\ c/--/"(extended-regexp fixed-regexp basic-regexp \ regexp file ignore-case word-regexp line-regexp \ @@ -864,6 +971,7 @@ if ($?_complete) then n/{-m,--mode}/x:''/ n/*/d/ complete rmdir c/--/"(ignore-fail-on-non-empty parents verbose help \ version)"/ c/-/"(p -)"/ n/*/d/ + complete env 'c/*=/f/' 'p/1/e/=/' 'p/2/c/' complete tar c/-[Acru]*/"(b B C f F g G h i l L M N o P \ R S T v V w W X z Z)"/ \ @@ -890,9 +998,13 @@ if ($?_complete) then block-compress help version)"/ \ c/-/"(b B C f F g G h i k K l L m M N o O p P R s S \ T v V w W X z Z 0 1 2 3 4 5 6 7 -)"/ \ - C@[/dev]@f@ \ + C@/dev@f@ \ n/-c*f/x:''/ \ - n/{-[Adrtux]*f,--file}/f:*.{tar,taz,tgz}/ \ + n/{-[Adrtux]z*f,--file}/f:*.{tar.gz,tgz}/ \ + n/{-[Adrtux]Z*f,--file}/f:*.{tar.Z,taz}/ \ + n/{-[Adrtux]*f,--file}/f:*.tar/ \ + N/{-xz*f,--file}/'`tar -tzf $:-1`'/ \ + N/{-xZ*f,--file}/'`tar -tZf $:-1`'/ \ N/{-x*f,--file}/'`tar -tf $:-1`'/ \ n/--use-compress-program/c/ \ n/{-b,--block-size}/x:''/ \ @@ -961,8 +1073,112 @@ if ($?_complete) then complete dvilj 'p/*/f:*.dvi/' endif + # From Alphonse Bendt + complete ant \ + 'n/-f/f:*.xml/' \ + 'n@*@`cat build.xml | sed -n -e "s/[ \t]*/' + complete ncftp 'n@*@`sed -e '1,2d' $HOME/.ncftp/bookmarks | cut -f 1,2 -d "," | tr "," "\012" | sort | uniq ` '@ + complete bibtex 'n@*@`ls *.aux | sed -e "s/\.aux//"`'@ + complete dvi2tty n/*/f:*.dvi/ # Only files that match *.dvi + uncomplete gv + uncomplete ghostview + complete {gv,ghostview} 'n/*/f:*.{ps,eps,epsi}/' + complete enscript \ + 'c/--/(columns= pages= header= no-header truncate-lines \ + line-numbers setpagedevice= escapes font= \ + header-font= fancy-header no-job-header \ + highlight-bars indent= filter= borders page-prefeed \ + no-page-prefeed lineprinter lines-per-page= mail \ + media= copies= newline= output= missing-characters \ + printer= quiet silent landscape portrait \ + baselineskip= statusdict= title= tabsize= underlay= \ + verbose version encoding pass-through download-font= \ + filter-stdin= help highlight-bar-gray= list-media \ + list-options non-printable-format= page-label-format= \ + printer-options= ul-angle= ul-font= ul-gray= \ + ul-position= ul-style= \ + )/' + endif + +complete dpkg 'c/--{admindir,instdir,root}=/d/' \ + 'c/--debug=/n/' \ + 'c/--{admindir,debug,instdir,root}/(=)//' \ + 'c/--/(admindir= debug= instdir= root= \ + assert-support-predepends assert-working-epoch \ + audit auto-deconfigure clear-avail \ + compare-versions configure contents control \ + extract force-bad-path field \ + force-configure-any force-conflicts \ + force-depends force-depends-version force-help \ + force-hold force-non-root \ + force-overwrite-diverted \ + force-remove-essential force-remove-reinstreq \ + forget-old-unavail fsys-tarfile get-selections \ + help ignore-depends info install largemem \ + license list listfiles merge-avail no-act \ + pending predep-package print-architecture \ + print-gnu-build-architecture \ + print-installation-architecture print-avail \ + purge record-avail recursive refuse-downgrade \ + remove search set-selections selected-only \ + skip-same-version smallmem status unpack \ + update-avail version vextract \ + )//' \ + 'n/{-l}/`dpkg -l|awk \{print\ \$2\}`/' \ + 'n/*/f:*.deb'/ +complete dpkg-deb 'c/--{build}=/d/' \ + 'c/--/(build contents info field control extract \ + vextract fsys-tarfile help version \ + license)//' \ + 'n/*/f:*.deb/' +complete apt-get 'c/--/(build config-file diff-only download-only \ + fix-broken fix-missing force-yes help ignore-hold no-download \ + no-upgrade option print-uris purge reinstall quiet simulate \ + show-upgraded target-release tar-only version yes )/' \ + 'c/-/(b c= d f h m o= q qq s t x y )/' \ + 'n/{source,build-dep}/x:/' \ + 'n/{remove}/`dpkg -l|grep ^ii|awk \{print\ \$2\}`/' \ + 'n/{install}/`apt-cache pkgnames | sort`/' \ + 'C/*/(update upgrade dselect-upgrade source \ + build-dep check clean autoclean install remove)/' +complete apt-cache \ + 'c/--/(all-versions config-file generate full help important \ + names-only option pkg-cache quiet recurse src-cache version )/' \ + 'c/-/(c= h i o= p= q s= v)/' \ + 'n/{search}/x:/' \ + 'n/{pkgnames,policy,show,showpkg,depends,dotty}/`apt-cache pkgnames | sort`/' \ + 'C/*/(add gencaches showpkg stats dump dumpavail unmet show \ + search depends pkgnames dotty policy )/' + unset noglob unset _complete + unset traditional_complete endif end: diff --git a/contrib/tcsh/config/bsd4.4 b/contrib/tcsh/config/bsd4.4 index 96e83ad9a017..b99531e2ac70 100644 --- a/contrib/tcsh/config/bsd4.4 +++ b/contrib/tcsh/config/bsd4.4 @@ -125,6 +125,13 @@ #define BSD_STYLE_COLORLS #endif +#if defined(__NetBSD__) +#include +#if __NetBSD_Version__ >= 106030000 /* NetBSD 1.6C */ +#define HAVEUTMPX +#endif +#endif + #if defined(__bsdi__) /* * _PATH_TCSHELL if you've change the installation location (vix) diff --git a/contrib/tcsh/config_f.h b/contrib/tcsh/config_f.h index daeccb6c70c0..d28ca90e1459 100644 --- a/contrib/tcsh/config_f.h +++ b/contrib/tcsh/config_f.h @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/config_f.h,v 3.25 2002/03/08 17:36:45 christos Exp $ */ +/* $Header: /src/pub/tcsh/config_f.h,v 3.26 2004/03/21 16:48:14 christos Exp $ */ /* * config_f.h -- configure various defines for tcsh * @@ -113,14 +113,14 @@ * be used with SHORT_STRINGS * */ -#undef KANJI +#define KANJI /* * DSPMBYTE add variable "dspmbyte" and display multi-byte string at * only output, when "dspmbyte" is set. Should be used with * KANJI */ -#undef DSPMBYTE +#define DSPMBYTE /* * MBYTEDEBUG when "dspmbyte" is changed, set multi-byte checktable to diff --git a/contrib/tcsh/configure b/contrib/tcsh/configure index fdc17205ea5b..a3b9fbfb64e3 100755 --- a/contrib/tcsh/configure +++ b/contrib/tcsh/configure @@ -1,28 +1,287 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by GNU Autoconf 2.57. # +# 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. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -# Defaults: -ac_help= +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# 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" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help - --with-hesiod=PREFIX Use Hesiod lookup for ~ expansion" +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="tc.vers.c" +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP DFLAGS HESDEF HESLIB LIBOBJS LTLIBOBJS' +ac_subst_files='' # Initialize some variables set by options. +ac_init_help= +ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -31,10 +290,15 @@ program_transform_name=s,x,x, silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' @@ -48,17 +312,9 @@ oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" @@ -66,59 +322,59 @@ do continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) - datadir="$ac_optarg" ;; + datadir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -127,95 +383,47 @@ do -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ @@ -224,19 +432,19 @@ EOF -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) + | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ @@ -250,26 +458,26 @@ EOF -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -286,7 +494,7 @@ EOF | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -296,7 +504,7 @@ EOF ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -307,58 +515,57 @@ EOF | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -369,99 +576,110 @@ EOF ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac done -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=tc.vers.c # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + 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=.. @@ -471,13 +689,431 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } fi fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-hesiod=PREFIX Use Hesiod lookup for ~ expansion + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +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. +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.57. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then @@ -488,39 +1124,103 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi else - echo "creating cache $cache_file" - > $cache_file + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi @@ -534,51 +1234,88 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:554: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo $ac_n "checking cached host tuple""... $ac_c" 1>&6 -echo "configure:576: checking cached host tuple" >&5 +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + + +echo "$as_me:$LINENO: checking cached host tuple" >&5 +echo $ECHO_N "checking cached host tuple... $ECHO_C" >&6 if { test x"${ac_cv_host_system_type+set}" = x"set" && test x"$ac_cv_host_system_type" != x"$host"; }; then - echo "$ac_t""different" 1>&6 - { echo "configure: error: remove config.cache and re-run configure" 1>&2; exit 1; } + echo "$as_me:$LINENO: result: different" >&5 +echo "${ECHO_T}different" >&6 + { { echo "$as_me:$LINENO: error: remove config.cache and re-run configure" >&5 +echo "$as_me: error: remove config.cache and re-run configure" >&2;} + { (exit 1); exit 1; }; } else - echo "$ac_t""ok" 1>&6 + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 fi ac_cv_host_system_type="$host" @@ -743,7 +1480,7 @@ case "${host}" in ;; ## SCO - *-sco3.2v5*) + *-sco3.2v5*) tcsh_config_file=sco32v5 ;; *-sco3.2v4*) @@ -784,224 +1521,658 @@ case "${host}" in ;; * ) - { echo "configure: error: Tcsh can't guess the configuration file name + { { echo "$as_me:$LINENO: error: Tcsh can't guess the configuration file name for \`${host}' systems. -Check tcsh's \`Ported' file for manual configuration instructions." 1>&2; exit 1; } +Check tcsh's \`Ported' file for manual configuration instructions." >&5 +echo "$as_me: error: Tcsh can't guess the configuration file name +for \`${host}' systems. +Check tcsh's \`Ported' file for manual configuration instructions." >&2;} + { (exit 1); exit 1; }; } ;; esac echo "Tcsh will use configuration file \`$tcsh_config_file'." + ac_config_headers="$ac_config_headers config.h:config/${tcsh_config_file}:config.h.in" -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:801: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" +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" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:831: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift - if test $# -gt 0; then + if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - if test -z "$CC"; then - case "`uname -s`" in - *win32* | *WIN32*) - # Extract the first word of "cl", so it can be a program name with args. -set dummy cl; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:882: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="cl" - break - fi - done - IFS="$ac_save_ifs" +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" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - ;; - esac + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:914: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + test -n "$ac_ct_CC" && break +done -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross + CC=$ac_ct_CC +fi -cat > conftest.$ac_ext << EOF +fi -#line 925 "configure" -#include "confdefs.h" -main(){return(0);} -EOF -if { (eval echo configure:930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output" >&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:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no else - ac_cv_prog_cc_cross=yes + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no fi -rm -fr conftest* -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:956: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:961: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done else - cat > conftest.c <&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me #endif -EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes else - GCC= + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu -ac_test_CFLAGS="${CFLAGS+set}" -ac_save_CFLAGS="$CFLAGS" -CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:989: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else - ac_cv_prog_cc_g=no -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_prog_cc_g=no fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" + CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" @@ -1015,136 +2186,529 @@ else CFLAGS= fi fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1021: checking how to run the C preprocessor" >&5 +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_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 + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test $ac_cv_prog_gcc = yes; then - echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:1102: checking whether ${CC-cc} needs -traditional" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +if test $ac_cv_c_compiler_gnu = yes; then + echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 +echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 +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 <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include Autoconf TIOCGETP -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then - rm -rf conftest* + $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else - rm -rf conftest* ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include Autoconf TCGETA -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then - rm -rf conftest* + $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi - -echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 +echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 +echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi -if test $ac_cv_prog_gcc = no ; then +if test $ac_cv_c_compiler_gnu = no ; then DFLAGS="$DFLAGS $NON_GNU_DFLAGS" CFLAGS="$CFLAGS $NON_GNU_CFLAGS" fi @@ -1156,287 +2720,482 @@ case "${host}" in ;; esac - -echo $ac_n "checking for library containing crypt""... $ac_c" 1>&6 -echo "configure:1162: checking for library containing crypt" >&5 -if eval "test \"`echo '$''{'ac_cv_search_crypt'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for library containing crypt" >&5 +echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6 +if test "${ac_cv_search_crypt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS="$LIBS" -ac_cv_search_crypt="no" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -crypt() -; return 0; } -EOF -if { (eval echo configure:1180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* +/* 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 crypt (); +int +main () +{ +crypt (); + ; + 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_crypt="none required" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -test "$ac_cv_search_crypt" = "no" && for i in crypt; do -LIBS="-l$i $ac_func_search_save_LIBS" -cat > conftest.$ac_ext <&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int main() { -crypt() -; return 0; } -EOF -if { (eval echo configure:1202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_crypt="-l$i" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_crypt" = no; then + for ac_lib in crypt; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char crypt (); +int +main () +{ +crypt (); + ; + 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_crypt="-l$ac_lib" break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -done -LIBS="$ac_func_search_save_LIBS" -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo "$ac_t""$ac_cv_search_crypt" 1>&6 -if test "$ac_cv_search_crypt" != "no"; then +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_crypt" >&5 +echo "${ECHO_T}$ac_cv_search_crypt" >&6 +if test "$ac_cv_search_crypt" != no; then test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS" - -else : - + fi -echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6 -echo "configure:1224: checking for library containing tgetent" >&5 -if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for library containing tgetent" >&5 +echo $ECHO_N "checking for library containing tgetent... $ECHO_C" >&6 +if test "${ac_cv_search_tgetent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS="$LIBS" -ac_cv_search_tgetent="no" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -tgetent() -; return 0; } -EOF -if { (eval echo configure:1242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* +/* 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 tgetent (); +int +main () +{ +tgetent (); + ; + 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_tgetent="none required" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -test "$ac_cv_search_tgetent" = "no" && for i in termlib curses termcap; do -LIBS="-l$i $ac_func_search_save_LIBS" -cat > conftest.$ac_ext <&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int main() { -tgetent() -; return 0; } -EOF -if { (eval echo configure:1264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_tgetent="-l$i" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_tgetent" = no; then + for ac_lib in termlib curses termcap; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char tgetent (); +int +main () +{ +tgetent (); + ; + 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_tgetent="-l$ac_lib" break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -done -LIBS="$ac_func_search_save_LIBS" -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo "$ac_t""$ac_cv_search_tgetent" 1>&6 -if test "$ac_cv_search_tgetent" != "no"; then +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_tgetent" >&5 +echo "${ECHO_T}$ac_cv_search_tgetent" >&6 +if test "$ac_cv_search_tgetent" != no; then test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS" - -else : - + fi -echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6 -echo "configure:1286: checking for library containing gethostbyname" >&5 -if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 +echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6 +if test "${ac_cv_search_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS="$LIBS" -ac_cv_search_gethostbyname="no" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -gethostbyname() -; return 0; } -EOF -if { (eval echo configure:1304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&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_gethostbyname="none required" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do -LIBS="-l$i $ac_func_search_save_LIBS" -cat > conftest.$ac_ext <&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int main() { -gethostbyname() -; return 0; } -EOF -if { (eval echo configure:1326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_gethostbyname="-l$i" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_gethostbyname" = no; then + for ac_lib in nsl; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&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_gethostbyname="-l$ac_lib" break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -done -LIBS="$ac_func_search_save_LIBS" -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6 -if test "$ac_cv_search_gethostbyname" != "no"; then +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_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6 +if test "$ac_cv_search_gethostbyname" != no; then test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" - -else : - + fi -echo $ac_n "checking for library containing connect""... $ac_c" 1>&6 -echo "configure:1348: checking for library containing connect" >&5 -if eval "test \"`echo '$''{'ac_cv_search_connect'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:$LINENO: checking for library containing connect" >&5 +echo $ECHO_N "checking for library containing connect... $ECHO_C" >&6 +if test "${ac_cv_search_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS="$LIBS" -ac_cv_search_connect="no" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -int main() { -connect() -; return 0; } -EOF -if { (eval echo configure:1366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +int +main () +{ +connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&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_connect="none required" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -test "$ac_cv_search_connect" = "no" && for i in socket; do -LIBS="-l$i $ac_func_search_save_LIBS" -cat > conftest.$ac_ext <&5 +sed 's/^/| /' conftest.$ac_ext >&5 -int main() { -connect() -; return 0; } -EOF -if { (eval echo configure:1388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - ac_cv_search_connect="-l$i" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_connect" = no; then + for ac_lib in socket; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +int +main () +{ +connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&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_connect="-l$ac_lib" break else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* -done -LIBS="$ac_func_search_save_LIBS" -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -echo "$ac_t""$ac_cv_search_connect" 1>&6 -if test "$ac_cv_search_connect" != "no"; then +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_connect" >&5 +echo "${ECHO_T}$ac_cv_search_connect" >&6 +if test "$ac_cv_search_connect" != no; then test "$ac_cv_search_connect" = "none required" || LIBS="$ac_cv_search_connect $LIBS" - -else : - + fi -echo $ac_n "checking ss_family in sockaddr_storage""... $ac_c" 1>&6 -echo "configure:1411: checking ss_family in sockaddr_storage" >&5 -if eval "test \"`echo '$''{'ac_cv_ss_family'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + +echo "$as_me:$LINENO: checking ss_family in sockaddr_storage" >&5 +echo $ECHO_N "checking ss_family in sockaddr_storage... $ECHO_C" >&6 +if test "${ac_cv_ss_family+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include #include -int main() { +int +main () +{ struct sockaddr_storage ss; ss.ss_family; -; return 0; } -EOF -if { (eval echo configure:1424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_ss_family=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_ss_family=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_ss_family=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext if test "$ac_cv_ss_family" = no; then DFLAGS="$DFLAGS -DNO_SS_FAMILY" fi fi +echo "$as_me:$LINENO: result: $ac_cv_ss_family" >&5 +echo "${ECHO_T}$ac_cv_ss_family" >&6 -echo "$ac_t""$ac_cv_ss_family" 1>&6 @@ -1446,94 +3205,140 @@ if test "${with_hesiod+set}" = set; then hesiod="$withval" else hesiod=no -fi - +fi; if test "$hesiod" != no; then HESLIB="-lhesiod" - echo $ac_n "checking for res_send""... $ac_c" 1>&6 -echo "configure:1455: checking for res_send" >&5 -if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for res_send" >&5 +echo $ECHO_N "checking for res_send... $ECHO_C" >&6 +if test "${ac_cv_func_res_send+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char res_send(); below. */ -#include + which can conflict with char res_send (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif /* Override any gcc2 internal prototype to avoid an error. */ +#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 res_send(); - -int main() { - + builtin and then its argument prototype would still apply. */ +char res_send (); /* 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_res_send) || defined (__stub___res_send) choke me #else -res_send(); +char (*f) () = res_send; +#endif +#ifdef __cplusplus +} #endif -; return 0; } -EOF -if { (eval echo configure:1483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_res_send=yes" +int +main () +{ +return f != res_send; + ; + 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_func_res_send=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_res_send=no" -fi -rm -f conftest* -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then - echo "$ac_t""yes" 1>&6 +ac_cv_func_res_send=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5 +echo "${ECHO_T}$ac_cv_func_res_send" >&6 +if test $ac_cv_func_res_send = yes; then : else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6 -echo "configure:1501: checking for res_send in -lresolv" >&5 -ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5 +echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6 +if test "${ac_cv_lib_resolv_res_send+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char res_send(); - -int main() { -res_send() -; return 0; } -EOF -if { (eval echo configure:1520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + builtin and then its argument prototype would still apply. */ +char res_send (); +int +main () +{ +res_send (); + ; + 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_resolv_res_send=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_resolv_res_send=no fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +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_resolv_res_send" >&5 +echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6 +if test $ac_cv_lib_resolv_res_send = yes; then HESLIB="$HESLIB -lresolv" -else - echo "$ac_t""no" 1>&6 fi fi @@ -1547,359 +3352,1089 @@ fi -trap '' 1 2 15 -cat > confcache <<\EOF + + + ac_config_files="$ac_config_files Makefile" +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' fi -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - DEFS=-DHAVE_CONFIG_H -# Without the "./", some shells look in PATH for config.status. +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + : ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. # Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF -ac_given_srcdir=$srcdir +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## -trap 'rm -fr `echo "Makefile config.h:config/${tcsh_config_file}:config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@DFLAGS@%$DFLAGS%g -s%@HESDEF@%$HESDEF%g -s%@HESLIB@%$HESLIB%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# 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_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi -EOF -cat >> $CONFIG_STATUS </dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi -CONFIG_FILES=\${CONFIG_FILES-"Makefile"} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; esac - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + # 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; }; } - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - 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'` + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' else - ac_dir_suffix= ac_dots= + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# 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" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# 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.57. 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. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.57, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +_ACEOF + +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=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + + + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config/${tcsh_config_file}:config.h.in" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@DFLAGS@,$DFLAGS,;t t +s,@HESDEF@,$HESDEF,;t t +s,@HESLIB@,$HESLIB,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_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 + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + 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` + + + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out fi - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* +# +# CONFIG_HEADER section. +# # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' +ac_uD=',;t' -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - echo creating $ac_file + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in -EOF +_ACEOF -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed # 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.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_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). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS rm -f conftest.tail -while : +while grep . conftest.defines >/dev/null do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines done -rm -f conftest.vals +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi -fi; done + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +cat >>$CONFIG_STATUS <<\_ACEOF -exit 0 -EOF +{ (exit 0); exit 0; } +_ACEOF chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +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 +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi diff --git a/contrib/tcsh/configure.in b/contrib/tcsh/configure.in index 6a6d417c5581..254b652811e7 100644 --- a/contrib/tcsh/configure.in +++ b/contrib/tcsh/configure.in @@ -335,4 +335,6 @@ fi AC_SUBST(HESDEF) AC_SUBST(HESLIB) +AC_EXEEXT + AC_OUTPUT(Makefile) diff --git a/contrib/tcsh/csh-mode.el b/contrib/tcsh/csh-mode.el index 20fee71287fc..3b638dbad2b2 100644 --- a/contrib/tcsh/csh-mode.el +++ b/contrib/tcsh/csh-mode.el @@ -2,7 +2,7 @@ ;; ;; Version: 1.2 ;; Date: April 2, 1999 -;; Maintainer: Dan Harkless +;; Maintainer: Dan Harkless ;; ;; Description: ;; csh and tcsh script editing mode for Emacs. @@ -19,7 +19,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Author key: -;; DH - Dan Harkless +;; DH - Dan Harkless ;; CM - Carlo Migliorini ;; JR - Jack Repenning ;; GE - Gary Ellison diff --git a/contrib/tcsh/ed.refresh.c b/contrib/tcsh/ed.refresh.c index ed05b8b214f0..74028dbeba39 100644 --- a/contrib/tcsh/ed.refresh.c +++ b/contrib/tcsh/ed.refresh.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/ed.refresh.c,v 3.29 2002/03/08 17:36:45 christos Exp $ */ +/* $Header: /src/pub/tcsh/ed.refresh.c,v 3.30 2003/02/08 20:03:25 christos Exp $ */ /* * ed.refresh.c: Lower level screen refreshing functions */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: ed.refresh.c,v 3.29 2002/03/08 17:36:45 christos Exp $") +RCSID("$Id: ed.refresh.c,v 3.30 2003/02/08 20:03:25 christos Exp $") #include "ed.h" /* #define DEBUG_UPDATE */ @@ -52,7 +52,12 @@ static void update_line __P((Char *, Char *, int)); static void str_insert __P((Char *, int, int, Char *, int)); static void str_delete __P((Char *, int, int, int)); static void str_cp __P((Char *, Char *, int)); -static void PutPlusOne __P((int)); +#ifndef WINNT_NATIVE +static +#else +extern +#endif + void PutPlusOne __P((int)); static void cpy_pad_spaces __P((Char *, Char *, int)); #if defined(DSPMBYTE) static Char *update_line_fix_mbyte_point __P((Char *, Char *, int)); @@ -272,7 +277,11 @@ RefreshPromptpart(buf) * virtual image. The routine to re-draw a line can be replaced * easily in hopes of a smarter one being placed there. */ -static int OldvcV = 0; +#ifndef WINNT_NATIVE +static +#endif +int OldvcV = 0; + void Refresh() { @@ -1197,6 +1206,7 @@ RefCursor() flush(); } +#ifndef WINTT_NATIVE static void PutPlusOne(c) int c; @@ -1219,6 +1229,7 @@ PutPlusOne(c) } } } +#endif void RefPlusOne() diff --git a/contrib/tcsh/ed.screen.c b/contrib/tcsh/ed.screen.c index f0e38ae708d2..933ded32579e 100644 --- a/contrib/tcsh/ed.screen.c +++ b/contrib/tcsh/ed.screen.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/ed.screen.c,v 3.49 2002/03/08 17:36:45 christos Exp $ */ +/* $Header: /src/pub/tcsh/ed.screen.c,v 3.50 2003/02/08 20:03:25 christos Exp $ */ /* * ed.screen.c: Editor/termcap-curses interface */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: ed.screen.c,v 3.49 2002/03/08 17:36:45 christos Exp $") +RCSID("$Id: ed.screen.c,v 3.50 2003/02/08 20:03:25 christos Exp $") #include "ed.h" #include "tc.h" @@ -1112,7 +1112,6 @@ MoveToLine(where) /* move to line (first line == 0) */ del = where - CursorV; -#ifndef WINNT_NATIVE if (del > 0) { while (del > 0) { if ((T_Margin & MARGIN_AUTO) && Display[CursorV][0] != '\0') { @@ -1144,9 +1143,6 @@ MoveToLine(where) /* move to line (first line == 0) */ (void) tputs(Str(T_up), 1, PUTPURE); } } -#else /* WINNT_NATIVE */ - NT_MoveToLineOrChar(del, 1); -#endif /* !WINNT_NATIVE */ CursorV = where; /* now where is here */ } @@ -1154,11 +1150,9 @@ void MoveToChar(where) /* move to character position (where) */ int where; { /* as efficiently as possible */ -#ifndef WINNT_NATIVE int del; mc_again: -#endif /* WINNT_NATIVE */ if (where == CursorH) return; @@ -1176,7 +1170,6 @@ mc_again: return; } -#ifndef WINNT_NATIVE del = where - CursorH; if ((del < -4 || del > 4) && GoodStr(T_ch)) @@ -1228,9 +1221,6 @@ mc_again: } } } -#else /* WINNT_NATIVE */ - NT_MoveToLineOrChar(where, 0); -#endif /* !WINNT_NATIVE */ CursorH = where; /* now where is here */ } @@ -1259,18 +1249,8 @@ so_write(cp, n) xprintf("so: litnum %d, litptr %x\r\n", *cp & CHAR, litptr[*cp & CHAR]); #endif /* DEBUG_LITERAL */ -#if defined(WINNT_NATIVE) && !defined(COLOR_LS_F) - { - char buf[256], *ptr = &buf[0]; - for (d = litptr[*cp++ & CHAR]; *d & LITERAL; d++) - *ptr++ = (*d & CHAR); - flush(); - set_cons_attr(buf); - } -#else /* !WINNT_NATIVE || COLOR_LS_F */ for (d = litptr[*cp++ & CHAR]; *d & LITERAL; d++) (void) putraw(*d & CHAR); -#endif /* WINNT_NATIVE && !COLOR_LS_F */ (void) putraw(*d); } @@ -1447,11 +1427,7 @@ SoundBeep() /* what termcap says we should use */ (void) tputs(Str(T_bl), 1, PUTPURE); else -#ifndef WINNT_NATIVE (void) putraw(CTL_ESC('\007')); /* an ASCII bell; ^G */ -#else /* WINNT_NATIVE */ - MessageBeep(MB_ICONQUESTION); -#endif /* !WINNT_NATIVE */ } void @@ -1653,9 +1629,6 @@ ChangeSize(lins, cols) Val(T_co) = (cols < 2) ? 80 : cols; Val(T_li) = (lins < 1) ? 24 : lins; -#ifdef WINNT_NATIVE - nt_set_size(lins,cols); -#endif /* WINNT_NATIVE */ #ifdef KNOWsize /* * We want to affect the environment only when we have a valid diff --git a/contrib/tcsh/ed.term.c b/contrib/tcsh/ed.term.c index f205e05799ea..ebda35fe3dfe 100644 --- a/contrib/tcsh/ed.term.c +++ b/contrib/tcsh/ed.term.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/ed.term.c,v 1.28 2002/07/06 22:28:13 christos Exp $ */ +/* $Header: /src/pub/tcsh/ed.term.c,v 1.29 2003/05/26 07:11:06 christos Exp $ */ /* * ed.term.c: Low level terminal interface */ @@ -33,7 +33,7 @@ #include "sh.h" #ifndef WINNT_NATIVE -RCSID("$Id: ed.term.c,v 1.28 2002/07/06 22:28:13 christos Exp $") +RCSID("$Id: ed.term.c,v 1.29 2003/05/26 07:11:06 christos Exp $") #include "ed.h" @@ -553,7 +553,7 @@ static struct tcshmodes { #if defined(EAGAIN) && defined(EWOULDBLOCK) && (EWOULDBLOCK != EAGAIN) # define OKERROR(e) (((e) == EAGAIN) || ((e) == EWOULDBLOCK) || ((e) == EINTR)) -#elif defined(EGAIN) +#elif defined(EAGAIN) # define OKERROR(e) (((e) == EAGAIN) || ((e) == EINTR)) #elif defined(EWOULDBLOCK) # define OKERROR(e) (((e) == EWOULDBLOCK) || ((e) == EINTR)) diff --git a/contrib/tcsh/gethost.c b/contrib/tcsh/gethost.c index b57df166190b..012a9fe28577 100644 --- a/contrib/tcsh/gethost.c +++ b/contrib/tcsh/gethost.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/gethost.c,v 1.8 2002/03/08 17:36:46 christos Exp $ */ +/* $Header: /src/pub/tcsh/gethost.c,v 1.9 2002/12/04 12:30:55 christos Exp $ */ /* * gethost.c: Create version file from prototype */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: gethost.c,v 1.8 2002/03/08 17:36:46 christos Exp $") +RCSID("$Id: gethost.c,v 1.9 2002/12/04 12:30:55 christos Exp $") #ifdef SCO # define perror __perror @@ -159,7 +159,7 @@ main(argc, argv) { char line[INBUFSIZE]; char *pname; - char *fname = "stdin"; + const char *fname = "stdin"; char *ptr, *tok; char defs[INBUFSIZE]; char stmt[INBUFSIZE]; diff --git a/contrib/tcsh/glob.c b/contrib/tcsh/glob.c index e8e5e13e008a..8e107c9d789a 100644 --- a/contrib/tcsh/glob.c +++ b/contrib/tcsh/glob.c @@ -146,8 +146,8 @@ static void qprintf __P((Char *)); #endif int -globcharcoll(c1, c2) - int c1, c2; +globcharcoll(c1, c2, cs) + int c1, c2, cs; { #if defined(NLS) && defined(LC_COLLATE) && !defined(NOSTRCOLL) char s1[2], s2[2]; @@ -158,8 +158,13 @@ globcharcoll(c1, c2) * From kevin lyda : * strcoll does not guarantee case sorting, so we pre-process now: */ - if (islower(c1) && isupper(c2)) - return (1); + if (cs) { + c1 = islower(c1) ? c1 : tolower(c1); + c2 = islower(c2) ? c2 : tolower(c2); + } else { + if (islower(c1) && isupper(c2)) + return (1); + } s1[0] = c1; s2[0] = c2; s1[1] = s2[1] = '\0'; @@ -701,8 +706,8 @@ match(name, pat, patend, m_not) ++pat; while (((c = *pat++) & M_MASK) != M_END) { if ((*pat & M_MASK) == M_RNG) { - if (globcharcoll(CHAR(c), CHAR(k)) <= 0 && - globcharcoll(CHAR(k), CHAR(pat[1])) <= 0) + if (globcharcoll(CHAR(c), CHAR(k), 0) <= 0 && + globcharcoll(CHAR(k), CHAR(pat[1]), 0) <= 0) ok = 1; pat += 2; } diff --git a/contrib/tcsh/glob.h b/contrib/tcsh/glob.h index e8e4fc892528..382ff130d628 100644 --- a/contrib/tcsh/glob.h +++ b/contrib/tcsh/glob.h @@ -86,6 +86,6 @@ typedef struct { int glob __P((const char *, int, int (*)(const char *, int), glob_t *)); void globfree __P((glob_t *)); -int globcharcoll __P((int, int)); +int globcharcoll __P((int, int, int)); #endif /* !_GLOB_H_ */ diff --git a/contrib/tcsh/host.defs b/contrib/tcsh/host.defs index b68bd4c0cb77..17a9ae1a6404 100644 --- a/contrib/tcsh/host.defs +++ b/contrib/tcsh/host.defs @@ -1,5 +1,5 @@ newcode : -/* $Header: /src/pub/tcsh/host.defs,v 1.35 2002/07/23 16:13:21 christos Exp $ */ +/* $Header: /src/pub/tcsh/host.defs,v 1.36 2003/02/08 20:03:25 christos Exp $ */ /* * host.defs: Hosttype/Machtype etc. */ @@ -33,12 +33,14 @@ newcode : */ #include "sh.h" -RCSID("$Id: host.defs,v 1.35 2002/07/23 16:13:21 christos Exp $") +RCSID("$Id: host.defs,v 1.36 2003/02/08 20:03:25 christos Exp $") endcode : -macro : M_mipsel : (defined(mips) || defined(__mips)) && (defined(MIPSEL) || defined(__MIPSEL)) -macro : M_mipseb : (defined(mips) || defined(__mips)) && (defined(MIPSEB) || defined(__MIPSEB)) +macro : M_mips64el : (defined(mips64) || defined(__mips64)) && (defined(MIPSEL) || defined(__MIPSEL)) +macro : M_mips64eb : (defined(mips64) || defined(__mips64)) && (defined(MIPSEB) || defined(__MIPSEB)) +macro : M_mipsel : (!defined(M_mips64el)) && (defined(mips) || defined(__mips)) && (defined(MIPSEL) || defined(__MIPSEL)) +macro : M_mipseb : (!defined(M_mips64eb)) && (defined(mips) || defined(__mips)) && (defined(MIPSEB) || defined(__MIPSEB)) macro : M_i386 : (defined(i386) || defined(__i386__)) macro : M_i486 : (defined(i486) || defined(__i486__)) macro : M_i586 : (defined(i586) || defined(__i586__)) @@ -450,6 +452,10 @@ hosttype: defined(__alpha) : "alpha" hosttype: defined(PPC) : "powerpc" machtype: defined(__alpha) : "alpha" machtype: defined(PPC) : "powerpc" +machtype: defined(M_mipsel) : "mipsel" +machtype: defined(M_mipseb) : "mipseb" +machtype: defined(M_mips64el) : "mips64el" +machtype: defined(M_mips64eb) : "mips64eb" enddef : diff --git a/contrib/tcsh/ma.setp.c b/contrib/tcsh/ma.setp.c index d515d0f5c1e3..9d489c65a230 100644 --- a/contrib/tcsh/ma.setp.c +++ b/contrib/tcsh/ma.setp.c @@ -82,7 +82,7 @@ ********************************************************************** */ #include "sh.h" -RCSID("$Id: ma.setp.c,v 1.12 1996/04/26 19:18:36 christos Exp $") +RCSID("$Id: ma.setp.c,v 1.13 2003/05/26 07:11:06 christos Exp $") #ifdef MACH @@ -442,8 +442,8 @@ char *inpath, *path; if (n >= 0) insert(pe, n, path); else - xprintf(CGETS(10, 4, "setpath: %s not found in %s\n", - inpath, pe->pname)); + xprintf(CGETS(10, 4, "setpath: %s not found in %s\n"), + inpath, pe->pname); } } diff --git a/contrib/tcsh/nls/C/set17 b/contrib/tcsh/nls/C/set17 index 0e8115a0b79d..0bef721f3b74 100644 --- a/contrib/tcsh/nls/C/set17 +++ b/contrib/tcsh/nls/C/set17 @@ -1,4 +1,4 @@ -$ $Id: set17,v 1.4 2001/01/04 17:51:38 christos Exp $ +$ $Id: set17,v 1.5 2003/02/08 20:03:26 christos Exp $ $ sh.proc.c $set 17 1 BUG: waiting for background job!\n @@ -14,3 +14,4 @@ $set 17 11 (wd now: 12 %S: Already suspended\n 13 %S: Already stopped\n +14 %S: Badly formed number\n diff --git a/contrib/tcsh/nls/Makefile b/contrib/tcsh/nls/Makefile index a1936e3644a9..57611b43e984 100644 --- a/contrib/tcsh/nls/Makefile +++ b/contrib/tcsh/nls/Makefile @@ -1,7 +1,8 @@ SUBDIRS= C et finnish french german greek italian ja pl russian \ spanish ukrainian -#GENCAT= gencat -new +#GENCAT= gencat --new +#CHARSET= charset GENCAT= gencat catalogs: @@ -9,7 +10,7 @@ catalogs: do \ echo "$$i"; \ cd $$i; \ - cat set[0-9] set[0-9][0-9] > ../../tcsh.$$i.m; \ + cat ${CHARSET} set[0-9] set[0-9][0-9] > ../../tcsh.$$i.m; \ cd ..; \ ${GENCAT} ../tcsh.$$i.cat ../tcsh.$$i.m; \ done diff --git a/contrib/tcsh/nls/et/set17 b/contrib/tcsh/nls/et/set17 index abb92bba83e5..ae536c315a95 100644 --- a/contrib/tcsh/nls/et/set17 +++ b/contrib/tcsh/nls/et/set17 @@ -1,4 +1,4 @@ -$ $Id: set17,v 1.1 2001/01/04 18:46:03 christos Exp $ +$ $Id: set17,v 1.2 2003/02/08 20:03:26 christos Exp $ $ sh.proc.c $set 17 1 BUG: ootan taustatцц jдrel!\n @@ -14,3 +14,4 @@ $set 17 11 (tццkataloog nььd: 12 %S: Juba peatatud\n 13 %S: Juba seisatud\n +14 %S: Badly formed number\n diff --git a/contrib/tcsh/nls/finnish/set14 b/contrib/tcsh/nls/finnish/set14 index cd3d6233df3f..220bdc4489fc 100644 --- a/contrib/tcsh/nls/finnish/set14 +++ b/contrib/tcsh/nls/finnish/set14 @@ -1,6 +1,6 @@ -$ $Id: set14,v 1.1 2000/01/14 22:57:32 christos Exp $ +$ $Id: set14,v 1.2 2003/05/26 07:11:07 christos Exp $ $ sh.file.c $set 14 1 \nAuts!! Liian monta %s!!\n -3 nimeд kдyttдjдtietokannassa +2 nimeд kдyttдjдtietokannassa 3 tiedostoa diff --git a/contrib/tcsh/nls/finnish/set17 b/contrib/tcsh/nls/finnish/set17 index a0be387250c9..a737f404f8d3 100644 --- a/contrib/tcsh/nls/finnish/set17 +++ b/contrib/tcsh/nls/finnish/set17 @@ -1,4 +1,4 @@ -$ $Id: set17,v 1.1 2000/01/14 22:57:32 christos Exp $ +$ $Id: set17,v 1.2 2003/02/08 20:03:27 christos Exp $ $ sh.proc.c $set 17 1 VIKA: taustatyцtд!\n @@ -14,3 +14,4 @@ $set 17 11 hakemisto nyt: 12 %S: On jo keskeytetty\n 13 %S: On jo pysдytetty\n +14 %S: Badly formed number\n diff --git a/contrib/tcsh/nls/french/set11 b/contrib/tcsh/nls/french/set11 index 421b99c72b3f..d5c4aa46358d 100644 --- a/contrib/tcsh/nls/french/set11 +++ b/contrib/tcsh/nls/french/set11 @@ -1,9 +1,9 @@ -$ $Id: set11,v 1.1 1995/04/25 14:04:35 christos Exp $ +$ $Id: set11,v 1.2 2003/05/26 07:11:07 christos Exp $ $ sh.c $set 11 1 Attention: pas d'accиs au tty (%s).\n 2 Ainsi pas de contrфle de job dans ce shell.\n -3 Vous avez%d messages courrier (mail).\n +3 Vous avez %d messages courrier (mail).\n 4 Vous avez %d messages courrier (mail) dans %s.\n 5 Vous avez du %scourrier.\n 6 nouveau diff --git a/contrib/tcsh/nls/french/set17 b/contrib/tcsh/nls/french/set17 index a343157fcc4f..0f8c66fb0a39 100644 --- a/contrib/tcsh/nls/french/set17 +++ b/contrib/tcsh/nls/french/set17 @@ -1,4 +1,4 @@ -$ $Id: set17,v 1.2 1996/10/19 17:52:38 christos Exp $ +$ $Id: set17,v 1.3 2003/02/08 20:03:27 christos Exp $ $ sh.proc.c $set 17 1 BUG: attente de travail en tвche de fond !\n @@ -14,3 +14,4 @@ $set 17 11 wd maintenant: 12 %S: Dйjа suspendu\n 13 %S: Dйjа arrкtй\n +14 %S: Badly formed number\n diff --git a/contrib/tcsh/nls/german/set17 b/contrib/tcsh/nls/german/set17 index 36a6e7668751..537239219f91 100644 --- a/contrib/tcsh/nls/german/set17 +++ b/contrib/tcsh/nls/german/set17 @@ -1,4 +1,4 @@ -$ $Id: set17,v 1.3 1996/10/19 17:52:51 christos Exp $ +$ $Id: set17,v 1.4 2003/02/08 20:03:27 christos Exp $ $ sh.proc.c $set 17 1 FEHLER: Warte auf Hintergrund-Job!\n @@ -14,3 +14,4 @@ $set 17 11 (Verz jetzt: 12 %S: Bereits angehalten\n 13 %S: Bereits angehalten\n +14 %S: Badly formed number\n diff --git a/contrib/tcsh/nls/greek/set17 b/contrib/tcsh/nls/greek/set17 index b0baa0e702aa..9a6c9d132dba 100644 --- a/contrib/tcsh/nls/greek/set17 +++ b/contrib/tcsh/nls/greek/set17 @@ -1,4 +1,4 @@ -$ $Id: set17,v 1.1 1996/04/26 19:24:22 christos Exp $ +$ $Id: set17,v 1.2 2003/02/08 20:03:27 christos Exp $ $ sh.proc.c $set 17 1 BUG: wait гйЬ есгбуЯб рпх фсЭчей уфп рбсбукЮнйп!\n @@ -14,3 +14,4 @@ $set 17 11 фщсйнп wd: 12 %S: Эчей Юдз бнбвлзиеЯ\n 13 %S: Эчей Юдз уфбмбфЮуей\n +14 %S: Badly formed number\n diff --git a/contrib/tcsh/nls/italian/set17 b/contrib/tcsh/nls/italian/set17 index 1361ffc96ad8..12f05317f939 100644 --- a/contrib/tcsh/nls/italian/set17 +++ b/contrib/tcsh/nls/italian/set17 @@ -1,4 +1,4 @@ -$ $Id: set17,v 1.1 1998/09/03 22:03:20 christos Exp $ +$ $Id: set17,v 1.2 2003/02/08 20:03:27 christos Exp $ $ sh.proc.c $set 17 1 BACO: sto aspettando un lavoro in background!\n @@ -14,3 +14,4 @@ $set 17 11 directory di lavoro corrente: 12 %S: giа sospeso\n 13 %S: giа fermato\n +14 %S: Badly formed number\n diff --git a/contrib/tcsh/nls/ja/set17 b/contrib/tcsh/nls/ja/set17 index fe1550ebfb95..b0ad507c9d0f 100644 --- a/contrib/tcsh/nls/ja/set17 +++ b/contrib/tcsh/nls/ja/set17 @@ -1,4 +1,4 @@ -$ $Id: set17,v 1.1 1998/09/03 22:04:08 christos Exp $ +$ $Id: set17,v 1.2 2003/02/08 20:03:28 christos Exp $ $ sh.proc.c $set 17 1 ѕгіІ: ҐРҐГҐ°Ґ°ҐйҐ¦ҐуҐЙҐёҐзҐЦ¤тВФ¤Г¤Ж¤¤¤Ю¤№\n @@ -13,3 +13,4 @@ $set 17 10 \040(wd: 12 %S: ¤№¤З¤ЛГжГЗ¤·¤Ж¤¤¤Ю¤№\n 13 %S: ¤№¤З¤ЛДд»Я¤·¤Ж¤¤¤Ю¤№\n +14 %S: Badly formed number\n diff --git a/contrib/tcsh/nls/pl/set17 b/contrib/tcsh/nls/pl/set17 index 65ffc3a83990..74ebbcb2c7fc 100644 --- a/contrib/tcsh/nls/pl/set17 +++ b/contrib/tcsh/nls/pl/set17 @@ -14,3 +14,4 @@ $set 17 11 (KR jest: 12 %S: Juї jest zawieszony\n 13 %S: Juї jest zatrzymany\n +14 %S: Badly formed number\n diff --git a/contrib/tcsh/nls/russian/set17 b/contrib/tcsh/nls/russian/set17 index 3e458ff8e821..162c0e515e53 100644 --- a/contrib/tcsh/nls/russian/set17 +++ b/contrib/tcsh/nls/russian/set17 @@ -1,4 +1,4 @@ -$ $Id: set17,v 1.2 2002/03/08 17:46:50 christos Exp $ +$ $Id: set17,v 1.3 2003/02/08 20:03:28 christos Exp $ $ sh.proc.c $set 17 1 BUG: waiting for background job!\n @@ -14,3 +14,4 @@ $set 17 11 wd now: 12 %S: хЦЕ ПФМПЦЕОП\n 13 %S: хЦЕ ПУФБОПЧМЕОП\n +14 %S: Badly formed number\n diff --git a/contrib/tcsh/nls/russian/set30 b/contrib/tcsh/nls/russian/set30 index 178057349e23..39e02fafc7c5 100644 --- a/contrib/tcsh/nls/russian/set30 +++ b/contrib/tcsh/nls/russian/set30 @@ -1,4 +1,4 @@ -$ $Id: set30,v 1.2 2002/03/08 17:46:50 christos Exp $ +$ $Id: set30,v 1.3 2003/05/26 07:11:07 christos Exp $ $ tw.parse.c $set 30 1 starting_a_command %d\n @@ -13,5 +13,4 @@ $set 30 10 ОЕ ЛБФБМПЗ 11 ОЕ ОБКДЕОП 12 ОЕЮЙФБЕНП -12 ОЕЮЙФБЕНП 13 yY diff --git a/contrib/tcsh/nls/spanish/set17 b/contrib/tcsh/nls/spanish/set17 index e9e7427916b5..ce9621a44265 100644 --- a/contrib/tcsh/nls/spanish/set17 +++ b/contrib/tcsh/nls/spanish/set17 @@ -1,4 +1,4 @@ -$ $Id: set17,v 1.1 1998/04/08 17:59:57 christos Exp $ +$ $Id: set17,v 1.2 2003/02/08 20:03:28 christos Exp $ $ sh.proc.c $set 17 1 BUG: Ўen espera de un trabajo en segundo plano!\n @@ -14,3 +14,4 @@ $set 17 11 dt actual: 12 %S: Ya ha sido suspendido\n 13 %S: Ya ha sido parado\n +14 %S: Badly formed number\n diff --git a/contrib/tcsh/nls/ukrainian/set17 b/contrib/tcsh/nls/ukrainian/set17 index 88852b540a4e..a286b38ab255 100644 --- a/contrib/tcsh/nls/ukrainian/set17 +++ b/contrib/tcsh/nls/ukrainian/set17 @@ -1,4 +1,4 @@ -$ $Id: set17,v 1.2 2002/07/01 20:50:22 christos Exp $ +$ $Id: set17,v 1.3 2003/02/08 20:03:28 christos Exp $ $ sh.proc.c $set 17 1 рпнймлб: ПЮ¦ЛХЧБООС ЖПОПЧП§ ЪБДБЮ¦!\n @@ -14,3 +14,4 @@ $set 17 11 wd ФЕРЕТ: 12 %S: ЧЦЕ Р¦ДЧ¦ЫЕОП\n 13 %S: ЧЦЕ РТЙЪХРЙОЕОП\n +14 %S: Badly formed number\n diff --git a/contrib/tcsh/patchlevel.h b/contrib/tcsh/patchlevel.h index ebca29269f23..b48ecd0ec887 100644 --- a/contrib/tcsh/patchlevel.h +++ b/contrib/tcsh/patchlevel.h @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/patchlevel.h,v 3.135 2002/07/23 16:13:22 christos Exp $ */ +/* $Header: /src/pub/tcsh/patchlevel.h,v 3.139 2004/05/19 17:13:20 kim Exp $ */ /* * patchlevel.h: Our life story. */ @@ -7,8 +7,8 @@ #define ORIGIN "Astron" #define REV 6 -#define VERS 12 +#define VERS 13 #define PATCHLEVEL 00 -#define DATE "2002-07-23" +#define DATE "2004-05-19" #endif /* _h_patchlevel */ diff --git a/contrib/tcsh/sh.c b/contrib/tcsh/sh.c index 7647c1184741..efeb39d1b6c4 100644 --- a/contrib/tcsh/sh.c +++ b/contrib/tcsh/sh.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.c,v 3.105 2002/07/05 16:28:16 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.c,v 3.109 2004/02/21 20:34:24 christos Exp $ */ /* * sh.c: Main shell routines */ @@ -39,7 +39,7 @@ char copyright[] = All rights reserved.\n"; #endif /* not lint */ -RCSID("$Id: sh.c,v 3.105 2002/07/05 16:28:16 christos Exp $") +RCSID("$Id: sh.c,v 3.109 2004/02/21 20:34:24 christos Exp $") #include "tc.h" #include "ed.h" @@ -189,6 +189,8 @@ main(argc, argv) register char *tcp, *ttyn; register int f; register char **tempv; + int osetintr; + signalfun_t oparintr; #ifdef BSDSIGS sigvec_t osv; @@ -211,7 +213,8 @@ main(argc, argv) #ifdef MALLOC_TRACE mal_setstatsfile(fdopen(dup2(open("/tmp/tcsh.trace", - O_WRONLY|O_CREAT, 0666), 25), "w")); + O_WRONLY|O_CREAT|O_LARGEFILE, 0666), 25), + "w")); mal_trace(1); #endif /* MALLOC_TRACE */ @@ -238,13 +241,17 @@ main(argc, argv) */ { do - if ((f = open(_PATH_DEVNULL, O_RDONLY)) == -1 && - (f = open("/", O_RDONLY)) == -1) + if ((f = open(_PATH_DEVNULL, O_RDONLY|O_LARGEFILE)) == -1 && + (f = open("/", O_RDONLY|O_LARGEFILE)) == -1) exit(1); while (f < 3); (void) close(f); } +#ifdef O_TEXT + setmode(0, O_TEXT); +#endif + osinit(); /* Os dependent initialization */ @@ -395,7 +402,7 @@ main(argc, argv) if (loginsh && isatty(SHIN)) { ttyn = (char *) ttyname(SHIN); (void) close(SHIN); - SHIN = open(ttyn, O_RDWR); + SHIN = open(ttyn, O_RDWR|O_LARGEFILE); shpgrp = getpid(); (void) ioctl (SHIN, TIOCSPGRP, (ioctl_t) &shpgrp); (void) setpgid(0, shpgrp); @@ -969,12 +976,15 @@ main(argc, argv) * read commands. */ if (nofile == 0 && argc > 0) { - nofile = open(tempv[0], O_RDONLY); + nofile = open(tempv[0], O_RDONLY|O_LARGEFILE); if (nofile < 0) { child = 1; /* So this ... */ /* ... doesn't return */ stderror(ERR_SYSTEM, tempv[0], strerror(errno)); } +#ifdef O_TEXT + setmode(nofile, O_TEXT); +#endif if (ffile != NULL) xfree((ptr_t) ffile); dolzero = 1; @@ -1252,15 +1262,14 @@ main(argc, argv) * Set an exit here in case of an interrupt or error reading the shell * start-up scripts. */ + osetintr = setintr; + oparintr = parintr; reenter = setexit(); /* PWP */ exitset++; haderr = 0; /* In case second time through */ if (!fast && reenter == 0) { /* Will have varval(STRhome) here because set fast if don't */ { - int osetintr = setintr; - signalfun_t oparintr = parintr; - #ifdef BSDSIGS sigmask_t omask = sigblock(sigmask(SIGINT)); #else @@ -1316,6 +1325,10 @@ main(argc, argv) if (!fast && (loginsh || rdirs)) loaddirs(NULL); } + /* Reset interrupt flag */ + setintr = osetintr; + parintr = oparintr; + /* Initing AFTER .cshrc is the Right Way */ if (intty && !arginp) { /* PWP setup stuff */ ed_Init(); /* init the new line editor */ @@ -1462,8 +1475,11 @@ srcfile(f, onlyown, flag, av) { register int unit; - if ((unit = open(f, O_RDONLY)) == -1) + if ((unit = open(f, O_RDONLY|O_LARGEFILE)) == -1) return 0; +#ifdef O_TEXT + setmode(unit, O_TEXT); +#endif unit = dmove(unit, -1); (void) close_on_exec(unit, 1); @@ -2202,6 +2218,15 @@ dosource(t, c) f = globone(*t++, G_ERROR); (void) strcpy(buf, short2str(f)); xfree((ptr_t) f); + gflag = 0, tglob(t); + if (gflag) { + t = globall(t); + if (t == 0) + stderror(ERR_NAME | ERR_NOMATCH); + } else { + t = saveblk(t); + trim(t); + } if ((!srcfile(buf, 0, hflg, t)) && (!hflg) && (!bequiet)) stderror(ERR_SYSTEM, buf, strerror(errno)); } diff --git a/contrib/tcsh/sh.decls.h b/contrib/tcsh/sh.decls.h index 9c3728d96703..5be81078f038 100644 --- a/contrib/tcsh/sh.decls.h +++ b/contrib/tcsh/sh.decls.h @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.decls.h,v 3.38 2002/05/16 13:51:25 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.decls.h,v 3.39 2004/03/21 16:48:14 christos Exp $ */ /* * sh.decls.h External declarations from sh*.c */ @@ -179,6 +179,7 @@ extern void trim __P((Char **)); extern int sortscmp __P((Char **, Char **)); #endif extern void nlsinit __P((void)); +extern int t_pmatch __P((Char *, Char *, Char **, int)); /* * sh.hist.c diff --git a/contrib/tcsh/sh.dir.c b/contrib/tcsh/sh.dir.c index 4271be2176af..13bac43dc7cb 100644 --- a/contrib/tcsh/sh.dir.c +++ b/contrib/tcsh/sh.dir.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.dir.c,v 3.60 2002/07/08 21:03:04 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.dir.c,v 3.63 2004/05/10 19:12:37 christos Exp $ */ /* * sh.dir.c: Directory manipulation functions */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: sh.dir.c,v 3.60 2002/07/08 21:03:04 christos Exp $") +RCSID("$Id: sh.dir.c,v 3.63 2004/05/10 19:12:37 christos Exp $") /* * C Shell - directory management @@ -264,7 +264,7 @@ printdirs(dflag) } if (user) xprintf("~%S", user); - xprintf("%S%c", s, (dflag & DIR_VERT) ? '\n' : ' '); + xprintf("\045S%c", s, (dflag & DIR_VERT) ? '\n' : ' '); } while ((dp = dp->di_prev) != dcwd); if (!(dflag & DIR_VERT)) xputchar('\n'); @@ -276,7 +276,7 @@ dtildepr(dir) { Char* user; if ((user = getusername(&dir)) != NULL) - xprintf("~%S%S", user, dir); + xprintf("~\045S%S", user, dir); else xprintf("%S", dir); } @@ -529,8 +529,13 @@ dgoto(cp) else dp = cp; -#ifdef WINNT_NATIVE +#if defined(WINNT_NATIVE) cp = SAVE(getcwd(NULL, 0)); +#elif defined(__CYGWIN__) + if (ABSOLUTEP(cp) && cp[1] == ':') /* Only DOS paths are treated that way */ + cp = SAVE(getcwd(NULL, 0)); + else + cp = dcanon(cp, dp); #else /* !WINNT_NATIVE */ cp = dcanon(cp, dp); #endif /* WINNT_NATIVE */ @@ -928,7 +933,7 @@ dcanon(cp, p) #ifdef S_IFLNK /* if we have symlinks */ if (sp != cp && /* symlinks != SYM_IGNORE && */ (cc = readlink(short2str(cp), tlink, - sizeof tlink)) >= 0) { + sizeof(tlink) - 1)) >= 0) { tlink[cc] = '\0'; (void) Strncpy(link, str2short(tlink), sizeof(link) / sizeof(Char)); @@ -1019,7 +1024,7 @@ dcanon(cp, p) #ifdef S_IFLNK /* if we have symlinks */ if (sp != cp && symlinks == SYM_CHASE && (cc = readlink(short2str(cp), tlink, - sizeof tlink)) >= 0) { + sizeof(tlink) - 1)) >= 0) { tlink[cc] = '\0'; (void) Strncpy(link, str2short(tlink), sizeof(link) / sizeof(Char)); diff --git a/contrib/tcsh/sh.dol.c b/contrib/tcsh/sh.dol.c index 91d234035ddd..13b5f00777a7 100644 --- a/contrib/tcsh/sh.dol.c +++ b/contrib/tcsh/sh.dol.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.dol.c,v 3.50 2002/06/25 19:02:11 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.dol.c,v 3.52 2003/03/12 19:14:51 christos Exp $ */ /* * sh.dol.c: Variable substitutions */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: sh.dol.c,v 3.50 2002/06/25 19:02:11 christos Exp $") +RCSID("$Id: sh.dol.c,v 3.52 2003/03/12 19:14:51 christos Exp $") /* * C shell @@ -1037,7 +1037,7 @@ again: #ifndef O_EXCL # define O_EXCL 0 #endif - if (open(tmp, O_RDWR|O_CREAT|O_EXCL|O_TEMPORARY, 0600) == -1) { + if (open(tmp, O_RDWR|O_CREAT|O_EXCL|O_TEMPORARY|O_LARGEFILE, 0600) == -1) { int oerrno = errno; #ifndef WINNT_NATIVE if (errno == EEXIST) { @@ -1066,6 +1066,12 @@ again: #ifdef WINNT_NATIVE __dup_stdin = 1; #endif /* WINNT_NATIVE */ +#ifdef O_TEXT + setmode(1, O_TEXT); +#endif +#ifdef O_BINARY + setmode(0, O_BINARY); +#endif for (;;) { /* * Read up a line diff --git a/contrib/tcsh/sh.exec.c b/contrib/tcsh/sh.exec.c index 655c4d04d698..ec6f89ec0ef3 100644 --- a/contrib/tcsh/sh.exec.c +++ b/contrib/tcsh/sh.exec.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.exec.c,v 3.56 2002/06/25 19:02:11 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.exec.c,v 3.58 2003/03/12 19:14:51 christos Exp $ */ /* * sh.exec.c: Search, find, and execute a command! */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: sh.exec.c,v 3.56 2002/06/25 19:02:11 christos Exp $") +RCSID("$Id: sh.exec.c,v 3.58 2003/03/12 19:14:51 christos Exp $") #include "tc.h" #include "tw.h" @@ -438,8 +438,11 @@ texec(sf, st) * From: casper@fwi.uva.nl (Casper H.S. Dik) If we could not execute * it, don't feed it to the shell if it looks like a binary! */ - if ((fd = open(f, O_RDONLY)) != -1) { + if ((fd = open(f, O_RDONLY|O_LARGEFILE)) != -1) { int nread; +#ifdef O_TEXT + setmode(fd, O_TEXT); +#endif if ((nread = read(fd, (char *) pref, 2)) == 2) { if (!Isprint(pref[0]) && (pref[0] != '\n' && pref[0] != '\t')) { (void) close(fd); @@ -763,10 +766,15 @@ dohash(vv, c) */ { size_t ext = strlen(dp->d_name) - 4; - if ((ext > 0) && (strcmp(&dp->d_name[ext], ".exe") == 0 || - strcmp(&dp->d_name[ext], ".bat") == 0 || - strcmp(&dp->d_name[ext], ".com") == 0)) - dp->d_name[ext] = '\0'; + if ((ext > 0) && (strcasecmp(&dp->d_name[ext], ".exe") == 0 || + strcasecmp(&dp->d_name[ext], ".bat") == 0 || + strcasecmp(&dp->d_name[ext], ".com") == 0)) + { + dp->d_name[ext] = '\0'; +#if defined(__CYGWIN__) + strlwr(dp->d_name); +#endif /* __CYGWIN__ */ + } } #endif /* _UWIN || __CYGWIN__ */ # ifdef FASTHASH diff --git a/contrib/tcsh/sh.file.c b/contrib/tcsh/sh.file.c index 0fda8e1e7f81..16ac4274a72c 100644 --- a/contrib/tcsh/sh.file.c +++ b/contrib/tcsh/sh.file.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.file.c,v 3.22 2002/07/01 20:53:00 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.file.c,v 3.23 2003/02/08 20:03:26 christos Exp $ */ /* * sh.file.c: File completion for csh. This file is not used in tcsh. */ @@ -33,7 +33,7 @@ #include "sh.h" #include "ed.h" -RCSID("$Id: sh.file.c,v 3.22 2002/07/01 20:53:00 christos Exp $") +RCSID("$Id: sh.file.c,v 3.23 2003/02/08 20:03:26 christos Exp $") #if defined(FILEC) && defined(TIOCSTI) @@ -72,7 +72,7 @@ static void beep __P((void)); static void print_recognized_stuff __P((Char *)); static void extract_dir_and_name __P((Char *, Char *, Char *)); static Char *getitem __P((DIR *, int)); -static void free_items __P((Char **)); +static void free_items __P((Char **, size_t)); static int tsearch __P((Char *, COMMAND, int)); static int compare __P((const ptr_t, const ptr_t)); static int recognize __P((Char *, Char *, int, int)); @@ -544,30 +544,29 @@ getitem(dir_fd, looking_for_lognames) } static void -free_items(items) +free_items(items, numitems) Char **items; + size_t numitems; { - int i; + size_t i; - for (i = 0; items[i]; i++) + for (i = 0; i < numitems; i++) xfree((ptr_t) items[i]); xfree((ptr_t) items); } #ifdef BSDSIGS -# define FREE_ITEMS(items) { \ +# define FREE_ITEMS(items, numitems) { \ sigmask_t omask;\ \ omask = sigblock(sigmask(SIGINT));\ - free_items(items);\ - items = NULL;\ + free_items(items, numitems);\ (void) sigsetmask(omask);\ } #else -# define FREE_ITEMS(items) { \ +# define FREE_ITEMS(items, numitems) { \ (void) sighold(SIGINT);\ - free_items(items);\ - items = NULL;\ + free_items(items, numitems);\ (void) sigrelse(SIGINT);\ } #endif /* BSDSIGS */ @@ -581,18 +580,14 @@ tsearch(word, command, max_word_length) int max_word_length; COMMAND command; { - static Char **items = NULL; DIR *dir_fd; int numitems = 0, ignoring = TRUE, nignored = 0; int name_length, looking_for_lognames; Char tilded_dir[MAXPATHLEN + 1], dir[MAXPATHLEN + 1]; Char name[MAXNAMLEN + 1], extended_name[MAXNAMLEN + 1]; Char *item; - -#define MAXITEMS 1024 - - if (items != NULL) - FREE_ITEMS(items); + Char **items = NULL; + size_t maxitems = 0; looking_for_lognames = (*word == '~') && (Strchr(word, '/') == NULL); if (looking_for_lognames) { @@ -622,25 +617,14 @@ again: /* search for matches */ !looking_for_lognames) continue; if (command == LIST) { - if (numitems >= MAXITEMS) { - xprintf(CGETS(14, 1, "\nYikes!! Too many %s!!\n"), - looking_for_lognames ? - CGETS(14, 2, "names in password file") : - CGETS(14, 3, "files")); - break; + if (numitems >= maxitems) { + maxitems += 1024; + if (items == NULL) + items = (Char **) xmalloc(sizeof(*items) * maxitems); + else + items = (Char **) xrealloc((ptr_t) items, + sizeof(*items) * maxitems); } - /* - * From Beto Appleton (beto@aixwiz.austin.ibm.com) - * typing "./control-d" will cause the csh to core-dump. - * the problem can be reproduce as following: - * 1. set ignoreeof - * 2. set filec - * 3. create a directory with 1050 files - * 4. typing "./control-d" will cause the csh to core-dump - * Solution: Add + 1 to MAXITEMS - */ - if (items == NULL) - items = (Char **) xcalloc(sizeof(items[0]), MAXITEMS + 1); items[numitems] = (Char *) xmalloc((size_t) (Strlen(item) + 1) * sizeof(Char)); copyn(items[numitems], item, MAXNAMLEN); @@ -690,7 +674,7 @@ again: /* search for matches */ print_by_column(looking_for_lognames ? NULL : tilded_dir, items, numitems); if (items != NULL) - FREE_ITEMS(items); + FREE_ITEMS(items, numitems); } return (0); } diff --git a/contrib/tcsh/sh.func.c b/contrib/tcsh/sh.func.c index bd253e73bdef..f064ec8ea8b0 100644 --- a/contrib/tcsh/sh.func.c +++ b/contrib/tcsh/sh.func.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.func.c,v 3.103 2002/07/09 12:56:55 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.func.c,v 3.111 2004/05/13 15:23:39 christos Exp $ */ /* * sh.func.c: csh builtin functions */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: sh.func.c,v 3.103 2002/07/09 12:56:55 christos Exp $") +RCSID("$Id: sh.func.c,v 3.111 2004/05/13 15:23:39 christos Exp $") #include "ed.h" #include "tw.h" @@ -63,6 +63,7 @@ static int getword __P((Char *)); static void toend __P((void)); static void xecho __P((int, Char **)); static bool islocale_var __P((Char *)); +static void wpfree __P((struct whyle *)); struct biltins * isbfunc(t) @@ -342,15 +343,18 @@ dologin(v, c) Char **v; struct command *c; { - USE(c); #ifdef WINNT_NATIVE + USE(c); USE(v); #else /* !WINNT_NATIVE */ + char **p = short2blk(v); + USE(c); islogin(); rechist(NULL, adrof(STRsavehist) != NULL); (void) signal(SIGTERM, parterm); - (void) execl(_PATH_BIN_LOGIN, "login", short2str(v[1]), NULL); - (void) execl(_PATH_USRBIN_LOGIN, "login", short2str(v[1]), NULL); + (void) execv(_PATH_BIN_LOGIN, p); + (void) execv(_PATH_USRBIN_LOGIN, p); + blkfree((Char **) p); untty(); xexit(1); #endif /* !WINNT_NATIVE */ @@ -829,6 +833,8 @@ search(type, level, goal) Char wordbuf[BUFSIZE]; register Char *aword = wordbuf; register Char *cp; + struct whyle *wp; + int wlevel = 0; Stype = (Char) type; Sgoal = goal; @@ -866,13 +872,24 @@ search(type, level, goal) case TC_FOREACH: case TC_WHILE: + wlevel++; if (type == TC_BREAK) level++; break; case TC_END: + if (type == TC_BRKSW) { + if (wlevel == 0) { + wp = whyles; + if (wp) { + whyles = wp->w_next; + wpfree(wp); + } + } + } if (type == TC_BREAK) level--; + wlevel--; break; case TC_SWITCH: @@ -1029,6 +1046,17 @@ toend() wfree(); } +static void +wpfree(wp) + struct whyle *wp; +{ + if (wp->w_fe0) + blkfree(wp->w_fe0); + if (wp->w_fename) + xfree((ptr_t) wp->w_fename); + xfree((ptr_t) wp); +} + void wfree() { @@ -1078,11 +1106,7 @@ wfree() } } - if (wp->w_fe0) - blkfree(wp->w_fe0); - if (wp->w_fename) - xfree((ptr_t) wp->w_fename); - xfree((ptr_t) wp); + wpfree(wp); } } @@ -1245,8 +1269,8 @@ islocale_var(var) Char *var; { static Char *locale_vars[] = { - STRLANG, STRLC_CTYPE, STRLC_NUMERIC, STRLC_TIME, - STRLC_COLLATE, STRLC_MESSAGES, STRLC_MONETARY, 0 + STRLANG, STRLC_ALL, STRLC_CTYPE, STRLC_NUMERIC, + STRLC_TIME, STRLC_COLLATE, STRLC_MESSAGES, STRLC_MONETARY, 0 }; register Char **v; @@ -1312,15 +1336,11 @@ dosetenv(v, c) vp = *v++; lp = vp; - if (!letter(*lp)) - stderror(ERR_NAME | ERR_VARBEGIN); - - for (; alnum(*lp); lp++) - continue; - - if (*lp != '\0') - stderror(ERR_NAME | ERR_SYNTAX); + for (; *lp != '\0' ; lp++) { + if (*lp == '=') + stderror(ERR_NAME | ERR_SYNTAX); + } if ((lp = *v++) == 0) lp = STRNULL; @@ -1732,7 +1752,7 @@ doumask(v, c) # define toset(a) ((a) + 1) # endif /* aiws */ # else /* BSDLIMIT */ -# if (defined(BSD4_4) || defined(__linux__)) && !defined(__386BSD__) +# if (defined(BSD4_4) || defined(__linux__) || (HPUXVERSION >= 1100)) && !defined(__386BSD__) typedef rlim_t RLIM_TYPE; # else # if defined(SOLARIS2) || (defined(sgi) && SYSVREL > 3) @@ -1747,7 +1767,7 @@ doumask(v, c) # endif /* BSD4_4 && !__386BSD__ */ # endif /* BSDLIMIT */ -# if (HPUXVERSION > 700) && defined(BSDLIMIT) +# if (HPUXVERSION > 700) && (HPUXVERSION < 1100) && defined(BSDLIMIT) /* Yes hpux8.0 has limits but does not make them public */ /* Yes, we could have defined _KERNEL, and -I/etc/conf/h, but is that better? */ # ifndef RLIMIT_CPU @@ -1768,7 +1788,7 @@ doumask(v, c) # ifndef SIGRTMIN # define FILESIZE512 # endif /* SIGRTMIN */ -# endif /* (HPUXVERSION > 700) && BSDLIMIT */ +# endif /* (HPUXVERSION > 700) && (HPUXVERSION < 1100) && BSDLIMIT */ # if SYSVREL > 3 && defined(BSDLIMIT) && !defined(_SX) /* In order to use rusage, we included "/usr/ucbinclude/sys/resource.h" in */ @@ -2064,7 +2084,7 @@ plim(lp, hard) RLIM_TYPE limit; int div = lp->limdiv; - xprintf("%s \t", lp->limname); + xprintf("%-13.13s", lp->limname); # ifndef BSDLIMIT limit = ulimit(lp->limconst, 0); @@ -2224,6 +2244,8 @@ dosuspend(v, c) if (tpgrp != -1) { retry: ctpgrp = tcgetpgrp(FSHTTY); + if (ctpgrp == -1) + stderror(ERR_SYSTEM, "tcgetpgrp", strerror(errno)); if (ctpgrp != opgrp) { old = signal(SIGTTIN, SIG_DFL); (void) kill(0, SIGTTIN); diff --git a/contrib/tcsh/sh.glob.c b/contrib/tcsh/sh.glob.c index 6a50a8d188d2..d5334e7a208a 100644 --- a/contrib/tcsh/sh.glob.c +++ b/contrib/tcsh/sh.glob.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.glob.c,v 3.54 2002/07/04 19:28:29 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.glob.c,v 3.55 2004/03/21 16:48:14 christos Exp $ */ /* * sh.glob.c: Regular expression expansion */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: sh.glob.c,v 3.54 2002/07/04 19:28:29 christos Exp $") +RCSID("$Id: sh.glob.c,v 3.55 2004/03/21 16:48:14 christos Exp $") #include "tc.h" #include "tw.h" @@ -79,7 +79,6 @@ static Char **libglob __P((Char **)); static Char **globexpand __P((Char **)); static int globbrace __P((Char *, Char *, Char ***)); static void expbrace __P((Char ***, Char ***, int)); -static int pmatch __P((Char *, Char *, Char **)); static void pword __P((int)); static void psave __P((int)); static void backeval __P((Char *, bool)); @@ -988,12 +987,12 @@ Gnmatch(string, pattern, endstr) if (endstr == NULL) /* Exact matches only */ for (p = blk; *p; p++) - gres |= pmatch(string, *p, &tstring) == 2 ? 1 : 0; + gres |= t_pmatch(string, *p, &tstring, 0) == 2 ? 1 : 0; else { /* partial matches */ int minc = 0x7fffffff; for (p = blk; *p; p++) - if (pmatch(string, *p, &tstring) != 0) { + if (t_pmatch(string, *p, &tstring, 0) != 0) { int t = (int) (tstring - string); gres |= 1; if (minc == -1 || minc > t) @@ -1006,17 +1005,18 @@ Gnmatch(string, pattern, endstr) return(gres == gpol); } -/* pmatch(): +/* t_pmatch(): * Return 2 on exact match, * Return 1 on substring match. * Return 0 on no match. * *estr will point to the end of the longest exact or substring match. */ -static int -pmatch(string, pattern, estr) - register Char *string, *pattern, **estr; +int +t_pmatch(string, pattern, estr, cs) + Char *string, *pattern, **estr; + int cs; { - register Char stringc, patternc; + Char stringc, patternc; int match, negate_range; Char rangec, *oestr, *pestr; @@ -1045,7 +1045,7 @@ pmatch(string, pattern, estr) pestr = NULL; do { - switch(pmatch(string, pattern, estr)) { + switch(t_pmatch(string, pattern, estr, cs)) { case 0: break; case 1: @@ -1079,8 +1079,8 @@ pmatch(string, pattern, estr) if (match) continue; if (rangec == '-' && *(pattern-2) != '[' && *pattern != ']') { - match = (globcharcoll(stringc, *pattern & TRIM) <= 0 && - globcharcoll(*(pattern-2) & TRIM, stringc) <= 0); + match = (globcharcoll(stringc, *pattern & TRIM, cs) <= 0 && + globcharcoll(*(pattern-2) & TRIM, stringc, cs) <= 0); pattern++; } else diff --git a/contrib/tcsh/sh.h b/contrib/tcsh/sh.h index e8342b80873f..12e4936d4bf3 100644 --- a/contrib/tcsh/sh.h +++ b/contrib/tcsh/sh.h @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.h,v 3.108 2002/07/23 16:13:22 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.h,v 3.114 2004/02/21 20:34:25 christos Exp $ */ /* * sh.h: Catch it all globals and includes file! */ @@ -109,9 +109,13 @@ typedef int sigret_t; /* * Return true if the path is absolute */ -#if defined(WINNT_NATIVE) || defined(__CYGWIN__) +#if defined(WINNT_NATIVE) # define ABSOLUTEP(p) ((p)[0] == '/' || \ (Isalpha((p)[0]) && (p)[1] == ':')) +#elif defined(__CYGWIN__) +# define ABSOLUTEP(p) ((p)[0] == '/' || \ + (Isalpha((p)[0]) && (p)[1] == ':' && \ + ((p)[2] == '\0' || (p)[2] == '/'))) #else /* !WINNT_NATIVE && !__CYGWIN__ */ # define ABSOLUTEP(p) (*(p) == '/') #endif /* WINNT_NATIVE || __CYGWIN__ */ @@ -335,6 +339,9 @@ typedef int sigret_t; #if !defined(O_RDONLY) || !defined(O_NDELAY) # include #endif +#ifndef O_LARGEFILE +# define O_LARGEFILE 0 +#endif #include @@ -420,7 +427,7 @@ typedef int sigret_t; # define __P(a) a # else # define __P(a) () -# if !__STDC__ +# if !defined(__STDC__) # define const # ifndef apollo # define volatile /* Apollo 'c' extensions need this */ @@ -611,10 +618,6 @@ EXTERN int onelflg IZERO; /* 2 -> need line for -t, 1 -> exit on read */ extern Char *ffile; /* Name of shell file for $0 */ extern bool dolzero; /* if $?0 should return true... */ -#if defined(FILEC) && defined(TIOCSTI) -extern bool filec; -#endif /* FILEC && TIOCSTI */ - extern char *seterr; /* Error message from scanner/parser */ #if !defined(BSD4_4) && !defined(__linux__) extern int errno; /* Error from C library routines */ @@ -1030,6 +1033,10 @@ EXTERN int gflag; /* After tglob -> is globbing needed? */ #define MAXVARLEN 30 /* Maximum number of char in a variable name */ +#ifdef __CYGWIN__ +# undef MAXPATHLEN +#endif /* __CYGWIN__ */ + #ifndef MAXPATHLEN # define MAXPATHLEN 2048 #endif /* MAXPATHLEN */ @@ -1116,6 +1123,7 @@ EXTERN Char PRCHROOT; /* Prompt symbol for root */ #define Strlen(a) strlen(a) #define Strcmp(a, b) strcmp(a, b) #define Strncmp(a, b, c) strncmp(a, b, c) +#define Strcasecmp(a, b) strcasecmp(a, b) #define Strspl(a, b) strspl(a, b) #define Strsave(a) strsave(a) @@ -1136,6 +1144,7 @@ EXTERN Char PRCHROOT; /* Prompt symbol for root */ #define Strlen(a) s_strlen(a) #define Strcmp(a, b) s_strcmp(a, b) #define Strncmp(a, b, c) s_strncmp(a, b, c) +#define Strcasecmp(a, b) s_strcasecmp(a, b) #define Strspl(a, b) s_strspl(a, b) #define Strsave(a) s_strsave(a) @@ -1247,6 +1256,10 @@ EXTERN nl_catd catd; # define CSAVS(b, c, d) strsave(CGETS(b, c, d)) #endif /* WINNT_NATIVE */ +#if defined(FILEC) +extern bool filec; +#endif /* FILEC */ + /* * Since on some machines characters are unsigned, and the signed * keyword is not universally implemented, we treat all characters diff --git a/contrib/tcsh/sh.init.c b/contrib/tcsh/sh.init.c index 7eea58dc05cc..f8e57efccb97 100644 --- a/contrib/tcsh/sh.init.c +++ b/contrib/tcsh/sh.init.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.init.c,v 3.49 2002/03/08 17:36:46 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.init.c,v 3.51 2004/02/21 20:34:25 christos Exp $ */ /* * sh.init.c: Function and signal tables */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: sh.init.c,v 3.49 2002/03/08 17:36:46 christos Exp $") +RCSID("$Id: sh.init.c,v 3.51 2004/02/21 20:34:25 christos Exp $") #include "ed.h" #include "tw.h" @@ -61,6 +61,9 @@ struct biltins bfunc[] = { { "bindkey", dobindkey, 0, 8 }, { "break", dobreak, 0, 0 }, { "breaksw", doswbrk, 0, 0 }, +#ifdef _OSD_POSIX + { "bs2cmd", dobs2cmd, 1, INF }, +#endif /* OBSOLETE */ { "builtins", dobuiltins, 0, 0 }, #ifdef KAI { "bye", goodbye, 0, 0 }, @@ -118,7 +121,7 @@ struct biltins bfunc[] = { { "migrate", domigrate, 1, INF }, #endif /* TCF */ #ifdef NEWGRP - { "newgrp", donewgrp, 1, 2 }, + { "newgrp", donewgrp, 0, 2 }, #endif /* NEWGRP */ { "nice", donice, 0, INF }, { "nohup", donohup, 0, INF }, diff --git a/contrib/tcsh/sh.lex.c b/contrib/tcsh/sh.lex.c index 69992793d921..e6c7e2df7d08 100644 --- a/contrib/tcsh/sh.lex.c +++ b/contrib/tcsh/sh.lex.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.lex.c,v 3.56 2002/07/08 20:57:32 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.lex.c,v 3.57 2003/08/04 16:19:13 christos Exp $ */ /* * sh.lex.c: Lexical analysis into tokens */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: sh.lex.c,v 3.56 2002/07/08 20:57:32 christos Exp $") +RCSID("$Id: sh.lex.c,v 3.57 2003/08/04 16:19:13 christos Exp $") #include "ed.h" /* #define DEBUG_INP */ @@ -1476,8 +1476,7 @@ readc(wanteof) { int c; static int sincereal; /* Number of real EOFs we've seen */ - Char *ptr; /* For STRignoreeof */ - int numeof = 0; /* Value of STRignoreeof */ + extern int numeof; #ifdef DEBUG_INP xprintf("readc\n"); @@ -1487,20 +1486,6 @@ readc(wanteof) return (c); } - /* Compute the value of EOFs */ - if ((ptr = varval(STRignoreeof)) != STRNULL) { - while (*ptr) { - if (!Isdigit(*ptr)) { - numeof = 0; - break; - } - numeof = numeof * 10 + *ptr++ - '0'; - } - if (numeof != 0) - numeof++; - } - if (numeof < 0) numeof = 26; /* Sanity check */ - top: aret = TCSH_F_SEEK; if (alvecp) { diff --git a/contrib/tcsh/sh.misc.c b/contrib/tcsh/sh.misc.c index eeb2a2684104..8b1cc51cead8 100644 --- a/contrib/tcsh/sh.misc.c +++ b/contrib/tcsh/sh.misc.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.misc.c,v 3.24 2002/03/08 17:36:46 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.misc.c,v 3.26 2003/03/12 19:14:51 christos Exp $ */ /* * sh.misc.c: Miscelaneous functions */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: sh.misc.c,v 3.24 2002/03/08 17:36:46 christos Exp $") +RCSID("$Id: sh.misc.c,v 3.26 2003/03/12 19:14:51 christos Exp $") static int renum __P((int, int)); static Char **blkend __P((Char **)); @@ -258,6 +258,11 @@ closem() { register int f; +#ifdef NLS_BUGS +#ifdef NLS_CATALOGS + (void)catclose(catd); +#endif /* NLS_CATALOGS */ +#endif /* NLS_BUGS */ #ifdef YPBUGS /* suggested by Justin Bur; thanks to Karl Kleinpaste */ fix_yp_bugs(); @@ -273,9 +278,14 @@ closem() (void) close(f); #ifdef NISPLUS if(f < 3) - (void) open(_PATH_DEVNULL, O_RDONLY); + (void) open(_PATH_DEVNULL, O_RDONLY|O_LARGEFILE); #endif /* NISPLUS */ } +#ifdef NLS_BUGS +#ifdef NLS_CATALOGS + nlsinit(); +#endif /* NLS_CATALOGS */ +#endif /* NLS_BUGS */ } #ifndef CLOSE_ON_EXEC @@ -315,7 +325,7 @@ donefds() didfds = 0; #ifdef NISPLUS { - int fd = open(_PATH_DEVNULL, O_RDONLY); + int fd = open(_PATH_DEVNULL, O_RDONLY|O_LARGEFILE); (void) dup2(fd, 1); (void) dup2(fd, 2); if (fd != 0) { diff --git a/contrib/tcsh/sh.proc.c b/contrib/tcsh/sh.proc.c index 7d42f5c2b0da..b91a6dc7e4e6 100644 --- a/contrib/tcsh/sh.proc.c +++ b/contrib/tcsh/sh.proc.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.proc.c,v 3.76 2002/03/08 17:36:46 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.proc.c,v 3.81 2003/11/09 03:02:46 christos Exp $ */ /* * sh.proc.c: Job manipulations */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: sh.proc.c,v 3.76 2002/03/08 17:36:46 christos Exp $") +RCSID("$Id: sh.proc.c,v 3.81 2003/11/09 03:02:46 christos Exp $") #include "ed.h" #include "tc.h" @@ -603,7 +603,7 @@ pjwait(pp) if ((jobflags & PRUNNING) == 0) break; #ifdef JOBDEBUG - xprintf("%d starting to sigpause for SIGCHLD on %d\n", + xprintf("%d starting to sigpause for SIGCHLD on %d\n", getpid(), fp->p_procid); #endif /* JOBDEBUG */ #ifdef BSDSIGS @@ -1566,8 +1566,9 @@ dokill(v, c) } } if (Isdigit(*sigptr)) { - signum = atoi(short2str(sigptr)); - if (signum < 0 || signum > (MAXSIG-1)) + char *ep; + signum = strtoul(short2str(sigptr), &ep, 0); + if (*ep || signum < 0 || signum > (MAXSIG-1)) stderror(ERR_NAME | ERR_BADSIG); } else { @@ -1677,12 +1678,15 @@ pkill(v, signum) else if (!(Isdigit(*cp) || *cp == '-')) stderror(ERR_NAME | ERR_JOBARGS); else { + char *ep; #ifndef WINNT_NATIVE - pid = atoi(short2str(cp)); + pid = strtol(short2str(cp), &ep, 10); #else - pid = strtoul(short2str(cp),NULL,0); + pid = strtoul(short2str(cp), &ep, 0); #endif /* WINNT_NATIVE */ - if (kill(pid, signum) < 0) { + if (*ep) + stderror(ERR_NAME | ERR_JOBARGS); + else if (kill(pid, signum) < 0) { xprintf("%d: %s\n", pid, strerror(errno)); err1++; goto cont; diff --git a/contrib/tcsh/sh.sem.c b/contrib/tcsh/sh.sem.c index cebba05b7aba..a7839af5a768 100644 --- a/contrib/tcsh/sh.sem.c +++ b/contrib/tcsh/sh.sem.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.sem.c,v 3.56 2002/03/08 17:36:46 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.sem.c,v 3.60 2004/02/23 15:04:36 christos Exp $ */ /* * sh.sem.c: I/O redirections and job forking. A touchy issue! * Most stuff with builtins is incorrect @@ -33,7 +33,7 @@ */ #include "sh.h" -RCSID("$Id: sh.sem.c,v 3.56 2002/03/08 17:36:46 christos Exp $") +RCSID("$Id: sh.sem.c,v 3.60 2004/02/23 15:04:36 christos Exp $") #include "tc.h" #include "tw.h" @@ -859,12 +859,12 @@ doio(t, pipein, pipeout) (void) strncpy(tmp, short2str(cp), MAXPATHLEN); tmp[MAXPATHLEN] = '\0'; xfree((ptr_t) cp); - if ((fd = open(tmp, O_RDONLY)) < 0) + if ((fd = open(tmp, O_RDONLY|O_LARGEFILE)) < 0) stderror(ERR_SYSTEM, tmp, strerror(errno)); -#ifdef O_LARGEFILE /* allow input files larger than 2Gb */ +#ifndef WINNT_NATIVE (void) fcntl(fd, O_LARGEFILE, 0); -#endif /* O_LARGEFILE */ +#endif /*!WINNT_NATIVE*/ (void) dmove(fd, 0); } else if (flags & F_PIPEIN) { @@ -875,7 +875,7 @@ doio(t, pipein, pipeout) } else if ((flags & F_NOINTERRUPT) && tpgrp == -1) { (void) close(0); - (void) open(_PATH_DEVNULL, O_RDONLY); + (void) open(_PATH_DEVNULL, O_RDONLY|O_LARGEFILE); } else { (void) close(0); @@ -905,9 +905,9 @@ doio(t, pipein, pipeout) (void) dcopy(SHDIAG, 2); if ((flags & F_APPEND) != 0) { #ifdef O_APPEND - fd = open(tmp, O_WRONLY | O_APPEND); + fd = open(tmp, O_WRONLY|O_APPEND|O_LARGEFILE); #else /* !O_APPEND */ - fd = open(tmp, O_WRONLY); + fd = open(tmp, O_WRONLY|O_LARGEFILE); (void) lseek(fd, (off_t) 0, L_XTND); #endif /* O_APPEND */ } @@ -921,10 +921,10 @@ doio(t, pipein, pipeout) } if ((fd = creat(tmp, 0666)) < 0) stderror(ERR_SYSTEM, tmp, strerror(errno)); -#ifdef O_LARGEFILE /* allow input files larger than 2Gb */ +#ifndef WINNT_NATIVE (void) fcntl(fd, O_LARGEFILE, 0); -#endif /* O_LARGEFILE */ +#endif /*!WINNT_NATIVE*/ } (void) dmove(fd, 1); is1atty = isatty(1); diff --git a/contrib/tcsh/sh.set.c b/contrib/tcsh/sh.set.c index 531da301fed0..afb92f43b8ed 100644 --- a/contrib/tcsh/sh.set.c +++ b/contrib/tcsh/sh.set.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.set.c,v 3.44 2002/07/01 20:50:22 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.set.c,v 3.48 2004/03/21 16:48:14 christos Exp $ */ /* * sh.set.c: Setting and Clearing of variables */ @@ -32,13 +32,14 @@ */ #include "sh.h" -RCSID("$Id: sh.set.c,v 3.44 2002/07/01 20:50:22 christos Exp $") +RCSID("$Id: sh.set.c,v 3.48 2004/03/21 16:48:14 christos Exp $") #include "ed.h" #include "tw.h" extern Char HistLit; extern bool GotTermCaps; +int numeof = 0; static void update_vars __P((Char *)); static Char *getinx __P((Char *, int *)); @@ -122,7 +123,7 @@ update_vars(vp) ed_Init(); /* reset the editor */ } else if (eq(vp, STRhome)) { - register Char *cp; + Char *cp; cp = Strsave(varval(vp)); /* get the old value back */ @@ -147,6 +148,18 @@ update_vars(vp) else if (eq(vp, STRshlvl)) { tsetenv(STRKSHLVL, varval(vp)); } + else if (eq(vp, STRignoreeof)) { + Char *cp; + numeof = 0; + for ((cp = varval(STRignoreeof)); cp && *cp; cp++) { + if (!Isdigit(*cp)) { + numeof = 0; + break; + } + numeof = numeof * 10 + *cp - '0'; + } + if (numeof <= 0) numeof = 26; /* Sanity check */ + } else if (eq(vp, STRbackslash_quote)) { bslash_quote = 1; } @@ -732,6 +745,8 @@ unset(v, c) HIST = '!'; HISTSUB = '^'; } + if (adrof(STRignoreeof) == 0) + numeof = 0; if (adrof(STRpromptchars) == 0) { PRCH = '>'; PRCHROOT = '#'; @@ -1230,9 +1245,13 @@ autoset_dspmbyte(pcp) { STRLANGEUCJPB, STRKEUC }, { STRLANGEUCKRB, STRKEUC }, { STRLANGEUCZHB, STRKEUC }, +#ifdef linux + { STRLANGEUCJPC, STRKEUC }, +#endif { STRLANGSJIS, STRKSJIS }, { STRLANGSJISB, STRKSJIS }, { STRLANGBIG5, STRKBIG5 }, + { STRSTARKUTF8, STRKUTF8 }, { NULL, NULL } }; @@ -1240,7 +1259,8 @@ autoset_dspmbyte(pcp) return; for (i = 0; dspmt[i].n; i++) { - if (eq(pcp, dspmt[i].n)) { + Char *estr; + if (t_pmatch(pcp, dspmt[i].n, &estr, 1) > 0) { set(CHECK_MBYTEVAR, Strsave(dspmt[i].v), VAR_READWRITE); update_dspmbyte_vars(); break; diff --git a/contrib/tcsh/sh.types.h b/contrib/tcsh/sh.types.h index 981c89a8943b..c08ebed9abb2 100644 --- a/contrib/tcsh/sh.types.h +++ b/contrib/tcsh/sh.types.h @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/sh.types.h,v 3.39 2002/03/08 17:36:47 christos Exp $ */ +/* $Header: /src/pub/tcsh/sh.types.h,v 3.40 2003/06/18 19:32:44 christos Exp $ */ /* sh.types.h: Do the necessary typedefs for each system. * Up till now I avoided making this into a separate file * But I just wanted to eliminate the whole mess from sh.h @@ -142,6 +142,7 @@ # define _SPEED_T # endif /* _SPEED_T */ +# if HPUXVERSION < 1100 /* XXX: Not true for 11.0 */ extern uid_t getuid(), geteuid(); extern gid_t getgid(), getegid(); extern sigmask_t sigblock(); @@ -155,6 +156,7 @@ extern void qsort(); extern void free(); extern unsigned int alarm(); extern unsigned int sleep(); +# endif /* HPUXVERSION < 1100 */ # if HPUXVERSION < 800 /* XXX: Not true for 8.0 */ extern void sigpause(); extern sigmask_t sigspace(); diff --git a/contrib/tcsh/tc.const.c b/contrib/tcsh/tc.const.c index 0fdcec0bb889..e8e742bea028 100644 --- a/contrib/tcsh/tc.const.c +++ b/contrib/tcsh/tc.const.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/tc.const.c,v 3.67 2002/07/06 22:21:07 christos Exp $ */ +/* $Header: /src/pub/tcsh/tc.const.c,v 3.74 2004/03/21 16:48:15 christos Exp $ */ /* * sh.const.c: String constants for tcsh. */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: tc.const.c,v 3.67 2002/07/06 22:21:07 christos Exp $") +RCSID("$Id: tc.const.c,v 3.74 2004/03/21 16:48:15 christos Exp $") Char STRlogout[] = { 'l', 'o', 'g', 'o', 'u', 't', '\0' }; Char STRautologout[] = { 'a', 'u', 't', 'o', 'l', 'o', 'g', 'o', 'u', 't', @@ -119,30 +119,31 @@ Char STRNLSPATH[] = { 'N', 'L', 'S', 'P', 'A', 'T', 'H', '\0' }; Char STRnokanji[] = { 'n', 'o', 'k', 'a', 'n', 'j', 'i', '\0' }; # ifdef DSPMBYTE Char STRdspmbyte[] = { 'd', 's', 'p', 'm', 'b', 'y', 't', 'e', '\0' }; +# ifdef BSDCOLORLS +Char STRmmliteral[] = { '-', 'G', '\0' }; +# else Char STRmmliteral[] = { '-', '-', 'l', 'i', 't', 'e', 'r', 'a', 'l', '\0' }; +# endif Char STRKEUC[] = { 'e', 'u', 'c', '\0' }; Char STRKSJIS[] = { 's', 'j', 'i', 's', '\0' }; Char STRKBIG5[] = { 'b', 'i', 'g', '5', '\0' }; Char STRKUTF8[] = { 'u', 't', 'f', '8', '\0' }; +Char STRSTARKUTF8[] = { '*', 'u', 't', 'f', '8', '\0' }; # ifdef MBYTEDEBUG /* Sorry, use for beta testing */ Char STRmbytemap[] = { 'm', 'b', 'y', 't', 'e', 'm', 'a', 'p', '\0' }; # endif /* MBYTEMAP */ /* PATCH IDEA FROM Issei.Suzuki VERY THANKS */ /* dspmbyte autoset trap */ -/* STRLANGEUCJP,STRLANGEUCJPB = EUCJP Trap */ +/* STRLANGEUCJP,STRLANGEUCJPB(,STRLANGEUCJPC) = EUCJP Trap */ /* STRLANGEUCKR,STRLANGEUCKRB = EUCKR Trap */ /* STRLANGEUCZH,STRLANGEUCZHB = EUCZH Trap */ /* STRLANGSJIS,STRLANGSJISB = SJIS Trap */ -# if defined(__uxps__) || defined(sgi) || defined(aix) || defined(__CYGWIN__) || defined(linux) +# if defined(__uxps__) || defined(sgi) || defined(aix) || defined(__CYGWIN__) Char STRLANGEUCJP[] = { 'j', 'a', '_', 'J', 'P', '.', 'E', 'U', 'C', '\0' }; Char STRLANGEUCKR[] = { 'k', 'o', '_', 'K', 'R', '.', 'E', 'U', 'C', '\0' }; # if defined(__uxps__) Char STRLANGEUCJPB[] = { 'j', 'a', 'p', 'a', 'n', '\0' }; Char STRLANGEUCKRB[] = { 'k', 'o', 'r', 'e', 'a', '\0' }; -# elif defined(linux) -Char STRLANGEUCJPB[] = { 'j', 'a', '_', 'J', 'P', '.', 'u', 'j', 'i', 's', - '\0' }; -Char STRLANGEUCKRB[] = { 'k', 'o', '_', 'K', 'R', '.', 'e', 'u', 'c', '\0' }; # elif defined(aix) Char STRLANGEUCJPB[] = { 'j', 'a', '_', 'J', 'P', '\0' }; Char STRLANGEUCKRB[] = { 'k', 'o', '_', 'K', 'R', '\0' }; @@ -157,7 +158,23 @@ Char STRLANGBIG5[] = { 'z', 'h', '_', 'T', 'W', '.', 'B', 'i', 'g', '5', '\0' }; Char STRLANGEUCZH[] = { '\0' }; Char STRLANGEUCZHB[] = { '\0' }; -# elif defined(__FreeBSD__) +# elif defined(linux) +Char STRLANGEUCJP[] = { 'j', 'a', '_', 'J', 'P', '.', 'E', 'U', 'C', '-', + 'J', 'P', '\0' }; +Char STRLANGEUCKR[] = { 'k', 'o', '_', 'K', 'R', '.', 'E', 'U', 'C', '\0' }; +Char STRLANGEUCJPB[] = { 'j', 'a', '_', 'J', 'P', '.', 'e', 'u', 'c', 'J', + 'P', '\0' }; +Char STRLANGEUCKRB[] = { 'k', 'o', '_', 'K', 'R', '.', 'e', 'u', 'c', '\0' }; +Char STRLANGEUCJPC[] = { 'j', 'a', '_', 'J', 'P', '.', 'u', 'j', 'i', 's', + '\0' }; +Char STRLANGSJIS[] = { 'j', 'a', '_', 'J', 'P', '.', 'S', 'J', 'I', 'S', + '\0' }; +Char STRLANGSJISB[] = { '\0' }; +Char STRLANGBIG5[] = { 'z', 'h', '_', 'T', 'W', '.', 'B', 'i', 'g', '5', + '\0' }; +Char STRLANGEUCZH[] = { '\0' }; +Char STRLANGEUCZHB[] = { '\0' }; +# elif (defined(__FreeBSD__) || defined(__NetBSD__)) Char STRLANGEUCJP[] = { 'j', 'a', '_', 'J', 'P', '.', 'e', 'u', 'c', 'J', 'P', '\0' }; Char STRLANGEUCJPB[] = { 'j', 'a', '_', 'J', 'P', '.', 'E', 'U', 'C', '\0' }; @@ -361,6 +378,7 @@ Char STRerase[] = { 'e', 'r', 'a', 's', 'e', '\0' }; Char STRprev[] = { 'p', 'r', 'e', 'v', '\0' }; Char STRcomplete[] = { 'c', 'o', 'm', 'p', 'l', 'e', 't', 'e', '\0' }; Char STRenhance[] = { 'e', 'n', 'h', 'a', 'n', 'c', 'e', '\0' }; +Char STRigncase[] = { 'i', 'g', 'n', 'c', 'a', 's', 'e', '\0' }; Char STRautoexpand[] = { 'a', 'u', 't', 'o', 'e', 'x', 'p', 'a', 'n', 'd', '\0' }; Char STRautocorrect[] = { 'a', 'u', 't', 'o', 'c', 'o', 'r', 'r', 'e', 'c', @@ -407,6 +425,7 @@ Char STRkilldup[] = { 'k', 'i', 'l', 'l', 'd', 'u', 'p', '\0' }; Char STRshlvl[] = { 's', 'h', 'l', 'v', 'l', '\0' }; Char STRKSHLVL[] = { 'S', 'H', 'L', 'V', 'L', '\0' }; Char STRLANG[] = { 'L', 'A', 'N', 'G', '\0' }; +Char STRLC_ALL[] = { 'L', 'C', '_', 'A', 'L', 'L', '\0' }; Char STRLC_CTYPE[] = { 'L', 'C', '_', 'C', 'T', 'Y', 'P', 'E' ,'\0' }; Char STRLC_NUMERIC[] = { 'L', 'C', '_', 'N', 'U', 'M', 'E', 'R', 'I', 'C', '\0' }; diff --git a/contrib/tcsh/tc.decls.h b/contrib/tcsh/tc.decls.h index aed74501dc11..25ab75effbd7 100644 --- a/contrib/tcsh/tc.decls.h +++ b/contrib/tcsh/tc.decls.h @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/tc.decls.h,v 3.50 2002/03/08 17:36:47 christos Exp $ */ +/* $Header: /src/pub/tcsh/tc.decls.h,v 3.52 2004/02/21 20:34:25 christos Exp $ */ /* * tc.decls.h: Function declarations from all the tcsh modules */ @@ -141,6 +141,10 @@ extern void dodmmode __P((Char **, struct command *)); extern void douniverse __P((Char **, struct command *)); #endif /* masscomp */ +#if defined(_OSD_POSIX) /* BS2000 */ +extern void dobs2cmd __P((Char **, struct command *)); +#endif /* _OSD_POSIX */ + #if defined(hcx) extern void doatt __P((Char **, struct command *)); extern void doucb __P((Char **, struct command *)); @@ -299,6 +303,7 @@ extern size_t s_strlen __P((const Char *)); extern int s_strcmp __P((const Char *, const Char *)); extern int s_strncmp __P((const Char *, const Char *, size_t)); +extern int s_strcasecmp __P((const Char *, const Char *)); extern Char *s_strsave __P((const Char *)); extern Char *s_strend __P((const Char *)); extern Char *s_strstr __P((const Char *, const Char *)); diff --git a/contrib/tcsh/tc.func.c b/contrib/tcsh/tc.func.c index 427c2d121115..9b1490b116e0 100644 --- a/contrib/tcsh/tc.func.c +++ b/contrib/tcsh/tc.func.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/tc.func.c,v 3.105 2002/07/12 13:16:18 christos Exp $ */ +/* $Header: /src/pub/tcsh/tc.func.c,v 3.107 2003/05/16 18:10:29 christos Exp $ */ /* * tc.func.c: New tcsh builtins. */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: tc.func.c,v 3.105 2002/07/12 13:16:18 christos Exp $") +RCSID("$Id: tc.func.c,v 3.107 2003/05/16 18:10:29 christos Exp $") #include "ed.h" #include "ed.defns.h" /* for the function names */ @@ -689,7 +689,7 @@ xgetpass(prm) sigint = (signalfun_t) sigset(SIGINT, SIG_IGN); (void) Rawmode(); /* Make sure, cause we want echo off */ - if ((fd = open("/dev/tty", O_RDWR)) == -1) + if ((fd = open("/dev/tty", O_RDWR|O_LARGEFILE)) == -1) fd = SHIN; xprintf("%s", prm); flush(); @@ -1759,7 +1759,7 @@ doaliases(v, c) trim(v); } - if ((fd = open(tmp = short2str(*v), O_RDONLY)) < 0) + if ((fd = open(tmp = short2str(*v), O_RDONLY|O_LARGEFILE)) < 0) stderror(ERR_NAME | ERR_SYSTEM, tmp, strerror(errno)); getexit(oldexit); @@ -2163,7 +2163,7 @@ getremotehost() * have not caught up yet. */ addr.s_addr = inet_addr(name); - if (addr.s_addr != (unsigned long)~0) + if (addr.s_addr != (unsigned int)~0) host = name; else { if (sptr != name) { diff --git a/contrib/tcsh/tc.os.c b/contrib/tcsh/tc.os.c index 84819ffd60ee..cdb793e8f8cd 100644 --- a/contrib/tcsh/tc.os.c +++ b/contrib/tcsh/tc.os.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/tc.os.c,v 3.53 2002/03/08 17:36:47 christos Exp $ */ +/* $Header: /src/pub/tcsh/tc.os.c,v 3.55 2004/02/21 20:34:25 christos Exp $ */ /* * tc.os.c: OS Dependent builtin functions */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: tc.os.c,v 3.53 2002/03/08 17:36:47 christos Exp $") +RCSID("$Id: tc.os.c,v 3.55 2004/02/21 20:34:25 christos Exp $") #include "tw.h" #include "ed.h" @@ -697,6 +697,214 @@ douniverse(v, c) } #endif /* masscomp || _CX_UX */ +/*** + *** BS2000/OSD POSIX (Fujitsu Siemens Computers) + ***/ +#if defined(_OSD_POSIX) +static int +bs2upcase(char *str) +{ + enum { outside = ' ', singlequote='\'', doublequote='"'} string = outside; + + char *white; + + for (white = str + strlen(str) - 1; isspace(*white) && white > str; --white) + *white = '\0'; + + for (; *str != '\0'; ++str) + { + if (string == outside) + { + *str = toupper (*str); + } + if (*str == '\'') + { + if (string == outside) + string = singlequote; + else if (string != doublequote) + string = outside; + } + else if (*str == '"') + { + if (string == outside) + string = doublequote; + else if (string != singlequote) + string = outside; + } + } + if (string != outside) + { + stderror(ERR_NAME | ERR_UNMATCHED, (Char) string); + return 1; + } + return 0; +} +static int +bs2cmdlist(char *str) +{ + char *str_beg = NULL; + int ret = 0; + + enum { outside = ' ', singlequote='\'', doublequote='"'} string = outside; + + while (*str != '\0') + { + while (isspace(*str)) + ++str; + + if (*str == '\0') + break; + + str_beg = str; + + for (; *str != '\0'; ++str) + { + if (string == outside && *str == ';') /* End of command */ + { + *str++ = '\0'; + break; /* continue with next command */ + } + if (*str == '\'') + { + if (string == outside) + string = singlequote; + else if (string != doublequote) + string = outside; + } + else if (*str == '"') + { + if (string == outside) + string = doublequote; + else if (string != singlequote) + string = outside; + } + } + if (strlen(str_beg) != 0) + { + ret = bs2system(str_beg); + flush(); + if (ret != 0 /*&& !option.err_ignore*/) + break; /* do not continue after errors */ + } + } + + if (string != outside) + { + stderror(ERR_NAME | ERR_UNMATCHED, (Char) string); + return -1; + } + + return ret; +} +/*ARGSUSED*/ +void +dobs2cmd(v, c) + register Char **v; + struct command *c; +{ + register Char *cp; + register int i = 0, len = 0; + char *cmd = NULL; + int pvec[2]; + struct command faket; + Char *fakecom[2]; + char tibuf[BUFSIZE]; + int icnt; + static const Char STRbs2cmd[] = { 'b','s','2','c','m','d','\0' }; + + if (setintr) +#ifdef BSDSIGS + (void) sigsetmask(sigblock((sigmask_t) 0) & ~sigmask(SIGINT)); +#else /* !BSDSIGS */ + (void) sigrelse (SIGINT); +#endif /* BSDSIGS */ + v++; + gflag = 0, tglob(v); + if (gflag) { + v = globall(v); + if (v == 0) + stderror(ERR_NAME | ERR_NOMATCH); + } + else { + v = gargv = saveblk(v); + trim(v); + } + + /* First round: count the string lengths */ + for (i=0; v[i]; ++i) { + len += s_strlen(v[i]) + (v[i+1] != NULL); + } + + cmd = xmalloc(len+1); /* 1 for the final '\0' */ + + /* 2nd round: fill cmd buffer */ + i = 0; + while ((cp = *v++) != 0) { + register int c; + while (c = *cp++) + cmd[i++] = (char)c; + if (*v) + cmd[i++] = ' '; + } + cmd[i] = '\0'; + + /* Make upper case */ + bs2upcase(cmd); + + faket.t_dtyp = NODE_COMMAND; + faket.t_dflg = F_BACKQ|F_STDERR; + faket.t_dlef = 0; + faket.t_drit = 0; + faket.t_dspr = 0; + faket.t_dcom = fakecom; + fakecom[0] = STRbs2cmd; + fakecom[1] = 0; + + mypipe(pvec); + if (pfork(&faket, -1) == 0) { + /* child */ + (void) close(pvec[0]); + (void) dmove(pvec[1], 1); + (void) dmove(SHDIAG, 2); + initdesc(); +/* closem();*/ +#ifdef SIGTSTP + (void) sigignore(SIGTSTP); +#endif +#ifdef SIGTTIN + (void) sigignore(SIGTTIN); +#endif +#ifdef SIGTTOU + (void) sigignore(SIGTTOU); +#endif + xexit(bs2cmdlist(cmd)); + } + (void) close(pvec[1]); + for(;;) { + do + icnt = read(pvec[0], tibuf, BUFSIZE); + while (icnt == -1 && errno == EINTR); + if (icnt <= 0) + break; + for (i = 0; i < icnt; i++) + xputchar((unsigned char) tibuf[i]); + } + (void) close(pvec[0]); + pwait(); + + flush(); + + if (setintr) +#ifdef BSDSIGS + (void) sigblock(sigmask(SIGINT)); +#else /* !BSDSIGS */ + (void) sighold(SIGINT); +#endif /* BSDSIGS */ + if (gargv) + blkfree(gargv), gargv = 0; +} +#endif /* _OSD_POSIX */ + #if defined(_CX_UX) /*ARGSUSED*/ void @@ -935,7 +1143,7 @@ fix_strcoll_bug() static char *root = "/"; if (!didfds) - fd = open(root, O_RDONLY); + fd = open(root, O_RDONLY|O_LARGEFILE); (void) strcoll(root, root); diff --git a/contrib/tcsh/tc.os.h b/contrib/tcsh/tc.os.h index 2217f6ca3faf..2100200c9fb5 100644 --- a/contrib/tcsh/tc.os.h +++ b/contrib/tcsh/tc.os.h @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/tc.os.h,v 3.88 2002/05/16 13:51:26 christos Exp $ */ +/* $Header: /src/pub/tcsh/tc.os.h,v 3.90 2004/01/23 16:21:10 christos Exp $ */ /* * tc.os.h: Shell os dependent defines */ @@ -33,9 +33,11 @@ #ifndef _h_tc_os #define _h_tc_os +#ifndef __STDC__ #ifndef WINNT_NATIVE #define NEEDstrerror /* Too hard to find which systems have it */ #endif /* WINNT_NATIVE */ +#endif #ifdef notdef @@ -48,6 +50,8 @@ #endif /* notdef */ #ifdef __CYGWIN__ +# undef NOFILE +# define NOFILE sysconf(_SC_OPEN_MAX) # undef NEEDstrerror #endif diff --git a/contrib/tcsh/tc.printf.c b/contrib/tcsh/tc.printf.c index a6f130afea34..f19ac556b4b7 100644 --- a/contrib/tcsh/tc.printf.c +++ b/contrib/tcsh/tc.printf.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/tc.printf.c,v 3.23 2002/03/08 17:36:47 christos Exp $ */ +/* $Header: /src/pub/tcsh/tc.printf.c,v 3.24 2003/12/02 17:59:30 christos Exp $ */ /* * tc.printf.c: A public-domain, minimal printf/sprintf routine that prints * through the putchar() routine. Feel free to use for @@ -34,7 +34,7 @@ */ #include "sh.h" -RCSID("$Id: tc.printf.c,v 3.23 2002/03/08 17:36:47 christos Exp $") +RCSID("$Id: tc.printf.c,v 3.24 2003/12/02 17:59:30 christos Exp $") #ifdef lint #undef va_arg @@ -174,6 +174,11 @@ doprnt(addchar, sfmt, ap) (*addchar) ((int) (' ' | attributes)); break; + case 'p': + do_long = 1; + hash = 1; + fmt = 'x'; + /*FALLTHROUGH*/ case 'o': case 'x': case 'u': diff --git a/contrib/tcsh/tc.prompt.c b/contrib/tcsh/tc.prompt.c index 6c0a0a41fd6c..a979d94cfa16 100644 --- a/contrib/tcsh/tc.prompt.c +++ b/contrib/tcsh/tc.prompt.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/tc.prompt.c,v 3.46 2002/07/12 13:16:19 christos Exp $ */ +/* $Header: /src/pub/tcsh/tc.prompt.c,v 3.47 2002/07/25 17:14:59 christos Exp $ */ /* * tc.prompt.c: Prompt printing stuff */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: tc.prompt.c,v 3.46 2002/07/12 13:16:19 christos Exp $") +RCSID("$Id: tc.prompt.c,v 3.47 2002/07/25 17:14:59 christos Exp $") #include "ed.h" #include "tw.h" @@ -554,7 +554,8 @@ tprintf(what, buf, fmt, siz, str, tim, info) default: #ifndef HAVENOUTMP if (*cp == 'a' && what == FMT_WHO) { - cz = who_info(info, 'a', (char *) cbuff, sizeof(cbuff)); + cz = (unsigned char *) who_info(info, 'a', (char *) cbuff, + sizeof(cbuff)); for (; cz && *cz; *p++ = attributes | *cz++) if (p >= ep) break; } diff --git a/contrib/tcsh/tc.str.c b/contrib/tcsh/tc.str.c index 7bddf892a55d..1cae5751eeb4 100644 --- a/contrib/tcsh/tc.str.c +++ b/contrib/tcsh/tc.str.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/tc.str.c,v 3.10 2002/03/08 17:36:47 christos Exp $ */ +/* $Header: /src/pub/tcsh/tc.str.c,v 3.13 2004/02/21 20:34:25 christos Exp $ */ /* * tc.str.c: Short string package * This has been a lesson of how to write buggy code! @@ -33,7 +33,7 @@ */ #include "sh.h" -RCSID("$Id: tc.str.c,v 3.10 2002/03/08 17:36:47 christos Exp $") +RCSID("$Id: tc.str.c,v 3.13 2004/02/21 20:34:25 christos Exp $") #define MALLOC_INCR 128 @@ -309,6 +309,33 @@ s_strncmp(str1, str2, n) return(0); } +int +s_strcasecmp(str1, str2) + register const Char *str1, *str2; +{ + unsigned char c1, c2, l1 = 0, l2 = 0; + for (; *str1 && ((*str1 == *str2 && (l1 = l2 = 0) == 0) || + ((c1 = (unsigned char)*str1) == *str1 && + (c2 = (unsigned char)*str2) == *str2 && + (l1 = tolower(c1)) == (l2 = tolower(c2)))); str1++, str2++) + continue; + /* + * The following case analysis is necessary so that characters which look + * negative collate low against normal characters but high against the + * end-of-string NUL. + */ + if (*str1 == '\0' && *str2 == '\0') + return (0); + else if (*str1 == '\0') + return (-1); + else if (*str2 == '\0') + return (1); + else if (l1 == l2) /* They are zero when they are equal */ + return (*str1 - *str2); + else + return (l1 - l2); +} + Char * s_strsave(s) register const Char *s; diff --git a/contrib/tcsh/tc.who.c b/contrib/tcsh/tc.who.c index ede76023706d..8684594eefc3 100644 --- a/contrib/tcsh/tc.who.c +++ b/contrib/tcsh/tc.who.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/tc.who.c,v 3.35 2002/07/01 21:12:04 christos Exp $ */ +/* $Header: /src/pub/tcsh/tc.who.c,v 3.37 2002/11/21 20:02:01 christos Exp $ */ /* * tc.who.c: Watch logins and logouts... */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: tc.who.c,v 3.35 2002/07/01 21:12:04 christos Exp $") +RCSID("$Id: tc.who.c,v 3.37 2002/11/21 20:02:01 christos Exp $") #include "tc.h" @@ -52,6 +52,8 @@ RCSID("$Id: tc.who.c,v 3.35 2002/07/01 21:12:04 christos Exp $") # ifndef _PATH_UTMP # if defined(__UTMPX_FILE) && !defined(UTMPX_FILE) # define _PATH_UTMP __UTMPX_FILE +# elif defined(_PATH_UTMPX) +# define _PATH_UTMP _PATH_UTMPX # else # define _PATH_UTMP UTMPX_FILE # endif /* __UTMPX_FILE && !UTMPX_FILE */ @@ -261,7 +263,7 @@ watch_login(force) return; } stlast = sta.st_mtime; - if ((utmpfd = open(_PATH_UTMP, O_RDONLY)) < 0) { + if ((utmpfd = open(_PATH_UTMP, O_RDONLY|O_LARGEFILE)) < 0) { if (!force) xprintf(CGETS(26, 2, "%s cannot be opened. Please \"unset watch\".\n"), diff --git a/contrib/tcsh/tcsh.man b/contrib/tcsh/tcsh.man index 30d91ee2d78d..041e909600a8 100644 --- a/contrib/tcsh/tcsh.man +++ b/contrib/tcsh/tcsh.man @@ -72,7 +72,7 @@ .\" used here if you can. In particular, please don't use nroff commands .\" which aren't already used herein. .\" -.TH TCSH 1 "23 July 2002" "Astron 6.12.00" +.TH TCSH 1 "19 May 2004" "Astron 6.13.00" .SH NAME tcsh \- C shell with file name completion and command line editing .SH SYNOPSIS @@ -684,7 +684,7 @@ See also \fIdelete-char-or-list-or-eof\fR. .TP 8 .B magic-space \fR(not bound) Expands history substitutions in the current line, -like \fIexpand-history\fR, and appends a space. +like \fIexpand-history\fR, and inserts a space. \fImagic-space\fR is designed to be bound to the space bar, but is not bound by default. .TP 8 @@ -777,6 +777,14 @@ Like \fIvi-search-back\fR, but searches forward. .B which-command \fR(M-?) Does a \fIwhich\fR (see the description of the builtin command) on the first word of the input buffer. +.TP 8 +.B yank-pop \fR(M-y) +When executed immediately after a \fIyank\fR or another \fIyank-pop\fR, +replaces the yanked string with the next previous string from the +killring. This also has the effect of rotating the killring, such that +this string will be considered the most recently killed by a later +\fIyank\fR command. Repeating \fIyank-pop\fR will cycle through the +killring any number of times. .SS "Lexical structure" The shell splits input lines into words at blanks and tabs. The special characters `&', `|', `;', `<', `>', `(', and `)' and the doubled characters @@ -987,12 +995,6 @@ specification. .PP A history reference may have a word designator but no event specification. It then references the previous command. -.ig \" Not true, but we thought it was for a long time ... -, unless a previous history reference -occurred on the same line in which case this form repeats the previous -reference. Thus `!?foo?^ !$' gives the first and last arguments from the -command matching `?foo?'. -.. Continuing our `diff' example, we could have said simply `diff !^.old !^' or, to get the arguments in the opposite order, just `diff !*'. .PP @@ -1959,6 +1961,9 @@ On systems that support TCF (aix-ibm370, aix-ps2), and \fImigrate\fR migrates processes between sites. The \fIjobs\fR builtin prints the site on which each job is executing. .PP +Under BS2000, \fIbs2cmd\fR executes commands of the underlying BS2000/OSD +operating system. +.PP Under Domain/OS, \fIinlib\fR adds shared libraries to the current environment, \fIrootnode\fR changes the rootnode and \fIver\fR changes the systype. .PP @@ -2081,13 +2086,6 @@ With \fIname\fR and \fIwordlist\fR, assigns \fIwordlist\fR is command and filename substituted. \fIname\fR may not be `alias' or `unalias'. See also the \fIunalias\fR builtin command. -.ig \" Obsolete tcsh command -.TP 8 -.B aliases \fR[\fIfile\fR] (+) -Without arguments, prints all aliases. -With \fIfile\fR, loads a list of aliases from \fIfile\fR, one per line. -Retained for only downward compatibility. -.. .TP 8 .B alloc Shows the amount of dynamic memory acquired, broken down into used and free @@ -2101,23 +2099,6 @@ Puts the specified jobs (or, without arguments, the current job) into the background, continuing each if it is stopped. \fIjob\fR may be a number, a string, `', `%', `+' or `\-' as described under \fBJobs\fR. -.ig \" Obsolete tcsh command -.TP 8 -.B bind \fR[\fBdefaults\fR|\fBemacs\fR|\fBvi\fR|\fIkey\fR|\fIkey command\fR] (+) -An older version of \fIbindkey\fR, retained for only downward compatibility. -Without arguments, lists all bound keys and the editor command to which each is bound. -`bind defaults', `bind emacs' and `bind vi' are equivalent to -`bindkey \-d', `bindkey \-e' and `bindkey \-v'. -With \fIkey\fR, lists the editor command to which \fIkey\fR is bound. -With \fIkey\fR and \fIcommand\fR, binds the editor command \fIcommand\fR to \fIkey\fR. -.IP "" 8 -\fIkey\fR may be a literal character, -a control character written ^\fIcharacter\fR (e.g., `^A'), -a meta character written M-\fIcharacter\fR (e.g., `M-A') -or a function key written F-\fIstring\fR (e.g., `F-foo'). -For the function key form to work, the function key prefix must be -bound to \fIsequence-lead-in\fR and \fIstring\fR must not contain that prefix. -.. .PP .B bindkey \fR[\fB\-l\fR|\fB\-d\fR|\fB\-e\fR|\fB\-v\fR|\fB\-u\fR] (+) .br @@ -2230,6 +2211,12 @@ The ASCII character corresponding to the octal number \fInnn\fR any, notably `\\' and `^'. .RE .TP 8 +.B bs2cmd \fIbs2000-command\fR (+) +Passes \fIbs2000-command\fR to the BS2000 command interpreter for +execution. Only non-interactive commands can be executed, and it is +not possible to execute any command that would overlay the image +of the current process, like /EXECUTE or /CALL-PROCEDURE. (BS2000 only) +.TP 8 .B break Causes execution to resume after the \fIend\fR of the nearest enclosing \fIforeach\fR or \fIwhile\fR. The remaining commands on the @@ -2310,12 +2297,6 @@ Position-dependent completion. variables, which must include the current word. .PD .RE -.ig \" No longer true in 6.05.04 -.PP -When \fIpattern\fR is a glob-pattern (for \fBc\fR, \fBC\fR, \fBn\fR and -\fBN\fR-type completion), a \fIpattern\fR of `*' does not match an empty -word. -.. .PP \fIlist\fR, the list of possible completions, may be one of the following: .PP @@ -2458,11 +2439,6 @@ and `set' with shell variables. `true' doesn't have any options, so \fBx\fR does nothing when completion is attempted and prints `Truth has no options.' when completion choices are listed. .PP -.ig \" Changed in 6.05.04 -The \fIman\fR example, and several other examples below, use -\fBp\fR-type completion, rather than \fBC\fR- or \fBn\fR-type, so that -`*' will match an empty word. -.. Note that the \fIman\fR example, and several other examples below, could just as well have used 'c/*' or 'n/*' as 'p/*'. .PP @@ -2549,13 +2525,13 @@ Finally, here's a complex example for inspiration: .IP "" 4 > complete find \\ .br -\'n/\-name/f/' 'n/\-newer/f/' 'n/\-{,n}cpio/f/' \e +\&'n/\-name/f/' 'n/\-newer/f/' 'n/\-{,n}cpio/f/' \e .br \'n/\-exec/c/' 'n/\-ok/c/' 'n/\-user/u/' \e .br -\'n/\-group/g/' 'n/\-fstype/(nfs 4.2)/' \e +\&'n/\-group/g/' 'n/\-fstype/(nfs 4.2)/' \e .br -\'n/\-type/(b c d f l p s)/' \e +\&'n/\-type/(b c d f l p s)/' \e .br \'c/\-/(name newer cpio ncpio exec ok user \e .br @@ -2565,7 +2541,7 @@ ls mtime nogroup nouser perm print prune \e .br size xdev)/' \e .br -\'p/*/d/' +\&'p/*/d/' .PP This completes words following `\-name', `\-newer', `\-cpio' or `ncpio' (note the pattern which matches both) to files, @@ -2868,11 +2844,6 @@ or HUP (hangup), then the job or process is sent a CONT (continue) signal as well. The third form lists the signal names. .PD -.ig \" Obsolete tcsh command -.TP 8 -.B linedit \fR(+) -A synonym for the \fIecho\fR builtin command. -.. .TP 8 .B limit \fR[\fB\-h\fR] [\fIresource\fR [\fImaximum-use\fR]] Limits the consumption by the current process and each @@ -3611,7 +3582,8 @@ If set, the command which was passed to the shell with the \fB-c\fR flag (q.v.). .B complete \fR(+) If set to `enhance', completion 1) ignores case and 2) considers periods, hyphens and underscores (`.', `\-' and `_') to be word -separators and hyphens and underscores to be equivalent. +separators and hyphens and underscores to be equivalent. If set to +`igncase', the completion becomes case insensitive. .TP 8 .B continue \fR(+) If set to a list of commands, the shell will continue the listed @@ -3814,9 +3786,11 @@ If set to the empty string or `0' and the input device is a terminal, the \fIend-of-file\fR command (usually generated by the user by typing `^D' on an empty line) causes the shell to print `Use "exit" to leave tcsh.' instead of exiting. This prevents the shell from accidentally -being killed. If set to a number \fIn\fR, the shell ignores \fIn\fR - -1 consecutive \fIend-of-file\fRs and exits on the \fIn\fRth. (+) If -unset, `1' is used, i.e., the shell exits on a single `^D'. +being killed. Historically this setting exited after 26 successive +EOF's to avoid infinite loops. If set to a number \fIn\fR, the shell +ignores \fIn - 1\fR consecutive \fIend-of-file\fRs and exits on the +\fIn\fRth. (+) If unset, `1' is used, i.e., the shell exits on a +single `^D'. .TP 8 .B implicitcd \fR(+) If set, the shell treats a directory name typed as a command as though @@ -3843,6 +3817,12 @@ string is erased and the current one is inserted. Indicates the number of killed strings to keep in memory. Set to `30' by default. If unset or set to less than `2', the shell will only keep the most recently killed string. +Strings are put in the killring by the editor commands that delete +(kill) strings of text, e.g. \fIbackward-delete-word\fR, +\fIkill-line\fR, etc, as well as the \fIcopy-region-as-kill\fR command. +The \fIyank\fR editor command will yank the most recently killed string +into the command-line, while \fIyank-pop\fR (see \fBEditor commands\fR) +can be used to yank earlier killed strings. .TP 8 .B listflags \fR(+) If set to `x', `a' or `A', or any combination thereof (e.g., `xA'), they @@ -3911,7 +3891,7 @@ of `You have new mail.' .B matchbeep \fR(+) If set to `never', completion never beeps. If set to `nomatch', it beeps only when there is no match. -If set to `ambiguous, it beeps when there are multiple matches. +If set to `ambiguous', it beeps when there are multiple matches. If set to `notunique', it beeps when there is one exact and other longer matches. If unset, `ambiguous' is used. .TP 8 @@ -4407,7 +4387,7 @@ The number of reads from raw disk devices. The number of writes to raw disk devices. .PD .PP -and the default time format is `%Uu %Ss $E %P %I+%Oio %Fpf+%Ww'. +and the default time format is `%Uu %Ss %E %P %I+%Oio %Fpf+%Ww'. Note that the CPU percentage can be higher than 100% on multi-processors. .RE .TP 8 @@ -5039,7 +5019,7 @@ pipe(2), setrlimit(2), sigvec(2), stat(2), umask(2), vfork(2), wait(2), malloc(3), setlocale(3), tty(4), a.out(5), termcap(5), environ(7), termio(7), Introduction to the C Shell .SH VERSION -This manual documents tcsh 6.12.00 (Astron) 2002-07-23. +This manual documents tcsh 6.13.00 (Astron) 2004-05-19. .SH AUTHORS .PD 0 .TP 2 diff --git a/contrib/tcsh/tw.color.c b/contrib/tcsh/tw.color.c index c71855455c18..f0a2cca512bc 100644 --- a/contrib/tcsh/tw.color.c +++ b/contrib/tcsh/tw.color.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/tw.color.c,v 1.11 2002/06/25 19:02:11 christos Exp $ */ +/* $Header: /src/pub/tcsh/tw.color.c,v 1.12 2004/01/23 16:21:33 christos Exp $ */ /* * tw.color.c: builtin color ls-F */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: tw.color.c,v 1.11 2002/06/25 19:02:11 christos Exp $") +RCSID("$Id: tw.color.c,v 1.12 2004/01/23 16:21:33 christos Exp $") #include "tw.h" #include "ed.h" @@ -346,7 +346,7 @@ print_with_color(filename, len, suffix) xputchar(suffix); } else - xprintf("%S%c", filename, suffix); + xprintf("\045S%c", filename, suffix); } diff --git a/contrib/tcsh/tw.comp.c b/contrib/tcsh/tw.comp.c index 59eff802d74e..13667d903b06 100644 --- a/contrib/tcsh/tw.comp.c +++ b/contrib/tcsh/tw.comp.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/tw.comp.c,v 1.33 2002/06/25 19:02:11 christos Exp $ */ +/* $Header: /src/pub/tcsh/tw.comp.c,v 1.34 2004/02/21 20:34:25 christos Exp $ */ /* * tw.comp.c: File completion builtin */ @@ -32,7 +32,7 @@ */ #include "sh.h" -RCSID("$Id: tw.comp.c,v 1.33 2002/06/25 19:02:11 christos Exp $") +RCSID("$Id: tw.comp.c,v 1.34 2004/02/21 20:34:25 christos Exp $") #include "tw.h" #include "ed.h" @@ -62,6 +62,7 @@ docomplete(v, t) { register struct varent *vp; register Char *p; + Char **pp; USE(t); v++; @@ -72,6 +73,15 @@ docomplete(v, t) vp = adrof1(strip(p), &completions); if (vp && vp->vec) tw_pr(vp->vec), xputchar('\n'); + else + { +#ifdef TDEBUG + xprintf("tw_find(%s) \n", short2str(strip(p))); +#endif /* TDEBUG */ + pp = tw_find(strip(p), &completions, FALSE); + if (pp) + tw_pr(pp), xputchar('\n'); + } } else set1(strip(p), saveblk(v), &completions, VAR_READWRITE); diff --git a/contrib/tcsh/tw.help.c b/contrib/tcsh/tw.help.c index 1cdf7e3c0b3f..6c406483a2bd 100644 --- a/contrib/tcsh/tw.help.c +++ b/contrib/tcsh/tw.help.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/tw.help.c,v 3.18 2002/03/08 17:36:47 christos Exp $ */ +/* $Header: /src/pub/tcsh/tw.help.c,v 3.19 2002/11/21 20:02:01 christos Exp $ */ /* tw.help.c: actually look up and print documentation on a file. * Look down the path for an appropriate file, then print it. * Note that the printing is NOT PAGED. This is because the @@ -35,7 +35,7 @@ */ #include "sh.h" -RCSID("$Id: tw.help.c,v 3.18 2002/03/08 17:36:47 christos Exp $") +RCSID("$Id: tw.help.c,v 3.19 2002/11/21 20:02:01 christos Exp $") #include "tw.h" #include "tc.h" @@ -120,7 +120,7 @@ do_help(command) for (sp = h_ext; *sp; sp++) { *ep = '\0'; catn(full, str2short(*sp), (int) (sizeof(full) / sizeof(Char))); - if ((f = open(short2str(full), O_RDONLY)) != -1) + if ((f = open(short2str(full), O_RDONLY|O_LARGEFILE)) != -1) break; } if (f != -1) { diff --git a/contrib/tcsh/tw.parse.c b/contrib/tcsh/tw.parse.c index 7bec5be5a61c..dd6dedc58477 100644 --- a/contrib/tcsh/tw.parse.c +++ b/contrib/tcsh/tw.parse.c @@ -1,4 +1,4 @@ -/* $Header: /src/pub/tcsh/tw.parse.c,v 3.92 2002/06/25 19:02:12 christos Exp $ */ +/* $Header: /src/pub/tcsh/tw.parse.c,v 3.96 2004/01/23 16:21:33 christos Exp $ */ /* * tw.parse.c: Everyone has taken a shot in this futile effort to * lexically analyze a csh line... Well we cannot good @@ -35,7 +35,7 @@ */ #include "sh.h" -RCSID("$Id: tw.parse.c,v 3.92 2002/06/25 19:02:12 christos Exp $") +RCSID("$Id: tw.parse.c,v 3.96 2004/01/23 16:21:33 christos Exp $") #include "tw.h" #include "ed.h" @@ -115,7 +115,8 @@ static int c_glob __P((Char ***)); static int is_prefix __P((Char *, Char *)); static int is_prefixmatch __P((Char *, Char *, int)); static int is_suffix __P((Char *, Char *)); -static int recognize __P((Char *, Char *, int, int, int)); +static int recognize __P((Char *, Char *, int, int, int, + int)); static int ignored __P((Char *)); static int isadirectory __P((Char *, Char *)); #ifndef __MVS__ @@ -813,29 +814,19 @@ starting_a_command(wordstart, inputline) * If we shorten it back to the prefix length, stop searching. */ static int -recognize(exp_name, item, name_length, numitems, enhanced) +recognize(exp_name, item, name_length, numitems, enhanced, igncase) Char *exp_name, *item; - int name_length, numitems, enhanced; + int name_length, numitems, enhanced, igncase; { Char MCH1, MCH2; register Char *x, *ent; register int len = 0; -#ifdef WINNT_NATIVE - struct varent *vp; - int igncase; - igncase = (vp = adrof(STRcomplete)) != NULL && vp->vec != NULL && - Strcmp(*(vp->vec), STRigncase) == 0; -#endif /* WINNT_NATIVE */ if (numitems == 1) { /* 1st match */ copyn(exp_name, item, MAXNAMLEN); return (0); } - if (!enhanced -#ifdef WINNT_NATIVE - && !igncase -#endif /* WINNT_NATIVE */ - ) { + if (!enhanced && !igncase) { for (x = exp_name, ent = item; *x && (*x & TRIM) == (*ent & TRIM); x++, ent++) len++; } else { @@ -890,7 +881,7 @@ tw_collect_items(command, looking, exp_dir, exp_name, target, pat, flags) Char *item, *ptr; Char buf[MAXPATHLEN+1]; struct varent *vp; - int len, enhanced; + int len, enhanced = 0; int cnt = 0; int igncase = 0; @@ -929,6 +920,23 @@ tw_collect_items(command, looking, exp_dir, exp_name, target, pat, flags) break; case TW_COMMAND: +#if defined(_UWIN) || defined(__CYGWIN__) + /* Turn foo.{exe,com,bat} into foo since UWIN's readdir returns + * the file with the .exe, .com, .bat extension + */ + { + size_t ext = strlen((char *)item) - 4; + if ((ext > 0) && (strcasecmp((char *)&item[ext], ".exe") == 0 || + strcasecmp((char *)&item[ext], ".bat") == 0 || + strcasecmp((char *)&item[ext], ".com") == 0)) + { + item[ext] = '\0'; +#if defined(__CYGWIN__) + strlwr((char *)item); +#endif /* __CYGWIN__ */ + } + } +#endif /* _UWIN || __CYGWIN__ */ exec_check = flags & TW_EXEC_CHK; dir_ok = flags & TW_DIR_OK; break; @@ -988,11 +996,16 @@ tw_collect_items(command, looking, exp_dir, exp_name, target, pat, flags) case RECOGNIZE_ALL: case RECOGNIZE_SCROLL: -#ifdef WINNT_NATIVE - igncase = (vp = adrof(STRcomplete)) != NULL && vp->vec != NULL && - Strcmp(*(vp->vec), STRigncase) == 0; -#endif /* WINNT_NATIVE */ - enhanced = (vp = adrof(STRcomplete)) != NULL && !Strcmp(*(vp->vec),STRenhance); + if ((vp = adrof(STRcomplete)) != NULL && vp->vec != NULL) { + Char **cp; + for (cp = vp->vec; *cp; cp++) { + if (Strcmp(*cp, STRigncase) == 0) + igncase = 1; + if (Strcmp(*cp, STRenhance) == 0) + enhanced = 1; + } + } + if (enhanced || igncase) { if (!is_prefixmatch(target, item, igncase)) break; @@ -1077,7 +1090,8 @@ tw_collect_items(command, looking, exp_dir, exp_name, target, pat, flags) break; } } - if (recognize(exp_name, item, name_length, ++numitems, enhanced)) + if (recognize(exp_name, item, name_length, ++numitems, + enhanced, igncase)) if (command != RECOGNIZE_SCROLL) done = TRUE; if (enhanced && (int)Strlen(exp_name) < name_length) @@ -2092,7 +2106,7 @@ print_by_column(dir, items, count, no_file_suffix) } else { /* Print filename followed by '/' or '*' or ' ' */ - xprintf("%S%c", items[i], + xprintf("\045S%c", items[i], filetype(dir, items[i])); w++; }