ytalk-3.3.0004075500017510000144000000000001020366221700114465ustar kesousersytalk-3.3.0/ChangeLog010064400017510000144000000142031020173203000132610ustar kesousersYTalk: Multi-user talk client For news and updates, visit http://www.impul.se/ytalk/ version 3.3.0 New features: * YTalk now recognizes GNU talk (gtalk) * Much improved VT100 support Changes: * YTalk is now released under the GNU GPL * The X11 interface has been removed since no one was using it and it had grown way too outdated * Unidentified talk clients are now called "BSD talk", since talk(1) originally appeared in 4.2BSD. * Moved to GNU automake * Re-indented sources with hard tabs * Added a couple of tests (run with 'make check') Bug fixes: * YTalk now tolerates stacking invite/import requests * Fixed a build problem on systems without snprintf() * Once again use $HOME when looking for personal ytalkrc version 3.2.0 New features: * Added far-right "stomping", fixes procps top(1) among other things * Separated handling of CR and LF, makes a lot of programs work better * Added support for 'G' escape sequence used by Gentoo's init scripts * Added "escape-yesno" patch from FreeBSD that optionally requires that you press before answering yes/no questions * Added a "YTALK_VERSION" environment variable to subshells Changes: * --with-x is now --enable-x Bug fixes: * Fixed an endless loop in curses titlebar code * We now use snprintf() instead of sprintf() if available * Restored limit on auto-invite hostnames from 16 to 64 characters version 3.1.6 Changes: * Don't even build pty allocation code if system has openpty() * Made all debugging code strictly optional, add --enable-debug to ./configure if you want it Bug fixes: * Fixed a crash when resizing YTalk in an XTerm * Fixed a remote-crash format string bug in auto-invite daemon * Fixed build problems on SunOS * Fixed --with-x on X.org (broken since 3.1.2) version 3.1.5 New features: * We now use openpty() if available to securely allocate ptys * Added the prompt-quit patch from Debian again (oops, lost in 3.1.3) Bug fixes: * Fixed a problem with the configure script on Slackware * Added a missing part of VT100 scrolling support * Fixed a small memory leak in terminal tab handling * Small documentation fixes and updates version 3.1.4 New features: * Added "rering all" to main menu (requested by Matthew Vernon in '99) * Added --with-curses=DIR option to configure script Bug fixes: * Fixed detection of `socklen_t' type on OpenBSD * Fixed a minor problem with the no-beep mode * Fixed a minor signed/unsigned issue * Cleaned up the configure script a bit version 3.1.3 New features: * Added support for job control on BSD systems * Added terminal tab handling * Added terminal keypad modes * Added "ignorebreak" mode (^C is ignored unless a shell is running) * Added "beeps" to the ytalkrc flags (applies to all beeps) * Added internal memory management and tracking Changes: * Maintainer change to Andreas Kling * Dropped getlogin() in favor of getpwuid() * Removed "debug" logging code Bug fixes: * Fixed the shell on Tru64 UNIX * restored compatibility with old talk daemons (broken in 3.1.2) * restored command line parsing (broken on many systems in 3.1.2) * Removed debug code that broke terminal raw mode in 3.1.2 version 3.1.2 New features: * Debug logger added * Now optionally prompts user before quitting (when using -q), patch from Colin Watson * Added parsing of long options * Fixed maximum username length to 11 instead of 8 Changes: * Maintainer change to Jessica Peterson * X support isn't compiled as default anymore * -x command line switch now enables X11 mode instead of disabling it. * Scrolling is enabled by default * Upgraded to autoconf 2.59 Bug fixes: * Fixed a possible buffer overflow regarding a oversized $HOME when loading the configuration file * Reset handling of SIGCHLD for shells - patch from P. Maragakis following hints by Jason Gunthorpe version 3.1.1 New features: * YTalk now checks that connections are answered from the expected host; if they aren't, it complains and shows the new hostname * Try to look for the current machine's FQDN if hostname() doens't include a '.' Bug fixes: * Fixed the shell under Solaris (oops, broke it in 3.1!) * Misc autoconf fixes * Resizing didn't work with Linux and ncurses, fixed it * n-way talk sessions should now be free of duplicated users * Fixed the "readdress" option somewhat * Portability fixes for 64-bit machines (size_t instead of int) version 3.1 * Minor documentation updates version 3.1beta2 * config.h.in was missing a line for HAVE_IOVEC_H * Redid the test for termios vs sgtty, making sure tcgetattr exists if termios is to be selected * Fixed 8bit-cleanness version 3.1beta1 New features: * Added -Y to ask for caps in yes/no questions * Added -i to leave the incoming talks to the daemon * Added the 'k' option to the main menu (kill all unconnected) * Made ESC[r in shells * Added the /dev/ptmx style of pty's, and some Solaris-specific code to go with it * 8 bit clean (except for character 0xfe, which is the lower case Icelandic thorn, b/c that is used as the delete char in ytalk, for some reason) * Added aliases for whole addresses, hostnames and login names * Let the user save his own side of the conversation too * Support virtual hosts and multihomed machines, by letting the user pick which interface to use, and otherwise making a guess at it Changes: * Avoid clearing the window when the last partner ^C's on you * Fixed line wrap inside shells (at the cost of breaking the specs in term.doc slightly) * Always understood both ^h and delete (^?) as delete chars * Split the "auto-rering" flag into "rering" and "prompt-rering" * Made ytalk send out FQDN's when passing users around, so the other machine has a chance to resolve the address * Use strerror() instead of sys_errlist, where available * Redefine our own sockaddr_in, since BSD4.4 (and FreeBSD and friends) use a different definition from what the talk daemons expect * Ported to GNU Autoconf Bug fixes: * Fixed annoying bug with UDP handling under Linux (that's where the spurious "no talk daemon" messages were coming from!) ytalk-3.3.0/AUTHORS010064400017510000144000000007611017325104400125740ustar kesousersCurrent maintainer: Andreas Kling Originally written by: Britt Yenne Past maintainers: Jessica Peterson Roger Espel Llima Contributors: Alexander Rigbo Benjamin Herr Philipp Kern Matthew Vernon Carl Edman Steve McIntyre Tobias Hahn Geoff W. Sitaram Ramaswamy Magnus Hammerin Thilo Wunderlich Jonas Yngvesson Andreas Stolcke Pete Wenzel John Vanderpool Shih-Chen Huang Andrew Myers Duncan Sinclair Evan McLean Larry Schwimmer J. Adam Hawkes Mark Musone Tim Deegan ytalk-3.3.0/COPYING010064400017510000144000000431101016771440100125560ustar kesousers GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ytalk-3.3.0/Makefile.am010064400017510000144000000002671020172315000135530ustar kesousersconfdir = $(sysconfdir) conf_DATA = ytalkrc man_MANS = docs/ytalk.1 EXTRA_DIST = config.rpath mkinstalldirs ChangeLog README INSTALL $(man_MANS) $(conf_DATA) SUBDIRS = docs src test ytalk-3.3.0/INSTALL010064400017510000144000000067731016673013100125670ustar kesousers Installation Procedure for Ytalk 0) Preparation To build and install Ytalk, you need to unpack the archive. Since you're reading this text, you have presumabley already done that. Ytalk uses GNU autoconf now for configuration; those of you familiar with compiling GNU utilities will feel quite at home. Short & sweet: ./configure make make install 1) Configuration To configure Ytalk, run the `configure' script provided with the distribution. You may use all the standard arguments configure scripts take. The most important ones are: --help print help message --prefix=PREFIX install architecture-independent files in PREFIX (/usr/local by default) --bindir=DIR user executables in DIR (PREFIX/bin) --mandir=DIR man documentation in DIR [PREFIX/man] --with-curses=DIR specify where to find curses --enable-debug compile in memory tracking and debug messages The `./configure' script also understands a number of environment variables: CPPFLAGS flags to give to CPP and CC. ex: CPPFLAGS=-I/path/to/some/include/dir ./configure LIBS extra libraries to link to, and/or where to find them. ex: LIBS="-L/path/to/extra/libs -R/path/to/extra/libs" ./configure CFLAGS flags to give when compiling (default is -g -O2). ex: CFLAGS=-O2 ./configure LDFLAGS extra flags to give when linking. ex: LDFLAGS=-s ./configure You can customize many default settings by editing Makefile and config.h. The program will work very well without your touching these files, but it is useful to have a look at things you can change there. 2) Compilation To compile the program, type make and cross your fingers. YTalk is fairly portable, so this _should_ work out of the box. If it doesn't, please mail me with all the details at . After the compilation, a ready to use `ytalk' executable should reside in the distribution directory. Other than missing its system-wide configuration file, it'll be all ready to use. This is also the right moment to look at the file `ytalkrc', which will be installed as the system-wide configuration file. If you change any options in the Makefile, please run "make clean" before recompiling. If you change the environment variables to run `./configure' again, please delete the file `config.cache'. 3) Installation Use `make install' to install Ytalk to the directories specified to configure (/usr/local/* by default). The standard installation process will copy the ytalk binary to /usr/local/bin, the man page to /usr/local/man/man1, and the system ytalkrc to /usr/local/etc. You can customize the directories either through the configuration process or making the necessary changes in the Makefile. To delete the files created by Ytalk installation, you can use make uninstall. 4) Acknowledgements (Roger Espel Llima) Previous YTalk versions were maintained by Britt Yenne; since version 3.0pl2 was released quite a few years ago, I assume he has lost interest in Ytalk, so I've been maintaining it in a "low-key" way (mostly just fixing bugs and adding minor things, now autoconf-ing it, and integrating people's bug fixes). Most of these installation instructions are taken word-for-word from the `INSTALL' file that comes with GNU Wget. This means that, unlike the rest of the YTalk package (which is freely copyable as long as the copyright notices are kept in the sources), this file is (probably) covered by the GNU General Public License version 2. ytalk-3.3.0/configure.in010064400017510000144000000066461020172315000140370ustar kesousersdnl configure.in for YTalk dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT([YTalk], [3.3.0]) AC_CONFIG_SRCDIR(src/main.c) AM_INIT_AUTOMAKE AC_CONFIG_HEADER(config.h) dnl Do some system detection. Don't expand this without a good reason. host=`uname -s` case "$host" in *SunOS*) SYSTEM_DEFS="-DYTALK_SUNOS" ;; *HP-UX*) SYSTEM_DEFS="-DYTALK_HPUX" ;; esac AC_SUBST(SYSTEM_DEFS) AC_DEFINE_DIR([sysconfdir], [sysconfdir], [sysconfdir]) AC_DEFINE_UNQUOTED(SYSTEM_YTALKRC, ["${sysconfdir}/ytalkrc"], ["Location of default ytalkrc file"]) dnl Checks for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_MAKE_SET dnl Sanity AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(u_int) ytalk_cv_curses=/usr AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses=DIR], [Where curses is installed]), [if test $withval != yes; then ytalk_cv_curses=$withval fi if test x$ytalk_cv_curses != x/usr; then LDFLAGS="-L${ytalk_cv_curses}/lib $LDFLAGS" CPPFLAGS="$CPPFLAGS -I${ytalk_cv_curses}/include" fi]) AC_CHECK_LIB(ncurses, initscr, [LIBS="$LIBS -lncurses" if test x$ytalk_cv_curses = x/usr -a -d /usr/include/ncurses; then CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses" fi AC_CHECK_HEADERS(ncurses.h)], [CF_CURSES_LIBS]) dnl Check for keypad() AC_CHECK_LIB(ncurses, keypad, [AC_DEFINE(HAVE_KEYPAD, 1, [Define to 1 if you have keypad()])], [AC_CHECK_LIB(curses, keypad, [AC_DEFINE(HAVE_KEYPAD, 1, [Define to 1 if you have keypad()])], [])]) dnl Look for termios, and if that fails, try sgtty. AC_CHECK_FUNC(tcgetattr, [\ AC_CHECK_HEADERS(termios.h,, no_termios=1)], no_termios=1) if test "x$no_termios" = "x1" ; then AC_CHECK_HEADERS(sgtty.h,, AC_MSG_ERROR(Cannot find either termios or sgtty)) fi dnl See if we want debugging output. AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug], [enable debugging])) if test "${enable_debug:-no}" != "no"; then AC_DEFINE(YTALK_DEBUG, 1, [Define to 1 to enable debugging output.]) fi dnl Some systems need extra libraries for sockets and dns... AC_CHECK_FUNC(socket,,AC_CHECK_LIB(socket, socket,, [AC_MSG_ERROR(Can't compile without socket)])) AC_CHECK_FUNC(gethostbyname,,AC_CHECK_LIB(nsl, gethostbyname,, [AC_MSG_ERROR(Can't compile without gethostbyname)])) dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h netdb.h netinet/in.h sys/ioctl.h sys/time.h unistd.h stropts.h) AC_CHECK_HEADERS(iovec.h sys/uio.h stdlib.h string.h sys/param.h arpa/inet.h sys/stat.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T AC_TYPE_SIGNAL AC_HEADER_TIME AC_TYPE_UID_T AC_CHECK_TYPE([ssize_t], , [AC_DEFINE(ssize_t, int, [the signed version of size_t])]) AC_CHECK_TYPE([socklen_t], [AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define to 1 if you have the `socklen_t` type])], [], [ #include #include ]) dnl Check for openpty() and util.h AC_CHECK_HEADERS(util.h) AC_CHECK_FUNCS(openpty,, [AC_CHECK_LIB(util, openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"]) ]) dnl Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_CHECK_FUNCS(putenv strerror ttyname ptsname grantpt unlockpt) AC_CHECK_FUNCS(setsid tcflush snprintf) AC_CHECK_FUNCS(sigprocmask sigsetmask sighold, break) AC_CHECK_FUNC(gethostname,,AC_MSG_ERROR(Can't run without gethostname)) AC_CHECK_FUNC(select,,AC_MSG_ERROR(Can't compile without select)) AC_OUTPUT( docs/Makefile docs/ytalk.1 test/Makefile src/Makefile Makefile ) ytalk-3.3.0/README010064400017510000144000000014071015433640200124030ustar kesousers YTalk YTalk is a compatible replacement for the Unix talk(1) program, which adds a number of features. Mainly, it can talk to more than one person at a time, and it can the two different types of talk daemons out there. For compilation and installation instructions, please see the file `INSTALL'. The gist of it is: ./configure make make install YTalk is free software, which can be freely redistributed, used and modified as long as the copyright notices are kept in the source and header files. If you hack in new neat things, or fix bugs, or have ideas about new features, feel free to mail me at about it. Same if you have trouble compiling or running YTalk. For news and the latest versions of YTalk, visit: http://www.impul.se/ytalk/ ytalk-3.3.0/docs004075500017510000144000000000001020366221700123765ustar kesousersytalk-3.3.0/docs/Makefile.am010064400017510000144000000000601016767610700145160ustar kesousersman_MANS = \ ytalk.1 EXTRA_DIST = $(man_MANS) ytalk-3.3.0/docs/ytalk.1.in010064400017510000144000000327631020173062500142750ustar kesousers''' ''' YTalk Version @VERSION@ ''' .de Sh .br .ne 5 .PP \fB\\$1\fR .PP .. .TH YTalk 1 "2 Jan 2005" "YTalk @VERSION@" .SH NAME ytalk - A multi-user chat program. .SH SYNOPSIS .BI "ytalk [-s] [-Y] [-E] [-i] [-q] [-v] [-h " hostname_or_ip "] " username... .SH DESCRIPTION .I YTalk @VERSION@ .PP YTalk is in essence a multi-user chat program. It works almost exactly like the UNIX talk program and even communicates with the same talk daemon(s), but YTalk allows for multiple connections. The .I username field may be formatted in several different ways: .br name - some user on your machine .br name@host - some user on a different machine .br name#tty - some user on a particular terminal .br name#tty@host - some user on a particular tty on a .br different machine .br name@host#tty - same as "name#tty@host" .br aliasname - an alias defined in your .ytalkrc .PP You can specify multiple user names on the command line, ie: .sp ytalk george fred@hissun.edu marc@grumpy.cc .PP The .B -s option starts your YTalk window in a shell. .PP The .B -Y option requires a capital Y or N as an answer to any yes/no question. .PP The .B -E option requires you to press escape once before answering a yes/no question (for people who type looking at the keyboard). .PP The .B -i option disables the auto-invite port (meaning you won't see "talk to blah@blah.com", but your talk daemon will beep you instead). .PP The .B -q option causes YTalk to prompt you before quitting. .PP The .B -v option prints the program version and exits. .PP The .B -h option specifies the name or address of the local machine; this is useful on multi-homed machines, or virtual hosts, to specify which network interface to use for communication. .PP For each user on the command line, YTalk will attempt to connect to the talk daemon on the specified user's host and determine if that user has left an invitation for you to call. If not, YTalk leaves an invitation for him and tells his talk daemon to send an announcement to his screen. There is no dedicated YTalk daemon. Right now, YTalk is able to communicate with BOTH existing versions of UNIX talk daemons. For any particular host, YTalk will attempt to communicate with a talk daemon the caller's host also supports. If the two hosts have no daemon in common, then UNIX talk will not function at all, but a connection is possible through (and only through) YTalk. .PP Once a connection has been established between two users, they can chat back and forth to their hearts' content. The connection is terminated when one of them hits control-C or selects quit off the main menu. .PP YTalk is perfectly compatible with UNIX talk and they can even converse with each other without any problems. However, many of the features of YTalk can only operate when you are connected to a user who is also using YTalk. For the rest of this document, it will be assumed that all connected users are using YTalk, unless otherwise stated. .PP If you specified more than one user on the YTalk command line, then YTalk will process and add each user to the conversation as they respond to your invitation. As each new user enters the conversation, the screen is further subdivided into smaller and smaller windows, one for each connected user. Right now, the number of connected users is limited by the number of lines on your terminal (or window), for each connected user needs at least three lines. .PP As each new user is added to the conversation, YTalk will transmit information about that user to all other connected YTalk users so that their screens will also subdivide and incorporate the new user. If the new user is using UNIX talk, then information about him will NOT be transmitted, for his screen would be unable to accept multiple connections. I have given brief thought to allowing at least the output of UNIX talk users to be transmitted to all connected YTalk users, but I have not written any code to do so. Note that even though UNIX talk cannot handle multiple connections, it is still possible for YTalk to handle multiple UNIX "talk" connections. For example, george (using YTalk) could communicate with fred and joe (both using UNIX talk), but fred and joe would be unaware of each other. The best way to understand the limitations that UNIX "talk" places on YTalk is to test various connections between the two and see how things work. .PP .SH ESCAPE MENU Whenever you are using YTalk, you can hit the .I ESCAPE key to bring up a menu which at this moment has these options: .sp a: add a user .br d: delete a user .br k: kill all unconnected .br o: options .br r: rering all .br s: shell .br u: user list .br w: output user to file .br q: quit .PP By choosing option "a", you are given the opportunity to type the name of any user you wish to include into the conversation. Again, YTalk will accept an invitation from that user if an invitation exists, or will leave an invitation and ring the given user. .PP By choosing option "d", you can select the name of a connection to terminate. .PP By choosing option "k", you can make YTalk forget all pending (waiting) connections. .PP By choosing option "o", you can view and/or modify any of the YTalk options. See the OPTIONS section below for a list of YTalk options. .PP By choosing option "r", all users that have not yet responded to your talk invitation will be re-rung. .PP By choosing option "s", you can invoke a shell in your YTalk window. All other users will see what happens in your shell. YTalk will automatically resize your window down to the size of the smallest window you are connected to, in order to ensure that all users always see the same thing. .PP The "u" option displays a list of connected and unconnected users, as well as their window sizes and what version of talk software they are running. .PP By choosing option "w", you can select any connected user and type the name of a file, and all further output from that user will be dumped to the specified file. The file, if it exists, will be OVERWRITTEN. By choosing "w" and the same user again, further output to the file will be terminated. .PP Oh, one other thing: when user A attempts to ytalk to user B, but user B is already ytalking with user C, user A's YTalk program will realize that user B is already using YTalk, and will communicate with user B's YTalk program directly in order to initialize the conversation. User B will see a nice windowed message like: .sp Do you wish to talk with user A? .PP and he will be prompted for a yes/no answer. This, in my opinion, is much preferable to blitting the announcement message and messing up user B's screen. The command-line option "-i" turns this off. .SH RUNTIME OPTIONS When you select Options off of the main menu, you are given the opportunity to edit the YTalk options. The current options are: .sp s: turn scrolling [off/on] .br w: turn word-wrap [off/on] .br i: turn auto-import [off/on] .br v: turn auto-invite [off/on] .br r: turn reringing [off/on] .br p: [don't] prompt before rerings .br q: [don't] prompt before quitting .PP If .I scrolling is turned on, then a user's window will scroll when he reaches the bottom, instead of wrapping back around to the top. .PP If .I word-wrap is turned on, then any word which would overextend the right margin will be automatically moved to the next line on your screen. .PP If .I auto-import is turned on, then YTalk will assume that you wish to talk to any users which connect to other YTalk users which are connected to you. That last sentence does make sense; try again. YTalk will add these users to your session automatically, without asking you for verification. .PP If .I auto-invite is turned on, then YTalk will automatically accept any connection requested by another user and add them to your session. You will not be asked for verification. .PP If .I rering is turned on, then YTalk will re-ring any user who does not respond to your invitation within 30 seconds. .PP If .I prompt-rering is turned on, then YTalk will ask you before re-ringing a user. .PP If .I prompt-quit is turned on, then YTalk will wait for keyboard input before quitting. .PP Any of these options can be set to your preference in your .ytalkrc file, as described below. .SH YTALK STARTUP FILE If your home directory contains a file named ".ytalkrc" then YTalk will read this file while starting up. All YTalk runtime options, as well as some startup options, can be set in this file. .Sh "SETTING BOOLEAN OPTIONS" Boolean options can be pre-set with the following syntax: .sp turn .I option [off | on] .PP where .I option is one of .I scrolling , .I word-wrap , .I auto-import , .I auto-invite , .I rering , .I prompt-rering , .I prompt-quit , .I caps , .I escape-yesno , .I noinvite , .I ignorebreak , or .I beeps . Setting these options works just like described above. For example, one could enable word-wrap with the line: .sp turn word-wrap on .Sh "ALIASES" You can setup aliases so you don't have to type the full address of the user you want to ring. There are three types of aliases: .TP 12 .B "alias \fIaliasname\fR@ \fIusername\fR@" Replaces \fIaliasname\fR@\fIhost\fR with \fIusername\fR@\fIhost\fR for every host. The '@' at the end of \fIusername@\fR is not required. .TP 12 .B "alias @\fIaliashost\fR @\fIrealhost\fR" Replaces \fIuser\fR@\fIaliashost\fR with \fIuser\fR@\fIrealhost\fR for every user. The '@' at the beginning of @\fIrealhost\fR is not required. .TP 12 .B "alias \fIaliasname\fR \fIuser\fR@\fIhost\fR" Replaces \fIaliasname\fR with \fIuser\fR@\fIhost\fR. .Sh "SELECTING INTERFACES AND VIRTUAL HOSTS" On machines with multiple IP addresses (multiple interfaces, or virtual hosts), you can choose the default address to use for communication with YTalk, using the .B localhost command in your .ytalkrc file. The syntax is: .TP 12 .B "localhost \fIhostname-or-IP-address\fR" .Sh "SETTING RE-ADDRESS MODES" The purpose of readdressing is to allow YTalk connections across point-to-point network gateways where the local machines know themselves by a different address (and typically hostname) than the remote machines. The basic syntax of a readdress command is this: .sp readdress .I from-address .I to-address .I domain .PP The .I readdress statement simply makes a claim that the machine(s) in .I domain communicate with the machine(s) at .I from-address by sending a packet to .I to-address . Since most users have no use for this whatsoever, I'll describe it only briefly. .PP THIS IS NOT ROUTING. For example, my machine at home is connected via PPP to the network at my office. My machine at home thinks its ethernet address is 192.188.253.1 and its hostname is "talisman.com". The network at my office has the address 192.67.141.0. When I'm connected via PPP, my home machine is placed into the office network as address 192.67.141.9 with hostname "talisman.austin.eds.com". .PP YTalk needs to know that if it is running on domain 192.67.141.0 and receives packets from 192.188.253.1 that it should respond to 192.67.141.9, not 192.188.253.1. right? right. okay, okay, okay. I put this line into my .ytalkrc on both ends: .sp readdress talisman talisman.austin.eds.com 192.67.141.0 .PP On my home end, this translates to: .sp readdress 192.188.253.1 192.67.141.9 192.67.141.0 .PP which tells my home machine to advertise itself as "192.67.141.9" instead of "192.188.253.1" when YTalk-ing to machines on the network "192.67.141.0". On the office end, the readdress command translates to: .sp readdress 192.67.141.9 192.67.141.9 192.67.141.0 .PP which the office machines basically ignore. .PP Note that, in this case, the problem could also have been solved by telling the home YTalk to use the 192.67.141.0 interface, when doing YTalk requests across the PPP link. .SH FILES /usr/local/etc/ytalkrc .br System-wide defaults file. .PP ~/.ytalkrc .br User's local configuration file. This file overrides .br options set in the system ytalkrc file. .SH CURRENT MAINTAINER Andreas Kling .br .SH ORIGINAL AUTHOR Britt Yenne .SH PAST MAINTAINERS Roger Espel Llima .br Jessica Peterson .SH CONTRIBUTORS Special thanks to Carl Edman for numerous code patches, beta testing, and comments. I think this guy spends as much time on ytalk as I do. .PP Special thanks to Tobias Hahn and Geoff W. for beta testing and suggestions. .PP Thanks to Sitaram Ramaswamy for the original YTalk manpage. .PP Thanks to Magnus Hammerin for Solaris 2.* support. .PP Thanks to Thilo Wunderlich for Linux support. .PP Thanks to Jonas Yngvesson for aside messages in X. .PP Thanks to Andreas Stolcke for fixing the X resource database calls. .PP Thanks to Pete Wenzel for fixing the #elif directive. .PP Thanks to John Vanderpool, Shih-Chen Huang, Andrew Myers, Duncan Sinclair, Evan McLean, Larry Schwimmer, J. Adam Hawkes, and Mark Musone for comments and ideas. .PP Thanks to Steve McIntyre for patches and ideas. .PP Thanks to Katarina Erkkonen for CVS hosting. .PP Thanks to Alexander Rigbo for patches, testing and many good ideas. .SH BUGS Please mail any bugs to the maintainer of this version, at .SH SEE ALSO http://www.impul.se/ytalk/ .SH LICENSE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but \fBWITHOUT ANY WARRANTY\fR; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ytalk-3.3.0/docs/Makefile.in010064400017510000144000000227041020366103100145150ustar kesousers# Makefile.in generated by automake 1.9.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = docs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/ytalk.1.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac-curses.m4 \ $(top_srcdir)/m4/ac-defdir.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = ytalk.1 depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SYSTEM_DEFS = @SYSTEM_DEFS@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ man_MANS = \ ytalk.1 EXTRA_DIST = $(man_MANS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps docs/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps docs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ytalk.1: $(top_builddir)/config.status $(srcdir)/ytalk.1.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-exec-am: install-info: install-info-am install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-man uninstall-man: uninstall-man1 .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-man1 install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-info-am uninstall-man uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ytalk-3.3.0/ytalkrc010064400017510000144000000000671015433640400131220ustar kesousersturn scrolling on turn rering on turn prompt-rering on ytalk-3.3.0/m4004075500017510000144000000000001020366113400117635ustar kesousersytalk-3.3.0/m4/ac-curses.m4010064400017510000144000000046711015433640600142040ustar kesousersdnl --------------------------------------------------------------------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. AC_DEFUN([CF_CURSES_LIBS],[ AC_CHECK_FUNC(initscr,,[ case $host_os in #(vi freebsd*) #(vi AC_CHECK_LIB(mytinfo,tgoto,[LIBS="-lmytinfo $LIBS"]) ;; hpux10.*|hpux11.*) AC_CHECK_LIB(cur_colr,initscr,[ LIBS="-lcur_colr $LIBS" CFLAGS="-I/usr/include/curses_colr $CFLAGS" ac_cv_func_initscr=yes ],[ AC_CHECK_LIB(Hcurses,initscr,[ # HP's header uses __HP_CURSES, but user claims _HP_CURSES. LIBS="-lHcurses $LIBS" CFLAGS="-D__HP_CURSES -D_HP_CURSES $CFLAGS" ac_cv_func_initscr=yes ])]) ;; linux*) # Suse Linux does not follow /usr/lib convention LIBS="$LIBS -L/lib" ;; esac if test ".$With5lib" != ".no" ; then if test -d /usr/5lib ; then # SunOS 3.x or 4.x CPPFLAGS="$CPPFLAGS -I/usr/5include" LIBS="$LIBS -L/usr/5lib" fi fi if test ".$ac_cv_func_initscr" != .yes ; then cf_save_LIBS="$LIBS" cf_term_lib="" cf_curs_lib="" # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ for cf_term_lib in termcap termlib unknown do AC_CHECK_LIB($cf_term_lib,tgoto,[break]) done ]) # Check for library containing initscr test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" for cf_curs_lib in cursesX curses ncurses xcurses jcurses unknown do AC_CHECK_LIB($cf_curs_lib,initscr,[break]) done test $cf_curs_lib = unknown && AC_ERROR(no curses library found) LIBS="-l$cf_curs_lib $cf_save_LIBS" if test "$cf_term_lib" = unknown ; then AC_MSG_CHECKING(if we can link with $cf_curs_lib library) AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], [initscr()], [cf_result=yes], [cf_result=no]) AC_MSG_RESULT($cf_result) test $cf_result = no && AC_ERROR(Cannot link curses library) elif test "$cf_term_lib" != predefined ; then AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], [initscr(); tgoto((char *)0, 0, 0);], [cf_result=no], [ LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], [initscr()], [cf_result=yes], [cf_result=error]) ]) AC_MSG_RESULT($cf_result) fi fi ])]) ytalk-3.3.0/m4/ac-defdir.m4010064400017510000144000000005651015433640600141330ustar kesousersAC_DEFUN([AC_DEFINE_DIR], [ test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ac_define_dir=`eval echo [$]$2` ac_define_dir=`eval echo [$]ac_define_dir` $1="$ac_define_dir" AC_SUBST($1) ifelse($3, , AC_DEFINE_UNQUOTED($1, "$ac_define_dir"), AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3)) ]) ytalk-3.3.0/src004075500017510000144000000000001020366221700122355ustar kesousersytalk-3.3.0/src/Makefile.am010064400017510000144000000004571020172641300143500ustar kesousersbin_PROGRAMS = ytalk ytalk_SOURCES = \ main.c \ term.c \ user.c \ fd.c \ comm.c \ menu.c \ socket.c \ rc.c \ exec.c \ getpty.c \ cwin.c \ mem.c \ vt100.c \ gtalk.c \ header.h \ cwin.h \ mem.h \ socket.h \ menu.h \ gtalk.h INCLUDES = -I.. LIBS = @LIBS@ DEFS = @DEFS@ @SYSTEM_DEFS@ ytalk-3.3.0/src/comm.c010064400017510000144000000757051017747715400134440ustar kesousers/* * src/comm.c * firewall between socket and terminal I/O * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "header.h" #include "socket.h" #include "menu.h" #include "mem.h" #include "gtalk.h" #ifdef HAVE_IOVEC_H # include #endif #ifdef HAVE_SYS_UIO_H # include #endif #include #define IN_ADDR(s) ((s).sin_addr.s_addr) /* oops, some systems don't have this one */ #ifndef INADDR_LOOPBACK # define INADDR_LOOPBACK 0x7f000001 #endif ychar *io_ptr; /* user input pointer */ int io_len = 0; /* user input count */ int dont_change_my_addr = 0; /* set if the user specified a vhost, or * after the first time ytalk guesses the * local addr from a getsockname() call */ extern int input_flag; /* see fd.c */ /* ---- local functions ---- */ static y_parm parm; static v2_pack v2p; static v3_pack v3p; static v3_flags v3f; static v3_winch v3w; /* * Set up a drain of out-of-band data. */ static void drain_user(user, len, func) yuser *user; int len; void (*func) (); { if (len > user->dbuf_size) { user->dbuf_size = len + 64; user->dbuf = (ychar *) realloc_mem(user->dbuf, user->dbuf_size); } user->drain = len; user->dptr = user->dbuf; user->dfunc = func; } /* * Send out-of-band data. */ static void send_oob(fd, ptr, len) int fd; yaddr ptr; ychar len; { ychar oob, size; static struct iovec iov[3]; int r; oob = V3_OOB; iov[0].iov_base = (yaddr) (&oob); iov[0].iov_len = 1; size = len; iov[1].iov_base = (yaddr) (&size); iov[1].iov_len = 1; iov[2].iov_base = ptr; iov[2].iov_len = len; if ((r = writev(fd, iov, 3)) != len + 2) { if (r >= 0 || (errno != EPIPE && errno != ECONNRESET)) show_error("send_oob: write failed"); } } /* * Ask another ytalk connection if he wants to import a user I've just now * connected to. */ static void send_import(to, from) yuser *to, *from; { if (to->remote.vmajor > 2) { v3p.code = V3_IMPORT; v3p.host_addr = htonl(from->host_addr); v3p.pid = htonl(from->remote.pid); strncpy(v3p.name, from->user_name, V3_NAMELEN); strncpy(v3p.host, from->host_fqdn, V3_HOSTLEN); send_oob(to->fd, (yaddr)&v3p, V3_PACKLEN); } else if (to->remote.vmajor == 2) { v2p.code = V2_IMPORT; strncpy(v2p.name, from->user_name, V2_NAMELEN); strncpy(v2p.host, from->host_fqdn, V2_HOSTLEN); write(to->fd, (yaddr)&v2p, V2_PACKLEN); } } /* * Tell another ytalk connection to connect to a user. */ static void send_accept(to, from) yuser *to, *from; { if (to->remote.vmajor > 2) { v3p.code = V3_ACCEPT; v3p.host_addr = htonl(from->host_addr); v3p.pid = htonl(from->remote.pid); strncpy(v3p.name, from->user_name, V3_NAMELEN); strncpy(v3p.host, from->host_fqdn, V3_HOSTLEN); send_oob(to->fd, (yaddr)&v3p, V3_PACKLEN); } else if (to->remote.vmajor == 2) { v2p.code = V2_ACCEPT; strncpy(v2p.name, from->user_name, V2_NAMELEN); strncpy(v2p.host, from->host_fqdn, V2_HOSTLEN); write(to->fd, (yaddr)&v2p, V2_PACKLEN); } } /* * Process a Ytalk version 2.? data packet. */ static void v2_process(user, pack) yuser *user; v2_pack *pack; { register yuser *u; ylong host_addr; char *estr, *name, *host; name = get_mem(V2_NAMELEN + 1); host = get_mem(V2_HOSTLEN + 1); /* * Ytalk version 2.* didn't have very clever import/export * capabilities. We'll just go with the flow. */ strncpy(name, pack->name, V2_NAMELEN); strncpy(host, pack->host, V2_HOSTLEN); name[V2_NAMELEN] = '\0'; host[V2_HOSTLEN] = '\0'; if ((host_addr = get_host_addr(host)) == (ylong) -1) { errno = 0; #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "unknown host: '%s'", host); #else sprintf(errstr, "unknown host: '%s'", host); #endif show_error(errstr); show_error("port from ytalk V2.? failed"); free_mem(host); free_mem(name); return; } estr = get_mem(V2_NAMELEN + V2_HOSTLEN + 20); switch (pack->code) { case V2_IMPORT: /* * Don't import a user with the same name of an existing user * at this end. yukk. */ if (find_user(name, host_addr, (ylong) -1) != NULL) break; if (!(def_flags & FL_IMPORT)) { #ifdef HAVE_SNPRINTF snprintf(estr, V2_NAMELEN + V2_HOSTLEN + 20, "Import %s@%s?", name, host); #else sprintf(estr, "Import %s@%s?", name, host); #endif if (yes_no(estr) == 'n') break; } /* invite him but don't ring him */ #ifdef HAVE_SNPRINTF snprintf(estr, V2_NAMELEN + V2_HOSTLEN + 20, "%s@%s", name, host); #else sprintf(estr, "%s@%s", name, host); #endif (void) invite(estr, 0); /* now tell him to connect to us */ pack->code = V2_EXPORT; write(user->fd, pack, V2_PACKLEN); break; case V2_EXPORT: /* * We don't need to check if he's not connected, since * send_accept() will think his version number is zero and * won't send anything. */ if ((u = find_user(name, host_addr, (ylong) -1)) == NULL) break; send_accept(u, user); break; case V2_ACCEPT: #ifdef HAVE_SNPRINTF snprintf(estr, V2_NAMELEN + V2_HOSTLEN + 20, "%s@%s", name, host); #else sprintf(estr, "%s@%s", name, host); #endif (void) invite(estr, 1); /* we should be expected */ break; } free_mem(host); free_mem(name); free_mem(estr); } /* * Process a Ytalk version 3.? data packet. */ static void v3_process_pack(user, pack) yuser *user; v3_pack *pack; { register yuser *u, *u2; ylong host_addr, pid; char *estr, *name, *host; estr = get_mem(V3_NAMELEN + V3_HOSTLEN + 20); name = get_mem(V3_NAMELEN + 1); host = get_mem(V3_HOSTLEN + 1); strncpy(name, pack->name, V3_NAMELEN); strncpy(host, pack->host, V3_HOSTLEN); name[V3_NAMELEN] = '\0'; host[V3_HOSTLEN] = '\0'; if ((host_addr = get_host_addr(host)) == (ylong) -1) host_addr = ntohl(pack->host_addr); pid = ntohl(pack->pid); switch (pack->code) { case V3_IMPORT: /* * Don't import a user which is already in this session. * This is defined as a user with a matching name, host * address, and process id. */ if (find_user(name, host_addr, pid) != NULL) break; if (!(def_flags & FL_IMPORT)) { #ifdef HAVE_SNPRINTF snprintf(estr, V3_NAMELEN + V3_HOSTLEN + 20, "Import %s@%s?", name, host); #else sprintf(estr, "Import %s@%s?", name, host); #endif if (yes_no(estr) == 'n') break; } /* invite him but don't ring him */ #ifdef HAVE_SNPRINTF snprintf(estr, V3_NAMELEN + V3_HOSTLEN + 20, "%s@%s", name, host); #else sprintf(estr, "%s@%s", name, host); #endif u2 = invite(estr, 0); /* * fix the pid, so that two quick V3_IMPORT requests of the * same user still get caught -roger */ if (u2 != NULL && strcmp(u2->user_name, name) == 0 && host_addr == u2->host_addr) { u2->remote.pid = pid; } /* now tell him to connect to us */ pack->code = V3_EXPORT; send_oob(user->fd, (yaddr)pack, V3_PACKLEN); break; case V3_EXPORT: /* * We don't need to check if he's not connected, since * send_accept() will think his version number is zero and * won't send anything. */ if ((u = find_user(name, host_addr, pid)) == NULL) break; send_accept(u, user); break; case V3_ACCEPT: #ifdef HAVE_SNPRINTF snprintf(estr, V3_NAMELEN + V3_HOSTLEN + 20, "%s@%s", name, host); #else sprintf(estr, "%s@%s", name, host); #endif (void) invite(estr, 1); /* we should be expected */ break; } free_mem(host); free_mem(name); free_mem(estr); } /* * Process a Ytalk version 3.? flags packet. Other users can request that * their flags be locked to a particular value until they unlock them later. */ static void v3_process_flags(user, pack) yuser *user; v3_flags *pack; { switch (pack->code) { case V3_LOCKF: user->flags = ntohl(pack->flags) | FL_LOCKED; break; case V3_UNLOCKF: user->flags = def_flags; break; } } /* * Process a Ytalk version 3.? winch packet. */ static void v3_process_winch(user, pack) yuser *user; v3_winch *pack; { switch (pack->code) { case V3_YOURWIN: user->remote.my_rows = ntohs(pack->rows); user->remote.my_cols = ntohs(pack->cols); winch_exec(); break; case V3_MYWIN: user->remote.rows = ntohs(pack->rows); user->remote.cols = ntohs(pack->cols); break; case V3_REGION: pack->rows = ntohs(pack->rows); pack->cols = ntohs(pack->cols); if (pack->rows > 0) set_win_region(user, (int) (pack->rows), (int) (pack->cols)); else end_win_region(user); break; } user_winch = 1; } /* * Process a Ytalk version 3.? out-of-band packet. Call the appropriate * function based on the type of packet. */ static void v3_process(user, ptr) yuser *user; yaddr ptr; { ychar *str; /* ignore anything we don't understand */ str = (ychar *) ptr; switch (*str) { case V3_IMPORT: case V3_EXPORT: case V3_ACCEPT: v3_process_pack(user, (v3_pack *) ptr); break; case V3_LOCKF: case V3_UNLOCKF: v3_process_flags(user, (v3_flags *) ptr); break; case V3_YOURWIN: case V3_MYWIN: case V3_REGION: v3_process_winch(user, (v3_winch *) ptr); break; } } /* * Take input from a connected user. If necessary, drain out-of-band data * from the canonical input stream. */ static void read_user(fd) int fd; { register ychar *c, *p; register ssize_t rc; register yuser *user; static ychar buf[512]; if (input_flag) { /* tell input_loop() to ignore this function for now */ input_flag = 0; return; } if ((user = fd_to_user[fd]) == NULL) { remove_fd(fd); show_error("read_user: unknown contact"); return; } if ((rc = read(fd, buf, sizeof(buf))) <= 0) { if (rc < 0 && errno != ECONNRESET && errno != EPIPE) show_error("read_user: read() failed"); free_user(user); return; } c = buf; while (rc > 0) { if (user->drain > 0) { /* there is still some OOB data to * drain */ if (rc < user->drain) { memcpy(user->dptr, c, (size_t)rc); user->dptr += rc; user->drain -= rc; rc = 0; } else { memcpy(user->dptr, c, (size_t)user->drain); rc -= user->drain; c += user->drain; user->drain = 0; user->dfunc(user, user->dbuf); } } else { /* * Ytalk version 3.0 Out-Of-Band data protocol: * * If I receive a V3_OOB character, I look at the next * character. If the next character is V3_OOB, then * I send one V3_OOB through transparently. Else, * the next character is a packet length to be * drained. The packet length can never be V3_OOB * because the maximum out-of-band packet length is * (V3_OOB - 1) bytes. If any packet requires more * information, then it can always kick off another * drain_user() inside v3_process(). */ p = buf; if (user->got_oob) { user->got_oob = 0; if (*c <= V3_MAXPACK) { drain_user(user, *c, v3_process); c++, rc--; continue; } *(p++) = *c; c++, rc--; } for (; rc > 0; c++, rc--) { if (*c > 127) { /* could be inline data */ if (user->remote.vmajor > 2) { /* ytalk 3.0+ */ if (*c == V3_OOB) { c++, rc--; if (rc > 0) { if (*c <= V3_MAXPACK) { drain_user(user, *c, v3_process); c++, rc--; break; } } else { user->got_oob = 1; break; } } } else if (user->remote.vmajor == 2) { /* ytalk 2.0+ */ /* * Version 2.* didn't support * data transparency */ if (*c == V2_IMPORT || *c == V2_EXPORT || *c == V2_ACCEPT || *c == V2_AUTO) { drain_user(user, V2_PACKLEN, v2_process); /* * don't increment c * or decrement rc -- * they're part of * the drain. :-) */ break; } } } *(p++) = *c; } if (p > buf) { if (user->output_fd > 0) if (write(user->output_fd, buf, (size_t)(p - buf)) <= 0) { show_error("write to user output file failed"); close(user->output_fd); user->output_fd = 0; } show_input(user, buf, p - buf); } } } } /* * Initial Handshaking: read the parameter pack from another ytalk user. */ static void ytalk_user(fd) int fd; { register yuser *user, *u; u_short cols; if ((user = fd_to_user[fd]) == NULL) { remove_fd(fd); show_error("ytalk_user: unknown contact"); return; } if (full_read(user->fd, (char *) &parm, sizeof(y_parm)) < 0) { free_user(user); show_error("ytalk_user: bad ytalk contact"); return; } switch (parm.protocol) { case YTP_OLD: cols = parm.w_cols; memset(&parm, 0, sizeof(y_parm)); parm.vmajor = 2; parm.cols = cols; parm.my_cols = cols; spew_term(me, fd, me->t_rows, parm.cols); break; case YTP_NEW: parm.vmajor = ntohs(parm.vmajor); parm.vminor = ntohs(parm.vminor); parm.rows = ntohs(parm.rows); parm.cols = ntohs(parm.cols); parm.my_rows = ntohs(parm.my_rows); parm.my_cols = ntohs(parm.my_cols); parm.pid = ntohl(parm.pid); /* we spew_term later */ break; default: free_user(user); show_error("ytalk_user: unsupported ytalk protocol"); return; } user->remote = parm; /* YTalk >= 3.2.0 handles CR and LF separately */ if ((user->remote.vmajor < 3) || (user->remote.vmajor == 3 && user->remote.vminor < 2)) user->crlf = 0; else user->crlf = 1; user_winch = 1; add_fd(fd, read_user); /* update the lists */ if (user == wait_list) wait_list = user->next; else for (u = wait_list; u; u = u->next) if (u->next == user) { u->next = user->next; break; } user->next = connect_list; connect_list = user; /* send him my status */ if (user->remote.vmajor > 2) { if (me->region_set) { v3w.code = V3_REGION; v3w.rows = htons(me->rows); v3w.cols = htons(me->cols); send_oob(fd, (yaddr)&v3w, V3_WINCHLEN); winch_exec(); spew_term(me, fd, me->rows, me->cols); } else spew_term(me, fd, parm.rows, parm.cols); if (me->flags & FL_LOCKED) { v3f.code = V3_LOCKF; v3f.flags = htonl(me->flags); send_oob(fd, (yaddr)&v3f, V3_FLAGSLEN); } } /* tell everybody else he's here! */ for (u = connect_list; u; u = u->next) if (u != user) send_import(u, user); } /* * Initial Handshaking: read the edit keys and determine whether or not this * is another ytalk user. */ static void connect_user(fd) int fd; { register yuser *user, *u; if ((user = fd_to_user[fd]) == NULL) { remove_fd(fd); show_error("connect_user: unknown contact"); return; } if (full_read(fd, user->edit, 3) < 0) { free_user(user); show_error("connect_user: bad read"); return; } if (open_term(user, user->full_name) < 0) { free_user(user); show_error("connect_user: open_term() failed"); return; } /* check for ytalk connection */ if (user->RUB == RUBDEF) { memset(&parm, 0, sizeof(y_parm)); parm.protocol = YTP_NEW; parm.vmajor = htons(VMAJOR); parm.vminor = htons(VMINOR); parm.rows = htons(me->t_rows); parm.cols = htons(me->t_cols); parm.my_rows = htons(user->t_rows); parm.my_cols = htons(user->t_cols); parm.w_rows = parm.rows; parm.w_cols = parm.cols; parm.pid = htonl(me->remote.pid); write(user->fd, &parm, sizeof(y_parm)); add_fd(fd, ytalk_user); } else { /* update the lists */ if (user == wait_list) wait_list = user->next; else for (u = wait_list; u; u = u->next) if (u->next == user) { u->next = user->next; break; } user->next = connect_list; connect_list = user; spew_term(me, fd, me->t_rows, me->t_cols); user_winch = 1; add_fd(fd, read_user); } } /* * Initial Handshaking: delete his invitation (if it exists) and send my * edit keys. */ static void contact_user(fd) int fd; { register yuser *user; register int n; socklen_t socklen; struct sockaddr_in peer; char *hname; remove_fd(fd); if ((user = fd_to_user[fd]) == NULL) { show_error("contact_user: unknown contact"); return; } (void) send_dgram(user, DELETE_INVITE); socklen = sizeof(struct sockaddr_in); if ((n = accept(fd, (struct sockaddr *) & (user->sock), &socklen)) < 0) { free_user(user); if (errno != EPIPE && errno != ECONNRESET) show_error("connect_user: accept() failed"); return; } close(fd); fd_to_user[fd] = NULL; /* * make sure the connection comes from the right place, else update * the title to reflect the new name */ socklen = sizeof(struct sockaddr_in); if (getpeername(n, (struct sockaddr *) & peer, &socklen) >= 0) { if (IN_ADDR(peer) != user->host_addr) { if (user->host_name) free_mem(user->host_name); if (user->host_fqdn) free_mem(user->host_fqdn); user->host_addr = IN_ADDR(peer); hname = host_name(user->host_addr); user->host_name = str_copy(hname); user->host_fqdn = str_copy(hname); generate_full_name(user); show_error("Connection from unexpected host!"); } } user->fd = n; fd_to_user[user->fd] = user; add_fd(user->fd, connect_user); write(user->fd, me->edit, 3); /* send the edit keys */ } /* * Do a word wrap. */ static int word_wrap(user) register yuser *user; { register int i, x, bound; static ychar temp[20]; x = user->x; if ((bound = (x / 2)) > 20) bound = 20; for (i = 1; i < bound && user->scr[user->y][x - i] != ' '; i++) temp[i] = user->scr[user->y][x - i]; if (i >= bound) return -1; move_term(user, user->y, x - i); clreol_term(user); newline_term(user); for (i--; i >= 1; i--) addch_term(user, temp[i]); return 0; } /* * Ring a user. If he has an auto-invitation port established then talk to * that instead of messing up his screen. */ static int announce(user) yuser *user; { register int rc, fd; errno = 0; while ((rc = send_dgram(user, AUTO_LOOK_UP)) == 0) { /* he has an auto-invite port established */ if ((fd = connect_to((yuser *) 0)) < 0) { if (fd == -3) /* it's one of my sockets... *sigh* */ break; if (fd == -2) { /* connection refused -- they hung * up! */ (void) send_dgram(user, AUTO_DELETE); errno = 0; continue; } return -1; } /* * Go ahead and use the Ytalk version 2.? auto-announce * packet. */ v2p.code = V2_AUTO; strncpy(v2p.name, me->user_name, V2_NAMELEN); strncpy(v2p.host, me->host_name, V2_HOSTLEN); v2p.name[V2_NAMELEN - 1] = '\0'; v2p.host[V2_HOSTLEN - 1] = '\0'; write(fd, &v2p, V2_PACKLEN); close(fd); return 0; } if (rc == -1) return -1; errno = 0; if ((rc = send_dgram(user, ANNOUNCE)) == 0) return 0; if (rc == 4) /* mesg n (refusing messages) */ return 1; return -1; } /* ---- global functions ---- */ /* * Invite a user into the conversation. */ yuser * invite(name, send_announce) register char *name; int send_announce; { register int rc; char *hisname, *hishost, *histty; yuser *user; /* * First break down the username into login name and login host, * assuming our host as a default. */ name = resolve_alias(name); hisname = str_copy(name); hishost = NULL; histty = NULL; for (name = hisname; *name; name++) { if (*name == '@') { *name = '\0'; hishost = name + 1; } if (*name == '#') { *name = '\0'; histty = name + 1; } } user = new_user(hisname, hishost, histty); free_mem(hisname); if (user == NULL) return NULL; /* * Trick to handle multihomed hosts. Bad placement, but this * location in the code makes it easier to patch. Otherwise, ytalk * would need to be rewritten. I also could be wrong. * * This trick is the same idea as the talk patch for multihomed hosts * included in NetKit-0.09 for Linux. * * (patch by Sean Farley, simplified & integrated by Roger Espel Llima) */ if (!dont_change_my_addr) { struct sockaddr_in tmpsock; socklen_t i; int sock; sock = socket(PF_INET, SOCK_DGRAM, 0); if (sock >= 0) { tmpsock.sin_port = htons(518); tmpsock.sin_family = AF_INET; tmpsock.sin_addr.s_addr = user->host_addr; if (connect(sock, (struct sockaddr *) & tmpsock, sizeof(tmpsock)) == 0) { i = sizeof(struct sockaddr_in); /* * SysV tends to return 0.0.0.0 here, must * check */ if (getsockname(sock, (struct sockaddr *) & tmpsock, &i) == 0 && tmpsock.sin_addr.s_addr != htonl(INADDR_ANY) && tmpsock.sin_addr.s_addr != htonl(INADDR_LOOPBACK)) { me->host_addr = tmpsock.sin_addr.s_addr; dont_change_my_addr++; } } close(sock); } } /* Now send off the invitation */ user->next = wait_list; wait_list = user; user_winch = 1; while ((rc = send_dgram(user, LOOK_UP)) == 0) { /* We are expected... */ if ((rc = connect_to(user)) < 0) { if (rc == -3) /* it's one of my sockets... *sigh* */ break; if (rc == -2) { /* connection refused -- they hung * up! */ (void) send_dgram(user, DELETE); continue; } free_user(user); return NULL; } user->last_invite = (ylong) time(NULL); add_fd(user->fd, connect_user); write(user->fd, me->edit, 3); /* send the edit keys */ return user; } if (rc == -1) { /* * don't ask whether to re-ring for a while even if not * successful! -roger */ user->last_invite = (ylong) time(NULL); return user; } /* Leave an invitation for him, and announce ourselves. */ if (send_announce) { #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "Ringing %s...", user->user_name); #else sprintf(errstr, "Ringing %s...", user->user_name); #endif msg_term(me, errstr); } if (newsock(user) != 0) { free_user(user); return NULL; } (void) send_dgram(user, LEAVE_INVITE); user->last_invite = (ylong) time(NULL); if (send_announce && (rc = announce(user)) != 0) { (void) send_dgram(user, DELETE_INVITE); if (rc > 0) #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "%s refusing messages", user->full_name); #else sprintf(errstr, "%s refusing messages", user->full_name); #endif else #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "%s not logged in", user->full_name); #else sprintf(errstr, "%s not logged in", user->full_name); #endif show_error(errstr); free_user(user); return NULL; } add_fd(user->fd, contact_user); return user; } /* * Periodic housecleaning. */ void house_clean() { register yuser *u, *next; ylong t; static char estr[80]; static ylong last_auto = 0; int answer, rc; t = (ylong) time(NULL); if (t - last_auto >= 30) { last_auto = t; if (send_auto(LEAVE_INVITE) != 0) { show_error("house_clean: send_auto() failed"); kill_auto(); } } for (u = wait_list; u; u = next) { next = u->next; if (t - u->last_invite >= 30) { (void) send_dgram(u, LEAVE_INVITE); u->last_invite = t = (ylong) time(NULL); if (!(def_flags & FL_RING)) continue; if (def_flags & FL_PROMPTRING) { if (input_flag) continue; #ifdef HAVE_SNPRINTF snprintf(estr, sizeof(estr), "Rering %s?", u->full_name); #else sprintf(estr, "Rering %s?", u->full_name); #endif answer = yes_no(estr); t = (ylong) time(NULL); if (answer == 'n') continue; } if ((rc = announce(u)) != 0) { (void) send_dgram(u, DELETE_INVITE); if (rc > 0) #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "%s refusing messages", u->full_name); #else sprintf(errstr, "%s refusing messages", u->full_name); #endif else #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "%s not logged in", u->full_name); #else sprintf(errstr, "%s not logged in", u->full_name); #endif show_error(errstr); free_user(u); } } } } void rering_all() { yuser *u, *next; int rc; if (send_auto(LEAVE_INVITE) != 0) { show_error("rering_all: send_auto() failed"); kill_auto(); } for (u = wait_list; u; u = next) { next = u->next; (void) send_dgram(u, LEAVE_INVITE); u->last_invite = (ylong) time(NULL); if ((rc = announce(u)) != 0) { (void) send_dgram(u, DELETE_INVITE); if (rc > 0) #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "%s refusing messages", u->full_name); #else sprintf(errstr, "%s refusing messages", u->full_name); #endif else #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "%s not logged in", u->full_name); #else sprintf(errstr, "%s not logged in", u->full_name); #endif show_error(errstr); free_user(u); } } } void send_winch(user) yuser *user; { register yuser *u; v3w.rows = htons(user->t_rows); v3w.cols = htons(user->t_cols); if (user == me) { v3w.code = V3_MYWIN; for (u = connect_list; u; u = u->next) if (u->remote.vmajor > 2) send_oob(u->fd, (yaddr)&v3w, V3_WINCHLEN); winch_exec(); } else if (user->remote.vmajor > 2) { v3w.code = V3_YOURWIN; send_oob(user->fd, (yaddr)&v3w, V3_WINCHLEN); } } void send_region() { register yuser *u; v3w.code = V3_REGION; v3w.rows = htons(me->rows); v3w.cols = htons(me->cols); for (u = connect_list; u; u = u->next) if (u->remote.vmajor > 2) send_oob(u->fd, (yaddr)&v3w, V3_WINCHLEN); } void send_end_region() { register yuser *u; v3w.code = V3_REGION; v3w.rows = htons(0); v3w.cols = htons(0); for (u = connect_list; u; u = u->next) if (u->remote.vmajor > 2) send_oob(u->fd, (yaddr)&v3w, V3_WINCHLEN); } /* * Send some output to a given user. Sends the output to all connected users * if the given user is either "me" or NULL. */ void send_users(user, buf, len, cbuf, clen) yuser *user; ychar *buf, *cbuf; int len, clen; { register yuser *u; ychar *o, *b, *co, *cb; static ychar *o_buf = NULL; static ychar *o_cbuf = NULL; static int o_len = 0, o_clen = 0; /* duplicate OOB markers to allow transmission of 'ý' */ if ((len << 1) > o_len) { o_len = (len << 1) + 512; o_buf = realloc_mem(o_buf, o_len); } if ((clen << 1) > o_clen) { o_clen = (clen << 1) + 512; o_cbuf = realloc_mem(o_cbuf, o_clen); } for (b = buf, o = o_buf; len > 0; b++, len--) { *(o++) = *b; if (*b == V3_OOB) *(o++) = V3_OOB; } for (cb = cbuf, co = o_cbuf; clen > 0; cb++, clen--) { *(co++) = *cb; if (*cb == V3_OOB) *(co++) = V3_OOB; } if (user && user != me) { if (user->fd > 0) { /* just to be sure... */ if (user->remote.vmajor > 2) if (user->crlf == 1) write(user->fd, o_cbuf, (size_t)(co - o_cbuf)); else write(user->fd, o_buf, (size_t)(o - o_buf)); else write(user->fd, buf, (size_t)(b - buf)); } } else { for (u = connect_list; u; u = u->next) if (user->remote.vmajor > 2) if (u->crlf == 1) write(u->fd, o_cbuf, (size_t)(co - o_cbuf)); else write(u->fd, o_buf, (size_t)(o - o_buf)); else write(u->fd, buf, (size_t)(b - buf)); } } /* * Display user input. Emulate ANSI. */ void show_input(user, buf, len) yuser *user; register ychar *buf; register int len; { if (user->vt.got_esc) { process_esc: for (; len > 0; len--, buf++) { vt100_process(user, *buf); if (user->vt.got_esc == 0) { len--, buf++; break; } } } if (user->gt.got_gt) { process_gt: for (; len > 0; len--, buf++) { gtalk_process(user, *buf); if (user->gt.got_gt == 0) { len--, buf++; if (*buf == '\n') len--, buf++; break; } } } for (; len > 0; len--, buf++) { if (is_printable(*buf)) { if (user->x + 1 >= user->cols) { if (user->flags & FL_WRAP) { if (*buf == ' ') newline_term(user); else if (word_wrap(user) >= 0) addch_term(user, *buf); else { addch_term(user, *buf); newline_term(user); } } else { if (user->x == user->cols - 1) { if (user->onend == 1) { newline_term(user); addch_term(user, *buf); user->onend = 0; } else { addch_term(user, *buf); user->onend = 1; } } } } else addch_term(user, *buf); } else if (*buf == user->RUB && !(user->flags & FL_RAW)) rub_term(user); else if (*buf == user->WORD && !(user->flags & FL_RAW)) word_term(user); else if (*buf == user->KILL && !(user->flags & FL_RAW)) kill_term(user); else { switch (*buf) { case 7: /* Bell */ if (def_flags & FL_BEEP) putc(7, stderr); break; case 8: /* Backspace */ if (user->x > 0) move_term(user, user->y, user->x - 1); break; case 9: /* Tab */ tab_term(user); break; case 10: /* Line Feed */ if (user->crlf == 1) lf_term(user); else newline_term(user); break; case 11: /* Vertical tab */ lf_term(user); break; case 13: /* Carriage Return */ if ((user->flags & FL_RAW) || (user->crlf == 1)) move_term(user, user->y, 0); else newline_term(user); break; case 27: /* Escape */ user->vt.got_esc = 1; user->vt.ac = 0; user->vt.av[0] = 0; user->vt.av[1] = 0; user->vt.hash = 0; user->vt.lparen = 0; len--, buf++; goto process_esc; /* ugly but _fast_ */ case GTALK_ESCAPE: user->gt.got_gt = 1; user->gt.type = 0; user->gt.len = 0; len--, buf++; goto process_gt; default: if (*buf < ' ') { /* show a control char */ } } } } flush_term(user); } /* * Process keyboard input. */ void my_input(user, buf, len) yuser *user; ychar *buf; int len; { ychar *c, *n; int i, j; static ychar *nbuf = NULL; static int nlen = 0; /* If someone's waiting for input, give it to them! */ if (input_flag) { io_ptr = buf; io_len = len; return; } /* Substitution buffer for LF -> CRLF */ if ((len << 1) > nlen) { nlen = (len << 1) + 512; nbuf = realloc_mem(nbuf, nlen); } /* Process input normally */ while (len > 0) { /* check for a menu in process */ if (menu_ptr) { io_ptr = buf; io_len = len; update_menu(); buf = io_ptr; len = io_len; io_len = 0; } /* check for a running process */ if (running_process) { io_ptr = buf; io_len = len; update_exec(); buf = io_ptr; len = io_len; io_len = 0; } else { /* do normal input */ while (len > 0) { c = buf; for (; len > 0; buf++, len--) { if (*buf == me->old_rub || *buf == 8 || *buf == 0x7f) *buf = me->RUB; else if (*buf == 3) /* Ctrl-C */ bail(0); else if (*buf == '\r') /* CR */ *buf = '\n'; else if (*buf == 27) /* Esc */ break; else if (*buf == 12 || *buf == 18) /* ^L or ^R */ break; } if ((i = buf - c) > 0) { for (n = nbuf, j = 0; j < (buf - c); n++, j++) { if (c[j] == '\n') { *(n++) = '\r'; *n = '\n'; } else *n = c[j]; } j = (n - nbuf); show_input(me, nbuf, j); send_users(user, c, i, nbuf, j); } if (len > 0) { /* we broke for a special char */ if (*buf == 27) /* ESC */ break; if (*buf == 12 || *buf == 18) { /* ^L or ^R */ redraw_all_terms(); buf++, len--; } } } } /* start a menu if necessary */ if (len > 0) { buf++, len--; show_main_menu(); if (len <= 0) update_menu(); } } } void lock_flags(flags) ylong flags; { register yuser *u; me->flags = flags | FL_LOCKED; /* send to connected users... */ v3f.code = V3_LOCKF; v3f.flags = htonl(me->flags); for (u = connect_list; u; u = u->next) if (u->remote.vmajor > 2) send_oob(u->fd, (yaddr)&v3f, V3_FLAGSLEN); } void unlock_flags() { register yuser *u; me->flags = def_flags; /* send to connected users... */ v3f.code = V3_UNLOCKF; v3f.flags = htonl(me->flags); for (u = connect_list; u; u = u->next) if (u->remote.vmajor > 2) send_oob(u->fd, (yaddr)&v3f, V3_FLAGSLEN); } ytalk-3.3.0/src/cwin.c010064400017510000144000000167261017625003000134240ustar kesousers/* * src/cwin.c * curses interface * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "header.h" #include "mem.h" #ifdef HAVE_NCURSES_H # include #else # include #endif /* Some systems, notably Solaris, don't have sys/signal.h */ #include #include "cwin.h" typedef struct _ywin { struct _ywin *next; /* next ywin in linked list */ yuser *user; /* user pointer */ WINDOW *win; /* window pointer */ int height, width; /* height and width in characters */ int row, col; /* row and column position on screen */ char *title; /* window title string */ } ywin; static ywin *head; /* head of linked list */ /* * Take input from the user. */ static void curses_input(fd) int fd; { register int rc; static ychar buf[MAXBUF]; if ((rc = read(fd, buf, MAXBUF)) <= 0) { if (rc == 0) bail(YTE_SUCCESS); bail(YTE_ERROR); } my_input(me, buf, rc); } static ywin * new_ywin(user, title) yuser *user; char *title; { register ywin *out; register int len; len = strlen(title); out = (ywin *) get_mem(sizeof(ywin) + len + 1); memset(out, 0, sizeof(ywin)); out->user = user; out->title = ((char *) out) + sizeof(ywin); strcpy(out->title, title); return out; } static void make_win(w, height, width, row, col) ywin *w; int height, width, row, col; { if ((w->win = newwin(height, width, row, col)) == NULL) { w = (ywin *) (me->term); if (w->win != NULL) show_error("make_win: newwin() failed"); bail(YTE_ERROR); } w->height = height; w->width = width; w->row = row; w->col = col; scrollok(w->win, FALSE); wmove(w->win, 0, 0); } static void draw_title(w) ywin *w; { register int pad, x; register char *t; if ((int) strlen(w->title) > w->width) { for (x = 0; x < w->width; x++) addch('-'); return; } pad = (w->width - strlen(w->title)) / 2; move(w->row - 1, w->col); x = 0; for (; x < pad - 2; x++) addch('-'); if (pad >= 2) { addch('='); addch(' '); x += 2; } for (t = w->title; *t && x < w->width; x++, t++) addch(*t); if (pad >= 2) { addch(' '); addch('='); x += 2; } for (; x < w->width; x++) addch('-'); } /* * Return number of lines per window, given "wins" windows. */ static int win_size(wins) int wins; { if (wins == 0) return 0; return (LINES - 1) / wins; } /* * Break down and redraw all user windows. */ static void curses_redraw() { register ywin *w; register int row, wins, wsize; /* kill old windows */ wins = 0; for (w = head; w; w = w->next) { if (w->win) { delwin(w->win); w->win = NULL; } wins++; } if ((wsize = win_size(wins)) < 3) { end_term(); errno = 0; show_error("curses_redraw: window size too small"); bail(YTE_ERROR); } /* make new windows */ clear(); refresh(); row = 0; for (w = head; w; w = w->next) { if (w->next) { make_win(w, wsize - 1, COLS, row + 1, 0); resize_win(w->user, wsize - 1, COLS); } else { make_win(w, LINES - row - 2, COLS, row + 1, 0); resize_win(w->user, LINES - row - 2, COLS); } draw_title(w); row += wsize; refresh(); wrefresh(w->win); } } /* * Start curses and set all options. */ static void curses_start() { char *term; if (initscr() == NULL) { term = getenv("TERM"); fprintf(stderr, "Error opening terminal: %s.\n", (term ? term : "(null)")); bail(YTE_INIT); } noraw(); crmode(); noecho(); clear(); } /* * Restart curses... window size has changed. */ static RETSIGTYPE curses_restart() { register ywin *w; /* kill old windows */ for (w = head; w; w = w->next) if (w->win) { delwin(w->win); w->win = NULL; } /* restart curses */ endwin(); curses_start(); /* fix for ncurses from Max */ refresh(); curses_redraw(); #ifdef SIGWINCH /* some systems require we do this again */ signal(SIGWINCH, (void (*)())curses_restart); #endif } /* ---- global functions ---- */ void init_curses() { curses_start(); refresh(); head = NULL; add_fd(0, curses_input);/* set up user's input function */ #ifdef SIGWINCH /* set up SIGWINCH signal handler */ signal(SIGWINCH, (void (*)())curses_restart); #endif } void end_curses() { move(LINES - 1, 0); clrtoeol(); refresh(); endwin(); } /* * Open a new window. */ int open_curses(user, title) yuser *user; char *title; { register ywin *w; register int wins; /* * count the open windows. We want to ensure at least three lines * per window. */ wins = 0; for (w = head; w; w = w->next) wins++; if (win_size(wins + 1) < 3) return -1; /* add the new user */ if (head == NULL) w = head = new_ywin(user, title); else for (w = head; w; w = w->next) if (w->next == NULL) { w->next = new_ywin(user, title); w = w->next; break; } user->term = w; /* redraw */ curses_redraw(); return 0; } /* * Close a window. */ void close_curses(user) yuser *user; { register ywin *w, *p; /* zap the old user */ w = (ywin *) (user->term); if (w == head) head = w->next; else { for (p = head; p; p = p->next) if (w == p->next) { p->next = w->next; break; } if (p == NULL) { show_error("close_curses: user not found"); return; } } delwin(w->win); free_mem(w); w = NULL; user->term = NULL; curses_redraw(); } void addch_curses(user, c) yuser *user; register ychar c; { register ywin *w; register int x, y; w = (ywin *) (user->term); getyx(w->win, y, x); waddch(w->win, c); if (x >= COLS - 1) wmove(w->win, y, x); } void move_curses(user, y, x) yuser *user; register int y, x; { register ywin *w; w = (ywin *) (user->term); wmove(w->win, y, x); } void clreol_curses(user) register yuser *user; { register ywin *w; w = (ywin *) (user->term); wclrtoeol(w->win); } void clreos_curses(user) register yuser *user; { register ywin *w; w = (ywin *) (user->term); wclrtobot(w->win); } void scroll_curses(user) register yuser *user; { register ywin *w; /* * Curses uses busted scrolling. In order to call scroll() * effectively, scrollok() must be TRUE. However, if scrollok() is * TRUE, then placing a character in the lower right corner will * cause an auto-scroll. *sigh* */ w = (ywin *) (user->term); scrollok(w->win, TRUE); scroll(w->win); scrollok(w->win, FALSE); /* * Some curses won't leave the cursor in the same place, and some * curses programs won't erase the bottom line properly. */ wmove(w->win, user->t_rows - 1, 0); wclrtoeol(w->win); wmove(w->win, user->y, user->x); } void keypad_curses(bf) bool bf; { #ifdef HAVE_KEYPAD keypad(((ywin *) (me->term))->win, bf); #endif } void flush_curses(user) register yuser *user; { register ywin *w; w = (ywin *) (user->term); wrefresh(w->win); } /* * Clear and redisplay. */ void redisplay_curses() { register ywin *w; clear(); refresh(); for (w = head; w; w = w->next) { redraw_term(w->user, 0); draw_title(w); refresh(); wrefresh(w->win); } } /* * Set raw mode. */ void set_raw_curses() { raw(); } /* * Set cooked mode. */ void set_cooked_curses() { noraw(); crmode(); noecho(); } ytalk-3.3.0/src/cwin.h010064400017510000144000000023241017523145000134220ustar kesousers/* * src/cwin.h * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ extern void init_curses(); extern void end_curses(); extern int open_curses( /* yuser, title */ ); extern void close_curses( /* yuser */ ); extern void addch_curses( /* yuser, char */ ); extern void move_curses( /* yuser, y, x */ ); extern void clreol_curses( /* yuser */ ); extern void clreos_curses( /* yuser */ ); extern void scroll_curses( /* yuser */ ); extern void keypad_curses( /* bool */ ); extern void flush_curses( /* yuser */ ); extern void redisplay_curses(); extern void set_raw_curses(); extern void set_cooked_curses(); #ifndef getyx # define getyx(w,y,x) y = w->_cury, x = w->_curx #endif ytalk-3.3.0/src/exec.c010064400017510000144000000150741020172307300134040ustar kesousers/* * src/exec.c * run a command in a window * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "header.h" #include #ifdef HAVE_SYS_IOCTL_H # include #endif #ifdef HAVE_FCNTL_H # include #endif #include #include #ifdef HAVE_STROPTS_H # include #endif #ifdef HAVE_SYS_CONF_H # include #endif #ifdef HAVE_TERMIOS_H # include #else # ifdef HAVE_SGTTY_H # include # ifdef hpux # include # endif # endif #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_OPENPTY # ifdef HAVE_UTIL_H # include # else int openpty(int *, int *, char *, struct termios *, struct winsize *); # endif #endif #if defined(HAVE_PTSNAME) && defined(HAVE_GRANTPT) && defined(HAVE_UNLOCKPT) # define USE_DEV_PTMX #endif int running_process = 0; /* flag: is process running? */ static int pid; /* currently executing process id */ static int pfd; /* currently executing process fd */ static int prows, pcols; /* saved rows, cols */ /* ---- local functions ---- */ #ifndef HAVE_SETSID static int setsid() { #ifdef TIOCNOTTY register int fd; if ((fd = open("/dev/tty", O_RDWR)) >= 0) { ioctl(fd, TIOCNOTTY); close(fd); } return fd; #endif } #endif #if defined(USE_DEV_PTMX) && defined(YTALK_SUNOS) int needtopush = 0; #endif #ifndef SIGCHLD # define SIGCLD SIGCHLD #endif static void exec_input(fd) int fd; { register int rc; static ychar buf[MAXBUF]; if ((rc = read(fd, buf, MAXBUF)) <= 0) { kill_exec(); errno = 0; show_error("command shell terminated"); return; } show_input(me, buf, rc); send_users(me, buf, rc, buf, rc); } static void calculate_size(rows, cols) int *rows, *cols; { register yuser *u; *rows = me->t_rows; *cols = me->t_cols; for (u = connect_list; u; u = u->next) if (u->remote.vmajor > 2) { if (u->remote.my_rows > 1 && u->remote.my_rows < *rows) *rows = u->remote.my_rows; if (u->remote.my_cols > 1 && u->remote.my_cols < *cols) *cols = u->remote.my_cols; } } /* ---- global functions ---- */ /* * Execute a command inside my window. If command is NULL, then execute a * shell. */ void execute(command) char *command; { int fd; #ifdef HAVE_PUTENV char yvenv[25]; #endif char name[20], *shell; struct stat sbuf; struct passwd *pw = NULL; #ifdef HAVE_OPENPTY int fds; #endif if (me->flags & FL_LOCKED) { errno = 0; show_error("alternate mode already running"); return; } #ifdef HAVE_OPENPTY if (openpty(&fd, &fds, name, NULL, NULL) < 0) { msg_term(me, "cannot get pseudo terminal"); return; } close(fds); #else if ((fd = getpty(name)) < 0) { msg_term(me, "cannot get pseudo terminal"); return; } #endif /* HAVE_OPENPTY */ /* init the pty a bit (inspired from the screen(1) sources, pty.c) */ #if defined(HAVE_TCFLUSH) && defined(TCIOFLUSH) tcflush(fd, TCIOFLUSH); #else #ifdef TIOCFLUSH ioctl(fd, TIOCFLUSH, NULL); #else #ifdef TIOCEXCL ioctl(fd, TIOCEXCL, NULL); #endif #endif #endif pw = getpwuid(myuid); if (pw != NULL) { shell = pw->pw_shell; } else { shell = "/bin/sh"; } calculate_size(&prows, &pcols); #ifdef SIGCHLD /* * Modified by P. Maragakis (Maragakis@mpq.mpg.de) Aug 10, 1999, * following hints by Jason Gunthorpe. This closes two Debian bugs * (#42625, #2196). */ signal(SIGCHLD, SIG_DFL); #else # ifdef SIGCLD signal(SIGCLD, SIG_DFL); # endif #endif if ((pid = fork()) == 0) { close(fd); close_all(); if (setsid() < 0) exit(-1); if ((fd = open(name, O_RDWR)) < 0) exit(-1); #if defined(USE_DEV_PTMX) && defined(YTALK_SUNOS) # if defined(HAVE_STROPTS_H) && defined(I_PUSH) /* * This will really mess up the shell on OSF1/Tru64 UNIX, * so we only do it on SunOS/Solaris */ if (needtopush) { ioctl(fd, I_PUSH, "ptem"); ioctl(fd, I_PUSH, "ldterm"); } # endif #endif dup2(fd, 0); dup2(fd, 1); dup2(fd, 2); #ifdef SIGWINCH /* tricky bit -- ignore WINCH */ signal(SIGWINCH, SIG_IGN); #endif /* set terminal characteristics */ set_terminal_flags(fd); set_terminal_size(fd, prows, pcols); #ifdef HAVE_PUTENV # ifndef NeXT putenv("TERM=vt100"); # endif # ifdef HAVE_SNPRINTF snprintf(yvenv, sizeof(yvenv), "YTALK_VERSION=%s", PACKAGE_VERSION); # else sprintf(yvenv, "YTALK_VERSION=%s", PACKAGE_VERSION); # endif putenv(yvenv); #endif #ifdef TIOCSCTTY /* * Mark the new pty as a controlling terminal to enable * BSD-style job control. */ ioctl(fd, TIOCSCTTY); #endif /* Check pty permissions and warn about potential risks. */ if (stat(name, &sbuf) == 0) { if (sbuf.st_mode & 0004) { write(1, "Warning: This pseudo-terminal is world-readable.\n", 49); } } /* execute the command */ if (command) execl(shell, shell, "-c", command, (char *) NULL); else execl(shell, shell, (char *) NULL); perror("execl"); exit(-1); } /* Modified by P. Maragakis (Maragakis@mpq.mpg.de) Aug 10, 1999. */ #ifdef SIGCHLD signal(SIGCHLD, SIG_IGN); #else # ifdef SIGCLD signal(SIGCLD, SIG_IGN); # endif #endif if (pid < 0) { show_error("fork() failed"); return; } set_win_region(me, prows, pcols); sleep(1); pfd = fd; running_process = 1; lock_flags((ylong) (FL_RAW | FL_SCROLL)); set_raw_term(); add_fd(fd, exec_input); } /* * Send input to the command shell. */ void update_exec() { write(pfd, io_ptr, (size_t) io_len); io_len = 0; } /* * Kill the command shell. */ void kill_exec() { if (!running_process) return; remove_fd(pfd); close(pfd); running_process = 0; unlock_flags(); set_cooked_term(); end_win_region(me); } /* * Send a SIGWINCH to the process. */ void winch_exec() { int rows, cols; if (!running_process) return; /* if the winch has no effect, return now */ calculate_size(&rows, &cols); if (rows == prows && cols == pcols) { if (prows != me->rows || pcols != me->cols) set_win_region(me, prows, pcols); return; } /* oh well -- redo everything */ prows = rows; pcols = cols; set_terminal_size(pfd, prows, pcols); set_win_region(me, prows, pcols); #ifdef SIGWINCH kill(pid, SIGWINCH); #endif } ytalk-3.3.0/src/fd.c010064400017510000144000000152211017726021000130440ustar kesousers/* * src/fd.c * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "header.h" #include "menu.h" #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME # include # else # include # endif #endif #include #ifdef _AIX # include #endif static fd_set fdset; /* descriptors to select on */ static fd_set fdtmp; /* descriptors to select on (input_loop) */ static fd_set sel; /* currently readable descriptors */ static int high_fd = 0; /* highest fd so far */ int input_flag = 0; /* flag: waiting for user input */ int user_winch = 0; /* flag: user window/status changed */ struct fd_func { void (*func) (); /* user function */ }; static struct fd_func tag[MAX_FILES]; /* one function per file descriptor */ /* * Initialize fdset data. */ void init_fd() { FD_ZERO(&fdset); } /* * Add a file descriptor to the current checklist. The supplied function * will be called whenever the file descriptor has input waiting. */ void add_fd(fd, user_func) int fd; void (*user_func) (); { if (fd < 0 || fd >= MAX_FILES) { show_error("add_fd: descriptor out of range"); return; } FD_SET(fd, &fdset); tag[fd].func = user_func; if (fd >= high_fd) high_fd = fd + 1; } /* * Remove a file descriptor from the checklist. */ void remove_fd(fd) int fd; { if (fd < 0 || fd >= MAX_FILES) { show_error("remove_fd: descriptor out of range"); return; } FD_CLR(fd, &fdset); FD_CLR(fd, &fdtmp); FD_CLR(fd, &sel); } /* * Read an entire length of data. Returns 0 on success, -1 on error. */ int full_read(fd, buf, len) int fd; register char *buf; register size_t len; { register int rc; while (len > 0) { if ((rc = read(fd, buf, len)) <= 0) return -1; buf += rc; len -= rc; } return 0; } /* -- MAIN LOOPS -- */ static ylong lastping, curtime; void main_loop() { register int fd, rc; struct timeval tv; #ifdef HAVE_SIGPROCMASK sigset_t mask, old_mask; #endif #ifdef HAVE_SIGSETMASK int mask, old_mask; #endif /* * Some signals need to be blocked while doing internal processing, * else some craziness might occur. */ #ifdef SIGWINCH # ifdef HAVE_SIGPROCMASK sigemptyset(&mask); sigaddset(&mask, SIGWINCH); # endif # ifdef HAVE_SIGSETMASK mask = sigmask(SIGWINCH); # endif #endif #ifdef SIGCHLD signal(SIGCHLD, SIG_IGN); #else # ifdef SIGCLD signal(SIGCLD, SIG_IGN); # endif #endif /* * For housecleaning to occur every CLEAN_INTERVAL seconds, we make * our own little timer system. SIGALRM is nice; in fact it's so * useful that we'll be using it in other parts of YTalk. Since we * therefore can't use it here, we affect the timer manually. */ house_clean(); curtime = lastping = (ylong) time(NULL); for (;;) { /* check if we're done */ if (connect_list == NULL && wait_list == NULL && menu_ptr == NULL && running_process == 0) bail(0); /* select */ sel = fdset; if (curtime > lastping + CLEAN_INTERVAL) tv.tv_sec = 0; else tv.tv_sec = (lastping + CLEAN_INTERVAL) - curtime; tv.tv_usec = 0; if ((rc = select(high_fd, &sel, 0, 0, &tv)) < 0) if (errno != EINTR) show_error("main_loop: select failed"); /* block signals while doing internal processing */ #ifdef SIGWINCH # ifdef HAVE_SIGPROCMASK sigprocmask(SIG_BLOCK, &mask, &old_mask); # endif # ifdef HAVE_SIGSETMASK old_mask = sigblock(mask); # endif # ifdef HAVE_SIGHOLD sighold(SIGWINCH); # endif #endif /* process file descriptors with input waiting */ if (rc > 0) for (fd = 0; fd < high_fd; fd++) if (FD_ISSET(fd, &sel)) { errno = 0; tag[fd].func(fd); if (--rc <= 0) break; } /* check timer */ curtime = (ylong) time(NULL); if (curtime - lastping >= CLEAN_INTERVAL) { house_clean(); lastping = (ylong) time(NULL); } /* re-allow signals */ #ifdef SIGWINCH # ifdef HAVE_SIGPROCMASK sigprocmask(SIG_SETMASK, &old_mask, NULL); # endif # ifdef HAVE_SIGSETMASK sigsetmask(old_mask); # endif # ifdef HAVE_SIGHOLD sigrelse(SIGWINCH); # endif #endif if (user_winch) { /* * This is a cute hack that updates a user menu * dynamically as information changes. So I had some * free time. there. */ user_winch = 0; update_user_menu(); } } } /* * Input loop. This loop keeps everything except user input going until * input is received from . This is necessary for answering pressing * questions without needing to add a getch_term() function to the terminal * definition library. Hack? maybe. Fun, tho. */ void input_loop() { register int fd, rc; struct timeval tv; static int left_loop; left_loop = 0; fdtmp = fdset; while (io_len <= 0) { /* select */ sel = fdtmp; if (curtime > lastping + CLEAN_INTERVAL) tv.tv_sec = 0; else tv.tv_sec = (lastping + CLEAN_INTERVAL) - curtime; tv.tv_usec = 0; if ((rc = select(high_fd, &sel, 0, 0, &tv)) < 0) if (errno != EINTR) show_error("input_loop: select failed"); /* process file descriptors with input waiting */ if (rc > 0) for (fd = 0; fd < high_fd; fd++) if (FD_ISSET(fd, &sel)) { /* * Here the hack begins. Any * function that takes user input * should clear "input_flag" and * return. This tells us to ignore * this function for now. Any * function which receives input from * should leave my input in * io_ptr/io_len. */ errno = 0; input_flag = 1; tag[fd].func(fd); if (left_loop) /* recursive * input_loop()s. argh! */ return; /* let my parent * function re-call me */ if (input_flag == 0) { /* * don't check this * descriptor anymore */ FD_CLR(fd, &fdtmp); } if (--rc <= 0) break; } /* check timer */ curtime = (ylong) time(NULL); if (curtime - lastping >= CLEAN_INTERVAL) { input_flag = 1; house_clean(); lastping = (ylong) time(NULL); } } input_flag = 0; left_loop = 1; } /* * Wait for a character from the terminal, in preparation for bailing out; * then read and discard that keypress. */ void bail_loop() { char keypress; full_read(0, &keypress, sizeof(char)); } ytalk-3.3.0/src/getpty.c010064400017510000144000000041761020366217500140040ustar kesousers/* * src/getpty.c * pseudo-terminal allocation routines * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "header.h" #ifdef HAVE_FCNTL_H # include #endif #ifndef SIGCHLD # define SIGCLD SIGCHLD #endif #if !defined(HAVE_OPENPTY) || defined(YTALK_TEST) int getpty(name) char *name; { register int pty, tty; char *tt; #ifdef USE_DEV_PTMX RETSIGTYPE(*sigchld) (); int r = 0; #endif /* USE_DEV_PTMX */ /* look for a Solaris/UNIX98-type pseudo-device */ #ifdef USE_DEV_PTMX if ((pty = open("/dev/ptmx", O_RDWR)) >= 0) { /* grantpt() might want to fork/exec! */ sigchld = signal(SIGCHLD, SIG_DFL); r |= grantpt(pty); r |= unlockpt(pty); tt = ptsname(pty); signal(SIGCHLD, sigchld); if (r == 0 && tt != NULL) { strcpy(name, tt); #ifdef YTALK_SUNOS needtopush = 1; #endif /* YTALK_SUNOS */ return pty; } } #endif /* USE_DEV_PTMX */ #ifdef HAVE_TTYNAME /* look for an older SYSV-type pseudo device */ if ((pty = open("/dev/ptc", O_RDWR)) >= 0) { if ((tt = ttyname(pty)) != NULL) { strcpy(name, tt); return pty; } close(pty); } #endif /* HAVE_TTYNAME */ /* scan Berkeley-style */ strcpy(name, "/dev/ptyp0"); while (access(name, 0) == 0) { if ((pty = open(name, O_RDWR)) >= 0) { name[5] = 't'; if ((tty = open(name, O_RDWR)) >= 0) { close(tty); return pty; } name[5] = 'p'; close(pty); } /* get next pty name */ if (name[9] == 'f') { name[8]++; name[9] = '0'; } else if (name[9] == '9') name[9] = 'a'; else name[9]++; } errno = ENOENT; return -1; } #endif /* !HAVE_OPENPTY || YTALK_TEST */ ytalk-3.3.0/src/gtalk.c010064400017510000144000000035171017725427000135730ustar kesousers/* * src/gtalk.c * some stuff to interface with GNU talk * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "header.h" #include "cwin.h" #include "mem.h" #include "gtalk.h" void gtalk_process(user, data) yuser *user; ychar data; { if (user->gt.len >= (MAXBUF - 1)) { /* If we run out of buffer space, just forget it. * There's no reason reason to read >4K of version string. */ user->gt.got_gt = 0; return; } if (user->gt.type == 0) { user->gt.type = data; return; } if (user->gt.buf == NULL) user->gt.buf = get_mem(MAXBUF); if (data == user->KILL || data == '\n') { user->gt.got_gt = 0; user->gt.buf[user->gt.len] = 0; switch (user->gt.type) { case GTALK_VERSION_MESSAGE: if (user->gt.version != NULL) free_mem(user->gt.version); user->gt.version = gtalk_parse_version(user->gt.buf, user->KILL); /* let the main loop know there's been a change in user data */ user_winch = 1; break; } return; } user->gt.buf[user->gt.len++] = data; } char * gtalk_parse_version(str, ukill) char *str; ychar ukill; { char *p, *e; p = strchr(str, ' '); if (p != NULL) p = strchr(p + 1, ' '); if (p != NULL) { p++; for (e = p; *e; e++) if (*e == ukill || *e == '\n') { *e = 0; break; } return str_copy(p); } return NULL; } ytalk-3.3.0/src/gtalk.h010064400017510000144000000016201017442034100135600ustar kesousers/* * src/gtalk.c * some stuff to interface with GNU talk * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #define GTALK_ESCAPE 0x03 #define GTALK_PERSONAL_NAME 0x03 #define GTALK_IMPORT_REQUEST 0x06 #define GTALK_VERSION_MESSAGE 0x08 extern void gtalk_process( /* yuser *, ychar */ ); extern char *gtalk_parse_version( /* char *, ychar */); ytalk-3.3.0/src/header.h010064400017510000144000000337331020365530500137230ustar kesousers/* * src/header.h * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "config.h" #include #include #ifdef YTALK_HPUX # define _XOPEN_SOURCE_EXTENDED # include # undef _XOPEN_SOURCE_EXTENDED #else # include #endif #include #include #include #include #include /* We may not have prototypes for these functions. */ #if defined(HAVE_PTSNAME) && defined(HAVE_GRANTPT) && defined(HAVE_UNLOCKPT) extern int grantpt(); extern int unlockpt(); extern char *ptsname(); #endif #ifdef HAVE_UNISTD_H # include #endif #define VMAJOR 3 /* major version number */ #define VMINOR 3 /* minor version number */ #define VPATCH 0 /* patch level */ #define EIGHT_BIT_CLEAN /* take this one out if you don't want it */ #ifdef EIGHT_BIT_CLEAN # define is_printable(x) ( (((x) >= ' ' && (x) <= '~') || \ (unsigned char)(x) >= 0xa0) \ && (x) != RUBDEF ) #else # define is_printable(x) ( (x) >= ' ' && (x) <= '~' ) #endif /* ---- YTalk protocols ---- */ /* * These protocol numbers are a MAJOR HACK designed to get around the fact * that old versions of ytalk didn't send any version information during * handshaking. Nor did they bzero() the unused portions of the handshaking * structures. Argh! These two protocol numbers were very carefully * picked... do not add any others and expect them to work. Instead, use the * "vmajor" and "vminor" fields of the y_parm structure. */ #define YTP_OLD 20 /* YTalk versions before 3.0 */ #define YTP_NEW 27 /* YTalk versions 3.0 and up */ /* ---- types ---- */ typedef void *yaddr; /* any pointer address */ typedef yaddr yterm; /* terminal cookie */ typedef u_char ychar; /* we use unsigned chars */ typedef u_int ylong; /* this should work both on 32-bit and 64-bit * machines -Roger */ #ifndef HAVE_SOCKLEN_T typedef int socklen_t; #endif typedef struct { u_char w_rows, w_cols; /* window size FOR PROTOCOL YTP_OLD */ char protocol; /* ytalk protocol -- see above */ char pad1; /* zeroed out */ short vmajor, vminor; /* version numbers */ u_short rows, cols; /* his window size over there */ u_short my_rows, my_cols; /* my window size over there */ ylong pid; /* my process id */ char pad[44]; /* zeroed out */ } y_parm; #define MAXARG 4 /* max ESC sequence arg count */ typedef struct _yuser { struct _yuser *next; /* next user in group lists */ struct _yuser *unext; /* next user in full user list */ int fd; /* file descriptor */ int output_fd; /* non-zero if output is going to a file */ ylong flags; /* active FL_* flags below */ ychar edit[4]; /* edit characters */ char crlf; /* 1 if user wants CRLF newlines */ u_short t_rows, t_cols; /* his rows and cols on window over here */ u_short rows, cols; /* his active region rows and cols over here */ y_parm remote; /* remote parms */ ychar **scr; /* screen data */ char *scr_tabs; /* screen tab positions */ char bump; /* set if at far right */ char onend; /* set if stomping at far right */ ychar old_rub; /* my actual rub character */ ychar key; /* this user's ident letter for menus */ int y, x; /* current cursor position */ int sy, sx; /* saved cursor position */ int sc_top, sc_bot; /* scrolling region */ char region_set; /* set if using a screen region */ char *full_name; /* full name (up to 50 chars) */ char *user_name; /* user name */ char *host_name; /* host name */ char *host_fqdn; /* host fully qualified name */ char *tty_name; /* tty name */ ylong host_addr; /* host inet address */ int daemon; /* daemon type to use */ ylong l_id, r_id; /* local and remote talkd invite list index */ ylong d_id; /* talk daemon process id -- see socket.c */ ylong last_invite; /* timestamp of last invitation sent */ struct sockaddr_in sock;/* communication socket */ struct sockaddr_in orig_sock; /* original socket -- another sick * hack */ /* out-of-band data */ int dbuf_size; /* current buffer size */ ychar *dbuf, *dptr; /* buffer base and current pointer */ int drain; /* remaining bytes to drain */ void (*dfunc) (); /* function to call with drained data */ int got_oob; /* got OOB flag */ struct { char got_esc; /* received an ESC */ int av[MAXARG]; /* ESC sequence arguments */ u_int ac; /* ESC sequence arg count */ char lparen; /* lparen escape? */ char hash; } vt; struct { char got_gt; /* are we parsing a gtalk string? */ char *buf; /* gtalk string buffer */ char type; /* type of current gtalk string */ int len; /* length of current gtalk string */ char *version; /* user's GNUTALK version */ } gt; /* anything below this is available for the terminal interface */ yterm term; /* terminal cookie */ } yuser; #define FL_RAW 0x00000001L /* raw input enabled */ #define FL_SCROLL 0x00000002L /* scrolling enabled */ #define FL_WRAP 0x00000004L /* word-wrap enabled */ #define FL_IMPORT 0x00000008L /* auto-import enabled */ #define FL_INVITE 0x00000010L /* auto-invite enabled */ #define FL_RING 0x00000020L /* rering at all */ #define FL_CAPS 0x00000100L /* want caps as answers */ #define FL_NOAUTO 0x00000200L /* no auto-invite port */ #define FL_PROMPTRING 0x00000400L /* prompt before reringing */ #define FL_BEEP 0x00000800L /* allow ytalk to beep? */ #define FL_IGNBRK 0x00001000L /* don't die when ^C is pressed */ #define FL_PROMPTQUIT 0x00002000L /* prompt before quitting */ #define FL_ESC_YN 0x00004000L /* want ESC before y/n answers */ #define FL_LOCKED 0x40000000L /* flags locked by other end */ /* ---- defines and short-cuts ---- */ #ifdef NOFILE #define MAX_FILES NOFILE /* max open file descriptors */ #else #define MAX_FILES 256 /* better to be too high than too low */ #endif #define CLEAN_INTERVAL 16 /* seconds between calls to house_clean() */ #define MAXBUF 4096 /* buffer size for I/O operations */ #define MAXERR 132 /* error text buffer size */ #define MAXTEXT 50 /* text entry buffer */ #define RUB edit[0] #define KILL edit[1] #define WORD edit[2] #define CLR edit[3] #define RUBDEF 0xfe /* ---- Ytalk version 3.* out-of-band data ---- */ /* see comm.c for a description of Ytalk 3.* OOB protocol */ #define V3_OOB 0xfd /* out-of-band marker -- see comm.c */ #define V3_MAXPACK 0xfc /* max OOB packet size -- see comm.c */ #define V3_NAMELEN 16 /* max username length */ #define V3_HOSTLEN 64 /* max hostname length */ typedef struct { ychar code; /* V3_EXPORT, V3_IMPORT, or V3_ACCEPT */ char filler[3]; ylong host_addr; /* host address */ ylong pid; /* process id */ char name[V3_NAMELEN]; /* user name */ char host[V3_HOSTLEN]; /* host name */ } v3_pack; #define V3_PACKLEN sizeof(v3_pack) #define V3_EXPORT 101 /* export a user */ #define V3_IMPORT 102 /* import a user */ #define V3_ACCEPT 103 /* accept a connection from a user */ typedef struct { ychar code; /* V3_LOCKF or V3_UNLOCKF */ char filler[3]; ylong flags; /* flags */ } v3_flags; #define V3_FLAGSLEN sizeof(v3_flags) #define V3_LOCKF 111 /* lock my flags */ #define V3_UNLOCKF 112 /* unlock my flags */ typedef struct { ychar code; /* V3_YOURWIN, V3_MYWIN, or V3_REGION */ char filler[3]; u_short rows, cols; /* window size */ } v3_winch; #define V3_WINCHLEN sizeof(v3_winch) #define V3_YOURWIN 121 /* your window size changed over here */ #define V3_MYWIN 122 /* my window size changed over here */ #define V3_REGION 123 /* my window region changed over here */ /* ---- Ytalk version 2.* out-of-band data ---- */ #define V2_NAMELEN 12 #define V2_HOSTLEN 64 typedef struct { ychar code; /* one of the V2_?? codes below */ char filler; char name[V2_NAMELEN]; /* user name */ char host[V2_HOSTLEN]; /* user host */ } v2_pack; #define V2_PACKLEN sizeof(v2_pack) #define V2_EXPORT 130 /* export a user */ #define V2_IMPORT 131 /* import a user */ #define V2_ACCEPT 132 /* accept a connection from a user */ #define V2_AUTO 133 /* accept auto invitation */ /* ---- exit codes ---- */ #define YTE_SUCCESS_PROMPT -1 /* successful completion, prompt, return 0 */ #define YTE_SUCCESS 0 /* successful completion */ #define YTE_INIT 1 /* initialization error */ #define YTE_NO_MEM 2 /* out of memory */ #define YTE_SIGNAL 3 /* fatal signal received */ #define YTE_ERROR 4 /* unrecoverable error */ /* ---- global variables ---- */ #ifndef HAVE_STRERROR extern char *sys_errlist[]; /* system errors */ #endif extern yuser *me; /* just lil' ol' me */ extern yuser *user_list; /* full list of invited/connected users */ extern yuser *connect_list; /* list of connected users */ extern yuser *wait_list; /* list of invited users */ extern yuser *fd_to_user[MAX_FILES]; /* convert file descriptors to users */ extern yuser *key_to_user[128]; /* convert menu ident chars to users */ extern char errstr[MAXERR]; /* temporary string for errors */ extern ylong def_flags; /* default FL_* flags */ extern int user_winch; /* user window/status changed flag */ extern ychar *io_ptr; /* user input pointer */ extern int io_len; /* user input count */ extern int running_process; /* flag: is process running? */ extern ylong myuid; /* stores your uid */ /* ---- some machine compatibility definitions ---- */ extern int errno; /* aliases -- added by Roger Espel Llima (borrowed from utalk) */ struct alias { char from[256], to[256]; int type; struct alias *next; }; #define ALIAS_ALL 0 #define ALIAS_BEFORE 1 #define ALIAS_AFTER 2 /* ---- global functions ---- */ extern void bail( /* int */ ); /* main.c */ extern char *str_copy( /* string */ ); /* main.c */ extern void show_error( /* str */ ); /* main.c */ extern void init_term(); /* term.c */ extern void set_terminal_size( /* fd, rows, cols */ ); /* term.c */ extern void set_terminal_flags( /* fd */ ); /* term.c */ extern int what_term(); /* term.c */ extern void end_term(); /* term.c */ extern int open_term( /* yuser, title */ ); /* term.c */ extern void close_term( /* yuser */ ); /* term.c */ extern void addch_term( /* yuser, ch */ ); /* term.c */ extern void move_term( /* yuser, y, x */ ); /* term.c */ extern void fill_term( /* yuser, y1, x1, y2, x2, c */ ); /* term.c */ extern void clreol_term( /* yuser */ ); /* term.c */ extern void clreos_term( /* yuser */ ); /* term.c */ extern void scroll_term( /* yuser */ ); /* term.c */ extern void rev_scroll_term( /* yuser */ ); /* term.c */ extern void flush_term( /* yuser */ ); /* term.c */ extern void rub_term( /* yuser */ ); /* term.c */ extern void word_term( /* yuser */ ); /* term.c */ extern void kill_term( /* yuser */ ); /* term.c */ extern void tab_term( /* yuser */ ); /* term.c */ extern void newline_term( /* yuser */ ); /* term.c */ extern void lf_term( /* yuser */ ); /* term.c */ extern void add_line_term( /* yuser, num */ ); /* term.c */ extern void del_line_term( /* yuser, num */ ); /* term.c */ extern void add_char_term( /* yuser, num */ ); /* term.c */ extern void del_char_term( /* yuser, num */ ); /* term.c */ extern void redraw_term( /* yuser, start_row */ ); /* term.c */ extern void keypad_term( /* yuser, int */ ); /* term.c */ extern void resize_win( /* yuser, h, w */ ); /* term.c */ extern void set_win_region( /* yuser, h, w */ ); /* term.c */ extern void end_win_region( /* yuser */ ); /* term.c */ extern void set_scroll_region( /* yuser, top, bottom */ ); /* term.c */ extern void msg_term( /* yuser, str */ ); /* term.c */ extern void spew_term( /* yuser, fd, rows, cols */ ); /* term.c */ extern int center( /* width, n */ ); /* term.c */ extern void redraw_all_terms(); /* term.c */ extern void set_raw_term(); /* term.c */ extern void set_cooked_term(); /* term.c */ extern void init_user(); /* user.c */ extern yuser *new_user( /* name, host, tty */ ); /* user.c */ extern void free_user( /* yuser */ ); /* user.c */ extern yuser *find_user( /* name, host_addr, pid */ ); /* user.c */ extern void generate_full_name( /* yuser */ ); /* user.c */ extern void free_users(); /* user.c */ extern void init_fd(); /* fd.c */ extern void add_fd( /* fd, func */ ); /* fd.c */ extern void remove_fd( /* fd */ ); /* fd.c */ extern int full_read( /* fd, buf, len */ ); /* fd.c */ extern void main_loop(); /* fd.c */ extern void input_loop(); /* fd.c */ extern void bail_loop(); /* fd.c */ extern yuser *invite( /* username, announce */ ); /* comm.c */ extern void house_clean(); /* comm.c */ extern void send_winch( /* yuser */ ); /* comm.c */ extern void send_region(); /* comm.c */ extern void send_end_region(); /* comm.c */ extern void send_users( /* buf, len */ ); /* comm.c */ extern void show_input( /* user, buf, len */ ); /* comm.c */ extern void my_input( /* buf, len */ ); /* comm.c */ extern void lock_flags( /* flags */ ); /* comm.c */ extern void unlock_flags(); /* comm.c */ extern void rering_all(); /* comm.c */ extern void init_socket(); /* socket.c */ extern void close_all(); /* socket.c */ extern int send_dgram( /* user, type */ ); /* socket.c */ extern int send_auto( /* type */ ); /* socket.c */ extern void kill_auto(); /* socket.c */ extern int newsock( /* yuser */ ); /* socket.c */ extern int connect_to( /* yuser */ ); /* socket.c */ extern ylong get_host_addr( /* hostname */ ); /* socket.c */ extern char *host_name( /* addr */ ); /* socket.c */ extern void readdress_host( /* from, to, on */ ); /* socket.c */ extern void read_ytalkrc(); /* rc.c */ extern char *resolve_alias( /* uh */ ); /* rc.c */ extern void execute( /* command */ ); /* exec.c */ extern void update_exec(); /* exec.c */ extern void kill_exec(); /* exec.c */ extern void winch_exec(); /* exec.c */ extern int getpty( /* char* */ ); /* getpty.c */ extern void vt100_process( /* yuser, char */ ); /* vt100.c */ /* EOF */ ytalk-3.3.0/src/main.c010064400017510000144000000113031017517704500134070ustar kesousers/* * src/main.c * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "header.h" #include "menu.h" #include "mem.h" #include char errstr[MAXERR]; /* temporary string for errors */ char *vhost = NULL; /* specified virtual host */ ylong myuid; /* global uid */ /* * Clean up and exit. */ void bail(n) int n; { kill_auto(); if (n == YTE_SUCCESS_PROMPT && (def_flags & FL_PROMPTQUIT)) if (show_mesg("Press any key to quit.", NULL) == 0) { update_menu(); bail_loop(); } end_term(); free_users(); #ifdef YTALK_DEBUG clear_all(); #endif exit(n == YTE_SUCCESS_PROMPT ? YTE_SUCCESS : n); } #ifndef HAVE_STRERROR # define strerror(n) (sys_errlist[(n)]) #endif /* * Display an error. */ void show_error(str) register char *str; { register char *syserr; static int in_error = 0; if (errno == 0) syserr = NULL; else syserr = strerror(errno); if (def_flags & FL_BEEP) putc(7, stderr); if (in_error == 0 && what_term() != 0) { in_error = 1; if (show_error_menu(str, syserr) < 0) { show_error("show_error: show_error_menu() failed"); show_error(str); } else update_menu(); in_error = 0; } else { if (syserr != NULL) fprintf(stderr, "%s: %s\n", str, syserr); else fprintf(stderr, "%s\n", str); sleep(2); } } /* * Copy a string. */ char * str_copy(str) register char *str; { register char *out; register size_t len; if (str == NULL) return NULL; len = strlen(str) + 1; out = get_mem(len); memcpy(out, str, len); return out; } /* * Process signals. */ static RETSIGTYPE got_sig(n) int n; { if (n == SIGINT) { if (def_flags & FL_IGNBRK) return; bail(YTE_SUCCESS); } bail(YTE_SIGNAL); } /* MAIN */ int main(argc, argv) int argc; char **argv; { int sflg = 0, yflg = 0, iflg = 0, vflg = 0, qflg = 0, eflg = 0; char *prog; #if SIZEOF_U_INT != 4 /* check for a 64-bit mis-compile */ fprintf(stderr, "The definition for ylong in header.h is wrong;\n\ please change it to an unsigned 32-bit type that works on your computer,\n\ then type 'make clean' and 'make'.\n"); exit(YTE_INIT); #endif /* search for options */ prog = *argv; argv++, argc--; while (argc > 0 && **argv == '-') { if (strcmp(*argv, "-Y") == 0) { yflg++; argv++, argc--; } else if (strcmp(*argv, "-E") == 0) { eflg++; argv++, argc--; } else if (strcmp(*argv, "-i") == 0) { iflg++; argv++, argc--; } else if (strcmp(*argv, "-v") == 0) { vflg++; argv++, argc--; } else if (strcmp(*argv, "-h") == 0) { argv++; vhost = *argv++; argc -= 2; } else if (strcmp(*argv, "-s") == 0) { sflg++; /* immediately start a shell */ argv++, argc--; } else if (strcmp(*argv, "-q") == 0) { qflg++; argv++, argc--; } else argc = 0; /* force a Usage error */ } if (vflg) { /* print version and exit */ fprintf(stderr, "YTalk %s\n", PACKAGE_VERSION); exit(YTE_SUCCESS); } /* check for users */ if (argc <= 0) { fprintf(stderr, "Usage: %s [options] user[@host][#tty]...\n", prog); fprintf(stderr, "\ Options: -i -- no auto-invite port\n\ -Y -- require caps on all y/n answers\n\ -E -- require before y/n answers\n\ -s -- start a shell\n\ -q -- prompt before quitting\n\ -v -- print program version\n\ -h host_or_ip -- select interface or virtual host\n"); exit(YTE_INIT); } /* set up signals */ signal(SIGINT, got_sig); signal(SIGHUP, got_sig); signal(SIGQUIT, got_sig); signal(SIGABRT, got_sig); signal(SIGPIPE, SIG_IGN); /* save the uid for later use */ myuid = getuid(); /* set default options */ def_flags = FL_PROMPTRING | FL_RING | FL_BEEP | FL_SCROLL; /* go for it! */ errno = 0; init_fd(); read_ytalkrc(); init_user(vhost); if (yflg) def_flags |= FL_CAPS; if (eflg) def_flags |= FL_ESC_YN; if (iflg) def_flags |= FL_NOAUTO; if (qflg) def_flags |= FL_PROMPTQUIT; init_term(); init_socket(); for (; argc > 0; argc--, argv++) invite(*argv, 1); if (sflg) execute(NULL); else msg_term(me, "Waiting for connection..."); main_loop(); bail(YTE_SUCCESS_PROMPT); return 0; } ytalk-3.3.0/src/mem.c010064400017510000144000000111171017523323600132370ustar kesousers/* * src/mem.c * memory function wrappers and leak tracking * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "header.h" #include "mem.h" #ifdef YTALK_DEBUG /* some statistical accumulators */ unsigned int bad_free = 0; unsigned int bad_realloc = 0; unsigned int realloc_null = 0; unsigned int leaked = 0; static mem_list *glist = NULL; /* * Add to linked list */ mem_list * add_area(list, addr, size, line, file) mem_list *list; yaddr addr; size_t size; int line; char *file; { mem_list *entry; if (addr == 0) return list; entry = (mem_list *) malloc(sizeof(mem_list)); entry->addr = addr; entry->size = size; entry->line = line; entry->file = file; entry->prev = NULL; if (list != NULL) list->prev = entry; entry->next = list; return entry; } mem_list * find_area(list, addr) mem_list *list; yaddr addr; { mem_list *it = list; while (it != NULL) { if (it->addr == addr) break; it = it->next; } return it; } /* * Delete from list */ mem_list * del_area(list, entry) mem_list *list, *entry; { if (list == entry) list = entry->next; if (entry->next == NULL && entry->prev == NULL) { free(entry); return NULL; } if (entry->prev != NULL) entry->prev->next = entry->next; else entry->next->prev = NULL; if (entry->next != NULL) entry->next->prev = entry->prev; else entry->prev->next = NULL; free(entry); return list; } /* * Change stored size */ void change_area(list, addr, new_addr, size) mem_list *list; yaddr addr, new_addr; size_t size; { mem_list *it = list; while (it != NULL) { if (it->addr == addr) { it->addr = new_addr; it->size = size; return; } it = it->next; } show_error("Reallocation failed: Not in allocation list"); bad_realloc++; } #endif /* YTALK_DEBUG */ /* * Allocate memory */ yaddr #ifdef YTALK_DEBUG real_get_mem(n, line, file) size_t n; int line; char *file; #else get_mem(n) size_t n; #endif { yaddr out; if ((out = (yaddr) malloc((size_t) n)) == NULL) { show_error("malloc() failed"); bail(YTE_NO_MEM); } #ifdef YTALK_DEBUG glist = add_area(glist, out, n, line, file); #endif return out; } /* * Free and clear memory */ #ifndef YTALK_DEBUG void free_mem(addr) yaddr addr; { free(addr); } #else void real_free_mem(addr, line, file) yaddr addr; int line; char *file; { mem_list *entry; if ((entry = find_area(glist, addr)) != NULL) { memset(entry->addr, '\0', (size_t) entry->size); free(entry->addr); glist = del_area(glist, entry); } else { #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "Free failed: Not in allocation list: 0x%lx (%s:%d)", (long unsigned) addr, file, line); #else sprintf(errstr, "Free failed: Not in allocation list: 0x%lx (%s:%d)", (long unsigned) addr, file, line); #endif show_error(errstr); bad_free++; } } #endif /* YTALK_DEBUG */ /* * Reallocate memory */ yaddr #ifdef YTALK_DEBUG real_realloc_mem(p, n, line, file) yaddr p; size_t n; int line; char *file; #else realloc_mem(p, n) yaddr p; size_t n; #endif { yaddr out; if (p == NULL) { #ifdef YTALK_DEBUG realloc_null++; return real_get_mem(n, line, file); #else return get_mem(n); #endif } if ((out = (yaddr) realloc(p, (size_t) n)) == NULL) { show_error("realloc() failed"); bail(YTE_NO_MEM); } #ifdef YTALK_DEBUG change_area(glist, p, out, n); #endif return out; } #ifdef YTALK_DEBUG /* * Clear all memory */ void clear_all() { mem_list *it; fprintf(stderr, "Clearing memory\n"); while (glist != NULL) { fprintf(stderr, "0x%lx: %d\t(%s:%d)\n", (long unsigned) glist->addr, glist->size, glist->file, glist->line ); /* The next 5 rows are a simpler and faster version of free_mem() */ it = glist; glist = glist->next; memset(it->addr, '\0', (size_t) it->size); free(it->addr); free(it); leaked++; } fprintf(stderr, "Statistics:\n"); fprintf(stderr, "Bad free_mem() calls: %u\n", bad_free); fprintf(stderr, "Bad realloc_mem() calls: %u\n", bad_realloc); fprintf(stderr, "realloc_mem(NULL) calls: %u\n", realloc_null); fprintf(stderr, "Leaked allocations: %u\n", leaked); } #endif /* YTALK_DEBUG */ ytalk-3.3.0/src/mem.h010064400017510000144000000031511017523323600132430ustar kesousers/* * src/mem.h * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #ifdef YTALK_DEBUG typedef struct __mem_list { yaddr addr; size_t size; char *file; int line; struct __mem_list *prev; struct __mem_list *next; } mem_list; #define get_mem(size) (real_get_mem(size, __LINE__, __FILE__)) #define realloc_mem(addr, size) (real_realloc_mem(addr, size, __LINE__, __FILE__)) #define free_mem(addr) (real_free_mem(addr, __LINE__, __FILE__)) extern yaddr real_get_mem( /* size_t, __LINE__, __FILE__ */ ); extern yaddr real_realloc_mem( /* yaddr, size_t, __LINE__, __FILE__ */ ); extern void real_free_mem( /* yaddr, __LINE__, __FILE__ */ ); extern void change_area( /* mem_list *, yaddr, yaddr, size_t */ ); extern mem_list *find_area( /* mem_list *, yaddr */ ); extern void clear_all(); extern mem_list *add_area( /* mem_list *, yaddr, size_t, int, char * */ ); extern mem_list *del_area( /* mem_list *, mem_list * */ ); #else extern yaddr get_mem( /* size_t */ ); extern yaddr realloc_mem( /* yaddr, size_t */ ); extern void free_mem( /* yaddr */ ); #endif /* YTALK_DEBUG */ ytalk-3.3.0/src/menu.c010064400017510000144000000470361017341124400134310ustar kesousers/* * src/menu.c * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "header.h" #include "mem.h" #ifdef HAVE_FCNTL_H # include #endif #include "menu.h" int show_user_list(); /* * This particular file was written real early one night (morning?) while * trying to stay awake long enough to do laundry. I hereby take * extra-special pains to absolve myself of any and all responsibility for * this source. */ static void main_menu_sel(); menu_item *menu_ptr = NULL; /* current menu in processing */ static int menu_len; /* number of items in current menu */ static int menu_long; /* longest item of current menu */ static int menu_line; /* current line number of menu */ static int text_pos = -1; /* text offset if non-negative */ static int text_ypos = -1, text_xpos = -1; /* text coord if non-negative */ extern void raw_term(); /* our raw interface to the terminal */ /* some menus... */ static menu_item main_menu[] = { {"Main Menu", NULL, ' '}, {"", NULL, ' '}, {"add a user", main_menu_sel, 'a'}, {"delete a user", main_menu_sel, 'd'}, {"kill all unconnected", main_menu_sel, 'k'}, {"options", main_menu_sel, 'o'}, {"rering all", main_menu_sel, 'r'}, {"shell", main_menu_sel, 's'}, {"user list", main_menu_sel, 'u'}, {"output user to file", main_menu_sel, 'w'}, {"quit", main_menu_sel, 'q'}, {"", NULL, '\0'} /* MUST BE LAST */ }; #define MAXUMENU 52 static menu_item user_menu[MAXUMENU]; /* this one changes each time */ static menu_item option_menu[20]; /* options menu buffer */ static menu_item yes_no_menu[1];/* yes/no entry menu */ static menu_item mesg_menu[1]; /* message menu */ static char text_str[MAXTEXT + 1]; /* string entry buffer */ static menu_item text_menu[2]; /* string entry menu */ static char user_buf[MAXUMENU][80]; /* user list buffers */ /* major hack below... [maniacal laughter] */ static int got_error = 0; static char err_str[8][MAXERR]; static menu_item error_menu[] = { {"Ytalk Error", NULL, ' '}, {"", NULL, ' '}, {NULL, show_error, ' '}, {NULL, show_error, ' '}, {"", NULL, ' '}, {NULL, show_error, ' '}, {NULL, show_error, ' '}, {"", NULL, ' '}, {NULL, show_error, ' '}, {NULL, show_error, ' '}, {"", NULL, ' '}, {NULL, show_error, ' '}, {NULL, show_error, ' '}, {"", NULL, '\0'} /* MUST BE LAST */ }; /* ---- local functions ---- */ static yuser *output_user = NULL; static void do_output(filename) char *filename; { int fd; if (output_user == NULL) return; if ((fd = open(filename, O_RDWR | O_TRUNC | O_CREAT, 0600)) < 0) { show_error(filename); return; } output_user->output_fd = fd; spew_term(output_user, fd, output_user->rows, output_user->cols); output_user = NULL; } static void do_output_user(user) yuser *user; { /* if he has an open descriptor, close it */ if (user->output_fd > 0) { close(user->output_fd); user->output_fd = 0; if (show_mesg("Output Terminated", NULL) >= 0) update_menu(); return; } /* else open one */ output_user = user; if (show_text("Output filename?", do_output) >= 0) update_menu(); else output_user = NULL; } static void do_invite(name) char *name; { invite(name, 1); } static void kill_all_unconnected() { while (wait_list) free_user(wait_list); } static void main_menu_sel(key) ychar key; { switch (key) { case 'a': /* add a user */ if (show_text("Add Which User?", do_invite) >= 0) update_menu(); break; case 'd': /* delete a user */ if (show_user_menu("Delete Which User?", free_user, 0) >= 0) update_menu(); break; case 'k': /* kill all unconnected users */ kill_all_unconnected(); kill_menu(); break; case 'o': /* show options */ if (show_option_menu() >= 0) update_menu(); break; case 'r': /* rering all */ rering_all(); kill_menu(); break; case 's': /* invoke a shell */ kill_menu(); execute(NULL); break; case 'u': /* show a user list */ if (show_user_list() >= 0) update_menu(); break; case 'w': /* output user to file */ if (show_user_menu("Output Which User?", do_output_user, 1) >= 0) update_menu(); break; case 'q': /* quit */ bail(YTE_SUCCESS); } } static void option_menu_sel(key) ychar key; { register yuser *u; ylong old_flags; old_flags = def_flags; switch (key) { case 's': /* toggle scrolling */ def_flags ^= FL_SCROLL; break; case 'w': /* toggle word wrap */ def_flags ^= FL_WRAP; break; case 'i': /* toggle automatic imports */ def_flags ^= FL_IMPORT; break; case 'v': /* toggle automatic invitations */ def_flags ^= FL_INVITE; break; case 'r': /* toggle re-rings */ def_flags ^= FL_RING; break; case 'p': /* toggle prompting before re-rings */ def_flags ^= FL_PROMPTRING; break; case 'q': /* toggle prompting before quitting */ def_flags ^= FL_PROMPTQUIT; break; } if (old_flags != def_flags) { for (u = user_list; u != NULL; u = u->unext) if (!(u->flags & FL_LOCKED)) u->flags = def_flags; } if (show_option_menu() >= 0) update_menu(); else kill_menu(); } static void user_menu_sel(key) ychar key; { register int i; register yuser *u; /* * Remember... the user list could have changed between the time I * created the user menu and the time I just now selected one of the * users from it. */ for (i = 0; i < menu_len; i++) if (user_menu[i].key == key) { for (u = user_list; u; u = u->unext) if (u->key == key && strcmp(u->full_name, user_menu[i].item) == 0) { user_menu[0].func(u); break; } break; } if (menu_ptr == user_menu) kill_menu(); } #define MENU_EXTRA 7 /* number of extra characters per menu screen * item */ static void generate_text_length() { menu_long = me->t_cols - MENU_EXTRA - 2; if (menu_long < 5 || menu_long > MAXTEXT) menu_long = MAXTEXT; } static void generate_yes_no_length() { menu_long = strlen(yes_no_menu[0].item) - 2; } static void pad_str(from, len, to) char *from, *to; int len; { for (; len > 0 && *from; len--, from++) *(to++) = *from; for (; len > 0; len--) *(to++) = ' '; *to = '\0'; } /* ---- global functions ---- */ /* * End any menu processing. */ void kill_menu() { register int i; if (menu_ptr != NULL) { menu_ptr = NULL; redraw_term(me, 0); flush_term(me); text_pos = -1; text_ypos = -1; text_xpos = -1; } if (got_error) { got_error = 0; for (i = 0; error_menu[i].key != '\0'; i++) if (error_menu[i].func != NULL) error_menu[i].item = NULL; } } /* * Update menu information. */ void update_menu() { register ychar *c; register char *d; register int j, i, y, x; static ychar *buf = NULL; static int buflen = 0; if (menu_ptr == NULL) return; /* process any input */ if (io_len > 0) { ychar ic; if (menu_ptr == text_menu) { for (; io_len > 0; io_len--) { ic = *(io_ptr++); if (ic > ' ' && ic <= '~') { if (text_pos >= menu_long && def_flags & FL_BEEP) putc(7, stderr); else { text_str[text_pos] = (char) ic; if (text_ypos >= 0) raw_term(me, text_ypos, text_xpos + text_pos, text_str + text_pos, 1); text_str[++text_pos] = '\0'; } } else if (ic == me->old_rub) { if (text_pos > 0) { text_str[--text_pos] = '\0'; if (text_ypos >= 0) raw_term(me, text_ypos, text_xpos + text_pos, " ", 1); } } else if (ic == me->KILL || ic == me->WORD) { if (text_pos > 0) { text_str[0] = '\0'; text_pos = 0; if (text_ypos > 0) raw_term(me, text_ypos, text_xpos, " ", menu_long); } } else if (ic == '\n' || ic == '\r') { if (text_pos > 0) { text_str[text_pos] = '\0'; /* just to be sure */ kill_menu(); text_menu[0].func(text_str); } else kill_menu(); return; } else if (ic == 27 || ic == 4) { kill_menu(); return; } } if (text_ypos >= 0) { raw_term(me, text_ypos, text_xpos + text_pos, NULL, 0); flush_term(me); return; } } else if (menu_ptr == yes_no_menu) { /* don't handle yes/no input here */ } else if (menu_ptr == mesg_menu) { ic = *(io_ptr++); io_len--; kill_menu(); if (mesg_menu[0].func) mesg_menu[0].func(ic); return; } else { ic = *(io_ptr++); io_len--; if (ic == ' ' || ic == '\n' || ic == '\r') { /* scroll the menu */ menu_line += me->t_rows - 1; if (menu_line >= menu_len) { kill_menu(); return; } i = menu_len - (me->t_rows - 1); /* last full screen */ if (i < menu_line) menu_line = i; } else if (ic > ' ' && ic <= '~') { for (i = 0; i < menu_len; i++) if (menu_ptr[i].key == ic && menu_ptr[i].func != NULL) { menu_ptr[i].func(ic); /* * THE WHOLE WORLD COULD BE DIFFERENT NOW. */ i = -1; break; } if (i >= 0) kill_menu(); return; } else { kill_menu(); return; } } } /* * Check the buffer. Keep in mind that we could be here because the * window size has changed. */ if (menu_ptr == text_menu) { generate_text_length(); text_ypos = -1; /* assume it's not displayed */ text_xpos = -1; } else if (menu_ptr == yes_no_menu) { menu_len = 1; menu_line = 0; generate_yes_no_length(); } if (menu_long > buflen) { buflen = menu_long + 64; buf = (ychar *) realloc_mem(buf, buflen + MENU_EXTRA); } /* get starting X and Y coord */ x = center(me->t_cols, menu_long + MENU_EXTRA); if (menu_line == 0) { if (menu_len + 2 <= me->t_rows) { y = center(me->t_rows, menu_len + 2); raw_term(me, y++, x, "#####", menu_long + MENU_EXTRA); } else y = 0; } else y = 0; /* show as many menu lines as we can */ for (i = menu_line; y + 1 < me->t_rows && i < menu_len; i++, y++) { c = buf; *(c++) = '#'; *(c++) = ' '; if (menu_ptr[i].key == ' ') { j = 0; if (menu_ptr == text_menu) { if (i > 0) { *(c++) = '>'; *(c++) = ' '; j += 2; text_ypos = y; text_xpos = x + j + 2; } } else if (menu_ptr != yes_no_menu) { int temp; temp = center(menu_long + 3, strlen(menu_ptr[i].item)); for (; j < temp; j++) *(c++) = ' '; } for (d = menu_ptr[i].item; *d; d++, j++) *(c++) = (ychar) *d; for (; j < menu_long + 3; j++) *(c++) = ' '; } else { *(c++) = menu_ptr[i].key; *(c++) = ':'; *(c++) = ' '; for (d = menu_ptr[i].item, j = 0; *d; d++, j++) *(c++) = (ychar) *d; for (; j < menu_long; j++) *(c++) = ' '; } *(c++) = ' '; *(c++) = '#'; raw_term(me, y, x, buf, c - buf); } if (y < me->t_rows) { if (i < menu_len) { c = buf; *(c++) = '#'; *(c++) = ' '; *(c++) = ' '; *(c++) = ' '; *(c++) = ' '; for (d = "(more)", j = 0; *d; d++, j++) *(c++) = (ychar) *d; for (; j < menu_long; j++) *(c++) = ' '; *(c++) = ' '; *(c++) = '#'; raw_term(me, y, x, buf, c - buf); raw_term(me, y, x + 12, NULL, 0); } else { raw_term(me, y, x, "#####", menu_long + MENU_EXTRA); if (menu_ptr == text_menu) raw_term(me, text_ypos, text_xpos + text_pos, NULL, 0); else if (menu_ptr == yes_no_menu) raw_term(me, y - 1, x + menu_long + MENU_EXTRA - 2, NULL, 0); else raw_term(me, y, me->t_cols / 2, NULL, 0); } } flush_term(me); } /* * Show a menu, overriding any existing menu. */ int show_menu(menu, len) menu_item *menu; int len; { register int i, j; if (me->t_rows < 2) { show_error("show_menu: window too small"); return -1; } /* scan the menu for problems */ menu_long = 0; for (i = 0; i < len; i++) { if ((j = strlen(menu[i].item)) > menu_long) menu_long = j; if (menu[i].key < ' ' || menu[i].key >= '~') { show_error("show_menu: invalid key"); return -1; } } if (menu_long <= 0) { show_error("show_menu: menu too small"); return -1; } if (menu_long < 10) menu_long = 10; /* set up the menu for display */ menu_ptr = menu; menu_len = len; menu_line = 0; return 0; } /* * Show a text entry menu, overriding any existing menu. */ int show_text(prompt, func) char *prompt; void (*func) (); { if (me->t_rows < 3) { show_error("show_text: window too small"); return -1; } /* set up the menu for display */ text_menu[0].item = prompt; text_menu[0].func = func; text_menu[0].key = ' '; text_str[0] = '\0'; text_menu[1].item = text_str; text_menu[1].func = NULL; text_menu[1].key = ' '; menu_ptr = text_menu; menu_len = 2; menu_line = 0; text_ypos = -1; text_xpos = -1; text_pos = 0; generate_text_length(); return 0; } /* * Show a message in a menu. */ int show_mesg(mesg, func) char *mesg; void (*func) (); { /* set up the menu for display */ mesg_menu[0].item = mesg; mesg_menu[0].func = func; mesg_menu[0].key = ' '; return show_menu(mesg_menu, 1); } int show_main_menu() { static int main_items = 0; if (main_items == 0) { while (main_menu[main_items].key != '\0') main_items++; } return show_menu(main_menu, main_items); } int show_option_menu() { register int i = 0; option_menu[i].item = "Options Menu"; option_menu[i].func = NULL; option_menu[i].key = ' '; i++; option_menu[i].item = ""; option_menu[i].func = NULL; option_menu[i].key = ' '; i++; if (def_flags & FL_SCROLL) option_menu[i].item = "turn scrolling off"; else option_menu[i].item = "turn scrolling on"; option_menu[i].func = option_menu_sel; option_menu[i].key = 's'; i++; if (def_flags & FL_WRAP) option_menu[i].item = "turn word-wrap off"; else option_menu[i].item = "turn word-wrap on"; option_menu[i].func = option_menu_sel; option_menu[i].key = 'w'; i++; if (def_flags & FL_IMPORT) option_menu[i].item = "turn auto-import off"; else option_menu[i].item = "turn auto-import on"; option_menu[i].func = option_menu_sel; option_menu[i].key = 'i'; i++; if (def_flags & FL_INVITE) option_menu[i].item = "turn auto-invite off"; else option_menu[i].item = "turn auto-invite on"; option_menu[i].func = option_menu_sel; option_menu[i].key = 'v'; i++; if (def_flags & FL_RING) option_menu[i].item = "turn reringing off"; else option_menu[i].item = "turn reringing on"; option_menu[i].func = option_menu_sel; option_menu[i].key = 'r'; i++; if (def_flags & FL_PROMPTRING) option_menu[i].item = "don't prompt rerings "; else option_menu[i].item = "prompt before reringing"; option_menu[i].func = option_menu_sel; option_menu[i].key = 'p'; i++; if (def_flags & FL_PROMPTQUIT) option_menu[i].item = "don't prompt to quit"; else option_menu[i].item = "prompt before quitting"; option_menu[i].func = option_menu_sel; option_menu[i].key = 'q'; i++; return show_menu(option_menu, i); } int show_user_menu(title, func, metoo) char *title; void (*func) (); int metoo; { register int i; register yuser *u; user_menu[0].item = title; user_menu[0].func = func; user_menu[0].key = ' ' + (metoo != 0); /* kludge */ user_menu[1].item = ""; user_menu[1].func = NULL; user_menu[1].key = ' '; for (i = 2, u = user_list; u != NULL && i < MAXUMENU; u = u->unext) if (u != me || metoo) { if (u->key != '\0') { strcpy(user_buf[i], u->full_name); user_menu[i].item = user_buf[i]; user_menu[i].func = user_menu_sel; user_menu[i].key = u->key; i++; } } if (i > 2) return show_menu(user_menu, i); kill_menu(); return -1; } void stalkversion(user, buf, len) yuser *user; char *buf; size_t len; { #ifdef HAVE_SNPRINTF if (user->remote.vmajor > 2) snprintf(buf, len, "YTalk V%d.%d", user->remote.vmajor, user->remote.vminor); else if (user->remote.vmajor == 2) snprintf(buf, len, "YTalk V2.?"); else if (user->gt.version != NULL) snprintf(buf, len, "GNU Talk"); else snprintf(buf, len, "BSD Talk"); #else (void) len; if (user->remote.vmajor > 2) sprintf(buf, "YTalk V%d.%d", user->remote.vmajor, user->remote.vminor); else if (user->remote.vmajor == 2) sprintf(buf, "YTalk V2.?"); else if (user->gt.version != NULL) sprintf(buf, "GNU Talk"); else sprintf(buf, "BSD Talk"); #endif return; } int show_user_list() { register int i; register yuser *u; static char name_buf[25], stat_buf[25]; i = 0; user_menu[i].item = "User List"; user_menu[i].func = NULL; user_menu[i].key = ' '; i++; user_menu[i].item = "Name Winsize [My_Size] Software "; user_menu[i].func = NULL; user_menu[i].key = ' '; i++; user_menu[i].item = ""; user_menu[i].func = NULL; user_menu[i].key = ' '; i++; for (u = connect_list; u && i < MAXUMENU; u = u->next) if (u != me) { stalkversion(u, stat_buf, sizeof(stat_buf)); pad_str(u->full_name, 15, name_buf); pad_str(stat_buf, 15, stat_buf); #ifdef HAVE_SNPRINTF snprintf(user_buf[i], 80, "%s %3.3dx%3.3d [%3.3dx%3.3d] %s", name_buf, u->remote.cols, u->remote.rows, u->remote.my_cols, u->remote.my_rows, stat_buf); #else sprintf(user_buf[i], "%s %3.3dx%3.3d [%3.3dx%3.3d] %s", name_buf, u->remote.cols, u->remote.rows, u->remote.my_cols, u->remote.my_rows, stat_buf); #endif user_menu[i].item = user_buf[i]; user_menu[i].func = NULL; user_menu[i].key = ' '; i++; } for (u = wait_list; u && i < MAXUMENU; u = u->next) { pad_str(u->full_name, 15, name_buf); pad_str("", 15, stat_buf); #ifdef HAVE_SNPRINTF snprintf(user_buf[i], 80, "%s %s", name_buf, stat_buf); #else sprintf(user_buf[i], "%s %s", name_buf, stat_buf); #endif user_menu[i].item = user_buf[i]; user_menu[i].func = NULL; user_menu[i].key = ' '; i++; } return show_menu(user_menu, i); } int show_error_menu(str1, str2) char *str1, *str2; { register int i; for (i = 0; error_menu[i].key != '\0'; i++) if (error_menu[i].item == NULL) { strncpy(err_str[got_error], str1, MAXERR); err_str[got_error][MAXERR - 1] = '\0'; error_menu[i++].item = err_str[got_error++]; if (str2 != NULL) { strncpy(err_str[got_error], str2, MAXERR); err_str[got_error][MAXERR - 1] = '\0'; error_menu[i++].item = err_str[got_error++]; } return show_menu(error_menu, i); } return 0; } /* * Prompt user for yes/no response. Return the response. It is necessary * for this function to hang until an answer is received. */ int yes_no(prompt) char *prompt; { int out = 0; int esc_pressed = 0; char *p; p = str_copy(prompt); if (!(def_flags & FL_ESC_YN)) esc_pressed = 1; yes_no_menu[0].func = NULL; yes_no_menu[0].key = ' '; /* show the menu and call input_loop() */ do { yes_no_menu[0].item = p; menu_ptr = yes_no_menu; update_menu(); input_loop(); if (menu_ptr != yes_no_menu || yes_no_menu[0].item != p) { /* somebody pre-empted us */ kill_menu(); io_len = 0; } for (; !esc_pressed && io_len > 0; io_len--, io_ptr++) if (*io_ptr == 27) esc_pressed = 1; for (; io_len > 0; io_len--, io_ptr++) { if (*io_ptr == 'Y' || (*io_ptr == 'y' && !(def_flags & FL_CAPS))) { out = 'y'; break; } if (*io_ptr == 'N' || (*io_ptr == 'n' && !(def_flags & FL_CAPS)) || *io_ptr == 27) { out = 'n'; break; } } } while (out == 0); free_mem(p); kill_menu(); io_len = 0; return out; } void update_user_menu() { if (menu_ptr == user_menu) { redraw_term(me, 0); if (user_menu[0].func) /* it's a user menu */ show_user_menu(user_menu[0].item, user_menu[0].func, user_menu[0].key - ' '); else /* it's a user status list */ show_user_list(); update_menu(); } } ytalk-3.3.0/src/menu.h010064400017510000144000000033151017322505400134300ustar kesousers/* * src/menu.h * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ /* * The following structure defines a menu item. It will be displayed to the * user as the _key_ followed by the _item_. If an item's _key_ is pressed, * the _func_ for that item is called with one argument: the _key_ pressed. */ typedef struct { char *item; /* item string, ie: "add a user" */ void (*func) (); /* function to call */ ychar key; /* activating keypress, ie: "a" */ } menu_item; extern menu_item *menu_ptr; /* if non-NULL, current menu in processing */ /* global functions */ extern void kill_menu(); /* menu.c */ extern void update_menu(); /* menu.c */ extern int show_menu( /* menuptr, len */ ); /* menu.c */ extern int show_text( /* prompt, func */ ); /* menu.c */ extern int show_mesg(); /* menu.c */ extern int show_main_menu(); /* menu.c */ extern int show_option_menu(); /* menu.c */ extern int show_user_menu( /* title, func */ ); /* menu.c */ extern int show_error_menu( /* str1, str2 */ ); /* menu.c */ extern int yes_no( /* prompt */ ); /* menu.c */ extern void update_user_menu(); /* menu.c */ extern void stalkversion( /* yuser, buf, len */ ); /* menu.c */ /* EOF */ ytalk-3.3.0/src/rc.c010064400017510000144000000156711016770312600130770ustar kesousers/* * src/rc.c * runtime configuration parser * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "header.h" #include "mem.h" #include #define IS_WHITE(c) ((c)==' ' || (c)=='\t' || (c)=='\n') extern char *vhost; static struct alias *alias0 = NULL; /* ---- local functions ---- */ static char * get_word(p) char **p; { register char *c, *out; c = *p; while (IS_WHITE(*c)) c++; if (*c == '\0') return NULL; out = c; while (*c && !IS_WHITE(*c)) c++; if (*c) *(c++) = '\0'; *p = c; return out; } static int set_option(opt, value) char *opt, *value; { ylong mask = 0; int set_it; if (strcmp(value, "true") == 0 || strcmp(value, "on") == 0) set_it = 1; else if (strcmp(value, "false") == 0 || strcmp(value, "off") == 0) set_it = 0; else return -1; if (strcmp(opt, "scroll") == 0 || strcmp(opt, "scrolling") == 0 || strcmp(opt, "sc") == 0) mask |= FL_SCROLL; else if (strcmp(opt, "wrap") == 0 || strcmp(opt, "word-wrap") == 0 || strcmp(opt, "wordwrap") == 0 || strcmp(opt, "wrapping") == 0 || strcmp(opt, "ww") == 0) mask |= FL_WRAP; else if (strcmp(opt, "import") == 0 || strcmp(opt, "auto-import") == 0 || strcmp(opt, "autoimport") == 0 || strcmp(opt, "importing") == 0 || strcmp(opt, "aip") == 0 || strcmp(opt, "ai") == 0) mask |= FL_IMPORT; else if (strcmp(opt, "invite") == 0 || strcmp(opt, "auto-invite") == 0 || strcmp(opt, "autoinvite") == 0 || strcmp(opt, "aiv") == 0 || strcmp(opt, "av") == 0) mask |= FL_INVITE; else if (strcmp(opt, "ring") == 0 || strcmp(opt, "rering") == 0 || strcmp(opt, "r") == 0) mask |= FL_RING; else if (strcmp(opt, "prompt-ring") == 0 || strcmp(opt, "prompt-rering") == 0 || strcmp(opt, "promptring") == 0 || strcmp(opt, "promptrering") == 0 || strcmp(opt, "pr") == 0) mask |= FL_PROMPTRING; else if (strcmp(opt, "prompt-quit") == 0 || strcmp(opt, "promptquit") == 0 || strcmp(opt, "pq") == 0) mask |= FL_PROMPTQUIT; else if (strcmp(opt, "beeps") == 0) mask |= FL_BEEP; else if (strcmp(opt, "ignorebreak") == 0) mask |= FL_IGNBRK; else if (strcmp(opt, "escape-yesno") == 0) mask |= FL_ESC_YN; else if (strcmp(opt, "caps") == 0 || strcmp(opt, "CAPS") == 0 || strcmp(opt, "ca") == 0 || strcmp(opt, "CA") == 0) mask |= FL_CAPS; else if (strcmp(opt, "noinvite") == 0 || strcmp(opt, "no-invite") == 0 || strcmp(opt, "noinv") == 0 || strcmp(opt, "ni") == 0) mask |= FL_NOAUTO; if (!mask) return -1; if (set_it) def_flags |= mask; else def_flags &= ~mask; return 0; } static void read_rcfile(fname) char *fname; { FILE *fp; char *buf, *ptr; char *w, *arg1, *arg2, *arg3, *at; int line_no, errline; struct alias *a; if ((fp = fopen(fname, "r")) == NULL) { if (errno != ENOENT) show_error(fname); return; } buf = get_mem(BUFSIZ); line_no = errline = 0; while (fgets(buf, BUFSIZ, fp) != NULL) { line_no++; ptr = buf; w = get_word(&ptr); if (w == NULL || *w == '#') continue; if (strcmp(w, "readdress") == 0) { arg1 = get_word(&ptr); arg2 = get_word(&ptr); arg3 = get_word(&ptr); if (arg3 == NULL) { errline = line_no; break; } readdress_host(arg1, arg2, arg3); } else if (strcmp(w, "set") == 0 || strcmp(w, "turn") == 0) { arg1 = get_word(&ptr); arg2 = get_word(&ptr); if (arg2 == NULL) { errline = line_no; break; } if (set_option(arg1, arg2) < 0) { errline = line_no; break; } } else if (strcmp(w, "localhost") == 0) { arg1 = get_word(&ptr); if (arg1 == NULL) { errline = line_no; break; } if (vhost == NULL) { vhost = get_mem(1 + strlen(arg1)); if (vhost != NULL) strcpy(vhost, arg1); } } else if (strcmp(w, "alias") == 0) { arg1 = get_word(&ptr); arg2 = get_word(&ptr); if (arg2 == NULL) { errline = line_no; break; } a = get_mem(sizeof(struct alias)); at = strchr(arg1, '@'); if (at == arg1) { a->type = ALIAS_AFTER; strncpy(a->from, arg1 + 1, 255); a->from[254] = 0; strncpy(a->to, (*arg2 == '@' ? arg2 + 1 : arg2), 255); a->to[254] = 0; } else if (at == arg1 + strlen(arg1) - 1) { a->type = ALIAS_BEFORE; *at = 0; strncpy(a->from, arg1, 255); a->from[254] = 0; strncpy(a->to, arg2, 255); a->to[254] = 0; if ((at = strchr(a->to, '@')) != NULL) *at = 0; } else { a->type = ALIAS_ALL; strncpy(a->from, arg1, 255); a->from[254] = 0; strncpy(a->to, arg2, 255); a->to[254] = 0; } a->next = alias0; alias0 = a; } else { errline = line_no; break; } } if (errline) { #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "%s: syntax error at line %d", fname, errline); #else sprintf(errstr, "%s: syntax error at line %d", fname, errline); #endif errno = 0; show_error(errstr); } free_mem(buf); fclose(fp); } /* ---- global functions ---- */ char * resolve_alias(uh) char *uh; { struct alias *a; static char uh1[256], *at; int found = 0; for (a = alias0; a; a = a->next) if (a->type == ALIAS_ALL && strcmp(uh, a->from) == 0) return a->to; strncpy(uh1, uh, 255); uh1[254] = 0; if ((at = strchr(uh1, '@')) != NULL) *at = 0; for (a = alias0; a; a = a->next) { if (a->type == ALIAS_BEFORE && strcmp(uh1, a->from) == 0) { found = 1; strncpy(uh1, a->to, 255); uh1[254] = 0; if ((at = strchr(uh, '@')) != NULL) if (strlen(uh1) + strlen(at) < 256) strcat(uh1, at); uh = uh1; break; } } if (!found) { strncpy(uh1, uh, 255); uh1[254] = 0; } at = strchr(uh1, '@'); if (at && at[1]) { at++; for (a = alias0; a; a = a->next) { if (a->type == ALIAS_AFTER && strcmp(at, a->from) == 0) { found = 1; if (strlen(a->to) + (at - uh1) < 255) strcpy(at, a->to); break; } } } if (found) return uh1; else return uh; } void read_ytalkrc() { yuser *u; char *home, *fname; struct passwd *pw; #ifdef SYSTEM_YTALKRC read_rcfile(SYSTEM_YTALKRC); #endif /* read the user's ytalkrc file */ home = getenv("HOME"); if (home == NULL) { pw = getpwuid(myuid); if (pw != NULL) home = pw->pw_dir; } if (home != NULL) { fname = get_mem(strlen(home) + 10); #ifdef HAVE_SNPRINTF snprintf(fname, strlen(home) + 10, "%s/.ytalkrc", home); #else sprintf(fname, "%s/.ytalkrc", home); #endif read_rcfile(fname); free_mem(fname); } /* set all default flags */ for (u = user_list; u != NULL; u = u->unext) if (!(u->flags & FL_LOCKED)) u->flags = def_flags; } ytalk-3.3.0/src/socket.c010064400017510000144000000571461017725500100137610ustar kesousers/* * src/socket.c * socket functions * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "header.h" #include "menu.h" #include "socket.h" #include "mem.h" #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME # include # else # include # endif #endif #ifdef HAVE_ARPA_INET_H # include #else ylong inet_addr(); char *inet_ntoa(); #endif #ifdef _AIX # include #endif struct _talkd talkd[MAXDAEMON + 1]; int daemons = 0; static int otalk, ntalk; /* daemon numbers */ static CTL_MSG omsg; /* old talk message */ static CTL_RESPONSE orsp; /* old talk response */ static CTL_MSG42 nmsg; /* new talk message */ static CTL_RESPONSE42 nrsp; /* new talk response */ static int autofd = -1; /* auto invite socket fd */ static struct sockaddr_in autosock; /* auto invite socket */ static ylong autoid[MAXDAEMON + 1]; /* auto invite seq numbers */ static ylong announce_id = 0; /* announce sequence id */ static readdr *readdr_list = NULL; /* list of re-addresses */ #define IN_ADDR(s) ((s).sin_addr.s_addr) #define IN_PORT(s) ((s).sin_port) #define SOCK_EQUAL(s,c) (IN_PORT(s) == IN_PORT(c) && IN_ADDR(s) == IN_ADDR(c)) /* ---- local functions ---- */ /* * Create a datagram socket. */ static int init_dgram(sock) struct sockaddr_in *sock; { int fd; socklen_t socklen; sock->sin_family = AF_INET; IN_ADDR(*sock) = INADDR_ANY; IN_PORT(*sock) = 0; if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { show_error("init_dgram: socket() failed"); bail(YTE_ERROR); } if (bind(fd, (struct sockaddr *) sock, sizeof(struct sockaddr_in)) != 0) { close(fd); show_error("init_dgram: bind() failed"); bail(YTE_ERROR); } socklen = sizeof(struct sockaddr_in); if (getsockname(fd, (struct sockaddr *) sock, &socklen) < 0) { close(fd); show_error("init_dgram: getsockname() failed"); bail(YTE_ERROR); } IN_ADDR(*sock) = me->host_addr; return fd; } /* * Initialize a new daemon structure. */ static int init_daemon(name, port, mptr, mlen, rptr, rlen) char *name; short port; yaddr mptr, rptr; int mlen, rlen; { struct servent *serv; int d; if (daemons >= MAXDAEMON) { show_error("init_daemon: too many daemons"); bail(YTE_ERROR); } d = ++daemons; /* daemon number zero is not defined */ if ((serv = getservbyname(name, "udp")) != NULL) talkd[d].port = serv->s_port; else talkd[d].port = port; talkd[d].fd = init_dgram(&(talkd[d].sock)); talkd[d].mptr = mptr; talkd[d].mlen = mlen; talkd[d].rptr = rptr; talkd[d].rlen = rlen; return d; } static void read_autoport(fd) int fd; { socklen_t socklen; v2_pack *pack; char *estr; struct sockaddr_in temp; pack = get_mem(sizeof(v2_pack)); /* accept the connection */ socklen = sizeof(struct sockaddr_in); if ((fd = accept(autofd, (struct sockaddr *) & temp, &socklen)) == -1) { show_error("read_autoport: accept() failed"); free_mem(pack); return; } /* * The autoport socket just uses the old Ytalk version 2.? packet. */ errno = 0; if (full_read(fd, (char *) pack, V2_PACKLEN) < 0 || pack->code != V2_AUTO) { show_error("read_autoport: unknown auto-invite connection"); close(fd); free_mem(pack); return; } close(fd); /* Make sure the name/host strings are properly terminated. */ pack->name[V2_NAMELEN - 1] = '\0'; pack->host[V2_HOSTLEN - 1] = '\0'; estr = get_mem(V2_NAMELEN + V2_HOSTLEN + 20); if (!(def_flags & FL_INVITE)) { #ifdef HAVE_SNPRINTF snprintf(estr, V2_NAMELEN + V2_HOSTLEN + 20, "Talk to %s@%s?", pack->name, pack->host); #else sprintf(estr, "Talk to %s@%s?", pack->name, pack->host); #endif if (yes_no(estr) == 'n') { free_mem(estr); free_mem(pack); return; } } #ifdef HAVE_SNPRINTF snprintf(estr, V2_NAMELEN + V2_HOSTLEN + 20, "%s@%s", pack->name, pack->host); #else sprintf(estr, "%s@%s", pack->name, pack->host); #endif (void) invite(estr, 1); /* we should be expected */ free_mem(estr); free_mem(pack); } /* * Create and initialize the auto-invitation socket. */ static void init_autoport() { socklen_t socklen; autosock.sin_family = AF_INET; IN_ADDR(autosock) = INADDR_ANY; IN_PORT(autosock) = 0; if ((autofd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { show_error("init_autoport: socket() failed"); return; } if (bind(autofd, (struct sockaddr *) & autosock, sizeof(struct sockaddr_in)) < 0) { close(autofd); autofd = -1; show_error("init_autoport: bind() failed"); return; } socklen = sizeof(struct sockaddr_in); if (getsockname(autofd, (struct sockaddr *) & autosock, &socklen) < 0) { close(autofd); autofd = -1; show_error("init_autoport: getsockname() failed"); return; } IN_ADDR(autosock) = me->host_addr; if (listen(autofd, 5) < 0) { close(autofd); autofd = -1; show_error("init_autoport: listen() failed"); return; } memset(autoid, 0, (MAXDAEMON + 1) * sizeof(ylong)); add_fd(autofd, read_autoport); } /* * Fill the socket address field with the appropriate return address for the * host I'm sending to. */ static void place_my_address(sock, addr) BSD42_SOCK *sock; register ylong addr; { register readdr *r; for (r = readdr_list; r != NULL; r = r->next) if (((r->from_addr & r->from_mask) == (me->host_addr & r->from_mask)) && ((addr & r->mask) == r->addr)) { addr = (r->id_addr & r->id_mask) | (me->host_addr & (~(r->id_mask))); IN_ADDR(*sock) = addr; break; } if (r == NULL) IN_ADDR(*sock) = me->host_addr; sock->sin_family = htons(AF_INET); } /* * sendit() sends the completed message to the talk daemon at the given * hostname, then reads a response packet. */ static int sendit(addr, d) ylong addr; /* host internet address */ int d; /* daemon number */ { ssize_t n; struct sockaddr_in remote_daemon; struct timeval tv; char *rtype, *mtype; fd_set sel; /* set up the appropriate message structure */ if (d == ntalk) { nmsg.vers = TALK_VERSION; place_my_address(&(nmsg.ctl_addr), addr); mtype = &(nmsg.type); rtype = &(nrsp.type); } else if (d == otalk) { omsg.type = nmsg.type; omsg.addr = nmsg.addr; omsg.id_num = nmsg.id_num; omsg.pid = nmsg.pid; strncpy(omsg.l_name, nmsg.l_name, NAME_SIZE); strncpy(omsg.r_name, nmsg.r_name, NAME_SIZE); strncpy(omsg.r_tty, nmsg.r_tty, TTY_SIZE); place_my_address(&(omsg.ctl_addr), addr); mtype = &(omsg.type); rtype = &(orsp.type); } else { #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "Unkown daemon type: %d", d); #else sprintf(errstr, "Unkown daemon type: %d", d); #endif show_error(errstr); return -1; } /* set up a sockaddr_in for the daemon we're sending to */ remote_daemon.sin_family = AF_INET; IN_ADDR(remote_daemon) = addr; IN_PORT(remote_daemon) = talkd[d].port; /* flush any lingering input */ FD_ZERO(&sel); for (;;) { tv.tv_sec = 0L; tv.tv_usec = 0L; FD_SET(talkd[d].fd, &sel); if ((n = select(talkd[d].fd + 1, &sel, 0, 0, &tv)) < 0) { show_error("sendit: flush select() failed"); return -1; } if (n <= 0) break; if (recv(talkd[d].fd, talkd[d].rptr, talkd[d].rlen, 0) < 0) { show_error("sendit: flush recv() failed"); return -1; } } /* * Now we need to send the actual packet. Due to unreliability of * DGRAM sockets, we must resend the packet until we get a response * from the server. Geez... two different daemons, both on * unreliable sockets, and maybe even different daemons on different * machines. Is *nothing* reliable anymore??? */ do { do { n = sendto(talkd[d].fd, (char *) talkd[d].mptr, talkd[d].mlen, 0, (struct sockaddr *) & remote_daemon, sizeof(remote_daemon)); if (n != (ssize_t)talkd[d].mlen) { show_error("sendit: sendto() failed"); return -1; } tv.tv_sec = 5L; tv.tv_usec = 0L; FD_SET(talkd[d].fd, &sel); if ((n = select(talkd[d].fd + 1, &sel, 0, 0, &tv)) < 0) { show_error("sendit: first select() failed"); return -1; } } while (n <= 0); /* ie: until we receive a reply */ do { n = recv(talkd[d].fd, talkd[d].rptr, talkd[d].rlen, 0); if (n < 0) { show_error("sendit: recv() failed"); return -1; } if (*rtype != *mtype) tv.tv_sec = 5L; else tv.tv_sec = 0L; tv.tv_usec = 0L; FD_SET(talkd[d].fd, &sel); if ((n = select(talkd[d].fd + 1, &sel, 0, 0, &tv)) < 0) { show_error("sendit: second select() failed"); return -1; } } while (n > 0 && *rtype != *mtype); } while (*rtype != *mtype); /* WHEW */ /* * Just because a person is a SYSADMIN doesn't necessarily mean * he/she knows everything about installing software. In fact, many * have been known to install the talk daemon without setting the * option required to pad out the structures so that "long"s are on * four-byte boundaries on machines where "long"s can be on two-byte * boundaries. This "bug" cost me about four hours of debugging to * discover, so I'm not happy right now. Anyway, here's a quick hack * to fix this problem. */ if (d == otalk && nrsp.type == LOOK_UP && nrsp.answer == 0) { u_short t; memcpy((char *) &t, ((char *) &orsp.addr.sin_family) - 2, sizeof(t)); if (ntohs(t) == AF_INET && ntohs(orsp.addr.sin_family) != AF_INET) { char *c; c = ((char *) &orsp) + sizeof(orsp) - 1; for (; c >= (char *) &orsp.id_num; c--) *c = *(c - 2); } } /* * Fill in the new talk response structure if we just read an old * one. */ if (d == otalk) { nrsp.type = orsp.type; nrsp.answer = orsp.answer; nrsp.id_num = orsp.id_num; nrsp.addr = orsp.addr; } return 0; } /* * find_daemon() locates the talk daemon(s) on a machine and determines what * version(s) of the daemon are running. */ static int find_daemon(addr) ylong addr; { register hostinfo *h; register int n, i, d; CTL_MSG m1; CTL_MSG42 m2; struct sockaddr_in remote_daemon; struct timeval tv; int out, max; fd_set sel; static hostinfo *host_head = NULL; /* * If we've already used this host, look it up instead of blitting to * the daemons again... */ for (h = host_head; h; h = h->next) if (h->host_addr == addr) return h->dtype; remote_daemon.sin_family = AF_INET; IN_ADDR(remote_daemon) = addr; m1 = omsg; m2 = nmsg; /* m1.ctl_addr = talkd[otalk].sock; */ memcpy(&m1.ctl_addr, &talkd[otalk].sock, sizeof(m1.ctl_addr)); place_my_address(&(m1.ctl_addr), addr); /* m2.ctl_addr = talkd[ntalk].sock; */ memcpy(&m2.ctl_addr, &talkd[ntalk].sock, sizeof(m2.ctl_addr)); place_my_address(&(m2.ctl_addr), addr); m1.type = m2.type = LOOK_UP; m1.id_num = m2.id_num = htonl(0); m1.r_tty[0] = m2.r_tty[0] = '\0'; strcpy(m1.r_name, "ytalk"); strcpy(m2.r_name, "ytalk"); m1.addr.sin_family = m2.addr.sin_family = htons(AF_INET); m1.ctl_addr.sin_family = m2.ctl_addr.sin_family = htons(AF_INET); out = 0; for (i = 0; i < 5; i++) { IN_PORT(remote_daemon) = talkd[ntalk].port; n = sendto(talkd[ntalk].fd, (char *) &m2, sizeof(m2), 0, (struct sockaddr *) & remote_daemon, sizeof(remote_daemon)); if (n != sizeof(m2)) show_error("Warning: cannot write to new talk daemon"); IN_PORT(remote_daemon) = talkd[otalk].port; n = sendto(talkd[otalk].fd, (char *) &m1, sizeof(m1), 0, (struct sockaddr *) & remote_daemon, sizeof(remote_daemon)); if (n != sizeof(m1)) show_error("Warning: cannot write to old talk daemon"); tv.tv_sec = 4L; tv.tv_usec = 0L; FD_ZERO(&sel); FD_SET(talkd[ntalk].fd, &sel); FD_SET(talkd[otalk].fd, &sel); max = talkd[ntalk].fd; if (max < talkd[otalk].fd) max = talkd[otalk].fd; if ((n = select(1 + max, &sel, NULL, NULL, &tv)) < 0) { show_error("find_daemon: first select() failed"); continue; } if (n == 0) continue; do { for (d = 1; d <= daemons; d++) if (FD_ISSET(talkd[d].fd, &sel)) { int r; r = recv(talkd[d].fd, errstr, talkd[d].rlen, 0); if (r < 0) { if (errno == EINTR || errno == ECONNREFUSED) continue; else show_error("find_daemon: recv() failed"); } out |= (1 << d); } tv.tv_sec = 0L; tv.tv_usec = 500000L; /* give the other daemon a * chance */ FD_ZERO(&sel); FD_SET(talkd[ntalk].fd, &sel); FD_SET(talkd[otalk].fd, &sel); if ((n = select(1 + max, &sel, NULL, NULL, &tv)) < 0) show_error("find_daemon: second select() failed"); } while (n > 0); h = (hostinfo *) get_mem(sizeof(hostinfo)); h->next = host_head; host_head = h; h->host_addr = addr; h->dtype = out; if (out) return out; } #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "No talk daemon on %s", host_name(addr)); #else sprintf(errstr, "No talk daemon on %s", host_name(addr)); #endif show_error(errstr); return 0; } static ylong make_net_mask(addr) ylong addr; { if (addr & (ylong) 0xff) return (ylong) 0xffffffff; if (addr & (ylong) 0xffff) return (ylong) 0xffffff00; if (addr & (ylong) 0xffffff) return (ylong) 0xffff0000; if (addr) return (ylong) 0xff000000; return (ylong) 0; } /* ---- global functions ---- */ /* * Initialize sockets and message parameters. */ void init_socket() { /* init daemons in order of preference */ ntalk = init_daemon("ntalk", 518, (yaddr)&nmsg, sizeof(nmsg), (yaddr)&nrsp, sizeof(nrsp)); otalk = init_daemon("talk", 517, (yaddr)&omsg, sizeof(omsg), (yaddr)&orsp, sizeof(orsp)); strncpy(nmsg.l_name, me->user_name, NTALK_NAME_SIZE); /* omsg.ctl_addr = talkd[otalk].sock; */ /* nmsg.ctl_addr = talkd[ntalk].sock; */ memcpy(&omsg.ctl_addr, &talkd[otalk].sock, sizeof(omsg.ctl_addr)); memcpy(&nmsg.ctl_addr, &talkd[ntalk].sock, sizeof(nmsg.ctl_addr)); /* just in case */ omsg.ctl_addr.sin_family = nmsg.ctl_addr.sin_family = htons(AF_INET); nmsg.vers = TALK_VERSION; (void) find_daemon(me->host_addr); if (!(def_flags & FL_NOAUTO)) init_autoport(); } /* * Close every open descriptor. This should only be used for a quick exit... * it does not gracefully shut systems down. */ void close_all() { register yuser *u; register int d; for (u = user_list; u; u = u->unext) { if (u->fd > 0) close(u->fd); if (u->output_fd > 0) close(u->output_fd); } if (autofd > 0) close(autofd); for (d = 1; d <= daemons; d++) close(talkd[d].fd); } /* * The following routines send a request across the DGRAM socket to the talk * daemons. */ /* * First, a quick and easy interface for the user sockets. */ int send_dgram(user, type) yuser *user; u_char type; { ylong addr; int d; /* set up the message type and where to send it */ switch (type) { case LEAVE_INVITE: /* leave an invite on my machine */ addr = me->host_addr; nmsg.type = LEAVE_INVITE; nmsg.id_num = htonl(user->l_id); break; case DELETE_INVITE: /* delete my invite on my machine */ addr = me->host_addr; nmsg.type = DELETE; nmsg.id_num = htonl(user->l_id); break; case ANNOUNCE: /* ring a user */ addr = user->host_addr; nmsg.type = ANNOUNCE; announce_id += 5; /* no guesswork here */ nmsg.id_num = htonl(announce_id); break; case LOOK_UP: /* look up remote invitation */ addr = user->host_addr; nmsg.type = LOOK_UP; nmsg.id_num = htonl(user->r_id); break; case DELETE: /* delete erroneous remote invitation */ addr = user->host_addr; nmsg.type = DELETE; nmsg.id_num = htonl(user->r_id); break; case AUTO_LOOK_UP: /* look up remote auto-invitation */ addr = user->host_addr; nmsg.type = LOOK_UP; nmsg.id_num = htonl(user->r_id); break; case AUTO_DELETE: /* delete erroneous remote auto-invitation */ addr = user->host_addr; nmsg.type = DELETE; nmsg.id_num = htonl(user->r_id); break; default: errno = 0; show_error("send_dgram: unknown type"); return -1; } /* find a common daemon, if possible */ if (user->daemon != 0) d = user->daemon; else { int dtype, d1, d2; /* * Find the daemon(s) their host supports. If our two * machines support a daemon in common, use that one. Else, * normal UNIX "talk" is already screwed to the wall, but * YTalk will at least work. */ d1 = find_daemon(user->host_addr); d2 = find_daemon(me->host_addr); dtype = d1 & d2; if (d1 == 0 || d2 == 0) return -1; if (dtype == 0) { dtype = find_daemon(addr); for (d = 1; d <= daemons; d++) if (dtype & (1 << d)) break; if (d > daemons) return -1; } else { for (d = 1; d <= daemons; d++) if (dtype & (1 << d)) { user->daemon = d; break; } if (d > daemons) return -1; } } /* * Each user has his own unique daemon id. Why? Tsch. Why. Well, * the talk daemons consider two users equivalent if their usernames * and machine names match. Hence, the daemons will not allow ytalk * to talk with two different users with the same name on some * machine. By assigning unique process id's, we trick the daemons * into thinking we're several different users trying to talk to the * same person. Sick? Don't blame me. */ nmsg.pid = htonl(user->d_id); if (type == AUTO_LOOK_UP || type == AUTO_DELETE) { strcpy(nmsg.l_name, "+AUTO"); /* put on my mask... */ strncpy(nmsg.r_name, user->user_name, NTALK_NAME_SIZE); nmsg.r_tty[0] = '\0'; } else { strncpy(nmsg.r_name, user->user_name, NTALK_NAME_SIZE); strncpy(nmsg.r_tty, user->tty_name, TTY_SIZE); } /* nmsg.addr = user->sock; */ memcpy(&nmsg.addr, &user->sock, sizeof(nmsg.addr)); nmsg.addr.sin_family = htons(AF_INET); if (sendit(addr, d) != 0) { if (type == AUTO_LOOK_UP || type == AUTO_DELETE) strncpy(nmsg.l_name, me->user_name, NTALK_NAME_SIZE); return -2; } switch (type) { case LEAVE_INVITE: user->l_id = ntohl(nrsp.id_num); break; case LOOK_UP: user->r_id = ntohl(nrsp.id_num); break; case AUTO_LOOK_UP: strncpy(nmsg.l_name, me->user_name, NTALK_NAME_SIZE); user->r_id = ntohl(nrsp.id_num); break; case AUTO_DELETE: strncpy(nmsg.l_name, me->user_name, NTALK_NAME_SIZE); break; } return nrsp.answer; } /* * Next, an interface for the auto-invite socket. The auto-invite socket * always sends to the caller's host, and always does just an invite. */ int send_auto(type) u_char type; { int dtype, d, rc; if (autofd < 0) return 0; nmsg.type = type; strcpy(nmsg.r_name, "+AUTO"); nmsg.r_tty[0] = '\0'; /* nmsg.addr = autosock; */ memcpy(&nmsg.addr, &autosock, sizeof(nmsg.addr)); nmsg.addr.sin_family = htons(AF_INET); rc = 0; dtype = find_daemon(me->host_addr); for (d = daemons; d >= 1; d--) if (dtype & (1 << d)) { nmsg.id_num = htonl(autoid[d]); nmsg.pid = htonl(1); if (sendit(me->host_addr, d) < 0) rc = -1; else autoid[d] = ntohl(nrsp.id_num); } if (rc) return rc; if (type == LEAVE_INVITE) return 0; return nrsp.answer; } /* * Shut down the auto-invitation system. */ void kill_auto() { if (autofd < 0) return; (void) send_auto(DELETE); remove_fd(autofd); close(autofd); autofd = -1; } /* * Create a TCP socket for communication with other talk users. */ int newsock(user) yuser *user; { int fd; socklen_t socklen; user->sock.sin_family = AF_INET; IN_ADDR(user->sock) = INADDR_ANY; IN_PORT(user->sock) = 0; if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { show_error("newsock: socket() failed"); return -1; } if (bind(fd, (struct sockaddr *) & user->sock, sizeof(struct sockaddr_in)) < 0) { close(fd); show_error("newsock: bind() failed"); return -1; } socklen = sizeof(struct sockaddr_in); if (getsockname(fd, (struct sockaddr *) & user->sock, &socklen) < 0) { close(fd); show_error("newsock: getsockname() failed"); return -1; } place_my_address((BSD42_SOCK *) &(user->sock), user->host_addr); if (listen(fd, 5) < 0) { close(fd); show_error("newsock: listen() failed"); return -1; } user->fd = fd; fd_to_user[user->fd] = user; user->orig_sock = user->sock; return 0; } /* * Connect to another user's communication socket. */ int connect_to(user) yuser *user; { register yuser *u; int fd; socklen_t socklen; struct sockaddr_in sock, orig_sock; orig_sock = *(struct sockaddr_in *) & nrsp.addr; orig_sock.sin_family = AF_INET; /* it could be one of mine... */ for (u = user_list; u; u = u->unext) if (SOCK_EQUAL(orig_sock, u->orig_sock)) return -3; if (SOCK_EQUAL(orig_sock, autosock)) return -3; sock = orig_sock; if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) { show_error("connect_to: socket() failed"); return -1; } if (connect(fd, (struct sockaddr *) & sock, sizeof(struct sockaddr_in)) < 0) { close(fd); if (errno == ECONNREFUSED) { errno = 0; return -2; } show_error("connect_to: connect() failed"); return -1; } socklen = sizeof(struct sockaddr_in); if (getsockname(fd, (struct sockaddr *) & sock, &socklen) < 0) { close(fd); show_error("connect_to: getsockname() failed"); return -1; } if (user) { user->sock = sock; user->orig_sock = orig_sock; user->fd = fd; fd_to_user[user->fd] = user; } return fd; } /* * Find a host's address. */ ylong get_host_addr(hostname) char *hostname; { struct hostent *host; ylong addr; errno = 0; if ((host = (struct hostent *) gethostbyname(hostname)) != NULL) { if (host->h_length != sizeof(addr)) { #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "Bad IN addr: %s", hostname); #else sprintf(errstr, "Bad IN addr: %s", hostname); #endif show_error(errstr); return (ylong) -1; } memcpy(&addr, host->h_addr, sizeof(addr)); } else if ((addr = (ylong) inet_addr(hostname)) == (ylong) -1) return (ylong) -1; return addr; } /* * Find a host name by host address. [19NOV96 Roger]: try to find the fqdn * (1st alias with a dot) */ char * host_name(addr) ylong addr; { struct hostent *host; char **s; if ((host = gethostbyaddr((char *) &addr, sizeof(addr), AF_INET)) == NULL) { struct in_addr tmp; tmp.s_addr = addr; return inet_ntoa(tmp); } if (strchr(host->h_name, '.')) return (char *) host->h_name; s = host->h_aliases; if (s && *s) for (; *s; s++) if (strchr(*s, '.')) return *s; return (char *) host->h_name; } /* * Re-address a given host ("from_id") to the given address or host id * ("to_id") when communicating with some other host id ("on_id"). This is * useful especially over routers where "foo.com" is known as the * differently-addressed "bar.com" to host "xyzzy.com". */ void readdress_host(from_id, to_id, on_id) char *from_id, *to_id, *on_id; { register readdr *new; ylong from_addr, to_addr, on_addr; ylong from_mask, to_mask, on_mask; if ((from_addr = get_host_addr(from_id)) == (ylong) -1) { #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "Unknown host: '%s'", from_id); #else sprintf(errstr, "Unknown host: '%s'", from_id); #endif show_error(errstr); return; } if ((to_addr = get_host_addr(to_id)) == (ylong) -1) { #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "Unknown host: '%s'", to_id); #else sprintf(errstr, "Unknown host: '%s'", to_id); #endif show_error(errstr); return; } if ((on_addr = get_host_addr(on_id)) == (ylong) -1) { #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "Unknown host: '%s'", on_id); #else sprintf(errstr, "Unknown host: '%s'", on_id); #endif show_error(errstr); return; } from_mask = make_net_mask(from_addr); to_mask = make_net_mask(to_addr); on_mask = make_net_mask(on_addr); #if 0 if ((from_addr & from_mask) != (me->host_addr & from_mask)) return; #endif if (from_addr == to_addr) return; new = (readdr *) get_mem(sizeof(readdr)); new->addr = on_addr; new->mask = on_mask; new->from_addr = from_addr; new->from_mask = from_mask; new->id_addr = to_addr; new->id_mask = to_mask; new->next = readdr_list; readdr_list = new; } ytalk-3.3.0/src/socket.h010064400017510000144000000063601017341350400137560ustar kesousers/* * src/socket.h * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include /* ---- talk daemon information structure ---- */ #define MAXDAEMON 5 struct _talkd { struct sockaddr_in sock;/* socket */ int fd; /* socket file descriptor */ short port; /* port number */ yaddr mptr; /* message pointer */ size_t mlen; /* message length */ yaddr rptr; /* response pointer */ size_t rlen; /* response length */ }; typedef struct _hostinfo { struct _hostinfo *next; /* next in linked list */ ylong host_addr; /* host address */ int dtype; /* active daemon types bitmask */ } hostinfo; typedef struct _readdr { struct _readdr *next; /* next in linked list */ ylong from_addr; /* does this apply to me? */ ylong from_mask; ylong addr; /* this net address [group?], */ ylong mask; /* with this mask, */ ylong id_addr; /* thinks I'm at this net address, */ ylong id_mask; /* with this mask. */ } readdr; extern struct _talkd talkd[MAXDAEMON + 1]; extern int daemons; /* ---- talk daemon I/O structures ---- */ #define NAME_SIZE 9 #define TTY_SIZE 16 typedef struct bsd42_sockaddr_in { u_short sin_family; u_short sin_port; struct in_addr sin_addr; char sin_zero[8]; } BSD42_SOCK; /* * Control Message structure for earlier than BSD4.2 */ typedef struct { char type; char l_name[NAME_SIZE]; char r_name[NAME_SIZE]; char filler; ylong id_num; ylong pid; char r_tty[TTY_SIZE]; BSD42_SOCK addr; BSD42_SOCK ctl_addr; } CTL_MSG; /* * Control Response structure for earlier than BSD4.2 */ typedef struct { char type; char answer; u_short filler; ylong id_num; BSD42_SOCK addr; } CTL_RESPONSE; #define NTALK_NAME_SIZE 12 /* * Control Message structure for BSD4.2 */ typedef struct { u_char vers; char type; u_short filler; ylong id_num; BSD42_SOCK addr; BSD42_SOCK ctl_addr; ylong pid; char l_name[NTALK_NAME_SIZE]; char r_name[NTALK_NAME_SIZE]; char r_tty[TTY_SIZE]; } CTL_MSG42; /* * Control Response structure for BSD4.2 */ typedef struct { u_char vers; char type; char answer; char filler; ylong id_num; BSD42_SOCK addr; } CTL_RESPONSE42; #define TALK_VERSION 1 /* protocol version */ /* * Dgram Types. * * These are the "type" arguments to feed to send_dgram(). Each acts either on * the remote daemon or the local daemon, as marked. */ #define LEAVE_INVITE 0 /* leave an invitation (local) */ #define LOOK_UP 1 /* look up an invitation (remote) */ #define DELETE 2 /* delete erroneous invitation (remote) */ #define ANNOUNCE 3 /* ring a user (remote) */ #define DELETE_INVITE 4 /* delete my invitation (local) */ #define AUTO_LOOK_UP 5 /* look up auto-invitation (remote) */ #define AUTO_DELETE 6 /* delete erroneous auto-invitation (remote) */ /* EOF */ ytalk-3.3.0/src/term.c010064400017510000144000000527331017520107200134320ustar kesousers/* * src/term.c * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "header.h" #include "mem.h" #ifdef HAVE_SYS_IOCTL_H # include #endif #ifdef HAVE_TERMIOS_H # include #else # ifdef HAVE_SGTTY # include # ifdef hpux # include # endif # define USE_SGTTY # endif #endif #include "cwin.h" #include "menu.h" static int term_type = 0; #ifdef USE_SGTTY static int line_discipline; static int local_mode; static struct sgttyb sgttyb; static struct tchars tchars; static struct ltchars ltchars; #else static struct termios tio; #endif #ifdef USE_SGTTY static void init_sgtty() { if (ioctl(0, TIOCGETD, &line_discipline) < 0) { show_error("TIOCGETD"); bail(YTE_INIT); } if (ioctl(0, TIOCLGET, &local_mode) < 0) { show_error("TIOCGETP"); bail(YTE_INIT); } if (ioctl(0, TIOCGETP, &sgttyb) < 0) { show_error("TIOCGETP"); bail(YTE_INIT); } if (ioctl(0, TIOCGETC, &tchars) < 0) { show_error("TIOCGETC"); bail(YTE_INIT); } if (ioctl(0, TIOCGLTC, <chars) < 0) { show_error("TIOCGLTC"); bail(YTE_INIT); } me->old_rub = sgttyb.sg_erase; me->RUB = RUBDEF; me->KILL = sgttyb.sg_kill; me->WORD = ltchars.t_werasc; me->CLR = '\024'; /* ^T */ } #else static void init_termios() { /* get edit chars */ if (tcgetattr(0, &tio) < 0) { show_error("tcgetattr failed"); bail(YTE_INIT); } me->old_rub = tio.c_cc[VERASE]; me->RUB = RUBDEF; #ifdef VKILL me->KILL = tio.c_cc[VKILL]; #else me->KILL = '\025'; /* ^U */ #endif #ifdef VWERASE me->WORD = tio.c_cc[VWERASE]; if (me->WORD == 0xff) me->WORD = '\027'; /* ^W */ #else me->WORD = '\027'; /* ^W */ #endif me->CLR = '\024'; /* ^T */ } #endif /* * Initialize terminal and input characteristics. */ void init_term() { char tmpstr[64]; #ifdef USE_SGTTY init_sgtty(); #else init_termios(); #endif init_curses(); term_type = 1; /* using curses */ /* set me up a terminal */ #ifdef HAVE_SNPRINTF snprintf(tmpstr, sizeof(tmpstr), "YTalk version %s", PACKAGE_VERSION); #else sprintf(tmpstr, "YTalk version %s", PACKAGE_VERSION); #endif if (open_term(me, tmpstr) < 0) { end_term(); show_error("init_term: open_term() failed"); bail(YTE_SUCCESS); } } /* * Set terminal size. */ void set_terminal_size(fd, rows, cols) int fd, rows, cols; { #ifdef TIOCSWINSZ struct winsize winsize; winsize.ws_row = rows; winsize.ws_col = cols; ioctl(fd, TIOCSWINSZ, &winsize); #endif } /* * Set terminal and input characteristics for slave terminals. */ void set_terminal_flags(fd) int fd; { #ifdef USE_SGTTY ioctl(fd, TIOCSETD, &line_discipline); ioctl(fd, TIOCLSET, &local_mode); ioctl(fd, TIOCSETP, &sgttyb); ioctl(fd, TIOCSETC, &tchars); ioctl(fd, TIOCSLTC, <chars); #else if (tcsetattr(fd, TCSANOW, &tio) < 0) show_error("tcsetattr failed"); #endif } int what_term() { return term_type; } /* * Change terminal keypad mode (only for me, only with curses) */ void keypad_term(user, bf) yuser *user; int bf; { if (user != me) return; if (term_type == 1) keypad_curses(bf); } /* * Abort all terminal processing. */ void end_term() { if (term_type == 1) end_curses(); term_type = 0; } /* * Open a new user window. */ int open_term(user, title) register yuser *user; register char *title; { if (open_curses(user, title) != 0) return -1; user->x = user->y = 0; if (user->scr == NULL) resize_win(user, 24, 80); return 0; } /* * Close a user window. */ void close_term(user) register yuser *user; { register int i; if (user->scr) { close_curses(user); for (i = 0; i < user->t_rows; i++) free_mem(user->scr[i]); free_mem(user->scr); user->scr = NULL; free_mem(user->scr_tabs); user->scr_tabs = NULL; user->t_rows = user->rows = 0; user->t_cols = user->cols = 0; } } /* * Place a character. */ void addch_term(user, c) register yuser *user; register ychar c; { if (is_printable(c)) { addch_curses(user, c); user->scr[user->y][user->x] = c; if (++(user->x) >= user->cols) { user->bump = 1; user->x = user->cols - 1; if (user->cols < user->t_cols) move_curses(user, user->y, user->x); } } } /* * Move the cursor. */ void move_term(user, y, x) register yuser *user; register int y, x; { if (y < 0 || y > user->sc_bot) y = user->sc_bot; if (x < 0 || x >= user->cols) { user->bump = 1; x = user->cols - 1; } else { user->bump = 0; user->onend = 0; } move_curses(user, y, x); user->y = y; user->x = x; } /* * Fill terminal region with char */ void fill_term(user, y1, x1, y2, x2, c) yuser *user; int y1, x1, y2, x2; ychar c; { int y, x; for (y = y1; y <= y2; y++) for (x = x1; x <= x2; x++) user->scr[y][x] = c; return; } /* * Clear to EOL. */ void clreol_term(user) register yuser *user; { register int j; register ychar *c; if (user->cols < user->t_cols) { c = user->scr[user->y] + user->x; for (j = user->x; j < user->cols; j++) { *(c++) = ' '; addch_curses(user, ' '); } move_term(user, user->y, user->x); } else { clreol_curses(user); c = user->scr[user->y] + user->x; for (j = user->x; j < user->cols; j++) *(c++) = ' '; } } /* * Clear to EOS. */ void clreos_term(user) register yuser *user; { register int j, i; register ychar *c; int x, y; if (user->cols < user->t_cols || user->rows < user->t_rows) { x = user->x; y = user->y; clreol_term(user); for (i = user->y + 1; i < user->rows; i++) { move_term(user, i, 0); clreol_term(user); } move_term(user, y, x); } else { clreos_curses(user); j = user->x; for (i = user->y; i < user->rows; i++) { c = user->scr[i] + j; for (; j < user->cols; j++) *(c++) = ' '; j = 0; } } } /* * Scroll window. */ void scroll_term(user) register yuser *user; { register int i; register ychar *c; int sy, sx; if (user->sc_bot > user->sc_top) { c = user->scr[user->sc_top]; for (i = user->sc_top; i < user->sc_bot; i++) user->scr[i] = user->scr[i + 1]; user->scr[user->sc_bot] = c; for (i = 0; i < user->cols; i++) *(c++) = ' '; if (user->rows == user->t_rows && user->cols == user->t_cols && user->sc_top == 0 && user->sc_bot == user->rows - 1) scroll_curses(user); else redraw_term(user, 0); } else { sy = user->y; sx = user->x; move_term(user, user->sc_top, 0); clreol_term(user); move_term(user, sy, sx); } } /* * Reverse-scroll window. */ void rev_scroll_term(user) register yuser *user; { register int i; register ychar *c; int sy, sx; if (user->sc_bot > user->sc_top) { c = user->scr[user->sc_bot]; for (i = user->sc_bot; i > user->sc_top; i--) user->scr[i] = user->scr[i - 1]; user->scr[user->sc_top] = c; for (i = 0; i < user->cols; i++) *(c++) = ' '; redraw_term(user, 0); } else { sy = user->y; sx = user->x; move_term(user, user->sc_top, 0); clreol_term(user); move_term(user, sy, sx); } } /* * Flush window output. */ void flush_term(user) register yuser *user; { flush_curses(user); } /* * Rub one character. */ void rub_term(user) register yuser *user; { if (user->x > 0) { if (user->x == user->cols - 1) user->onend = 0; if (user->bump) { addch_term(user, ' '); user->bump = 0; } else { move_term(user, user->y, user->x - 1); addch_term(user, ' '); move_term(user, user->y, user->x - 1); } } } /* * Rub one word. */ void word_term(user) register yuser *user; { register int x; for (x = user->x - 1; x >= 0 && user->scr[user->y][x] == ' '; x--) continue; for (; x >= 0 && user->scr[user->y][x] != ' '; x--) continue; if ((user->x - (++x)) <= 0) return; move_term(user, user->y, x); clreol_term(user); return; } /* * Kill current line. */ void kill_term(user) register yuser *user; { if (user->x > 0) { move_term(user, user->y, 0); clreol_term(user); } } /* * Expand a tab. We use non-destructive tabs. */ void tab_term(user) register yuser *user; { int i; /* Find nearest tab and jump to it. */ if (user->x < user->t_cols) { for (i = (user->x + 1); i <= user->t_cols; i++) { if (user->scr_tabs[i] == 1) { move_term(user, user->y, i); break; } } } } /* * Process a line feed. */ void lf_term(user) register yuser *user; { register int new_y, next_y; new_y = user->y + 1; if (user->flags & FL_RAW) { if (new_y > user->sc_bot) { if (user->flags & FL_SCROLL) scroll_term(user); } move_term(user, new_y, user->x); } else { if (new_y > user->sc_bot) { if (user->flags & FL_SCROLL) { scroll_term(user); move_term(user, user->y, user->x); return; } new_y = 0; } next_y = new_y + 1; if (next_y >= user->rows) next_y = 0; if (next_y > 0 || !(user->flags & FL_SCROLL)) { move_term(user, next_y, user->x); clreol_term(user); } move_term(user, new_y, user->x); } } /* * Process a newline. */ void newline_term(user) register yuser *user; { register int new_y, next_y; new_y = user->y + 1; if (user->flags & FL_RAW) { if (new_y > user->sc_bot) { if (user->flags & FL_SCROLL) scroll_term(user); } move_term(user, new_y, 0); } else { if (new_y > user->sc_bot) { if (user->flags & FL_SCROLL) { scroll_term(user); move_term(user, user->y, 0); return; } new_y = 0; } next_y = new_y + 1; if (next_y >= user->rows) next_y = 0; if (next_y > 0 || !(user->flags & FL_SCROLL)) { move_term(user, next_y, 0); clreol_term(user); } move_term(user, new_y, 0); clreol_term(user); } } /* * Insert lines. */ void add_line_term(user, num) register yuser *user; int num; { register ychar *c; register int i; if (num == 1 && user->y == 0) rev_scroll_term(user); else { /* find number of remaining lines */ i = user->rows - user->y - num; if (i <= 0) { i = user->x; move_term(user, user->y, 0); clreos_term(user); move_term(user, user->y, i); return; } /* swap the remaining lines to bottom */ for (i--; i >= 0; i--) { c = user->scr[user->y + i]; user->scr[user->y + i] = user->scr[user->y + i + num]; user->scr[user->y + i + num] = c; } /* clear the added lines */ for (num--; num >= 0; num--) { c = user->scr[user->y + num]; for (i = 0; i < user->cols; i++) *(c++) = ' '; } redraw_term(user, user->y); } } /* * Delete lines. */ void del_line_term(user, num) register yuser *user; int num; { register ychar *c; register int i; if (num == 1 && user->y == 0) scroll_term(user); else { /* find number of remaining lines */ i = user->rows - user->y - num; if (i <= 0) { i = user->x; move_term(user, user->y, 0); clreos_term(user); move_term(user, user->y, i); return; } /* swap the remaining lines to top */ for (; i > 0; i--) { c = user->scr[user->rows - i]; user->scr[user->rows - i] = user->scr[user->rows - i - num]; user->scr[user->rows - i - num] = c; } /* clear the remaining bottom lines */ for (; num > 0; num--) { c = user->scr[user->rows - num]; for (i = 0; i < user->cols; i++) *(c++) = ' '; } redraw_term(user, user->y); } } static void copy_text(fr, to, count) register ychar *fr, *to; register int count; { if (to < fr) { for (; count > 0; count--) *(to++) = *(fr++); } else { fr += count; to += count; for (; count > 0; count--) *(--to) = *(--fr); } } /* * Add chars. */ void add_char_term(user, num) register yuser *user; int num; { register ychar *c; register int i; /* find number of remaining non-blank chars */ i = user->cols - user->x - num; c = user->scr[user->y] + user->cols - num - 1; while (i > 0 && *c == ' ') c--, i--; if (i <= 0) { clreol_term(user); return; } /* transfer the chars and clear the remaining */ c++; copy_text(c - i, c - i + num, i); for (c -= i; num > 0; num--) { *(c++) = ' '; addch_curses(user, ' '); } for (; i > 0; i--) addch_curses(user, *(c++)); move_curses(user, user->y, user->x); } /* * Delete chars. */ void del_char_term(user, num) register yuser *user; int num; { register ychar *c; register int i; /* find number of remaining non-blank chars */ i = user->cols - user->x - num; c = user->scr[user->y] + user->cols - 1; while (i > 0 && *c == ' ') c--, i--; if (i <= 0) { clreol_term(user); return; } /* transfer the chars and clear the remaining */ c++; copy_text(c - i, c - i - num, i); for (c -= (i + num); i > 0; i--) addch_curses(user, *(c++)); for (; num > 0; num--) { *(c++) = ' '; addch_curses(user, ' '); } move_curses(user, user->y, user->x); } /* * Redraw a user's window. */ void redraw_term(user, y) register yuser *user; register int y; { register int x, spaces; register ychar *c; for (; y < user->t_rows; y++) { move_curses(user, y, 0); clreol_curses(user); spaces = 0; c = user->scr[y]; for (x = 0; x < user->t_cols; x++, c++) { if (*c == ' ') spaces++; else { if (spaces) { if (spaces <= 3) { /* arbitrary */ for (; spaces > 0; spaces--) addch_curses(user, ' '); } else { move_curses(user, y, x); spaces = 0; } } addch_curses(user, *c); } } } /* redisplay any active menu */ if (menu_ptr != NULL) update_menu(); else move_curses(user, user->y, user->x); } /* * Return the first interesting row for a user with a window of the given * height and width. */ static int first_interesting_row(user, height, width) yuser *user; int height, width; { register int j, i; register ychar *c; if (height < user->t_rows) { j = (user->y + 1) - height; if (j < 0) j += user->t_rows; } else { j = user->y + 1; if (j >= user->t_rows) j = 0; } while (j != user->y) { i = (width > user->t_cols) ? user->t_cols : width; for (c = user->scr[j]; i > 0; i--, c++) if (*c != ' ') break; if (i > 0) break; if (++j >= user->t_rows) j = 0; } return j; } /* * Called when a user's window has been resized. */ void resize_win(user, height, width) yuser *user; int height, width; { register int j, i; register ychar *c, **new_scr; int new_y, y_pos; if (height == user->t_rows && width == user->t_cols) return; /* resize the user terminal buffer */ new_y = -1; y_pos = 0; new_scr = (ychar **) get_mem(height * sizeof(ychar *)); if (user->scr == NULL) { user->t_rows = user->rows = 0; user->t_cols = user->cols = 0; } else if (user->region_set) { /* save as many top lines as possible */ for (j = 0; j < height && j < user->t_rows; j++) new_scr[j] = user->scr[j]; new_y = j - 1; y_pos = user->y; for (; j < user->t_rows; j++) free_mem(user->scr[j]); free_mem(user->scr); } else { /* shift all recent lines to top of screen */ j = first_interesting_row(user, height, width); for (i = 0; i < height; i++) { new_scr[++new_y] = user->scr[j]; if (j == user->y) break; if (++j >= user->t_rows) j = 0; } for (i++; i < user->t_rows; i++) { if (++j >= user->t_rows) j = 0; free_mem(user->scr[j]); } y_pos = new_y; free_mem(user->scr); } user->scr = new_scr; /* fill in the missing portions */ if (width > user->t_cols) { for (i = 0; i <= new_y; i++) { user->scr[i] = (ychar *) realloc_mem(user->scr[i], width); for (j = user->t_cols; j < width; j++) user->scr[i][j] = ' '; } user->scr_tabs = realloc_mem(user->scr_tabs, width * sizeof(char)); for (j = user->t_cols; j < width; j++) { if (j % 8 == 0) user->scr_tabs[j] = 1; else user->scr_tabs[j] = 0; } /* rightmost column is always last tab on line */ user->scr_tabs[width - 1] = 1; } for (i = new_y + 1; i < height; i++) { c = user->scr[i] = (ychar *) get_mem(width); for (j = 0; j < width; j++) *(c++) = ' '; } /* reset window values */ user->t_rows = user->rows = height; user->t_cols = user->cols = width; user->sc_top = 0; user->sc_bot = height - 1; move_term(user, y_pos, user->x); send_winch(user); redraw_term(user, 0); flush_term(user); /* Restore raw mode if running a shell */ if (running_process) set_raw_term(); } /* * Draw a nice box. */ static void draw_box(user, height, width, c) yuser *user; int height, width; char c; { register int i; if (width < user->t_cols) { for (i = 0; i < height; i++) { move_term(user, i, width); addch_term(user, c); if (width + 1 < user->t_cols) clreol_term(user); } } if (height < user->t_rows) { move_term(user, height, 0); for (i = 0; i < width; i++) addch_term(user, c); if (width < user->t_cols) addch_term(user, c); if (width + 1 < user->t_cols) clreol_term(user); if (height + 1 < user->t_rows) { move_term(user, height + 1, 0); clreos_term(user); } } } /* * Set the virtual terminal size, ie: the display region. */ void set_win_region(user, height, width) yuser *user; int height, width; { register int x, y; int old_height, old_width; if (height < 2 || height > user->t_rows) height = user->t_rows; if (width < 2 || width > user->t_cols) width = user->t_cols; /* * Don't check if they're already equal; always perform processing. * Just because it's equal over here doesn't mean it's equal for all * ytalk connections. We still need to clear the screen. */ old_height = user->rows; old_width = user->cols; user->rows = user->t_rows; user->cols = user->t_cols; if (user->region_set) { x = user->x; y = user->y; if (width > old_width || height > old_height) draw_box(user, old_height, old_width, ' '); } else { x = y = 0; move_term(user, 0, 0); clreos_term(user); user->region_set = 1; } draw_box(user, height, width, '%'); /* set the display region */ user->rows = height; user->cols = width; user->sc_top = 0; user->sc_bot = height - 1; move_term(user, y, x); flush_term(user); if (user == me) send_region(); } /* * Set the virtual terminal size, ie: the display region. */ void end_win_region(user) yuser *user; { int old_height, old_width; old_height = user->rows; old_width = user->cols; user->rows = user->t_rows; user->cols = user->t_cols; user->sc_top = 0; user->sc_bot = user->rows - 1; if (old_height < user->t_rows || old_width < user->t_cols) draw_box(user, old_height, old_width, ' '); user->region_set = 0; if (user == me) send_end_region(); } /* * Set the scrolling region. */ void set_scroll_region(user, top, bottom) yuser *user; int top, bottom; { if (top < 0 || top >= user->rows || bottom >= user->rows || bottom < top || (bottom <= 0 && top <= 0)) { user->sc_top = 0; user->sc_bot = user->rows - 1; } else { user->sc_top = top; user->sc_bot = bottom; } } /* * Send a message to the terminal. */ void msg_term(user, str) yuser *user; char *str; { int y; if ((y = user->y + 1) >= user->rows) y = 0; move_curses(user, y, 0); addch_curses(user, '['); while (*str) addch_curses(user, *(str++)); addch_curses(user, ']'); clreol_curses(user); move_curses(user, user->y, user->x); flush_curses(user); } /* * Spew terminal contents to a file descriptor. */ void spew_term(user, fd, rows, cols) yuser *user; int fd, rows, cols; { register ychar *c, *e; register int len; int y; static char tmp[20]; if (user->region_set) { y = 0; if (cols > user->cols) cols = user->cols; if (rows > user->rows) rows = user->rows; for (;;) { for (c = e = user->scr[y], len = cols; len > 0; len--, c++) if (*c != ' ') e = c + 1; if (e != user->scr[y]) write(fd, user->scr[y], (size_t)(e - user->scr[y])); if (++y >= rows) break; if (user->crlf == 1) write(fd, "\r\n", 2); else write(fd, "\n", 1); } /* move the cursor to the correct place */ #ifdef HAVE_SNPRINTF snprintf(tmp, sizeof(tmp), "%c[%d;%dH", 27, user->y + 1, user->x + 1); #else sprintf(tmp, "%c[%d;%dH", 27, user->y + 1, user->x + 1); #endif write(fd, tmp, strlen(tmp)); } else { y = first_interesting_row(user, rows, cols); for (;;) { if (y == user->y) { if (user->x > 0) write(fd, user->scr[y], (size_t)user->x); break; } for (c = e = user->scr[y], len = user->t_cols; len > 0; len--, c++) if (*c != ' ') e = c + 1; if (e != user->scr[y]) write(fd, user->scr[y], (size_t)(e - user->scr[y])); if (user->crlf == 1) write(fd, "\r\n", 2); else write(fd, "\n", 1); if (++y >= user->t_rows) y = 0; } } } /* * Draw some raw characters to the screen without updating any buffers. * Whoever uses this should know what they're doing. It should always be * followed by a redraw_term() before calling any of the normal term * functions again. * * If the given string is not as long as the given length, then the string is * repeated to fill the given length. * * This is an unadvertised function. */ void raw_term(user, y, x, str, len) yuser *user; int y, x; ychar *str; int len; { register ychar *c; if (y < 0 || y >= user->t_rows) return; if (x < 0 || x >= user->t_cols) return; move_curses(user, y, x); for (c = str; len > 0; len--, c++) { if (*c == '\0') c = str; if (!is_printable(*c)) return; addch_curses(user, *c); } } int center(width, n) int width, n; { if (n >= width) return 0; return (width - n) / 2; } void redraw_all_terms() { if (term_type == 1) redisplay_curses(); } void set_raw_term() { if (term_type == 1) set_raw_curses(); } void set_cooked_term() { if (term_type == 1) set_cooked_curses(); } ytalk-3.3.0/src/user.c010064400017510000144000000171521017327660500134510ustar kesousers/* * src/user.c * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "header.h" #include "menu.h" #include "mem.h" #include #include extern int dont_change_my_addr; yuser *me; /* my user information */ yuser *user_list; /* list of invited/connected users */ yuser *connect_list; /* list of connected users */ yuser *wait_list; /* list of connected users */ yuser *fd_to_user[MAX_FILES]; /* convert file descriptors to users */ yuser *key_to_user[128]; /* convert menu ident chars to users */ ylong def_flags = 0L; /* default FL_* flags */ static ylong daemon_id; /* running daemon ID counter */ /* ---- local functions ----- */ static int passwd_opened = 0; static char * user_name(uid) ylong uid; { register struct passwd *pw; passwd_opened = 1; if ((pw = getpwuid(uid)) == NULL) return NULL; return pw->pw_name; } static void close_passwd() { if (passwd_opened) { endpwent(); passwd_opened = 0; } } void generate_full_name(user) yuser *user; { register char *c, *d, *ce; if (user->full_name == NULL) user->full_name = get_mem(50); c = user->full_name, ce = user->full_name + 49; for (d = user->user_name; *d && c < ce; d++) *(c++) = *d; if (c < ce) *(c++) = '@'; for (d = user->host_fqdn; *d && c < ce; d++) *(c++) = *d; if (user->tty_name[0]) { if (c < ce) *(c++) = '#'; for (d = user->tty_name; *d && c < ce; d++) *(c++) = *d; } *c = '\0'; } static void assign_key(user) yuser *user; { register ychar old; static ychar key = 'a'; if (user->key != '\0' || user == me || user_list == NULL) return; old = key; do { if (key_to_user[key] == NULL) { key_to_user[key] = user; user->key = key; return; } if (key == 'z') key = 'A'; else if (key == 'Z') key = 'a'; else key++; } while (old != key); user->key = '\0'; } /* ---- global functions ----- */ /* * Initialize user data structures. */ void init_user(vhost) char *vhost; { char *my_name, *my_vhost; char my_host[100]; user_list = NULL; connect_list = NULL; wait_list = NULL; daemon_id = getpid() << 10; memset(fd_to_user, 0, MAX_FILES * sizeof(yuser *)); memset(key_to_user, 0, 128 * sizeof(yuser *)); /* get my username */ my_name = user_name(myuid); if (my_name == NULL || my_name[0] == '\0') { show_error("Who are you?"); bail(YTE_ERROR); } /* get my hostname */ if ((my_vhost = vhost) || (my_vhost = getenv("LOCALHOST"))) { strncpy(my_host, my_vhost, 99); dont_change_my_addr = 1; } else { if (gethostname(my_host, 100) < 0) { show_error("init_user: gethostname() failed"); bail(YTE_ERROR); } else { /* try to find the fqdn */ if (strchr(my_host, '.') == NULL) { ylong adr = get_host_addr(my_host); if (adr != 0 && adr != (ylong) -1) { char *name = host_name(adr); if (name && strchr(name, '.')) strncpy(my_host, name, 99); } } } } my_host[99] = 0; /* get my user record */ if ((me = new_user(my_name, my_host, NULL)) == NULL) bail(YTE_ERROR); me->key = '@'; me->remote.protocol = YTP_NEW; me->remote.vmajor = VMAJOR; me->remote.vminor = VMINOR; me->remote.pid = getpid(); /* make sure we send CR/LF data to ourselves */ me->crlf = 1; close_passwd(); } /* * Create a new user record. */ yuser * new_user(name, hostname, tty) char *name, *hostname, *tty; { register yuser *out, *u; ylong addr; /* find the host address */ if (hostname == NULL || *hostname == '\0') { hostname = me->host_name; addr = me->host_addr; } else if ((addr = get_host_addr(hostname)) == (ylong) -1) { #ifdef HAVE_SNPRINTF snprintf(errstr, MAXERR, "new_user: bad host: '%s'", hostname); #else sprintf(errstr, "new_user: bad host: '%s'", hostname); #endif show_error(errstr); return NULL; } /* create the user record */ out = (yuser *) get_mem(sizeof(yuser)); memset(out, 0, sizeof(yuser)); out->user_name = str_copy(name); out->host_name = str_copy(hostname); if (strchr(hostname, '.')) out->host_fqdn = str_copy(hostname); else out->host_fqdn = str_copy(host_name(addr)); out->host_addr = addr; if (tty) out->tty_name = str_copy(tty); else out->tty_name = str_copy(""); out->d_id = daemon_id++; generate_full_name(out); assign_key(out); out->flags = def_flags; /* Actually make an effort to keep the user list in order */ if (user_list == NULL || out->key <= user_list->key) { out->unext = user_list; user_list = out; } else { for (u = user_list; u->unext != NULL; u = u->unext) if (out->key <= u->unext->key) break; out->unext = u->unext; u->unext = out; } return out; } static void clear_user(user) yuser *user; { unsigned int i; free_mem(user->user_name); free_mem(user->host_name); free_mem(user->host_fqdn); free_mem(user->tty_name); free_mem(user->full_name); if (user->gt.buf != NULL) free_mem(user->gt.buf); if (user->gt.version != NULL) free_mem(user->gt.version); if (user->dbuf != NULL) free_mem(user->dbuf); if (user->term != NULL) free_mem(user->term); if (user->output_fd > 0) close(user->output_fd); if (user->fd) { remove_fd(user->fd); fd_to_user[user->fd] = NULL; close(user->fd); } if (user->key != '\0') key_to_user[user->key] = NULL; if (user->scr != NULL) { for (i = 0; i < user->rows; i++) free_mem(user->scr[i]); free_mem(user->scr); free_mem(user->scr_tabs); } free_mem(user); } void free_user(user) yuser *user; { register yuser *u; /* remove him from the various blacklists */ if (user == user_list) user_list = user->unext; else for (u = user_list; u; u = u->unext) if (u->unext == user) { u->unext = user->unext; break; } if (user == connect_list) connect_list = user->next; else for (u = connect_list; u; u = u->next) if (u->next == user) { u->next = user->next; break; } if (user == wait_list) wait_list = user->next; else for (u = wait_list; u; u = u->next) if (u->next == user) { u->next = user->next; break; } /* close him down */ if (connect_list == NULL && wait_list == NULL && menu_ptr == NULL && running_process == 0) bail(YTE_SUCCESS_PROMPT); close_term(user); clear_user(user); if (connect_list == NULL && wait_list != NULL) msg_term(me, "Waiting for connection..."); user_winch = 1; } /* * Find a user by name/host/pid. If name is NULL, then it is not checked. If * host_addr is (ylong)-1 then it is not checked. If pid is (ylong)-1 then * it is not checked. */ yuser * find_user(name, host_addr, pid) char *name; ylong host_addr, pid; { register yuser *u; for (u = user_list; u; u = u->unext) if (name == NULL || strcmp(u->user_name, name) == 0) if (host_addr == (ylong) -1 || u->host_addr == host_addr) if (pid == (ylong) -1 || u->remote.pid == pid) return u; /* it could be _me_! */ if (name == NULL || strcmp(me->user_name, name) == 0) if (host_addr == (ylong) -1 || me->host_addr == host_addr) if (pid == (ylong) -1 || me->remote.pid == pid) return me; /* nobody I know */ return NULL; } /* * Clear out the user list, freeing memory as we go. */ void free_users() { yuser *u, *un; for (u = user_list; u != NULL;) { un = u->unext; clear_user(u); u = un; } } ytalk-3.3.0/src/vt100.c010064400017510000144000000161051017747751600133520ustar kesousers/* * src/vt100.c * VT100 terminal emulation * * YTalk * * Copyright (C) 1990,1992,1993 Britt Yenne * Currently maintained by Andreas Kling * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include "header.h" void vt100_process(user, data) yuser *user; char data; { int i; if (data >= '0' && data <= '9') { if (user->vt.got_esc > 1) { user->vt.av[user->vt.ac] = (user->vt.av[user->vt.ac] * 10) + (data - '0'); return; } if (user->vt.hash == 1 && data == '8') { fill_term(user, 0, 0, user->rows - 1, user->cols - 1, 'E'); redraw_term(user, 0); user->vt.got_esc = 0; return; } } switch (data) { case ';': /* arg separator */ if (user->vt.ac < MAXARG - 1) user->vt.av[++(user->vt.ac)] = 0; break; case '[': user->vt.got_esc = 2; break; case '?': if (user->vt.got_esc == 2) user->vt.got_esc = 3; else user->vt.got_esc = 0; break; case 'E': newline_term(user); user->vt.got_esc = 0; break; case '#': user->vt.hash = 1; break; case 'c': write(user->fd, "\033[0c", 4); user->vt.got_esc = 0; break; case 8: if (user->x > 0) move_term(user, user->y, user->x - 1); break; case 11: lf_term(user); break; case 13: move_term(user, user->y, 0); break; case 's': /* save cursor */ if (user->vt.got_esc != 2) { user->vt.got_esc = 0; break; } user->sy = user->y; user->sx = user->x; user->vt.got_esc = 0; break; case 'u': /* restore cursor */ if (user->vt.got_esc != 2) { user->vt.got_esc = 0; break; } move_term(user, user->sy, user->sx); user->vt.got_esc = 0; break; case 'h': /* set modes */ switch (user->vt.av[0]) { case 1: /* keypad "application" mode */ keypad_term(user, 1); break; } user->vt.got_esc = 0; break; case 'l': /* clear modes */ switch (user->vt.av[0]) { case 1: /* keypad "normal" mode */ keypad_term(user, 0); break; } user->vt.got_esc = 0; break; case '=': keypad_term(user, 1); user->vt.got_esc = 0; break; case '>': keypad_term(user, 0); user->vt.got_esc = 0; break; case '@': if (user->vt.got_esc == 2) { /* add char */ if (user->vt.av[0] == 0) add_char_term(user, 1); else add_char_term(user, user->vt.av[0]); } user->vt.got_esc = 0; break; case 'A': /* move up */ if (user->vt.av[0] == 0) move_term(user, user->y - 1, user->x); else if ((int) user->vt.av[0] > user->y) move_term(user, 0, user->x); else move_term(user, user->y - user->vt.av[0], user->x); user->vt.got_esc = 0; break; case 'B': /* move down */ if (user->vt.lparen) { user->vt.lparen = 0; } else { if (user->y != user->rows) { if (user->vt.av[0] == 0) move_term(user, user->y + 1, user->x); else move_term(user, user->y + user->vt.av[0], user->x); } } user->vt.got_esc = 0; break; case 'C': /* move right */ if (user->vt.got_esc == 2) { if (user->x != user->cols) { if (user->vt.av[0] == 0) move_term(user, user->y, user->x + 1); else move_term(user, user->y, user->x + user->vt.av[0]); } } user->vt.got_esc = 0; break; case 'D': /* move left */ if (user->vt.got_esc == 2) { if (user->vt.av[0] == 0) move_term(user, user->y, user->x - 1); else if ((int) user->vt.av[0] > user->x) move_term(user, user->y, 0); else move_term(user, user->y, user->x - user->vt.av[0]); } else { if (user->y < user->sc_bot) user->y++; else scroll_term(user); } user->vt.got_esc = 0; break; case 'f': /* force cursor */ case 'H': /* move */ if (user->vt.got_esc == 2) { if (user->vt.av[0] > 0) user->vt.av[0]--; if (user->vt.av[1] > 0) user->vt.av[1]--; move_term(user, user->vt.av[0], user->vt.av[1]); } else { if (data == 'H') /* H is set tab */ user->scr_tabs[user->x] = 1; } user->vt.got_esc = 0; break; case 'G': if (user->vt.got_esc == 2) { if (user->vt.av[0] > 0) user->vt.av[0]--; move_term(user, user->y, user->vt.av[0]); } user->vt.got_esc = 0; break; case 'g': if (user->vt.got_esc == 2) { switch (user->vt.av[0]) { case 3: /* clear all tabs */ for (i = 0; i < user->t_cols; i++) user->scr_tabs[i] = 0; break; case 0: /* clear tab at x */ user->scr_tabs[user->x] = 0; break; } } user->vt.got_esc = 0; break; case 'J': if (user->vt.got_esc == 2) { switch (user->vt.av[0]) { case 1: if (user->x > 0) fill_term(user, 0, 0, user->y - 1, user->cols - 1, ' '); fill_term(user, user->y, 0, user->y, user->x, ' '); redraw_term(user, 0); break; case 2: fill_term(user, 0, 0, user->rows - 1, user->cols - 1, ' '); redraw_term(user, 0); break; default: clreos_term(user); } } user->vt.got_esc = 0; break; case 'K': if (user->vt.got_esc == 2) { switch (user->vt.av[0]) { case 0: /* clear to end of line */ clreol_term(user); break; case 1: /* clear to beginning of line */ fill_term(user, user->y, 0, user->y, user->x, ' '); redraw_term(user, 0); break; case 2: /* clear entire line */ fill_term(user, user->y, 0, user->y, user->cols - 1, ' '); redraw_term(user, 0); break; } } user->vt.got_esc = 0; break; case 'L': if (user->vt.got_esc == 2) { /* add line */ if (user->vt.av[0] == 0) add_line_term(user, 1); else add_line_term(user, user->vt.av[0]); } user->vt.got_esc = 0; break; case 'M': if (user->vt.got_esc == 2) { /* delete line */ if (user->vt.av[0] == 0) del_line_term(user, 1); else del_line_term(user, user->vt.av[0]); } else /* reverse scroll */ if (user->y > user->sc_top) user->y--; else rev_scroll_term(user); user->vt.got_esc = 0; break; case 'P': if (user->vt.got_esc == 2) { /* del char */ if (user->vt.av[0] == 0) del_char_term(user, 1); else del_char_term(user, user->vt.av[0]); } user->vt.got_esc = 0; break; case 'S': /* forward scroll */ scroll_term(user); user->vt.got_esc = 0; break; case 'r': /* set scroll region */ if (user->vt.got_esc == 2) { if (user->vt.av[0] > 0) user->vt.av[0]--; if (user->vt.av[1] > 0) user->vt.av[1]--; set_scroll_region(user, user->vt.av[0], user->vt.av[1]); move_term(user, 0, 0); } user->vt.got_esc = 0; break; case '(': /* skip over lparens for now */ user->vt.lparen = 1; break; case '0': if (user->vt.lparen) user->vt.lparen = 0; user->vt.got_esc = 0; break; case '7': /* save cursor and attributes */ user->sy = user->y; user->sx = user->x; user->vt.got_esc = 0; break; case '8': /* restore cursor and attributes */ move_term(user, user->sy, user->sx); user->vt.got_esc = 0; break; default: user->vt.got_esc = 0; } } ytalk-3.3.0/src/Makefile.in010064400017510000144000000267471020366103200143700ustar kesousers# Makefile.in generated by automake 1.9.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(ytalk_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = ytalk$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac-curses.m4 \ $(top_srcdir)/m4/ac-defdir.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_ytalk_OBJECTS = main.$(OBJEXT) term.$(OBJEXT) user.$(OBJEXT) \ fd.$(OBJEXT) comm.$(OBJEXT) menu.$(OBJEXT) socket.$(OBJEXT) \ rc.$(OBJEXT) exec.$(OBJEXT) getpty.$(OBJEXT) cwin.$(OBJEXT) \ mem.$(OBJEXT) vt100.$(OBJEXT) gtalk.$(OBJEXT) ytalk_OBJECTS = $(am_ytalk_OBJECTS) ytalk_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = am__depfiles_maybe = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(ytalk_SOURCES) DIST_SOURCES = $(ytalk_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @SYSTEM_DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SYSTEM_DEFS = @SYSTEM_DEFS@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ ytalk_SOURCES = \ main.c \ term.c \ user.c \ fd.c \ comm.c \ menu.c \ socket.c \ rc.c \ exec.c \ getpty.c \ cwin.c \ mem.c \ vt100.c \ gtalk.c \ header.h \ cwin.h \ mem.h \ socket.h \ menu.h \ gtalk.h INCLUDES = -I.. all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ytalk$(EXEEXT): $(ytalk_OBJECTS) $(ytalk_DEPENDENCIES) @rm -f ytalk$(EXEEXT) $(LINK) $(ytalk_LDFLAGS) $(ytalk_OBJECTS) $(ytalk_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .c.o: $(COMPILE) -c $< .c.obj: $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ytalk-3.3.0/test004075500017510000144000000000001020366221600124245ustar kesousersytalk-3.3.0/test/Makefile.am010064400017510000144000000002611020173001300145200ustar kesouserscheck_PROGRAMS = ptyalloc ptyalloc_SOURCES = \ ptyalloc.c \ ../src/getpty.c TESTS = sanity ptyalloc INCLUDES = -I.. LIBS = @LIBS@ DEFS = @DEFS@ @SYSTEM_DEFS@ -DYTALK_TEST ytalk-3.3.0/test/ptyalloc.c010064400017510000144000000007141020212733600144730ustar kesousers/* ptyalloc.c * * Test the pseudo-terminal allocation methods in YTalk. */ #include "config.h" #include int getpty(); #ifdef HAVE_OPENPTY int openpty(); #endif int main() { char buf[128]; int fd, fds; int g = 0, o = 0; fd = getpty(buf); if (fd < 0) g++; #ifdef HAVE_OPENPTY if (openpty(&fd, &fds, buf, 0, 0) < 0) #endif o++; if (g && o) { fprintf(stderr, "Both getpty() and openpty() failed.\n"); return 1; } return 0; } ytalk-3.3.0/test/sanity010075500017510000144000000000571020173001300137240ustar kesousers#!/bin/sh exec ../src/ytalk -v >/dev/null 2>&1 ytalk-3.3.0/test/Makefile.in010064400017510000144000000314761020366103300145540ustar kesousers# Makefile.in generated by automake 1.9.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SOURCES = $(ptyalloc_SOURCES) srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : check_PROGRAMS = ptyalloc$(EXEEXT) subdir = test DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac-curses.m4 \ $(top_srcdir)/m4/ac-defdir.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am_ptyalloc_OBJECTS = ptyalloc.$(OBJEXT) getpty.$(OBJEXT) ptyalloc_OBJECTS = $(am_ptyalloc_OBJECTS) ptyalloc_LDADD = $(LDADD) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = am__depfiles_maybe = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(ptyalloc_SOURCES) DIST_SOURCES = $(ptyalloc_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ @SYSTEM_DEFS@ -DYTALK_TEST DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SYSTEM_DEFS = @SYSTEM_DEFS@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ ptyalloc_SOURCES = \ ptyalloc.c \ ../src/getpty.c TESTS = sanity ptyalloc INCLUDES = -I.. all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps test/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-checkPROGRAMS: -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) ptyalloc$(EXEEXT): $(ptyalloc_OBJECTS) $(ptyalloc_DEPENDENCIES) @rm -f ptyalloc$(EXEEXT) $(LINK) $(ptyalloc_LDFLAGS) $(ptyalloc_OBJECTS) $(ptyalloc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .c.o: $(COMPILE) -c $< .c.obj: $(COMPILE) -c `$(CYGPATH_W) '$<'` getpty.o: ../src/getpty.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getpty.o `test -f '../src/getpty.c' || echo '$(srcdir)/'`../src/getpty.c getpty.obj: ../src/getpty.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getpty.obj `if test -f '../src/getpty.c'; then $(CYGPATH_W) '../src/getpty.c'; else $(CYGPATH_W) '$(srcdir)/../src/getpty.c'; fi` uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list='$(TESTS)'; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ echo "SKIP: $$tst"; \ fi; \ done; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="All $$all tests passed"; \ else \ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all tests failed"; \ else \ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ skipped="($$skip tests were not run)"; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic ctags distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ytalk-3.3.0/aclocal.m4010064400017510000144000001132371020366100600133640ustar kesousers# generated automatically by aclocal 1.9.4 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # -*- Autoconf -*- # Copyright (C) 2002, 2003 Free Software Foundation, Inc. # Generated from amversion.in; do not edit by hand. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.4])]) # AM_AUX_DIR_EXPAND # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 6 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # serial 7 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 11 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # -*- Autoconf -*- # Copyright (C) 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # Copyright (C) 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # AM_PROG_INSTALL_STRIP # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/ac-curses.m4]) m4_include([m4/ac-defdir.m4]) ytalk-3.3.0/config.h.in010064400017510000144000000110701020366101700135410ustar kesousers/* config.h.in. Generated from configure.in by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `grantpt' function. */ #undef HAVE_GRANTPT /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_IOVEC_H /* Define to 1 if you have keypad() */ #undef HAVE_KEYPAD /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_NCURSES_H /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the `openpty' function. */ #undef HAVE_OPENPTY /* Define to 1 if you have the `ptsname' function. */ #undef HAVE_PTSNAME /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV /* Define to 1 if you have the `setsid' function. */ #undef HAVE_SETSID /* Define to 1 if you have the header file. */ #undef HAVE_SGTTY_H /* Define to 1 if you have the `sighold' function. */ #undef HAVE_SIGHOLD /* Define to 1 if you have the `sigprocmask' function. */ #undef HAVE_SIGPROCMASK /* Define to 1 if you have the `sigsetmask' function. */ #undef HAVE_SIGSETMASK /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the `socklen_t` type */ #undef HAVE_SOCKLEN_T /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UIO_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the `tcflush' function. */ #undef HAVE_TCFLUSH /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H /* Define to 1 if you have the `ttyname' function. */ #undef HAVE_TTYNAME /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `unlockpt' function. */ #undef HAVE_UNLOCKPT /* Define to 1 if you have the header file. */ #undef HAVE_UTIL_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* The size of a `long', as computed by sizeof. */ #undef SIZEOF_LONG /* The size of a `u_int', as computed by sizeof. */ #undef SIZEOF_U_INT /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* "Location of default ytalkrc file" */ #undef SYSTEM_YTALKRC /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define to 1 to enable debugging output. */ #undef YTALK_DEBUG /* Define to `int' if doesn't define. */ #undef gid_t /* Define to `unsigned' if does not define. */ #undef size_t /* the signed version of size_t */ #undef ssize_t /* sysconfdir */ #undef sysconfdir /* Define to `int' if doesn't define. */ #undef uid_t ytalk-3.3.0/install-sh010055500017510000144000000220171020366103100135170ustar kesousers#!/bin/sh # install - install a program, script, or datafile scriptversion=2004-12-17.09 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit 0;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $cpprog "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit 0 } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: ytalk-3.3.0/missing010055500017510000144000000245331020366103100131170ustar kesousers#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2004-09-07.08 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit 0 ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit 0 ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: ytalk-3.3.0/Makefile.in010064400017510000144000000510451020366103400135700ustar kesousers# Makefile.in generated by automake 1.9.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac-curses.m4 \ $(top_srcdir)/m4/ac-defdir.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(confdir)" NROFF = nroff MANS = $(man_MANS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; confDATA_INSTALL = $(INSTALL_DATA) DATA = $(conf_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SYSTEM_DEFS = @SYSTEM_DEFS@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ confdir = $(sysconfdir) conf_DATA = ytalkrc man_MANS = docs/ytalk.1 EXTRA_DIST = config.rpath mkinstalldirs ChangeLog README INSTALL $(man_MANS) $(conf_DATA) SUBDIRS = docs src test all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu --ignore-deps'; \ cd $(srcdir) && $(AUTOMAKE) --gnu --ignore-deps \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done install-confDATA: $(conf_DATA) @$(NORMAL_INSTALL) test -z "$(confdir)" || $(mkdir_p) "$(DESTDIR)$(confdir)" @list='$(conf_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(confDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(confdir)/$$f'"; \ $(confDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(confdir)/$$f"; \ done uninstall-confDATA: @$(NORMAL_UNINSTALL) @list='$(conf_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(confdir)/$$f'"; \ rm -f "$(DESTDIR)$(confdir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/docs $(distdir)/m4 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(MANS) $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(confdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-confDATA install-man install-exec-am: install-info: install-info-recursive install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-confDATA uninstall-info-am uninstall-man uninstall-info: uninstall-info-recursive uninstall-man: uninstall-man1 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-recursive ctags \ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ dist-tarZ dist-zip distcheck distclean distclean-generic \ distclean-hdr distclean-recursive distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-confDATA \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-man1 \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-confDATA uninstall-info-am \ uninstall-man uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ytalk-3.3.0/configure010075500017510000144000010330631020366104000134300ustar kesousers#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for YTalk 3.3.0. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='YTalk' PACKAGE_TARNAME='ytalk' PACKAGE_VERSION='3.3.0' PACKAGE_STRING='YTalk 3.3.0' PACKAGE_BUGREPORT='' ac_unique_file="src/main.c" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar SYSTEM_DEFS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures YTalk 3.3.0 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 Program names: --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 _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of YTalk 3.3.0:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-debug enable debugging Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-curses=DIR Where curses is installed 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 # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF YTalk configure 3.3.0 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by YTalk $as_me 3.3.0, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='ytalk' VERSION='3.3.0' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; 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_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" host=`uname -s` case "$host" in *SunOS*) SYSTEM_DEFS="-DYTALK_SUNOS" ;; *HP-UX*) SYSTEM_DEFS="-DYTALK_HPUX" ;; esac test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ac_define_dir=`eval echo $sysconfdir` ac_define_dir=`eval echo $ac_define_dir` sysconfdir="$ac_define_dir" cat >>confdefs.h <<_ACEOF #define sysconfdir "$ac_define_dir" _ACEOF cat >>confdefs.h <<_ACEOF #define SYSTEM_YTALKRC "${sysconfdir}/ytalkrc" _ACEOF ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #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; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= 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 how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* 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 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer 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 /* 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 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for long" >&5 echo $ECHO_N "checking for long... $ECHO_C" >&6 if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((long *) 0) return 0; if (sizeof (long)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_long=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 echo "${ECHO_T}$ac_cv_type_long" >&6 echo "$as_me:$LINENO: checking size of long" >&5 echo $ECHO_N "checking size of long... $ECHO_C" >&6 if test "${ac_cv_sizeof_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_long" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (long)); } unsigned long ulongval () { return (long) (sizeof (long)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (long))) < 0) { long i = longval (); if (i != ((long) (sizeof (long)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (long)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_long=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_long" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF echo "$as_me:$LINENO: checking for u_int" >&5 echo $ECHO_N "checking for u_int... $ECHO_C" >&6 if test "${ac_cv_type_u_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((u_int *) 0) return 0; if (sizeof (u_int)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_u_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_u_int=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_u_int" >&5 echo "${ECHO_T}$ac_cv_type_u_int" >&6 echo "$as_me:$LINENO: checking size of u_int" >&5 echo $ECHO_N "checking size of u_int... $ECHO_C" >&6 if test "${ac_cv_sizeof_u_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$ac_cv_type_u_int" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (u_int))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (u_int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (u_int))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (u_int))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((long) (sizeof (u_int))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_u_int=$ac_lo;; '') { { echo "$as_me:$LINENO: error: cannot compute sizeof (u_int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (u_int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (u_int)); } unsigned long ulongval () { return (long) (sizeof (u_int)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (((long) (sizeof (u_int))) < 0) { long i = longval (); if (i != ((long) (sizeof (u_int)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ((long) (sizeof (u_int)))) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_u_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) { { echo "$as_me:$LINENO: error: cannot compute sizeof (u_int), 77 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (u_int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val else ac_cv_sizeof_u_int=0 fi fi echo "$as_me:$LINENO: result: $ac_cv_sizeof_u_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_u_int" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_U_INT $ac_cv_sizeof_u_int _ACEOF ytalk_cv_curses=/usr # Check whether --with-curses or --without-curses was given. if test "${with_curses+set}" = set; then withval="$with_curses" if test $withval != yes; then ytalk_cv_curses=$withval fi if test x$ytalk_cv_curses != x/usr; then LDFLAGS="-L${ytalk_cv_curses}/lib $LDFLAGS" CPPFLAGS="$CPPFLAGS -I${ytalk_cv_curses}/include" fi fi; echo "$as_me:$LINENO: checking for initscr in -lncurses" >&5 echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6 if test "${ac_cv_lib_ncurses_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initscr (); int main () { initscr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ncurses_initscr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ncurses_initscr=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_ncurses_initscr" >&6 if test $ac_cv_lib_ncurses_initscr = yes; then LIBS="$LIBS -lncurses" if test x$ytalk_cv_curses = x/usr -a -d /usr/include/ncurses; then CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses" fi for ac_header in ncurses.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to the YTalk lists. ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done else echo "$as_me:$LINENO: checking for initscr" >&5 echo $ECHO_N "checking for initscr... $ECHO_C" >&6 if test "${ac_cv_func_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define initscr to an innocuous variant, in case declares initscr. For example, HP-UX 11i declares gettimeofday. */ #define initscr innocuous_initscr /* System header to define __stub macros and hopefully few prototypes, which can conflict with char initscr (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef initscr /* 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 initscr (); /* 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_initscr) || defined (__stub___initscr) choke me #else char (*f) () = initscr; #endif #ifdef __cplusplus } #endif int main () { return f != initscr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_initscr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_initscr=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_initscr" >&5 echo "${ECHO_T}$ac_cv_func_initscr" >&6 if test $ac_cv_func_initscr = yes; then : else case $host_os in #(vi freebsd*) #(vi echo "$as_me:$LINENO: checking for tgoto in -lmytinfo" >&5 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmytinfo $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgoto (); int main () { tgoto (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_mytinfo_tgoto=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mytinfo_tgoto=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_mytinfo_tgoto" >&5 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 if test $ac_cv_lib_mytinfo_tgoto = yes; then LIBS="-lmytinfo $LIBS" fi ;; hpux10.*|hpux11.*) echo "$as_me:$LINENO: checking for initscr in -lcur_colr" >&5 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcur_colr $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initscr (); int main () { initscr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_cur_colr_initscr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cur_colr_initscr=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_cur_colr_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6 if test $ac_cv_lib_cur_colr_initscr = yes; then LIBS="-lcur_colr $LIBS" CFLAGS="-I/usr/include/curses_colr $CFLAGS" ac_cv_func_initscr=yes else echo "$as_me:$LINENO: checking for initscr in -lHcurses" >&5 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lHcurses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initscr (); int main () { initscr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Hcurses_initscr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Hcurses_initscr=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_Hcurses_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6 if test $ac_cv_lib_Hcurses_initscr = yes; then # HP's header uses __HP_CURSES, but user claims _HP_CURSES. LIBS="-lHcurses $LIBS" CFLAGS="-D__HP_CURSES -D_HP_CURSES $CFLAGS" ac_cv_func_initscr=yes fi fi ;; linux*) # Suse Linux does not follow /usr/lib convention LIBS="$LIBS -L/lib" ;; esac if test ".$With5lib" != ".no" ; then if test -d /usr/5lib ; then # SunOS 3.x or 4.x CPPFLAGS="$CPPFLAGS -I/usr/5include" LIBS="$LIBS -L/usr/5lib" fi fi if test ".$ac_cv_func_initscr" != .yes ; then cf_save_LIBS="$LIBS" cf_term_lib="" cf_curs_lib="" # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. echo "$as_me:$LINENO: checking for tgoto" >&5 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6 if test "${ac_cv_func_tgoto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define tgoto to an innocuous variant, in case declares tgoto. For example, HP-UX 11i declares gettimeofday. */ #define tgoto innocuous_tgoto /* System header to define __stub macros and hopefully few prototypes, which can conflict with char tgoto (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef tgoto /* 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 tgoto (); /* 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_tgoto) || defined (__stub___tgoto) choke me #else char (*f) () = tgoto; #endif #ifdef __cplusplus } #endif int main () { return f != tgoto; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_tgoto=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_tgoto=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_tgoto" >&5 echo "${ECHO_T}$ac_cv_func_tgoto" >&6 if test $ac_cv_func_tgoto = yes; then cf_term_lib=predefined else for cf_term_lib in termcap termlib unknown do as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh` echo "$as_me:$LINENO: checking for tgoto in -l$cf_term_lib" >&5 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6 if eval "test \"\${$as_ac_Lib+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$cf_term_lib $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgoto (); int main () { tgoto (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 if test `eval echo '${'$as_ac_Lib'}'` = yes; then break fi done fi # Check for library containing initscr test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" for cf_curs_lib in cursesX curses ncurses xcurses jcurses unknown do as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh` echo "$as_me:$LINENO: checking for initscr in -l$cf_curs_lib" >&5 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6 if eval "test \"\${$as_ac_Lib+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$cf_curs_lib $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initscr (); int main () { initscr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 if test `eval echo '${'$as_ac_Lib'}'` = yes; then break fi done test $cf_curs_lib = unknown && { { echo "$as_me:$LINENO: error: no curses library found" >&5 echo "$as_me: error: no curses library found" >&2;} { (exit 1); exit 1; }; } LIBS="-l$cf_curs_lib $cf_save_LIBS" if test "$cf_term_lib" = unknown ; then echo "$as_me:$LINENO: checking if we can link with $cf_curs_lib library" >&5 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <${cf_cv_ncurses_header-curses.h}> int main () { initscr() ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_result=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cf_result=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext echo "$as_me:$LINENO: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 test $cf_result = no && { { echo "$as_me:$LINENO: error: Cannot link curses library" >&5 echo "$as_me: error: Cannot link curses library" >&2;} { (exit 1); exit 1; }; } elif test "$cf_term_lib" != predefined ; then echo "$as_me:$LINENO: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <${cf_cv_ncurses_header-curses.h}> int main () { initscr(); tgoto((char *)0, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_result=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <${cf_cv_ncurses_header-curses.h}> int main () { initscr() ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_result=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cf_result=error fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext echo "$as_me:$LINENO: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 fi fi fi fi echo "$as_me:$LINENO: checking for keypad in -lncurses" >&5 echo $ECHO_N "checking for keypad in -lncurses... $ECHO_C" >&6 if test "${ac_cv_lib_ncurses_keypad+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char keypad (); int main () { keypad (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ncurses_keypad=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ncurses_keypad=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_keypad" >&5 echo "${ECHO_T}$ac_cv_lib_ncurses_keypad" >&6 if test $ac_cv_lib_ncurses_keypad = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_KEYPAD 1 _ACEOF else echo "$as_me:$LINENO: checking for keypad in -lcurses" >&5 echo $ECHO_N "checking for keypad in -lcurses... $ECHO_C" >&6 if test "${ac_cv_lib_curses_keypad+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char keypad (); int main () { keypad (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_curses_keypad=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_curses_keypad=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_curses_keypad" >&5 echo "${ECHO_T}$ac_cv_lib_curses_keypad" >&6 if test $ac_cv_lib_curses_keypad = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_KEYPAD 1 _ACEOF fi fi echo "$as_me:$LINENO: checking for tcgetattr" >&5 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6 if test "${ac_cv_func_tcgetattr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define tcgetattr to an innocuous variant, in case declares tcgetattr. For example, HP-UX 11i declares gettimeofday. */ #define tcgetattr innocuous_tcgetattr /* System header to define __stub macros and hopefully few prototypes, which can conflict with char tcgetattr (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef tcgetattr /* 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 tcgetattr (); /* 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_tcgetattr) || defined (__stub___tcgetattr) choke me #else char (*f) () = tcgetattr; #endif #ifdef __cplusplus } #endif int main () { return f != tcgetattr; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_tcgetattr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_tcgetattr=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_tcgetattr" >&5 echo "${ECHO_T}$ac_cv_func_tcgetattr" >&6 if test $ac_cv_func_tcgetattr = yes; then \ for ac_header in termios.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to the YTalk lists. ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else no_termios=1 fi done else no_termios=1 fi if test "x$no_termios" = "x1" ; then for ac_header in sgtty.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to the YTalk lists. ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { { echo "$as_me:$LINENO: error: Cannot find either termios or sgtty" >&5 echo "$as_me: error: Cannot find either termios or sgtty" >&2;} { (exit 1); exit 1; }; } fi done fi # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" fi; if test "${enable_debug:-no}" != "no"; then cat >>confdefs.h <<\_ACEOF #define YTALK_DEBUG 1 _ACEOF fi echo "$as_me:$LINENO: checking for socket" >&5 echo $ECHO_N "checking for socket... $ECHO_C" >&6 if test "${ac_cv_func_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define socket to an innocuous variant, in case declares socket. For example, HP-UX 11i declares gettimeofday. */ #define socket innocuous_socket /* System header to define __stub macros and hopefully few prototypes, which can conflict with char socket (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef socket /* 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 socket (); /* 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_socket) || defined (__stub___socket) choke me #else char (*f) () = socket; #endif #ifdef __cplusplus } #endif int main () { return f != socket; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_socket=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_socket=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5 echo "${ECHO_T}$ac_cv_func_socket" >&6 if test $ac_cv_func_socket = yes; then : else echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char socket (); int main () { socket (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_socket=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_socket=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 if test $ac_cv_lib_socket_socket = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" else { { echo "$as_me:$LINENO: error: Can't compile without socket" >&5 echo "$as_me: error: Can't compile without socket" >&2;} { (exit 1); exit 1; }; } fi fi echo "$as_me:$LINENO: checking for gethostbyname" >&5 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define gethostbyname to an innocuous variant, in case declares gethostbyname. For example, HP-UX 11i declares gettimeofday. */ #define gethostbyname innocuous_gethostbyname /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef gethostbyname /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me #else char (*f) () = gethostbyname; #endif #ifdef __cplusplus } #endif int main () { return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = yes; then : else echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF LIBS="-lnsl $LIBS" else { { echo "$as_me:$LINENO: error: Can't compile without gethostbyname" >&5 echo "$as_me: error: Can't compile without gethostbyname" >&2;} { (exit 1); exit 1; }; } fi fi echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi for ac_header in fcntl.h netdb.h netinet/in.h sys/ioctl.h sys/time.h unistd.h stropts.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to the YTalk lists. ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in iovec.h sys/uio.h stdlib.h string.h sys/param.h arpa/inet.h sys/stat.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to the YTalk lists. ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef signal # undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main () { int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=int fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF #define uid_t int _ACEOF cat >>confdefs.h <<\_ACEOF #define gid_t int _ACEOF fi echo "$as_me:$LINENO: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((ssize_t *) 0) return 0; if (sizeof (ssize_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ssize_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 if test $ac_cv_type_ssize_t = yes; then : else cat >>confdefs.h <<\_ACEOF #define ssize_t int _ACEOF fi echo "$as_me:$LINENO: checking for socklen_t" >&5 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 if test "${ac_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { if ((socklen_t *) 0) return 0; if (sizeof (socklen_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_socklen_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_socklen_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 if test $ac_cv_type_socklen_t = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKLEN_T 1 _ACEOF fi for ac_header in util.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## -------------------------------- ## ## Report this to the YTalk lists. ## ## -------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in openpty do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6 if test "${ac_cv_lib_util_openpty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" cat >conftest.$ac_ext <<_ACEOF /* 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 openpty (); int main () { openpty (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_util_openpty=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_util_openpty=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6 if test $ac_cv_lib_util_openpty = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_OPENPTY 1 _ACEOF LIBS="$LIBS -lutil" fi fi done 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 <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi 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 for ac_func in putenv strerror ttyname ptsname grantpt unlockpt do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in setsid tcflush snprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in sigprocmask sigsetmask sighold do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF break fi done echo "$as_me:$LINENO: checking for gethostname" >&5 echo $ECHO_N "checking for gethostname... $ECHO_C" >&6 if test "${ac_cv_func_gethostname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define gethostname to an innocuous variant, in case declares gethostname. For example, HP-UX 11i declares gettimeofday. */ #define gethostname innocuous_gethostname /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef gethostname /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostname (); /* 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_gethostname) || defined (__stub___gethostname) choke me #else char (*f) () = gethostname; #endif #ifdef __cplusplus } #endif int main () { return f != gethostname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_gethostname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_gethostname" >&5 echo "${ECHO_T}$ac_cv_func_gethostname" >&6 if test $ac_cv_func_gethostname = yes; then : else { { echo "$as_me:$LINENO: error: Can't run without gethostname" >&5 echo "$as_me: error: Can't run without gethostname" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for select" >&5 echo $ECHO_N "checking for select... $ECHO_C" >&6 if test "${ac_cv_func_select+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define select to an innocuous variant, in case declares select. For example, HP-UX 11i declares gettimeofday. */ #define select innocuous_select /* System header to define __stub macros and hopefully few prototypes, which can conflict with char select (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef select /* 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 select (); /* 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_select) || defined (__stub___select) choke me #else char (*f) () = select; #endif #ifdef __cplusplus } #endif int main () { return f != select; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_select=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_select=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_select" >&5 echo "${ECHO_T}$ac_cv_func_select" >&6 if test $ac_cv_func_select = yes; then : else { { echo "$as_me:$LINENO: error: Can't compile without select" >&5 echo "$as_me: error: Can't compile without select" >&2;} { (exit 1); exit 1; }; } fi ac_config_files="$ac_config_files docs/Makefile docs/ytalk.1 test/Makefile src/Makefile 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, 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. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `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 \ "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 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 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $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. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$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 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH 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 YTalk $as_me 3.3.0, which was generated by GNU Autoconf 2.59. 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 Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ YTalk config.status 3.3.0 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _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 # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "docs/ytalk.1" ) CONFIG_FILES="$CONFIG_FILES docs/ytalk.1" ;; "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { 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 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands 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,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@SYSTEM_DEFS@,$SYSTEM_DEFS,;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,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;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 # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac 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 s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' 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 - | *:- | *:-:* ) # 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 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_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 grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(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'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { 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 # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$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 $dirpart/$fdir else as_dir=$dirpart/$fdir 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 $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # 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