dmucs-0.6.1/0000755000175000017500000000000010457726377010775 5ustar samsamdmucs-0.6.1/CVS/0000755000175000017500000000000010457726367011427 5ustar samsamdmucs-0.6.1/CVS/Root0000644000175000017500000000007110457726363012267 0ustar samsam:ext:vic_norman@dmucs.cvs.sourceforge.net:/cvsroot/dmucs dmucs-0.6.1/CVS/Repository0000644000175000017500000000000610457726363013521 0ustar samsamdmucs dmucs-0.6.1/CVS/Entries0000644000175000017500000000363410457726367012771 0ustar samsam/AUTHORS/1.1.1.1/Tue Jan 10 15:43:28 2006// /COPYING/1.1.1.1/Tue Jan 10 15:43:28 2006// /ChangeLog/1.7/Thu Jul 20 16:18:09 2006// /INSTALL/1.1.1.1/Tue Jan 10 15:43:28 2006// /Makefile.am/1.4/Fri May 19 19:12:10 2006// /Makefile.in/1.5/Thu Jul 20 16:18:09 2006// /NEWS/1.1.1.1/Tue Jan 10 15:43:28 2006// /README/1.1.1.1/Tue Jan 10 15:43:28 2006// /aclocal.m4/1.3/Thu Jul 20 16:18:09 2006// /autoscan.log/1.1.1.1/Tue Jan 10 15:43:28 2006// /config.guess/1.1.1.1/Tue Jan 10 15:43:28 2006// /config.h.in/1.3/Fri Feb 24 19:12:26 2006// /config.sub/1.1.1.1/Tue Jan 10 15:43:28 2006// /configure/1.8/Thu Jul 20 16:18:09 2006// /configure.ac/1.8/Thu Jul 20 16:18:09 2006// /configure.scan/1.1.1.1/Tue Jan 10 15:43:29 2006// /depcomp/1.1.1.1/Tue Jan 10 15:43:29 2006// /dmucs.h/1.4/Fri May 19 19:12:10 2006// /dmucs_db.cc/1.6/Thu Jul 20 16:18:09 2006// /dmucs_db.h/1.4/Thu Jun 22 13:47:14 2006// /dmucs_dprop.h/1.1/Thu Jun 22 13:48:04 2006// /dmucs_host.cc/1.6/Thu Jun 22 13:47:14 2006// /dmucs_host.h/1.6/Thu Jul 20 16:18:09 2006// /dmucs_host_state.cc/1.2/Fri May 19 19:12:10 2006// /dmucs_host_state.h/1.1.1.1/Tue Jan 10 15:43:29 2006// /dmucs_hosts_file.cc/1.3/Mon Jan 16 18:52:14 2006// /dmucs_hosts_file.h/1.5/Wed Feb 15 16:31:56 2006// /dmucs_msg.cc/1.2/Thu Jun 22 13:47:14 2006// /dmucs_msg.h/1.1/Fri May 19 19:12:10 2006// /dmucs_pkt.cc/1.3/Fri May 19 19:12:10 2006// /dmucs_pkt.h/1.2/Fri May 19 19:12:10 2006// /dmucs_resolve.cc/1.4/Thu Jun 22 13:47:14 2006// /dmucs_resolve.h/1.1/Fri Feb 24 19:12:26 2006// /gethost.cc/1.8/Thu Jun 22 13:47:14 2006// /install-sh/1.1.1.1/Tue Jan 10 15:43:29 2006// /libtool/1.2/Wed Feb 15 16:31:56 2006// /loadavg.cc/1.5/Thu Jun 22 13:47:15 2006// /main.cc/1.9/Thu Jun 22 13:47:15 2006// /missing/1.1.1.1/Tue Jan 10 15:43:29 2006// /mkinstalldirs/1.1.1.1/Tue Jan 10 15:43:29 2006// /monitor.cc/1.4/Thu Jun 22 13:47:15 2006// /remhost.cc/1.2/Fri May 19 19:12:10 2006// /test.cc/1.1.1.1/Tue Jan 10 15:43:29 2006// D dmucs-0.6.1/CVS/Entries.Log0000644000175000017500000000006610457726377013506 0ustar samsamA D/COSMIC//// A D/autom4te.cache//// A D/scripts//// dmucs-0.6.1/AUTHORS0000644000175000017500000000000010360753040012007 0ustar samsamdmucs-0.6.1/COPYING0000755000175000017500000003542710360753040012022 0ustar samsam 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 dmucs-0.6.1/ChangeLog0000644000175000017500000000300710457726301012532 0ustar samsam 0.1 -- Initial release. 0.2 -- Thanks to Patrik Olesen for code to eliminate most pthread forks, and for the -H option to the server to point to the hosts-info file. -- made a few changes to store resolve IP names in the DmucsHost object. 0.3 -- Look for hosts-info in the $pkgdatadir now -- usually /usr/local/share/dmucs/hosts-info. -- Expect the administrator to specify CPPFLAGS=-DSERVER_MACH_NAME=\\\"\\\" when running 'configure'. This specifies where the dmucs host-server will be run. With this change, you don't have to specify -s to all the executables (loadavg, gethost, monitor, etc.) 0.4 -- Better yet: the administrator should add the CPPFLAGS thing above to the gmake command -- this works for me on both solaris and linux. Added a message to be printed out when a new host is added. Cleaned up the host name resolution stuff -- all in one file now. Thanks for Patrik Olesen for his help. 0.4.1 -- Fix some problems with 0.4: problem when running out of hosts, problem with compilation, etc. 0.5 -- Fix compilation problems with running out of hosts. 0.6 -- Add support for multiple databases. Using -t "" for loadavg, you can group compilation hosts according to some common characteristic. Then, to get the host with that characteristic, use -t for gethost as well. 0.6.1 -- Fix compilation problems on Solaris with Solaris's cc compiler. Fix a few other minor things I found. dmucs-0.6.1/INSTALL0000644000175000017500000002203010360753040011777 0ustar samsamCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. dmucs-0.6.1/Makefile.am0000644000175000017500000000073010433414212013001 0ustar samsamSUBDIRS = COSMIC bin_PROGRAMS = dmucs gethost loadavg monitor remhost dmucs_SOURCES = dmucs_resolve.cc dmucs_db.cc dmucs_host.cc \ dmucs_hosts_file.cc dmucs_msg.cc dmucs_host_state.cc main.cc LDADD = COSMIC/simpleskts.a gethost_SOURCES = dmucs_resolve.cc gethost.cc loadavg_SOURCES = loadavg.cc monitor_SOURCES = monitor.cc remhost_SOURCES = remhost.cc # # Make -DPKGDATADIR= be passed on each compile. # AM_CPPFLAGS = -DPKGDATADIR=\"${pkgdatadir}\" dmucs-0.6.1/Makefile.in0000644000175000017500000005717110457726301013040 0ustar samsam# Makefile.in generated by automake 1.9.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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 = $(dmucs_SOURCES) $(gethost_SOURCES) $(loadavg_SOURCES) $(monitor_SOURCES) $(remhost_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 = dmucs$(EXEEXT) gethost$(EXEEXT) loadavg$(EXEEXT) \ monitor$(EXEEXT) remhost$(EXEEXT) 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 \ config.guess config.sub depcomp install-sh missing \ mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac 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 = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_dmucs_OBJECTS = dmucs_resolve.$(OBJEXT) dmucs_db.$(OBJEXT) \ dmucs_host.$(OBJEXT) dmucs_hosts_file.$(OBJEXT) \ dmucs_msg.$(OBJEXT) dmucs_host_state.$(OBJEXT) main.$(OBJEXT) dmucs_OBJECTS = $(am_dmucs_OBJECTS) dmucs_LDADD = $(LDADD) dmucs_DEPENDENCIES = COSMIC/simpleskts.a am_gethost_OBJECTS = dmucs_resolve.$(OBJEXT) gethost.$(OBJEXT) gethost_OBJECTS = $(am_gethost_OBJECTS) gethost_LDADD = $(LDADD) gethost_DEPENDENCIES = COSMIC/simpleskts.a am_loadavg_OBJECTS = loadavg.$(OBJEXT) loadavg_OBJECTS = $(am_loadavg_OBJECTS) loadavg_LDADD = $(LDADD) loadavg_DEPENDENCIES = COSMIC/simpleskts.a am_monitor_OBJECTS = monitor.$(OBJEXT) monitor_OBJECTS = $(am_monitor_OBJECTS) monitor_LDADD = $(LDADD) monitor_DEPENDENCIES = COSMIC/simpleskts.a am_remhost_OBJECTS = remhost.$(OBJEXT) remhost_OBJECTS = $(am_remhost_OBJECTS) remhost_LDADD = $(LDADD) remhost_DEPENDENCIES = COSMIC/simpleskts.a DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(dmucs_SOURCES) $(gethost_SOURCES) $(loadavg_SOURCES) \ $(monitor_SOURCES) $(remhost_SOURCES) DIST_SOURCES = $(dmucs_SOURCES) $(gethost_SOURCES) $(loadavg_SOURCES) \ $(monitor_SOURCES) $(remhost_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 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@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ 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@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_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@ SUBDIRS = COSMIC dmucs_SOURCES = dmucs_resolve.cc dmucs_db.cc dmucs_host.cc \ dmucs_hosts_file.cc dmucs_msg.cc dmucs_host_state.cc main.cc LDADD = COSMIC/simpleskts.a gethost_SOURCES = dmucs_resolve.cc gethost.cc loadavg_SOURCES = loadavg.cc monitor_SOURCES = monitor.cc remhost_SOURCES = remhost.cc # # Make -DPKGDATADIR= be passed on each compile. # AM_CPPFLAGS = -DPKGDATADIR=\"${pkgdatadir}\" all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .cc .o .obj 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 '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu 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 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) dmucs$(EXEEXT): $(dmucs_OBJECTS) $(dmucs_DEPENDENCIES) @rm -f dmucs$(EXEEXT) $(CXXLINK) $(dmucs_LDFLAGS) $(dmucs_OBJECTS) $(dmucs_LDADD) $(LIBS) gethost$(EXEEXT): $(gethost_OBJECTS) $(gethost_DEPENDENCIES) @rm -f gethost$(EXEEXT) $(CXXLINK) $(gethost_LDFLAGS) $(gethost_OBJECTS) $(gethost_LDADD) $(LIBS) loadavg$(EXEEXT): $(loadavg_OBJECTS) $(loadavg_DEPENDENCIES) @rm -f loadavg$(EXEEXT) $(CXXLINK) $(loadavg_LDFLAGS) $(loadavg_OBJECTS) $(loadavg_LDADD) $(LIBS) monitor$(EXEEXT): $(monitor_OBJECTS) $(monitor_DEPENDENCIES) @rm -f monitor$(EXEEXT) $(CXXLINK) $(monitor_LDFLAGS) $(monitor_OBJECTS) $(monitor_LDADD) $(LIBS) remhost$(EXEEXT): $(remhost_OBJECTS) $(remhost_DEPENDENCIES) @rm -f remhost$(EXEEXT) $(CXXLINK) $(remhost_LDFLAGS) $(remhost_OBJECTS) $(remhost_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmucs_db.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmucs_host.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmucs_host_state.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmucs_hosts_file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmucs_msg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmucs_resolve.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gethost.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadavg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/monitor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remhost.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` uninstall-info-am: # 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): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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) \ || eval $$failcom; \ 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: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ 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) \ || eval $$failcom; \ 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) @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 $(PROGRAMS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; 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-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-binPROGRAMS clean-generic clean-recursive \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck 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 installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ 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: dmucs-0.6.1/NEWS0000644000175000017500000000000010360753040011436 0ustar samsamdmucs-0.6.1/README0000644000175000017500000000000010360753040011617 0ustar samsamdmucs-0.6.1/aclocal.m40000644000175000017500000007462010457726301012631 0ustar samsam# generated automatically by aclocal 1.9.5 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 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. # Copyright (C) 2002, 2003, 2005 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. # 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.5])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 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. # 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, 2005 # 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. # serial 7 # 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])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # 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. # serial 8 # 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, 2005 # 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. #serial 3 # _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 -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # 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. # serial 12 # 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. # 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]) # Copyright (C) 2001, 2003, 2005 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. 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)]) # Copyright (C) 2003, 2005 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. # serial 2 # 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, 2005 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. # serial 3 # 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 ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # 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. # serial 4 # 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 ]) # Copyright (C) 2003, 2004, 2005 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. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # 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, 2005 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. # serial 3 # _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. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # 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. # serial 4 # 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)]) # Copyright (C) 2001, 2003, 2005 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. # AM_PROG_INSTALL_STRIP # --------------------- # 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, 2005 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. # serial 2 # _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 dmucs-0.6.1/autoscan.log0000644000175000017500000001132210360753040013270 0ustar samsamautoscan: warning: missing AC_CHECK_FUNCS([atexit]) wanted by: COSMIC/Sinit.c:56 autoscan: warning: missing AC_CHECK_FUNCS([memset]) wanted by: COSMIC/Sopen.c:244 COSMIC/Sopen.c:583 autoscan: warning: missing AC_CHECK_FUNCS([select]) wanted by: loadavg.cc:180 main.cc:355 main.cc:377 monitor.cc:138 COSMIC/Smaskwait.c:66 COSMIC/Speek.c:73 COSMIC/Speek.c:76 COSMIC/Stest.c:59 COSMIC/Stest.c:61 COSMIC/Stimeoutwait.c:66 COSMIC/Stimeoutwait.c:71 COSMIC/Swait.c:57 COSMIC/Swait.c:60 COSMIC/HDR/sockets.h:231 autoscan: warning: missing AC_CHECK_FUNCS([socket]) wanted by: COSMIC/Sopen.c:227 COSMIC/Sopen.c:574 COSMIC/EXE/Spm.c:517 autoscan: warning: missing AC_CHECK_FUNCS([strchr]) wanted by: COSMIC/Sgets.c:103 COSMIC/Sopen.c:142 COSMIC/Sopen.c:208 COSMIC/Sopenv.c:69 COSMIC/Srmsrvr.c:49 COSMIC/HDR/xstdlib.h:26 COSMIC/EXE/Spm.c:1063 COSMIC/EXE/sktdbg.c:567 COSMIC/EXE/sktdbg.c:748 COSMIC/EXE/sktdbg.c:748 COSMIC/EXE/spmtable.c:68 COSMIC/EXE/spmtable.c:74 autoscan: warning: missing AC_CHECK_FUNCS([strrchr]) wanted by: COSMIC/HDR/xstdlib.h:27 autoscan: warning: missing AC_CHECK_FUNCS([strstr]) wanted by: remhost.cc:123 autoscan: warning: missing AC_CHECK_HEADERS([fcntl.h]) wanted by: COSMIC/EXAMPLES/oobrecv.c:8 COSMIC/EXAMPLES/oobsend.c:8 COSMIC/EXAMPLES/sktsig.c:6 autoscan: warning: missing AC_CHECK_HEADERS([sys/time.h]) wanted by: COSMIC/HDR/sockets.h:22 COSMIC/HDR/sockets.h:46 COSMIC/HDR/sockets.h:58 COSMIC/HDR/sockets.h:73 COSMIC/HDR/sockets.h:93 COSMIC/HDR/sockets.h:110 COSMIC/HDR/sockets.h:126 COSMIC/HDR/sockets.h:201 COSMIC/HDR/sockets.h:215 COSMIC/HDR/sockets.h:230 COSMIC/HDR/sockets.h:243 COSMIC/HDR/sockets.h:256 autoscan: warning: missing AC_FUNC_ERROR_AT_LINE wanted by: COSMIC/Sinit.c:33 COSMIC/Sinit.c:45 COSMIC/Sinit.c:53 COSMIC/Sopen.c:113 COSMIC/Sopen.c:121 COSMIC/Sopen.c:158 COSMIC/Sopenv.c:136 COSMIC/Speeraddr.c:78 COSMIC/Speername.c:83 COSMIC/error.c:55 COSMIC/error.c:60 COSMIC/rdcolor.c:235 COSMIC/stpnxt.c:121 COSMIC/HDR/xtdio.h:153 COSMIC/EXE/Spm.c:250 COSMIC/EXE/Spm.c:333 COSMIC/EXE/Spm.c:1044 COSMIC/EXE/Spm.c:1071 COSMIC/EXE/sktdbg.c:186 COSMIC/EXE/sktdbg.c:189 COSMIC/EXE/sktdbg.c:190 COSMIC/EXE/sktdbg.c:192 COSMIC/EXE/sktdbg.c:273 COSMIC/EXE/sktdbg.c:284 COSMIC/EXE/sktdbg.c:314 COSMIC/EXE/sktdbg.c:325 COSMIC/EXE/sktdbg.c:506 COSMIC/EXE/sktdbg.c:538 COSMIC/EXE/sktdbg.c:752 COSMIC/EXE/sktdbg.c:792 COSMIC/EXE/spmtable.c:58 COSMIC/EXE/spmtable.c:122 COSMIC/EXE/spmtable.c:136 COSMIC/EXE/spmtable.c:145 COSMIC/EXE/spmtable.c:153 COSMIC/EXE/spmtable.c:167 COSMIC/EXE/spmtable.c:171 COSMIC/EXE/srmsrvr.c:26 COSMIC/EXAMPLES/multiskt.c:61 COSMIC/EXAMPLES/multiskt.c:75 COSMIC/EXAMPLES/oobsend.c:61 COSMIC/EXAMPLES/oobsend.c:77 COSMIC/EXAMPLES/sktsig.c:67 COSMIC/EXAMPLES/sktsig.c:75 COSMIC/EXAMPLES/sktsig.c:89 COSMIC/EXAMPLES/talkclient.c:90 COSMIC/EXAMPLES/talkclient.c:110 COSMIC/EXAMPLES/talkclient.c:119 COSMIC/EXAMPLES/talksrvr.c:87 COSMIC/EXAMPLES/talksrvr.c:107 COSMIC/EXAMPLES/talksrvr.c:201 autoscan: warning: missing AC_FUNC_MALLOC wanted by: COSMIC/Smaskwait.c:291 COSMIC/Smkskt.c:37 COSMIC/HDR/xstdlib.h:25 COSMIC/EXE/Spm.c:588 COSMIC/EXE/Spm.c:776 COSMIC/EXE/Spm.c:1042 COSMIC/EXE/Spm.c:1069 COSMIC/EXAMPLES/multiskt.c:80 COSMIC/EXAMPLES/talksrvr.c:113 autoscan: warning: missing AC_FUNC_SELECT_ARGTYPES wanted by: loadavg.cc:180 main.cc:355 main.cc:377 monitor.cc:138 COSMIC/Smaskwait.c:66 COSMIC/Speek.c:73 COSMIC/Speek.c:76 COSMIC/Stest.c:59 COSMIC/Stest.c:61 COSMIC/Stimeoutwait.c:66 COSMIC/Stimeoutwait.c:71 COSMIC/Swait.c:57 COSMIC/Swait.c:60 COSMIC/HDR/sockets.h:231 autoscan: warning: missing AC_FUNC_STAT wanted by: dmucs_hosts_file.cc:156 autoscan: warning: missing AC_FUNC_VPRINTF wanted by: COSMIC/error.c:91 COSMIC/error.c:95 COSMIC/outofmem.c:40 COSMIC/Sprintf.c:53 COSMIC/Svprintf.c:53 COSMIC/Svprintf.c:55 autoscan: warning: missing AC_HEADER_SYS_WAIT wanted by: gethost.cc:30 COSMIC/EXAMPLES/sktfork.c:6 autoscan: warning: missing AC_HEADER_TIME wanted by: loadavg.cc:179 main.cc:354 main.cc:376 monitor.cc:137 COSMIC/Smaskwait.c:26 COSMIC/Smaskwait.c:27 COSMIC/Smaskwait.c:151 COSMIC/Smaskwait.c:173 COSMIC/Smaskwait.c:174 COSMIC/Speek.c:47 COSMIC/Stest.c:42 COSMIC/Stimeoutwait.c:43 COSMIC/Swait.c:58 COSMIC/Swait.c:60 COSMIC/HDR/sockets.h:231 autoscan: warning: missing AC_TYPE_SIGNAL wanted by: COSMIC/EXAMPLES/oobrecv.c:69 COSMIC/EXAMPLES/oobrecv.c:112 COSMIC/EXAMPLES/sktsig.c:79 COSMIC/EXAMPLES/sktsig.c:120 autoscan: warning: missing AC_TYPE_SIZE_T wanted by: COSMIC/Saccept.c:34 COSMIC/Smkskt.c:43 COSMIC/Smkskt.c:49 COSMIC/Sopen.c:191 COSMIC/Speeraddr.c:36 COSMIC/Speername.c:39 COSMIC/fopenv.c:57 COSMIC/rdcolor.c:273 COSMIC/EXE/Spm.c:599 COSMIC/EXE/Spm.c:608 dmucs-0.6.1/config.guess0000755000175000017500000012214110360753040013272 0ustar samsam#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-10-03' # This file 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. # # 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. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha*:OpenVMS:*:*) echo alpha-hp-vms exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` # GNU/FreeBSD systems have a "k" prefix to indicate we are using # FreeBSD's kernel, but not the complete OS. case ${LIBC} in gnu) kernel_only='k' ;; esac echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) case `uname -p` in *86) UNAME_PROCESSOR=i686 ;; powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp 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` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: dmucs-0.6.1/config.h.in0000644000175000017500000000720510377655232013014 0ustar samsam/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the `gethostbyaddr' function. */ #undef HAVE_GETHOSTBYADDR /* Define to 1 if you have the `gethostbyaddr_r' function. */ #undef HAVE_GETHOSTBYADDR_R /* Define if gethostbyaddr_r() exists and takes 5 arguments */ #undef HAVE_GETHOSTBYADDR_R_5_ARGS /* Define if gethostbyaddr_r() exists and takes 7 arguments */ #undef HAVE_GETHOSTBYADDR_R_7_ARGS /* Define if gethostbyaddr_r() exists and takes 8 arguments */ #undef HAVE_GETHOSTBYADDR_R_8_ARGS /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME /* Define to 1 if you have the `inet_ntoa' function. */ #undef HAVE_INET_NTOA /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* 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_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* 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_SYS_SOCKET_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_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* 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 to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to `int' if does not define. */ #undef pid_t /* Define as `fork' if `vfork' does not work. */ #undef vfork dmucs-0.6.1/config.sub0000755000175000017500000007340610360753040012746 0ustar samsam#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-08-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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. # 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. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | msp430-* \ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nv1) basic_machine=nv1-cray os=-unicosmp ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: dmucs-0.6.1/configure0000755000175000017500000066337110457726301012707 0ustar samsam#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for dmucs 0.5. # # Report bugs to . # # 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='dmucs' PACKAGE_TARNAME='dmucs' PACKAGE_VERSION='0.5' PACKAGE_STRING='dmucs 0.5' PACKAGE_BUGREPORT='vic.norman@gmail.com' ac_unique_file="dmucs_msg.h" # 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 CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC 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_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS 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_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_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 dmucs 0.5 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 dmucs 0.5:";; 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 Some influential environment variables: CXX C++ compiler command CXXFLAGS 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 CC C compiler command CFLAGS C compiler flags 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. Report bugs to . _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 dmucs configure 0.5 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 dmucs $as_me 0.5, 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 ac_config_headers="$ac_config_headers config.h" 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='dmucs' VERSION='0.5' 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 -' # Checks for programs. ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC 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_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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_CXX="$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 CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC 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_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # 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_cxx_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_cxx_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_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_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_cxx_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_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi 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_cxx_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_cxx_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 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="$CXX" 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_CXX_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_CXX_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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_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 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); } 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 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 # Checks for libraries. 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" fi echo "$as_me:$LINENO: checking for gethostbyaddr_r in -lnsl" >&5 echo $ECHO_N "checking for gethostbyaddr_r in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyaddr_r+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 gethostbyaddr_r (); int main () { gethostbyaddr_r (); ; 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_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyaddr_r=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_gethostbyaddr_r" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyaddr_r" >&6 if test $ac_cv_lib_nsl_gethostbyaddr_r = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF LIBS="-lnsl $LIBS" fi 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" fi echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5 echo $ECHO_N "checking for pthread_mutex_lock in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_mutex_lock+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $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 pthread_mutex_lock (); int main () { pthread_mutex_lock (); ; 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_pthread_pthread_mutex_lock=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthread_pthread_mutex_lock=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_pthread_pthread_mutex_lock" >&5 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_lock" >&6 if test $ac_cv_lib_pthread_pthread_mutex_lock = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi # Checks for header files. 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 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 for ac_header in arpa/inet.h netdb.h netinet/in.h sys/socket.h unistd.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 vic.norman@gmail.com ## ## ----------------------------------- ## _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 # Checks for typedefs, structures, and compiler characteristics. echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6 if test "${ac_cv_header_stdbool_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 #ifndef bool # error bool is not defined #endif #ifndef false # error false is not defined #endif #if false # error false is not 0 #endif #ifndef true # error true is not defined #endif #if true != 1 # error true is not 1 #endif #ifndef __bool_true_false_are_defined # error __bool_true_false_are_defined is not defined #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) -0.5 == true ? 1 : -1]; bool e = &s; char f[(_Bool) -0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; int main () { return !a + !b + !c + !d + !e + !f + !g + !h + !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_header_stdbool_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdbool_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 echo "$as_me:$LINENO: checking for _Bool" >&5 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 if test "${ac_cv_type__Bool+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 ((_Bool *) 0) return 0; if (sizeof (_Bool)) 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__Bool=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type__Bool=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 echo "${ECHO_T}$ac_cv_type__Bool" >&6 if test $ac_cv_type__Bool = yes; then cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STDBOOL_H 1 _ACEOF fi echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+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 () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #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 ac_cv_c_inline=$ac_kw; 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 fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac # Checks for library functions. echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_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 ((pid_t *) 0) return 0; if (sizeof (pid_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_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi for ac_header in unistd.h vfork.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 vic.norman@gmail.com ## ## ----------------------------------- ## _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 fork vfork 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 if test "x$ac_cv_func_fork" = xyes; then echo "$as_me:$LINENO: checking for working fork" >&5 echo $ECHO_N "checking for working fork... $ECHO_C" >&6 if test "${ac_cv_func_fork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_fork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* By Ruediger Kuhlmann. */ #include #if HAVE_UNISTD_H # include #endif /* Some systems only have a dummy stub for fork() */ int main () { if (fork() < 0) exit (1); 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 ac_cv_func_fork_works=yes 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_func_fork_works=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 echo "${ECHO_T}$ac_cv_func_fork_works" >&6 else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then echo "$as_me:$LINENO: checking for working vfork" >&5 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 if test "${ac_cv_func_vfork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_vfork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ #include #include #include #include #include #if HAVE_UNISTD_H # include #endif #if HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; exit( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 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_func_vfork_works=yes 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_func_vfork_works=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WORKING_VFORK 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define vfork fork _ACEOF fi if test "x$ac_cv_func_fork_works" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WORKING_FORK 1 _ACEOF 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 for ac_func in gethostbyaddr gethostbyaddr_r gethostbyname gethostname inet_ntoa putenv strerror 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 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" fi echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyaddr_r+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 gethostbyaddr_r to an innocuous variant, in case declares gethostbyaddr_r. For example, HP-UX 11i declares gettimeofday. */ #define gethostbyaddr_r innocuous_gethostbyaddr_r /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyaddr_r (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef gethostbyaddr_r /* 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 gethostbyaddr_r (); /* 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_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) choke me #else char (*f) () = gethostbyaddr_r; #endif #ifdef __cplusplus } #endif int main () { return f != gethostbyaddr_r; ; 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_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyaddr_r=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 if test $ac_cv_func_gethostbyaddr_r = yes; then echo "$as_me:$LINENO: checking signature of gethostbyaddr_r" >&5 echo $ECHO_N "checking signature of gethostbyaddr_r... $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 int main () { struct hostent *h, *hp; char *a, *b; int l, bl, t, e; (void) gethostbyaddr_r(a, l, t, h, b, bl, &hp, &e) ; 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 cat >>confdefs.h <<\_ACEOF #define HAVE_GETHOSTBYADDR_R_8_ARGS 1 _ACEOF echo "$as_me:$LINENO: result: 8 args" >&5 echo "${ECHO_T}8 args" >&6 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. */ # include int main () { struct hostent *h; char *a, *b; int l, bl, t, e; (void) gethostbyaddr_r(a, l, t, h, b, bl, &e) ; 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 cat >>confdefs.h <<\_ACEOF #define HAVE_GETHOSTBYADDR_R_7_ARGS 1 _ACEOF echo "$as_me:$LINENO: result: 7 args" >&5 echo "${ECHO_T}7 args" >&6 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. */ # include int main () { struct hostent_data *d; struct hostent *h; char a, int l, t; (void) gethostbyaddr_r(a, l, t, h, d) ; 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 cat >>confdefs.h <<\_ACEOF #define HAVE_GETHOSTBYADDR_R_5_ARGS 1 _ACEOF echo "$as_me:$LINENO: result: 5 args" >&5 echo "${ECHO_T}5 args" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: unrecognised" >&5 echo "${ECHO_T}unrecognised" >&6 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi echo "$as_me:$LINENO: checking if we need -pthread for threads" >&5 echo $ECHO_N "checking if we need -pthread for threads... $ECHO_C" >&6 if test "${ac_ldflag_pthread+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_LDFLAGS="$LDFLAGS" LDFLAGS="-pthread $LDFLAGS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ char pthread_create(); int main () { pthread_create(); ; 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 "ac_ldflag_pthread=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "ac_ldflag_pthread=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext, LIBS="$ac_save_LDFLAGS" fi if eval "test \"`echo $ac_ldflag_pthread`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6 if test "${ac_cv_search_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_gethostbyname=no cat >conftest.$ac_ext <<_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_search_gethostbyname="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_gethostbyname" = no; then for ac_lib in nsl; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* 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_search_gethostbyname="-l$ac_lib" 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_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6 if test "$ac_cv_search_gethostbyname" != no; then test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" fi echo "$as_me:$LINENO: checking for library containing socket" >&5 echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6 if test "${ac_cv_search_socket+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_socket=no 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_search_socket="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_socket" = no; then for ac_lib in socket; do LIBS="-l$ac_lib $ac_func_search_save_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_search_socket="-l$ac_lib" 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_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5 echo "${ECHO_T}$ac_cv_search_socket" >&6 if test "$ac_cv_search_socket" != no; then test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS" 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 -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 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 LIBS="-lsocket -lnsl $LIBS" fi fi ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, 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__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" 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 dmucs $as_me 0.5, 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="\\ dmucs config.status 0.5 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. "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,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;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,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;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 dmucs-0.6.1/configure.ac0000644000175000017500000001015310457726301013246 0ustar samsam# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.58) AC_INIT(dmucs, 0.5, vic.norman@gmail.com) AC_CONFIG_SRCDIR([dmucs_msg.h]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE # Checks for programs. AC_PROG_CXX AC_PROG_CC # Checks for libraries. AC_CHECK_LIB([nsl], [gethostbyname]) AC_CHECK_LIB([nsl], [gethostbyaddr_r]) AC_CHECK_LIB([socket], [socket]) AC_CHECK_LIB([pthread], [pthread_mutex_lock]) # Checks for header files. AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h sys/socket.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE # Checks for library functions. AC_FUNC_FORK AC_HEADER_STDC AC_CHECK_FUNCS([gethostbyaddr gethostbyaddr_r gethostbyname gethostname inet_ntoa putenv strerror]) dnl ================================================================= dnl Support for thread-safe versions of gethostbyaddr, gethostbyname, dnl gmtime and localtime dnl ================================================================= dnl Next line needed to find the gethost*_r functions on Solaris AC_CHECK_LIB(nsl, gethostbyname) AC_CHECK_FUNC(gethostbyaddr_r, [ AC_MSG_CHECKING([signature of gethostbyaddr_r]) AC_TRY_COMPILE([ # include ], [ struct hostent *h, *hp; char *a, *b; int l, bl, t, e; (void) gethostbyaddr_r(a, l, t, h, b, bl, &hp, &e) ], [ AC_DEFINE(HAVE_GETHOSTBYADDR_R_8_ARGS,1, [Define if gethostbyaddr_r() exists and takes 8 arguments]) AC_MSG_RESULT([8 args]) ], [ AC_TRY_COMPILE([ # include ], [ struct hostent *h; char *a, *b; int l, bl, t, e; (void) gethostbyaddr_r(a, l, t, h, b, bl, &e) ], [ AC_DEFINE(HAVE_GETHOSTBYADDR_R_7_ARGS,1, [Define if gethostbyaddr_r() exists and takes 7 arguments]) AC_MSG_RESULT([7 args]) ], [ AC_TRY_COMPILE([ # include ], [ struct hostent_data *d; struct hostent *h; char a, int l, t; (void) gethostbyaddr_r(a, l, t, h, d) ], [ AC_DEFINE(HAVE_GETHOSTBYADDR_R_5_ARGS,1, [Define if gethostbyaddr_r() exists and takes 5 arguments]) AC_MSG_RESULT([5 args]) ], [ AC_MSG_RESULT(unrecognised) ]) ]) ]) ], [ AC_MSG_RESULT(no) ]) dnl FreeBSD -pthread check - Jonathan McDowell AC_DEFUN([AC_PTHREAD_FREEBSD], [AC_MSG_CHECKING([if we need -pthread for threads]) AC_CACHE_VAL(ac_ldflag_pthread, [ac_save_LDFLAGS="$LDFLAGS" LDFLAGS="-pthread $LDFLAGS" AC_TRY_LINK([char pthread_create();], pthread_create();, eval "ac_ldflag_pthread=yes", eval "ac_ldflag_pthread=no"), LIBS="$ac_save_LDFLAGS" ]) if eval "test \"`echo $ac_ldflag_pthread`\" = yes"; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi ]) AC_PTHREAD_FREEBSD dnl @synopsis LIB_SOCKET_NSL dnl dnl This macro figures out what libraries are required on this platform dnl to link sockets programs. dnl dnl The common cases are not to need any extra libraries, or to need dnl -lsocket and -lnsl. We need to avoid linking with libnsl unless we dnl need it, though, since on some OSes where it isn't necessary it dnl will totally break networking. Unisys also includes gethostbyname() dnl in libsocket but needs libnsl for socket(). dnl dnl @category Misc dnl @author Russ Allbery dnl @author Stepan Kasal dnl @author Warren Young dnl @version 2005-09-06 dnl @license AllPermissive dnl (Got this code from autoconf-archive.cryp.to.) AC_DEFUN([LIB_SOCKET_NSL], [ AC_SEARCH_LIBS([gethostbyname], [nsl]) AC_SEARCH_LIBS([socket], [socket], [], [ AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"], [], [-lnsl])]) ]) LIB_SOCKET_NSL AC_CONFIG_FILES([Makefile]) AC_OUTPUT dmucs-0.6.1/configure.scan0000644000175000017500000000216410360753041013604 0ustar samsam# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.58) AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_HEADER([config.h]) # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_MAKE_SET # Checks for libraries. # Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME # Checks for library functions. AC_FUNC_ERROR_AT_LINE AC_FUNC_FORK AC_FUNC_MALLOC AC_FUNC_SELECT_ARGTYPES AC_TYPE_SIGNAL AC_FUNC_STAT AC_FUNC_VPRINTF AC_CHECK_FUNCS([atexit gethostbyaddr gethostbyaddr_r gethostbyname gethostname inet_ntoa memset putenv select socket strchr strerror strrchr strstr]) AC_CONFIG_FILES([COSMIC/EXAMPLES/Makefile COSMIC/EXE/Makefile COSMIC/Makefile Makefile]) AC_OUTPUT dmucs-0.6.1/depcomp0000755000175000017500000003305210360753041012332 0ustar samsam#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000, 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. # 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. # Originally written by Alexandre Oliva . if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 dmucs-0.6.1/dmucs.h0000644000175000017500000000317610433414212012240 0ustar samsam#ifndef _DMUCS_MAIN_H_ #define _DMUCS_MAIN_H_ /* * dmucs.h: main header file. * * Author: Victor T. Norman * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ extern bool debugMode; #define DMUCS_DEBUG(x) if (debugMode) fprintf x #define strequ(x, y) (strncmp(x, y, strlen(x)) == 0) /* * Ideally, the administrator should set the name of the machine on which * the host server will run (and the clients (like 'gethost') will contact) * by putting CPPFLAGS=-DSERVER_MACH_NAME=\\\"\\\" as an * argument to the 'configure' script. * E.g., ./configure CPPFLAGS=-DSERVER_MACH_NAME=\\\"mulberry\\\" * if the administrator plans to run the 'dmucs' server on a machine * named mulberry. */ #ifndef SERVER_MACH_NAME #define SERVER_MACH_NAME "localhost" #endif #ifndef SERVER_PORT_NUM #define SERVER_PORT_NUM 9714 #endif #include "COSMIC/HDR/sockets.h" void addFd(Socket *sock); void removeFd(Socket *sock); #endif dmucs-0.6.1/dmucs_db.cc0000644000175000017500000003124210457726301013051 0ustar samsam/* * dmucs_db.cc: the DMUCS database object * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include "dmucs.h" #include "dmucs_db.h" #include #include #include #include #include #include DmucsDb *DmucsDb::instance_ = NULL; pthread_mutex_t DmucsDb::mutex_; pthread_mutexattr_t DmucsDb::attr_; const char * dprop2cstr(DmucsDprop d) { return d.c_str(); } DmucsDb::DmucsDb() { pthread_mutexattr_init(&attr_); if (pthread_mutexattr_settype(&attr_, PTHREAD_MUTEX_RECURSIVE) < 0) { throw std::bad_alloc(); } pthread_mutex_init(&mutex_, &attr_); } DmucsDb * DmucsDb::getInstance() { if (instance_ == NULL) { instance_ = new DmucsDb(); } return instance_; } void DmucsDb::assignCpuToClient(const unsigned int clientIp, const DmucsDprop dprop, const unsigned int sock) { MutexMonitor m(&mutex_); /* add sock -> dprop mapping */ sock2DpropDb_.insert(std::make_pair(sock, dprop)); return dbDb_.find(dprop)->second.assignCpuToClient(clientIp, sock); } void DmucsDb::releaseCpu(const unsigned int sock) { /* Get the dprop so that we can release the cpu back into the correct sub-db in the DmucsDb. */ dmucs_sock_dprop_db_iter_t itr = sock2DpropDb_.find(sock); if (itr == sock2DpropDb_.end()) { DMUCS_DEBUG((stderr, "No sock->dprop mapping found!\n")); return; } DmucsDprop dprop = itr->second; sock2DpropDb_.erase(itr); dbDb_.find(dprop)->second.releaseCpu(sock); } /* ---------------------------------------------------------------------- */ /* DmucsDpropDb methods. */ /* ---------------------------------------------------------------------- */ /* * getHost: search for the DmucsHost object in the various sets, and return * it when it is found. If it is not found, throw a DmucsHostNotFound * exception. */ DmucsHost * DmucsDpropDb::getHost(const struct in_addr &ipAddr) { DmucsHost host(ipAddr, dprop_, 0, 0); dmucs_host_set_iter_t hptr = allHosts_.find(&host); if (hptr == allHosts_.end()) { throw DmucsHostNotFound(/* ipaddr */); } return *hptr; } bool DmucsDpropDb::haveHost(const struct in_addr &ipAddr) { DmucsHost host(ipAddr, dprop_, 0, 0); return (allHosts_.find(&host) != allHosts_.end()); } /* * return the IP address of a randomly-selected, highest-tier available cpu */ unsigned int DmucsDpropDb::getBestAvailCpu() { unsigned int result = 0UL; for (dmucs_avail_cpus_riter_t itr = availCpus_.rbegin(); itr != availCpus_.rend(); ++itr) { if (itr->second.empty()) { continue; } srandom((unsigned int) time(NULL)); int n = random() % itr->second.size(); dmucs_cpus_iter_t itr2 = itr->second.begin(); for (int i = 0; i < n; ++itr2, i++) ; result = *itr2; // get the IP address of the nth element in the list /* Remove the nth element from the list. */ itr->second.erase(itr2); return result; } throw DmucsNoMoreHosts(); } void DmucsDpropDb::assignCpuToClient(const unsigned int hostIp, const unsigned int sock) { struct in_addr t2; t2.s_addr = hostIp; DMUCS_DEBUG((stderr, "assignCpu hostip %s\n", inet_ntoa(t2))); assignedCpus_.insert(std::make_pair(sock, hostIp)); numAssignedCpus_++; int t; if ((t = assignedCpus_.size()) > numConcurrentAssigned_) { numConcurrentAssigned_ = t; } } void DmucsDpropDb::releaseCpu(const unsigned int sock) { DMUCS_DEBUG((stderr, "releaseCpu for socket 0x%x\n", sock)); dmucs_assigned_cpus_iter_t itr = assignedCpus_.find(sock); if (itr == assignedCpus_.end()) { DMUCS_DEBUG((stderr, "No cpu found in assignedCpus for sock 0x%x\n", sock)); return; } unsigned int hostIp = itr->second; assignedCpus_.erase(itr); struct in_addr in; in.s_addr = hostIp; try { DmucsHost *host = getHost(in); /* Put this message out on the console, so the administrator can see when a host is released back to the db. */ fprintf(stderr, "Got %s back\n", host->getName().c_str()); /* The host may be marked unavailable while one of the cpus was assigned. In this case, don't add the cpu back. */ if (host->getStateAsInt() == STATUS_AVAILABLE) { int tier = host->getTier(); addCpusToTier(tier, hostIp, 1); } } catch (DmucsHostNotFound &e) { /* The host may have been removed from the db while a cpu was assigned. In this case, just don't add the cpu back to the availCpus_ db table. */ } } std::string DmucsDpropDb::serialize() { /* * We will encode the database this way: it will be a big long string * with newlines in it. The lines will look like this: * D: (the string that distinguishes these hosts) * H: * C : /<#cpus> * * o The state is represented by an integer representing the * host_status_t enum value. * o The entire string will end with a \0 (end-of-string) character. */ std::ostringstream result; result << "D: '" << dprop2cstr(dprop_) << "'\n"; for (dmucs_host_set_iter_t itr = allHosts_.begin(); itr != allHosts_.end(); ++itr) { struct in_addr in; in.s_addr = (*itr)->getIpAddrInt(); result << "H: " << inet_ntoa(in) << " " << (*itr)->getStateAsInt() << "\n"; } for (dmucs_avail_cpus_riter_t itr = availCpus_.rbegin(); itr != availCpus_.rend(); ++itr) { if (itr->second.empty()) { continue; } result << "C " << itr->first << ": "; std::vector > uniqIps; int ct = 0; unsigned int curr = 0; // holds an ip address dmucs_cpus_t tmpList(itr->second); tmpList.sort(); for (dmucs_cpus_iter_t itr2 = tmpList.begin(); itr2 != tmpList.end(); ++itr2) { if (curr == *itr2) { ct++; } else { if (curr != 0) { uniqIps.push_back(std::pair(curr, ct)); } curr = *itr2; ct = 1; } } if (ct != 0) { uniqIps.push_back(std::pair(curr, ct)); } for (std::vector >::iterator i = uniqIps.begin(); i != uniqIps.end(); ++i) { struct in_addr t; t.s_addr = i->first; result << inet_ntoa(t) << "/" << i->second << " "; } result << '\n'; } DMUCS_DEBUG((stderr, "Serialize: -->%s<--\n", result.str().c_str())); return result.str(); } void DmucsDpropDb::addNewHost(DmucsHost *host) { /* * Add the host to the allHosts_ set and then also to the availHosts_ * sub-set. */ addToHostSet(&allHosts_, host); addToAvailDb(host); } void DmucsDpropDb::addToHostSet(dmucs_host_set_t *theSet, DmucsHost *host) { std::pair status = theSet->insert(host); if (!status.second) { fprintf(stderr, "%s: Waaaaaah!!!!\n", __func__); } } void DmucsDpropDb::delFromHostSet(dmucs_host_set_t *theSet, DmucsHost *host) { dmucs_host_set_iter_t itr = theSet->find(host); if (itr == theSet->end()) { fprintf(stderr, "%s: Waaaaaah!!!!\n", __func__); return; } theSet->erase(host); } void DmucsDpropDb::addToAvailDb(DmucsHost *host) { addToHostSet(&availHosts_, host); addCpusToTier(host->getTier(), host->getIpAddrInt(), host->getNumCpus()); } void DmucsDpropDb::delFromAvailDb(DmucsHost *host) { dmucs_avail_cpus_iter_t itr = availCpus_.find(host->getTier()); if (itr == availCpus_.end()) { fprintf(stderr, "%s: could not find tier in avail cpu db\n", __func__); return; } itr->second.remove(host->getIpAddrInt()); delFromHostSet(&availHosts_, host); } void DmucsDpropDb::addToOverloadedDb(DmucsHost *host) { addToHostSet(&overloadedHosts_, host); } void DmucsDpropDb::delFromOverloadedDb(DmucsHost *host) { delFromHostSet(&overloadedHosts_, host); } void DmucsDpropDb::addToSilentDb(DmucsHost *host) { addToHostSet(&silentHosts_, host); } void DmucsDpropDb::delFromSilentDb(DmucsHost *host) { delFromHostSet(&silentHosts_, host); } void DmucsDpropDb::addToUnavailDb(DmucsHost *host) { addToHostSet(&unavailHosts_, host); } void DmucsDpropDb::delFromUnavailDb(DmucsHost *host) { delFromHostSet(&unavailHosts_, host); } /* Add "numCpus" copies of the ipaddress to the list in the given tier. */ void DmucsDpropDb::addCpusToTier(int tierNum, const unsigned int ipAddr, const int numCpus) { /* * If a tier, doesn't exist yet, create one. */ dmucs_avail_cpus_iter_t itr = availCpus_.find(tierNum); if (itr == availCpus_.end()) { std::pair status = availCpus_.insert(std::make_pair(tierNum, dmucs_cpus_t())); if (!status.second) { fprintf(stderr, "%s: Waaaaaah!!!!\n", __func__); return; } itr = status.first; } itr->second.insert(itr->second.end(), numCpus, ipAddr); } void DmucsDpropDb::moveCpus(DmucsHost *host, int oldTier, int newTier) { int numCpusDel = delCpusFromTier(oldTier, host->getIpAddrInt()); addCpusToTier(newTier, host->getIpAddrInt(), numCpusDel); } /* Return the number of cpus removed from the tier. */ int DmucsDpropDb::delCpusFromTier(int tier, unsigned int ipAddr) { dmucs_avail_cpus_iter_t itr = availCpus_.find(tier); if (itr == availCpus_.end()) { /* This will happen when a host is going from overloaded (tier 0) to available. */ return 0; } int count = 0; for (dmucs_cpus_iter_t itr2 = itr->second.begin(); itr2 != itr->second.end();) { if (*itr2 == ipAddr) { itr2 = itr->second.erase(itr2); count++; } else { ++itr2; } } return count; } void DmucsDpropDb::handleSilentHosts() { for (dmucs_host_set_iter_t itr = allHosts_.begin(); itr != allHosts_.end(); ++itr) { if ((*itr)->seemsDown()) { (*itr)->silent(); } } } void DmucsDpropDb::dump() { fprintf(stderr, "ALLHOSTS:\n"); for (dmucs_host_set_iter_t itr = allHosts_.begin(); itr != allHosts_.end(); ++itr) { (*itr)->dump(); } fprintf(stderr, "AVAIL HOSTS:\n"); for (dmucs_host_set_iter_t itr = availHosts_.begin(); itr != availHosts_.end(); ++itr) { (*itr)->dump(); } fprintf(stderr, "AVAIL CPUS:\n"); for (dmucs_avail_cpus_iter_t itr = availCpus_.begin(); itr != availCpus_.end(); ++itr) { if (itr->second.empty()) { continue; } fprintf(stderr, "Tier %d: ", itr->first); for (dmucs_cpus_iter_t itr2 = itr->second.begin(); itr2 != itr->second.end(); ++itr2) { struct in_addr t; t.s_addr = *itr2; fprintf(stderr, "%s ", inet_ntoa(t)); } fprintf(stderr, "\n"); } fprintf(stderr, "ASSIGNED CPUS:\n"); for (dmucs_assigned_cpus_iter_t itr = assignedCpus_.begin(); itr != assignedCpus_.end(); ++itr) { struct in_addr t; t.s_addr = itr->second; fprintf(stderr, "%s assigned to 0x%x", inet_ntoa(t), itr->first); } fprintf(stderr, "\n"); fprintf(stderr, "OVERLOADED HOSTS:\n"); for (dmucs_host_set_iter_t itr = overloadedHosts_.begin(); itr != overloadedHosts_.end(); ++itr) { (*itr)->dump(); } fprintf(stderr, "SILENT HOSTS:\n"); for (dmucs_host_set_iter_t itr = silentHosts_.begin(); itr != silentHosts_.end(); ++itr) { (*itr)->dump(); } fprintf(stderr, "UNAVAIL HOSTS:\n"); for (dmucs_host_set_iter_t itr = unavailHosts_.begin(); itr != unavailHosts_.end(); ++itr) { (*itr)->dump(); } } /* * Return some stats from the database usage: * o served: the number of cpus served to clients in the last time period. * o max: the maximum number of cpus assigned to clients at one time, during * the last period. * o totalCpus: the total number of cpus available at this time. * * NOTE: this function also clears the stats back to 0: i.e., starts a new * collection period. */ void DmucsDpropDb::getStatsFromDb(int *served, int *max, int *totalCpus) { *served = numAssignedCpus_; numAssignedCpus_ = 0; *max = numConcurrentAssigned_; numConcurrentAssigned_ = 0; *totalCpus = 0; for (dmucs_avail_cpus_iter_t itr = availCpus_.begin(); itr != availCpus_.end(); ++itr) { *totalCpus += itr->second.size(); } *totalCpus += assignedCpus_.size(); } dmucs-0.6.1/dmucs_db.h0000644000175000017500000002361510446517542012723 0ustar samsam#ifndef _DMUCS_DB_H_ #define _DMUCS_DB_H_ 1 /* * dmucs_db.h: the DMUCS database object definition * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include #include #include #include "dmucs_host.h" #include #include class DmucsDpropDb { private: struct DmucsHostCompare { bool operator () (DmucsHost *lhs, DmucsHost *rhs) const; }; typedef std::set dmucs_host_set_t; typedef dmucs_host_set_t::iterator dmucs_host_set_iter_t; /* Store a list of available cpu ipaddresses -- there will usually be more than one instance of a cpu (ipaddress) in the list, as even on a single cpu machine we can do more than one compile. Each list of IP addresses is a "tier" -- a set of cpus with approximately equivalent computational power. We then have a map of these tiers (lists), indexed by an integer, where the lower the integer, the less powerful the cpus in that tier. */ typedef std::list dmucs_cpus_t; typedef dmucs_cpus_t::iterator dmucs_cpus_iter_t; typedef std::map dmucs_avail_cpus_t; typedef dmucs_avail_cpus_t::iterator dmucs_avail_cpus_iter_t; typedef dmucs_avail_cpus_t::reverse_iterator dmucs_avail_cpus_riter_t; /* This is a mapping from sock address to host ip address -- the socket of the connection from the "gethost" application to the dmucs server, and the hostip of the cpu assigned to the "gethost" application. */ typedef std::map dmucs_assigned_cpus_t; typedef dmucs_assigned_cpus_t::iterator dmucs_assigned_cpus_iter_t; /* * Databases of hosts. * o a collection of available hosts, sorted by tier. * o a collection of assigned hosts. * o a collection of silent hosts. * o a collection of overloaded hosts. * * o a collectoin of available (unassigned) cpus. * o a collection of assigned cpus. */ DmucsDprop dprop_; // the common dprop for all hosts here. dmucs_host_set_t allHosts_; // all known hosts are here. dmucs_host_set_t availHosts_; // avail hosts are also here. dmucs_host_set_t unavailHosts_; // unavail hosts are also here. dmucs_host_set_t silentHosts_; // silent hosts are also here dmucs_host_set_t overloadedHosts_;// overloaded hosts are here. dmucs_avail_cpus_t availCpus_; // unassigned cpus are here. dmucs_assigned_cpus_t assignedCpus_; // assigned cpus are here. /* Statistics */ int numAssignedCpus_; /* the # of assigned CPUs during a collection period */ int numConcurrentAssigned_; /* the max number of assigned CPUs at one time. */ public: DmucsDpropDb(DmucsDprop dprop) : dprop_(dprop), numAssignedCpus_(0), numConcurrentAssigned_(0) {} DmucsHost * getHost(const struct in_addr &ipAddr); bool haveHost(const struct in_addr &ipAddr); unsigned int getBestAvailCpu(); void assignCpuToClient(const unsigned int clientIp, const unsigned int cpuIp); void moveCpus(DmucsHost *host, int oldTier, int newTier); int delCpusFromTier(int tier, unsigned int ipAddr); void addNewHost(DmucsHost *host); void releaseCpu(const unsigned int sock); void addToHostSet(dmucs_host_set_t *theSet, DmucsHost *host); void delFromHostSet(dmucs_host_set_t *theSet, DmucsHost *host); void addCpusToTier(int tierNum, const unsigned int ipAddr, const int numCpus); void addToAvailDb(DmucsHost *host); void delFromAvailDb(DmucsHost *host); void addToOverloadedDb(DmucsHost *host); void delFromOverloadedDb(DmucsHost *host); void addToSilentDb(DmucsHost *host); void delFromSilentDb(DmucsHost *host); void addToUnavailDb(DmucsHost *host); void delFromUnavailDb(DmucsHost *host); void handleSilentHosts(); std::string serialize(); void getStatsFromDb(int *served, int *max, int *totalCpus); void dump(); }; class MutexMonitor { public: MutexMonitor(pthread_mutex_t *m) : m_(m) { pthread_mutex_lock(m_); } ~MutexMonitor() { pthread_mutex_unlock(m_); } private: pthread_mutex_t *m_; }; class DmucsDb { private: typedef std::map dmucs_dprop_db_t; typedef dmucs_dprop_db_t::iterator dmucs_dprop_db_iter_t; /* A map of dmucs databases, indexed by the distinguishing property of hosts in the system. */ dmucs_dprop_db_t dbDb_; /* A mapping of socket to distinguishing property -- so that when a host is released and all we have is the socket information, we can figure out which DpropDb to put the host back into. */ typedef std::map dmucs_sock_dprop_db_t; typedef dmucs_sock_dprop_db_t::iterator dmucs_sock_dprop_db_iter_t; dmucs_sock_dprop_db_t sock2DpropDb_; static DmucsDb *instance_; static pthread_mutexattr_t attr_; static pthread_mutex_t mutex_; DmucsDb(); virtual ~DmucsDb() {} public: static DmucsDb *getInstance(); DmucsHost *getHost(const struct in_addr &ipAddr, DmucsDprop dprop) { MutexMonitor m(&mutex_); dmucs_dprop_db_iter_t itr = dbDb_.find(dprop); if (itr == dbDb_.end()) { throw DmucsHostNotFound(); } return itr->second.getHost(ipAddr); } bool haveHost(const struct in_addr &ipAddr, DmucsDprop dprop) { MutexMonitor m(&mutex_); dmucs_dprop_db_iter_t itr = dbDb_.find(dprop); if (itr == dbDb_.end()) { return false; } return itr->second.haveHost(ipAddr); } unsigned int getBestAvailCpu(DmucsDprop dprop) { MutexMonitor m(&mutex_); dmucs_dprop_db_iter_t itr = dbDb_.find(dprop); if (itr == dbDb_.end()) { fprintf(stderr, "nothing in this db!: dprop %s\n", dprop2cstr(dprop)); return 0L; // 32-bits of zeros = 0.0.0.0 } return itr->second.getBestAvailCpu(); } void assignCpuToClient(const unsigned int clientIp, const DmucsDprop dprop, const unsigned int sock); void moveCpus(DmucsHost *host, int oldTier, int newTier) { MutexMonitor m(&mutex_); // Assume the DmucsDpropDb is definitely there. return dbDb_.find(host->getDprop())->second.moveCpus(host, oldTier, newTier); } int delCpusFromTier(DmucsHost *host, int tier, unsigned int ipAddr) { MutexMonitor m(&mutex_); // Assume the DmucsDpropDb is definitely there. return dbDb_.find(host->getDprop())->second.delCpusFromTier(tier, ipAddr); } void addNewHost(DmucsHost *host) { MutexMonitor m(&mutex_); DmucsDprop dprop = host->getDprop(); dmucs_dprop_db_iter_t itr = dbDb_.find(dprop); if (itr == dbDb_.end()) { std::pair status = dbDb_.insert(std::make_pair(dprop, DmucsDpropDb(dprop))); if (!status.second) { fprintf(stderr, "%s: could not make a new Dprop-specific db\n", __func__); return; } itr = status.first; } return itr->second.addNewHost(host); } void addToAvailDb(DmucsHost *host) { MutexMonitor m(&mutex_); return dbDb_.find(host->getDprop())->second.addToAvailDb(host); } void delFromAvailDb(DmucsHost *host) { MutexMonitor m(&mutex_); return dbDb_.find(host->getDprop())->second.delFromAvailDb(host); }; void addToOverloadedDb(DmucsHost *host) { MutexMonitor m(&mutex_); return dbDb_.find(host->getDprop())->second.addToOverloadedDb(host); } void delFromOverloadedDb(DmucsHost *host) { MutexMonitor m(&mutex_); return dbDb_.find(host->getDprop())->second.delFromOverloadedDb(host); } void addToSilentDb(DmucsHost *host) { MutexMonitor m(&mutex_); return dbDb_.find(host->getDprop())->second.addToSilentDb(host); } void delFromSilentDb(DmucsHost *host) { MutexMonitor m(&mutex_); return dbDb_.find(host->getDprop())->second.delFromSilentDb(host); } void addToUnavailDb(DmucsHost *host) { MutexMonitor m(&mutex_); return dbDb_.find(host->getDprop())->second.addToUnavailDb(host); } void delFromUnavailDb(DmucsHost *host) { MutexMonitor m(&mutex_); return dbDb_.find(host->getDprop())->second.delFromUnavailDb(host); } void releaseCpu(const unsigned int sock); void handleSilentHosts() { MutexMonitor m(&mutex_); for (dmucs_dprop_db_iter_t itr = dbDb_.begin(); itr != dbDb_.end(); ++itr) { itr->second.handleSilentHosts(); } } std::string serialize() { MutexMonitor m(&mutex_); std::string res; for (dmucs_dprop_db_iter_t itr = dbDb_.begin(); itr != dbDb_.end(); ++itr) { res += itr->second.serialize(); } return res; } void getStatsFromDb(int *served, int *max, int *totalCpus) { MutexMonitor m(&mutex_); int t_serv, t_max, t_total; *served = 0; *max = 0; *totalCpus = 0; for (dmucs_dprop_db_iter_t itr = dbDb_.begin(); itr != dbDb_.end(); ++itr) { itr->second.getStatsFromDb(&t_serv, &t_max, &t_total); *served += t_serv; *max += t_max; *totalCpus += t_total; } } void dump(); }; inline bool DmucsDpropDb::DmucsHostCompare::operator() (DmucsHost *lhs, DmucsHost *rhs) const { // Just do pointer comparison. return (lhs->getIpAddrInt() < rhs->getIpAddrInt()); } #endif dmucs-0.6.1/dmucs_dprop.h0000755000175000017500000000273010446517624013461 0ustar samsam#ifndef _DMUCS_DPROP_H_ #define _DMUCS_DPROP_H_ 1 /* * dmucs_dprop.h: the DMUCS Dprop definition. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ /* * A Dprop is a Dintinguishing Property of a host. The administrator of a * DMUCS installation may want to partition her entire set of compilation * hosts into multiple subsets, with each host in a subset having a common * distinguishing property -- e.g., each subset may: * * o have a common architecture -- Solaris vs. Linux vs. FreeBsd -- and * thus may be used for only certain compilations. * o be available to a certain set of users or a certain set of * compilations. */ #include typedef std::string DmucsDprop; const char *dprop2cstr(DmucsDprop d); const int DPROP_MAX_STRLEN = 64; #endif dmucs-0.6.1/dmucs_host.cc0000644000175000017500000001216310446517542013445 0ustar samsam /* * dmucs_host.cc: a DmucsHost is a representation of a compilation host. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include "dmucs.h" #include "dmucs_dprop.h" #include "dmucs_host.h" #include "dmucs_db.h" #include "dmucs_hosts_file.h" #include "dmucs_host_state.h" #include "dmucs_resolve.h" #include #include #include #include #include #ifdef HAVE_CONFIG_H #include #endif DmucsHost::DmucsHost(const struct in_addr &ipAddr, const DmucsDprop dprop, const int numCpus, const int powerIndex) : ipAddr_(ipAddr), dprop_(dprop), ncpus_(numCpus), pindex_(powerIndex), ldavg1_(0), ldavg5_(0), ldavg10_(0), lastUpdate_(0) { state_ = DmucsHostStateAvail::getInstance(); } DmucsHost * DmucsHost::createHost(const struct in_addr &ipAddr, const DmucsDprop dprop, const std::string &hostsInfoFile) { /* * Read the hosts file, and find the entry in it for this host. */ DmucsHostsFile *hostsFile = DmucsHostsFile::getInstance(hostsInfoFile); int numCpus = 1; int powerIndex = 1; hostsFile->getDataForHost(ipAddr, &numCpus, &powerIndex); DmucsHost *newHost = new DmucsHost(ipAddr, dprop, numCpus, powerIndex); DmucsDb::getInstance()->addNewHost(newHost); return newHost; } const int DmucsHost::getStateAsInt() const { return state_->asInt(); } int DmucsHost::getTier() const { return calcTier(ldavg1_, ldavg5_, ldavg10_, pindex_); } int DmucsHost::calcTier(float ldavg1, float ldavg5, float ldavg10, int pindex) const { if (ldavg1 < 0.9) { return pindex; } else if (ldavg5 < 0.7) { return pindex; } else if (ldavg10 < 0.8) { return pindex - 1; } else { return 0; // 0 means don't use this host. } } void DmucsHost::updateTier(float ldAvg1, float ldAvg5, float ldAvg10) { ldAvg1 /= (float) ncpus_; ldAvg5 /= (float) ncpus_; ldAvg10 /= (float) ncpus_; int newTier = calcTier(ldAvg1, ldAvg5, ldAvg10, pindex_); int oldTier = getTier(); if (newTier != oldTier) { DMUCS_DEBUG((stderr, "oldTier %d, newTier %d\n", oldTier, newTier)); if (newTier == 0) { /* This host is completely overloaded: remove the CPU objects from their current tier, and move this host object to the overloaded state. */ overloaded(); ldavg1_ = ldAvg1; ldavg5_ = ldAvg5; ldavg10_ = ldAvg10; } else if (oldTier == 0) { /* This host was overloaded, but now it is not. Move the cpu objects from one tier to another. */ DmucsDb::getInstance()->moveCpus(this, oldTier, newTier); ldavg1_ = ldAvg1; ldavg5_ = ldAvg5; ldavg10_ = ldAvg10; } else { /* Move the cpu objects from one tier to another. */ DmucsDb::getInstance()->moveCpus(this, oldTier, newTier); ldavg1_ = ldAvg1; ldavg5_ = ldAvg5; ldavg10_ = ldAvg10; } } else { ldavg1_ = ldAvg1; ldavg5_ = ldAvg5; ldavg10_ = ldAvg10; } lastUpdate_ = time(0); } void DmucsHost::avail() { state_->avail(this); } void DmucsHost::unavail() { state_->unavail(this); } void DmucsHost::silent() { state_->silent(this); } void DmucsHost::overloaded() { state_->overloaded(this); } void DmucsHost::changeState(DmucsHostState *state) { state_ = state; state_->addToDb(this); } bool DmucsHost::seemsDown() const { return (time(0) - lastUpdate_ > DMUCS_HOST_SILENT_TIME); } bool DmucsHost::isUnavailable() const { return (state_->asInt() == STATUS_UNAVAILABLE); } bool DmucsHost::isSilent() const { return (state_->asInt() == STATUS_SILENT); } bool DmucsHost::isOverloaded() const { return (state_->asInt() == STATUS_OVERLOADED); } void DmucsHost::dump() { fprintf(stderr, "Host: %20.20s Dprop: %8.8s State: %s Pindex: %d Ncpus %d\n", inet_ntoa(ipAddr_), dprop2cstr(dprop_), state_->dump(), pindex_, ncpus_); } const std::string & DmucsHost::getName() { if (! resolvedName_.empty()) { return resolvedName_; } return getHostName(resolvedName_, ipAddr_); } /* * Given in IP address, find the host in the host database. If its name has * already been found, then return it. Otherwise, resolve it and store it * in the host and return the string. */ std::string DmucsHost::resolveIp2Name(unsigned int ipAddr, DmucsDprop dprop) { /* Search for DmucsHost, based on Ip Address */ struct in_addr c; c.s_addr = ipAddr; return DmucsDb::getInstance()->getHost(c, dprop)->getName(); } dmucs-0.6.1/dmucs_host.h0000644000175000017500000000645010457726301013306 0ustar samsam#ifndef _DMUCS_HOST_H_ #define _DMUCS_HOST_H_ 1 /* * dmucs_host.h: the DMUCS host definition. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include #include #include #include #include #include #include "dmucs_dprop.h" enum host_status_t { STATUS_UNKNOWN = 0, STATUS_AVAILABLE = 1, STATUS_UNAVAILABLE, STATUS_OVERLOADED, STATUS_SILENT }; class DmucsHostState; #define DMUCS_HOST_SILENT_TIME 60 /* if we don't hear from a host for 60 seconds, we consider it to be silent, and we remove it from the list of available hosts. */ class DmucsHost { private: /* dProp_: indicates which kind of host this is. Users can use Dmucs to maintain collections of multiple types of hosts -- e.g., hosts that will only compile solaris binaries vs. those that will only compile linux binaries. Or, hosts that are reserved for certain segments of users vs. hosts that are available to everyone. We call this user-defined distinction a "distinguishing property" or "dprop" of a host. */ DmucsHostState * state_; struct in_addr ipAddr_; DmucsDprop dprop_; std::string resolvedName_; int ncpus_; int pindex_; float ldavg1_, ldavg5_, ldavg10_; time_t lastUpdate_; friend class DmucsHostState; void changeState(DmucsHostState *state); public: DmucsHost(const struct in_addr &ipAddr, DmucsDprop dprop, const int numCpus, const int powerIndex); void updateTier(float ldAvg1, float ldAvg5, float ldAvg10); void avail(); void unavail(); void silent(); void overloaded(); static DmucsHost *createHost(const struct in_addr &ipAddr, const DmucsDprop dprop, const std::string &hostsInfoFile); const int getStateAsInt() const; int getTier() const; int calcTier(float ldavg1, float ldavg5, float ldavg10, int pindex) const; const std::string &getName(); const DmucsDprop getDprop() const { return dprop_; } unsigned int getIpAddrInt() const { return ipAddr_.s_addr; } int getNumCpus() const { return ncpus_; } bool seemsDown() const; bool isUnavailable() const; bool isSilent() const; bool isOverloaded() const; static std::string resolveIp2Name(unsigned int ipAddr, DmucsDprop dprop); static const std::string &getName(std::string &resolvedName, const struct in_addr &ipAddr); void dump(); }; class DmucsNoMoreHosts : public std::exception { // TODO }; class DmucsHostNotFound : public std::exception { // TODO }; #endif dmucs-0.6.1/dmucs_host_state.cc0000644000175000017500000001226510433414212014632 0ustar samsam/* * dmucs_host_state.cc: the DMUCS host state implementation. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include "dmucs_host_state.h" #include "dmucs_db.h" DmucsHostStateAvail *DmucsHostStateAvail::instance_ = NULL; DmucsHostStateAvail * DmucsHostStateAvail::getInstance() { if (instance_ == NULL) { instance_ = new DmucsHostStateAvail(); } return instance_; } void DmucsHostStateAvail::unavail(DmucsHost *host) { /* Remove the CPUs from the cpus database. */ DmucsDb::getInstance()->delCpusFromTier(host, host->getTier(), host->getIpAddrInt()); /* Move the host to the overloaded state: remove from availHosts_ and add to overloadedHosts_. */ removeFromDb(host); DmucsHostState::changeState(host, DmucsHostStateUnavail::getInstance()); } void DmucsHostStateAvail::silent(DmucsHost *host) { /* Remove the CPUs from the cpus database. */ DmucsDb::getInstance()->delCpusFromTier(host, host->getTier(), host->getIpAddrInt()); /* Move the host to the overloaded state: remove from availHosts_ and add to overloadedHosts_. */ removeFromDb(host); DmucsHostState::changeState(host, DmucsHostStateSilent::getInstance()); } void DmucsHostStateAvail::overloaded(DmucsHost *host) { /* Remove the CPUs from the cpus database. */ DmucsDb::getInstance()->delCpusFromTier(host, host->getTier(), host->getIpAddrInt()); /* Move the host to the overloaded state: remove from availHosts_ and add to overloadedHosts_. */ removeFromDb(host); DmucsHostState::changeState(host, DmucsHostStateOverloaded::getInstance()); } void DmucsHostStateAvail::removeFromDb(DmucsHost *host) { DmucsDb::getInstance()->delFromAvailDb(host); } void DmucsHostStateAvail::addToDb(DmucsHost *host) { DmucsDb::getInstance()->addToAvailDb(host); } /* ====================================================================== */ DmucsHostStateUnavail *DmucsHostStateUnavail::instance_ = NULL; DmucsHostStateUnavail * DmucsHostStateUnavail::getInstance() { if (instance_ == NULL) { instance_ = new DmucsHostStateUnavail(); } return instance_; } void DmucsHostStateUnavail::avail(DmucsHost *host) { removeFromDb(host); int tier = host->getTier(); if (tier == 0) { DmucsHostState::changeState(host, DmucsHostStateOverloaded::getInstance()); } else { DmucsHostState::changeState(host, DmucsHostStateAvail::getInstance()); } } void DmucsHostStateUnavail::addToDb(DmucsHost *host) { DmucsDb::getInstance()->addToUnavailDb(host); } void DmucsHostStateUnavail::removeFromDb(DmucsHost *host) { DmucsDb::getInstance()->delFromUnavailDb(host); } /* ====================================================================== */ DmucsHostStateSilent *DmucsHostStateSilent::instance_ = NULL; DmucsHostStateSilent * DmucsHostStateSilent::getInstance() { if (instance_ == NULL) { instance_ = new DmucsHostStateSilent(); } return instance_; } void DmucsHostStateSilent::avail(DmucsHost *host) { removeFromDb(host); DmucsHostState::changeState(host, DmucsHostStateAvail::getInstance()); } void DmucsHostStateSilent::unavail(DmucsHost *host) { removeFromDb(host); DmucsHostState::changeState(host, DmucsHostStateUnavail::getInstance()); } void DmucsHostStateSilent::addToDb(DmucsHost *host) { DmucsDb::getInstance()->addToSilentDb(host); } void DmucsHostStateSilent::removeFromDb(DmucsHost *host) { DmucsDb::getInstance()->delFromSilentDb(host); } /* ====================================================================== */ DmucsHostStateOverloaded *DmucsHostStateOverloaded::instance_ = NULL; DmucsHostStateOverloaded * DmucsHostStateOverloaded::getInstance() { if (instance_ == NULL) { instance_ = new DmucsHostStateOverloaded(); } return instance_; } void DmucsHostStateOverloaded::avail(DmucsHost *host) { removeFromDb(host); DmucsHostState::changeState(host, DmucsHostStateAvail::getInstance()); } void DmucsHostStateOverloaded::unavail(DmucsHost *host) { removeFromDb(host); DmucsHostState::changeState(host, DmucsHostStateUnavail::getInstance()); } void DmucsHostStateOverloaded::silent(DmucsHost *host) { removeFromDb(host); DmucsHostState::changeState(host, DmucsHostStateSilent::getInstance()); } void DmucsHostStateOverloaded::addToDb(DmucsHost *host) { DmucsDb::getInstance()->addToOverloadedDb(host); } void DmucsHostStateOverloaded::removeFromDb(DmucsHost *host) { DmucsDb::getInstance()->delFromOverloadedDb(host); } dmucs-0.6.1/dmucs_host_state.h0000644000175000017500000001032010360753041014467 0ustar samsam#ifndef _DMUCS_HOST_STATE_H_ #define _DMUCS_HOST_STATE_H_ 1 /* * dmucs_host_state.cc: the DMUCS host state definition. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include "dmucs_host.h" /* * States of DmucsHosts: * o available -- we got a status "avail" message for the host and/or we are * periodically receiving load average messages from it. (Note: we may * not always receive the status message -- when the host comes up before * the Dmucs server. In that case, we treat the load average message as * a status "avail" message. * o unavailable -- we got a status "unavail" message from the host. We * may still be receiving load average messages from it, but it has been * made "administratively" unavailable. * o overloaded -- the load average messages we receive indicate that the * machine is very busy, and shouldn't be used for compiles. * o silent -- we got a status "avail" message from the host, but now we * are not getting any load average messages from it. */ class DmucsHostState { public: virtual void avail(DmucsHost *host) {} virtual void unavail(DmucsHost *host) {} virtual void silent(DmucsHost *host) {} virtual void overloaded(DmucsHost *host) {} virtual void addToDb(DmucsHost *host) {} virtual void removeFromDb(DmucsHost *host) {} virtual const char *dump() { return "Unknown"; } virtual int asInt() { return (int) STATUS_UNKNOWN; } protected: void changeState(DmucsHost *host, DmucsHostState *newState) { host->changeState(newState); } }; class DmucsHostStateAvail : public DmucsHostState { public: virtual void unavail(DmucsHost *host); virtual void silent(DmucsHost *host); virtual void overloaded(DmucsHost *host); virtual int asInt() { return (int) STATUS_AVAILABLE; } virtual void addToDb(DmucsHost *host); virtual void removeFromDb(DmucsHost *host); virtual const char *dump() { return "Available"; } static DmucsHostStateAvail *getInstance(); private: DmucsHostStateAvail() {} static DmucsHostStateAvail *instance_; }; class DmucsHostStateUnavail : public DmucsHostState { public: virtual void avail(DmucsHost *host); virtual int asInt() { return (int) STATUS_UNAVAILABLE; } virtual void addToDb(DmucsHost *host); virtual void removeFromDb(DmucsHost *host); virtual const char *dump() { return "Unavail"; } static DmucsHostStateUnavail *getInstance(); private: DmucsHostStateUnavail() {} static DmucsHostStateUnavail *instance_; }; class DmucsHostStateSilent : public DmucsHostState { public: virtual void avail(DmucsHost *host); virtual void unavail(DmucsHost *host); virtual int asInt() { return (int) STATUS_SILENT; }; virtual void addToDb(DmucsHost *host); virtual void removeFromDb(DmucsHost *host); virtual const char *dump() { return "Silent"; } static DmucsHostStateSilent *getInstance(); private: DmucsHostStateSilent() {} static DmucsHostStateSilent *instance_; }; class DmucsHostStateOverloaded : public DmucsHostState { public: virtual void avail(DmucsHost *host); virtual void unavail(DmucsHost *host); virtual void silent(DmucsHost *host); virtual int asInt() { return (int) STATUS_OVERLOADED; } virtual void addToDb(DmucsHost *host); virtual void removeFromDb(DmucsHost *host); virtual const char *dump() { return "Overloaded"; } static DmucsHostStateOverloaded *getInstance(); private: DmucsHostStateOverloaded() {} static DmucsHostStateOverloaded *instance_; }; #endif dmucs-0.6.1/dmucs_hosts_file.cc0000644000175000017500000001021510362765536014630 0ustar samsam/* * dmucs_hosts_file.cc: code to read the hosts-info configuration file. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include "dmucs.h" #include "dmucs_hosts_file.h" #include #include #include #include #include #include #include #include DmucsHostsFile *DmucsHostsFile::instance_ = NULL; DmucsHostsFile *DmucsHostsFile::getInstance(const std::string &file) { if (instance_ == NULL) { instance_ = new DmucsHostsFile(file); } return instance_; } DmucsHostsFile::DmucsHostsFile(const std::string &hostsInfoFile) : lastFileChangeTime_(0), hostsInfoFile_(hostsInfoFile) { readFileIntoDb(); /* We know the file has changed since time 0 -- so just call this to get the new time into lastFileChangeTime_. */ (void) hasFileChanged(); } void DmucsHostsFile::readFileIntoDb() const { db_.clear(); std::ifstream instr(hostsInfoFile_.c_str()); if (!instr) { DMUCS_DEBUG((stderr, "Unable to open hosts-info file \"%s\"\n", hostsInfoFile_.c_str())); return; } for (int lineno = 1; ; lineno++) { /* * Each line is: machine-or-ipaddr numcpus power-index. * Comment lines start with #, and these are skipped. Lines * containing only whitespace are also skipped. */ char firstChar; instr >> firstChar; // this will skip empty lines. if (instr.eof()) { break; } if (firstChar == '#') { std::string junk; std::getline(instr, junk); continue; } else if (! instr.good()) { break; } else { instr.putback(firstChar); } std::string line; std::getline(instr, line); char machine[256]; int numcpus, powerIndex; if (sscanf(line.c_str(), "%s %d %d", machine, &numcpus, &powerIndex) != 3) { std::cout << "Bad input in line " << lineno << " of file " << hostsInfoFile_ << std::endl; break; } /* * Convert the machine name into an ip address. */ unsigned long addr; struct hostent *hostent; if ((int)(addr = inet_addr(machine)) != -1) { hostent = gethostbyaddr((char *)&addr, sizeof(addr), AF_INET); } else { hostent = gethostbyname(machine); } if (hostent == NULL) { std::cout << "Could not get IP address for machine: " << machine << ". Skipping." << std::endl; continue; } struct in_addr in; memcpy(&in.s_addr, hostent->h_addr_list[0], sizeof(in.s_addr)); /* Insert the info into the database of host info. */ host_info_db_t::value_type object(in.s_addr, info_t(numcpus, powerIndex)); db_.insert(object); } } void DmucsHostsFile::getDataForHost(const struct in_addr &ipAddr, int *numCpus, int *powerIndex) const { if (hasFileChanged()) { readFileIntoDb(); } /* * Be default, we'll assume 1 CPU and a very slow one at that. */ *numCpus = 1; *powerIndex = 1; host_info_db_iter_t itr = db_.find(ipAddr.s_addr); if (itr != db_.end()) { *numCpus = itr->second.numCpus_; *powerIndex = itr->second.powerIndex_; } } /* If the file modification time has changed since the last time this was called, then return true AND update lastFileChangeTime_ to the new modification time. */ bool DmucsHostsFile::hasFileChanged() const { struct stat st; if (stat(hostsInfoFile_.c_str(), &st) != 0) { return true; // assume the file has changed... } if (lastFileChangeTime_ != st.st_ctime) { lastFileChangeTime_ = st.st_ctime; return true; } return false; } dmucs-0.6.1/dmucs_hosts_file.h0000644000175000017500000000464510374653574014505 0ustar samsam#ifndef _DMUCS_HOST_FILE_H_ #define _DMUCS_HOST_FILE_H_ 1 /* * dmucs_hosts_file.h: code to read the hosts-info configuration file. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include #include #ifdef PKGDATADIR const std::string HOSTS_INFO_FILE = std::string(PKGDATADIR) + \ std::string("/") + std::string("hosts-info"); #else const std::string HOSTS_INFO_FILE = "hosts-info"; #endif class DmucsHostsFile { public: static DmucsHostsFile *getInstance(const std::string &hostsInfoFile); void getDataForHost(const struct in_addr &ipAddr, int *numCpus, int *powerIndex) const; /* * This class implements the singleton pattern, as only one instance of * it needs to exist, and it should take care to re-read the hostsfile, * etc., when necessary. */ private: // this is private so that it cannot be used (this is a Singleton). DmucsHostsFile(const std::string &hostsInfoFile); ~DmucsHostsFile(); struct info_t { int numCpus_; int powerIndex_; info_t(int ncpus, int pindex) : numCpus_(ncpus), powerIndex_(pindex) {}; }; static DmucsHostsFile *instance_; std::string hostsInfoFile_; /* * This maps an IP address (in 32-bit format) to the pair of values: * numCpus and powerIndex. */ typedef std::map host_info_db_t; typedef host_info_db_t::iterator host_info_db_iter_t; mutable host_info_db_t db_; mutable time_t lastFileChangeTime_; void readFileIntoDb() const; /* If the file modification time has changed since the last time this was called, then return true AND update lastFileChangeTime_ to the new modification time. */ bool hasFileChanged() const; }; #endif dmucs-0.6.1/dmucs_msg.cc0000755000175000017500000001502310446517542013257 0ustar samsam/* * dmucs_msg.cc: code to parse a packet coming into the DMUCS server. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include "dmucs.h" #include "dmucs_msg.h" #include "dmucs_db.h" #include #include #include #include #include #include extern std::string hostsInfoFile; class DmucsBadMsg : public std::exception {}; DmucsMsg * DmucsMsg::parseMsg(Socket *sock, const char *buffer) { struct in_addr clientIp; clientIp.s_addr = Speeraddr(sock); char dpropstr[DPROP_MAX_STRLEN + 1]; dpropstr[0] = '\0'; // empty string /* * The first word in the buffer must be one of: "host", "load", * "status", or "monitor". */ if (strncmp(buffer, "host", 4) == 0) { /* The string is "host []" where the typeStr is an optional string that is the distinguishing property of the host the client wants. */ char cliIpStr[64]; int res = sscanf(buffer, "host %s %s", cliIpStr, dpropstr); if (res != 2 && res != 1) { fprintf(stderr, "Got a bad host request message ->%s<--\n",buffer); return NULL; } return new DmucsHostReqMsg(clientIp, dpropstr); } else if (strncmp(buffer, "load", 4) == 0) { /* The buffer must hold: * load <3 floating pt numbers> * followed by an optional . */ char machname[64]; float ldavg1, ldavg5, ldavg10; if (sscanf(buffer, "load %s %f %f %f %s", machname, &ldavg1, &ldavg5, &ldavg10, dpropstr) != 5) { if (sscanf(buffer, "load %s %f %f %f", machname, &ldavg1, &ldavg5, &ldavg10) != 4) { fprintf(stderr, "Got a bad load avg msg!!!\n"); return NULL; } } struct in_addr host; host.s_addr = inet_addr(machname); DMUCS_DEBUG((stderr, "host %s: ldAvg1 %2.2f, ldAvg5 %2.2f, " "ldAvg10 %2.2f, dprop '%s'\n", machname, ldavg1, ldavg5, ldavg10, dpropstr)); return new DmucsLdAvgMsg(clientIp, host, ldavg1, ldavg5, ldavg10, dpropstr); } else if (strncmp(buffer, "status", 6) == 0) { /* The buffer must hold: * status up|down [] * NOTE: the host-IP-address MUST be in "dot-notation". */ char machname[64]; char state[10]; if (sscanf(buffer, "status %s %s %s", machname, state, dpropstr)!= 3){ if (sscanf(buffer, "status %s %s", machname, state) != 2) { fprintf(stderr, "Got a bad status msg!!!\n"); return NULL; } } fprintf(stderr, "machname %s, state %s, dprop '%s'\n", machname, state, dpropstr); struct in_addr host; host.s_addr = inet_addr(machname); host_status_t status; if (strncmp(state, "up", 2) == 0) { status = STATUS_AVAILABLE; } else if (strncmp(state, "down", 4) == 0) { status = STATUS_UNAVAILABLE; } else { fprintf(stderr, "got unknown state %s\n", state); } return new DmucsStatusMsg(clientIp, host, status, dpropstr); } else if (strncmp(buffer, "monitor", 7) == 0) { return new DmucsMonitorReqMsg(clientIp, dpropstr); } fprintf(stderr, "request not recognized: ->%s<-\n", buffer); return NULL; } void DmucsHostReqMsg::handle(Socket *sock, const char *buf) { DMUCS_DEBUG((stderr, "Got host request: -->%s<--\n", buf)); DmucsDb *db = DmucsDb::getInstance(); unsigned int cpuIpAddr = 0; try { cpuIpAddr = db->getBestAvailCpu(dprop_); std::string resolved_name = DmucsHost::resolveIp2Name(cpuIpAddr, dprop_); fprintf(stderr, "Giving out %s\n", resolved_name.c_str()); db->assignCpuToClient(cpuIpAddr, dprop_, (unsigned int) sock); #if 0 fprintf(stderr, "The databases are now:\n"); db->dump(); #endif } catch (DmucsNoMoreHosts &e) { /* getBestAvailCpu() might return 0, when there are no more available CPUs. We send 0.0.0.0 to the client but we don't record it as an assigned cpu. */ fprintf(stderr, "!!!!! Out of hosts in db \"%s\" !!!!!\n", dprop2cstr(dprop_)); } catch (...) { fprintf(stderr, "!!!!! Some other error: %s!!!!!\n", strerror(errno)); // Send 0.0.0.0 to the client. } struct in_addr c; c.s_addr = cpuIpAddr; Sputs(inet_ntoa(c), sock); } void DmucsLdAvgMsg::handle(Socket *sock, const char *buf) { DmucsDb *db = DmucsDb::getInstance(); DMUCS_DEBUG((stderr, "Got load average mesg\n")); try { DmucsHost *host = db->getHost(host_, dprop_); host->updateTier(ldAvg1_, ldAvg5_, ldAvg10_); /* If the host hasn't been explicitly made unavailable, then make it available. If the host is overloaded but isn't anymore, then make it available. */ if (host->isSilent() || (host->isOverloaded() && host->getTier() != 0)) { host->avail(); // make sure the host is available } } catch (DmucsHostNotFound &e) { DmucsHost *h = DmucsHost::createHost(host_, dprop_, hostsInfoFile); h->updateTier(ldAvg1_, ldAvg5_, ldAvg10_); fprintf(stderr, "New host available: %s/%d, tier %d, type %s\n", h->getName().c_str(), h->getNumCpus(), h->getTier(), dprop2cstr(dprop_)); } catch (...) { } removeFd(sock); } void DmucsStatusMsg::handle(Socket *sock, const char *buf) { DmucsDb *db = DmucsDb::getInstance(); if (status_ == STATUS_AVAILABLE) { if (db->haveHost(host_, dprop_)) { /* Make it available (if it wasn't). */ db->getHost(host_, dprop_)->avail(); } else { /* A new host is available! */ DMUCS_DEBUG((stderr, "Creating new host %s, type %s\n", inet_ntoa(host_), dprop2cstr(dprop_))); DmucsHost::createHost(host_, dprop_, hostsInfoFile); } } else { // status is unavailable. db->getHost(host_, dprop_)->unavail(); } removeFd(sock); } void DmucsMonitorReqMsg::handle(Socket *sock, const char *buf) { std::string str = DmucsDb::getInstance()->serialize(); Sputs((char *) str.c_str(), sock); removeFd(sock); } dmucs-0.6.1/dmucs_msg.h0000755000175000017500000000575110433414212013112 0ustar samsam#ifndef _DMUCS_PKT_H_ #define _DMUCS_PKT_H_ /* * dmucs_msg.h: definition of a DMUCS packet received by the DMUCS server. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include "COSMIC/HDR/sockets.h" enum dmucs_req_t { HOST_REQ, LOAD_AVERAGE_INFORM, STATUS_INFORM, MONITOR_REQ }; /* * Format of packets that come in to the dmucs server: * * o host request: "host * o load average: "load <3 floating pt numbers>" * o status message: "status up|down [n ] * [p ]" * o monistor req: "monitor " */ #include "dmucs_host.h" #include "dmucs_dprop.h" class DmucsMsg { private: protected: struct in_addr clientIp_; DmucsDprop dprop_; DmucsMsg(struct in_addr clientIp, DmucsDprop dprop) : clientIp_(clientIp), dprop_(dprop) {} public: /* Factory Method: parseMsg */ static DmucsMsg *parseMsg(Socket *sock, const char *buf); virtual void handle(Socket *sock, const char *buf) = 0; }; class DmucsStatusMsg : public DmucsMsg { private: struct in_addr host_; host_status_t status_; int numCpus_; int powerIndex_; public: DmucsStatusMsg(struct in_addr clientIp, struct in_addr host, host_status_t status, DmucsDprop dprop) : DmucsMsg(clientIp, dprop), host_(host), status_(status), numCpus_(1), powerIndex_(1) {} void handle(Socket *sock, const char *buf); }; class DmucsLdAvgMsg : public DmucsMsg { private: struct in_addr host_; float ldAvg1_, ldAvg5_, ldAvg10_; public: DmucsLdAvgMsg(struct in_addr clientIp, struct in_addr host, float ldavg1, float ldavg5, float ldavg10, DmucsDprop dprop) : DmucsMsg(clientIp, dprop), host_(host), ldAvg1_(ldavg1), ldAvg5_(ldavg5), ldAvg10_(ldavg10) {} void handle(Socket *sock, const char *buf); }; class DmucsHostReqMsg : public DmucsMsg { public: DmucsHostReqMsg(struct in_addr clientIp, DmucsDprop dprop) : DmucsMsg(clientIp, dprop) {} void handle(Socket *sock, const char *buf); }; class DmucsMonitorReqMsg : public DmucsMsg { public: DmucsMonitorReqMsg(struct in_addr clientIp, DmucsDprop dprop) : DmucsMsg(clientIp, dprop) {}; void handle(Socket *sock, const char *buf); }; #define BUFSIZE 1024 // largest info we will read from the socket. #endif dmucs-0.6.1/dmucs_pkt.cc0000644000175000017500000000713010433414212013246 0ustar samsam/* * dmucs_pkt.cc: code to parse a packet coming into the DMUCS server. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include "dmucs.h" #include "dmucs_pkt.h" #include #include #include #include #include class DmucsBadMsg : public std::exception {}; DmucsMsg * DmucsMsg::parseMsg(Socket *sock, const char *buffer) { struct in_addr clientIp; clientIp.s_addr = Speeraddr(sock); char dpropstr[DPROP_MAX_STRLEN + 1]; dpropstr[0] = '\0'; // empty string /* * The first word in the buffer must be one of: "host", "load", * "status", or "monitor". */ if (strncmp(buffer, "host", 4) == 0) { /* The string might not be just "host" in which case it will be followed by a dprop to indicate which sub-database to get the host from. */ int res = sscanf(buffer, "host %s", dpropstr); if (res != 1 && res != 0) { fprintf(stderr, "Got a bad host request message ->%s<--\n",buffer); return NULL; } return new DmucsHostReqMsg(clientIp, dpropstr); } else if (strncmp(buffer, "load", 4) == 0) { /* The buffer must hold: * load <3 floating pt numbers> * followed by an optional . */ char machname[64]; float ldavg1, ldavg5, ldavg10; if (sscanf(buffer, "load %s %f %f %f", machname, &ldavg1, &ldavg5, &ldavg10) != 4) { if (sscanf(buffer, "load %s %f %f %f %s", machname, &ldavg1, &ldavg5, &ldavg10, dpropstr) != 5) { fprintf(stderr, "Got a bad load avg msg!!!\n"); return NULL; } } struct in_addr host; host.s_addr = inet_addr(machname); DMUCS_DEBUG((stderr, "host %s: ldAvg1 %2.2f, ldAvg5 %2.2f, " "ldAvg10 %2.2f, dprop '%s'\n", machname, ldavg1, ldavg5, ldavg10, dpropstr)); return new DmucsLdAvgMsg(clientIp, host, ldavg1, ldavg5, ldavg10, dpropstr); } else if (strncmp(buffer, "status", 6) == 0) { /* The buffer must hold: * status up|down [] * NOTE: the host-IP-address MUST be in "dot-notation". */ char machname[64]; char state[10]; if (sscanf(buffer, "status %s %s", machname, state) != 2) { if (sscanf(buffer, "status %s %s %s", machname, state, dpropstr) != 3) { fprintf(stderr, "Got a bad status msg!!!\n"); return NULL; } } fprintf(stderr, "machname %s, state %s, dprop '%s'\n", machname, state, dpropstr); struct in_addr host; host.s_addr = inet_addr(machname); host_status_t status; if (strncmp(state, "up", 2) == 0) { status = STATUS_AVAILABLE; } else if (strncmp(state, "down", 4) == 0) { status = STATUS_UNAVAILABLE; } else { fprintf(stderr, "got unknown state %s\n", state); } return new DmucsStatusMsg(clientIp, host, status, dpropstr); } else if (strncmp(buffer, "monitor", 7) == 0) { return new DmucsMonitorReqMsg(clientIp, dpropstr); } fprintf(stderr, "request not recognized: ->%s<-\n", buffer); return NULL; } dmucs-0.6.1/dmucs_pkt.h0000644000175000017500000000541710433414212013116 0ustar samsam#ifndef _DMUCS_PKT_H_ #define _DMUCS_PKT_H_ /* * dmucs_pkt.h: definition of a DMUCS packet received by the DMUCS server. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include "COSMIC/HDR/sockets.h" enum dmucs_req_t { HOST_REQ, LOAD_AVERAGE_INFORM, STATUS_INFORM, MONITOR_REQ }; /* * Format of packets that come in to the dmucs server: * * o host request: "host * o load average: "load <3 floating pt numbers>" * o status message: "status up|down [n ] * [p ]" * o monistor req: "monitor " */ #include "dmucs_host.h" #include "dmucs_dprop.h" class DmucsMsg { private: protected: struct in_addr clientIp_; DmucsDprop dprop_; DmucsMsg(struct in_addr clientIp, DmucsDprop dprop) : clientIp_(clientIp), dprop_(dprop) {} public: /* Factory Method: parseMsg */ static DmucsMsg *parseMsg(Socket *sock, const char *buf); }; class DmucsStatusMsg : public DmucsMsg { private: struct in_addr host_; host_status_t status_; int numCpus_; int powerIndex_; public: DmucsStatusMsg(struct in_addr clientIp, struct in_addr host, host_status_t status, DmucsDprop dprop) : DmucsMsg(clientIp, dprop), host_(host), status_(status), numCpus_(1), powerIndex_(1) {} }; class DmucsLdAvgMsg : public DmucsMsg { private: struct in_addr host_; float ldAvg1_, ldAvg5_, ldAvg10_; public: DmucsLdAvgMsg(struct in_addr clientIp, struct in_addr host, float ldavg1, float ldavg5, float ldavg10, DmucsDprop dprop) : DmucsMsg(clientIp, dprop), host_(host), ldAvg1_(ldavg1), ldAvg5_(ldavg5), ldAvg10_(ldavg10) {} }; class DmucsHostReqMsg : public DmucsMsg { public: DmucsHostReqMsg(struct in_addr clientIp, DmucsDprop dprop) : DmucsMsg(clientIp, dprop) {} }; class DmucsMonitorReqMsg : public DmucsMsg { public: DmucsMonitorReqMsg(struct in_addr clientIp, DmucsDprop dprop) : DmucsMsg(clientIp, dprop) {}; // value of dprop doesn't matter. }; #define BUFSIZE 1024 // largest info we will read from the socket. #endif dmucs-0.6.1/dmucs_resolve.cc0000644000175000017500000000457710446517542014161 0ustar samsam/* * dmucs_resolve.cc: Helperfunction to reslove host names * * Copyright (C) 2006 Patrik Olesen * * 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 */ #include "config.h" #include #include #include #include #include #include #include #include #ifndef HAVE_GETHOSTBYADDR_R #ifdef HAVE_GETHOSTBYADDR static pthread_mutex_t gethost_mutex = NULL; #endif /* HAVE_GETHOSTBYADDR */ #endif /* !HAVE_GETHOSTBYADDR_R */ const std::string & getHostName(std::string &resolvedName, const struct in_addr &ipAddr) { int myerrno; int res8 = 0; struct hostent he, *res = 0; char buffer[128]; #if HAVE_GETHOSTBYADDR_R #if HAVE_GETHOSTBYADDR_R_7_ARGS res = gethostbyaddr_r((char *)&(ipAddr.s_addr), sizeof(ipAddr.s_addr), AF_INET, &he, buffer, 128, &myerrno); #elif HAVE_GETHOSTBYADDR_R_8_ARGS res8 = gethostbyaddr_r((char *)&(ipAddr.s_addr), sizeof(ipAddr.s_addr), AF_INET, &he, buffer, 128, &res, &myerrno); #else #error HELP -- do not know how to compile gethostbyaddr_r #endif /* HAVE_GETHOSTBYADDR_R_X_ARGS */ #elif HAVE_GETHOSTBYADDR /* Buffer used to make it thread safe */ if (gethost_mutex == NULL) { pthread_mutex_init(&gethost_mutex,0); } pthread_mutex_lock(&gethost_mutex); res = gethostbyaddr((char *)&(ipAddr.s_addr), sizeof(ipAddr.s_addr), AF_INET); if (res != NULL) { strncpy(buffer, res->h_name, sizeof(buffer)); buffer[sizeof(buffer) - 1] = '\0'; he.h_name = buffer; } pthread_mutex_unlock(&gethost_mutex); #else #error HELP -- do not know how to compile gethostbyaddr #endif resolvedName = (res == NULL || res8 != 0) ? inet_ntoa(ipAddr) : he.h_name; return resolvedName; } dmucs-0.6.1/dmucs_resolve.h0000644000175000017500000000237310377655232014015 0ustar samsam#ifndef DMUCS_RESOLVE_H_ #define DMUCS_RESOLVE_H_ /* * dmucs_resolve.h: Helperfunction to reslove host names * * Copyright (C) 2006 Patrik Olesen * * 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 */ #include /** * Resolves the host name by using the gethostbyname versions that was specified * in the configuration script * \param resolvedName the resolved name will be put in this variable * \param ipAddr ip address to resolve * \return a referance to resolvedName */ const std::string& getHostName(std::string &resolvedName, const struct in_addr &ipAddr); #endif /*DMUCS_RESOLVE_H_*/ dmucs-0.6.1/gethost.cc0000644000175000017500000001657110446517542012761 0ustar samsam/* * gethost.cc: The program to run to get a compilation host from the * DMUCS server. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include "dmucs.h" #include "dmucs_resolve.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "COSMIC/HDR/sockets.h" #ifdef HAVE_CONFIG_H #include #endif extern char **environ; void usage(const char *prog); bool debugMode = false; void sigchld_handler(int stat) { int childstat; wait(&childstat); } int main(int argc, char *argv[]) { /* * o Open a client socket to the server ip/port. * o Send my IP address in a host request. * o Read an IP address in a response. * o Assign the value DISTCC_HOSTS to the IP address in the env. * o Use execve to run the command passed in, with its args, on the * command line. * o Wait for the command to finish. * o Close the client socket. */ #if (! defined (__CYGWIN__) && ! defined(__FreeBSD__)) /* install a SIGCHLD handler */ sigset(SIGCHLD, sigchld_handler); #endif /* * Process command-line arguments: * * -s , --server : the name of the server machine. * -p , --port : the port number to listen on (default: 6714). * -D, --debug: debug mode (default: off) */ std::ostringstream serverName; serverName << "@" << SERVER_MACH_NAME; int serverPortNum = SERVER_PORT_NUM; struct hostent *he; char *distingProp = ""; int nextarg = 1; for (; nextarg < argc; nextarg++) { if (strequ("-s", argv[nextarg]) || strequ("--server", argv[nextarg])) { if (++nextarg >= argc) { usage(argv[0]); return -1; } serverName.seekp(1); // remove everything after the first "@". serverName << argv[nextarg] << '\0'; } else if (strequ("-p", argv[nextarg]) || strequ("--port", argv[nextarg])) { if (++nextarg >= argc) { usage(argv[0]); return -1; } serverPortNum = atoi(argv[nextarg]); } else if (strequ("-t", argv[nextarg]) || strequ("--type", argv[nextarg])) { if (++nextarg >= argc) { usage(argv[0]); return -1; } distingProp = argv[nextarg]; } else if (strequ("-D", argv[nextarg]) || strequ("--debug", argv[nextarg])) { debugMode = true; } else { /* We are looking at the command to run, supposedly. */ break; } } std::ostringstream clientPortStr; clientPortStr << "c" << serverPortNum; DMUCS_DEBUG((stderr, "doing Sopen with %s, %s\n", serverName.str().c_str(), clientPortStr.str().c_str())); Socket *client_sock = Sopen((char *) serverName.str().c_str(), (char *) clientPortStr.str().c_str()); char remCompHostName[256]; if (!client_sock) { fprintf(stderr, "WARNING: Could not connect to %s: %s\n", serverName.str().c_str(), strerror(errno)); sprintf(remCompHostName,"0.0.0.0"); } else { char hostname[256]; if (gethostname(hostname, 256) < 0) { fprintf(stderr, "Could not get my hostname\n"); Sclose(client_sock); return -1; } struct hostent *he = gethostbyname(hostname); if (he == NULL) { fprintf(stderr, "Could not get my hostname\n"); Sclose(client_sock); return -1; } struct in_addr in; memcpy(&in.s_addr, he->h_addr_list[0], sizeof(in.s_addr)); struct sockaddr sck; socklen_t s = sizeof(sck); getsockname(client_sock->skt, &sck, &s); struct sockaddr_in *sin = (struct sockaddr_in *) &sck; std::ostringstream clientReqStr; clientReqStr << "host " << inet_ntoa(in) << " " << distingProp; DMUCS_DEBUG((stderr, "Writing -->%s<-- to the server\n", clientReqStr.str().c_str())); Sputs((char *) clientReqStr.str().c_str(), client_sock); DMUCS_DEBUG((stderr, "Calling Sgets\n")); if (Sgets(remCompHostName, 256, client_sock) == NULL) { fprintf(stderr, "Got error from reading socket.\n"); Sclose(client_sock); return -1; } DMUCS_DEBUG((stderr, "Got -->%s<-- from the server\n", remCompHostName)); } /* If we get 0.0.0.0 that means there are no hosts left in the database. */ std::string resolved_name; if (strncmp(remCompHostName, "0.0.0.0", strlen("0.0.0.0")) == 0) { resolved_name = ""; } else { /* * Convert the ip address to a hostname before putting it * in the environment as the value of DISTCC_HOSTS, so that * the output in the distccmon-text is nice. */ unsigned int cpuIpAddr = inet_addr(remCompHostName); struct in_addr c; c.s_addr = cpuIpAddr; getHostName(resolved_name, c); /* * Add /100 to the end of the DISTCC_HOSTS value. This tells * distcc that there are 10 cpus on the machine, which should be * more than any machines already have. Without this value, distcc * assumes there are most 4 cpus, and so will not put more than 4 * compilations on that host at once, but instead, put the * compilations in BLOCKED state. * * NOTE: a better solution would be to read the hosts-info file * in this program and put the actual number of cpus after the '/'. * But, that is alot of work for this often-run program to do, so * for efficiency's sake we'll just do it this way. * * NOTE: even with a high value of 100 for the number of cpus, * we won't overload a machine with 100 compiles, because the * host-server (the 'dmucs' program) only gives out the host based * on the actual number of cpus on the host -- which it gets from * the hosts-info file. */ resolved_name += "/100"; } std::ostringstream tmp; tmp << "DISTCC_HOSTS=" << resolved_name; DMUCS_DEBUG((stderr, "tmp is -->%s<--\n", tmp.str().c_str())); if (putenv((char *) tmp.str().c_str()) != 0) { fprintf(stderr, "Error putting DISTCC_HOSTS in the environment\n"); Sclose(client_sock); return -1; } #if 0 for (char **ep = environ; *ep ; ep++) { printf("Env: %s\n", *ep); } #endif int forkret = fork(); if (forkret == 0) { /* child process */ if (execvp(argv[nextarg], &argv[nextarg]) < 0) { fprintf(stderr, "execvp failed: err %s\n", strerror(errno)); return -1; } return 0; } else if (forkret < 0) { fprintf(stderr, "Failed to fork a process!\n"); return -1; } /* parent process -- just wait for the child */ int status = 0; (void) wait(&status); Sclose(client_sock); return WEXITSTATUS(status); } void usage(const char *prog) { fprintf(stderr, "Usage: %s [-s|--server ] [-p|--port ] " "[-D|--debug] [-t|--type ] [args] \n\n", prog); } dmucs-0.6.1/install-sh0000755000175000017500000001572210360753041012765 0ustar samsam#!/bin/sh # # install - install a program, script, or datafile # # 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}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "$0: no input file specified" >&2 exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d "$dst" ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "$0: $src does not exist" >&2 exit 1 fi if [ x"$dst" = x ] then echo "$0: no destination specified" >&2 exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d "$dst" ] then dst=$dst/`basename "$src"` else : fi fi ## this sed command emulates the dirname command dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp='' while [ $# -ne 0 ] ; do pathcomp=$pathcomp$1 shift if [ ! -d "$pathcomp" ] ; then $mkdirprog "$pathcomp" else : fi pathcomp=$pathcomp/ done fi if [ x"$dir_arg" != x ] then $doit $instcmd "$dst" && if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename "$dst"` else : fi # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$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 $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && # 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 [ -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 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } dmucs-0.6.1/libtool0000755000175000017500000064045110374653574012375 0ustar samsam#! /bin/bash # libtoolT - Provide generalized library-building support services. # Generated automatically by (GNU dmucs 0.4) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 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 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. # # 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. # A sed program that does not truncate output. SED="/opt/sfw/bin/gsed" # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="/opt/sfw/bin/gsed -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # The names of the tagged configurations supported by this script. available_tags=" CXX F77" # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host wrasse: # Shell to use when invoking shell scripts. SHELL="/bin/bash" # Whether or not to build shared libraries. build_libtool_libs=yes # Whether or not to build static libraries. build_old_libs=yes # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=yes # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=no # Whether or not to optimize for fast installation. fast_install=needless # The host system. host_alias= host=sparc-sun-solaris2.9 # An echo program that does not interpret backslashes. echo="echo" # The archiver. AR="ar" AR_FLAGS="cru" # A C compiler. LTCC="gcc" # A language-specific compiler. CC="gcc" # Is the compiler the GNU C compiler? with_gcc=yes # An ERE matcher. EGREP="grep -E" # The linker used to build libraries. LD="/usr/ccs/bin/ld" # Whether we need hard or soft links. LN_S="ln -s" # A BSD-compatible nm program. NM="/usr/ccs/bin/nm -p" # A symbol stripping program STRIP="strip" # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=file # Used on cygwin: DLL creation program. DLLTOOL="dlltool" # Used on cygwin: object dumper. OBJDUMP="objdump" # Used on cygwin: assembler. AS="as" # The name of the directory that contains temporary libtool files. objdir=.libs # How to create reloadable object files. reload_flag=" -r" reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" # How to pass a linker flag through the compiler. wl="-Wl," # Object file suffix (normally "o"). objext="o" # Old archive suffix (normally "a"). libext="a" # Shared library suffix (normally ".so"). shrext='.so' # Executable file suffix (normally ""). exeext="" # Additional compiler flags for building library objects. pic_flag=" -fPIC -DPIC" pic_mode=default # What is the maximum length of a command? max_cmd_len=262144 # Does compiler simultaneously support -c and -o options? compiler_c_o="yes" # Must we lock files when doing compilation ? need_locks="no" # Do we need the lib prefix for modules? need_lib_prefix=no # Do we need a version for libraries? need_version=no # Whether dlopen is supported. dlopen_support=unknown # Whether dlopen of programs is supported. dlopen_self=unknown # Whether dlopen of statically linked programs is supported. dlopen_self_static=unknown # Compiler flag to prevent dynamic linking. link_static_flag="-static" # Compiler flag to turn off builtin functions. no_builtin_flag=" -fno-builtin" # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec="" # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec="-z allextract\$convenience -z defaultextract" # Compiler flag to generate thread-safe objects. thread_safe_flag_spec="" # Library versioning type. version_type=linux # Format of library name prefix. libname_spec="lib\$name" # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" # The coded name of the library, if different from the real name. soname_spec="\${libname}\${release}\${shared_ext}\$major" # Commands used to build and install an old-style archive. RANLIB="ranlib" old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib" old_postuninstall_cmds="" # Create an old-style archive from a shared archive. old_archive_from_new_cmds="" # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds="" # Commands used to build and install a shared archive. archive_cmds="\$CC -shared \${wl}-h \${wl}\$soname -o \$lib \$libobjs \$deplibs \$compiler_flags" archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$lib.exp~cat \$export_symbols | \$SED -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$lib.exp~\$echo \\\"local: *; };\\\" >> \$lib.exp~ \$CC -shared \${wl}-M \${wl}\$lib.exp \${wl}-h \${wl}\$soname -o \$lib \$libobjs \$deplibs \$compiler_flags~\$rm \$lib.exp" postinstall_cmds="chmod +x \$lib" postuninstall_cmds="" # Commands used to build a loadable module (assumed same as above if empty) module_cmds="" module_expsym_cmds="" # Commands to strip libraries. old_striplib="" striplib="" # Dependencies to place before the objects being linked to create a # shared library. predep_objects="" # Dependencies to place after the objects being linked to create a # shared library. postdep_objects="" # Dependencies to place before the objects being linked to create a # shared library. predeps="" # Dependencies to place after the objects being linked to create a # shared library. postdeps="" # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path="" # Method to check whether dependent libraries are shared objects. deplibs_check_method="pass_all" # Command to use when deplibs_check_method == file_magic. file_magic_cmd="\$MAGIC_CMD" # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag="" # Flag that forces no undefined symbols. no_undefined_flag=" -z text" # Commands used to finish a libtool library installation in a directory. finish_cmds="" # Same as above, but a single script fragment to be evaled but not shown. finish_eval="" # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe="sed -n -e 's/^.*[ ]\\([BDRT][BDRT]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'" # Transform the output of nm in a proper C declaration global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" # Transform the output of nm in a C name address pair global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" # This is the shared library runtime path variable. runpath_var= # This is the shared library path variable. shlibpath_var=LD_LIBRARY_PATH # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=yes # How to hardcode a shared library path into an executable. hardcode_action=immediate # Whether we should hardcode library paths into libraries. hardcode_into_libs=yes # Flag to hardcode $libdir into a binary during linking. # This must work even if $libdir does not exist. hardcode_libdir_flag_spec="-R\$libdir" # If ld is used when linking, flag to hardcode $libdir into # a binary during linking. This must work even if $libdir does # not exist. hardcode_libdir_flag_spec_ld="" # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator="" # Set to yes if using DIR/libNAME during linking hardcodes DIR into the # resulting binary. hardcode_direct=no # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=no # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=no # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=no # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=yes # Compile-time system search path for libraries sys_lib_search_path_spec=" /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/ /usr/lib/gcc/sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/sparc-sun-solaris2.9/3.4.2/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/ /usr/ccs/bin/sparc-sun-solaris2.9/3.4.2/ /usr/ccs/bin/ /usr/ccs/lib/sparc-sun-solaris2.9/3.4.2/ /usr/ccs/lib/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../sparc-sun-solaris2.9/3.4.2/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../ /lib/sparc-sun-solaris2.9/3.4.2/ /lib/ /usr/lib/sparc-sun-solaris2.9/3.4.2/ /usr/lib/" # Run-time system search path for libraries sys_lib_dlsearch_path_spec="/lib /usr/lib" # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" # Set to yes if exported symbols are required. always_export_symbols=no # The commands to list exported symbols. export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds="" # Symbols that should not be listed in the preloaded symbols. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Symbols that must always be exported. include_expsyms="" # ### END LIBTOOL CONFIG # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 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 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. # # 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. # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" ##################################### # Shell function definitions: # This seems to be the best place for them # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` if test "X$win32_nmres" = "Ximport" ; then win32_libid_type="x86 archive import" else win32_libid_type="x86 archive static" fi fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # End of Shell function definitions ##################################### # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit 1 ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2003 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit 0 ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0" done exit 0 ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit 0 ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit 1 ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit 1 fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case "$arg_mode" in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit 1 fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit 1 ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit 1 ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit 1 ;; esac # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. if test -n "$available_tags" && test -z "$tagname"; then case $base_compile in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" case "$base_compile " in "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit 1 # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit 1 fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit 1" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit 1" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$0" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi $echo $srcfile > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit 1 fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T < /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" case $base_compile in "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) # The compiler in $compile_command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit 1 # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi # We need to know -static, to get the right output filenames. for arg do case $arg in -all-static | -static) if test "X$arg" = "X-all-static"; then if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit 1 fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit 1 fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit 1 else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit 1 fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit 1 fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit 1 fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-mingw* | *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # gcc -m* arguments should be passed to the linker via $compiler_flags # in order to pass architecture information to the linker # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo # but this is not reliable with gcc because gcc may use -mfoo to # select a different linker, different libraries, etc, while # -Wl,-mfoo simply passes -mfoo to the linker. -m*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" if test "$with_gcc" = "yes" ; then compiler_flags="$compiler_flags $arg" fi continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit 1 ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit 1 fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit 1 else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test "$status" -ne 0 && test ! -d "$output_objdir"; then exit $status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit 1 ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplcations in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit 1 ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) if test "$deplibs_check_method" != pass_all; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 1>&2 exit 1 fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit 1 fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit 1 fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit 1 fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit 1 fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit 1 fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var"; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $dir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5* ) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against it, someone # is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit 1 fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else convenience="$convenience $dir/$old_library" old_convenience="$old_convenience $dir/$old_library" deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit 1 fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$deplibs $depdepl" ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$deplibs $path" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit 1 fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit 1 else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit 1 fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac case $revision in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac case $age in 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit 1 fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit 1 ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. for path in $notinst_path; do lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name="`expr $a_deplib : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$save_output-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$save_output-${k}.$objext k=`expr $k + 1` output=$output_objdir/$save_output-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadale object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? exit 0 fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit 1 fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" for xlib in $convenience; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit 0 fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit 0 fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit 0 ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$output.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit 1 ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit 0 fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $0 --fallback-echo"; then case $0 in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; *) qecho="$SHELL `pwd`/$0 --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) cwrappersource=`$echo ${objdir}/lt-${output}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR #define DIR_SEPARATOR '/' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) #define HAVE_DOS_BASED_FILE_SYSTEM #ifndef DIR_SEPARATOR_2 #define DIR_SEPARATOR_2 '\\' #endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); char * basename (const char *name); char * fnqualify(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup ((char *) basename (argv[0])); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = fnqualify(argv[0]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } char * basename (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha (name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return (char *) base; } char * fnqualify(const char *path) { size_t size; char *p; char tmp[LT_PATHMAX + 1]; assert(path != NULL); /* Is it qualified already? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha (path[0]) && path[1] == ':') return xstrdup (path); #endif if (IS_DIR_SEPARATOR (path[0])) return xstrdup (path); /* prepend the current directory */ /* doesn't handle '~' */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ p = XMALLOC(char, size); sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); return p; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit 1" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit 1 fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \$progdir\\\\\$program \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit 1 fi else # The program doesn't exist. \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " chmod +x $output fi exit 0 ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi generated="$generated $gentop" # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` xdir="$gentop/$xlib" $show "${rm}r $xdir" $run ${rm}r "$xdir" $show "$mkdir $xdir" $run $mkdir "$xdir" status=$? if test "$status" -ne 0 && test ! -d "$xdir"; then exit $status fi # We will extract separately just the conflicting names and we will no # longer touch any unique names. It is faster to leave these extract # automatically by $AR in one run. $show "(cd $xdir && $AR x $xabs)" $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 $AR t "$xabs" | sort | uniq -cd | while read -r count name do i=1 while test "$i" -le "$count" do # Put our $i before any first dot (extension) # Never overwrite any file name_to="$name" while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" do name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` done $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? i=`expr $i + 1` done done fi oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` done fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # GNU ar 2.10+ was changed to match POSIX; thus no paths are # encoded into archives. This makes 'ar r' malfunction in # this piecewise linking case whenever conflicting object # names appear in distinct ar calls; check, warn and compensate. if (for obj in $save_oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 AR_FLAGS=cq fi # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*"` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $0 $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit 1 fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit 1 fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit 0 ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg="$nonopt" fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest="$arg" continue fi case $arg in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; -m) prev="-m" ;; -o) prev="-o" ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest="$arg" continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit 1 fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit 1 fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit 1 fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit 1 fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit 1 fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit 1 fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit 0 ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit 1 fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # To insure that "foo" is sourced, and not "foo.exe", # finese the cygwin/MSYS system by explicitly sourcing "foo." # which disallows the automatic-append-.exe behavior. case $build in *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; *) wrapperdot=${wrapper} ;; esac # If there is no directory component, then add one. case $file in */* | *\\*) . ${wrapperdot} ;; *) . ./${wrapperdot} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" if $mkdir "$tmpdir" && chmod 700 "$tmpdir"; then : else $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyways case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $0 $preserve_args --finish$current_libdirs' else exit 0 fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit 0 $echo "----------------------------------------------------------------------" $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "----------------------------------------------------------------------" exit 0 ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit 1 fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit 1 fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit 1 fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit 1 fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit 0 fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit 1 fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test "$mode" = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit 1 ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit 1 fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit 1 fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit 0 ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit 1 ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit 0 # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # ### BEGIN LIBTOOL TAG CONFIG: CXX # Libtool was configured on host wrasse: # Shell to use when invoking shell scripts. SHELL="/bin/bash" # Whether or not to build shared libraries. build_libtool_libs=yes # Whether or not to build static libraries. build_old_libs=yes # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=no # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=no # Whether or not to optimize for fast installation. fast_install=needless # The host system. host_alias= host=sparc-sun-solaris2.9 # An echo program that does not interpret backslashes. echo="echo" # The archiver. AR="ar" AR_FLAGS="cru" # A C compiler. LTCC="gcc" # A language-specific compiler. CC="g++" # Is the compiler the GNU C compiler? with_gcc=yes # An ERE matcher. EGREP="grep -E" # The linker used to build libraries. LD="/usr/ccs/bin/ld" # Whether we need hard or soft links. LN_S="ln -s" # A BSD-compatible nm program. NM="/usr/ccs/bin/nm -p" # A symbol stripping program STRIP="strip" # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=file # Used on cygwin: DLL creation program. DLLTOOL="dlltool" # Used on cygwin: object dumper. OBJDUMP="objdump" # Used on cygwin: assembler. AS="as" # The name of the directory that contains temporary libtool files. objdir=.libs # How to create reloadable object files. reload_flag=" -r" reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" # How to pass a linker flag through the compiler. wl="-Wl," # Object file suffix (normally "o"). objext="o" # Old archive suffix (normally "a"). libext="a" # Shared library suffix (normally ".so"). shrext='.so' # Executable file suffix (normally ""). exeext="" # Additional compiler flags for building library objects. pic_flag=" -fPIC -DPIC" pic_mode=default # What is the maximum length of a command? max_cmd_len=262144 # Does compiler simultaneously support -c and -o options? compiler_c_o="yes" # Must we lock files when doing compilation ? need_locks="no" # Do we need the lib prefix for modules? need_lib_prefix=no # Do we need a version for libraries? need_version=no # Whether dlopen is supported. dlopen_support=unknown # Whether dlopen of programs is supported. dlopen_self=unknown # Whether dlopen of statically linked programs is supported. dlopen_self_static=unknown # Compiler flag to prevent dynamic linking. link_static_flag="-static" # Compiler flag to turn off builtin functions. no_builtin_flag=" -fno-builtin" # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec="" # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec="" # Compiler flag to generate thread-safe objects. thread_safe_flag_spec="" # Library versioning type. version_type=linux # Format of library name prefix. libname_spec="lib\$name" # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" # The coded name of the library, if different from the real name. soname_spec="\${libname}\${release}\${shared_ext}\$major" # Commands used to build and install an old-style archive. RANLIB="ranlib" old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib" old_postuninstall_cmds="" # Create an old-style archive from a shared archive. old_archive_from_new_cmds="" # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds="" # Commands used to build and install a shared archive. archive_cmds="\$CC -shared -nostdlib \$LDFLAGS \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-h \$wl\$soname -o \$lib" archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$lib.exp~cat \$export_symbols | \$SED -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$lib.exp~\$echo \\\"local: *; };\\\" >> \$lib.exp~ \$CC -shared -nostdlib \${wl}-M \$wl\$lib.exp -o \$lib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags~\$rm \$lib.exp" postinstall_cmds="chmod +x \$lib" postuninstall_cmds="" # Commands used to build a loadable module (assumed same as above if empty) module_cmds="" module_expsym_cmds="" # Commands to strip libraries. old_striplib="" striplib="" # Dependencies to place before the objects being linked to create a # shared library. predep_objects="/local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/crti.o /usr/ccs/lib/values-Xa.o /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/crtbegin.o" # Dependencies to place after the objects being linked to create a # shared library. postdep_objects="/local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/crtend.o /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/crtn.o" # Dependencies to place before the objects being linked to create a # shared library. predeps="" # Dependencies to place after the objects being linked to create a # shared library. postdeps="-lstdc++ -lm -lgcc_s -lgcc_s" # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path="-L/local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2 -L/local/usr-local/bin/../lib/gcc -L/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2 -L/usr/ccs/bin -L/usr/ccs/lib -L/local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../.. -L/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../.." # Method to check whether dependent libraries are shared objects. deplibs_check_method="pass_all" # Command to use when deplibs_check_method == file_magic. file_magic_cmd="\$MAGIC_CMD" # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag="" # Flag that forces no undefined symbols. no_undefined_flag=" \${wl}-z \${wl}defs" # Commands used to finish a libtool library installation in a directory. finish_cmds="" # Same as above, but a single script fragment to be evaled but not shown. finish_eval="" # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe="sed -n -e 's/^.*[ ]\\([BDRT][BDRT]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'" # Transform the output of nm in a proper C declaration global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" # Transform the output of nm in a C name address pair global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" # This is the shared library runtime path variable. runpath_var= # This is the shared library path variable. shlibpath_var=LD_LIBRARY_PATH # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=yes # How to hardcode a shared library path into an executable. hardcode_action=immediate # Whether we should hardcode library paths into libraries. hardcode_into_libs=yes # Flag to hardcode $libdir into a binary during linking. # This must work even if $libdir does not exist. hardcode_libdir_flag_spec="\${wl}-R \$wl\$libdir" # If ld is used when linking, flag to hardcode $libdir into # a binary during linking. This must work even if $libdir does # not exist. hardcode_libdir_flag_spec_ld="" # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator="" # Set to yes if using DIR/libNAME during linking hardcodes DIR into the # resulting binary. hardcode_direct=no # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=no # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var= # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=no # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="PATH LD_LIBRARY_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=unknown # Compile-time system search path for libraries sys_lib_search_path_spec=" /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/ /usr/lib/gcc/sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/sparc-sun-solaris2.9/3.4.2/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../../sparc-sun-solaris2.9/lib/ /usr/ccs/bin/sparc-sun-solaris2.9/3.4.2/ /usr/ccs/bin/ /usr/ccs/lib/sparc-sun-solaris2.9/3.4.2/ /usr/ccs/lib/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../sparc-sun-solaris2.9/3.4.2/ /local/usr-local/bin/../lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../sparc-sun-solaris2.9/3.4.2/ /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/../../../ /lib/sparc-sun-solaris2.9/3.4.2/ /lib/ /usr/lib/sparc-sun-solaris2.9/3.4.2/ /usr/lib/" # Run-time system search path for libraries sys_lib_dlsearch_path_spec="/lib /usr/lib" # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" # Set to yes if exported symbols are required. always_export_symbols=no # The commands to list exported symbols. export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds="" # Symbols that should not be listed in the preloaded symbols. exclude_expsyms="" # Symbols that must always be exported. include_expsyms="" # ### END LIBTOOL TAG CONFIG: CXX # ### BEGIN LIBTOOL TAG CONFIG: F77 # Libtool was configured on host wrasse: # Shell to use when invoking shell scripts. SHELL="/bin/bash" # Whether or not to build shared libraries. build_libtool_libs=yes # Whether or not to build static libraries. build_old_libs=yes # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=no # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=no # Whether or not to optimize for fast installation. fast_install=needless # The host system. host_alias= host=sparc-sun-solaris2.9 # An echo program that does not interpret backslashes. echo="echo" # The archiver. AR="ar" AR_FLAGS="cru" # A C compiler. LTCC="gcc" # A language-specific compiler. CC="g77" # Is the compiler the GNU C compiler? with_gcc=yes # An ERE matcher. EGREP="grep -E" # The linker used to build libraries. LD="/usr/ccs/bin/ld" # Whether we need hard or soft links. LN_S="ln -s" # A BSD-compatible nm program. NM="/usr/ccs/bin/nm -p" # A symbol stripping program STRIP="strip" # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=file # Used on cygwin: DLL creation program. DLLTOOL="dlltool" # Used on cygwin: object dumper. OBJDUMP="objdump" # Used on cygwin: assembler. AS="as" # The name of the directory that contains temporary libtool files. objdir=.libs # How to create reloadable object files. reload_flag=" -r" reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" # How to pass a linker flag through the compiler. wl="-Wl," # Object file suffix (normally "o"). objext="o" # Old archive suffix (normally "a"). libext="a" # Shared library suffix (normally ".so"). shrext='.so' # Executable file suffix (normally ""). exeext="" # Additional compiler flags for building library objects. pic_flag=" -fPIC" pic_mode=default # What is the maximum length of a command? max_cmd_len=262144 # Does compiler simultaneously support -c and -o options? compiler_c_o="yes" # Must we lock files when doing compilation ? need_locks="no" # Do we need the lib prefix for modules? need_lib_prefix=no # Do we need a version for libraries? need_version=no # Whether dlopen is supported. dlopen_support=unknown # Whether dlopen of programs is supported. dlopen_self=unknown # Whether dlopen of statically linked programs is supported. dlopen_self_static=unknown # Compiler flag to prevent dynamic linking. link_static_flag="-static" # Compiler flag to turn off builtin functions. no_builtin_flag="" # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec="" # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec="-z allextract\$convenience -z defaultextract" # Compiler flag to generate thread-safe objects. thread_safe_flag_spec="" # Library versioning type. version_type=linux # Format of library name prefix. libname_spec="lib\$name" # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" # The coded name of the library, if different from the real name. soname_spec="\${libname}\${release}\${shared_ext}\$major" # Commands used to build and install an old-style archive. RANLIB="ranlib" old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib" old_postuninstall_cmds="" # Create an old-style archive from a shared archive. old_archive_from_new_cmds="" # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds="" # Commands used to build and install a shared archive. archive_cmds="\$CC -shared \${wl}-h \${wl}\$soname -o \$lib \$libobjs \$deplibs \$compiler_flags" archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$lib.exp~cat \$export_symbols | \$SED -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$lib.exp~\$echo \\\"local: *; };\\\" >> \$lib.exp~ \$CC -shared \${wl}-M \${wl}\$lib.exp \${wl}-h \${wl}\$soname -o \$lib \$libobjs \$deplibs \$compiler_flags~\$rm \$lib.exp" postinstall_cmds="chmod +x \$lib" postuninstall_cmds="" # Commands used to build a loadable module (assumed same as above if empty) module_cmds="" module_expsym_cmds="" # Commands to strip libraries. old_striplib="" striplib="" # Dependencies to place before the objects being linked to create a # shared library. predep_objects="" # Dependencies to place after the objects being linked to create a # shared library. postdep_objects="" # Dependencies to place before the objects being linked to create a # shared library. predeps="" # Dependencies to place after the objects being linked to create a # shared library. postdeps="" # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path="" # Method to check whether dependent libraries are shared objects. deplibs_check_method="pass_all" # Command to use when deplibs_check_method == file_magic. file_magic_cmd="\$MAGIC_CMD" # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag="" # Flag that forces no undefined symbols. no_undefined_flag=" -z text" # Commands used to finish a libtool library installation in a directory. finish_cmds="" # Same as above, but a single script fragment to be evaled but not shown. finish_eval="" # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe="sed -n -e 's/^.*[ ]\\([BDRT][BDRT]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'" # Transform the output of nm in a proper C declaration global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" # Transform the output of nm in a C name address pair global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" # This is the shared library runtime path variable. runpath_var= # This is the shared library path variable. shlibpath_var=LD_LIBRARY_PATH # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=yes # How to hardcode a shared library path into an executable. hardcode_action=immediate # Whether we should hardcode library paths into libraries. hardcode_into_libs=yes # Flag to hardcode $libdir into a binary during linking. # This must work even if $libdir does not exist. hardcode_libdir_flag_spec="-R\$libdir" # If ld is used when linking, flag to hardcode $libdir into # a binary during linking. This must work even if $libdir does # not exist. hardcode_libdir_flag_spec_ld="" # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator="" # Set to yes if using DIR/libNAME during linking hardcodes DIR into the # resulting binary. hardcode_direct=no # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=no # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=no # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=no # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="PATH LD_LIBRARY_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=yes # Compile-time system search path for libraries sys_lib_search_path_spec=" /opt/sfw/lib/gcc-lib/sparc-sun-solaris2.9/2.95.3/ /usr/lib/gcc/sparc-sun-solaris2.9/2.95.3/ /opt/sfw/sparc-sun-solaris2.9/lib/sparc-sun-solaris2.9/2.95.3/ /opt/sfw/sparc-sun-solaris2.9/lib/ /usr/ccs/bin/sparc-sun-solaris2.9/2.95.3/ /usr/ccs/bin/ /usr/ccs/lib/sparc-sun-solaris2.9/2.95.3/ /usr/ccs/lib/ /opt/sfw/lib/sparc-sun-solaris2.9/2.95.3/ /opt/sfw/lib/ /lib/sparc-sun-solaris2.9/2.95.3/ /lib/ /usr/lib/sparc-sun-solaris2.9/2.95.3/ /usr/lib/" # Run-time system search path for libraries sys_lib_dlsearch_path_spec="/lib /usr/lib" # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" # Set to yes if exported symbols are required. always_export_symbols=no # The commands to list exported symbols. export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds="" # Symbols that should not be listed in the preloaded symbols. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Symbols that must always be exported. include_expsyms="" # ### END LIBTOOL TAG CONFIG: F77 dmucs-0.6.1/loadavg.cc0000644000175000017500000001240010446517543012705 0ustar samsam/* * gethost.cc: The program that send a loadavg message to the DMUCS * server periodically. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include "dmucs.h" #include #include #include #include #include #include #include #include #include #include #include #include "COSMIC/HDR/sockets.h" #include #include #include extern char **environ; void usage(const char *prog); void sleep(); bool debugMode = false; int main(int argc, char *argv[]) { /* * o Open a client socket to the server ip/port. * o Send my IP address in a host request. * o Read an IP address in a response. * o Assign the value DISTCC_HOSTS to the IP address in the env. * o Use execve to run the command passed in, with its args, on the * command line. * o Wait for the command to finish. * o Close the client socket. */ /* * Process command-line arguments. * * -s , --server : the name of the server machine. * -p , --port : the port number to listen on (default: 6714). * -t : a string that indicates which type * of host the compilation machine is. * -D, --debug: debug mode (default: off) */ std::ostringstream serverName; serverName << "@" << SERVER_MACH_NAME; int serverPortNum = SERVER_PORT_NUM; std::string distingProp = ""; for (int i = 1; i < argc; i++) { if (strequ("-s", argv[i]) || strequ("--server", argv[i])) { if (++i >= argc) { usage(argv[0]); return -1; } serverName.seekp(1); // remove everything after the first "@". serverName << argv[i] << '\0'; } else if (strequ("-p", argv[i]) || strequ("--port", argv[i])) { if (++i >= argc) { usage(argv[0]); return -1; } serverPortNum = atoi(argv[i]); } else if (strequ("-t", argv[i]) || strequ("--type", argv[i])) { if (++i >= argc) { usage(argv[0]); return -1; } distingProp = argv[i]; } else if (strequ("-D", argv[i]) || strequ("--debug", argv[i])) { debugMode = true; } else { usage(argv[0]); return -1; } } std::ostringstream clientPortStr; clientPortStr << "c" << serverPortNum; char hostname[256]; if (gethostname(hostname, 256) < 0) { fprintf(stderr, "Could not get my hostname\n"); return -1; } struct hostent *he = gethostbyname(hostname); if (he == NULL) { fprintf(stderr, "Could not get my hostname\n"); return -1; } struct in_addr in; memcpy(&in.s_addr, he->h_addr_list[0], sizeof(in.s_addr)); while (1) { DMUCS_DEBUG((stderr, "doing Sopen with %s, %s\n", serverName.str().c_str(), clientPortStr.str().c_str())); Socket *client_sock = Sopen((char *) serverName.str().c_str(), (char *) clientPortStr.str().c_str()); if (!client_sock) { fprintf(stderr, "Could not open client: %s\n", strerror(errno)); Sclose(client_sock); sleep(); continue; } DMUCS_DEBUG((stderr, "got socket: %s\n", Sprtskt(client_sock))); FILE *output = popen("uptime", "r"); if (output == NULL) { fprintf(stderr, "Failed to get load avg\n"); Sclose(client_sock); sleep(); continue; } char buf[1024]; char ldStr[32]; if (fgets(buf, 1024, output) == NULL) { strcpy(ldStr," 0.0 0.0 0.0"); } else { char junk1[8]; float ldAvg1 = 0.0, ldAvg5 = 0.0, ldAvg10 = 0.0; std::istringstream ist(buf); std::string word; bool found = false; while (ist >> word) { if (word == "average:" || word == "averages:") { found = true; break; } } if (found) { ist >> ldAvg1; ist.get(); // eat the ',' ist >> ldAvg5; ist.get(); // eat the ',' ist >> ldAvg10; } else { fprintf(stderr, "Couldn't read loadavg results -->%s<--\n", buf); } sprintf(ldStr, " %2.2f %2.2f %2.2f", ldAvg1, ldAvg5, ldAvg10); } pclose(output); std::string clientReqStr = "load " + std::string(inet_ntoa(in)) + std::string(ldStr) + std::string(" ") + distingProp; DMUCS_DEBUG((stderr, "Writing -->%s<-- to the server\n", clientReqStr.c_str())); Sputs((char *) clientReqStr.c_str(), client_sock); Sclose(client_sock); sleep(); } } void sleep() { struct timeval t = { 10L, 0L }; // 10 seconds. select(0, NULL, NULL, NULL, &t); } void usage(const char *prog) { fprintf(stderr, "Usage: %s [-s|--server ] [-p|--port ] " "[-t|--type ] [-D|--debug]\n\n", prog); } dmucs-0.6.1/main.cc0000644000175000017500000002152210446517543012221 0ustar samsam/* * main.cc: the DMUCS server -- to assign compilation hosts' cpus to * requestors, listen for load average messages and monitoring requests, * etc. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include "dmucs.h" #include "dmucs_dprop.h" #include "dmucs_msg.h" #include "dmucs_hosts_file.h" #include "dmucs_host.h" #include "dmucs_db.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include "COSMIC/HDR/sockets.h" static void spawn_stats_thread(); static void spawn_silent_thread(); static void *doSilentSearch(void *bogus); static void *updateStats(void *bogus); static void usage(const char *prog); static void handleReq(Socket *server, DmucsDb *db); static char* peer2buf(const Socket *server, char *buf); void addFd(Socket *sock); void removeFd(Socket *sock); bool debugMode = false; std::string hostsInfoFile = HOSTS_INFO_FILE; static std::list fdList; static std::map dpropMap; int main(int argc, char *argv[]) { /* * Open a socket on which we will: * o receive requests for hosts * o fork a child process in which we: * o respond with the highest-tier available cpu, and move the cpu * into the assignedCpus set. * o wait for the client to close the (slave) socket, indicating * that the compilation host is done. * o place the compilation cpu back into the db of available cpus * o receive load average messages from hosts * o recompute the new tier value for the host. If it is different * from the current tier, move the host in the availHosts map to * the new tier. * o receive status messages (available|unavailable) from hosts * o if available, get the host information from the hosts-info * file and add the host to the availHosts data structure. * o if unavailable, remove the host from whatever set it is in. * o receive monitoring requests from the monitoring clients. * o package up the data structures and send the info in the reply. * * Command-line arguments: * o -D: display debugging output. (Assumes -s.) Optional. * o -p : use . Required. * o -s: do not fork as a daemon. */ /* * Process command-line arguments: * * -p , --port : the port number to listen on (default: 9714). * -D, --debug: debug mode (default: off) * -H, --hosts-info-file : specify the hosts info file location. */ int serverPortNum = SERVER_PORT_NUM; #ifndef HAVE_GETHOSTBYADDR_R #ifdef HAVE_GETHOSTBYADDR pthread_mutex_init(&gethost_mutex, NULL); #endif /* HAVE_GETHOSTBYADDR */ #endif /* !HAVE_GETHOSTBYADDR_R */ for (int i = 1; i < argc; i++) { if (strequ("-p", argv[i]) || strequ("--port", argv[i])) { if (++i >= argc) { usage(argv[0]); return -1; } serverPortNum = atoi(argv[i]); } else if (strequ("-D", argv[i]) || strequ("--debug", argv[i])) { debugMode = true; } else if (strequ("-H", argv[i]) || strequ("--hosts-info-file", argv[i])) { if (++i >= argc) { usage(argv[0]); return -1; } hostsInfoFile = argv[i]; } else { usage(argv[0]); return -1; } } /* * Make the database. */ DmucsDb *db = DmucsDb::getInstance(); /* * Open the socket. */ char svrstr[16]; sprintf(svrstr, "s%d", serverPortNum); Socket *server = Sopen(NULL, svrstr); if (!server) { fprintf(stderr, "Could not open server on port 9714.\n"); return -1; } /* * Spawn a thread to periodically search the database for hosts * that have been silent. Move these hosts to the SILENT state. */ spawn_silent_thread(); /* * Spawn a thread to periodically collect statistics and print them * out. */ spawn_stats_thread(); Smaskset(server); /* Process requests, forever!!! Bwa, ha, ha! */ while (1) { DMUCS_DEBUG((stderr, "\n------- Server: calling select ---------\n")); int result = Smaskwait(); DMUCS_DEBUG((stderr, "select returned %d\n", result)); if (result > 0) { // something is available to be read std::list::const_iterator it; for (it = fdList.begin(); it != fdList.end(); ++it) { if (Smaskisset(*it)) { DMUCS_DEBUG((stderr, "\n--- Server: Handle client request ---\n")); handleReq(*it, db); /* handleReq could change the list so we have to jump out here. */ break; } } if (Smaskisset(server)) { Socket *sock_req = Saccept(server); if (sock_req == NULL) { DMUCS_DEBUG((stderr, "ERROR: Saccept returns 0: %s\n", strerror(errno))); } else { addFd(sock_req); handleReq(sock_req, db); } } } else if (result < 0) { // Error condition fprintf(stderr, "ERROR: result %d\n", result); } else { // result == 0. fprintf(stderr, "Select timeout...\n"); } } #ifndef HAVE_GETHOSTBYADDR_R #ifdef HAVE_GETHOSTBYADDR pthread_mutex_destroy(&gethost_mutex); #endif /* HAVE_GETHOSTBYADDR */ #endif /* !HAVE_GETHOSTBYADDR_R */ } static void spawn_silent_thread() { pthread_attr_t tattr; pthread_attr_init(&tattr); /* We don't care about joining up this thread with its parent -- it won't matter because both will die off together -- when the server is killed. */ pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED); pthread_t thread_id; if (pthread_create(&thread_id, &tattr, doSilentSearch, (void *) NULL) != 0) { perror("pthread_create"); return; } } static void spawn_stats_thread() { pthread_attr_t tattr; pthread_attr_init(&tattr); /* We don't care about joining up this thread with its parent -- it won't matter because both will die off together -- when the server is killed. */ pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED); pthread_t thread_id; if (pthread_create(&thread_id, &tattr, updateStats, (void *) NULL) != 0) { perror("pthread_create"); return; } } static void * doSilentSearch(void *bogus /* not used */) { while (1) { struct timeval t = { 60L, 0L }; // 60 seconds. select(0, NULL, NULL, NULL, &t); DmucsDb::getInstance()->handleSilentHosts(); } } static void * updateStats(void *bogus /* not used */) { int served, max, avail; char buf[32]; while (1) { DmucsDb::getInstance()->getStatsFromDb(&served, &max, &avail); time_t t = time(NULL); (void) ctime_r(&t, buf); /* There is a newline on the end of buf -- remove it. */ buf[strlen(buf) - 1] = '\0'; fprintf(stderr, "[%s] Hosts Served: %d Max/Avail: %d/%d\n", buf, served, max, avail); struct timeval sleepTime = { 60L, 0L }; // 60 seconds. select(0, NULL, NULL, NULL, &sleepTime); } } static void handleReq(Socket *sock_req, DmucsDb *db) { char buf[BUFSIZE]; DMUCS_DEBUG((stderr, "New request from %s\n", peer2buf(sock_req, buf))); if (Sgets(buf, BUFSIZE, sock_req) == NULL) { DMUCS_DEBUG((stderr, "Socket closed: %s\n", peer2buf(sock_req, buf))); db->releaseCpu((unsigned int)sock_req); removeFd(sock_req); return; } DmucsMsg *msg = DmucsMsg::parseMsg(sock_req, buf); if (msg == NULL) { fprintf(stderr, "Got bad message on socket. Continuing.\n"); removeFd(sock_req); return; } msg->handle(sock_req, buf); delete msg; } static char * peer2buf(const Socket *sock, char *buf) { struct sockaddr sck; socklen_t s = sizeof(sck); getpeername(sock->skt, &sck, &s); struct sockaddr_in *sin = (struct sockaddr_in *) &sck; sprintf(buf, "%s:%d", inet_ntoa(sin->sin_addr), sin->sin_port); return buf; } void addFd(Socket *sock) { fdList.push_back(sock); Smaskset(sock); } void removeFd(Socket *sock) { Smaskunset(sock); fdList.remove(sock); Sclose(sock); } static void usage(const char *prog) { fprintf(stderr, "Usage: %s [-p|--port ] [-D|--debug] " "[-H|--hosts-info-file ]\n\n", prog); } dmucs-0.6.1/missing0000755000175000017500000002403210360753041012352 0ustar samsam#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 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 case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -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]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. 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' is missing on your system. 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 missing on your system. 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) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. 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 if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # 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 you do not seem to have it handy on your system. 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 dmucs-0.6.1/mkinstalldirs0000755000175000017500000000370410360753041013564 0ustar samsam#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here dmucs-0.6.1/monitor.cc0000644000175000017500000002202210446517543012760 0ustar samsam/* * monitor.cc: the DMUCS monitoring program -- to see how busy the server * is, which hosts are allocated, etc. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include "dmucs.h" #include "dmucs_host.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "COSMIC/HDR/sockets.h" #include #include #include extern char **environ; void usage(const char *prog); void sleep(); void parseResults(const char *resultStr); #define RESULT_MAX_SIZE 8196 char resultStr[RESULT_MAX_SIZE]; bool debugMode = false; int main(int argc, char *argv[]) { /* * o Open a client socket to the server ip/port. * o Send a monitor request. * o Read a string in the response. * o Parse the string and print out the information in a clean way. */ /* * Process command-line arguments. * * -s , --server : the name of the server machine. * -p , --port : the port number to listen on (default: 6714). * -D, --debug: debug mode (default: off) */ std::ostringstream serverName; serverName << "@" << SERVER_MACH_NAME; int serverPortNum = SERVER_PORT_NUM; for (int i = 1; i < argc; i++) { if (strequ("-s", argv[i]) || strequ("--server", argv[i])) { if (++i >= argc) { usage(argv[0]); return -1; } serverName.seekp(1); // remove everything after the first "@". serverName << argv[i] << '\0'; } else if (strequ("-p", argv[i]) || strequ("--port", argv[i])) { if (++i >= argc) { usage(argv[0]); return -1; } serverPortNum = atoi(argv[i]); } else if (strequ("-D", argv[i]) || strequ("--debug", argv[i])) { debugMode = true; } else { usage(argv[0]); return -1; } } std::ostringstream clientPortStr; clientPortStr << "c" << serverPortNum; char hostname[256]; if (gethostname(hostname, 256) < 0) { fprintf(stderr, "Could not get my hostname\n"); return -1; } struct hostent *he = gethostbyname(hostname); if (he == NULL) { fprintf(stderr, "Could not get my hostname\n"); return -1; } struct in_addr in; memcpy(&in.s_addr, he->h_addr_list[0], sizeof(in.s_addr)); while (1) { DMUCS_DEBUG((stderr, "doing Sopen with %s, %s\n", serverName.str().c_str(), clientPortStr.str().c_str())); Socket *client_sock = Sopen((char *) serverName.str().c_str(), (char *) clientPortStr.str().c_str()); if (!client_sock) { fprintf(stderr, "Could not open client: %s\n", strerror(errno)); Sclose(client_sock); sleep(); continue; } Sputs("monitor", client_sock); resultStr[0] = '\0'; if (Sgets(resultStr, RESULT_MAX_SIZE, client_sock) == NULL) { fprintf(stderr, "Got error from reading socket.\n"); Sclose(client_sock); return -1; } DMUCS_DEBUG((stderr, "monitor: got -->%s<--\n", resultStr)); parseResults(resultStr); Sclose(client_sock); sleep(); } } static void dumpSummaryInfo(std::ostringstream &availHosts, std::ostringstream &overHosts, std::ostringstream &unavailHosts, std::ostringstream &silentHosts, std::ostringstream &unkHosts) { if (! availHosts.str().empty()) std::cout << "Avail: " << availHosts.str() << '\n'; if (! overHosts.str().empty()) std::cout << "Overloaded: " << overHosts.str() << '\n'; if (! unavailHosts.str().empty()) std::cout << "Unavail: " << unavailHosts.str() << '\n'; if (! silentHosts.str().empty()) std::cout << "Silent: " << silentHosts.str() << '\n'; if (! unkHosts.str().empty()) std::cout << "Unknown state: " << unkHosts.str() << '\n'; availHosts.str(""); overHosts.str(""); unavailHosts.str(""); silentHosts.str(""); unkHosts.str(""); } void parseResults(const char *resultStr) { /* * The string will look like this: * D: // a string that distinguishes these hosts. * H: // a host, its ip address, and its state. * C : /<#cpus> * * o The state is represented by an integer representing the * host_status_t enum value. * o The entire string will end with a \0 (end-of-string) character. * * We want to parse this information, and print out : * hosts: * Tier : host/#cpus host/#cpus ... * Tier : ... * Available Hosts: . * Silent Hosts: host/#cpus ... * Unavailable Hosts: host/#cpus ... * * */ std::istringstream instr(resultStr); std::ostringstream unkHosts, availHosts, unavailHosts, overHosts, silentHosts; while (1) { char firstChar; instr >> firstChar; if (instr.eof()) { dumpSummaryInfo(availHosts, overHosts, unavailHosts, silentHosts, unkHosts); break; } switch (firstChar) { case 'D': { /* We see a "D" which means we are going to start getting information for a new set of hosts. So, if we have summary information on the previous set, print it out now, and clear it. */ dumpSummaryInfo(availHosts, overHosts, unavailHosts, silentHosts, unkHosts); std::string distProp; instr.ignore(); // eat ':' instr >> distProp; if (distProp == "''") continue; // empty distinguishing str std::cout << "*** " << distProp << " hosts:" << '\n'; break; } case 'H': { std::string ipstr; int state; /* Read in ': ' */ instr.ignore(); // eat ':' instr >> ipstr >> state; unsigned int addr = inet_addr(ipstr.c_str()); struct hostent *he = gethostbyaddr((char *)&addr, sizeof(addr), AF_INET); std::string hostname = (he != NULL) ? he->h_name : ipstr; /* Remove everything from the first . onward -- so we don't see the long domain name in the output. */ hostname.erase(hostname.find_first_of('.')); /* * We collect each hostname based on its state, and add it * to an output string. */ std::ostringstream *ostr; switch (state) { case STATUS_AVAILABLE: ostr = &availHosts; break; case STATUS_UNAVAILABLE: ostr = &unavailHosts; break; case STATUS_OVERLOADED: ostr = &overHosts; break; case STATUS_SILENT: ostr = &silentHosts; break; case STATUS_UNKNOWN: default: ostr = &unkHosts; } *ostr << hostname << ' '; break; } case 'C': { std::string line; std::getline(instr, line); std::istringstream linestr(line); int tierNum; linestr >> tierNum; linestr.ignore(2); // eat the ': ' std::string ipAddrAndNCpus; std::cout << "Tier " << tierNum << ": "; // parse one or more "ipaddr/numcpus" fields. while (1) { char ipName[32]; // Read ip address, ending in '/' linestr.get(ipName, 32, '/'); if (! linestr.good()) { break; } linestr.ignore(); // skip the '/' int numCpus; linestr >> numCpus; linestr.ignore(); // eat ' ' unsigned int addr = inet_addr(ipName); struct hostent *he = gethostbyaddr((char *)&addr, sizeof(addr), AF_INET); std::string hname; if (he == NULL) { hname = ipName; } else { hname = he->h_name; /* Remove domain name from end of hostname. */ hname.erase(hname.find_first_of('.')); } std::ostringstream hostname; hostname << hname; hostname << '/' << numCpus << ' '; std::cout << hostname.str(); } std::cout << '\n'; break; } default: std::string line; std::getline(instr, line); std::cout << line << '\n'; } } std::cout << '\n' << std::flush; } void sleep() { struct timeval t = { 10L, 0L }; // 10 seconds. select(0, NULL, NULL, NULL, &t); } void usage(const char *prog) { fprintf(stderr, "Usage: %s [-s|--server ] [-p|--port ] " "[-D|--debug]\n\n", prog); } dmucs-0.6.1/remhost.cc0000644000175000017500000001102510433414212012734 0ustar samsam/* * remhost.cc: a program to change the state of a compilation host. * * Copyright (C) 2005, 2006 Victor T. Norman * * 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 */ #include "dmucs.h" #include #include #include #include #include #include #include #include #include #include #include #include "COSMIC/HDR/sockets.h" extern char **environ; void usage(const char *prog); bool debugMode = false; int main(int argc, char *argv[]) { /* * o Open a client socket to the server ip/port. * o Send my IP address in a 'remove host' or 'add host' request, depending * on the name of the executable. * o Close the client socket. */ // TODO: need to take optional ip address as argument -- to remove / add // host on a remote machine. /* * Process command-line arguments: * * -s , --server : the name of the server machine. * -p , --port : the port number to send to (default: 6714). * -D, --debug: debug mode (default: off) */ std::ostringstream serverName; serverName << "@" << SERVER_MACH_NAME; int serverPortNum = SERVER_PORT_NUM; char *distingProp = '\0'; int nextarg = 1; for (; nextarg < argc; nextarg++) { if (strequ("-s", argv[nextarg]) || strequ("--server", argv[nextarg])) { if (++nextarg >= argc) { usage(argv[0]); return -1; } serverName.seekp(1); // remove everything after the first "@". serverName << argv[nextarg] << '\0'; } else if (strequ("-p", argv[nextarg]) || strequ("--port", argv[nextarg])) { if (++nextarg >= argc) { usage(argv[0]); return -1; } serverPortNum = atoi(argv[nextarg]); } else if (strequ("-t", argv[nextarg]) || strequ("--type", argv[nextarg])) { if (++nextarg >= argc) { usage(argv[0]); return -1; } distingProp = argv[nextarg]; } else if (strequ("-D", argv[nextarg]) || strequ("--debug", argv[nextarg])) { debugMode = true; } else { /* We are looking at the command to run, supposedly. */ break; } } std::ostringstream clientPortStr; clientPortStr << "c" << serverPortNum; DMUCS_DEBUG((stderr, "doing Sopen with %s, %s\n", serverName.str().c_str(), clientPortStr.str().c_str())); Socket *client_sock = Sopen((char *) serverName.str().c_str(), (char *) clientPortStr.str().c_str()); if (!client_sock) { fprintf(stderr, "Could not open client: %s\n", strerror(errno)); return -1; } char hostname[256]; if (gethostname(hostname, 256) < 0) { fprintf(stderr, "Could not get my hostname\n"); Sclose(client_sock); return -1; } struct hostent *he = gethostbyname(hostname); if (he == NULL) { fprintf(stderr, "Could not get my hostname\n"); Sclose(client_sock); return -1; } struct in_addr in; memcpy(&in.s_addr, he->h_addr_list[0], sizeof(in.s_addr)); struct sockaddr sck; socklen_t s = sizeof(sck); getsockname(client_sock->skt, &sck, &s); struct sockaddr_in *sin = (struct sockaddr_in *) &sck; /* If the name of the program is "addhost", then send "up" to the dmucs server. Otherwise, send "down". */ const char *op = (strstr(argv[0], "addhost") != NULL) ? "up" : "down"; std::ostringstream clientReqStr; clientReqStr << "status " << inet_ntoa(in) << " " << op << " " << distingProp; DMUCS_DEBUG((stderr, "Writing -->%s<-- to the server\n", clientReqStr.str().c_str())); Sputs((char *) clientReqStr.str().c_str(), client_sock); Sclose(client_sock); return 0; } void usage(const char *prog) { fprintf(stderr, "Usage: %s [-s|--server ] [-p|--port ] " "[-t|--type ] [-D|--debug] [args] \n\n", prog); } dmucs-0.6.1/test.cc0000644000175000017500000000433310360753041012243 0ustar samsam /* * Copyright (c) 1994 - 2002 Marconi Communications, Inc. as an unpublished * work. * * All rights reserved. * * File: test.cc - */ #include #include #include #include #include #include #include #include #include struct host_info_t { int numCpus_; int powerIndex_; host_info_t(int numcpus, int pindex) : numCpus_(numcpus), powerIndex_(pindex) {} }; typedef std::map host_info_db_t; typedef host_info_db_t::iterator host_info_db_iter_t; host_info_db_t db_; #include #include int main(int argc, char *argv[]) { #if 0 std::ifstream instr("/us/norman/hosts-info"); if (!instr) { cout << "not instr" << endl; return -1; } std::string machine; int numcpus, pindex; for (int lineno = 1; ; lineno++) { instr >> machine >> numcpus >> pindex; if (instr.eof()) { cout << "EOF" << endl; break; } if (! instr.good()) { cout << "bad input in line " << lineno << endl; break; } cout << "machine: " << machine << " numcpus: " << numcpus << " pindex: " << pindex << endl; /* * Convert the machine name into an ip address. */ unsigned long addr; struct hostent *hostent; if ((int)(addr = inet_addr(machine.c_str())) != -1) { hostent = gethostbyaddr((char *)&addr, sizeof(addr), AF_INET); } else { hostent = gethostbyname(machine.c_str()); } if (hostent == NULL) { cout << "Could not get IP address for machine: " << machine << ". Skipping." << endl; continue; } struct in_addr in; memcpy(&in.s_addr, hostent->h_addr_list[0], sizeof(in.s_addr)); host_info_db_t::value_type obj(in.s_addr, host_info_t(numcpus, pindex)); db_.insert(obj); } for (host_info_db_iter_t itr = db_.begin(); itr != db_.end(); ++itr) { printf("address %s --> (numcpus %d, pindex %d)\n", inet_ntoa(*(const struct in_addr *) &itr->first), itr->second.numCpus_, itr->second.powerIndex_); } return 0; #endif std::ostringstream o; for (int i = 1; i < argc; i++) { o << argv[i] << " "; } std::cout << o.str() << std::endl; system(o.str().c_str()); } dmucs-0.6.1/COSMIC/0000755000175000017500000000000010457726376011751 5ustar samsamdmucs-0.6.1/COSMIC/CVS/0000755000175000017500000000000010457726373012401 5ustar samsamdmucs-0.6.1/COSMIC/CVS/Root0000644000175000017500000000007110457726367013250 0ustar samsam:ext:vic_norman@dmucs.cvs.sourceforge.net:/cvsroot/dmucs dmucs-0.6.1/COSMIC/CVS/Repository0000644000175000017500000000001510457726367014502 0ustar samsamdmucs/COSMIC dmucs-0.6.1/COSMIC/CVS/Entries0000644000175000017500000000357110457726373013743 0ustar samsam/MAKE.CMD/1.1.1.1/Tue Jan 10 15:43:29 2006// /MAKEFILE.os2/1.1.1.1/Tue Jan 10 15:43:29 2006// /Makefile/1.2/Thu Jun 22 13:47:15 2006// /Makefile.am.first_try/1.1.1.1/Tue Jan 10 15:43:29 2006// /Makelib./1.1.1.1/Tue Jan 10 15:43:29 2006// /Makeskt.bat/1.1.1.1/Tue Jan 10 15:43:29 2006// /Makeskt.com/1.1.1.1/Tue Jan 10 15:43:29 2006// /Mkwin95.bat/1.1.1.1/Tue Jan 10 15:43:29 2006// /Saccept.c/1.2/Fri Mar 17 15:14:59 2006// /Sclose.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Sgets.c/1.2/Fri Mar 17 15:14:59 2006// /Sinit.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Smaskwait.c/1.2/Fri Mar 17 15:14:59 2006// /Smkskt.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Sopen.c/1.3/Thu Jul 20 16:18:10 2006// /Sopenv.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Speek.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Speeraddr.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Speername.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Sprintf.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Sprtskt.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Sputs.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Sread.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Sreadbytes.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Srmsrvr.c/1.2/Thu Jul 20 16:18:10 2006// /Sscanf.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Stest.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Stimeoutwait.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Svprintf.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Swait.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /Swrite.c/1.2/Fri Mar 17 15:14:59 2006// /cprt.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /error.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /fopenv.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /outofmem.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /rdcolor.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /rdcolor.dat/1.1.1.1/Tue Jan 10 15:43:29 2006// /sprt.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /srmtrblk.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /stpblk.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /stpnxt.c/1.1.1.1/Tue Jan 10 15:43:29 2006// /strnxtfmt.c/1.1.1.1/Tue Jan 10 15:43:29 2006// D dmucs-0.6.1/COSMIC/CVS/Entries.Log0000644000175000017500000000010310457726376014452 0ustar samsamA D/AS400//// A D/DOC//// A D/EXAMPLES//// A D/EXE//// A D/HDR//// dmucs-0.6.1/COSMIC/MAKE.CMD0000644000175000017500000000164110360753041012773 0ustar samsam@echo OS/2 Command file: makes the Simple Sockets Library from a @echo OS/2S console @echo Trying Watcomm C++ 11.0a or better @echo ------------------------------------ @echo Authors: Charles E. Campbell, Jr. @echo Terry McRoberts @echo mod for OS/2 Steve Richards @echo --------------------------------------------------------------- @echo Compiling Simple Sockets Library @del *.lib >NUL wmake rem Compile and link SSL utilities and PortMaster (Spm) @echo Compiling and linking SSL utilities cd EXE @del exe\*.exe wmake -f MAKEFILE.os2 cd .. @echo --------------------------------------------------------------- @echo Utilities and the PortMaster (Spm) are in COSMIC\*.exe @echo The Simple Sockets library is in COSMIC\smplskts.lib @echo Try out the examples, too! @echo .......................... @echo Best of luck, @echo Charles E. Campbell dmucs-0.6.1/COSMIC/MAKEFILE.os20000644000175000017500000000400410360753041013527 0ustar samsam# Makefile for the Simple Sockets Library (C version) # # NASA -- Goddard Space Flight Center, Code 714.1 # Intelligent Robotics Laboratory # Robotics Branch # # Authors: Dr. Charles E. Campbell, Jr. # Terry McRoberts # # modified for OS/2 and watcom 11.0 # Using OS/2 Tookkit V4.5 from developer CDROM (OStk45) # # can create either for either 16 or 32 bit stack # although the 16 bit was not tested to work # # for TCP version 4 (16bit stack) change cFLAGS #cFLAGS = /bt=os2 /dos2 /l=os2flat /dTCPV40HDRS $(libs) # instead of the one below # # # change paths below as necessary .before SET INCLUDE=W:\WATCOM\H\OS2;W:\WATCOM\H;W:\WATCOM\SOM\INCLUDE;w:\os2tk45\som\include;w:\os2tk45\inc;w:\os2tk45\h\gl;w:\os2tk45\h;w:\os2tk45\h\libc;.; set include=$(%include)k:\srwork\sockets\cosmic\HDR; set lib=$(%lib);w:\watcom\lib386;w:\watcom\lib386\os2; set watcom=w:\watcom libs = k:\srwork\sockets\cosmic\smplskts.lib hdrroot = k:\srwork\sockets\cosmic\HDR\ # list of objects to create objs = Saccept.obj Sprintf.obj Stest.obj outofmem.obj & Sclose.obj Sprtskt.obj Stimeoutwait.obj rdcolor.obj & Sgets.obj Sputs.obj Svprintf.obj sprt.obj & Smaskwait.obj Sread.obj Swait.obj srmtrblk.obj & Smkskt.obj Sreadbytes.obj Swrite.obj stpblk.obj & Sopen.obj Srmsrvr.obj error.obj stpnxt.obj & Sopenv.obj Sscanf.obj fopenv.obj strnxtfmt.obj & Speek.obj cprt.obj Speername.obj Speeraddr.obj & Sinit.obj hdrs = $(hdrroot)sockets.h & $(hdrroot)xstdlib.h & $(hdrroot)xtdio.h & $(hdrroot)setproto.h & $(hdrroot)rdcolor.h CC = wcc386 cFLAGS = /bt=os2 /dos2 /dxCPV40HDRS # to convert C into executables .c.obj : .AUTODEPEND $(CC) $(CFLAGS) $[* #$(objs) :: $(hdrs) #all :: $(objs) $(libs) : $(objs) $(hdrs) wlib $(libs) -+$(objs) dmucs-0.6.1/COSMIC/Makefile0000644000175000017500000000552710446517543013412 0ustar samsam# Makefile for the Simple Sockets Library (C version) # # Authors: Charles E. Campbell, Jr., Ph.D. # Terry McRoberts # # # Building the SSL: # # Some Unix (tm) boxes need to run a program called "ranlib" (ex. Sun) # You will notice below a "#ranlib ..." line; if your machine needs it, # remove the "#". # # Please modify the Makefile below for the following exceptions: # # Compiler Exceptions Loader Exceptions # SCO # Solaris 2.1 # # You may also wish to set the "RDCOLOR" environment variable in your # login/profile/startup-sequence/etc file to be the string where the # file is to be located. Furthermore, you may wish to # modify the file to include escape sequences for your # favorite terminal(s) (should be fairly obvious by inspection how to # do so using some editor). # # Option: The PortMaster can optionally use a "firewall" to keep unwanted # visitors out. The PortMaster (Spm) uses an environment variable # (SPMFIREWALL) to specify where the firewall file is located. # One may also start up the PortMaster (Spm -f firewallfilename). # Please read the documentation on this. CC = cc OBJ = Saccept.o Sprintf.o Stest.o outofmem.o \ Sclose.o Sprtskt.o Stimeoutwait.o rdcolor.o \ Sgets.o Sputs.o Svprintf.o sprt.o \ Smaskwait.o Sread.o Swait.o srmtrblk.o \ Smkskt.o Sreadbytes.o Swrite.o stpblk.o \ Sopen.o Srmsrvr.o error.o stpnxt.o \ Sopenv.o Sscanf.o fopenv.o strnxtfmt.o \ Speek.o cprt.o Speername.o Speeraddr.o \ Sinit.o # LIB: name of library LIB = simpleskts.a # EXETGT: where to put executables, as seen from the viewpoint of the EXE # subdirectory EXETGT=../EXE # usual compiler stuff CFLAGS = -O -I./HDR LOADLIBES = ../$(LIB) # for SCO UNIX: # LOADLIBES = ../$(LIB) -lsocket # for Solaris 2.1 # LOADLIBES = ../$(LIB) -lnsl # for g++ compiler: (tnx to Gary Johnson) # CFLAGS= -Wall -ansi -pedantic -O -I./HDR # all : $(LIB) exes examples all : $(LIB) $(LIB) : $(OBJ) ar r simpleskts.a *.o # ranlib simpleskts.a # /bin/rm -f *.o @echo "finished updating simpleskts.a" exes : $(LIB) ( cd EXE; \ make CC=$(CC) LIB=$(LIB) CFLAGS="-O -I../HDR" LOADLIBES=$(LOADLIBES) EXETGT=$(EXETGT) ) examples : $(LIB) ( cd EXAMPLES; \ make CC=$(CC) LIB=$(LIB) CFLAGS="-O -I../HDR" LOADLIBES=$(LOADLIBES) ) distclean clean : @/bin/rm -f *.a *.bak *.err $(OBJ) (cd EXE; make clean ) (cd EXAMPLES ; make clean ) @echo "All object files, the simpleskts library, and executables are now gone" install : dmucs-0.6.1/COSMIC/Makefile.am.first_try0000644000175000017500000000062610360753041016013 0ustar samsamlib_LTLIBRARIES = libsimpleskts.la libsimpleskts_la_SOURCES = Saccept.c Sclose.c Sgets.c Sinit.c Smaskwait.c Smkskt.c Sopen.c Sopenv.c Speek.c Speeraddr.c Speername.c Sprintf.c Sprtskt.c Sputs.c Sread.c Sreadbytes.c Srmsrvr.c Sscanf.c Stest.c Stimeoutwait.c Svprintf.c Swait.c Swrite.c cprt.c error.c fopenv.c outofmem.c rdcolor.c sprt.c srmtrblk.c stpblk.c stpnxt.c strnxtfmt.c dmucs-0.6.1/COSMIC/Makelib.0000644000175000017500000000043210360753041013273 0ustar samsamsmplskts.lib y +error +sprt +sscanf +swait & +fopenv +smaskwai +sprtskt +stest +swrite & +outofmem +smkskt +sputs +stimeout & +rdcolor +sopen +sread +stpblk & +saccept +sopenv +sreadbyt +stpnxt & +sclose +speek +srmsrvr +strnxtfm & +sgets +sprintf +srmtrblk +svprintf smplskts.lst dmucs-0.6.1/COSMIC/Makeskt.bat0000644000175000017500000000042610360753041014020 0ustar samsamcl -c *.c /AS lib @makelib cd exe cl -c /AS -I\c600\socket *.c cd .. link exe\sktdbg ,,,smplskts+socket+slibce+winapp,/noi /noe link exe\spmtable,,,smplskts+socket+slibce+winapp,/noi /noe link exe\srmsrvr ,,,smplskts+socket+slibce+winapp,/noi /noe mv *.exe c:\c600\socket\exe dmucs-0.6.1/COSMIC/Makeskt.com0000644000175000017500000000355510360753041014036 0ustar samsam$! makeskt.com: this is the command script for VMS machines $! $! Simple Sockets Library Authors: Dr. Charles E. Campbell, Jr. $! Terry McRoberts $! $! This com script assumes that you have already placed all of the $! files in the target directory with subdirectories $! EXE.DIR HDR.DIR EXAMPLES.DIR $! $ define lnk$library sys$library:vaxcrtl $ dr:='F$DIRECTORY() $ assign 'dr' sockets: $ set def [.HDR] $ dr:='F$DIRECTORY() $ assign 'dr' C$INCLUDE $ set def [-] $! $! *** Library Generation *** $! $ write sys$output "Begin Simple Sockets Library compilation" $ cc Saccept.c $ cc Sclose.c $ cc Sgets.c $ cc Sinit.c $ cc Smaskwait.c $ cc Smkskt.c $ cc Sopen.c $ cc Sopenv.c $ cc Speek.c $ cc Speername.c $ cc Sprintf.c $ cc Sprtskt.c $ cc Sputs.c $ cc Sread.c $ cc Sreadbytes.c $ cc Srmsrvr.c $ cc Sscanf.c $ cc Stest.c $ cc Stimeoutwait.c $ cc Svprintf.c $ cc Swait.c $ cc Swrite.c $ cc error.c $ cc fopenv.c $ cc outofmem.c $ cc rdcolor.c $ cc sprt.c $ cc srmtrblk.c $ cc stpblk.c $ cc stpnxt.c $ cc strnxtfmt.c $! $ write sys$output "Creating Simple Sockets Library now" $ lib/create simpleskts *.obj $ delete *.obj;* $ set def [.EXE] $! $! *** Executable Generation *** $! $ write sys$output "Compiling sktdbg" $ cc sktdbg.c $ write sys$output "Linking sktdbg" $ link sktdbg,sockets:simpleskts/lib,sys$library:ucx$ipc/lib $! $ write sys$output "Compiling spm" $ cc spm.c $ write sys$output "Linking spm" $ link spm,sockets:simpleskts/lib,sys$library:ucx$ipc/lib $! $ write sys$output "Compiling spmtable" $ cc spmtable.c $ write sys$output "Linking spmtable" $ link spmtable,sockets:simpleskts/lib,sys$library:ucx$ipc/lib $! $ write sys$output "Compiling srmsrvr" $ cc srmsrvr.c $ write sys$output "Linking srmsrvr" $ link srmsrvr,sockets:simpleskts/lib,sys$library:ucx$ipc/lib $ set def [-] $ write sys$output "The Simple Sockets Library is now Available" dmucs-0.6.1/COSMIC/Mkwin95.bat0000644000175000017500000000247610360753041013673 0ustar samsam@echo off echo Windows 95 Batch file: makes the Simple Sockets Library from a echo MSDOS console echo Batch file for Borland C++ v5.0 or better echo echo Authors: Charles E. Campbell, Jr. echo Terry McRoberts echo --------------------------------------------------------------- echo rem This batch file already assumes that the files have been gunzip'ped and rem untar'red. It creates a smplskts.lib; you will also want to have rem its header files in your -I list when compiling. rem Compile the Simple Sockets Library echo Compiling Simple Sockets Library for %%f in (*.c) do bcc32 -c -vi- -w-aus -w-csu -w-pia -I. -w-vnu -I.\HDR %%f rem Build smplskts.lib Library echo Building smplskts.lib for %%f in (*.obj) do tlib /C smplskts +%%f rem Compile and link SSL utilities and PortMaster (Spm) echo Compiling and linking SSL utilities cd EXE for %%f in (*.c) do bcc32 -Ot -vi- -w-aus -w-csu -w-pia -I..\HDR %%f ..\smplskts.lib mv *.exe .. cd .. rem Cleanup del *.bak del *.obj del EXE\*.obj rem Final Note echo echo --------------------------------------------------------------- echo echo Utilities and the PortMaster (Spm) are in COSMIC\*.exe echo The Simple Sockets library is in COSMIC\smplskts.lib echo Try out the examples, too! echo echo Best of luck, echo Charles E. Campbell dmucs-0.6.1/COSMIC/Saccept.c0000644000175000017500000000445210406551163013464 0ustar samsam/* Saccept.c: this file contains the Socket accept support * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Saccept.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include #include "sockets.h" /* ------------------------------------------------------------------------- */ /* Saccept: this routine uses a server Socket to accept connections * The accept() function clones a socket for use with a client connect. * One may close the Saccept generated socket without affecting the * server socket. */ #ifdef __PROTOTYPE__ Socket *Saccept(Socket *skt) #else Socket *Saccept(skt) Socket *skt; #endif { #if defined(_AIX) size_t addrlen; #elif defined(__gnu_linux__) socklen_t addrlen; #else int addrlen; #endif #ifndef SSLNOSETSOCKOPT int status=1; #endif struct sockaddr addr; Socket *acceptskt= NULL; /* sanity check */ if(!skt) { return acceptskt; } /* allocate a Socket */ acceptskt= makeSocket(skt->hostname,skt->sktname,PM_ACCEPT); if(!acceptskt) { return acceptskt; } /* accept a connection */ addrlen = sizeof (addr); acceptskt->skt= accept(skt->skt, &addr, &addrlen); if (acceptskt->skt < 0) { /* failure to accept */ freeSocket(acceptskt); return (Socket *) NULL; } /* turn off TCP's buffering algorithm so small packets don't get delayed */ #ifndef SSLNOSETSOCKOPT if(setsockopt(skt->skt,IPPROTO_TCP,TCP_NODELAY,(char *) &status,sizeof(status)) < 0) { } #endif /* #ifndef SSLNOSETSOCKOPT ... */ return acceptskt; } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Sclose.c0000644000175000017500000000526210360753041013330 0ustar samsam/* Sclose.c: this file contains Socket library support * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Sclose.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include "sockets.h" #ifdef unix # include #endif /* ------------------------------------------------------------------------- * Local Definitions */ #define TIMEOUT 20L /* ------------------------------------------------------------------------- */ /* Sclose: this function closes a socket. Closing a socket is easy, but * the PortMaster also needs to be informed */ #ifdef __PROTOTYPE__ void Sclose(Socket *skt) #else void Sclose(skt) Socket *skt; #endif { int trycnt; Socket *pmskt = NULL; SKTEVENT mesg; SKTEVENT port; if(!skt) { /* return immediately */ return; } /* --- PortMaster Interface --- */ if(skt->type == PM_SERVER && skt->sktname && skt->sktname[0]) { /* Servers Only */ pmskt = Sopen_clientport(skt->hostname,"SktClose",PORTMASTER); if(!pmskt) { } trycnt= 0; do { mesg= htons(PM_CLOSE); Swrite(pmskt,(char *) &mesg,sizeof(mesg)); if(Stimeoutwait(pmskt,TIMEOUT,0L) < 0) goto ShutDown; if(Sreadbytes(pmskt,(char *) &mesg,sizeof(mesg)) <= 0) { shutdown(skt->skt,2); close(skt->skt); return; } mesg= ntohs(mesg); /* only allow PM_MAXTRY attempts to communicate with the PortMaster */ if(++trycnt >= PM_MAXTRY) { shutdown(pmskt->skt,2); close(pmskt->skt); shutdown(skt->skt,2); close(skt->skt); return; } } while(mesg != PM_OK); port= htons(skt->port); Swrite(pmskt,(char *) &port,sizeof(port)); /* read PortMaster's response (should be PM_OK) */ if(Stimeoutwait(pmskt,TIMEOUT,0L) < 0) goto ShutDown; Sreadbytes(pmskt,(char *) &mesg,sizeof(mesg)); mesg= ntohs(mesg); shutdown(pmskt->skt,2); close(pmskt->skt); } /* end of PortMaster Interface */ else { /* Handle non-server sockets (clients, accepts) */ mesg= PM_OK; } /* --- Close the Socket --- */ ShutDown: shutdown(skt->skt,2); close(skt->skt); freeSocket(skt); } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Sgets.c0000644000175000017500000000761610406551163013174 0ustar samsam/* Sgets.c * Syntax : Sgets(buf,maxbuf,skt) * Returns: buf if it worked, a NULL pointer otherwise * * buf[maxbuf] * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Sgets.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include "sockets.h" /* --------------------------------------------------------------------------- * Local Definitions: */ /* --------------------------------------------------------------------------- * Function Declarations: */ /* --------------------------------------------------------------------------- * Source Code: */ /* Sgets: * Gets a null-byte terminated string from the specified Socket. * Note that the maxbuf *must be* >= 2 (one byte needed for the * null byte termination, and one byte for a minimal amount of data). * This function blocks and will fill the buffer "buf" with up * to maxbuf characters. The output from this function will * be null byte terminated when successful, even on a full buffer condition. * * Returns: buf : on success * null ptr: on failure */ #ifdef __PROTOTYPE__ char *Sgets( char *buf, /* holds null-byte terminated string from Socket */ int maxbuf, /* maximum size of string allowed in buf */ Socket *skt) /* Socket from which data is to be read */ #else char *Sgets(buf, maxbuf, skt) char *buf; int maxbuf; Socket *skt; #endif { int buflen; int mesglen; char *b = NULL; #ifndef SSLNOPEEK char *nb = NULL; #endif /* error or whatever, until the buffer actually gets something its empty */ buf[0] = '\0'; /* sanity check */ if (!skt) { return (char *) NULL; } #ifdef SSLNOPEEK /* stupid, so it receives one byte at a time */ for (b = buf, buflen = maxbuf-1; buflen; --buflen, ++b) { if (recv(skt->skt, b, (unsigned) 1, 0) <= 0) { return (char *) NULL; } if (*b == '\0') break; } #else /* receive bytes until a nullbyte is received */ buflen = maxbuf - 2; /* leave space for trailing null byte */ buf[buflen + 1] = '\0'; /* so strchr will find a null byte somewhere */ for (b = buf, mesglen = 0; buflen > 0; b += mesglen, buflen -= mesglen) { /* block until something shows up on the Socket */ if (!Swait(skt)) { /* null == error - should be at least 1 null byte */ return (char *) NULL; } /* peek at contents of socket queue */ mesglen = recv(skt->skt, b, buflen, MSG_PEEK); if (mesglen <= 0) { /* socket error - bad receive */ return (char *) NULL; } else if (mesglen > 0) { /* check if null byte received yet */ nb = strchr(b, '\0'); /* find null byte in buffer */ if (nb < b + mesglen) { /* null byte inside peeked-at message */ mesglen = nb - b + 1; /* read up to and including null byte */ if (Sreadbytes(skt, b, mesglen) <= 0) { return buf; } break; } else if (mesglen >= buflen) { /* whoops - full buffer */ if (Sreadbytes(skt, b, buflen) <= 0) { return buf; } b[buflen] = '\0'; /* end-of-buffer termination */ break; } else { if (Sreadbytes(skt, b, mesglen) <= 0) { /* partial read */ return buf; } } } } #endif /* #ifdef SSLNOPEEK ... #else ... #endif */ /* return message */ return buf; } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Sinit.c0000644000175000017500000000412210360753041013160 0ustar samsam/* Sinit.c: this file contains interfaces to initialize and cleanup. * Most o/s's don't need this, but some (WIN32, MSDOS) do. * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Sinit.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include "sockets.h" #if defined(MSDOS) || defined(__WIN32__) || defined(_MSC_VER) static int ssl_init= 0; #endif /* --------------------------------------------------------------------- */ /* Sinit: initializes Sockets */ void Sinit() { #ifdef MSDOS //<<-- Old version (changed back) /* initialize WIN/API DOS Socket library */ if(ssl_init == 0) { ssl_init= 1; if(socket_init()) error(XTDIO_ERROR,"socket_init() returned -1, cannot start\n"); } #endif #if defined(__WIN32__) || defined(_MSC_VER) //<<-- Old version (changed back) if(ssl_init == 0) { static WORD wVersionRequested; static WSADATA wsaData; int err; ssl_init= 1; wVersionRequested= MAKEWORD(1,1); err= WSAStartup(wVersionRequested,&wsaData); if(err) error(XTDIO_ERROR,"unable to use sockets, needs version 2.0 or better\n"); if(LOBYTE(wsaData.wVersion) != 1 || HIBYTE(wsaData.wVersion) != 1) { int hiver; int lover; hiver= LOBYTE(wsaData.wVersion); lover= HIBYTE(wsaData.wVersion); WSACleanup(); error(XTDIO_ERROR,"wrong sockets version (wants 1.1, has %d.%d)\n", hiver,lover); } atexit((void (*)(void)) WSACleanup); } #endif } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Smaskwait.c0000644000175000017500000002002210406551163014034 0ustar samsam/* Smaskwait.c: this file contains code which allows one to wait until data * is present given a mask * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Smaskwait.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include "xtdio.h" #define SSLNEEDTIME #include "sockets.h" /* --------------------------------------------------------------------- * Local Variables: */ static int waitall = 0; static fd_set mask; /* mask last-used by Smaskwait, etc */ static struct timeval *timeptr = NULL; static struct timeval timewait; static fd_set rmask; /* set by Smaskwait */ static int first = 1; /* --------------------------------------------------------------------- * Local Prototypes: */ /* --------------------------------------------------------------------- * Source Code: */ /* Smaskwait: this function waits until some Socket specified to the * Smaskset() function receives something. * * Returns: < 0: error * ==0: timeout * > 0: communication data awaiting * * NOTE: THE MASK IS NOT RESET TO ZERO - THE MASK IS RETAINED!!! */ #ifdef __PROTOTYPE__ int Smaskwait() #else int Smaskwait() #endif { fd_set wmask; /* write mask */ fd_set emask; /* error mask */ short result; FD_ZERO(&wmask); FD_ZERO(&emask); /* test if something is available for reading on the socket. This form * will block (sleep) until something arrives */ rmask = mask; result = select(waitall, &rmask,&wmask,&emask,timeptr); if(result < 0) { /* error */ return result; } /* result > 0: socket has something waiting * result == 0: timeout */ return result; } /* --------------------------------------------------------------------- */ /* Smaskset: this function sets up the mask * A null skt clears the mask */ #ifdef __PROTOTYPE__ void Smaskset(Socket *skt) #else void Smaskset(skt) Socket *skt; #endif { if(first) { FD_ZERO(&mask); first= 0; } if(skt) { FD_SET(skt->skt,&mask); if(skt->skt >= waitall) waitall= skt->skt + 1; } else { waitall= 0; FD_ZERO(&mask); } } /* --------------------------------------------------------------------- */ /* Smaskfdset: this function sets up the mask with a "file descriptor" * which may be associated with devices other than Sockets */ #ifdef __PROTOTYPE__ void Smaskfdset(int fd) #else void Smaskfdset(fd) int fd; #endif { if(first) { FD_ZERO(&mask); first= 0; } if(0 <= fd && fd < FD_SETSIZE) { /* fd must be a legal file descriptor */ FD_SET(fd,&mask); if(fd >= waitall) waitall= fd + 1; } } /* --------------------------------------------------------------------- */ /* Smasktime: this function sets up a timeval structure - specifies a * time limit for waiting. Note: if seconds < 0 or useconds < 0, * or seconds == useconds == 0, then there will be no timeout waiting. */ #ifdef __PROTOTYPE__ void Smasktime(long seconds,long useconds) #else void Smasktime(seconds,useconds) long seconds; /* time in seconds */ long useconds; /* time in micro-seconds */ #endif { if(seconds < 0 || useconds < 0 || (seconds == 0 && useconds == 0)) { /* no timeout (ie. infinite wait) */ timewait.tv_sec = 0L; timewait.tv_usec= 0L; timeptr = (struct timeval *) NULL; } else { /* set up specified timeout */ timewait.tv_sec = seconds; timewait.tv_usec= useconds; timeptr = &timewait; } } /* --------------------------------------------------------------------- */ /* Smasktest: this function allows one to test if any Socket in the * mask has something on it * Returns: < 0: error * ==0: timeout * > 0: communication data awaiting */ int Smasktest() { int ret; struct timeval timewait_hold; struct timeval *timeptr_hold=NULL; /* save current time info */ timewait_hold = timewait; timeptr_hold = timeptr; /* set up for new time info */ timewait.tv_sec = 0L; timewait.tv_usec= 0L; timeptr = &timewait; ret= Smaskwait(); /* restore time info */ timewait= timewait_hold; timeptr = timeptr_hold; return ret; } /* --------------------------------------------------------------------- */ /* Smaskunset: this function sets up the mask * A null skt clears the mask */ #ifdef __PROTOTYPE__ void Smaskunset(Socket *skt) #else void Smaskunset(skt) Socket *skt; #endif { if(skt) { FD_CLR(skt->skt,&mask); } else { waitall= 0; FD_ZERO(&mask); } } /* --------------------------------------------------------------------- */ /* Smaskunfdset: this function sets up the mask * A null skt clears the mask */ #ifdef __PROTOTYPE__ void Smaskunfdset(int fd) #else void Smaskunfdset(fd) int fd; #endif { if(fd) FD_CLR(fd,&mask); else { waitall= 0; FD_ZERO(&mask); } } /* --------------------------------------------------------------------- */ /* Smaskget: this function returns the current mask */ #ifdef __PROTOTYPE__ Smask Smaskget() #else Smask Smaskget() #endif { Smask smask; smask.mask = mask; smask.waitall= waitall; return smask; } /* --------------------------------------------------------------------- */ /* Smaskuse: this function sets up the mask with the provided mask */ #ifdef __PROTOTYPE__ void Smaskuse(Smask usermask) #else void Smaskuse(usermask) Smask usermask; #endif { mask = usermask.mask; waitall= usermask.waitall; } /* --------------------------------------------------------------------- */ typedef struct MaskStack_str MaskStack; struct MaskStack_str { Smask mask; MaskStack *nxt,*prv; }; static MaskStack *mshd=NULL,*mstl=NULL; /* Smaskpush: this function pushes the current mask down on a stack * ALSO: the current mask is *cleared*!!! */ void Smaskpush() { MaskStack *m; /* allocate */ m= (MaskStack *) malloc(sizeof(MaskStack)); /* link */ if(mstl) mstl->nxt= m; else mshd = m; m->prv= mstl; mstl = m; /* initialize */ mstl->mask.mask = mask; mstl->mask.waitall= waitall; Smaskset((Socket *) NULL); } /* --------------------------------------------------------------------- */ /* Smaskpop: this function pops the stack (or, if the stack is empty, * it will set the current mask to null) */ void Smaskpop() { if(mstl) { MaskStack *old=mstl; Smaskuse(mstl->mask); /* delink current tail */ if(mstl->prv) mstl->prv->nxt= NULL; else mshd = NULL; mstl= mstl->prv; free((char *) old); } else Smaskset((Socket *) NULL); } /* --------------------------------------------------------------------- */ /* Smaskisset: this function tests if a specific Socket is read-ready. * Assumption: function is called after a Smaskwait() so that the * rmask has been set up. */ #ifdef __PROTOTYPE__ int Smaskisset(Socket *skt) #else int Smaskisset(skt) Socket *skt; #endif { return FD_ISSET(skt->skt,&rmask); } /* --------------------------------------------------------------------- */ /* Smaskfdisset: this function tests if a specific file descriptor is * read-ready */ #ifdef __PROTOTYPE__ int Smaskfdisset(int fd) #else int Smaskfdisset(fd) int fd; #endif { return FD_ISSET(fd,&rmask); } /* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Smkskt.c0000644000175000017500000000460410360753041013353 0ustar samsam/* Smkskt.c: this function makes a Socket * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Smkskt.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include "sockets.h" /* --------------------------------------------------------------------- */ /* makeSocket: this function allocates a Socket */ #ifdef __PROTOTYPE__ Socket *makeSocket( char *hostname, char *sktname, int sktType) #else Socket *makeSocket(hostname, sktname, sktType) char *hostname; char *sktname; int sktType; #endif { Socket *skt= NULL; /* allocate a Socket */ skt= (Socket *) malloc(sizeof(Socket)); outofmem((void *) skt, "makeSocket: while allocating a Socket for <%s:%s>\n", hostname,sktname); /* initialize Socket */ skt->hostname= (char *) calloc((size_t) strlen(hostname)+1,sizeof(char)); outofmem((void *) skt->hostname, "makeSocket: while allocating string for <%s>\n",hostname); strcpy(skt->hostname,hostname); if(!sktname) sktname= ""; skt->sktname= (char *) calloc((size_t) strlen(sktname)+1,sizeof(char)); outofmem((void *) skt->sktname,"makeSocket: while allocating string for <%s>\n",sktname); strcpy(skt->sktname,sktname); /* set port and skt to zero */ skt->port= skt->skt= 0; skt->type= sktType; /* return Socket */ return skt; } /* ------------------------------------------------------------------------ */ /* freeSocket: this function frees up a Socket */ #ifdef __PROTOTYPE__ void freeSocket(Socket *skt) #else void freeSocket(skt) Socket *skt; #endif { if(skt) { if(skt->hostname) free(skt->hostname); if(skt->sktname) free(skt->sktname); skt->skt = 0; skt->port = 0; skt->type = 0; skt->hostname = NULL; skt->sktname = NULL; free((char *) skt); } } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Sopen.c0000644000175000017500000004247310457726302013200 0ustar samsam/* Sopen.c: these functions are responsible for opening Sockets * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Sopen.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 * * Routines Include: * Socket *Sopen( char *skthost, char *mode) * Socket *Sopen_clientport( char *hostname, char *sktname, u_short port) * static Socket *Sopen_server(char *sktname) * static Socket *Sopen_client( char *hostname, char *sktname, int blocking) */ #include #include #include #include "sockets.h" /* ---------------------------------------------------------------------- * Local Definitions: */ #define BUFSIZE 128 #define TIMEOUT 20L #define DFLT_PORT 0 /* --------------------------------------------------------------------- * Local Data: */ static unsigned long sslport= DFLT_PORT; /* ---------------------------------------------------------------------- * Local Prototypes: */ #ifdef __PROTOTYPE__ static Socket *Sopen_server(char *); /* Sopen.c */ static Socket *Sopen_client( char *, char *, int); /* Sopen.c */ #else static Socket *Sopen_server(); /* Sopen.c */ static Socket *Sopen_client(); /* Sopen.c */ #endif /* ---------------------------------------------------------------------- */ /* Sopen: * prochost: SocketName@Hostname * mode : selects type of socket desired * s=server - one must use Saccept(skt) to receive connects * S=server - like s, but will Srmsrvr() if first attempt fails * c=client - open a client to the specified server (nonblocking) * b=client - open a client, but block until server opens */ #ifdef __PROTOTYPE__ Socket *Sopen( char *skthost, char *mode) #else Socket *Sopen( skthost, mode) char *skthost; char *mode; #endif { char *at = NULL; char *hostname = NULL; int blocking = 0; Socket *ret = NULL; static char localhost[BUFSIZE] = ""; static char sktname[BUFSIZE]; static int first=1; /* do any o/s-orientated initialization that is required */ if(first) { first= 0; Sinit(); } /* by default, sslport is always DFLT_PORT *unless* overridden in the mode */ sslport= DFLT_PORT; if(isdigit(mode[1])) { sscanf(mode+1,"%lu",&sslport); } else if(skthost[0] == '$') { /* 2.10e mod: a server named "$####" will use port #### */ char *s; /* $####... will also be accepted as a sslport */ for(s= skthost + 1; *s && isdigit(*s); ++s) ; if(!*s || *s == '@') { sscanf(skthost+1,"%lu",&sslport); } } /* call mode-selected server/client socket opening routine */ switch(*mode) { case 's': /* server */ case 'S': /* use Srmsrvr when Sopen_server itself fails */ #ifdef SSLNEEDTOSHAREPM /* SSLNEEDTOSHAREPM: this machine needs to share another's PortMaster; * ie. the o/s doesn't support multiple tasks, so a PortMaster cannot * run on this machine concurrently with a user process. A typical * example of such an "o/s" is pure MSDOS. */ if(!getenv("PMSHARE")) { error(XTDIO_WARNING,"this machine must share a PortMaster (set PMSHARE, please)\n"); ret= NULL; return ret; } #endif /* sanity check -- must have a server name or a specified port number */ if((!skthost || !skthost[0]) && sslport == DFLT_PORT) { error(XTDIO_WARNING,"with no server name one must specify the port number\n"); ret= NULL; return ret; } ret= Sopen_server(skthost); if(!ret && *mode == 'S') { Srmsrvr(skthost); ret= Sopen_server(skthost); } sslport= DFLT_PORT; /* paranoia time -- insure that sslport will default to DFLT_PORT */ return ret; case 'b': /* client, block until server becomes available */ blocking= 1; /* deliberate fall through */ case 'c': /* client */ /* parse sktname into sktname and hostname strings */ at = (skthost) ? strchr(skthost, '@') : NULL; if (!at) { /* fill in missing hostname with current host */ if(!localhost[0]) { /* get local host name */ gethostname(localhost,BUFSIZE); } hostname= localhost; strcpy(sktname,skthost? skthost : ""); } else { /* use hostname specified in skthost */ strcpy(sktname,skthost); sktname[(int) (at - skthost)]= '\0'; hostname = sktname + ((int) (at - skthost)) + 1; } /* sanity check -- must have a server name or a specified port number */ if((!skthost || !skthost[0]) && sslport == DFLT_PORT) { error(XTDIO_WARNING,"with no server name one must specify the port number\n"); ret= NULL; return ret; } /* note: Sopen_client will free up hostname/sktname memory if unsuccessful * open occurs */ ret = Sopen_client(hostname,sktname,blocking); sslport= DFLT_PORT; /* paranoia time -- insure that sslport will default to DFLT_PORT */ return ret; default: sslport= DFLT_PORT; /* paranoia time -- insure that sslport will default to DFLT_PORT */ return (Socket *) NULL; } } /* ---------------------------------------------------------------------- */ /* Sopen_server: this function opens a socket handle for the SSL socket * function library */ #ifdef __PROTOTYPE__ static Socket *Sopen_server(char *sktname) #else static Socket *Sopen_server(sktname) char *sktname; #endif { char *at = NULL; char *pmshare= NULL; #if defined(_AIX) size_t length; #elif defined(__gnu_linux__) socklen_t length; #else int length; #endif int resend = 0; int status = 1; Socket *skt = NULL; Socket *pmskt = NULL; SKTEVENT mesg; SKTEVENT port; struct sockaddr_in sin; /* InterNet socket address structure */ static char hostname[BUFSIZE]; /* check for no "@" in hostname */ at= sktname? strchr(sktname,'@') : NULL; if(at) *at= '\0'; /* determine if this Sopen is to share a PortMaster, and if so, what * host it resides at */ pmshare= getenv("PMSHARE"); /* make a Socket */ if(gethostname(hostname,BUFSIZE) < 0) { return (Socket *) NULL; } skt= makeSocket(pmshare? pmshare : hostname,sktname? sktname : "",PM_SERVER); if(!skt) { return (Socket *) NULL; } /* create a socket */ if((skt->skt= socket(AF_INET, SOCK_STREAM, 0)) < 0 ) { freeSocket(skt); return (Socket *) NULL; } #ifndef SSLNOSETSOCKOPT if(sslport) { /* allow fixed-port servers to be brought back up quickly */ status= 1; if(setsockopt(skt->skt,SOL_SOCKET,SO_REUSEADDR,(char *) &status,sizeof(status)) < 0) { } } #endif /* SSLNOSETSOCKOPT */ /* initialize socket data structure * get port specified by sslport, defaults to any * memset: added by Steve Richards for AS/400 */ memset(&sin,0x00,sizeof(struct sockaddr_in)); sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl(INADDR_ANY); sin.sin_port = htons((u_short) sslport); /* bind socket data structure to this socket */ if(bind(skt->skt,(struct sockaddr *) &sin,sizeof(sin))) { freeSocket(skt); return (Socket *) NULL; } /* getsockname fills in the socket structure with information, * such as the port number assigned to this socket */ length = sizeof(sin); if(getsockname(skt->skt,(struct sockaddr *) &sin,&length)) { freeSocket(skt); return (Socket *) NULL; } skt->port= ntohs(sin.sin_port); /* --- PortMaster Interface --- */ if(sktname && sktname[0]) { /* skip if null or empty sktname specified */ /* Inform PortMaster of socket */ pmskt= Sopen_clientport(pmshare? pmshare : hostname,"PMClient",PORTMASTER); if(!pmskt) { shutdown(skt->skt,2); close(skt->skt); freeSocket(skt); return (Socket *) NULL; } /* keep trying until PortMaster sends PM_OK */ do { /* write a PM_SERVER request to the host's PortMaster */ if(pmshare) { mesg= htons(PM_SHARE); } else { mesg= htons(PM_SERVER); } Swrite(pmskt,(char *) &mesg,sizeof(mesg)); /* insure that the PortMaster is talking for up to TIMEOUT seconds */ if(Stimeoutwait(pmskt,TIMEOUT,0L) < 0) { shutdown(pmskt->skt,2); close(pmskt->skt); freeSocket(pmskt); shutdown(skt->skt,2); close(skt->skt); freeSocket(skt); return (Socket *) NULL; } /* ok, read PortMaster's response */ if(Sreadbytes(pmskt,(char *) &mesg,sizeof(mesg)) <= 0) { perror(""); shutdown(skt->skt,2); close(skt->skt); freeSocket(skt); return (Socket *) NULL; } mesg= ntohs(mesg); /* convert to host form */ /* only try to open a PM_SERVER protocol PM_MAXTRY times -or- * if PortMaster says "PM_SORRY" (probably due to firewall violation) */ if(++resend >= PM_MAXTRY || mesg == PM_SORRY) { shutdown(pmskt->skt,2); close(pmskt->skt); freeSocket(pmskt); shutdown(skt->skt,2); #ifdef SSLSKTZERO close(skt->skt); skt->skt= 0; #else close(skt->skt); skt->skt= (int) NULL; #endif freeSocket(skt); return (Socket *) NULL; } } while(mesg != PM_OK); if(pmshare) { /* send PortMaster the hostname for shared PortMaster mode */ Sputs(hostname,pmskt); } /* send PortMaster the sktname and port id */ Sputs(sktname,pmskt); port= sin.sin_port; /* network form of port already */ Swrite(pmskt,(char *) &port,sizeof(port)); /* find out if PortMaster received ok */ if(Stimeoutwait(pmskt,TIMEOUT,0L) < 0) { shutdown(pmskt->skt,2); close(pmskt->skt); freeSocket(pmskt); shutdown(skt->skt,2); close(skt->skt); freeSocket(skt); return (Socket *) NULL; } Sreadbytes(pmskt,(char *) &mesg,sizeof(mesg)); mesg= ntohs(mesg); if(mesg != PM_OK) { shutdown(pmskt->skt,2); close(pmskt->skt); freeSocket(pmskt); shutdown(skt->skt,2); close(skt->skt); freeSocket(skt); return (Socket *) NULL; } } /* --- Return to Server Initialization --- */ /* prepare socket queue for (up to) PM_MAXREQUESTS connection * requests */ listen(skt->skt,PM_MAXREQUESTS); #ifndef SSLNOSETSOCKOPT /* turn off TCP's buffering algorithm so small packets don't get * needlessly delayed */ if(setsockopt(skt->skt,IPPROTO_TCP,TCP_NODELAY,(char *) &status,sizeof(status)) < 0) { } #endif /* SSLNOSETSOCKOPT */ /* let PortMaster know that the new server is up and running * by sending it a final PM_OK. * Then, close down the socket to the PortMaster. */ if(sktname && sktname[0]) { /* skip if null or empty sktname specified */ mesg= htons(PM_OK); Swrite(pmskt,(char *) &mesg,sizeof(mesg)); shutdown(pmskt->skt,2); close(pmskt->skt); #ifdef SSLSKTZERO pmskt->skt= 0; #else pmskt->skt= (int) NULL; #endif } /* return server socket */ return skt; } /* ---------------------------------------------------------------------- */ /* Sopen_client: */ #ifdef __PROTOTYPE__ static Socket *Sopen_client( char *hostname, char *sktname, int blocking) #else static Socket *Sopen_client( hostname, sktname, blocking) char *hostname; char *sktname; int blocking; #endif { char *pmshare = NULL; /* PortMaster hostname */ char skthost[BUFSIZE]; /* client's hostname */ int resend = 0; Socket *skt = NULL; SKTEVENT port; SKTEVENT mesg; skthost[0]= '\0'; /* --- PortMaster Interface --- */ if(sslport == (unsigned long) DFLT_PORT) { /* determine if this Sopen is to share a PortMaster, and if so, what * host it resides at */ pmshare= getenv("PMSHARE"); /* open a socket to the target host's PortMaster */ skt= Sopen_clientport(hostname,sktname,PORTMASTER); if(!skt && pmshare) skt= Sopen_clientport(pmshare,sktname,PORTMASTER); if(!skt) { return (Socket *) NULL; } /* go through PortMaster client protocol to get port */ do { mesg= htons(blocking? PM_CLIENTWAIT : PM_CLIENT); Swrite(skt,(char *) &mesg,sizeof(mesg)); /* get PM_OK or PM_RESEND from PortMaster */ if(Stimeoutwait(skt,TIMEOUT,0L) < 0) { shutdown(skt->skt,2); close(skt->skt); freeSocket(skt); return (Socket *) NULL; } Sreadbytes(skt,(char *) &mesg,sizeof(mesg)); mesg= ntohs(mesg); /* too many retries or PM_SORRY * (latter usually due to firewall violation) */ if(++resend >= PM_MAXTRY || mesg == PM_SORRY) { shutdown(skt->skt,2); close(skt->skt); freeSocket(skt); return (Socket *) NULL; } } while(mesg != PM_OK); /* send sktname of desired port */ Sputs(sktname,skt); /* get response (PM_OK, PM_OKSHARE, or PM_SORRY) */ if((blocking && Swait(skt) < 0) || Stimeoutwait(skt,TIMEOUT,0L) < 0) { shutdown(skt->skt,2); close(skt->skt); freeSocket(skt); return (Socket *) NULL; } Sreadbytes(skt,(char *) &mesg,sizeof(mesg)); mesg= ntohs(mesg); if(mesg == PM_OKSHARE) { if(Stimeoutwait(skt,TIMEOUT,0L) < 0) { shutdown(skt->skt,2); close(skt->skt); freeSocket(skt); return (Socket *) NULL; } Sgets(skthost,BUFSIZE,skt); } else if(mesg != PM_OK) { shutdown(skt->skt,2); close(skt->skt); freeSocket(skt); return (Socket *) NULL; } else skthost[0]= '\0'; /* get response (server's port #) * If blocking, will wait until the PortMaster sends the information. * If not blocking, wait up to TIMEOUT seconds (20seconds) */ if(Stimeoutwait(skt,TIMEOUT,0L) < 0) { shutdown(skt->skt,2); close(skt->skt); freeSocket(skt); return (Socket *) NULL; } Sreadbytes(skt,(char *) &mesg,sizeof(mesg)); port= ntohs(mesg); /* close the PortMaster client socket */ shutdown(skt->skt,2); close(skt->skt); freeSocket(skt); } else { port= (SKTEVENT) sslport; } /* --- Return to Client Initialization --- */ /* open a socket to the port returned by the target host's PortMaster */ skt= Sopen_clientport(skthost[0]? skthost : hostname,sktname,port); if(!skt) { return (Socket *) NULL; } return skt; } /* ---------------------------------------------------------------------- */ /* Sopen_clientport: this function opens a client socket given a hostname * and port */ #ifdef __PROTOTYPE__ Socket *Sopen_clientport( char *hostname, char *sktname, u_short port) #else Socket *Sopen_clientport( hostname, sktname, port) char *hostname; char *sktname; u_short port; #endif { Socket *skt = NULL; int status = 1; static char localhost[BUFSIZE]; struct hostent *hostentptr = NULL; struct sockaddr_in sin; /* InterNet socket address structure */ /* if hostname is null, then use current hostname */ if(!hostname || !hostname[0]) { gethostname(localhost,BUFSIZE); hostname= localhost; } /* allocate a Socket */ skt= makeSocket(hostname,sktname,PM_CLIENT); if(!skt) { return (Socket *) NULL; } skt->port= port; /* open socket */ skt->skt= socket(AF_INET,SOCK_STREAM,0); if(skt->skt < 0) { freeSocket(skt); return (Socket *) NULL; } /* initialize socket data structure * memset: added by Steve Richards for AS/400 */ memset(&sin,0x00,sizeof(struct sockaddr_in)); sin.sin_family = AF_INET; hostentptr = gethostbyname(hostname); if(!hostentptr) { freeSocket(skt); return (Socket *) NULL; } /* get host address */ sin.sin_addr = * ((struct in_addr *) hostentptr->h_addr); sin.sin_port = htons((u_short) port); /* send port number to server */ /* connect to remote host */ if(connect(skt->skt,(struct sockaddr *) &sin,sizeof(sin)) < 0){ shutdown(skt->skt,2); close(skt->skt); freeSocket(skt); return (Socket *) NULL; } #ifndef SSLNOSETSOCKOPT /* turn off TCP's buffering algorithm so small packets don't get * needlessly delayed */ if(setsockopt(skt->skt,IPPROTO_TCP,TCP_NODELAY,(char *) &status,sizeof(status)) < 0) { } #endif /* SSLNOSETSOCKOPT */ return skt; } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Sopenv.c0000644000175000017500000000760410360753041013354 0ustar samsam/* Sopenv.c : this function attempts to open a Socket based on an * environment variable containing machine names separated by colons. * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Sopenv.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include #include "xtdio.h" #include "sockets.h" /* ----------------------------------------------------------------------- * Definitions: */ #define MACHINE_SEP ':' #define BUFSIZE 256 /* ----------------------------------------------------------------------- * Source Code: */ /* Sopenv: opens Socket for server/client based on environment variable */ #ifdef __PROTOTYPE__ Socket *Sopenv( char *sktname, /* name of server */ char *ctrl, /* "s", "c" */ char *env_var) /* environment variable to be used */ #else Socket *Sopenv(sktname,ctrl,env_var) char *sktname; /* name of server */ char *ctrl; /* "s", "c" */ char *env_var; /* environment variable to be used */ #endif { char *at = NULL; char *env = NULL; char *s = NULL; int more = 0; Socket *skt = NULL; static char buf[BUFSIZE]; /* see if Socket can be opened on current machine, first */ skt= Sopen(sktname,ctrl); if(skt) { return skt; } /* cannot open server on a different host * ie. using Sopenv to open a server doesn't give any * value added because it doesn't make any sense to * "search" a path of machines to do it. */ else if(!strcmp(ctrl,"s") || !strcmp(ctrl,"S")) { return (Socket *) NULL; } /* look for '@' in string and null it */ at= (char *) strchr(sktname,'@'); if(at) *at= '\0'; /* check out the environment variable */ if(!env_var || !*env_var) env_var= "SKTPATH"; env= getenv(env_var); /* attempt to open connection to Socket server using environment search */ if(env) while(*env) { /* while there's environment-variable info left... */ for(s= env; *s && *s != MACHINE_SEP; ++s); more= *s == MACHINE_SEP; *s = '\0'; sprintf(buf,"%s@%s",sktname,env); /* attempt to open Socket given machine name */ skt= Sopen(buf,ctrl); if(more) *s= MACHINE_SEP; if(skt) { /* successfully opened Socket */ if(at) *at= '@'; return skt; } if(more) { /* another path to search */ *s = MACHINE_SEP; env= s + 1; } else env= s; } /* restore '@' if it was present */ if(at) *at= '@'; /* return NULL pointer, thereby modestly indicating a lack of success */ return (Socket *) NULL; } /* ======================================================================= * Test Code: */ #ifdef DEBUG_TEST #ifdef unix void *sbrk(int); #endif /* main: */ int main(int argc,char **argv) { Socket *skt = NULL; #ifdef unix char *memstart = NULL; char *memory = NULL; #endif rdcolor(); #ifdef unix memstart= NULL; #endif do { skt= Sopenv("SOPENV","c","SKTPATH"); ++cnt; #ifdef unix memory= sbrk(0); if(!memstart) memstart= memory; else if(memory > memstart) error(XTDIO_WARNING,"memory leak: ([memory=%dd] - [memstart=%dd])= %d\n", (int) memory,(int) memstart,memory - memstart); #endif } while(!skt); Sclose(skt); printf("took %d tries to open the SOPENV client\n",cnt); return 0; } #endif /* DEBUG_TEST */ /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Speek.c0000644000175000017500000000543610360753041013152 0ustar samsam/* Speek.c: * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Speek.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #define SSLNEEDTIME #include "sockets.h" /* ------------------------------------------------------------------------- */ /* Speek: this function peeks at the socket and returns a buffer full of * whatever is on it * * Returns: qty of data in buf * 1 (SSLNOPEEK) something on buffer, but cannot peek * 0 if nothing * EOF on bad select (socket error) * or on select == 1 (something there) but recv indicates * that nothing is there */ #ifdef __PROTOTYPE__ int Speek( Socket *skt, /* socket handle */ void *buf, /* socket character buffer */ int buflen) /* max length of buffer */ #else int Speek( skt, /* socket handle */ buf, /* socket character buffer */ buflen) /* max length of buffer */ Socket *skt; void *buf; int buflen; #endif { short result; struct timeval timeout; fd_set rmask; fd_set wmask; fd_set emask; /* insure a properly null-byte terminated buffer if nothing is returned */ ((char *) buf)[0]= '\0'; /* sanity check */ if(!skt) { return 0; } FD_ZERO(&rmask); FD_SET(skt->skt,&rmask); FD_ZERO(&wmask); FD_ZERO(&emask); timeout.tv_sec = 0; timeout.tv_usec= 0; /* select checks if * the file descriptor set (fds) has something ready for reading */ #ifdef SSLNOPEEK result = select(skt->skt+1,rmask.fds_bits,wmask.fds_bits,emask.fds_bits, &timeout); #else result = select(skt->skt+1, &rmask,&wmask,&emask, &timeout); #endif if(result < 0) { return EOF; } if(result == 0) { /* no descriptors ready for reading */ return 0; } #ifdef SSLNOPEEK return 1; #else /* test if message available from socket, return qty bytes avail */ if(FD_ISSET(skt->skt,&rmask)) { buflen= recv(skt->skt,buf,buflen,MSG_PEEK); if(result == 1 && buflen == 0) buflen= EOF; return buflen; } /* socket is empty */ return 0; #endif /* #ifdef SSLNOPEEK ... #else ... #endif */ } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Speeraddr.c0000644000175000017500000000462610360753041014014 0ustar samsam/* Speeraddr.c: this function gets the name of the peer * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Speeraddr.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include "sockets.h" /* --------------------------------------------------------------------- * Definitions: */ #define PEERBUF 65 /* --------------------------------------------------------------------- */ /* Speeraddr: get peer IP address */ #ifdef __PROTOTYPE__ unsigned long Speeraddr(Socket *skt) #else unsigned long Speeraddr(skt) Socket *skt; #endif { unsigned long ret; static struct sockaddr sktname; #if defined(_AIX) static size_t namelen = sizeof(struct sockaddr); #elif defined(__gnu_linux__) static socklen_t namelen = sizeof(struct sockaddr); #else static int namelen = sizeof(struct sockaddr); #endif if(!skt) ret= 0; else if(getpeername(skt->skt,&sktname,&namelen) == -1) { ret= 0; } else { union { unsigned char byte[4]; unsigned long i; } u; u.byte[0] = sktname.sa_data[2]; u.byte[1] = sktname.sa_data[3]; u.byte[2] = sktname.sa_data[4]; u.byte[3] = sktname.sa_data[5]; ret = u.i; } return ret; } /* ===================================================================== */ #ifdef DEBUG_TEST /* main: test routine begins here... */ int main(int argc,char **argv) { Socket *srvr = NULL; Socket *skt = NULL; rdcolor(); /* initialize color names (GREEN, RED, etc.) */ srvr= Sopen("GetPeerTest","S"); if(!srvr) error(XTDIO_ERROR,"unable to open server\n"); skt = Saccept(srvr); printf("client<%s> accepted, peer is %lu\n",Sprtskt(skt),Speeraddr(skt)); Sclose(skt); Sclose(srvr); return 0; } #endif /* DEBUG_TEST */ /* ===================================================================== * vim: ts=4 */ dmucs-0.6.1/COSMIC/Speername.c0000644000175000017500000000551210360753041014015 0ustar samsam/* Speername.c: this function gets the name of the peer * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Speername.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include "sockets.h" /* --------------------------------------------------------------------- * Definitions: */ #define PEERBUF 65 /* --------------------------------------------------------------------- */ /* Speername: get peername (a string) */ #ifdef __PROTOTYPE__ char *Speername(Socket *skt) #else char *Speername(skt) Socket *skt; #endif { static struct sockaddr_in sktname; static char buf1[PEERBUF]; static char buf2[PEERBUF]; static char buf3[PEERBUF]; static char *buf = buf1; #if defined(_AIX) static size_t namelen = sizeof(struct sockaddr); #elif defined(__gnu_linux__) static socklen_t namelen = sizeof(struct sockaddr); #else static int namelen = sizeof(struct sockaddr); #endif if (buf == buf1) buf= buf2; else if(buf == buf2) buf= buf3; else buf= buf1; /* sanity check */ if(!skt) strcpy(buf,"null socket"); /* attempt to get information from peer */ else if(getpeername(skt->skt,(struct sockaddr *) &sktname,&namelen) == -1) { strcpy(buf,"unknown"); } else { struct hostent *host; host= gethostbyaddr((void *) &(sktname.sin_addr.s_addr),sizeof(struct in_addr),AF_INET); if(host && host->h_name) strcpy(buf,host->h_name); else if(!host) strcpy(buf,"unable to get host"); else strcpy(buf,"unknown hostname"); } return buf; } /* ===================================================================== */ #ifdef DEBUG_TEST /* main: test routine begins here... */ int main(int argc,char **argv) { Socket *srvr = NULL; Socket *skt = NULL; rdcolor(); /* initialize color names (GREEN, RED, etc.) */ srvr= Sopen("GetPeerTest","S"); if(!srvr) error(XTDIO_ERROR,"unable to open server\n"); skt = Saccept(srvr); printf("client<%s> accepted, peer is <%s>\n",Sprtskt(skt),Speername(skt)); Sclose(skt); Sclose(srvr); return 0; } #endif /* DEBUG_TEST */ /* ===================================================================== * vim: ts=4 */ dmucs-0.6.1/COSMIC/Sprintf.c0000644000175000017500000000263010360753041013521 0ustar samsam/* Sprintf.c: * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Sprintf.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include "sockets.h" /* Sprintf: */ /*VARARGS*/ #ifdef __PROTOTYPE__ int Sprintf( Socket *skt, char *fmt, ...) #else int Sprintf(skt,va_alist) Socket *skt; va_dcl #endif { va_list args; int ret; static char buf[PM_BIGBUF]; #ifndef __PROTOTYPE__ char *fmt=NULL; #endif /* sanity check */ if(!skt) { return 0; } #ifdef __PROTOTYPE__ va_start(args,fmt); #else va_start(args); fmt = va_arg(args,char *); #endif fflush(stdout); ret= vsprintf(buf,fmt,args); Swrite(skt,buf,strlen(buf)+1); /* send the null byte, too */ va_end(args); return ret; } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Sprtskt.c0000644000175000017500000000335210360753041013550 0ustar samsam/* Sprtskt.c: * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Sprtskt.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include "sockets.h" /* ------------------------------------------------------------------------ * Local Definitions: */ #define BUFSIZE 128 /* ------------------------------------------------------------------------ */ /* Sprtskt: this function prints out a socket description */ #ifdef __PROTOTYPE__ char *Sprtskt(Socket *skt) #else char *Sprtskt(skt) Socket *skt; #endif { static char buf1[BUFSIZE]; static char buf2[BUFSIZE]; static char *b= buf1; if(!skt) return "null socket"; /* toggles between the two static buffers */ if(b == buf1) b= buf2; else b= buf1; sprintf(b,"#%d:p%d:%s:%s@%s", skt->skt, skt->port, (skt->type == PM_SERVER)? "server" : (skt->type == PM_CLIENT)? "client" : (skt->type == PM_ACCEPT)? "accept" : "???", skt->sktname? skt->sktname : "null-sktname", skt->hostname? skt->hostname : "null-host"); return b; } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Sputs.c0000644000175000017500000000231410360753041013211 0ustar samsam/* Sputs.c: this function "puts" a string which Sgets can receive * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Sputs.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include "sockets.h" /* --------------------------------------------------------------------- */ /* Sputs: */ #ifdef __PROTOTYPE__ void Sputs( char *buf, Socket *skt) #else void Sputs( buf, skt) char *buf; Socket *skt; #endif { /* write out buf and the null byte */ Swrite(skt,buf,strlen(buf)+1); } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Sread.c0000644000175000017500000000300210360753041013124 0ustar samsam/* Sread.c: * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Sread.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include "sockets.h" /* Sread: this function performs a read from a Socket */ #ifdef __PROTOTYPE__ int Sread( Socket *skt, /* socket handle */ void *buf, /* socket character buffer */ int buflen) /* max length of buffer */ #else int Sread( skt, /* socket handle */ buf, /* socket character buffer */ buflen) /* max length of buffer */ Socket *skt; void *buf; int buflen; #endif { int cnt; /* sanity check */ if(!skt) { return -1; } /* read bytes from Socket */ cnt = recv(skt->skt,(void *) buf,(unsigned) buflen,0); if(cnt > 0) { /* "cnt" bytes received */ return cnt; } /* error return */ ((char *) buf)[0]= '\0'; return 0; } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Sreadbytes.c0000644000175000017500000000337110360753041014204 0ustar samsam/* Sreadbytes.c: * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Sreadbytes.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include "sockets.h" /* --------------------------------------------------------------------- */ /* Sreadbytes: this function performs a socket read. * Gets buflen bytes, so long as read is working. * Otherwise, (read fails with a -1), the number * of bytes received will be returned. */ #ifdef __PROTOTYPE__ int Sreadbytes( Socket *skt, /* socket handle */ void *buf, /* socket character buffer */ int buflen) /* max length of buffer */ #else int Sreadbytes( skt, /* socket handle */ buf, /* socket character buffer */ buflen) /* max length of buffer */ Socket *skt; void *buf; int buflen; #endif { int cnt; int rcnt; /* sanity check */ if(!skt) { return -1; } /* get buflen bytes, no matter the wait */ for(cnt= 0; cnt < buflen; cnt+= rcnt) { rcnt= recv(skt->skt,(void *) (((char *)buf)+cnt),(unsigned) (buflen-cnt),0); if(rcnt < 0) break; } return cnt; } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Srmsrvr.c0000644000175000017500000000664410457726302013572 0ustar samsam/* Srmsrvr.c: this file contains Socket library support * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Srmsrvr.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include #include "xtdio.h" #include "sockets.h" /* ------------------------------------------------------------------------- * Local Definitions: */ #define BUFSIZE 128 #define TIMEOUT 20L /* ------------------------------------------------------------------------- */ /* Srmsrvr: this function removes a server from the PortMaster's table * It only needs a server name. * * Returns: PM_OK if it worked * PM_SORRY otherwise */ #ifdef __PROTOTYPE__ SKTEVENT Srmsrvr(char *skthost) #else SKTEVENT Srmsrvr(skthost) char *skthost; #endif { char *at = NULL; char *hostname = NULL; int trycnt; Socket *pmskt = NULL; static char localhost[BUFSIZE] = ""; SKTEVENT mesg; /* parse skthost into sktname and hostname strings */ at= strchr(skthost,'@'); if(!at) { /* fill in missing hostname with current host */ char *pmshare= NULL; /* if sharing a PortMaster and no host was specified, use the PMSHARE-specified * host (if PMSHARE exists), otherwise use localhost */ pmshare= getenv("PMSHARE"); if(pmshare) hostname= pmshare; else { if(!localhost[0]) gethostname(localhost,BUFSIZE); hostname= localhost; } pmskt= Sopen_clientport(hostname,"SktRmSrvr",PORTMASTER); } else { /* use hostname specified in skthost */ skthost[(int) (at - skthost)]= '\0'; hostname= skthost + ((int) (at - skthost)) + 1; pmskt = Sopen_clientport(hostname,"SktRmSrvr",PORTMASTER); } /* --- PortMaster Interface --- */ if(!pmskt) { if(at) skthost[(int) (at - skthost)]= '@'; return PM_SORRY; } trycnt= 0; do { mesg= htons(PM_RMSERVER); Swrite(pmskt,(char *) &mesg,sizeof(mesg)); /* don't wait forever... */ if(Stimeoutwait(pmskt,TIMEOUT,0L) < 0) { shutdown(pmskt->skt,2); close(pmskt->skt); freeSocket(pmskt); return PM_SORRY; } /* read PortMaster's response */ if(Sreadbytes(pmskt,(char *) &mesg,sizeof(mesg)) <= 0) { if(at) skthost[(int) (at - skthost)]= '@'; shutdown(pmskt->skt,2); close(pmskt->skt); return PM_SORRY; } mesg= ntohs(mesg); /* only allow PM_MAXTRY attempts to communicate with the PortMaster */ if(++trycnt >= PM_MAXTRY) { if(at) skthost[(int) (at - skthost)]= '@'; shutdown(pmskt->skt,2); close(pmskt->skt); return PM_SORRY; } } while(mesg != PM_OK); Sputs(skthost,pmskt); /* read PortMaster's response (should be PM_OK) */ Sreadbytes(pmskt,(char *) &mesg,sizeof(mesg)); shutdown(pmskt->skt,2); close(pmskt->skt); mesg= ntohs(mesg); /* restore skthost string */ if(at) skthost[(int) (at - skthost)]= '@'; return mesg; } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Sscanf.c0000644000175000017500000000740710360753041013320 0ustar samsam /* Sscanf.c: * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Sscanf.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include #include "sockets.h" /* ----------------------------------------------------------------------- * Local Definitions: */ #define BUFSIZE 256 /* ----------------------------------------------------------------------- */ /* Sscanf: */ /*VARARGS*/ #ifdef __PROTOTYPE__ int Sscanf(Socket *skt,char *fmt,...) #else int Sscanf(skt,va_alist) Socket *skt; va_dcl #endif { va_list args; #ifdef MSDOS char *arg; #else void *arg; #endif char *b = NULL; char *bufend = NULL; char *f = NULL; char *snglfmt = NULL; int buflen; int cnt = 0; static char buf[PM_BIGBUF]; #ifndef __PROTOTYPE__ char *fmt; #endif #ifdef SSLNOPEEK char *bb; #endif /* sanity check */ if(!skt) { return -1; } #ifdef __PROTOTYPE__ va_start(args,fmt); #else va_start(args); fmt = va_arg(args,char *); #endif /* process argument string, one argument at a time */ for(f= fmt, buflen= 1; buflen > 0; f= NULL) { /* get next argument from stack. According to the usual * definition of scanf-like functions, it must be a * pointer. The associated %... format code will tell * Sscanf the type of pointer. */ arg= va_arg(args,void *); if(!arg) break; /* get associated snglfmt */ snglfmt= strnxtfmt(f); if(!snglfmt) break; /* wait until something shows up on the Socket */ Swait(skt); /* peek at socket data, and keep at it until at least one byte is * not processed by the snglfmt */ #ifdef SSLNOPEEK bb= buf; #endif do { #ifdef SSLNOPEEK /* read socket buffer one byte at a time :-( */ if(recv(skt->skt,bb,(unsigned) 1,0) <= 0) { va_end(args); return cnt; } b = bb; buflen= bb - buf + 1; if(*(bb++) == '\0') break; #else /* #ifdef SSLNOPEEK ... #else ... #endif */ /* peek at socket buffer */ buflen = Speek(skt,buf,PM_BIGBUF-1); /* on error, return count of Sscanf'd args */ if(buflen < 0) { va_end(args); return cnt; } #endif /* #ifdef SSLNOPEEK ... #else ... #endif */ /* terminate buffer appropriately with a null byte */ bufend = buf + buflen; *bufend= '\0'; /* get a pointer to the character in buf just beyond that the * snglfmt will process. If that character is bufend, then * it is possible that the snglfmt could process more data than * is currently in buf. Otherwise, b < bufend and so all the * data that snglbuf will process is available. */ b= stpnxt(buf,snglfmt); } while(b && b == bufend); /* read (b - buf) bytes from the socket */ if(b && !*b) ++b; /* read in null byte, if one is present */ #ifndef SSLNOPEEK buflen= Sreadbytes(skt,buf,(int) (b - buf)); #endif if(buflen < 0) break; /* whoops - got an error! */ buf[buflen]= '\0'; /* terminate buf properly */ /* sscanf the buf to set up the arg */ if(sscanf(buf,snglfmt,arg)) ++cnt; else break; } /* leave Sscanf */ va_end(args); return cnt; } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Stest.c0000644000175000017500000000515610360753041013204 0ustar samsam/* Stest.c: this file contains code which allows one to test if data * is present via the socket and not be blocked (not held, not made to sleep) * * Returns: number of bytes of data awaiting perusal (which may be 0) * or EOF if unable to "select" the socket * or select returns 1 but nothing is on socket * * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Stest.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #define SSLNEEDTIME #include "sockets.h" /* --------------------------------------------------------------------- * Source Code: */ #ifdef __PROTOTYPE__ int Stest(Socket *skt) #else int Stest(skt) Socket *skt; #endif { fd_set emask; fd_set rmask; fd_set wmask; int ret; short result; static char buf[PM_BIGBUF]; struct timeval timeout; /* sanity check */ if(!skt) { return -1; } FD_ZERO(&rmask); FD_SET(skt->skt,&rmask); FD_ZERO(&wmask); FD_ZERO(&emask); timeout.tv_sec = 0; timeout.tv_usec= 0; #ifdef SSLNOPEEK result = select(skt->skt+1,rmask.fds_bits,wmask.fds_bits,emask.fds_bits,&timeout); #else result = select(skt->skt+1,&rmask,&wmask,&emask,&timeout); #endif /* SSLNOPEEK */ if(result < 0) { return EOF; } /* server sockets return the select result (client awaiting connection) */ if(skt->type == PM_SERVER) { return result; } #ifdef SSLNOPEEK if(FD_ISSET(skt->skt,&rmask)) { return 1; } #else /* #ifdef SSLNOPEEK ... #else ... #endif */ /* test if message available from socket, return qty bytes avail */ if(FD_ISSET(skt->skt,&rmask)) { ret= recv(skt->skt,buf,PM_BIGBUF-1,MSG_PEEK); /* return error indication when select returned a result of 1 * (indicating that *something* is on the socket) * and recv indicates that *nothing* is on the socket */ if(result == 1 && ret == 0) ret= EOF; return ret; } #endif /* #ifdef SSLNOPEEK ... #else ... #endif */ /* socket is empty */ return 0; } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Stimeoutwait.c0000644000175000017500000000520410360753041014572 0ustar samsam/* Stimeoutwait.c: this file contains code which allows one to wait until data * is present at the Socket (this will block) * * Returns: number of bytes of data awaiting perusal * or -1 if unable to "select" the socket * or -2 if timeout occurs * * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Stimeoutwait.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #define SSLNEEDTIME #include "sockets.h" /* --------------------------------------------------------------------- * Source Code: */ #ifdef __PROTOTYPE__ int Stimeoutwait(Socket *skt,long seconds,long useconds) #else int Stimeoutwait(skt,seconds,useconds) Socket *skt; long seconds; long useconds; #endif { short result; int ret; fd_set emask; fd_set rmask; fd_set wmask; struct timeval timeout; static char buf[PM_BIGBUF]; /* sanity check */ if(!skt) { return -1; } FD_ZERO(&rmask); FD_SET(skt->skt,&rmask); FD_ZERO(&wmask); FD_ZERO(&emask); /* test if something is available for reading on the socket. This form * will block (sleep) until something arrives */ timeout.tv_sec = seconds; timeout.tv_usec= useconds; #ifdef SSLNOPEEK result= select(skt->skt+1, rmask.fds_bits,wmask.fds_bits,emask.fds_bits, &timeout); #else /* #ifdef SSLNOPEEK ... #else ... #endif */ result= select(skt->skt+1, &rmask,&wmask,&emask, &timeout); #endif /* #ifdef SSLNOPEEK ... #else ... #endif */ /* socket error */ if(result < 0) { return -1; } /* timed out */ else if(result == 0) { return -2; } /* server sockets return the select result */ if(skt->type == PM_SERVER) { return result; } #ifdef SSLNOPEEK return 1; #else /* #ifdef SSLNOPEEK ... #else ... #endif */ if(FD_ISSET(skt->skt,&rmask)) { ret= recv(skt->skt,buf,PM_BIGBUF-1,MSG_PEEK); if(result == 1 && ret == 0) ret= EOF; return ret; } /* socket is empty */ return 0; #endif /* #ifdef SSLNOPEEK ... #else ... #endif */ } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Svprintf.c0000644000175000017500000000350310360753041013707 0ustar samsam/* Svprintf.c: * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Svprintf.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include "sockets.h" /* --------------------------------------------------------------------- */ /* Svprintf: * * Returns: count of bytes sent, which may be 0 * * This function is like vprintf; it takes a Socket pointer, a format * string, and an argument list. Note that it actually "prints" the * string into a local buffer first of PM_BIGBUF bytes (originally 1024 * bytes). So, please insure that you don't put more info than will fit * into PM_BIGBUF bytes! It then squirts the resulting string through * a call to Swrite. */ #ifdef __PROTOTYPE__ int Svprintf( Socket *skt, char *fmt, void *args) #else int Svprintf(skt,fmt,args) Socket *skt; char *fmt; void *args; #endif { int ret; static char buf[PM_BIGBUF]; /* sanity check */ if(!skt) { return 0; } #ifdef AS400 ret= vsprintf(buf,fmt,__va_list args); #else ret= vsprintf(buf,fmt,(char *) args); #endif Swrite(skt,buf,strlen(buf)+1); /* send the null byte, too */ return ret; } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Swait.c0000644000175000017500000000451610360753041013170 0ustar samsam/* Swait.c: this file contains code which allows one to wait until data * is present at the Socket (this will block) * * Returns: number of bytes of data awaiting perusal * or EOF if unable to "select" the socket * * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Swait.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #define SSLNEEDTIME #include "sockets.h" /* --------------------------------------------------------------------- * Source Code: */ #ifdef __PROTOTYPE__ int Swait(Socket *skt) #else int Swait(skt) Socket *skt; #endif { static char buf[PM_BIGBUF]; short result; int ret; fd_set emask; fd_set rmask; fd_set wmask; /* sanity check */ if(!skt) { return -1; } FD_ZERO(&rmask); FD_SET(skt->skt,&rmask); FD_ZERO(&wmask); FD_ZERO(&emask); /* test if something is available for reading on the socket. This form * will block (sleep) until something arrives */ #ifdef SSLNOPEEK result = select(skt->skt+1,rmask.fds_bits,wmask.fds_bits,emask.fds_bits, (struct timeval *) NULL); #else result = select(skt->skt+1, &rmask,&wmask,&emask, (struct timeval *) NULL); #endif if(result < 0) { return EOF; } /* server sockets return the select result */ if(skt->type == PM_SERVER) { return result; } #ifdef SSLNOPEEK return 1; #else /* #ifdef SSLNOPEEK ... #else ... #endif */ /* wait if message available from socket, return qty bytes avail */ if(FD_ISSET(skt->skt,&rmask)) { ret= recv(skt->skt,buf,PM_BIGBUF-1,MSG_PEEK); if(result == 1 && ret == 0) ret= EOF; return ret; } /* socket is empty */ return 0; #endif /* #ifdef SSLNOPEEK ... #else ... #endif */ } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/Swrite.c0000644000175000017500000000373710406551163013364 0ustar samsam/* Swrite.c: this file contains the Swrite() function * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * Swrite.c is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #include #include "sockets.h" /* Swrite: this function performs a socket write of a string. * It will write out the requested bytes (up to a null byte), * even if the socket buffer is full. * * If the write fails, it will return the negative of the number * of bytes actually transmitted. Otherwise, it will return the * number of bytes transmitted, which ought to be the same as buflen * if life is just. */ #ifdef __PROTOTYPE__ int Swrite( Socket *skt, /* socket handle */ void *buf, /* socket character buffer */ int buflen) /* length of buffer */ #else int Swrite( skt, /* socket handle */ buf, /* socket character buffer */ buflen) /* length of buffer */ Socket *skt; void *buf; int buflen; #endif { int cnt; int wcnt; /* sanity check */ if (!skt) { return -1; } /* write buflen bytes, no matter the wait */ for (cnt = 0; cnt < buflen; cnt += wcnt) { wcnt = send(skt->skt, (void *) (((char *) buf) + cnt), (unsigned) (buflen - cnt), 0); if (wcnt < 0) { return cnt; } } return cnt; } /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/cprt.c0000644000175000017500000000166710360753041013055 0ustar samsam#include #include "xtdio.h" /* --------------------------------------------------------------------- */ /* cprt: print out a character so that it is legible */ #ifdef __PROTOTYPE__ char *cprt(const char c) #else /* __PROTOTYPE__ */ char *cprt(c) char c; #endif /* __PROTOTYPE__ */ { static char buf1[10]; static char buf2[10]; static char buf3[10]; static char buf4[10]; static char buf5[10]; static char *buf=buf1; int ic; ic= (int) c; if(ic < 32) sprintf(buf,"^%c",(char) (ic + 64)); else if(ic == 127) sprintf(buf,"^"); else if(ic >= 128) sprintf(buf,"^<%3d>",ic); else sprintf(buf,"%c",c); if(buf == buf1) { buf= buf2; return buf1; } else if(buf == buf2) { buf= buf3; return buf2; } else if(buf == buf3) { buf= buf4; return buf3; } else if(buf == buf4) { buf= buf5; return buf4; } else { buf= buf1; return buf5; } } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/error.c0000644000175000017500000000446110360753041013231 0ustar samsam/* error.c: this file contains an error function */ #include #include #include "sockets.h" /* ------------------------------------------------------------------------ * Definitions: */ #define TERMINATE 1 #ifdef vms void exit(int); #endif #ifdef MACOS_X void exit(int); #endif #ifdef MSDOS extern void exit(int); #endif /* ------------------------------------------------------------------------ * Global Variables: */ #ifdef __PROTOTYPE__ void (*error_exit)(int)= exit; /* user may override this */ #else void (*error_exit)()= exit; /* user may override this */ #endif /* ------------------------------------------------------------------------ * Source Code: */ /*VARARGS*/ /* error: print out an error message: * error(severity,fmt,...) * or error(severity,errfunc,fmt,...) * * where * * severity: severity of error * XTDIO_SEVERE : severe error - will terminate * XTDIO_ERROR : error - will terminate * XTDIO_WARNING : warning message * XTDIO_NOTE : notification * * fmt : printf format specification * ... : arguments for the fmt * * errfunc: * will be called */ #ifdef __PROTOTYPE__ void error( int severity, char *fmt, ...) #else /* __PROTOTYPE__ */ void error(severity,fmt,va_alist) int severity; char *fmt; va_dcl #endif /* __PROTOTYPE__ */ { va_list args; static struct mesgstr { char *bgn_color; char *message; char *end_color; int flags; } mesg[]={ {XRED, "fatal error",XGREEN,TERMINATE}, /* SEVERE */ {XRED, "error", XGREEN,TERMINATE}, /* ERROR */ {XYELLOW, "warning", XGREEN,0}, /* WARNING */ {XCYAN, "note", XGREEN,0} /* NOTE */ }; static int nmesg= sizeof(mesg)/sizeof(struct mesgstr); /* severity sanity checks */ if(severity < 0) severity= 0; if(severity >= nmesg) severity= XTDIO_SEVERE; rdcputs(mesg[severity].bgn_color,stderr); fprintf(stderr,"***%s*** ",mesg[severity].message); rdcputs(mesg[severity].end_color,stderr); /* initialize for variable arglist handling */ #ifdef __PROTOTYPE__ va_start(args,fmt); vfprintf(stderr,fmt,args); va_end(args); #else va_start(args); vfprintf(stderr,fmt,args); va_end(args); #endif /* terminate */ if(mesg[severity].flags & TERMINATE) (*error_exit)(1); } /* ------------------------------------------------------------------------ */ dmucs-0.6.1/COSMIC/fopenv.c0000644000175000017500000000421310360753041013370 0ustar samsam/* fopenv.c : this function attempts to open a file based on the * environment variable if an fopen in the current directory fails. * The environment string can have ";" as separators for multiple * path searching. Returns a NULL pointer if unsuccessful. */ #include #include #include "xtdio.h" /* ----------------------------------------------------------------------- * Definitions: */ #ifdef unix #define PATHSEP ':' #else #define PATHSEP ';' #endif /* ----------------------------------------------------------------------- * Source Code: */ /* fopenv: opens file for read/write based on environment variable * char *filename : name of file to be opened * char *ctrl : "r", "w", etc. * char *env_var : environment variable to be used */ #ifdef __PROTOTYPE__ FILE *fopenv( char *filename, char *ctrl, char *env_var) #else /* __PROTOTYPE__ */ FILE *fopenv(filename,ctrl,env_var) char *filename,*ctrl,*env_var; #endif /* __PROTOTYPE__ */ { char *s,*env,*buf; int more; FILE *fp; /* see if file can be opened in current directory first */ fp= fopen(filename,ctrl); if(fp) { return fp; } /* check out the environment variable */ env= getenv(env_var); /* attempt to open filename using environment search */ if(env) while(*env) { /* while there's environment-variable info left... */ for(s= env; *s && *s != PATHSEP; ++s); more = *s == PATHSEP; *s = '\0'; buf = (void *) calloc((size_t) strlen(env) + strlen(filename) + 2,sizeof(char)); #ifdef vms sprintf(buf,"%s%s",env,filename); #endif #ifdef unix sprintf(buf,"%s/%s",env,filename); #endif #ifdef LATTICE sprintf(buf,"%s\\%s",env,filename); #endif #ifdef DESMET sprintf(buf,"%s\\%s",env,filename); #endif #ifdef AZTEC_C sprintf(buf,"%s/%s",env,filename); #endif #ifdef MSDOS sprintf(buf,"%s\\%s",env,filename); #endif /* attempt to open file given the path */ fp= fopen(buf,ctrl); /* free up memory */ free(buf); if(fp) { /* successfully opened file */ return fp; } if(more) { /* another path to search */ *s= PATHSEP; env= s + 1; } else env= s; } /* return NULL pointer, thereby indicating a modest lack of success */ return (FILE *) NULL; } dmucs-0.6.1/COSMIC/outofmem.c0000644000175000017500000000165010360753041013730 0ustar samsam/* outofmem.c */ #include #include "sockets.h" /* ---------------------------------------------------------------------- */ /* outofmem: tests if ptr is null. If it is, the format and arguments * a la printf are put to the stdout and then the program exits */ #ifdef __PROTOTYPE__ void outofmem( void *ptr, char *fmt, ...) #else /* __PROTOTYPE__ */ void outofmem(ptr,fmt,va_alist) void *ptr; char *fmt; va_dcl #endif /* __PROTOTYPE__ */ { va_list args; /* check if ptr is not null */ if(ptr) return; #ifdef __PROTOTYPE__ /* initialize for variable arglist handling */ va_start(args,fmt); #else /* __PROTOTYPE__ */ /* initialize for variable arglist handling */ va_start(args); fmt= va_arg(args,char *); #endif /* __PROTOTYPE__ */ fprintf(stderr,"***out of memory*** "); vfprintf(stderr,fmt,args); va_end(args); (*error_exit)(1); } /* ---------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/rdcolor.c0000644000175000017500000001764510360753041013554 0ustar samsam/* rdcolor.c: this program initializes color/printer variables using a * rdcolor.dat file if it exists. Otherwise, default values are used. * The file uses the following format: * color ... * where the ellipsis is the escape sequence to be used for the "color". * The following characters have special meaning when preceded by a * backslash: * \e => escape character * \f => formfeed character * \h => backspace character * \n => newline character * \t => tab character * \A - \Z=> Associated control characters */ #include #include #include "xtdio.h" /* * #define DEBUG_TEST * #define DEBUG */ /* ------------------------------------------------------------------------- * Definitions: */ #define LINESIZE 80 #define TERMSIZE 20 /* ------------------------------------------------------------------------- * Global Data: */ char *BLACK = NULL; char *RED = NULL; char *GREEN = NULL; char *YELLOW = NULL; char *BLUE = NULL; char *MAGENTA = NULL; char *CYAN = NULL; char *WHITE = NULL; /* since some systems just have to use BLACK, ..., WHITE for themselves... */ char *RD_BLACK = NULL; char *RD_RED = NULL; char *RD_GREEN = NULL; char *RD_YELLOW = NULL; char *RD_BLUE = NULL; char *RD_MAGENTA = NULL; char *RD_CYAN = NULL; char *RD_WHITE = NULL; char *UBLACK = NULL; char *URED = NULL; char *UGREEN = NULL; char *UYELLOW = NULL; char *UBLUE = NULL; char *UMAGENTA = NULL; char *UCYAN = NULL; char *UWHITE = NULL; char *RVBLACK = NULL; char *RVRED = NULL; char *RVGREEN = NULL; char *RVYELLOW = NULL; char *RVBLUE = NULL; char *RVMAGENTA = NULL; char *RVCYAN = NULL; char *RVWHITE = NULL; char *CLEAR = NULL; char *BOLD = NULL; char *NRML = NULL; char *PYELLOW = NULL; char *PRED = NULL; char *PCYAN = NULL; char *PBLACK = NULL; /* ------------------------------------------------------------------------- */ static struct colorstr{ /* color data structure */ char **color; /* points to a color variable */ char *name; /* gives a name to a color */ char *defalt; /* default color string: nothing */ } colors[]={ {&BLACK, "BLACK", "\0"}, {&RED, "RED", "\0"}, {&GREEN, "GREEN", "\0"}, {&YELLOW, "YELLOW", "\0"}, {&BLUE, "BLUE", "\0"}, {&MAGENTA, "MAGENTA", "\0"}, {&CYAN, "CYAN", "\0"}, {&WHITE, "WHITE", "\0"}, {&UBLACK, "UBLACK", "\0"}, {&URED, "URED", "\0"}, {&UGREEN, "UGREEN", "\0"}, {&UYELLOW, "UYELLOW", "\0"}, {&UBLUE, "UBLUE", "\0"}, {&UMAGENTA, "UMAGENTA", "\0"}, {&UCYAN, "UCYAN", "\0"}, {&UWHITE, "UWHITE", "\0"}, {&RVBLACK, "RVBLACK", "\0"}, {&RVRED, "RVRED", "\0"}, {&RVGREEN, "RVGREEN", "\0"}, {&RVYELLOW, "RVYELLOW", "\0"}, {&RVBLUE, "RVBLUE", "\0"}, {&RVMAGENTA, "RVMAGENTA","\0"}, {&RVCYAN, "RVCYAN", "\0"}, {&RVWHITE, "RVWHITE", "\0"}, {&BOLD, "BOLD", "\0"}, {&NRML, "NRML", "\0"}, {&PYELLOW, "PYELLOW", "\0"}, {&PRED, "PRED", "\0"}, {&PCYAN, "PCYAN", "\0"}, {&PBLACK, "PBLACK", "\0"}, {&CLEAR, "CLEAR", "\0"} }; static int ncolor = sizeof(colors)/sizeof(struct colorstr); char *colorfile[] = {"rdcolor.dat","color.dat"}; static int ncolorfile = sizeof(colorfile)/sizeof(char *); static int rdcolor_done= 0; /* has rdcolor been called? */ /* ------------------------------------------------------------------------- */ /* rdcolor: read the file */ #ifdef __PROTOTYPE__ void rdcolor(void) #else /* __PROTOTYPE__ */ void rdcolor() #endif /* __PROTOTYPE__ */ { FILE *fp = NULL; char *cmd = NULL; char *new = NULL; char *lterm = NULL; int icolor; int foundterm; static char color[LINESIZE]; static char line[LINESIZE]; static char newdef[LINESIZE+LINESIZE]; static char *term=NULL; /* indicate that rdcolor() has been called */ rdcolor_done= 1; /* set up default colors */ for(icolor= 0; icolor < ncolor; ++icolor) *(colors[icolor].color)= colors[icolor].defalt; /* attempt to open file */ for(icolor= 0; icolor < ncolorfile; ++icolor) { fp= fopenv(colorfile[icolor],"r","RDCOLOR"); if(fp) break; } if(!fp) { /* use default values */ /* set up RD_... colors */ RD_BLACK = BLACK; RD_RED = RED; RD_GREEN = GREEN; RD_YELLOW = YELLOW; RD_BLUE = BLUE; RD_MAGENTA= MAGENTA; RD_CYAN = CYAN; RD_WHITE = WHITE; return; } /* attempt to locate correct terminal definition */ #ifdef unix term= getenv("TERM"); #endif #ifdef LATTICE term= "TI"; #endif #ifdef DESMET term= "TI"; #endif #ifdef AZTEC_C term= "Amiga" #endif #ifdef vms term= "vms"; #endif #ifdef MSDOS term= "ibmpc"; #endif if(term) { /* search for terminal entry in file */ foundterm= 0; while(fgets(line,LINESIZE,fp)) if(!isspace(line[0])) { srmtrblk(line); for(lterm= strtok(line,"|:"); lterm; lterm=strtok((char *) NULL,"|:")) { lterm= stpblk(lterm); srmtrblk(lterm); if(!strcmp(lterm,term)) { foundterm= 1; break; } } /* term|term|term|term: search */ if(foundterm) break; } if(!foundterm) { /* couldn't find terminal entry */ fclose(fp); return; } } while(fgets(line,LINESIZE,fp)) { /* read color & use cmd sequence */ /* skip blank lines */ for(cmd= line; *cmd; ++cmd) if(!isspace(*cmd)) break; if(!*cmd) continue; if(cmd == line) break; /* finished reading in terminal def'n */ /* if first non-blank character is a "#", skip it (comment) */ if(*cmd == '#') continue; /* get the color */ sscanf(cmd,"%s",color); /* skip to first white space character */ for(; *cmd && !isspace(*cmd); ++cmd); cmd[strlen(cmd) - 1]= '\0'; /* remove newline character */ /* skip over tabs following colorname */ while(*cmd == '\t') ++cmd; /* identify color (if known) */ for(icolor= 0; icolor < ncolor; ++icolor) if(!strcmp(colors[icolor].name,color)) break; if(icolor >= ncolor) { /* unknown color */ error(XTDIO_WARNING, "(rdcolor) ignoring unknown color <%s> in <%s>\n", color,colorfile); continue; } /* copy cmd (new color) over to newdef (new definition), making * appropriate changes due to backslashes */ for(new= newdef; *cmd; ++cmd,++new) { if(*cmd == '\\') { switch(*++cmd) { case 'e' : /* escape character */ *new= '\033'; break; case 'f' : /* formfeed character */ *new= '\f'; break; case 'h' : /* backspace character */ *new= (char) 8; break; case 'n' : /* newline character */ *new= '\n'; break; case 't' : /* tab character */ *new= '\t'; break; default: /* handles A-Z and other */ if('A' <= *cmd && *cmd <= 'Z') *new= *cmd - 64; else *new= *cmd; break; } } else *new= *cmd; } *new= '\0'; /* terminate new definition with null byte */ /* allocate memory and then set color to colorfile-defined value */ *colors[icolor].color= (void *) calloc((size_t) (strlen(newdef)+1),sizeof(char)); if(newdef[0]) strcpy(*colors[icolor].color,newdef); else *colors[icolor].color= "\0"; } /* close the colorfile */ fclose(fp); /* set up RD_... colors */ RD_BLACK = BLACK; RD_RED = RED; RD_GREEN = GREEN; RD_YELLOW = YELLOW; RD_BLUE = BLUE; RD_MAGENTA= MAGENTA; RD_CYAN = CYAN; RD_WHITE = WHITE; } /* ------------------------------------------------------------------------- */ /* rdcputs: read color's put-string function. Normally, rdcputs acts exactly * like fputs, except that "\255X#" strings are translated to appropriate * colors. */ #ifdef __PROTOTYPE__ void rdcputs( char *s, FILE *fp) #else /* __PROTOTYPE__ */ void rdcputs(s,fp) char *s; FILE *fp; #endif /* __PROTOTYPE__ */ { int icolor; if(*s == '\255' && *(s+1) == 'X') { /* translate */ if(rdcolor_done) { /* only try interpreting this if rdcolor() has been called */ sscanf(s+2,"%d",&icolor); fputs(*colors[icolor].color,fp); } } else fputs(s,fp); } /* ------------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/rdcolor.dat0000644000175000017500000000240710360753041014070 0ustar samsamiris-ansi | iris-ansi-net | vt100 | RLamiga | ibmpc: RED \e[m\e[31m GREEN \e[m\e[32m YELLOW \e[m\e[33m BLUE \e[m\e[34m MAGENTA \e[m\e[35m CYAN \e[m\e[36m WHITE \e[m\e[37m RVRED \e[m\e[7;31m RVGREEN \e[m\e[7;32m RVYELLOW \e[m\e[7;33m RVBLUE \e[m\e[7;34m RVMAGENTA \e[m\e[7;35m RVCYAN \e[m\e[7;36m RVWHITE \e[m\e[7;37m URED \e[m\e[4;31m UGREEN \e[m\e[4;32m UYELLOW \e[m\e[4;33m UBLUE \e[m\e[4;34m UMAGENTA \e[m\e[4;35m UCYAN \e[m\e[4;36m UWHITE \e[m\e[4;37m NRML \e[m\e[32m BOLD \e[m\e[7m CLEAR \e[2J\e[m vms: RED \e[m\e[7m YELLOW \e[m\e[7m GREEN \e[m BLUE \e[m CYAN \e[m\e[7m MAGENTA \e[m\e[7m WHITE \e[m RVRED \e[m\e[7m RVYELLOW \e[m\e[7m RVGREEN \e[m\e[7m RVBLUE \e[m\e[7m RVCYAN \e[m\e[7m RVMAGENTA \e[m\e[7m RVWHITE \e[m\e[7m URED \e[4m UYELLOW \e[4m UGREEN \e[4m UBLUE \e[4m UCYAN \e[4m UMAGENTA \e[4m UWHITE \e[4m NRML \e[m BOLD \e[m\e[7m CLEAR \e2J iris: RED \e9P YELLOW \e9P GREEN \e0@ BLUE \e9P CYAN \e9P MAGENTA \e9P WHITE \e9P RVRED \e9P RVYELLOW \e9P RVGREEN \e9P RVBLUE \e9P RVCYAN \e9P RVMAGENTA \e9P RVWHITE \e9P URED \e9P UYELLOW \e9P UGREEN \e9P UBLUE \e9P UCYAN \e9P UMAGENTA \e9P UWHITE \e9P NRML \e0@ BOLD \e9P CLEAR \eH\eJ dmucs-0.6.1/COSMIC/sprt.c0000644000175000017500000000215210360753041013063 0ustar samsam/* sprt.c: */ #include #include "xtdio.h" /* ------------------------------------------------------------------------- * Local Definitions: */ #define BUFSIZE 261 #define SFTY 5 /* sprt: this routine makes string characters all visible */ #ifdef __PROTOTYPE__ char *sprt(const char *s) #else /* __PROTOTYPE__ */ char *sprt(s) char *s; #endif /* __PROTOTYPE__ */ { static char buf1[BUFSIZE]; static char buf2[BUFSIZE]; static char buf3[BUFSIZE]; static char buf4[BUFSIZE]; char *b; char *bend; static char *buf = buf3; int ic; /* allows up to three sprt()s in one function call */ if(buf == buf1) buf= buf2; else if(buf == buf2) buf= buf3; else if(buf == buf3) buf= buf4; else buf= buf1; buf[0]= '\0'; bend = buf + BUFSIZE - SFTY; if(s) for(b= buf; *s && b < bend; ++s, b+= strlen(b)) { ic= (int) *s; if(ic < 31) sprintf(b,"^%c",(char) (ic + 64)); else if(ic >= 128) sprintf(b,"~%3d",ic); else { *b = *s; *(b+1)= '\0'; } b+= strlen(b); } return buf; } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/srmtrblk.c0000644000175000017500000000053010360753041013731 0ustar samsam#include #include /* srmtrblk: remove trailing blanks from string s */ #ifdef __PROTOTYPE__ void srmtrblk(char *s) #else /* __PROTOTYPE__ */ void srmtrblk(s) char *s; #endif /* __PROTOTYPE__ */ { char *ss; for(ss= s; *ss; ++ss); /* find end of string */ for(--ss; ss >= s && isspace(*ss) && *ss != '\f'; --ss) *ss= '\0'; } dmucs-0.6.1/COSMIC/stpblk.c0000644000175000017500000000036110360753041013372 0ustar samsam#include #include /* stpblk: skips blanks (white space) */ #ifdef __PROTOTYPE__ char *stpblk(char *p) #else /* __PROTOTYPE__ */ char *stpblk(p) char *p; #endif /* __PROTOTYPE__ */ { while(isspace(*p)) ++p; return p; } dmucs-0.6.1/COSMIC/stpnxt.c0000644000175000017500000000624410360753041013441 0ustar samsam#include #include #include "xtdio.h" /* ------------------------------------------------------------------ * Definitions Section: */ #define MAXCNT 65535 /* ------------------------------------------------------------------ * Source Code: */ /* stpnxt: returns a pointer to the next argument in the given string, * assuming a %d, %s, %f, etc. code was used to interpret the * present argument. */ #ifdef __PROTOTYPE__ char *stpnxt( char *s, /* source string */ char *fmt) /* format control string (ie. format control code string) */ #else char *stpnxt(s,fmt) char *s; /* source string */ char *fmt; /* format control string (ie. format control code string) */ #endif { char *ss; int cmax; /* if s is NULL return NULL */ if(s == NULL) { return (char *) NULL; } /* process control string */ for(ss= s; *s && *fmt ; ++fmt, ss= s) { /* scan code processing */ if(*fmt == '%') { ++fmt; /* %[-]###.: handle predecessor stuff */ if(*fmt == '-') ++fmt; if(*fmt && isdigit(*fmt)) { sscanf(fmt,"%d",&cmax); while(*fmt && (isdigit(*fmt) || *fmt == '.')) ++fmt; } else cmax= MAXCNT; /* %...l.: remove the 'l' from consideration * %...h.: remove the 'h' from consideration */ if(*fmt == 'l' || *fmt == 'h') ++fmt; /* handle the format code character */ switch(*fmt) { /* %s: string processing */ case 's': while(*s && isspace(*s)) ++s; while(*s && !isspace(*s)) ++s; break; /* %c: character processing */ case 'c': if(*s) ++s; break; /* %x: hexadecimal processing */ case 'x': s= stpblk(s); ss= s; if(*s == '+' || *s == '-') ++s; if(s[0] == '0' && s[1] == 'x') s+= 2; while(*s && (isdigit(*s) || (*s >= 'a' && *s <= 'f') || (*s >= 'A' && *s <= 'F'))) ++s; break; /* %o: octal processing */ case 'o': while(*s && isspace(*s)) ++s; ss= s; if(*s == '+' || *s == '-') ++s; while(*s && *s >= '0' && *s <= '7') ++s; break; /* %d, %e, %f, %g, %u: integer and floating point number processing */ case 'd': case 'e': case 'f': case 'g': case 'u': while(*s && isspace(*s)) ++s; ss= s; if(*s == '-' || *s == '+') ++s; while(*s && isdigit(*s)) ++s; if(*fmt == 'd') break; if(*s == '.') ++s; while(*s && isdigit(*s)) ++s; if(*s == 'e') { /* exponent handling */ ++s; if(*s == '-' || *s == '+') ++s; while(isdigit(*s) && *s) ++s; } break; /* %%: single character processing */ case '%': while(*s && isspace(*s)) ++s; if(*s != *fmt) { return s; } break; /* %b: slight extension, skips over blanks */ case 'b': while(*s && isspace(*s)) ++s; break; /* unknown */ default: error(XTDIO_WARNING,"unknown stpnxt code <%s%c%s>\n", RD_MAGENTA, *fmt, RD_GREEN); break; } } /* white space in control string skipping */ else if(*fmt && isspace(*fmt)) continue; /* non-white space: must match string */ else { while(*s && isspace(*s)) ++s; if(*s != *fmt) { return s; } else { /* s and c match, so continue forth */ ++s; continue; } } if(s <= ss) { return ss; } } /* c: loop */ return s; } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/strnxtfmt.c0000644000175000017500000000330610360753041014146 0ustar samsam#include #include #include "xtdio.h" /* ---------------------------------------------------------------------- * Local Definitions: */ #define BUFSIZE 256 /* ---------------------------------------------------------------------- */ /* strnxtfmt: this function returns a pointer to the end of a format code * * Use: * strnxtfmt(fmt) : initialize and return first single format code string * strnxtfmt((char *) NULL) : use previous fmt string * * Returns a pointer to a single format until no more single formats are * left, in which case a NULL pointer is returned. */ #ifdef __PROTOTYPE__ char *strnxtfmt(char *fmt) #else /* __PROTOTYPE__ */ char *strnxtfmt(fmt) char *fmt; #endif /* __PROTOTYPE__ */ { char *lb; static char locbuf[BUFSIZE]; static char *f=NULL; /* select format string to be processed */ if(!fmt) fmt= f; else f = fmt; if(!fmt || !*fmt) { return (char *) NULL; } /* Set up a single format string from the fmt variable */ for(lb= locbuf; *fmt; ++fmt) { if(*fmt == '%') { if(fmt[1] == '%') { /* enter %% pairs into locbuf directly */ *lb++ = *fmt; *lb++ = *++fmt; } else { /* decipher format code: [0-9.hlL\-]*[a-zA-Z] */ for(*lb++= *fmt++; *fmt; ++fmt) { if(isdigit(*fmt) || *fmt == 'l' || *fmt == 'L' || *fmt == 'h' || *fmt == '-' || *fmt == '.') *lb++= *fmt; else break; } if(*fmt) *lb++ = *fmt++;/* more fmt to be available */ else *lb = '\0'; /* end of fmt string encountered */ break; } } else *(lb++)= *fmt; } *lb= '\0'; /* terminate locbuf properly */ /* read strnxtfmt for next call */ f= fmt; return locbuf; } /* ----------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/AS400/0000755000175000017500000000000010457726373012475 5ustar samsamdmucs-0.6.1/COSMIC/AS400/CVS/0000755000175000017500000000000010457726373013130 5ustar samsamdmucs-0.6.1/COSMIC/AS400/CVS/Root0000644000175000017500000000007110457726373013774 0ustar samsam:ext:vic_norman@dmucs.cvs.sourceforge.net:/cvsroot/dmucs dmucs-0.6.1/COSMIC/AS400/CVS/Repository0000644000175000017500000000002310457726373015225 0ustar samsamdmucs/COSMIC/AS400 dmucs-0.6.1/COSMIC/AS400/CVS/Entries0000644000175000017500000000055610457726373014472 0ustar samsam/ADUCBAT/1.1.1.1/Tue Jan 10 15:43:29 2006// /ADUCBATB/1.1.1.1/Tue Jan 10 15:43:29 2006// /AS400.NOTES/1.1.1.1/Tue Jan 10 15:43:29 2006// /READ.ME/1.1.1.1/Tue Jan 10 15:43:29 2006// /RUNAU17/1.1.1.1/Tue Jan 10 15:43:29 2006// /adusslbnd/1.1.1.1/Tue Jan 10 15:43:29 2006// /crtsslsrv/1.1.1.1/Tue Jan 10 15:43:29 2006// /startau17w/1.1.1.1/Tue Jan 10 15:43:29 2006// D dmucs-0.6.1/COSMIC/AS400/ADUCBAT0000644000175000017500000000211710360753041013445 0ustar samsam/* COMPILE C PROGRAMS */ ADUCBAT: PGM PARM(&LIB &FILE &SRCMBR &TESTP &DEBUG &LSTDBG ) DCL &LIB TYPE(*CHAR) LEN(10) DCL &FILE TYPE(*CHAR) LEN(10) DCL &SRCMBR TYPE(*CHAR) LEN(10) DCL &TESTP TYPE(*CHAR) LEN(4) DCL &DEBUG TYPE(*CHAR) LEN(6) DCL &LSTDBG TYPE(*CHAR) LEN(7) DCL &QINCLUDE TYPE(*CHAR) LEN(10) DCL &PGMLIB TYPE(*CHAR) LEN(10) MONMSG CPF3C50 MONMSG CPF2184 MONMSG LNC9001 EXEC(GOTO DONE) CHGVAR &QINCLUDE ('ADU' *CAT &TESTP ) CHGVAR &PGMLIB ('ADU' *CAT &TESTP *CAT 'LIB' ) CHGLIBL LIBL(QGPL QTEMP &QINCLUDE ADUPRODLIB) CURLIB(&PGMLIB) CRTCMOD MODULE(&PGMLIB/&SRCMBR) SRCFILE(&LIB/&FILE) + SRCMBR(&SRCMBR) OUTPUT(*PRINT) + OPTION(*SECLVL *NOLOGMSG) SYSIFCOPT(*ALL) + CHECKOUT(*USAGE) OPTIMIZE(*NONE) + DBGVIEW(*LIST) DEFINE(AS400) FLAG(10) + LANGLVL(*ANSI) REPLACE(*YES) TGTRLS(V4R3M0) MONMSG MSGID(CZM0613) DONE: ENDPGM dmucs-0.6.1/COSMIC/AS400/ADUCBATB0000644000175000017500000000210510360753041013544 0ustar samsam/* COMPILE C PROGRAMS */ ADUCBAT: PGM PARM(&LIB &FILE &SRCMBR &TESTP &DEBUG &LSTDBG ) DCL &LIB TYPE(*CHAR) LEN(10) DCL &FILE TYPE(*CHAR) LEN(10) DCL &SRCMBR TYPE(*CHAR) LEN(10) DCL &TESTP TYPE(*CHAR) LEN(4) DCL &DEBUG TYPE(*CHAR) LEN(6) DCL &LSTDBG TYPE(*CHAR) LEN(7) DCL &QINCLUDE TYPE(*CHAR) LEN(10) DCL &PGMLIB TYPE(*CHAR) LEN(10) MONMSG CPF3C50 MONMSG CPF2184 MONMSG LNC9001 EXEC(GOTO DONE) CHGVAR &QINCLUDE ('ADU' *CAT &TESTP ) CHGVAR &PGMLIB ('ADU' *CAT &TESTP *CAT 'LIB' ) CHGLIBL LIBL(QGPL QTEMP &QINCLUDE ADUPRODLIB) CURLIB(&PGMLIB) CRTCMOD MODULE(&PGMLIB/&SRCMBR) SRCFILE(&LIB/&FILE) SRCMBR(&SRCMBR) OUTPUT(*PRINT) OPTION(*SECLVL *NOLOGMSG) CHECKOUT(*USAGE) OPTIMIZE(*NONE) DBGVIEW(*LIST) DEFINE(AS400) LANGLVL(*EXTENDED) REPLACE(*YES) + TGTRLS(V4R3M0) FLAG(10) MONMSG MSGID(CZM0613) CRTPGM PGM(ADUTESTLIB/&SRCMBR) MODULE(ADUTESTLIB/&SRCMBR) BNDDIR(ADUTESTLIB/ADUSSLBND) DETAIL(*BASIC) DONE: ENDPGM dmucs-0.6.1/COSMIC/AS400/AS400.NOTES0000644000175000017500000000211310360753041014014 0ustar samsam1) some name > 8.3 were renamed to 8.3 to make migration to migration easier. I did not include the modules I just chopped any name that was not 8.3 when I moved it to the AS/400. 2) Changed unix format (x'0a') to (x'0d0a') for move on all modules and headers before I moved them to the AS/400. Again this was a mechanical process so I did not include. 3) Added def AS400 to sockets.h 4) Added "define(AS400)" to setproto.h 5) Added def AS400 to xtdio.h 6) Changed this line in svprintf #ifdef AS400 ret= vsprintf(buf,fmt,__va_list args); #else ret= vsprintf(buf,fmt,(char *) args); #endif 7) changed sopen to initialize sockaddr_in to 0x00 just before bind and just before connect in SOPEN.c look for two lines of code in sopen.c that say... memset(&sin,0x00,sizeof(struct sockaddr_in)); 8) I modified spm (called spmstrtr) to start the server if it was not registered already. There are some comments in the module and the code is at the very end. 9) On the AS/400 I created a service library. dmucs-0.6.1/COSMIC/AS400/READ.ME0000644000175000017500000000116310360753041013415 0ustar samsamThis AS/400 cl will compile the library modules ADUCBAT This AS/400 cl will compile the executabe modules and bind them with the service program library ADUCBATB This AS/400 cl will create the service program after the modules are are all compiled. crtsslsrv This is the binder export file that crtsslsrv uses adusslbnd I use spmstrtr to kickoff a CICS/400 transaction when an input request comes into the system. This is an AS/400 command that can be kicked off by spmstrtr to auto matically start a server. RUNAU17 This is the CL to support the RUNAU17 command. startau17w dmucs-0.6.1/COSMIC/AS400/RUNAU170000644000175000017500000000032010360753041013436 0ustar samsamCMD PROMPT('RUNAU17 TO SUBMIT JOB ') PARM KWD(ANYVALUE) TYPE(*CHAR) LEN(10) MIN(1) /*CRTCMD CMD(ADUTESTLIB/RUNAU17) PGM(*LIBL/STARTAU17W) SRCFILE(ADUTEST/ADUCLCMD+ MAXPOS(1) */ dmucs-0.6.1/COSMIC/AS400/adusslbnd0000644000175000017500000000463410360753041014367 0ustar samsamstrpgmexp pgmlvl(*current) SIGNATURE('ADUsslPGM_VER01_012501') export symbol('Saccept') export symbol('Sclose') export symbol('Sgets') export symbol('Smaskfdisset') export symbol('Smaskfdset') export symbol('Smaskget') export symbol('Smaskisset') export symbol('Smaskpop') export symbol('Smaskpush') export symbol('Smaskset') export symbol('Smasktest') export symbol('Smasktime') export symbol('Smaskunset') export symbol('Smaskunfdset') export symbol('Smaskuse') export symbol('Smaskwait') export symbol('Sopen') export symbol('Sopenv') export symbol('Speek') export symbol('Speeraddr') export symbol('Speername') export symbol('Sprintf') export symbol('Sprtskt') export symbol('Sputs') export symbol('Sread') export symbol('Sreadbytes') export symbol('Srmsrvr') export symbol('Sscanf') export symbol('Stest') export symbol('Stimeoutwait') export symbol('Svprintf') export symbol('Swait') export symbol('Swrite') export symbol('Sinit') export symbol('Sopen_clientport') export symbol('YELLOW') export symbol('GREEN') export symbol('WHITE') export symbol('NRML') export symbol('CYAN') export symbol('RVCYAN') export symbol('UWHITE') export symbol('MAGENTA') export symbol('rdcolor') export symbol('error') export symbol('sprt') export symbol('cprt') export symbol('rdcputs') export symbol('freeSocket') export symbol('makeSocket') export symbol('outofmem') export symbol('srmtrblk') export symbol('stpblk') export symbol('stpnxt') export symbol('TCP_CLIENT') export symbol('TCP_SERVER') export symbol('TCP_SEND') export symbol('TCP_RECV') export symbol('TCP_CLOSE') export symbol('TCP_TRACE') export symbol('TCP_TRCTXT') export symbol('TCP_ERRVARS') export symbol('TCP_INFO') export symbol('TCP_SETSRV') export symbol('TCP_SETXLT') endpgmexp dmucs-0.6.1/COSMIC/AS400/crtsslsrv0000644000175000017500000000262110360753041014447 0ustar samsamADUCRT: PGM /* THIS COMMAND WILL BIND ALL OF THESE MODULES INTO A SERVICE PROGRAM + IF ONE OF THESE MODULES CHANGES THIS JOB MUST BE RERUN TO REBIND + IT WILL NOT BE NECESSARY TO REBIND ALL OF THE PROGRAMS THAT CALL THESE + MODULES. IF YOU CHANGE THE CALLING STRUCTURE OF ANY OF THESE MODULES + ALL PROGRAMS MUST BE REBOUND. + IF YOU ADD A PROGRAM IT MUST BE ADDED TO THE END. YOU MUST UPDATE THE + EXPORT LIST IN ADUTEST/BATCH MEMBER NAME ADUSRVPGM. IF YOU ADD TO THE + END ONLY THE PROGRAMS USING THE NEW MODULE NEED TO BE REBOUND */ CRTSRVPGM SRVPGM(ADUTESTLIB/ADUSSLPGM) MODULE(*LIBL/CPRT *LIBL/ERROR *LIBL/FOPENV *LIBL/OUTOFMEM *LIBL/RDCOLOR *LIBL/SACCEPT *LIBL/SCLOSE *LIBL/SGETS *LIBL/SINIT *LIBL/SMASKWAI *LIBL/SMKSKT *LIBL/SOPEN + *LIBL/SOPENV *LIBL/SPEEK *LIBL/SPEERADD *LIBL/SPEERNAM *LIBL/SPRINTF *LIBL/SPRT *LIBL/SPRTSKT *LIBL/SPUTS *LIBL/SREAD *LIBL/SREADBYT *LIBL/SRMSRVR *LIBL/SRMTRBLK *LIBL/SSCANF *LIBL/STEST + *LIBL/STIMEOUT *LIBL/STPBLK *LIBL/STPNXT *LIBL/STRNXTFM *LIBL/SVPRINTF *LIBL/SWAIT *LIBL/SWRITE ESDTOSSL) EXPORT(*SRCFILE) SRCFILE(ADUTEST/QCSRC) SRCMBR(ADUSSLBND) TEXT('CREATE ADU SERVICE PROGRAM + OF COSMIC SSL ROUTINES') BNDDIR(*NONE) DETAIL(*EXTENDED) TGTRLS(V4R3M0) ENDPGM dmucs-0.6.1/COSMIC/AS400/startau17w0000644000175000017500000000111410360753041014420 0ustar samsam/* */ /* START THE AS400 POS TCP RECEIVER */ /* */ /* ADU TEST REGION V1.0 */ STARTAU17: PGM PARM(&ANYVALUE) DCL &ANYVALUE *CHAR 10 CHGLIBL LIBL(QGPL QTEMP ) CURLIB(ADUTESTLIB) SBMJOB CMD(STRCICSUSR CTLRGN(ADUC) TRANID(A17R)) + JOB(RUNAU17R) JOBQ(*LIBL/ADUCJOBQ) + USER(CICSTST) ENDPGM dmucs-0.6.1/COSMIC/DOC/0000755000175000017500000000000010457726374012354 5ustar samsamdmucs-0.6.1/COSMIC/DOC/CVS/0000755000175000017500000000000010457726374013007 5ustar samsamdmucs-0.6.1/COSMIC/DOC/CVS/Root0000644000175000017500000000007110457726373013652 0ustar samsam:ext:vic_norman@dmucs.cvs.sourceforge.net:/cvsroot/dmucs dmucs-0.6.1/COSMIC/DOC/CVS/Repository0000644000175000017500000000002110457726373015101 0ustar samsamdmucs/COSMIC/DOC dmucs-0.6.1/COSMIC/DOC/CVS/Entries0000644000175000017500000000043010457726374014340 0ustar samsam/History/1.1.1.1/Tue Jan 10 15:43:29 2006// /README/1.1.1.1/Tue Jan 10 15:43:29 2006// /porting.doc/1.1.1.1/Tue Jan 10 15:43:29 2006// /sockets.ps/1.1.1.1/Tue Jan 10 15:43:30 2006// /sockets.tex/1.1.1.1/Tue Jan 10 15:43:30 2006// /sockets.txt/1.1.1.1/Tue Jan 10 15:43:30 2006// D dmucs-0.6.1/COSMIC/DOC/History0000644000175000017500000003244710360753041013732 0ustar samsam /===================================================================\ || || || Simple Sockets Library Differences Document || || Charles E. Campbell, Jr., PhD. || || || || HISTORY || || || \===================================================================/ Version 7c: *** RELEASED *** Aug 22, 2005 a. (Marcel Satchel) improved for Windows b. (Aug 22, 2005) included the "b" option for Sopen() (block until requested server becomes available) c. (Marcel Satchel) Sinit.c fixed (yet again!) Version 6: *** RELEASED *** Mar 24, 2005 a. (Jul 16, 2004) Neeme Tingas suggested that several int declarations be changed to socklen_t for Gnu CC. I'm currently using __gnu_linux__ to test for using socklen_t instead of int. He also suggested using one int for sigio_handler in EXAMPLES/sktsig.c. IMHO, the signal() interface seems to be one where lots of different systems use different calling standards and their compilers are quite vigilant about complaining about other styles. b. (Mar 24, 2005) Blocking client opens (Sopen(servername,"b")) has been implemented. Clients can now request a block until the requested server registers itself with the PortMaster. Version 5: *** RELEASED *** May 24, 2004 a. Now supports cygwin. Note that some of the EXAMPLES programs will not compile under cygwin because it doesn't support sigcontext (yet): oobsend and sktsig. Thanks go to Frank Myers for this port! Version 4: *** RELEASED *** Apr 22, 2004 a. (thank you, Martin Wood!) prototype and declaration for sprt() changed to char *sprt(const char *). b. (thank you, Martin Wood!) Changed __linux to __linux__ in to keep it consistent with c. (thank you, Martin Wood!) Changed inclusion of to for Linux Version 3: *** RELEASED *** Apr 02, 2004 a. Cosmetic changes, extra initialization of pointers to NULL, to skdbg.c and Spm.c b. Mac OS-X supported (#ifdef MACOS_X...) You may need to put in a into to get it to compile properly. Thanks to Paul Bourne for sharing this! Version 2.11a: *** RELEASED *** March 6, 2001 a. Steve Richards has ported the Simple Sockets Library to OS/2 and has given permission to distribute his changes. b. sktdbg's put command enhanced to understand \a is ctrl-a, \b is ctrl-b, ... \z is ctrl-z. Version 2.10: *** RELEASED *** Feb 28, 2001 a. Included Microsoft Developer Studio mods - thanks to David Dowd! b. Fixed Speername(), including peername and peeraddr commands in sktdbg c. Made ...->skt= NULL; be ...->skt= 0; because some compilers were complaining about making an integer from a pointer without a cast. d. talkclient.c had an uninitialized pointer that caused core dumps under Linux. Fixed! e. Servers named "$####" will attempt to use port #### (where # is a number from [0-9]). Note that ports 0-1023 are typically reserved. f. Moved "xtdio.h" to after the extern "C" in (thanks to Ralf Moeller) g. Steve Richards has kindly ported the Simple Sockets Library to the AS/400 and has given permission to distribute his changes. Version 2.09: a. Includes two new examples: and b. Sinit() refused to compile under Unix (its really for BillG's o/ses); now fixed. c. Spm now releases controlling terminal under Unix by itself (ie. nohup is no longer needed) (ie. uses setsid()). d. Spm now runs as a "task" under Windoze; ie. if Spm.exe is put into c:\Windows\Start Menu\Programs\StartUp it will run quietly (no window, no ctrl-c to close). e. Speername() and Speeraddr() passed the wrong length to the gethostbyaddr() and getpeername() functions; fixed! f. Sopen/Sclose will now accept NULL or "" for a sktname; in such a case, the user *must* specify the port number (ie. "s12345" or "c12345"). In such a case, the PortMaster is bypassed. Facilitates use with some firewalls. g. Dr Jon Christopher found a bug and provided a fix to Version 2.08: *** RELEASED *** March 30, 1998 1. Sopen_server now sets up sin.sin_port with htons() rather than htonl() 2. Sopen_server's gethostname call now checked for error (has never happened before, but you never know!) 3. Changes were made to and to support Linux. Thanks go to Gary Johnson (gjohnson@season.com). 4. ***BIG CHANGE***: Starting with v2.08, the Simple Socket Library's PortMaster is now registered with IANA. However, its former port was already assigned by IANA elsewhere, so the PortMaster now has a new port number, 1750. This means that your current SSL-using s/w needs to be recompiled as it won't be able to contact the new PortMaster with its new port number. Web users, check out http://www.iana.org/iana/ Ftp users, check out ftp://ftp.isi.edu/in-notes/iana/assignments/ 5. Modest changes made to the PortMaster's startup banner and stdio/stderr/stdout closing. 6. freeSocket() now also nulls out the Socket's contents. This function is implicitly called by using Sclose(). 7. Two new functions: Smaskisset(Socket *skt) and Smaskfdisset(int fd). These two functions are faster than using Smasktest() after a Smaskwait(). A supporting new command, "isset", is in sktdbg, and supporting changes were made to , the manual. 8. spmtable issues warnings instead of errors on PortMaster problems, thereby allowing it to continue through a list of portmasters. 9. PortMasters will now include the host of servers "sharing" another machine's PortMaster for PM_TABLE requests. Translated: spmtable will now show what machine a server is actually on if not the PortMaster's own host. 10. ERROR -> XTDIO_ERROR, etc -- too many folks are using ERROR, WARNING, etc, and so this fixes that problem. 11. Srmsrvr now uses PMSHARE if no hostname was specified; this improvement also affects the srmsrvr program. 12. Sopen_client now attempts hostname first; if no success and PM_SHARE is defined, try Sopen_client to PM_SHARE's PortMaster. Version 2.07: 1. Porting hint #5 was added to 2. The file was modified with a comment (concerning #define const) supporting porting hint #5 (see ). 3. To the signal() calls in and , I included (void *) casts to the second argument (the name of the function to be called in the event of receipt of a signal). 4. Modified Makefiles so that ${...} -> $(...), because some Suns had problems with expanding the ${...} form (wierd!). 5. Improved documentation for VMS -- included notes on how to use VMS's DCL to allow for command line arguments. 6. now #includes , which provides prototyping. 7. New functions: Speername() returns a string giving the peer's name Speeraddr() returns the internet address of the peer 8. PortMaster now uses SO_REUSEADDR -- it doesn't seem necessary, as the PortMaster is very stable in operation, but I decided to do so for Murphy's Law handling. Any comments on this choice one way or the other are welcome! 9. Sopen has been extended - it now will handle user-specified ports in addition to dynamic port binding, for both servers and clients. Check out Sopen()'s "mode" in the manual. --------------------------------------------------------------------- Version 2.06: 1. spmtable improved so that it will not hang on non-responding PortMaster (and will give messages). 2. Sopen_clientport had unnecessary copying removed: hostenstruct= *hostentptr; --------------------------------------------------------------------- Version 2.05: 1. Sopen/SSLNEEDTOSHAREPM problem fixed: PCs should now be able to share other's PortMasters to instantiate servers. 2. Fixed documentation on the PortMaster; its been using port 1541 for quite awhile now (it was changed from 1540 due to a problem with Suns in Version 2.01). 3. Added shutdown() before close() to Sclose, Sopen (error handling), and Spm. --------------------------------------------------------------------- Version 2.04: 1. spmchk.c now returns (0 usually, 1 for vms) or 2 -- facilitated vms usage 2. If Sopenv's env_var is NULL or a null string (ie. ""), it will use SKTPATH for its socket path environment variable. --------------------------------------------------------------------- Version 2.03: 1. sockets.h and Sopen now use the SSLNOSETSOCKOPT to specify which tcp/ip implementations do not support the setsockopt() call (currently, that's msdos and aix). 2. OSF support tentatively added 3. smsrvr.c and smclient.c examples added to the distribution --------------------------------------------------------------------- Version 2.02: 1. The sockets.tex had Smaskwait calling syntax wrong: wrong : Smaskwait(Socket *) - instead of - correct : Smaskwait() The sockets.tex file has been corrected. 2. The sockets.h file was improved so that Suns which have Standard C compilers will use instead of . 3. Marty Olevitch donated spmchk.c (he placed it into the public domain) and is included and documented in this distribution. 4. Included out-of-band data handling example (both send and receive programs). 5. Sread, Sreadbytes, Swrite, and Speek: now take void *buf instead of char * buf. This change should not affect any prior uses but allows SSL programmers to use fewer casts when dealing with these functions. 6. Smasktest used to change the Smasktime information (to 0sec 0usec). Smasktest now saves the current time data, does its thing, and then restores the timeout info. 7. Added cprt() to the library; its like sprt(), but for single characters. 8. Used cprt() with the read command in sktdbg to make all characters read visible (and not depend on a null byte which may not be there). 9. Thanks to R. Day, SCO and Solaris Unix support has been added (options to and ). 10. The RDCOLOR environment variable is now used (instead of COLOR) to indicate what directory the file resides in. The documentation in has been changed to reflect this. --------------------------------------------------------------------- Version 2.01: 1. Stimeoutwait : now takes three arguments: int Stimeoutwait(Socket *skt,long seconds,long useconds) instead of two (useconds was added in). This change impacted: Sclose Sopen Srmsrvr Stimeoutwait Portmaster (Spm) sktdbg 2. Sgets : bug in high data transfer rate fixed. I've now transferred literally thousands of images (from a capacitance-based "camera") with no problems. 3. PortMaster (Spm): firewall (security) support More resistance to crashing, two ways: first, more Stest()s, and second, the Stest function itself (see #9) has improved. 4. Document: more examples, firewall discussion, and blather 5. Sopen: opens with TCP_NODELAY for the machines which support it -- this setting helps small packets get across the Net faster at the price of net efficiency (default behavior: tcp/ip bundles small packets together within some time interval). 6. AIX (IBM's risc machine) is now supported via 7. sktdbg: a) has an enhanced prompt: ( 0 bytes) Enter: It now tells you how many bytes were awaiting processing when the prompt was issued (ie. it uses Stest()). b) fwinit command: tells the PortMaster to re-initialize its firewall list. Good for whoever owns the firewall list to update it and then to tell the PortMaster to re-read it. c) a "close" bug was stomped on 8. Smaskwait : I'm not sure about the old release (Version 1.0) , so some of these functions may be new: Smaskfdset Smaskunfdset Smaskpush Smaskpop 9. Stest Speek: used to have problems with a killed socket. These functions now detect dead sockets (ie. return a -1). 10. The Sun Sparcstation operating system seems to use port 1540 for its own purposes, so the PortMaster's port was changed to be 1541 instead of 1540. The new port assignment works on all the other machines in the test group (SGI Personal Iris, SGI Extreme, Sun 3, Sun Sparcstation, IBM/AIX, DecStation/Ultrix, IBM-PC/MSDOS, DEC/VMS). --------------------------------------------------------------------- Version 1.0: This was the original (and lacked a version number, sigh...) --------------------------------------------------------------------- dmucs-0.6.1/COSMIC/DOC/README0000644000175000017500000001330410360753041013215 0ustar samsam S I M P L E S O C K E T S L I B R A R Y ----------- ------------- ------------- Charles E. Campbell, Jr. PhD. Terry McRoberts ===================================================================== 1. Current Version: 7c Tue Aug 23 09:03:41 EDT 2005 (an [a-z] suffix to your version number indicates that you have received a beta copy of the next release). 2. The Simple Sockets Library is public domain, and therefore may be copied and distributed freely. 3. You should have the following files: Makefile -- UNIX makefile -> simpleskts.a and executables Makelib. -- MSDOS/MicroSoft Library making commands Makeskt.bat -- MSDOS "makefile" -> smplskts.lib and executables Makeskt.com -- VMS "makefile" -> simpleskts.lib and executables -- Sockets Library Functions Saccept.c -- generate an Accept Socket from a Server Socket Sclose.c -- close any kind of Socket Sgets.c -- get a null-byte-terminated string from a Socket Smaskwait.c -- mask (group of) Socket support: Smaskwait Smaskset etc Smkskt.c -- internal: make a Socket Sopen.c -- open a Server or Client Socket Sopenv.c -- open a Server or Client Socket over a machine path Speek.c -- peek on a Socket Speeraddr.c -- returns the peer's IP address Speername.c -- returns the peer's name (a string) Sprintf.c -- print formatted i/o to a Socket Sprtskt.c -- return a string describing a Socket Sputs.c -- put a null-byte-terminated string onto a Socket Sread.c -- read available bytes from a Socket Sreadbytes.c -- read specified qty of bytes from a Socket Srmsrvr.c -- forcibly remove a Server from the PortMaster Sscanf.c -- read formatted i/o from a Socket Stest.c -- test if anything is available on a Socket Stimeoutwait.c -- set timeout parameters for Smaskwait Svprintf.c -- "vprintf" for a Socket Swait.c -- wait on a Socket Swrite.c -- write bytes onto a Socket -- "Extended I/O" Library Support cprt.c -- make a character into a visible string error.c -- give ***error***/warning/note messages fopenv.c -- fopen with search along an environment variable path outofmem.c -- check if memory allocation succeeded rdcolor.c -- make GREEN, UYELLOW, etc escape-sequence strings rdcolor.dat -- specifies GREEN etc escape-sequences for various terminals sprt.c -- make a string into a completely-visible'ized version srmtrblk.c -- remove trailing white space from a string stpblk.c -- return a ptr to first non-white-space character stpnxt.c -- return a ptr past a format-code specified (ex. %d) string strnxtfmt.c -- returns a ptr to the end of a format code ./DOC: History -- History, differences, and updates file README -- This file porting.doc -- Directions on how to port the Simple Sockets Library (sockets.ps -- PostScript document source, not always distributed) sockets.tex -- LaTeX document source, used to create ./EXAMPLES: multiskt.c -- Multiple client example program oobrecv.c -- How to receive out-of-band data oobsend.c -- How to send out-of-band data sktpoll.c -- Client polling for a server to open example sktsig.c -- Sockets and SIGIO handling (unix) smclient.c -- A real small client example smsrvr.c -- A real small server example Makefile -- Used to make these examples ./EXE: Spm.c -- The PortMaster sktdbg.c -- Simple Sockets Library Debugger spmchk.c -- PortMaster presence detector: Returns 0/1 status for testing if the PortMaster is running spmtable.c -- Gets tables of current servers the PortMaster has srmsrvr.c -- Remove servers from a PortMaster Makefile -- Used to make these utilities ./HDR: rdcolor.h -- BLACK, RED, GREEN, ... support sockets.h -- The Simple Sockets Library header file xstdlib.h -- For those sorry machines without xtdio.h -- "Extended I/O" Library (partial) header file ./AS400: -- Steve Richard's AS/400 Port ADUCBAT -- cl will compile library modules ADUCBATB -- cl will compile and bind executables AS400.NOTES -- notes on Steve Richard's modifications READ.ME -- file containing explanation of scripts RUNAU17 -- Spm will auto-start a server adusslbnd -- binder export file that crtsslsrv uses crtsslsrv -- cl will create service program after module compiling startau17w -- supports the RUNAU17 command 4. Check out for better use of color terminals. If your sktdbg, for example, appears in monochrome, you may have to modify to support your terminal. Some machines (such as PCs) may not have the environment variable TERM set. More info on this is in . 5. The latest version is available via the web: http://www.erols.com/astronaut/ssl However, that website is due to change soon (by Sep 2004) to http://www.verizon.net/astronaut/ssl Charles E Campbell, Jr., Ph.D. dmucs-0.6.1/COSMIC/DOC/porting.doc0000644000175000017500000000730310360753041014510 0ustar samsam Porting the Simple Sockets Library Dr. Charles E. Campbell, Jr. 1. Most SSL porting issues are handled in the header file, "sockets.h". The leading portion of the file has several machine specific sections: #ifdef vms ... #endif #ifdef apollo ... #endif #ifdef sgi ... #endif etc. These machine specific sections mostly contain #include stuff; your new machine section must be set up to include the appropriate header files, too, but they'll probably have nearly the same set of header file names. Each machine section also usually has a #ifdef SSLNEEDTIME ... #endif subsection which includes the time header file information needed by select(). 2. Some machines have case insensitive linkers, such as MS-DOS. The usual solution is to put # define Sscanf Sktscanf # define Sprintf Sktprintf in the machine-specific section. 3. There are three options for the SSL that support different machines: #define SSLNOSETSOCKOPT #define SSLNOPEEK #define SSLNEEDTOSHAREPM The SSLNOSETSOCKOPT is for those machines whose Berkeley sockets API does not support the setsockopt() function (or, if present, doesn't support the TCP_NODELAY option). The SSLNOPEEK is for those machines whose Berkeley sockets API does not support the MSG_PEEK option on a recv(). The SSLNEEDTOSHAREPM is for those machines which lack multi-tasking; ie. cannot run a PortMaster in the background. Those machines need to share another machine's PortMaster for any servers to be run on them. Clients are unaffected. 4. There are a few MSDOS exceptions in and . The ones initialize the WIN/API DOS Socket Library. If your tcp/ip Berkeley sockets requires a call to some initialization function, this is the place to do it. The MSDOS exceptions support MicroSoft C's requirement to have its first argument to va_start() and va_arg() be "char *" instead of "void *". 5. Some middle-aged C compilers allowed prototyping, but were not ANSI-C compliant. In , at or near line 78, is a preprocessor block: # if defined(sgi) || defined(apollo) || defined(__STDC__) || \ defined(MSDOS) || defined(MCH_AMIGA) || defined(__osf__) # define __PROTOTYPE__ ... If your machine's compiler fits this bill, you should (this is not required, merely suggested) put it on the #if defined() ... list of machines so that the compiler would use prototyping. Prototyping will likely save you some syntax errors in your future. One caveat: the cprt() and sprt() functions use the keyword "const". Your middle-aged C compiler may, or may not, support that keyword. If not, you'll be getting some syntax errors from the line near the prototypes for those two functions. The solution is simple: in near line 94 is #define const buried inside a comment about this problem. Move that line out of the comment, and the "const" problems should disappear. 6. SCO/Unix sockets: You may need additional network products such as SCO Unix 3.2v4: - SCO Unix runtime - SCO Unix Development System - SCO TCP/IP Runtime - SCO TCP/IP Development System Open Desktop 2 or 3: ODT Development System OpenServer 5: all include files and libraries are already supplied with the o/s Note -- I (C Campbell) have never used SCO, so I can not personally attest as to what your SCO variant may or may not need. dmucs-0.6.1/COSMIC/DOC/sockets.ps0000644000175000017500000111657310360753042014372 0ustar samsam%!PS-Adobe-2.0 %%Creator: dvips(k) 5.95a Copyright 2005 Radical Eye Software %%Title: sockets.dvi %%Pages: 35 %%PageOrder: Ascend %%BoundingBox: 0 0 596 842 %%EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips sockets -o sockets.ps %DVIPSParameters: dpi=600, compressed %DVIPSSource: TeX output 2005.08.23:0903 %%BeginProcSet: texc.pro 0 0 %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr 1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B /chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ /cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 {2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ 1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) (LaserWriter 16/600)]{A length product length le{A length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end %%EndProcSet TeXDict begin 39158280 55380996 1000 600 600 (sockets.dvi) @start %DVIPSBitmapFont: Fa cmss12 12 34 /Fa 34 123 df<14F0497EA2805CA50018EC0180007CEC03E000FFEC0FF00181131F01C1 133F01F113FF267FF9F913E0001FB612800007ECFE00000114F86C5C013F13C0010F90C7 FCA2013F13C090B512F04880000714FE001FECFF80267FF9F913E026FFF1F813F001C113 3F0181131F0101130F007CEC03E00018EC0180000091C7FCA5805CA26D5A242C7ACA31> 42 D<12FFA8080877871B>46 D67 D72 D76 DII 80 D82 DI85 D87 D97 DIIII103 DII107 D<12FFB3B3B3AF084579C4 17>IIIII< 141F00FE13FF13035B131F5B5BEBFFF0148038FFFE005B5B5B5B5BA25BA390C7FCB3A818 2D79AC21>114 DIII119 DI< B415FFA27F007FEC01FE7F123FED03FC7F001FEC07F87F120FED0FF07F12076DEB1FE012 0316C06C6C133FA216806C6C137FA26D14006E5A5D133F14C1011F5BA2ECE1F8EB0FE3A2 01075B14F3A2903803F7E0A201015BA2EB00FF5DA2147F92C7FCA2147E14FEA25C1301A2 5C13035C13075CEA400F38781FC0EA7FFF5C91C8FC5B5BEA0FF028407EAB2D>I<007FB6 12E0A516C0C8138016005C4A5A4A5AA24A5A4A5A4A5AA24A5A4A5A92C7FC5B495A495AA2 495A495A5C133F495A495AA24890C8FC485A485AA2485A485A5B123F48B612E0B7FCA523 2C7DAB2A>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fb cmtt12 14.4 6 /Fb 6 117 df<383FFF805AB57EA37E7EEA003FAEED07FC92383FFF8092B512E002C314 F802CF8002DF8091B7FCDBF80F1380DBC00113C092C713E04A143F4AEC1FF04A15F84A14 0F4AEC07FCA217034A15FE1701A318FF83A95F18FEA280170318FC6E140718F86E140FEF 1FF06E143F6EEC7FE06EECFFC0DBC0031380EDF01F92B6120002DF14FC02CF5C02C35CD9 1F8114C090260F807F90C7FC90C7EA0FF8384A7FC83E>98 D<923803FFF85D4B7FA38181 ED0003AEEC1FF0ECFFFE0103EBFF83010F14E34914F3017F14FB90B7FC48EBF80F48EBC0 0191C7FC4848143F4848141F5B4848140F491407123F491403127F5BA312FF90C8FCA97F 127FA216077F123F6D140FA26C6C141F6D143F000F157F6C6C14FF01FF5B6C6D5A6CD9F0 1FEBFFFC6C90B500FB13FE6D02F313FF6D14E3010F14C36D020113FE010101FC14FC9026 003FE0C8FC384A7CC83E>100 D103 D107 D<903901FFF00F011F9038FE1F8090B612BF000315FF5A5A5A393FFE003F01F013 07D87FC0130190C8FC5A48157FA47EEE3F00D87FC091C7FC13F0EA3FFE381FFFF06CEBFF C06C14FE6C6E7EC615E0013F14F8010780D9003F7F02007F03071380030013C0003EED3F E0007F151F48150F17F06D1407A37FA26D140F6D15E0161F01FCEC3FC06D14FF9026FFC0 0F138091B612005E485D013F5C6D14E0D8FC0714802778007FF8C7FC2C3677B43E>115 D<147C14FC497EAD003FB712FC5AB87EA36C5EA2260001FEC9FCB3A6173FA2EF7F80A76E 14FF6D16006F5A9238C007FE91387FF01F92B55A6E5C6E5C6E5C6E1480020149C7FC9138 003FF031437DC13E>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fc cmbx12 14.4 43 /Fc 43 122 df<151E153E157E15FCEC01F8EC07F0EC0FE0EC1FC01580143FEC7F0014FE 1301495A5C1307495AA2495A133F5C137FA2495AA24890C7FCA25A5BA21207A2485AA312 1F5BA3123FA25BA3127FA55B12FFB3A3127F7FA5123FA37FA2121FA37F120FA36C7EA212 03A27F7EA26C7FA26D7EA2133F80131F6D7EA26D7E1303806D7E1300147FEC3F80141F15 C0EC0FE0EC07F0EC01F8EC00FC157E153E151E1F7973D934>40 D<127012F8127C127E7E EA1FC06C7E6C7E12037F6C7E6C7E7F6D7E133F806D7EA26D7E80130780A26D7EA26D7EA2 15807FA215C0A2EC7FE0A315F0143FA315F8A2141FA315FCA5140F15FEB3A315FC141FA5 15F8A3143FA215F0A3147F15E0A3ECFFC0A21580A25B1500A2495AA2495AA25C130F5C49 5AA2495A5C137F49C7FC5B485A485A5B1207485A485A48C8FC127E127C5A12701F7979D9 34>I45 DI<157815FC14031407141F14FF130F0007B5FCB6FCA2147F13 F0EAF800C7FCB3B3B3A6007FB712FEA52F4E76CD43>49 DI<91380FFFC091B512FC0107ECFF80011F15E090263FF8077F9026FF800113FC4848 C76C7ED803F86E7E491680D807FC8048B416C080486D15E0A4805CA36C17C06C5B6C90C7 5AD801FC1680C9FC4C13005FA24C5A4B5B4B5B4B13C04B5BDBFFFEC7FC91B512F816E016 FCEEFF80DA000713E0030113F89238007FFE707E7013807013C018E07013F0A218F8A270 13FCA218FEA2EA03E0EA0FF8487E487E487EB57EA318FCA25E18F891C7FC6C17F0495C6C 4816E001F04A13C06C484A1380D80FF84A13006CB44A5A6CD9F0075BC690B612F06D5D01 1F1580010302FCC7FCD9001F1380374F7ACD43>I<177C17FEA2160116031607160FA216 1F163F167FA216FF5D5DA25D5DED1FBFED3F3F153E157C15FCEC01F815F0EC03E01407EC 0FC01580EC1F005C147E147C5C1301495A495A5C495A131F49C7FC133E5B13FC485A5B48 5A1207485A485A90C8FC123E127E5ABA12C0A5C96C48C7FCAF020FB712C0A53A4F7CCE43 >III<91380FFF8091B512F8010314FE010F6E7E49 01037F90267FF8007F4948EB3FF048496D7E484980486F7E484980824817805A91C714C0 5A7013E0A218F0B5FCA318F8A618FCA46C5DA37EA25E6C7F6C5DA26C5D6C7F6C6D137B6C 6D13F390387FF803011FB512E36D14C30103028313F89039007FFE03EC00401500A218F0 5EA3D801F816E0487E486C16C0487E486D491380A218005E5F4C5A91C7FC6C484A5A494A 5A49495B6C48495BD803FC010F5B9027FF807FFEC7FC6C90B55A6C6C14F06D14C0010F49 C8FC010013F0364F7ACD43>57 D68 D<932601FFFCEC01C0047FD9FFC013030307B600F81307033F03FE13 1F92B8EA803F0203DAE003EBC07F020F01FCC7383FF0FF023F01E0EC0FF94A01800203B5 FC494848C9FC4901F8824949824949824949824949824990CA7E494883A2484983485B1B 7F485B481A3FA24849181FA3485B1B0FA25AA298C8FC5CA2B5FCAE6C057FB712E0A280A3 6C94C7003FEBC000A36C7FA36C7FA27E6C7FA26C7F6C7FA26D7E6D7F6D7F6D6D5E6D7F6D 01FC93B5FC6D13FF6D6C6D5C6E01F0EC07FB020F01FEEC1FF10203903AFFF001FFE00200 91B6EAC07F033FEE001F030703FC1307DB007F02E01301040149CAFC5B5479D26A>71 DI77 D<93380FFFC00303B6FC031F15E092B712FC0203D9FC0013FF020F01C0010F13C0023F90 C7000313F0DA7FFC02007F494848ED7FFE4901E0ED1FFF49496F7F49496F7F4990C96C7F 49854948707F4948707FA24849717E48864A83481B804A83481BC0A2481BE04A83A2481B F0A348497113F8A5B51AFCAF6C1BF86E5FA46C1BF0A26E5F6C1BE0A36C6D4D13C0A26C6D 4D1380A26C1B006C6D4D5A6E5E6C626D6C4C5B6D6D4B5B6D6D4B5B6D6D4B5B6D6D4B5B6D 6D4B90C7FC6D6D4B5A6D01FF02035B023F01E0011F13F0020F01FC90B512C0020390B7C8 FC020016FC031F15E0030392C9FCDB001F13E0565479D265>79 DI82 D<91260FFF80130791B500F85B010702FF5B011FEDC0 3F49EDF07F9026FFFC006D5A4801E0EB0FFD4801800101B5FC4848C87E48488149150F00 1F824981123F4981007F82A28412FF84A27FA26D82A27F7F6D93C7FC14C06C13F014FF15 F86CECFF8016FC6CEDFFC017F06C16FC6C16FF6C17C06C836C836D826D82010F82130301 0082021F16801400030F15C0ED007F040714E01600173F050F13F08383A200788200F882 A3187FA27EA219E07EA26CEFFFC0A27F6D4B13806D17006D5D01FC4B5A01FF4B5A02C04A 5A02F8EC7FF0903B1FFFC003FFE0486C90B65AD8FC0393C7FC48C66C14FC48010F14F048 D9007F90C8FC3C5479D24B>I<003FBC1280A59126C0003F9038C0007F49C71607D87FF8 060113C001E08449197F49193F90C8171FA2007E1A0FA3007C1A07A500FC1BE0481A03A6 C994C7FCB3B3AC91B912F0A553517BD05E>IIII97 D<913801FFF8021FEBFF 8091B612F0010315FC010F9038C00FFE903A1FFE0001FFD97FFC491380D9FFF05B4817C0 48495B5C5A485BA2486F138091C7FC486F1300705A4892C8FC5BA312FFAD127F7FA27EA2 EF03E06C7F17076C6D15C07E6E140F6CEE1F806C6DEC3F006C6D147ED97FFE5C6D6CEB03 F8010F9038E01FF0010390B55A01001580023F49C7FC020113E033387CB63C>99 D<4DB47E0407B5FCA5EE001F1707B3A4913801FFE0021F13FC91B6FC010315C7010F9038 E03FE74990380007F7D97FFC0101B5FC49487F4849143F484980485B83485B5A91C8FC5A A3485AA412FFAC127FA36C7EA37EA26C7F5F6C6D5C7E6C6D5C6C6D49B5FC6D6C4914E0D9 3FFED90FEFEBFF80903A0FFFC07FCF6D90B5128F0101ECFE0FD9003F13F8020301C049C7 FC41547CD24B>I<913803FFC0023F13FC49B6FC010715C04901817F903A3FFC007FF849 486D7E49486D7E4849130F48496D7E48178048497F18C0488191C7FC4817E0A248815B18 F0A212FFA490B8FCA318E049CAFCA6127FA27F7EA218E06CEE01F06E14037E6C6DEC07E0 A26C6DEC0FC06C6D141F6C6DEC3F806D6CECFF00D91FFEEB03FE903A0FFFC03FF8010390 B55A010015C0021F49C7FC020113F034387CB63D>II< DA3FFF14FF0103B5D8F00713C0010FDAFC1F13E0013FECFF7F90267FFC0F9038FF9FF090 26FFE001EBF83F48496C13E0484990387FF01F4890C7D83FF813E0489338FC0FC0F00780 48486E6CC7FCA2003F82A9001F5EA26C6C4A5AA26C5E6C6D495A6C6D495A6C6D485BDAFC 0F5B4890B6C8FCD803EF14FC01C314F02607C03F90C9FC91CBFCA2120FA37FA213F813FE 90B7FC6C16F817FF18C06C836C836C836D828448B9FC12074848C700031480D81FF8EC00 3F4848150748486F13C083485A83A56D5D007F18806D5D003F18006C6C4B5AD80FFEED1F FC6C6C6CEC7FF86C01E049485A6C01FE011F5B6C6CB71280010F03FCC7FC010115E0D900 0F01FCC8FC3C4F7CB543>II<137F497E000313E0487FA2487FA7 6C5BA26C5BC613806DC7FC90C8FCADEB3FF0B5FCA512017EB3B3A6B612E0A51B547BD325 >I108 DII<913801FFE0021F13FE91B612C0010315F0010F9038 807FFC903A1FFC000FFED97FF86D6C7E49486D7F48496D7F48496D7F4A147F48834890C8 6C7EA24883A248486F7EA3007F1880A400FF18C0AC007F1880A3003F18006D5DA26C5FA2 6C5F6E147F6C5F6C6D4A5A6C6D495B6C6D495B6D6C495BD93FFE011F90C7FC903A0FFF80 7FFC6D90B55A010015C0023F91C8FC020113E03A387CB643>I<903A3FF001FFE0B5010F 13FE033FEBFFC092B612F002F301017F913AF7F8007FFE0003D9FFE0EB1FFFC602806D7F 92C76C7F4A824A6E7F4A6E7FA2717FA285187F85A4721380AC1A0060A36118FFA2615F61 6E4A5BA26E4A5B6E4A5B6F495B6F4990C7FC03F0EBFFFC9126FBFE075B02F8B612E06F14 80031F01FCC8FC030313C092CBFCB1B612F8A5414D7BB54B>I<90397FE003FEB590380F FF80033F13E04B13F09238FE1FF89139E1F83FFC0003D9E3E013FEC6ECC07FECE78014EF 150014EE02FEEB3FFC5CEE1FF8EE0FF04A90C7FCA55CB3AAB612FCA52F367CB537>114 D<903903FFF00F013FEBFE1F90B7FC120348EB003FD80FF81307D81FE0130148487F4980 127F90C87EA24881A27FA27F01F091C7FC13FCEBFFC06C13FF15F86C14FF16C06C15F06C 816C816C81C681013F1580010F15C01300020714E0EC003F030713F015010078EC007F00 F8153F161F7E160FA27E17E07E6D141F17C07F6DEC3F8001F8EC7F0001FEEB01FE9039FF C00FFC6DB55AD8FC1F14E0D8F807148048C601F8C7FC2C387CB635>I<143EA6147EA414 FEA21301A313031307A2130F131F133F13FF5A000F90B6FCB8FCA426003FFEC8FCB3A9EE 07C0AB011FEC0F8080A26DEC1F0015806DEBC03E6DEBF0FC6DEBFFF86D6C5B021F5B0203 13802A4D7ECB34>II119 D<007FB500F090387FFFFEA5C66C48C7000F90C7FC6D6CEC07 F86D6D5C6D6D495A6D4B5A6F495A6D6D91C8FC6D6D137E6D6D5B91387FFE014C5A6E6C48 5A6EEB8FE06EEBCFC06EEBFF806E91C9FCA26E5B6E5B6F7E6F7EA26F7F834B7F4B7F92B5 FCDA01FD7F03F87F4A486C7E4A486C7E020F7FDA1FC0804A486C7F4A486C7F02FE6D7F4A 6D7F495A49486D7F01076F7E49486E7E49486E7FEBFFF0B500FE49B612C0A542357EB447 >II E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fd cmmi12 12 1 /Fd 1 60 df<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E013C0A312011380 120313005A1206120E5A5A5A12600B1D78891B>59 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fe cmti12 12 52 /Fe 52 122 df<4CB414FC040F9039C003FF80933B3F81F00783C0933B7C00781F01E04C 9038F83F03923C01F001FC3E07F003030103EB7E0F922607E007EB7C1F19FCDB0FC001F8 14E0943A03F0F80FC0DD01E1EB0780031FD9000190C7FC5E180361153F93C7FCA2180761 5D157EA2180F6115FE91B912F0A3DA00FCC7D81F80C7FC1401A25D183F96C8FCA214035D A260187E14075DA218FE60140F5DA2170160141F5DA2170360143F92C7FCA21707605C14 7EA2170F6014FE5CA24D5AA2495A95C9FC5F5C0103153E177E001CEBE038007F02FE137C 26FF07E114FC02C15C4C5AEB0F8100FE903901FC03E0D8F81F9038F007C03B701E00E00F 80D8783CD9F83ECAFCD81FF0EB3FF8D807C0EB0FE04C5A83C53C>11 DI I<01F013783903F801FC3907FC03FE000F1307A63903CC01E639001C000E0118130CA201 38131C01301318A201701338491370491360000114E04913C0000313013907000380000E EB070048130E485B485B485B4813601F1D6FC432>34 D<167016E0ED01C0ED0380ED0700 150E153C5D15F85D4A5A4A5A4A5A140F4AC7FC141E143E5C147814F8495A5C1303495AA2 495AA249C8FCA25B133E137E137CA25BA212015BA212035BA212075BA2120FA25BA2121F A290C9FCA25AA2123EA3127EA2127CA65AAB1278A6127C123CA47EA2120E120FA27E6C7E A26C7EA26C7E1360246472CA28>40 D<1560A2157081A281151E150E150FA2811680A3ED 03C0A516E0A21501A71503A91507A216C0A4150FA21680A2151FA21600A25DA2153EA215 7EA2157C15FCA25D1401A25D14035DA214075D140F5DA24AC7FCA2143EA25C147814F849 5AA2495A5C1307495A91C8FC131E133E5B13785B485A485A485A48C9FC121E5A5A12E05A 23647FCA28>II<13F0EA03FC1207A2EA0FFEA4EA07FCEA03CCEA000C131C1318A2 133813301370136013E0EA01C013801203EA0700120E5A5A5A5A5A0F1D7A891E>44 D<007FB5FCB6FCA214FEA21805789723>I<120FEA3FC0127FA212FFA31380EA7F00123C 0A0A76891E>I<14F0EB01FC1303EB07FE130FA214FCEB07F814F0EB01E090C7FCB3A513 F0EA03F8487EA2120FA46C5AEA03D8EA001813381330A21370136013E05B12015B120348 C7FC1206120E5A5A5A5A5A173E7AAA1E>59 D63 D65 D67 D<91B912C0A30201902680000313806E90C8127F4A16 3F191F4B150FA30203EE07005DA314074B5D190EA2140F4B1307A25F021F020E90C7FC5D A2171E023F141C4B133C177C17FC027FEB03F892B5FCA39139FF8003F0ED00011600A249 5D5CA2160101034B13705C19F061010791C8FC4A1501611803010F5F4A150796C7FC6013 1F4A151E183E183C013F167C4A15FC4D5A017F1503EF0FF04A143F01FF913803FFE0B9FC A26042447AC342>69 D<91B91280A30201902680000713006E90C8FC4A163FA24B81A302 03160E5DA314074B151E191CA2140F5D17075F021F020E90C7FC5DA2171E023F141C4B13 3CA2177C027F5CED800392B5FCA291B65AED00071601A2496E5A5CA2160101035D5CA216 0301075D4A90CAFCA3130F5CA3131F5CA3133F5CA2137FA313FFB612E0A341447AC340> I<91B6D8803FB512E0A302010180C7387FE0006E90C86C5A4A167FA24B5EA219FF14034B 93C7FCA26014074B5DA21803140F4B5DA21807141F4B5DA2180F143F4B5DA2181F147F92 B75AA3DAFF80C7123F92C85BA2187F5B4A5EA218FF13034A93C8FCA25F13074A5DA21703 130F4A5DA21707131F4A5DA2170F133F4A5DA2017F151FA24A5D496C4A7EB6D8803FB512 E0A34B447AC348>72 D<91B612F0A25F020101C0C7FC6E5B4A90C8FCA25DA314035DA314 075DA3140F5DA3141F5DA3143F5DA3147F5DA314FF92C9FCA35B5CA3010316104A1538A2 1878010716705C18F018E0010F15015C18C01703011F15074A1580170FA2013FED1F004A 5C5F017F15FE16034A130F01FFEC7FFCB8FCA25F35447AC33D>76 D<91B56C93387FFFC08298B5FC02014DEBC0006E614A5FA203DF4C6CC7FC1A0E63912603 CFE05D038F5F1A381A711407030FEEE1FCA2F101C3020FEE0383020E60F107036F6C1507 021E160E021C60191CF1380F143C023804705BA2F1E01F0278ED01C091267003F85EF003 801A3F02F0ED070002E0030E5CA24E137F130102C04B91C8FC606201036D6C5B02805F4D 5A943803800113070200DA07005BA2050E1303495D010E606F6C5A1907011E5D011C4B5C A27048130F133C01384B5C017892C7FC191F01F85C486C027E5DD807FE027C4A7EB500F0 0178013FB512C0A216705A447AC357>I<91B56C49B512E0A28202009239000FFC00F107 F0706E5A4A5F15DF705D1907EC03CFDB8FF892C7FCA203875D02077F0303150EA270141E EC0F01020E161C826F153C141E021C6E1338167F1978023C800238013F1470A27113F002 78131F02705E83040F130102F014F84A5E1607EFFC0313014A01035C17FE180701031401 4A02FF90C8FCA2705B0107168F91C8138E177F18DE5B010EED3FDC18FCA2011E151F011C 5EA2170F133C01386F5A1378A201F81503486C5EEA07FEB500F01401A2604B447AC348> II<91B712F018FEF0FF800201903980007FE06E90C7EA1FF04AED07F818034B15FC F001FE1403A24B15FFA21407A25DA2140FF003FE5DA2021F16FC18074B15F8180F023F16 F0F01FE04B15C0F03F80027FED7F0018FE4BEB03FCEF0FF002FFEC7FC092B6C7FC17F892 CAFC5BA25CA21303A25CA21307A25CA2130FA25CA2131FA25CA2133FA25CA2137FA25C49 7EB67EA340447AC342>I<91B77E18F818FE020190398001FF806E90C7EA3FC04AED1FE0 F00FF04BEC07F8180319FC14034B15FEA314075DA3020FED07FC5DA2F00FF8141F4B15F0 F01FE0F03FC0023F16804BEC7F0018FEEF03F8027F4A5A4BEB1FC04CB4C7FC92B512F891 B612E092380003F8EE00FE177F496F7E4A6E7EA28413034A140FA2171F13075CA2173F13 0F5CA24D5A131F5CA3013F170E5CA2017FEE801E191C4A163C496C1638B66C90383FC070 051F13F094380FE1E0CA3803FF80943800FE003F467AC347>82 DI<48B912F85AA2913B0007FC001FF0D807F84A130701 E0010F140349160148485C90C71500A2001E021F15E05E121C123C0038143F4C13010078 18C0127000F0147F485DA3C800FF91C7FC93C9FCA35C5DA314035DA314075DA3140F5DA3 141F5DA3143F5DA3147F5DA314FF92CAFCA35B5CA21303A21307497E007FB612C0A25E3D 446FC346>I<001FB500F090383FFFFCA326003FF0C7000113806D48913800FE00013F16 7C18785C187018F0017F5E5CA2170101FF5E91C8FCA21703485F5BA21707000394C7FC5B A25F0007160E5BA2171E120F49151CA2173C121F491538A21778123F491570A217F0127F 495DA2160100FF5E90C8FCA216035F16074893C8FC5E160E161E5E007E1538007F15785E 6C4A5A6D495A001F4A5A6D49C9FC6C6C133E6C6C13F83903FC07F0C6B512C0013F90CAFC EB07F83E466DC348>I<010C1306011C130E49131C491338491370484813E04913C00003 13013907000380000EEB0700000C1306001C130E0018130C0038131C0030131800701338 00601330A200E0137000CFEB678039FFC07FE0A6018013C0397F003F80003CEB1E001F1D 65C432>92 D97 DIIIII<15FCEC03FF91 390F83838091393E01CFC091387C00EF4A13FF4948137F010315804948133F495A131F4A 1400133F91C75A5B167E13FE16FE1201495CA215011203495CA21503A2495CA21507A25E A2150F151F5E0001143F157F6C6C13FF913801DF8090387C039F90383E0F3FEB0FFCD903 F090C7FC90C7FC5DA2157EA215FEA25DA2001C495A127F48495A14074A5A485C023FC8FC 00F8137E387C01F8381FFFE0000390C9FC2A407BAB2D>I<14FE137FA3EB01FC13001301 A25CA21303A25CA21307A25CA2130FA25CA2131FA25C157F90393F83FFC091388F81F091 381E00F802387F4948137C5C4A137EA2495A91C7FCA25B484814FE5E5BA2000314015E5B A2000714035E5B1507000F5DA249130F5E001F1678031F1370491480A2003F023F13F0EE 00E090C7FC160148023E13C01603007E1680EE070000FEEC1E0FED1F1E48EC0FF80038EC 03E02D467AC432>I<143C147E14FE1301A3EB00FC14701400AE137C48B4FC3803C78038 0703C0000F13E0120E121C13071238A21278EA700F14C0131F00F0138012E0EA003F1400 A25B137EA213FE5B12015BA212035B141E0007131C13E0A2000F133CEBC038A21478EB80 7014F014E0EB81C0EA0783EBC7803803FE00EA00F8174378C11E>I<16F0ED03F8A21507 A316F0ED01C092C7FCAEEC01F0EC07FCEC1E1EEC380F0270138014E0130114C0EB038001 07131F1400A2130E153F131E011C140090C7FC5DA2157EA215FEA25DA21401A25DA21403 A25DA21407A25DA2140FA25DA2141FA25DA2143FA292C7FCA25C147EA214FE001C5B127F 48485A495AA248485A495AD8F81FC8FCEA707EEA3FF8EA0FC0255683C11E>I<14FE137F A3EB01FC13001301A25CA21303A25CA21307A25CA2130FA25CA2131FA25C167E013F49B4 FC92380783C09138000E07ED3C1F491370ED603F017E13E0EC01C09026FE038013809139 07000E00D9FC0E90C7FC5C00015B5C495AEBF9C03803FB8001FFC9FCA214F03807F3FCEB F07F9038E01FC06E7E000F130781EBC003A2001F150FA20180140EA2003F151E161C0100 13E0A2485DA2007E1578167000FE01015B15F1489038007F800038021FC7FC2A467AC42D >IIIIII<91381F800C91387FE01C903901F0703C903907C038789039 0F801CF890381F001D013E130F017E14F05B48481307A2484814E012075B000F140F16C0 485AA2003F141F491480A3007F143F90C71300A35D00FE147EA315FE5DA2007E1301A24A 5A1407003E130FA26C495A143B380F80F33807C3E73901FF87E038007E071300140F5DA3 141F5DA3143F92C7FCA25CA25C017F13FEA25D263F76AB2D>III<1470EB01F8A313035CA313075CA3130F5C A3131F5CA2007FB512E0B6FC15C0D8003FC7FCA25B137EA313FE5BA312015BA312035BA3 12075BA3120F5BA2EC0780001F140013805C140E003F131EEB001C143C14385C6C13F049 5A6C485AEB8780D807FEC7FCEA01F81B3F78BD20>I<137C48B414072603C780EB1F8038 0703C0000F7F000E153F121C0107150012385E1278D8700F147E5C011F14FE00F05B00E0 5DEA003FEC0001A2495C137E150313FE495CA215071201495CA2030F13380003167849EC C070A3031F13F0EE80E0153F00011581037F13C06DEBEF8300000101148090397C03C787 903A3E0F07C70090391FFE01FE903903F000782D2D78AB34>I<017C143848B414FC3A03 C78001FE380703C0000F13E0120E001C14000107147E1238163E1278D8700F141E5C131F 00F049131C12E0EA003F91C7123C16385B137E167801FE14705BA216F0000115E05B1501 16C0A24848EB0380A2ED0700A2150E12015D6D5B000014786D5B90387C01E090383F0780 D90FFFC7FCEB03F8272D78AB2D>I<017CEE038048B4020EEB0FC02603C780013FEB1FE0 380703C0000E7F5E001C037E130F01071607123804FE130300785DEA700F4A1501011F13 0100F001804914C012E0EA003FDA000314034C14805B137E0307140701FE1700495CA203 0F5C0001170E495CA260A24848495A60A2601201033F5C7F4B6C485A000002F713036D90 39E7E0078090267E01C349C7FC903A1F0781F81E903A0FFF007FF8D901FCEB0FE03B2D78 AB41>I<02F8133FD907FEEBFFE0903A0F0F83C0F0903A1C07C780F890393803CF030170 13EE01E0EBFC07120101C013F8000316F00180EC01C000074AC7FC13001407485C120EC7 FC140F5DA3141F5DA3143F92C8FCA34AEB03C01780147EA202FEEB0700121E003F5D267F 81FC130E6E5BD8FF83143CD903BE5B26FE079E5B3A7C0F1F01E03A3C1E0F83C0271FF803 FFC7FC3907E000FC2D2D7CAB2D>I<137C48B414072603C780EB1F80380703C0000F7F00 0E153F001C1600130712385E0078157EEA700F5C011F14FE00F0495B12E0EA003FEC0001 5E5B137E150301FE5C5BA2150700015D5BA2150F00035D5BA2151F5EA2153F12014BC7FC 6D5B00005BEB7C0390383E0F7EEB1FFEEB03F090C712FE5DA214015D121F397F8003F0A2 4A5A4848485A5D48131F00F049C8FC0070137E007813F8383801F0381E07C06CB4C9FCEA 01FC294078AB2F>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Ff cmtt12 12 83 /Ff 83 127 df<121C127FEAFF80B3A3EA7F00B3A2123EC7FCA9121C127FA2EAFF80A3EA 7F00A2121C093E6BBD33>33 D<00085B003EEB07C0007FEB0FE0A24814F0A26C14E0B3A2 007E1307003E14C0A20008EB01001C1E75BD33>I<903903E001F0A2496C487EA8010F13 07A202E05BA4007FB712E0A2B812F0A36C16E06C16C03B001FC00FE000013F131FA20280 5BA9017F133FA202005B003FB712C04816E0B812F0A36C16E0A2C648C66CC7FCA400015C A2495BA86C48137CA22C3D7DBC33>I<1438147C14FCA5903803FF80011F13F0017F13FC 48B6FC4815804815C0260FFEFD13E0391FF0FC3FD83FC0EB1FF00180EB07F8EA7F00007E 140316FC481401A21503A46CEC01F8ED0060007F15001380EA3FC013F0EA1FFCEA0FFF6C 7F6CEBFFC06C14F06C14FC013F7F01077F0100148016C09138FC7FE0ED1FF0150FED07F8 15031501003C15FC127EB41400A45AA26CEC01F87E15030180EB07F0D83FC0130F01E0EB 1FE0D81FF0EB3FC0390FFEFDFF6CB612806C15006C14FC6C5C011F13E0010390C7FCEB00 FCA5147C1438264D7AC433>I38 DI<140FEC3F80147F14FF491300495AEB07F8495A495A495A495A49C7FC5B12015B48 5A12075B120F5B121F5BA2123F5BA2127F90C8FCA45A5AAD7E7EA47F123FA27F121FA27F 120F7F12077F12036C7E7F12007F6D7E6D7E6D7E6D7E6D7EEB03FE6D7E6D1380147F143F EC0F00194D6FC433>I<127812FE7E7F6C7E6C7EEA0FF06C7E6C7E6C7E6C7E6D7E133F80 131F6D7E801307801303801301A2801300A28080A41580143FAD147F1500A45C5CA21301 5CA213035C13075C130F5C495A133F5C137F49C7FC485A485A485A485AEA3FE0485A485A 90C8FC5A1278194D78C433>I<14F0497EA8007015E000F8EC01F000FE140700FF140F01 C1133F01F113FF263FF9F913C0000FB61200000314FCC614F06D5B011F1380D907FEC7FC 90381FFF80017F13E090B57E000314FC000F14FF263FF9F913C026FFF1F813F001C1133F 0101130F00FE140700F814010070EC00E000001500A86D5A242B79B333>I<141FA24A7E B0007FB71280A2B812C0A36C1680A2C7D83F80C7FCB06EC8FCA22A2B7CB333>II<007FB612FEA2B8FCA36C15FEA22807 7BA133>I<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B0B6C8A33>I<167816F8 ED01FCA21503A2ED07F8A2ED0FF0A2ED1FE0A216C0153FA2ED7F80A2EDFF00A24A5AA25D 1403A24A5AA24A5AA24A5AA25D143FA24A5AA24AC7FCA2495AA25C1303A2495AA2495AA2 5C131FA2495AA2495AA249C8FCA25B1201A2485AA2485AA2485AA25B121FA2485AA2485A A248C9FCA25AA2127CA2264D7AC433>I<14FF010313C0010F13F0497F497F497F9038FF 81FF3A01FE007F804848EB3FC049131F4848EB0FE0A24848EB07F0A24848EB03F8A24848 EB01FCA348C812FEA4007E157E00FE157FAE6C15FF6C15FEA46D1301003F15FCA26D1303 001F15F8A26C6CEB07F0A26C6CEB0FE06D131F6C6CEB3FC0A26CB4EBFF806C018113006D B45A6D5B6D5B6D5B010313C0010090C7FC283F7BBD33>III< 903801FFC0010F13F8013F13FE90B67E48814881489038807FF03A0FFC000FF801F06D7E 484813036F7EA21500A26C5A6C5AC9FC15015EA215034B5A150F4B5A4B5A913803FFC001 03B55A4991C7FC5D8116C06D8090C76C7EED0FF8ED03FC6F7E6F7E821780163FA2EE1FC0 A3123C127EB4FCA2163F1780167F6C16006D5C6D495A6C6C1303D81FF8EB0FFC3A0FFF80 7FF86C90B55A6C5D6C15806C6C91C7FC010F13FC010113C02A3F7CBD33>I<0007B612F0 4815F85AA316F001C0C8FCB0ECFFC001C713F801DF7F90B6FC168016C0028013E09039FC 001FF001F0EB0FF849130749EB03FC6C4813016CC713FEC9FCA216FF167FA41218127EA2 B415FF16FEA24814016C15FC6C14036DEB07F86D130F6C6CEB1FF06C6CEB7FE09039FE03 FFC06CB612806C150000015C6C14F8013F13E0010390C7FC283E7BBC33>53 DI<49B47E010F13E0013F13F84913FE90B6FC000315 8048018113C09038FC007F4848EB1FE04848EB0FF0485A49EB07F84848130390C7FCED01 FC5A5A16FE1500A416FFA37E7E6D5BA26C6C5B6D5B6C6C5B6C6C5BD807FE137F90B7FC6C 157F6C14FC6C6CEBF8FF6DEBE0FE010F1380903800200091C7FC150116FCA2150316F815 0716F0000F140F486CEB1FE0486C133F16C0EDFF804A13004A5A381FF01F90B512F86C5C 6C5C6C1480C649C7FCEB3FF0283F7BBD33>57 D<121FEA3F80EA7FC0EAFFE0A5EA7FC0EA 3F80EA1F00C7FCB3A3121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B2B6CAA33> II<161E167E16FF15035DED1FFE157FEDFFF8020313F04A 13C0021F138091383FFE00ECFFF8495B010713C0495BD93FFEC7FC495A3801FFF0485B00 0F13804890C8FCEA7FFC5BEAFFE05B7FEA7FF87FEA1FFF6C7F000313E06C7F38007FFC6D 7E90380FFF806D7F010113F06D7FEC3FFE91381FFF80020713C06E13F0020013F8ED7FFE 151FED07FF811500167E161E28337BB733>I<007FB71280A2B812C0A36C16806C1600CB FCA9003FB7FC481680B812C0A36C1680A22A177CA933>I<1278127EB4FC13C07FEA7FF8 13FEEA1FFF6C13C000037F6C13F86C6C7EEB1FFF6D7F010313E06D7F9038007FFC6E7E91 380FFF806E13C0020113F06E13F8ED3FFE151FED07FF815DED1FFE153FEDFFF84A13F002 0713C04A138091383FFE004A5A903801FFF0495B010F13804990C7FCEB7FFC48485A4813 E0000F5B4890C8FCEA7FFE13F8EAFFE05B90C9FC127E127828337BB733>I<90380FFF80 017F13F848B512FE0007ECFF804815C04815E0263FFC0113F03A7FE0001FF80180130748 C7EA03FC5A6C1401A3127E15030018EC07F8C8121FED3FF0EDFFE04A13C04A1380913807 FE004A5A4A5AEC3FE05D4A5A4AC7FCA2495A5CA213035CA96D5A90C9FCA914E0EB03F8A2 497EA36D5AA2EB00E0263E7ABD33>III<007F B512F8B7FC16C082826C813A03F8000FFCED03FE15016F7E82A2EE3F80A7EE7F00A25E4B 5AA2ED07FCED1FF890B65A5E1680828216F89039F8000FFCED01FE6F7EEE7F80163F17C0 161FA2EE0FE0A7161F17C0A2163FEE7F8016FF4B1300150F007FB65AB75A5E16E05E6C4A C7FC2B3D7DBC33>I<91391FE00780DAFFFC13C00103EBFF0F010F148F4914FF5B90387F F81F9038FFC00748497E4848487E497F485A167F485A49143F121F5B003F151F5BA2127F 90C8EA0F8093C7FCA25A5AAD7E7EA36DEC0F80003FED1FC0A27F121F7F000F153F6D1580 6C7E167F6C6CECFF007F3A01FF8003FE6C6D485A90397FF81FF86DB55A6D5C6D5C010391 C7FC010013FCEC1FE02A3F7CBD33>I<003FB512F04814FCB7FC826C816C813A03F8007F F0ED1FF8ED07FC15036F7E8281EE7F80A2163F17C0161FA217E0160FA4EE07F0AD160F17 E0A4161F17C0163FA21780167FEEFF00A24B5A15034B5AED1FF8ED7FF0003FB6FC4815C0 B75A93C7FC6C14FC6C14F02C3D7EBC33>I<003FB712E04816F0B8FCA27E7ED801FCC712 07A8EE03E093C7FCA6151F4B7EA490B6FCA69038FC003FA46FC7FC92C8FCA817F8EE01FC A9003FB7FC5AB8FCA27E6C16F82E3D7EBC33>I<3B7FFFC00FFFF8B56C4813FCA46C496C 13F8D803F8C7EA7F00B3A290B7FCA601F8C77EB3A53B7FFFC00FFFF8B56C4813FCA46C49 6C13F82E3D7EBC33>72 D<003FB612804815C0B712E0A26C15C06C1580260003F8C7FCB3 B3AD003FB612804815C0B712E0A26C15C06C1580233D78BC33>I<49B512F84914FC16FE A216FC6D14F890C7EA7F00B3B3A5123C127EB4FCA25D5D1401397F8007FC9038F01FF86C B5FC6C5C6C14C000035CC649C7FCEB1FF0273E79BC33>II<387FFFF8B57E80A25C6C5BD801FCC9FCB3B3A3EE03E0EE07F0A9007F B7FCB8FCA46C16E02C3D7DBC33>III<90381FFFF890B6FC000315C0000F15F0A2 4815F83A3FFC003FFC01E013074913034848EB01FEA290C8FCA500FE157FB3AC6C15FF6C 15FEA46D1301A36C6CEB03FC01F0130F01FC133F6CB612F86C15F0A2000315C0C6150001 1F13F8283F7BBD33>I<003FB512FC48ECFF80B712E016F86C816C813A01FC000FFF0303 13801500EE7FC0163FEE1FE0160FA217F01607A6160F17E0A2161FEE3FC0167FEEFF8015 03030F130090B65A5E5E16E0168003FCC7FC01FCC9FCB3383FFFE0487FB57EA26C5B6C5B 2C3D7EBC33>I<90381FFFF890B6FC000315C0000F15F0A24815F83A3FFC003FFC01F013 0F01C013034848EB01FEA290C8FCA54815FF48157FB3AA143F6C90387F80FF6C15FEEC3F C0A2EC1FE0A29038800FF1A23A3FC007FBFC01F013FFEBFC036CB612F86C15F0A2000315 C0C61500011F148090C7EA7FC0153F16E0151F16F0150F16F8150716FC150316FE1501ED 00FC284C7BBD33>I<007FB57EB612F815FE81826C812603F8007FED3FF0ED0FF815076F 7E1501A26F7EA74B5AA215034B5A150FED3FF0EDFFE090B65A5E93C7FC5D8182D9F8007F 153F6F7E150F821507AA173E177FA416F8030313FF267FFFC014FEB538E001FF17FC81EE 7FF86C49EB3FF0C9EA0FC0303E7EBC33>II<003FB712F84816FC B8FCA43AFE000FE001A8007CED00F8C71500B3B3A40107B512C049804980A26D5C6D5C2E 3D7EBC33>I<273FFFE001B5FC486D481480B56C4814C0A26C496C14806C496C1400D801 FCC7EA0FE0B3B3A36D141F00005EA26D143F6D5DA26D6C49C7FC6E5B6D6C485AECF00390 390FFC0FFC6DB55A6D5C6D5C6D6C1380DA1FFEC8FCEC07F8323E80BC33>II<3A3FFF807FFF486DB51280A46C496C13003A01FE000FE0151F6C7E4B5AEB7F805E90 383FC07F93C7FC6D6C5A5DEB0FF15DEB07FB5DEB03FF5D7F5D7F5D147F6E5AA34A7EA24A 7E815B81EB03FB81EB07F181EB0FE081011F7F02C07F013F133F02807F017F131F02007F 49130F49801507000181491303000381491301D87FFF90380FFFE0B56C4813F05DA2816C 496C13E02C3D7DBC33>88 DI<007FB512C0B612E0 A415C048C8FCB3B3B3ABB612C015E0A46C14C01B4D6CC433>91 D<127CA212FEA27EA26C 7EA26C7EA26C7EA2120F7FA26C7EA26C7EA26C7EA212007FA26D7EA26D7EA26D7EA2130F 80A26D7EA26D7EA2130180A26D7EA26E7EA26E7EA2141F81A26E7EA26E7EA26E7EA21401 81A26E7EA2ED7F80A2ED3FC0A2151F16E0A2ED0FF0A2ED07F8A2ED03FCA21501A2ED00F8 1678264D7AC433>I<007FB512C0B612E0A47EC7120FB3B3B3AB007FB5FCB6FCA46C14C0 1B4D7DC433>I<007FB612FEA2B8FCA36C15FEA228077B7D33>95 D97 DIIIIII< EA3FFC487E12FFA2127F123F1200AB4AB4FC020713C0021F13F0027F7F91B5FC90B67EED 07FEECF801ECF0004A7F4A7F5CA291C7FCA35BB3A43B3FFFF80FFFFC486D4813FEB56C48 13FFA26C496C13FE6C496C13FC303D7FBC33>I<14E0EB03F8A2497EA36D5AA2EB00E091 C8FCAA383FFFF8487FA47EEA0001B3AD007FB612C0B712E016F0A216E06C15C0243E78BD 33>I107 D<383FFFFC487FB5FCA27E7EC7 FCB3B3AD003FB612F84815FCB712FEA26C15FC6C15F8273D7ABC33>I<02FC137E3B7FC3 FF01FF80D8FFEF01877F90B500CF7F15DF92B57E6C010F13872607FE07130301FC01FE7F 9039F803FC01A201F013F8A401E013F0B3A53C7FFE0FFF07FF80B548018F13C0A46C486C 01071380322C80AB33>I<4AB4FC263FFC0713C0267FFE1F13F000FF017F7F91B5FC6CB6 7E6CEC07FEC6EBF801ECF0004A7F4A7F5CA291C7FCA35BB3A43B3FFFF80FFFFC486D4813 FEB56C4813FFA26C496C13FE6C496C13FC302C7FAB33>III<02FF137C0107EBE0FE011F13F0017F13FC90B512FE 4814FF4813C03907FE003F4848131F01F0130F484813071503485A491301127F90C7FC15 005A5AA97E7E15017F123F6D130315076C7E6C6C130F6D131FD807FE137F3903FF81FF6C EBFFFE6C14FC6D13F86D13F0010F13C0903801FE0090C8FCAF92387FFFFC92B512FEA46F 13FC2F427CAB33>II<90381FFE0F90B5EA8F80000314FF120F5A5AEBF007 387F800190C7FC00FE147F5A153FA37E007FEC1F0001C090C7FCEA3FF8EBFFC06C13FF6C 14E0000314F8C680011F13FF01001480020713C0EC007FED1FE0007C140F00FEEC07F015 03A27EA27F15076D14E06D130F6DEB3FC09038FE01FF90B61280160000FD5C00FC14F8D8 F83F13E0D8780790C7FC242E79AC33>III<3B3FFFC00FFFF0486D4813F8B5 6C4813FCA26C496C13F86C496C13F0D801F8C7EA7E006D14FE00005DA26D1301017E5CA2 017F13036D5CA2EC8007011F5CA2ECC00F010F5CA36D6C485AA3ECF03F010391C7FCA26E 5A0101137EA2ECFCFE01005BA214FF6E5AA36E5AA26E5A6E5A2E2B7EAA33>I<3B7FFF80 07FFF8B56C4813FC6E5AA24A7E6C496C13F8D80FC0C7EA0FC06D141F00071680A56D143F 00031600A3EC0FC0EC1FE0A23A01F83FF07EA3EC7FF8147CA20000157C9039FCFCFCFCA3 ECF87CA2017C5C017D137EECF03EA2017F133FA26D486C5AA3ECC00F90390F8007C02E2B 7EAA33>I<3B3FFFC07FFF80486DB512C0B500F114E0A26C01E014C06C496C13803B00FE 000FE000017F495AEB3F804B5A6D6C48C7FC90380FE07E903807F0FEECF1FC903803FBF8 EB01FF6D5B5D6E5A143F6E5A143F814A7E14FF903801FBF0ECF9F8903803F1FCEB07E015 7E90380FC07F011F6D7E90383F801F02007F496D7E01FE6D7E484813033B7FFFC03FFFE0 B56C4813F0A46C496C13E02C2B7DAA33>I<3B7FFF801FFFE0B56C4813F06E4813F8A24A 6C13F06C496C13E0D803F8C7EAFC00000114015E7F000014036D5C137EA2017F495A7FA2 6E485A131FA26D6C485AA214E0010749C7FCA214F01303157EEB01F8A2157C010013FC14 FC5D147C147DEC3FF0A36E5AA36E5AA2141F5DA2143F92C8FCA3147EA214FE003F5B1301 387F81F81383EB87F0139FEBFFE06C5B5C6C90C9FCEA0FFCEA03F02D427DAA33>I<000F B712804816C05AA317800180C713004B5A4B5A4B5A4B5A6CC7485AC8485A4B5A4BC7FC4A 5A4A5A4A5A4A5A4A5A4A5A4A5A4AC8FC495A495A495A495A495A495A495A49C7EA0F8048 48EC1FC0485A485A485A485A485A48B7FCB8FCA46C16802A2B7DAA33>II<127CA212FEB3B3B3B3127CA2074D6AC433>II<013E13079039FF800F8000039038C01FC048EBE03F48 EBF07F489038F9FF803A7FE7FFFE00D8FF835B01015B486C5B007CEB7FC00038011FC7FC 220C78BC33>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fg cmbx12 12 56 /Fg 56 122 df12 DI40 D<12F07E127E7E6C7E6C7E6C7E7F6C7E6C7E12007F137F8013 3F806D7EA26D7EA26D7EA2801303A2801301A280A27F1580A4EC7FC0A615E0A2143FAE14 7FA215C0A6ECFF80A415005BA25CA213035CA213075CA2495AA2495AA2495A5C137F91C7 FC13FE5B1201485A485A5B485A485A48C8FC127E12F85A1B647ACA2C>I<143E147F4A7E A56EC8FC00081508003E153E007F157FD8FFC0903801FF8001E05B9038F03E0701F85BD8 7FFE013F130001FF5B001F9038BEFFFC000390B512E0C66C91C7FC010F13F8010113C0A2 010F13F8017F13FF0003B612E0001F01BE13FC007F90383E7FFF01FE7FD8FFF8010F1380 01F07F9038E07F0301C07FD87F009038007F00003E153E00081508C791C7FC4A7EA56EC8 FC143E292C79CA38>I44 DII49 DII<163FA25E5E5D5DA25D5D5D5DA25D92B5FCEC01F7EC03E7140715C7EC 0F87EC1F07143E147E147C14F8EB01F0EB03E0130714C0EB0F80EB1F00133E5BA25B485A 485A485A120F5B48C7FC123E5A12FCB91280A5C8000F90C7FCAC027FB61280A531417DC0 38>I<0007150301E0143F01FFEB07FF91B6FC5E5E5E5E5E16804BC7FC5D15E092C8FC01 C0C9FCAAEC3FF001C1B5FC01C714C001DF14F09039FFE03FFC9138000FFE01FC6D7E01F0 6D13804915C0497F6C4815E0C8FC6F13F0A317F8A4EA0F80EA3FE0487E12FF7FA317F05B 5D6C4815E05B007EC74813C0123E003F4A1380D81FC0491300D80FF0495AD807FEEBFFFC 6CB612F0C65D013F1480010F01FCC7FC010113C02D427BC038>I<4AB47E021F13F0027F 13FC49B6FC01079038807F8090390FFC001FD93FF014C04948137F4948EBFFE048495A5A 1400485A120FA248486D13C0EE7F80EE1E00003F92C7FCA25B127FA2EC07FC91381FFF80 00FF017F13E091B512F89039F9F01FFC9039FBC007FE9039FF8003FF17804A6C13C05B6F 13E0A24915F0A317F85BA4127FA5123FA217F07F121FA2000F4A13E0A26C6C15C06D4913 806C018014006C6D485A6C9038E01FFC6DB55A011F5C010714C0010191C7FC9038003FF0 2D427BC038>I<121E121F13FC90B712FEA45A17FC17F817F017E017C0A2481680007EC8 EA3F00007C157E5E00785D15014B5A00F84A5A484A5A5E151FC848C7FC157E5DA24A5A14 035D14074A5AA2141F5D143FA2147F5D14FFA25BA35B92C8FCA35BA55BAA6D5A6D5A6D5A 2F447AC238>IIII<903807FFC0013F13FC48B612804815E0260FF80013F0D8 1FC0EB3FF848C7EA1FFC4815FE01C0130F486C14FF7FA66C485B6C4814FE000FC7FCC8EA 3FFCED7FF8EDFFF04A13E04A13801600EC07FC4A5A5D4A5A5D4A5A92C7FCA2147E147CA3 1478AA91C8FCA814F8EB03FE497E497FA2497FA56D5BA26D90C7FC6D5AEB00F828467AC5 35>63 D65 DIIIII73 D76 DI80 D83 D<003FBA12E0A59026FE000FEB8003D87FE09338003FF049171F90C71607A2007E180300 7C1801A300781800A400F819F8481978A5C81700B3B3A20107B8FCA545437CC24E>II<903801FFE0011F13FE01 7F6D7E48B612E03A03FE007FF84848EB1FFC6D6D7E486C6D7EA26F7FA36F7F6C5A6C5AEA 00F090C7FCA40203B5FC91B6FC1307013F13F19038FFFC01000313E0000F1380381FFE00 485A5B127F5B12FF5BA35DA26D5B6C6C5B4B13F0D83FFE013EEBFFC03A1FFF80FC7F0007 EBFFF86CECE01FC66CEB8007D90FFCC9FC322F7DAD36>97 DIIIIIII<137C48B4FC4813804813C0A24813E0 A56C13C0A26C13806C1300EA007C90C7FCAAEB7FC0EA7FFFA512037EB3AFB6FCA518467C C520>I107 DI<90277F8007FEEC0FFC B590263FFFC090387FFF8092B5D8F001B512E002816E4880913D87F01FFC0FE03FF8913D 8FC00FFE1F801FFC0003D99F009026FF3E007F6C019E6D013C130F02BC5D02F86D496D7E A24A5D4A5DA34A5DB3A7B60081B60003B512FEA5572D7CAC5E>I<90397F8007FEB59038 3FFF8092B512E0028114F8913987F03FFC91388F801F000390399F000FFE6C139E14BC02 F86D7E5CA25CA35CB3A7B60083B512FEA5372D7CAC3E>II<90397FC00FF8B590B57E02C314E002CF14F89139DFC03F FC9139FF001FFE000301FCEB07FF6C496D13804A15C04A6D13E05C7013F0A2EF7FF8A4EF 3FFCACEF7FF8A318F017FFA24C13E06E15C06E5B6E4913806E4913006E495A9139DFC07F FC02CFB512F002C314C002C091C7FCED1FF092C9FCADB67EA536407DAC3E>II<90387F807FB53881FFE002 8313F0028F13F8ED8FFC91389F1FFE000313BE6C13BC14F8A214F0ED0FFC9138E007F8ED 01E092C7FCA35CB3A5B612E0A5272D7DAC2E>I<90391FFC038090B51287000314FF120F 381FF003383FC00049133F48C7121F127E00FE140FA215077EA27F01E090C7FC13FE387F FFF014FF6C14C015F06C14FC6C800003806C15806C7E010F14C0EB003F020313E0140000 F0143FA26C141F150FA27EA26C15C06C141FA26DEB3F8001E0EB7F009038F803FE90B55A 00FC5CD8F03F13E026E007FEC7FC232F7CAD2C>II< D97FC049B4FCB50103B5FCA50003EC000F6C81B3A85EA25EA25E7E6E491380017FD901F7 13FE9138F807E76DB512C7010F1407010313FE9026007FF0EBFC00372E7CAC3E>I IIII E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fh cmbx12 17.28 35 /Fh 35 122 df<16F04B7E1507151F153FEC01FF1407147F010FB5FCB7FCA41487EBF007 C7FCB3B3B3B3007FB91280A6395E74DD51>49 D<913801FFF8021FEBFFC091B612F80103 15FF010F16C0013F8290267FFC0114F89027FFE0003F7F4890C7000F7F48486E7FD807F8 6E148048486E14C048486E14E048486F13F001FC17F8486C816D17FC6E80B56C16FE8380 A219FFA283A36C5BA26C5B6C90C8FCD807FC5DEA01F0CA14FEA34D13FCA219F85F19F04D 13E0A294B512C019804C14004C5B604C5B4C5B604C13804C90C7FC4C5A4C5A4B13F05F4B 13804B90C8FC4B5AED1FF84B5A4B5A4B48143F4A5B4A48C8FC4A5A4A48157E4A5A4A5AEC 7F8092C9FC02FE16FE495A495A4948ED01FCD90FC0150749B8FC5B5B90B9FC5A4818F85A 5A5A5A5ABAFCA219F0A4405E78DD51>I<92B5FC020F14F8023F14FF49B712C04916F001 0FD9C01F13FC90271FFC00077FD93FE001017F49486D8049C86C7F484883486C6F7F14C0 486D826E806E82487FA4805CA36C5E4A5E6C5B6C5B6C495E011FC85A90C95CA294B55A61 4C91C7FC604C5B4C5B4C5B4C5B047F138092260FFFFEC8FC020FB512F817E094C9FC17F8 17FF91C7003F13E0040713F8040113FE707F717F7113E085717FA2717F85A285831A80A3 1AC0EA03FCEA0FFF487F487F487FA2B57EA31A80A34D14005C7E4A5E5F6C495E49C8485B D81FF85F000F5ED807FE92B55A6C6C6C4914806C01F0010791C7FC6C9026FF803F5B6D90 B65A011F16F0010716C001014BC8FCD9001F14F0020149C9FC426079DD51>II<01C0EE01C0D801F816 0F01FF167F02F0EC07FFDAFF8090B5FC92B7128019006060606060606095C7FC17FC5F17 E0178004FCC8FC16E09026FC3FFCC9FC91CBFCADED3FFE0203B512F0020F14FE023F6E7E 91B712E001FDD9E00F7F9027FFFE00037F02F801007F02E06EB4FC02806E138091C8FC49 6F13C04917E07113F0EA00F090C914F8A219FC83A219FEA419FFA3EA03F0EA0FFC487E48 7E487FA2B57EA319FEA35C4D13FC6C90C8FC5B4917F8EA3FF001804B13F06D17E0001F5E 6C6C17C06D4B1380D807FC92B512006C6C4A5B6C6C6C01075B6C01E0011F5BD97FFE90B5 5A6DB712C0010F93C7FC6D15FC010115F0D9003F1480020301F0C8FC406078DD51>III58 D65 D<4DB5ED03C0057F02F014070407B600FE14 0F047FDBFFC0131F4BB800F0133F030F05FC137F033F9127F8007FFE13FF92B6C73807FF 814A02F0020113C3020702C09138007FE74A91C9001FB5FC023F01FC16074A01F08291B5 4882490280824991CB7E49498449498449498449865D49498490B5FC484A84A2484A84A2 4891CD127FA25A4A1A3F5AA348491A1FA44899C7FCA25CA3B5FCB07EA380A27EA2F50FC0 A26C7FA37E6E1A1F6C1D80A26C801D3F6C6E1A00A26C6E616D1BFE6D7F6F4E5A7F6D6D4E 5A6D6D4E5A6D6D4E5A6D6E171F6D02E04D5A6E6DEFFF806E01FC4C90C7FC020F01FFEE07 FE6E02C0ED1FF8020102F8ED7FF06E02FF913803FFE0033F02F8013F1380030F91B648C8 FC030117F86F6C16E004071680DC007F02F8C9FC050191CAFC626677E375>67 D70 D73 D76 DI80 D<001FBEFCA64849C79126E0000F148002E0180091C8171F498601F81A0349864986 A2491B7FA2491B3F007F1DC090C9181FA4007E1C0FA600FE1DE0481C07A5CA95C7FCB3B3 B3A3021FBAFCA663617AE070>84 DI<913803FFFE027FEBFFF00103B612FE010F6F7E4916E090273FFE001F 7FD97FE001077FD9FFF801017F486D6D7F717E486D6E7F85717FA2717FA36C496E7FA26C 5B6D5AEB1FC090C9FCA74BB6FC157F0207B7FC147F49B61207010F14C0013FEBFE004913 F048B512C04891C7FC485B4813F85A5C485B5A5CA2B55AA45FA25F806C5E806C047D7F6E EB01F96C6DD903F1EBFF806C01FED90FE114FF6C9027FFC07FC01580000191B5487E6C6C 4B7E011F02FC130F010302F001011400D9001F90CBFC49437CC14E>97 D<903807FF80B6FCA6C6FC7F7FB3A8EFFFF8040FEBFF80047F14F00381B612FC038715FF 038F010014C0DBBFF0011F7FDBFFC001077F93C76C7F4B02007F03F8824B6F7E4B6F1380 4B17C0851BE0A27313F0A21BF8A37313FCA41BFEAE1BFCA44F13F8A31BF0A24F13E0A24F 13C06F17804F1300816F4B5A6F4A5B4AB402075B4A6C6C495B9126F83FE0013F13C09127 F00FFC03B55A4A6CB648C7FCDAC00115F84A6C15E091C7001F91C8FC90C8000313E04F65 7BE35A>I<92380FFFF04AB67E020F15F0023F15FC91B77E01039039FE001FFF4901F801 0113804901E0010713C04901804913E0017F90C7FC49484A13F0A2485B485B5A5C5A7113 E0485B7113C048701380943800FE0095C7FC485BA4B5FCAE7EA280A27EA2806C18FCA26C 6D150119F87E6C6D15036EED07F06C18E06C6D150F6D6DEC1FC06D01E0EC7F806D6DECFF 00010701FCEB03FE6D9039FFC03FFC010091B512F0023F5D020F1580020102FCC7FCDA00 0F13C03E437BC148>II<92380FFFC04AB512FC020FECFF80023F15E091B712F80103D9FE03 7F499039F0007FFF011F01C0011F7F49496D7F4990C76C7F49486E7F48498048844A8048 84485B727E5A5C48717EA35A5C721380A2B5FCA391B9FCA41A0002C0CBFCA67EA380A27E A27E6E160FF11F806C183F6C7FF17F006C7F6C6D16FE6C17016D6C4B5A6D6D4A5A6D01E0 4A5A6D6DEC3FE0010301FC49B45A6D9026FFC01F90C7FC6D6C90B55A021F15F8020715E0 020092C8FC030713F041437CC14A>I103 D<903807FF80B6FCA6C6FC7F7FB3A8EF1FFF94B512F0040714FC041F14FF4C8193267FE0 7F7F922781FE001F7FDB83F86D7FDB87F07FDB8FC0814C7F039FC78015BE03BC8003FC82 5DA25DA25DA45DB3B2B7D8F007B71280A651647BE35A>II<903807FF80B6FCA6C6FC7F7FB3B3B3B3AD B712E0A623647BE32C>108 D<902607FF80EB1FFFB691B512F0040714FC041F14FF4C81 93267FE07F7F922781FE001F7FC6DA83F86D7F6DD987F07F6DD98FC0814C7F039FC78015 BE03BC8003FC825DA25DA25DA45DB3B2B7D8F007B71280A651417BC05A>110 D<923807FFE092B6FC020715E0021F15F8027F15FE494848C66C6C7E010701F0010F13E0 4901C001037F49496D7F4990C87F49486F7E49486F7E48496F13804819C04A814819E048 496F13F0A24819F8A348496F13FCA34819FEA4B518FFAD6C19FEA46C6D4B13FCA36C19F8 A26C6D4B13F0A26C19E06C6D4B13C0A26C6D4B13806C6D4B13006D6C4B5A6D6D495B6D6D 495B010701F0010F13E06D01FE017F5B010090B7C7FC023F15FC020715E0020092C8FC03 0713E048437CC151>I<902607FF80EBFFF8B6010FEBFF80047F14F00381B612FC038715 FF038F010114C09227BFF0003F7FC6DAFFC0010F7F6D91C76C7F6D496E7F03F86E7F4B6E 7F4B17804B6F13C0A27313E0A27313F0A21BF885A21BFCA3851BFEAE4F13FCA41BF861A2 1BF0611BE0611BC06F92B512801B006F5C6F4A5B6F4A5B03FF4A5B70495B04E0017F13C0 9226CFFC03B55A03C7B648C7FC03C115F803C015E0041F91C8FC040313E093CBFCB3A3B7 12F0A64F5D7BC05A>I114 D<913A3FFF8007800107B5EAF81F011FECFE7F017F91B5FC48B8FC48EBE0014890C7121F D80FFC1407D81FF0801600485A007F167F49153FA212FF171FA27F7F7F6D92C7FC13FF14 E014FF6C14F8EDFFC06C15FC16FF6C16C06C16F06C826C826C826C82013F1680010F16C0 1303D9007F15E0020315F0EC001F1500041F13F81607007C150100FC81177F6C163FA217 1F7EA26D16F0A27F173F6D16E06D157F6D16C001FEEDFF806D0203130002C0EB0FFE02FC EB7FFC01DFB65A010F5DD8FE0315C026F8007F49C7FC48010F13E035437BC140>II<902607FFC0ED3F FEB60207B5FCA6C6EE00076D826D82B3B3A260A360A2607F60183E6D6D147E4E7F6D6D49 48806D6DD907F0ECFF806D01FFEB3FE06D91B55A6E1500021F5C020314F8DA003F018002 F0C7FC51427BC05A>I<007FB600C0017FB512F8A6D8001F01F8C70007EBF0006D040190 C7FC6D6D5D6D6D4A5A6D6D4A5A70495A6D4C5A6E7F6E6D495A6E6D495A7049C8FC6E4A5A 6E6D485A6E6D485A6E13FFEF8FF06EEC9FE06FEBFFC06F5C6F91C9FC5F6F5B816F7F6F7F 8481707F8493B57E4B805D4B80DB0FF37FDB1FE17F04C080153F4B486C7F4B486C7F4A48 6D7F4A486D7F4A5A4B6D7F020F6E7F4A486D7F4A486D804A5A4AC86C7F49486F7F4A6F7F 0107707FEB3FFFB600F049B7FCA650407EBF55>120 DI E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fi cmr10 10 24 /Fi 24 122 df66 D<913A01FF800180020FEBE003027F13F8903A01 FF807E07903A03FC000F0FD90FF0EB039F4948EB01DFD93F80EB00FF49C8127F01FE153F 12014848151F4848150FA248481507A2485A1703123F5B007F1601A35B00FF93C7FCAD12 7F6DED0180A3123F7F001F160318006C7E5F6C7E17066C6C150E6C6C5D00001618017F15 386D6C5CD91FE05C6D6CEB03C0D903FCEB0F80902701FF803FC7FC9039007FFFFC020F13 F002011380313D7BBA3C>I69 D73 D77 D82 DI97 DII101 D104 DI 107 DI<2703F00FF0EB1F E000FFD93FFCEB7FF8913AF03F01E07E903BF1C01F83803F3D0FF3800FC7001F802603F7 0013CE01FE14DC49D907F8EB0FC0A2495CA3495CB3A3486C496CEB1FE0B500C1B50083B5 FCA340257EA445>I<3903F00FF000FFEB3FFCECF03F9039F1C01F803A0FF3800FC03803 F70013FE496D7EA25BA35BB3A3486C497EB500C1B51280A329257EA42E>II<3903F01FE000FFEB7FF89038F1E07E9039F3801F803A0FF7000FC0D803FEEB07E0 49EB03F04914F849130116FC150016FEA3167FAA16FEA3ED01FCA26DEB03F816F06D1307 6DEB0FE001F614C09039F7803F009038F1E07E9038F0FFF8EC1FC091C8FCAB487EB512C0 A328357EA42E>I<3807E01F00FFEB7FC09038E1E3E09038E387F0380FE707EA03E613EE 9038EC03E09038FC0080491300A45BB3A2487EB512F0A31C257EA421>114 DI<1318A5 1338A31378A313F8120112031207001FB5FCB6FCA2D801F8C7FCB215C0A93800FC011580 EB7C03017E13006D5AEB0FFEEB01F81A347FB220>II121 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fj cmr6 6 4 /Fj 4 117 df<130C1338137013E0EA01C0EA038013005A120EA25AA25AA312781270A3 12F0AB1270A312781238A37EA27EA27E7E1380EA01C0EA00E013701338130C0E317AA418 >40 D<12C012707E7E7E7E7E1380EA01C0A2EA00E0A21370A313781338A3133CAB1338A3 13781370A313E0A2EA01C0A2EA038013005A120E5A5A5A12C00E317CA418>I<3A0F07F0 07F03AFF1FFC1FFC9039703E703E3A1FC01EC01E6C486C487EA201001300AE3BFFF0FFF0 FFF0A22C167D9532>109 D<487EA41203A21207A2120F123FB51280A238078000AA14C0 A63803C180EBE300EA01FEEA007C12207E9E18>116 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fk cmti10 10.95 26 /Fk 26 122 df<171C173C177CA217FCA216011603A21607A24C7EA2161DA21639167916 7116E1A2ED01C1A2ED038115071601150EA2031C7FA24B7EA25D15F05D4A5AA24A5AA24A C7FC5C140E5C021FB6FC4A81A20270C7127FA25C13015C495AA249C8FCA2130E131E131C 133C5B01F882487ED807FEEC01FFB500E0017FEBFF80A25C39417BC044>65 D<49B812F8A390260003FEC7121F18074B14031801F000F014075DA3140F5D19E0A2141F 4B1338A2EF7801023F027013C04B91C7FCA217F0027F5CED80011603160F91B65AA3ED00 1F49EC07805CA3010392C8FC5CF003804C13070107020E14005C93C75A180E010F161E4A 151C183CA2011F5E5C60A2013F15014A4A5A1707017F150F4D5A4A147F01FF913807FF80 B9FCA295C7FC3D3E7BBD3E>69 D<9339FF8001C0030F13E0033F9038F803809239FF807E 07913A03FC001F0FDA0FF0EB071FDA1FC0ECBF00DA7F806DB4FC4AC77E495AD903F86E5A 495A130F4948157E4948157C495A13FF91C9FC4848167812035B1207491670120FA2485A 95C7FC485AA3127F5BA312FF5BA30303B512FC90C7FCA2DB000190C7FCA25FA216035FA3 16076C5E7FA2003F150F6D5D121F6D141F000F153F6C6C4A5A6C6C14F76C6CEB01E36CB4 EB07C1903A7FC03F81C090391FFFFE00010701F890C8FC010013803A4272BF46>71 D<49B648B6FC495DA2D9000390C7000313004B5D4B5DA2180714074B5DA2180F140F4B5D A2181F141F4B5DA2183F143F4B5DA2187F147F4B5DA218FF91B8FC96C7FCA292C712015B 4A5DA2170313034A5DA2170713074A5DA2170F130F4A5DA2171F131F4A5DA2173F133F4A 5DA2017F157FA24A5D496C4A7EB66CB67EA3483E7BBD44>I<49B612C0A25FD9000390C8 FC5D5DA314075DA3140F5DA3141F5DA3143F5DA3147F5DA314FF92C9FCA35B5CA313035C 18C0EF01E0010716C05C17031880130F4A140718005F131F4A141EA2173E013F5D4A14FC 1601017F4A5A16074A131F01FFECFFF0B8FCA25F333E7BBD39>76 D<49B5933807FFFC496062D90003F0FC00505ADBBF805E1A771AEF1407033F923801CFE0 A2F1039F020FEE071F020E606F6C140E1A3F021E161C021C04385BA2F1707F143C023804 E090C7FCF001C0629126780FE0495A02705FF00700F00E0114F002E0031C5BA2F0380301 0116704A6C6C5D18E019070103ED01C00280DA03805BA2943807000F13070200020E5C5F DB03F8141F495D010E4B5CA24D133F131E011CDAF9C05CEEFB80197F013C6DB4C7FC0138 95C8FC5E01784A5C13F8486C4A5CD807FE4C7EB500F04948B512FE16E01500563E7BBD52 >I<902601FFFE020FB5FC496D5CA2D900016D010013C04AEE3F00193E70141C193CEC07 BFDB3FE01438151F1978020F7FDA0E0F15708219F0EC1E07021C6D5CA203031401023C7F DA38015DA2701303EC7800027002805BA2047F130702F014C04A013F91C7FCA2715A0101 141F4AECF00EA2040F131E010315F84A151C1607EFFC3C0107140391C7143817FE040113 784915FF010E16708218F0131E011C6F5AA2173F133C01385E171F137813F8486C6F5AEA 07FEB500F01407A295C8FC483E7BBD44>I<49B77E18F018FC903B0003FE0003FEEF00FF 4BEC7F80F03FC00207151F19E05DA2020F16F0A25DA2141FF03FE05DA2023F16C0187F4B 1580A2027FEDFF00604B495A4D5A02FF4A5A4D5A92C7EA3FC04CB4C7FC4990B512FC17E0 4ACAFCA21303A25CA21307A25CA2130FA25CA2131FA25CA2133FA25CA2137FA25C497EB6 7EA33C3E7BBD3E>80 D<49B612FCEFFF8018F0903B0003FE000FF8EF03FE4BEB00FF8419 800207ED3FC05DA219E0140F5DA3021FED7FC05DA2F0FF80143F4B15004D5A60027F4A5A 4B495A4D5AEF3F8002FF02FEC7FC92380007F892B512E01780499038000FE04A6D7E707E 707E0103814A130083A213075CA25E130F5C5F1603131F5CA3013F020714404A16E05F01 7F160119C04A01031303496C1680B6D8800113079438FE0F009338007E1ECAEA3FFCEF07 F03B407BBD42>82 D<92391FE00380ED7FFC913A01FFFE0700913907F01F8F91390FC007 DF4AC66CB4FC023E6D5A4A130014FC495A4948147CA2495AA2010F15785CA3011F1570A4 6E91C7FCA2808014FE90380FFFE015FC6DEBFF8016E06D806D806D6C7F141F02037FEC00 3FED07FF1501A281A282A212075A167E120EA2001E15FE5EA25E003E14015E003F14034B 5A486C5C150F6D495A6D49C8FCD8F9F0137C39F8FE01F839F03FFFF0D8E00F13C026C001 FEC9FC314279BF33>I<001FB500F090B512F0485DA226003FF0C7380FFC004AEC03F04A 5D715A017F1503A24A5DA201FF150795C7FC91C8FCA2485E170E5BA20003161E171C5BA2 0007163C17385BA2000F167817705BA2001F16F05F5BA2003F1501A2495DA2007F1503A2 495DA2160794C8FC48C8FC5E160E161E6C151C163C5E5E5E6C6C13014B5A001F4A5A6C6C 011FC9FC6D133E6C6C13F83903FC07F0C6B512C0013F90CAFCEB07F83C406FBD44>85 D<91B690383FFFFC605E020101E0010F13006E49EB07F84C6D5A19C06F6C495A96C7FC03 3F140E705B183C031F5C705B4D5A030F5C70485A4DC8FC0307130EEEFC1E5F03035BEEFE 705F6F6C5A5FA26F90C9FC83A2707EA216FF4B7F5DED079FEE1FF0150EED1C0F03387F15 78EDF007DA01E07F15C09138038003DA07007F140E021E13014A805C02707F4A81495A49 48147F01078249C8FC013F6F7E496C147F2603FFC049487EB500F8011FEBFFE0A261463E 7CBD44>88 D<147E49B47E903907C1C38090391F80EFC090383F00FF017E137F49148048 48133F485AA248481400120F5B001F5C157E485AA215FE007F5C90C7FCA21401485C5AA2 1403EDF0385AA21407EDE078020F1370127C021F13F0007E013F13E0003E137FECF3E126 1F01E313C03A0F8781E3803A03FF00FF00D800FC133E252977A72E>97 DII101 D<1478EB01FCA21303A314F8EB00E01400AD 137C48B4FC38038F80EA0707000E13C0121E121CEA3C0F1238A2EA781F00701380A2EAF0 3F140012005B137E13FE5BA212015BA212035B1438120713E0000F1378EBC070A214F0EB 80E0A2EB81C01383148038078700EA03FEEA00F8163E79BC1C>105 D107 DII111 D<903903E001F890390FF807FE903A 1E7C1E0F80903A1C3E3C07C0013C137801389038E003E0EB783F017001C013F0ED800190 38F07F0001E015F8147E1603000113FEA2C75AA20101140717F05CA20103140F17E05CA2 0107EC1FC0A24A1480163F010F15005E167E5E131F4B5A6E485A4B5A90393FB80F80DA9C 1FC7FCEC0FFCEC03E049C9FCA2137EA213FEA25BA21201A25BA21203A2387FFFE0B5FCA2 2D3A80A72E>I114 DII<137C48B4143826038F 8013FCEA0707000E7F001E1401001C15F8EA3C0F12381503D8781F14F000701380A2D8F0 3F1307020013E012005B017E130F16C013FE5B151F1201491480A2153F000315005BA25D 157EA315FE5D00011301EBF8030000130790387C1FF8EB3FF9EB07E1EB00035DA2140700 0E5CEA3F80007F495AA24A5AD8FF0090C7FC143E007C137E00705B387801F0383803E038 1E0FC06CB4C8FCEA03F8263B79A72C>121 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fl cmr10 10.95 64 /Fl 64 122 df<4AB4EB0FE0021F9038E03FFC913A7F00F8FC1ED901FC90383FF03FD907 F090397FE07F80494801FF13FF4948485BD93F805C137F0200ED7F00EF003E01FE6D91C7 FC82ADB97EA3C648C76CC8FCB3AE486C4A7E007FD9FC3FEBFF80A339407FBF35>11 DI<001E130F397F803FC000FF137F01C013E0A201E0 13F0A3007F133F391E600F3000001300A401E01370491360A3000114E04913C000031301 01001380481303000EEB070048130E0018130C0038131C003013181C1C7DBE2D>34 D<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E013C0A312011380120313005A 120E5A1218123812300B1C79BE19>39 D<1430147014E0EB01C0EB03801307EB0F00131E 133E133C5B13F85B12015B1203A2485AA2120F5BA2121F90C7FCA25AA3123E127EA6127C 12FCB2127C127EA6123E123FA37EA27F120FA27F1207A26C7EA212017F12007F13787F13 3E131E7FEB07801303EB01C0EB00E014701430145A77C323>I<12C07E12707E7E121E7E 6C7E7F12036C7E7F12007F1378137CA27FA2133F7FA21480130FA214C0A3130714E0A613 0314F0B214E01307A614C0130FA31480A2131F1400A25B133EA25BA2137813F85B12015B 485A12075B48C7FC121E121C5A5A5A5A145A7BC323>I<1506150FB3A9007FB912E0BA12 F0A26C18E0C8000FC9FCB3A915063C3C7BB447>43 D<121EEA7F8012FF13C0A213E0A312 7FEA1E601200A413E013C0A312011380120313005A120E5A1218123812300B1C798919> II<121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A0A798919>III<00061403D80780131F01F813FE90B5FC5D5D5D 15C092C7FC14FCEB3FE090C9FCACEB01FE90380FFF8090383E03E090387001F8496C7E49 137E497F90C713800006141FC813C0A216E0150FA316F0A3120C127F7F12FFA416E090C7 121F12FC007015C012780038EC3F80123C6CEC7F00001F14FE6C6C485A6C6C485A3903F8 0FE0C6B55A013F90C7FCEB07F8243F7CBC2D>53 D<121EEA7F80A2EAFFC0A4EA7F80A2EA 1E00C7FCB3121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A2779A619>58 D<007FB912E0BA12F0A26C18E0CDFCAE007FB912E0BA12F0A26C18E03C167BA147>61 D<15074B7EA34B7EA34B7EA34B7EA34B7E15E7A2913801C7FC15C3A291380381FEA34AC6 7EA3020E6D7EA34A6D7EA34A6D7EA34A6D7EA34A6D7EA349486D7E91B6FCA24981913880 0001A249C87EA24982010E157FA2011E82011C153FA2013C820138151FA2017882170F13 FC00034C7ED80FFF4B7EB500F0010FB512F8A33D417DC044>65 DIIIIIIII75 DIIIIIIII<003FB91280A3903AF0007FE001018090393FC0003F48C7ED1FC0007E170712 7C00781703A300701701A548EF00E0A5C81600B3B14B7E4B7E0107B612FEA33B3D7DBC42 >IIII<007FB5D8C003B512E0A3C649C7EBFC00D93FF8EC3FE06D48 EC1F806D6C92C7FC171E6D6C141C6D6C143C5F6D6C14706D6D13F04C5ADA7FC05B023F13 036F485ADA1FF090C8FC020F5BEDF81E913807FC1C163C6E6C5A913801FF7016F06E5B6F 5AA26F7E6F7EA28282153FED3BFEED71FF15F103E07F913801C07F0203804B6C7EEC0700 4A6D7E020E6D7E5C023C6D7E02386D7E14784A6D7E4A6D7F130149486E7E4A6E7E130749 C86C7E496F7E497ED9FFC04A7E00076DEC7FFFB500FC0103B512FEA33F3E7EBD44>II<486C13C00003130101001380481303 000EEB070048130E0018130C0038131C003013180070133800601330A300E01370481360 A400CFEB678039FFC07FE001E013F0A3007F133FA2003F131F01C013E0390F0007801C1C 73BE2D>92 D97 DI<49B4FC010F13E090383F00F8017C131E4848131F4848137F0007ECFF8048 5A5B121FA24848EB7F00151C007F91C7FCA290C9FC5AAB6C7EA3003FEC01C07F001F1403 16806C6C13076C6C14000003140E6C6C131E6C6C137890383F01F090380FFFC0D901FEC7 FC222A7DA828>IIII<167C903903F801FF903A1FFF078F809039 7E0FDE1F9038F803F83803F001A23B07E000FC0600000F6EC7FC49137E001F147FA8000F 147E6D13FE00075C6C6C485AA23901F803E03903FE0FC026071FFFC8FCEB03F80006CAFC 120EA3120FA27F7F6CB512E015FE6C6E7E6C15E06C810003813A0FC0001FFC48C7EA01FE 003E140048157E825A82A46C5D007C153E007E157E6C5D6C6C495A6C6C495AD803F0EB0F C0D800FE017FC7FC90383FFFFC010313C0293D7EA82D>III107 DI<2701F801FE14FF 00FF902707FFC00313E0913B1E07E00F03F0913B7803F03C01F80007903BE001F87000FC 2603F9C06D487F000101805C01FBD900FF147F91C75B13FF4992C7FCA2495CB3A6486C49 6CECFF80B5D8F87FD9FC3F13FEA347287DA74C>I<3901F801FE00FF903807FFC091381E 07E091387803F000079038E001F82603F9C07F0001138001FB6D7E91C7FC13FF5BA25BB3 A6486C497EB5D8F87F13FCA32E287DA733>I<14FF010713E090381F81F890387E007E01 F8131F4848EB0F804848EB07C04848EB03E0000F15F04848EB01F8A2003F15FCA248C812 FEA44815FFA96C15FEA36C6CEB01FCA3001F15F86C6CEB03F0A26C6CEB07E06C6CEB0FC0 6C6CEB1F80D8007EEB7E0090383F81FC90380FFFF0010090C7FC282A7EA82D>I<3901FC 03FC00FF90381FFF8091387C0FE09039FDE003F03A07FFC001FC6C496C7E6C90C7127F49 EC3F805BEE1FC017E0A2EE0FF0A3EE07F8AAEE0FF0A4EE1FE0A2EE3FC06D1580EE7F007F 6E13FE9138C001F89039FDE007F09039FC780FC0DA3FFFC7FCEC07F891C9FCAD487EB512 F8A32D3A7EA733>I<02FF131C0107EBC03C90381F80F090397F00387C01FC131CD803F8 130E4848EB0FFC150748481303121F485A1501485AA448C7FCAA6C7EA36C7EA2001F1403 6C7E15076C6C130F6C7E6C6C133DD8007E137990383F81F190380FFFC1903801FE0190C7 FCAD4B7E92B512F8A32D3A7DA730>I<3901F807E000FFEB1FF8EC787CECE1FE3807F9C1 00031381EA01FB1401EC00FC01FF1330491300A35BB3A5487EB512FEA31F287EA724>I< 90383FC0603901FFF8E03807C03F381F000F003E1307003C1303127C0078130112F81400 A27E7E7E6D1300EA7FF8EBFFC06C13F86C13FE6C7F6C1480000114C0D8003F13E0010313 F0EB001FEC0FF800E01303A214017E1400A27E15F07E14016C14E06CEB03C09038800780 39F3E01F0038E0FFFC38C01FE01D2A7DA824>I<131CA6133CA4137CA213FCA212011203 1207001FB512C0B6FCA2D801FCC7FCB3A215E0A912009038FE01C0A2EB7F03013F138090 381F8700EB07FEEB01F81B397EB723>IIIIII E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fm cmbx10 10.95 30 /Fm 30 122 df<16FCA24B7EA24B7EA34B7FA24B7FA34B7FA24B7FA34B7F157C03FC7FED F87FA2020180EDF03F0203804B7E02078115C082020F814B7E021F811500824A81023E7F 027E81027C7FA202FC814A147F49B77EA34982A2D907E0C7001F7F4A80010F835C83011F 8391C87E4983133E83017E83017C81B500FC91B612FCA5463F7CBE4F>65 DI<9226 07FFC0130E92B500FC131E020702FF133E023FEDC07E91B7EAE1FE01039138803FFB4990 39F80003FF4901C01300013F90C8127F4948151FD9FFF8150F48491507485B4A15034817 01485B18004890CAFC197E5A5B193E127FA349170012FFAC127F7F193EA2123FA27F6C18 7E197C6C7F19FC6C6D16F86C6D150119F06C6D15036C6DED07E0D97FFEED0FC06D6CED3F 80010F01C0ECFF006D01F8EB03FE6D9039FF801FFC010091B55A023F15E0020715800200 02FCC7FC030713C03F407ABE4C>I69 DI73 D75 DIIIIIII<903A03FFC001C0011FEBF803017FEBFE0748B6 128F4815DF48010013FFD80FF8130F48481303497F4848EB007F127F49143F161F12FF16 0FA27F1607A27F7F01FC91C7FCEBFF806C13F8ECFFC06C14FCEDFF806C15E016F86C816C 816C816C16806C6C15C07F010715E0EB007F020714F0EC003F1503030013F8167F163F12 7800F8151FA2160FA27EA217F07E161F6C16E06D143F01E015C001F8EC7F8001FEEB01FF 9026FFE00713004890B55A486C14F8D8F81F5CD8F00314C027E0003FFEC7FC2D407ABE3A >I<003FB912FCA5903BFE003FFE003FD87FF0EE0FFE01C0160349160190C71500197E12 7EA2007C183EA400FC183F48181FA5C81600B3AF010FB712F8A5403D7CBC49>IIII< 903807FFC0013F13F848B6FC48812607FE037F260FF8007F6DEB3FF0486C806F7EA36F7E A26C5A6C5AEA01E0C8FC153F91B5FC130F137F3901FFFE0F4813E0000F1380381FFE0048 5A5B485A12FF5BA4151F7F007F143F6D90387BFF806C6C01FB13FE391FFF07F36CEBFFE1 00031480C6EC003FD91FF890C7FC2F2B7DA933>97 D<13FFB5FCA512077EAFEDFFE00207 13FC021FEBFF80027F80DAFF8113F09139FC003FF802F06D7E4A6D7E4A13074A80701380 A218C082A318E0AA18C0A25E1880A218005E6E5C6E495A6E495A02FCEB7FF0903AFCFF01 FFE0496CB55AD9F01F91C7FCD9E00713FCC7000113C033407DBE3A>IIII111 D<3901FE01FE00FF903807FF804A13E04A13F0EC3F1F91387C3FF8000713F8000313F0EB FFE0A29138C01FF0ED0FE091388007C092C7FCA391C8FCB3A2B6FCA525297DA82B>114 D<90383FFC1E48B512BE000714FE5A381FF00F383F800148C7FC007E147EA200FE143EA2 7E7F6D90C7FC13F8EBFFE06C13FF15C06C14F06C806C806C806C80C61580131F13000207 13C014000078147F00F8143F151F7EA27E16806C143F6D140001E013FF9038F803FE90B5 5A15F0D8F87F13C026E00FFEC7FC222B7DA929>II119 D121 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fn cmr12 12 94 /Fn 94 128 df<9239FFC001FC020F9038F80FFF913B3F803E3F03C0913BFC00077E07E0 D903F890390FFC0FF0494890383FF81F4948EB7FF0495A494814E049C7FCF00FE0499139 3FC0038049021F90C7FCAFB912F0A3C648C7D81FC0C7FCB3B2486CEC3FF0007FD9FC0FB5 12E0A33C467EC539>11 D<4AB4FC020F13E091387F80F8903901FC001C49487FD907E013 0F4948137F011FECFF80495A49C7FCA25B49EC7F00163E93C7FCACEE3F80B8FCA3C648C7 FC167F163FB3B0486CEC7FC0007FD9FC1FB5FCA330467EC536>I<913801FFC0020FEBFB 8091387F803F903801FC00494813FFEB07E0EB1FC0A2495A49C7FC167F49143F5BAFB8FC A3C648C7123FB3B2486CEC7FC0007FD9FC1FB5FCA330467EC536>III<121EEA7F80EAFFC0A9EA7F80ACEA3F00AB121EAC120CA5C7FCAA121EEA7F80A2 EAFFC0A4EA7F80A2EA1E000A4778C61B>33 D<001EEB03C0397F800FF000FF131F01C013 F8A201E013FCA3007F130F391E6003CC0000EB000CA401E0131C491318A3000114384913 300003147090C712604814E0000614C0000E130148EB038048EB070048130E0060130C1E 1D7DC431>I<1438A549B4FC010F13E0013F13F89038FE38FED801F0EB0F80D807E0EB03 C001C0EB01E0D80F801300D81F001470003E15301638481518A2007815FC00F814031507 A47EED03F8ED01F06C91C7FC127E127F1380EA3FC013F0EA1FF8EBFFB86C13F86CEBFF80 6C14E06C14F86C6C7F6D13FF010714801300023F13C0023813E0ED3FF0151F150FED07F8 1503150116FC001C1400127FEAFF80167CA413005A00E01578006015F8A2007015F00030 1401003815E0003C1403001CEC07C0000FEC0F80D80780EB1F00D803E0137E3901FC39FC 39007FFFF0011F13C0D903FEC7FCEB0038A526517BCA31>36 DII<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E013C0A312 011380120313005A1206120E5A5A5A12600B1D78C41B>I<140C141C1438147014E0EB01 C01303EB0780EB0F00A2131E5BA25B13F85B12015B1203A2485AA3485AA348C7FCA35AA2 123EA2127EA4127CA312FCB3A2127CA3127EA4123EA2123FA27EA36C7EA36C7EA36C7EA2 12017F12007F13787FA27F7FA2EB0780EB03C01301EB00E014701438141C140C166476CA 26>I<12C07E12707E7E7E120F6C7E6C7EA26C7E6C7EA21378137C133C133E131E131FA2 EB0F80A3EB07C0A3EB03E0A314F0A21301A214F8A41300A314FCB3A214F8A31301A414F0 A21303A214E0A3EB07C0A3EB0F80A3EB1F00A2131E133E133C137C13785BA2485A485AA2 485A48C7FC120E5A5A5A5A5A16647BCA26>I<14F0A2805CA70078EC01E000FCEC03F0B4 140FD87F80EB1FE0D83FC0EB3FC03A0FF060FF003903F861FC3900FC63F090383F6FC0D9 0FFFC7FCEB03FCEB00F0EB03FCEB0FFF90383F6FC09038FC63F03903F861FC390FF060FF 3A3FC0F03FC0D87F80EB1FE0D8FF00EB0FF000FC14030078EC01E0C790C7FCA7805CA224 2B7ACA31>I<16C04B7EB3AB007FBAFCBB1280A26C1900C8D801E0C9FCB3AB6F5A41407B B84C>I<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413E013C0A3120113801203 13005A1206120E5A5A5A12600B1D78891B>II<121EEA7F80A2EA FFC0A4EA7F80A2EA1E000A0A78891B>I<1618163C167CA2167816F8A216F01501A216E0 1503A216C01507A21680150FA2ED1F00A2151E153EA2153C157CA2157815F8A25D1401A2 4A5AA25D1407A25D140FA292C7FC5CA2141E143EA2143C147CA25CA25C1301A25C1303A2 5C1307A25C130FA291C8FC5BA2133EA2133C137CA2137813F8A25B1201A25B1203A2485A A25B120FA290C9FC5AA2121E123EA2123C127CA2127812F8A25A126026647BCA31>I<14 FF010713E090381F81F890383E007C01FC133F4848EB1F8049130F4848EB07C04848EB03 E0A2000F15F0491301001F15F8A2003F15FCA390C8FC4815FEA54815FFB3A46C15FEA56D 1301003F15FCA3001F15F8A26C6CEB03F0A36C6CEB07E0000315C06D130F6C6CEB1F806C 6CEB3F00013E137C90381F81F8903807FFE0010090C7FC28447CC131>I<143014F01301 1303131F13FFB5FC13E713071200B3B3B0497E497E007FB6FCA3204278C131>II<49B4FC010F13E0013F13FC9038FE01FE3A01 F0007F80D803C0EB3FC048C7EA1FE0120EED0FF0EA0FE0486C14F8A215077F5BA26C4813 0FEA03C0C813F0A3ED1FE0A2ED3FC01680ED7F0015FE4A5AEC03F0EC1FC0D90FFFC7FC15 F090380001FCEC007FED3F80ED1FC0ED0FE016F0ED07F816FC150316FEA2150116FFA312 1EEA7F80487EA416FE491303A2007EC713FC00701407003015F80038140F6C15F06CEC1F E06C6CEB3FC0D803E0EB7F803A01FE01FE0039007FFFF8010F13E0010190C7FC28447CC1 31>II<000615C0D807C0130701FCEB7F8090B612005D5D5D15E0158026063F FCC7FC90C9FCAE14FF010713C090381F01F090383800FC01F0137ED807C07F49EB1F8016 C090C7120F000615E0C8EA07F0A316F81503A216FCA5123E127F487EA416F890C712075A 006015F0A20070140F003015E00038EC1FC07E001EEC3F806CEC7F006C6C13FE6C6C485A 3901F807F039007FFFE0011F90C7FCEB07F826447BC131>II<121CA2EA1F8090B712C0A3481680A217005E0038C8120C0030151C00705D0060 153016705E5E4814014B5A4BC7FCC81206150E5D151815385D156015E04A5AA24A5A1407 92C8FC5CA25C141E143EA2147E147CA214FCA21301A3495AA41307A6130FAA6D5AEB01C0 2A457BC231>I<14FF010713E0011F13F890387F00FE01FC133FD801F0EB1F804848EB0F C049EB07E00007EC03F048481301A290C713F8481400A47FA26D130116F07F6C6CEB03E0 13FC6C6CEB07C09039FF800F806C9038C01F006CEBF03EECF87839007FFEF090383FFFC0 7F01077F6D13F8497F90381E7FFFD97C1F1380496C13C02601E00313E048486C13F00007 9038007FF84848EB3FFC48C7120F003EEC07FE150148140016FF167F48153FA2161FA56C 151E007C153EA2007E153C003E157C6C15F86DEB01F06C6CEB03E06C6CEB07C0D803F8EB 1F80C6B4EBFF0090383FFFFC010F13F00101138028447CC131>I<14FF010713E0011F13 F890387F80FC9038FC007E48487F4848EB1F804848EB0FC0000FEC07E0485AED03F0485A 16F8007F140190C713FCA25AA216FE1500A516FFA46C5CA36C7E5D121F7F000F5C6C6C13 0E150C6C6C131C6C6C5BD8007C5B90383F01E090390FFF80FE903801FE0090C8FC150116 FCA4ED03F8A216F0D80F801307486C14E0486C130F16C0ED1F80A249EB3F0049137E001E C75A001C495A000F495A3907E01FE06CB51280C649C7FCEB1FF028447CC131>I<121EEA 7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3A5121EEA7F80A2EAFFC0A4EA7F80A2EA1E000A 2B78AA1B>I<121EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCB3A5121E127FEAFF80A213 C0A4127F121E1200A512011380A3120313005A1206120E120C121C5A5A12600A3E78AA1B >I<121EEA7F80A2EAFFC0A4EA7F80A2EA1E00C7FCAA120CA5121EAC123FABEA7F80ACEA FFC0A9EA7F80EA1E000A4778B11B>I<007FBAFCBB1280A26C1900CEFCB0007FBAFCBB12 80A26C190041187BA44C>IIII<16C04B7EA34B7EA34B7EA34B7EA3ED19FEA3ED30FFA203 707FED607FA203E07FEDC03FA2020180ED801FA2DA03007F160FA20206801607A24A6D7E A34A6D7EA34A6D7EA20270810260147FA202E08191B7FCA249820280C7121FA249C87F17 0FA20106821707A2496F7EA3496F7EA3496F7EA201788313F8486C83D80FFF03037FB500 E0027FEBFFC0A342477DC649>IIIIIIIII<010FB512FEA3D9000313806E130080B3B3AB123F487E487E A44A5A13801300006C495A00705C6C13076C5C6C495A6CEB1F802603E07FC7FC3800FFFC EB1FE027467BC332>IIIIIII82 D<49B41303010FEBE007013F13F89039FE00FE0FD801F8131FD807E0 EB079F49EB03DF48486DB4FC48C8FC4881003E81127E82127C00FC81A282A37E82A27EA2 6C6C91C7FC7F7FEA3FF813FE381FFFE06C13FE6CEBFFE06C14FC6C14FF6C15C0013F14F0 010F80010180D9001F7F14019138001FFF03031380816F13C0167F163F161F17E000C015 0FA31607A37EA36C16C0160F7E17806C151F6C16006C5D6D147ED8FBC05CD8F9F0495AD8 F07C495A90393FC00FE0D8E00FB51280010149C7FC39C0003FF02B487BC536>I<003FB9 12F8A3903BF0001FF8001F01806D481303003EC7150048187C0078183CA20070181CA300 60180CA5481806A5C81600B3B3A54B7EED7FFE49B77EA33F447DC346>IIII89 D<001FB81280A39126800001130001FCC7FC01F04A5A01C04A5A5B90C8485A121E4C5A48 4B5AA200384B5A4C5AA24B90C7FC00304A5AA24B5AA24B5AC8485AA24B5A4B5AA24B5A5C 93C8FC4A5AA24A5A4A5AA24A5A4A5AA24A5A14FF5D4990C9FCEF0180495A495AA2495A49 4814031800495AA2495A495A5F4890C8FC485A5F485A48485D5F48485D17FE4848140348 48140F16FFB8FCA331447BC33C>II<01C01318000114384848137048C712E0000EEB01C0000C1480001C130300181400 00385B003013060070130E0060130CA300E0131C481318A400CFEB19E039FFC01FF801E0 13FCA3007F130FA2003F130701C013F8390F0001E01E1D71C431>II<130C131E133F497EEBF3C03801E1E03803C0F038 07807848487E001E7F487F0070EB038048EB01C00040EB00801A0E75C331>I<13C01201 EA0380EA0700120E120C121C12181238123012701260A312E05AA412CFEAFFC013E0A312 7FA2123F13C0EA0F000B1D79C41B>96 DIII<167FED3FFFA315018182B3EC 7F80903803FFF090380FC07C90383F000E017E1307496D5AD803F87F48487F5B000F8148 5AA2485AA2127FA290C8FC5AAB7E7FA2123FA26C7EA2000F5D7F6C6C5B00035C6C6C9038 077F806C6C010E13C0013F011C13FE90380FC0F8903803FFE09026007F0013002F467DC4 36>IIIIII<143C14FFA2491380A46D13 00A2143C91C7FCADEC7F80EB3FFFA31300147F143FB3B3AA123E127F39FF807F00A2147E A25C6C485A383C01F06C485A3807FF80D801FEC7FC195785C21E>IIII<3901FC01FE00FF903807FFC09138 1E07F091383801F8000701707F0003EBE0002601FDC07F5C01FF147F91C7FCA25BA35BB3 A8486CECFF80B5D8F83F13FEA32F2C7DAB36>II<3901FC03FC00FF90380FFF8091383C07E091387001F83A07FDE000FE0003018013 7FD801FFEC3F8091C7EA1FC04915E049140F17F0160717F8160317FCA3EE01FEABEE03FC A3EE07F8A217F0160F6D15E0EE1FC06D143F17806EEB7E00D9FDC05B9039FCF003F89138 3C0FE091381FFF80DA03FCC7FC91C9FCAE487EB512F8A32F3F7DAB36>I<91387F800390 3903FFE00790380FE07890393F801C0F90387E000E496D5AD803F8EB039F0007EC01BF49 14FF48487F121F5B003F81A2485AA348C8FCAB6C7EA3123F7F121F6D5C120F6D5B12076C 6C5B6C6C497E6C6C130E013F131C90380FC0F8903803FFE09038007F0091C7FCAEEEFF80 033F13FEA32F3F7DAB33>I<3903F803F000FFEB1FFCEC3C3EEC707F0007EBE0FF3803F9 C000015B13FBEC007E153C01FF13005BA45BB3A748B4FCB512FEA3202C7DAB26>I<9038 3FE0183901FFFC383907E01F78390F0003F8001E1301481300007C1478127800F81438A2 1518A27EA27E6C6C13006C7E13FC383FFFE06C13FC6C13FF6C14C06C14E0C614F0011F13 F81300EC0FFC140300C0EB01FE1400157E7E153EA27EA36C143C6C147C15786C14F86CEB 01F039F38003E039F1F00F8039E07FFE0038C00FF01F2E7DAC26>I<1306A5130EA4131E A3133E137EA213FE12011207001FB512F0B6FCA2C648C7FCB3A4150CAA017E131C017F13 18A26D133890381F8030ECC070903807E0E0903801FFC09038007F001E3E7EBC26>II< B539F001FFFCA3000790C7EA7FE06C48EC1F8000011600160E1200160C017F5CA280013F 5CA26E1370011F146080010F5CA2ECF00101075CA26D6C48C7FCA26E5A01011306A26D6C 5AA214FF6E5AA215B8EC3FB015F06E5AA36E5AA26E5AA36EC8FC2E2C7EAA33>IIII<003FB612E0A29038C0003F 90C713C0003CEC7F800038ECFF00A20030495A0070495AA24A5A0060495AA24A5A4A5AA2 C7485A4AC7FC5B5C495A13075C495A131F4A1360495A495AA249C712C0485AA2485A485A 1501485A48481303A24848EB07804848131F00FF14FF90B6FCA2232B7DAA2B>III<001EEB0780007FEB0FE039FF801FF0EBC03FA4 EB801F397F000FE0001EEB07801C0A76C231>127 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fo cmr12 14.4 28 /Fo 28 122 df<120FEA3FC0EA7FE012FF13F0A213F8A3127F123FEA0F381200A5137813 70A313F013E0A2120113C0120313801207EA0F00121EA25A5A12300D23768B21>44 D<120FEA3FC0EA7FE0EAFFF0A6EA7FE0EA3FC0EA0F000C0C768B21>46 D48 D50 DI<000316C001C0140301F8141F903A FFC003FF8091B612005E5E5E16E016804BC7FC019F13F8018113800180C9FCB0EC0FF0EC FFFE01836D7E903987F01FE090399F0007F801BE6D7E01F86D7E496D7E49EC7F805BEE3F C04915E0C9121F17F0A317F8160FA317FCA5120EEA3F80487E12FF7FA217F85B161F5B48 C813F012700078ED3FE0A26C16C0167F6CEDFF80001F16006C6C495A6C6C13036C6CEB07 F8D801F8EB1FF06CB4EB7FE06DB51280011F49C7FC010713F8010013C02E517ACE3B>53 D 65 D67 D69 D<49B612FEA490C7003F138092380FFE001507B3B3B3A21206EA3FC0487E487EA44B5AA2 5B007F5D0180131F0078C75B6C143F003E4A5A6C5D6C6C495A2707E003FEC7FC3901FC07 FC6CB512F0013F13C0D907FCC8FC2F547BD13C>74 D77 D82 D<003FBB12C0A449C79038F0000701F06E 48130001C0183F48C8EE0FE0007E1907007C1903A200781901A400701900A500F01AF048 1A70A6C91700B3B3AC4C7E030313FC027FB712E0A44C517CD055>84 D97 DII101 D 103 DI108 D<01FFD907FEEC03FFB590261FFFC0010F13E0 037F01F0013F13F8912701F80FFC9038FC07FE913D03C003FE01E001FF00039026070001 9038038000C6010E6D6C48C76C7E6D48DA7F8E6E7E4A159CA24ADA3FF86E7E02605D14E0 4A5DA34A5DB3AD2601FFE0DAFFF0EC7FF8B6D8C07F9026FFE03FB512F0A45C347CB363> I111 D<90397F8007FCB590387FFF800281B512E0913987 F00FF891398F8003FC000390399E0001FFC601BC6D7FD97FF86E7E4A6E7E4A6E7E4A140F 844A6E7EA2717EA3717EA4711380AB4D1300A44D5AA24D5AA2606E140F4D5A6E5D6E4A5A 6E4A5A02BC4AC7FC029E495A028FEB07FC913987E01FF00281B512C0DA807F90C8FCED0F F892CAFCB13801FFE0B612C0A4394B7DB341>I<01FFEB1F80B5EB7FF0913801FFF89138 03E1FC91380783FE0003EB0F07C6131EEB7F1C1438143091387003FC91386000F0160014 E05CA45CB3AA8048487EB612F0A427347DB32E>114 DIII121 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fp cmbxti10 12 8 /Fp 8 116 df54 D<007FB6023FB51280B76C4914C0A293C7 FC721480C649C9EBE00073C7FC19FE017F5F1801614E5A18076E5E4E5A181F6D5F183F4E C8FC187E6F14FE604D5A6D1503604D5A170F606F131F4D5A95C9FC6D5D177E5F160103E0 5B4C5A16076D5D160F4C5A5FEDF03F94CAFC167E6D14FE5EEDF1F815F35E15FF5E5E7F5E 93CBFCA25DA25D6D5BA25D5DA25D5DA26ECCFC147E4A466AC356>86 D<4AB47E021F13F091B512FC01038049EB81FF903A1FFE007F80D93FF8133F495A494814 C04849131F4849133F4890C71380A248157F484815005E4848EB03FEED0FFCED7FF848B6 5A16C093C7FC15F0D8FFF8C9FC5BA45BA51606007F150FEE1F80163F6C6C14FF4B13006C 6CEB07FE6C6CEB3FFC3A07FF01FFF06C90B55AC615806D01FCC7FC010713802A2E75AC35 >101 D105 D110 D<913801FFC0021F13FC027F13FF49B61280010701C113C0903A0FFE003FE0D91FF8EB1F F0D97FF014F84948EB0FFC485B5C4816FE4890C7FC5A5B121F5B123F161F127F5BA2163F 12FF4915FCA2167F17F85B17F016FF17E05D17C04B1380007F16005D4B5A6C6C495A001F EC3FF06C6CEBFFE02607FF075B6C90B5C7FC6C14FC6C6C13F0010790C8FC2F2E75AC3B> I<90393F8001FF9026FFE00F13E048D9F83F13F0486D4813F83B07E3FEFF03FC3B0FC3FF FC00FEEDF803D81F839038E007FF5ED83F0313C049495A127F007E020013FEA249EC0FFC 00FEED07F8007C49EB03E0000092C7FC131FA25CA2133FA25CA2137FA25CA213FFA25CA2 5AA25CA25AA25CA391C9FC6C5AEA00F8302E79AC32>114 DI E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fq cmbx12 20.74 18 /Fq 18 122 df76 D<922603FFF8150E037FD9FFC0143F0203B600FC5C02 1F03FF5C027FEEC00149B8EAF00349EFFC07010FDA000F13FE4901F09039007FFF8F4901 C0020F13DF4990C8000390B5FC494815004801F8163F48844A8248498248844A8248844A 834885A291CB7E5A86A286B5FC8680A28680A280A26E8380806E187E6E95C7FC6C8015E0 15FCEDFFC06C15FCEEFFE06C16FF18F06CEFFF8019F06C18FE737E6C856C19F06C19FC6D 846D846D856D856D850101856D85023F846E841407020084031F18801500040F17C0EE00 7F050716E0EF003F1803DE007F14F0191F8585070114F8A28586007E85B4FC86A286A37F 86A36D1AF0A37F1CE06D60A26D1AC06D607F6D1A806E5F6E4D13006E606E17FF02FC4C5B 02FF4C5B03E04B5B03FC031F5B01FBD9FF80027F5B01F102FE0107B55AD9E07F90B8C7FC 6E17FCD9C00F5FD9800317E090C76C168048020F4BC8FC48020015F00070030349C9FC55 7A75F76C>83 D<001FC012F8A7481FFC03F0C76C91C7120F92C8EF007F02F81B1F02E01B 0702801B0191C984491D7F491D3F491D1FA2491D0FA2491D07007F1FFEA2491D03A4491D 01A700FF1FFF90CA85A6CB1A00B3B3B3AD4ABC12C0A8787479F387>I<92383FFFF80207 B612E0027F15FC49B87E010717E0011F83499026F0007F13FC4948C7000F7F90B502036D 7E486E6D806F6D80727F486E6E7F8486727FA28684A26C5C72806C5C6D90C8FC6D5AEB0F F8EB03E090CAFCA70507B6FC041FB7FC0303B8FC157F0203B9FC021FECFE0391B6128001 03ECF800010F14C04991C7FC017F13FC90B512F04814C0485C4891C8FC485B5A485B5C5A 5CA2B5FC5CA360A36E5DA26C5F6E5D187E6C6D846E4A48806C6D4A4814FC6C6ED90FF0EC FFFC6C02E090263FE07F14FE00019139FC03FFC06C91B6487E013F4B487E010F4B130701 0303F01301D9003F0280D9003F13FC020101F8CBFC57507ACE5E>97 D<903801FFFCB6FCA8C67E131F7FB3ADF0FFFC050FEBFFE0057F14FE0403B77E040F16E0 043F16F84CD9007F13FE9226FDFFF001077F92B500C001018094C86C13E004FC6F7F4C6F 7F04E06F7F4C6F7F5E747F93C915804B7014C0A27414E0A21DF087A21DF8A31DFC87A41D FEAF1DFCA4631DF8A31DF098B5FC1DE0A25014C0A26F1980501400705D705F704B5B505B 704B5B04FC4B5BDBE7FE92B55A9226C3FF8001035C038101E0011F49C7FC9226807FFC90 B55A4B6CB712F04A010F16C04A010393C8FC4A010015F84A023F14C090C9000301F0C9FC 5F797AF76C>I<93383FFFF00307B612C0033F15F84AB712FE0207707E021F17E0027F83 91B526FC001F7F010302C001037F4991C7487F49495C495B4901F04A7F5B90B55A485CA2 485C4891C8FCA248715B5C48715B725B4A6F5B489438007FC0071FC7FC96C8FC5AA25CA3 B5FCAF7E80A47E80A27E806CF11F80F23FC06C6E167FA26C6EEEFF80816C606C6E17006D 6D4B5A6D6D15076D6D4B5A6D6D6C4A5A6D02E0EC7FF06D02F849485A01009126FF801F5B 6E91B6C7FC021F5E020716F8020116E06E6C1580030702FCC8FCDB003F13804A507ACE56 >I<93387FFF80030FB512FC037FECFF804AB712E0020716F8021F16FE027FD9F8077F49 B5D8C000804991C7003F13E04901FC020F7F49496E7F49498049496E7F49496E7F90B55A 48727E92C914804884485B1BC048841BE0485BA27313F05AA25C5AA21BF885A2B5FCA391 BAFCA41BF002F8CCFCA67EA3807EA47E806CF103F0F207F86C7F1A0F6C6E17F06C191F6F 17E06C6E163F6D6DEE7FC06D6D16FF6D6D4B13806D6D4B13006D6D6CEC0FFE6D02E0EC3F FC6D02F8ECFFF86D9126FFC00F5B023F91B65A020F178002034CC7FC020016F8031F15E0 030392C8FCDB000F13E04D507BCE58>101 D<903801FFFCB6FCA8C67E131F7FB3AD9538 0FFFE095B512FE05036E7E050F15E0053F15F84D81932701FFF01F7F4CD900077FDC07FC 6D80DC0FF06D80DC1FC07F4C48824CC8FC047E6F7F5EEDFDF85E03FF707F5EA25EA25EA2 93C9FCA45DB3B3A6B8D8E003B81280A8617879F76C>104 DI<903801FFFC B6FCA8C67E131F7FB3AE0603B612FEA8DE001F01F8C7FC070713804F90C8FCF13FFE4F5A F1FFF04E5B4E5B4E5B061F90C9FC4E5AF07FF84E5A4D5B05075B4D5B4D48CAFC4D5A4D5A 4D5A04035B4C7F4C7F5E4C7F4C7F03FDB6FC92B7FC858585A204F98004E0804C804C7E4C 6C7F4B6D7F4B824B7F7180718086837180727F8684727F72808784728072808784737F73 7F87854F14C0B8D88007B712F0A85C787AF766>107 D<903801FFFCB6FCA8C67E131F7F B3B3B3B3B3ABB812C0A82A7879F735>I<902601FFF891260FFFE093383FFF80B692B500 FE0303B512F805036E6C020F14FE050F03E0023F6E7E053F03F891B712E04D6F49829327 01FFF01F6D0107D9C07F7F4CD900076D90270FFC001F7FDC07FC6D9126801FF06D7FC66C DA0FF06D9126C03FC06D7F011FDA1FC06D4BC77E6D4A48DCE0FE834CC8ECE1FC047E6FD9 F1F86E804CEFF3F0DBF9F8EFF7E04C6003FB7001FF6F804C6015FF4C95C9FCA24C5FA293 C95CA44B60B3B3A6B8D8E003B8D8800FB712FEA8974E79CDA2>I<93381FFFE00303B6FC 031F15E092B712FC020316FF020F17C0023FD9FC0014F091B500C0010F13FC4991C70003 7F4901FC02007F010F496F13C049496F7F49496F7F4B8149496F7F90B5C96C7F4886A248 49707F481B80A248497014C0A2481BE0A348497113F0A3481BF8A5B51AFCAE6C1BF8A46C 1BF06E94B5FCA36C1BE0A26C6D4C14C0A26C1B806E5E6C1B006C6E4B5BA26C6E4B5B6D6D 4B5B6D6D4B5B6D6D4B5B6D6D92B55A6D01FF02035C6D02C0010F91C7FC010002FC90B512 FC6E90B75A021F17E00207178002014CC8FCDA003F15F0030392C9FCDB001F13E056507B CE61>111 D<902601FFFCEC7FFEB6020FB512F0057F14FE4CB712C0040716F0041F8204 7F16FE93B5C66C7F92B500F0010F14C0C66C0380010380011F4AC76C806D4A6E8004F06F 7F4C6F7F4C6F7F4C8193C915804B7014C0861DE0A27414F0A27414F8A47513FCA57513FE AF5113FCA598B512F8A31DF0621DE0621DC0621D806F5E701800704B5B505B704B5B7092 B55A04FC4A5C704A5C706C010F5C05E0013F49C7FC9227FE7FFC01B55A70B712F0040F16 C0040393C8FC040015F8053F14C0050301F0C9FC94CCFCB3A6B812E0A85F6F7ACD6C>I< 902601FFF8EB07FEB691383FFFC094B512F00403804C14FE4C8093261FFC3F138093263F E07F13C0DC7F80B5FCC66C5D011FDAFE0114E06DEBF9FC16F815FB16F016E015FF16C071 14C05E72138095381FFE0093C76C5AF001E095C8FCA25DA65DB3B3A2B812F8A8434E7ACD 4F>114 D<912603FFFCEB0780027F9039FFE00FC00103B6EAF83F010FEDFEFF013F92B5 FC49EB000F2601FFF01300480180143F4890C8120F4848814848814981123F83485A187F A212FF6D163FA37F7F6DEE1F8002C092C7FC14F014FEECFFF06CECFF8016FEEEFFE06C16 FC6C16FF18C06C836C17F86C836C836C83013F17806D17C0010717E0010117F0EB003F02 0716F8EC001F030015FC1607EE007F051F13FE1707007E82B482836D167FA2183F7F181F A27F19FC7FA26D163F6D17F86D167F19F06D16FF6E4A13E002E04A13C06E4A138002FE02 3F1300913AFFC003FFFE01E790B65A01C316F0018016C026FE003F92C7FC48010714F800 70D9007F90C8FC3F507ACE4C>I<15FFA75CA55CA45CA25CA25CA25CA25C91B5FCA25B5B 5B131F5B90B9FC120FBAFCA6D8000791C9FCB3B3A3F01FE0AE183F7014C07F187F701480 6D16FF826D4B13006E6D485AEEFE0F6E90B55A020F5D6E5D020115C06E6C5C031F49C7FC 030113F03B6E7CEC4B>I121 D E %EndDVIPSBitmapFont end %%EndProlog %%BeginSetup %%Feature: *Resolution 600dpi TeXDict begin %%PaperSize: A4 end %%EndSetup %%Page: 1 1 TeXDict begin 1 0 bop 771 809 a Fq(The)65 b(Simple)g(So)5 b(c)-5 b(k)g(ets)65 b(Library)1699 1017 y Fp(V)-9 b(ersion)42 b(6)560 1313 y Fo(Charles)c(E.)g(Campb)s(ell,)d(Jr.,)j Fn(Ph.D.)304 b Fo(T)-10 b(erry)37 b(McRob)s(erts)1535 1545 y(August)h(23,)g(2005)1750 1912 y Fm(Abstract)380 2081 y Fl(The)31 b Fk(Simple)k(So)-5 b(ckets)35 b(Libr)-5 b(ary)33 b Fl(\(SSL\))e(allo)m(ws)g(C)g(programmers)g(to)i(use)e(in)m (terpro)s(cess)g(com-)244 2194 y(m)m(unications)26 b(via)h(Berk)m(eley) h(so)s(c)m(k)m(ets)h(simply)c(and)i(quic)m(kly)-8 b(.)39 b(The)26 b(programmer)h(is)g(able)g(to)h(mo)m(v)m(e)244 2307 y(information)h(easily)i(b)s(et)m(w)m(een)h(pro)s(cesses)f(on)g (the)g(same)h(or)f(di\013eren)m(t)g(mac)m(hines)f(connected)i(via)244 2420 y(Ethernet)i Fj(\(tm\))23 b Fl(and)34 b(using)f(the)i(TCP/IP)68 b(proto)s(col.)53 b(Most)35 b(of)g(the)f(SSL's)f(functions)g(resem)m (ble)244 2533 y(C's)d(\014le)f(i/o)i(functions,)e(so)i(C)f(programmers) f(will)f(\014nd)h(the)h(SSL)g(easy)h(to)g(learn.)380 2685 y(The)43 b(SSL)f(curren)m(tly)g(runs)g(under)f(v)-5 b(arious)42 b(UNIX)i Fj(\(tm\))72 b Fl(mac)m(hines:)66 b(IRIX)42 b Fj(\(tm\))72 b Fl(\(Silicon)244 2797 y(Graphics\),)47 b(SunOS)42 b Fj(\(tm\))29 b Fl(\(Sun\),)47 b(Domain)d(O/S)g Fj(\(tm\))29 b Fl(\(Ap)s(ollo\),)47 b(Ultrix)c Fj(\(tm\))29 b Fl(\(Dec\),)50 b(AIX)44 b Fj(\(tm\))244 2910 y Fl(\(IBM\),)29 b(SCO)e Fj(\(tm\))19 b Fl(,)29 b(OSF)e Fj(\(tm\))19 b Fl(,)29 b(and)f(VMS)g(5.x)g Fj(\(tm\))19 b Fl(,)29 b(and)e(MS-DOS)h Fj(\(tm\))47 b Fl(\(using)27 b(Borland)g(C++)244 3023 y(5.0\).)388 3532 y Fm(Keyw)m(ords)920 3382 y Fi(So)r(c)n(k)n(et)g(In)n (terpro)r(cess)f(Comm)n(unications)99 b(In)n(termac)n(hine)26 b(Comm)n(unications)920 3482 y(Berk)n(eley)g(So)r(c)n(k)n(ets)828 b(Ethernet)920 3581 y Fl(TCP/IP)1101 b Fi(Rob)r(otics)920 3681 y(Mac)n(hine)27 b(Con)n(trol)p eop end %%Page: 1 2 TeXDict begin 1 1 bop 0 407 a Fh(Con)l(ten)l(ts)0 626 y Fg(1)90 b(Cop)m(yrigh)m(t)3206 b(1)0 844 y(2)90 b(In)m(tro)s(duction) 3080 b(1)0 1062 y(3)90 b(The)38 b(Library)3103 b(3)146 1182 y Fn(3.1)100 b(User)33 b(Guide)96 b(.)50 b(.)g(.)g(.)f(.)h(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)184 b(4)146 1302 y(3.2)100 b(Reference)34 b(Man)m(ual)45 b(.)k(.)h(.)g(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.) h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)184 b(7)146 1423 y(3.3)100 b(Hin)m(ts)41 b(.)50 b(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)135 b(13)0 1641 y Fg(4)90 b(The)38 b(P)m(ortMaster)2848 b(17)146 1761 y Fn(4.1)100 b(Users)34 b(Guide)57 b(.)50 b(.)g(.)g(.)f(.)h(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)135 b(17)146 1882 y(4.2)100 b(Sharing)31 b(P)m(ortMasters)83 b(.)50 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)135 b(17)146 2002 y(4.3)100 b(Theory)33 b(of)g(Op)s(eration)79 b(.)50 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)135 b(18)371 2122 y(4.3.1)111 b(The)33 b(P)m(ortMaster)h(Firew)m(all)49 b(.)h(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)135 b(21)0 2340 y Fg(5)90 b(The)38 b(Utilities)3016 b(22)146 2461 y Fn(5.1)100 b(The)33 b Ff(sktdbg)h Fn(Program)50 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.) g(.)g(.)g(.)g(.)g(.)135 b(23)0 2679 y Fg(6)90 b(Installation)36 b(Instructions)2460 b(25)146 2799 y Fn(6.1)100 b(Unix)63 b(.)50 b(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)135 b(25)146 2919 y(6.2)100 b(Vms)76 b(.)50 b(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g (.)g(.)g(.)g(.)g(.)g(.)135 b(25)146 3040 y(6.3)100 b(Windo)m(ws)33 b(95)f(\()g(or)h(more)f(recen)m(t\))65 b(.)50 b(.)g(.)g(.)g(.)f(.)h(.)g (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) g(.)135 b(26)146 3160 y(6.4)100 b(Older)32 b(Ms-Dos)61 b(.)50 b(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.) g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)f(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g (.)135 b(27)0 3378 y Fg(7)90 b(App)s(endix:)51 b(Miscellaneous)36 b(F)-9 b(unctions)1897 b(29)p eop end %%Page: 1 3 TeXDict begin 1 2 bop 0 407 a Fh(1)161 b(Cop)l(yrigh)l(t)154 626 y Ff(Copyright:)54 b(Copyright)f(\(C\))f(1999-2005)i(Charles)f(E.)f (Campbell,)i(Jr.)718 746 y(Permission)g(is)d(hereby)i(granted)g(to)f (use)g(and)g(distribute)i(this)718 867 y(code)e(and)g(documentation,)j (with)d(or)g(without)h(modifications,)718 987 y(provided)g(that)f(this) h(copyright)g(notice)g(is)f(copied)h(with)718 1107 y(it.)f(Like)g (anything)i(else)e(that's)h(free,)f(the)g(Simple)h(Sockets)718 1228 y(Library)g(is)f(provided)h(*as)f(is*)g(and)g(comes)h(with)f(no)g (warranty)718 1348 y(of)g(any)g(kind,)g(either)h(expressed)h(or)e (implied.)104 b(By)52 b(using)718 1469 y(this)g(software,)i(you)e (agree)g(that)h(in)f(no)f(event)i(will)f(the)718 1589 y(copyright)h(holder)g(be)f(liable)h(for)f(any)g(damages)h(resulting) 718 1709 y(from)f(the)g(use)g(of)g(this)g(software.)0 2162 y Fh(2)161 b(In)l(tro)t(duction)0 2381 y Fn(The)28 b Fe(Simple)g(So)-5 b(ckets)29 b(Libr)-5 b(ary)27 b Fn(\(henceforth)h (to)e(b)s(e)h(abbreviated)g(as)g(the)g Fl(SSL)p Fn(\))e(allo)m(ws)h(C)h (programmers)0 2502 y(to)g(dev)m(elop)g(systems)i(of)d(co)s(op)s (erating)g(programs)g(using)h(Berk)m(eley)h(streaming)e(So)s(c)m(k)m (ets)j(running)d(under)0 2622 y(the)41 b Fl(TCP/IP)77 b Fn(proto)s(col)39 b(o)m(v)m(er)i(Ethernet.)68 b(The)41 b Fl(SSL)e Fn(pro)m(vides)j(simple)c(w)m(a)m(ys)k(to)e(mo)m(v)m(e)h (information)0 2743 y(b)s(et)m(w)m(een)25 b(programs)e(running)g(on)g (the)h(same)f(or)g(di\013eren)m(t)g(mac)m(hines)h(and)f(do)s(es)h(so)f (with)g(little)e(o)m(v)m(erhead.)0 2863 y(During)43 b(exp)s(erimen)m (ts)j(with)e(the)h Fe(Sr)-5 b(e)g(adbytes)44 b Fn(and)h Fe(Swrite)f Fn(functions,)k(for)c(example,)k(b)s(et)m(w)m(een)e(t)m(w)m (o)0 2983 y(mac)m(hines,)d(a)f(44)p Fd(;)17 b Fn(000)41 b(b)m(ytes/second)k(transfer)e(rate)g(w)m(as)g(ac)m(hiev)m(ed)h(with)e (4)h(b)m(ytes)h(p)s(er)f(pac)m(k)m(et)h(and)0 3104 y(o)m(v)m(er)f(1)p Fd(;)17 b Fn(000)p Fd(;)g Fn(000)39 b(b)m(ytes/second)44 b(w)m(as)f(ac)m(hiev)m(ed)f(with)g(128)e(b)m(ytes)k(p)s(er)d(pac)m(k)m (et.)72 b(Of)41 b(course,)k(hea)m(vily)0 3224 y(loaded)f(net)m(w)m (orks)i(will)d(a\013ect)h(the)h(rate)g(individual)c(users)46 b(ac)m(hiev)m(e.)80 b(The)46 b Fl(SSL)d Fn(pro)m(vides)i Fe(two-way)0 3345 y Fn(comm)m(unications.)146 3465 y(The)38 b Fl(SSL)e Fn(w)m(as)i(designed)g(to)f(resem)m(ble)g(the)h Fl(FILE)e Fn(i/o)g(system)i(pro)m(vided)g(b)m(y)g(the)f(standard)h(C)f (li-)0 3585 y(braries)53 b(\(ie.)f(fop)s(en,)59 b(fclose,)f(fputs,)h (etc.)105 b(map)52 b(to)h Fl(SSL)f Fn(analogs)g(Sop)s(en,)58 b(Sclose,)h(Sputs,)g(etc.\).)0 3706 y(Th)m(us,)34 b(C)f(programmers)e (t)m(ypically)h(\014nd)h(the)g Fl(SSL)e Fn(easy)j(to)e(learn.)146 3826 y(A)f(go)s(o)s(d)e(analogy)g(for)h(the)g Fl(SSL)f Fn(refers)j(to)d(the)i(phone)g(system.)44 b(There)31 b(are)g(three)g(t)m(yp)s(es)g(of)f(So)s(c)m(k)m(ets)0 3946 y(supp)s(orted)c(b)m(y)g(the)g Fl(SSL)e Fn(that)h(concern)h(the)g (user:)g(a)f Fe(server)p Fn(,)g(a)g Fe(client)p Fn(,)h(and)f(an)g Fe(ac)-5 b(c)g(ept)25 b Fn(so)s(c)m(k)m(et.)68 b(A)25 b(serv)m(er)0 4067 y(is)h(analogous)g(to)h(someone)g(w)m(aiting)e(b)m (y)j(sev)m(eral)g(phones)g(for)e(a)h(call,)e(a)i(clien)m(t)f(is)g (analogous)g(to)h(someone)0 4187 y(making)k(a)i(call,)e(and)h(an)h (accept)h(is)e(analogous)f(to)h(a)h(\(serv)m(er\))h(p)s(erson)f (accepting)g(the)g(call)e(b)m(y)j(pic)m(king)0 4308 y(up)f(one)g(of)f (the)h(phones.)146 4428 y(Th)m(us,)42 b(one)d(m)m(ust)f(ha)m(v)m(e)i(a) f(serv)m(er)h(for)e(a)g(clien)m(t)g(to)g(mak)m(e)h(a)f(successful)i (connection.)62 b(The)39 b(serv)m(er)0 4548 y(m)m(ust)45 b(in)g(turn)g(accept)h(the)g(connection.)82 b(Unlik)m(e)44 b(our)i(o)m(v)m(erw)m(ork)m(ed)i(serv)m(er)f(p)s(erson,)i(ho)m(w)m(ev)m (er,)i(the)0 4669 y(computer)30 b(using)h(the)f Fl(SSL)g Fn(is)g(p)s(erfectly)g(happ)m(y)i(handling)d(m)m(ultiple)f(\\accept")j (So)s(c)m(k)m(ets)h(concurren)m(tly)-8 b(.)146 4789 y(The)39 b Fl(SSL)e Fn(itself)g(is)g(pro)m(vided)i(in)e(three)i(main)d(parts)j (\(see)g(T)-8 b(able)38 b(1\).)59 b(The)39 b Fe(Libr)-5 b(ary)38 b Fn(is)g(comp)s(osed)0 4910 y(of)32 b(C)h(functions)g(and)f (the)h Fe(PortMaster)h Fn(and)e(the)h Fe(Utilities)g Fn(are)g(self-con)m(tained)f(programs.)146 5030 y(The)41 b Fl(SSL)e Fn(w)m(as)h(used)h(at)f(the)g(In)m(telligen)m(t)e(Rob)s (otics)h(Lab)s(oratory)g(\()p Fl(IRL)p Fn(\))g(since)h(Ma)m(y)-8 b(,)43 b(1991.)64 b(The)0 5150 y(soft)m(w)m(are)28 b(app)s(ears)f(to)f (b)s(e)h(stable)g(at)f(the)h(curren)m(t)h(writing)d(and)i(reasonably)g (robust.)42 b(F)-8 b(or)26 b(example,)i(the)0 5271 y(P)m(ortMaster,)36 b(a)f(bac)m(kground)h(pro)s(cess)g(pro)m(vided)g(in)e(the)i Fl(SSL)d Fn(distribution,)h(is)h(resistan)m(t)g(to)g(hanging)0 5391 y(\(and)46 b(thereb)m(y)i(b)s(eing)e(unresp)s(onsiv)m(e\).)86 b(It)47 b(uses)g Fe(Stime)-5 b(outwait)9 b Fn(s)48 b(\(see)f(the)g (Reference)g(Man)m(ual\))f(to)0 5511 y(return)f(to)f(its)f(normal)f (quiescen)m(t)k(mo)s(de)e(when)h(comm)m(unications)d(with)i(one)h(of)f (its)f(clien)m(ts)h(ceases)1926 5707 y(1)p eop end %%Page: 2 4 TeXDict begin 2 3 bop 1079 459 a Fn(T)-8 b(able)32 b(1:)44 b Fg(The)37 b(Three)h(P)m(arts)f(of)g(the)h Fm(SSL)0 688 y Fg(Library)49 b Fn(The)33 b(functions)g(that)f(the)h(users)h (will)c(link)i(to)g(are)h(in)e(the)i(library)-8 b(.)0 891 y Fg(P)m(ortMaster)48 b Fn(The)28 b(P)m(ortMaster)f(is)f(a)h(d\177) -49 b(aemon)26 b(program)f(whic)m(h)i(runs)g(in)f(the)h(bac)m(kground.) 42 b(It)27 b(allo)m(ws)244 1011 y Fe(clients)32 b Fn(to)g(connect)i(to) e Fe(servers)g Fn(using)g(an)m(y)h(a)m(v)-5 b(ailable)30 b(p)s(orts.)0 1215 y Fg(Utilities)45 b Fn(There)36 b(are)e(sev)m(eral)h (utilit)m(y)d(programs)i(pro)m(vided)h(with)f(the)g Fl(SSL)p Fn(:)g Ff(sktdbg)p Fn(,)i Ff(srmsrvr)p Fn(,)h(and)244 1335 y Ff(spmtable)p Fn(.)0 1731 y(unexp)s(ectedly)-8 b(.)146 1851 y(The)34 b Fl(IRL)e Fn(uses)j(the)e Fl(SSL)e Fn(to)i(con)m(trol)f(its)g(three)h(rob)s(ots;)g(its)f(use)i(of)e(the)i (Ethernet)g(is)e(consequen)m(tly)0 1972 y(somewhat)g(hea)m(vy)-8 b(.)44 b(Those)33 b(of)e(y)m(ou)h(who)g(wish)f(to)g(con)m(trol)g(mac)m (hinery)g(or)g(otherwise)h(presen)m(t)h(a)e(hea)m(vy)0 2092 y(load)25 b(ma)m(y)h(wish)g(to)f(purc)m(hase)j(a)e(\\bridge")f(to) h(isolate)e(y)m(our)j(mac)m(hines)f(from)e(y)m(our)j(lo)s(cal)d(net)m (w)m(ork.)43 b(This)0 2213 y(isolation)34 b(will)g(b)s(ene\014t)j(b)s (oth)g(the)g(y)m(ou)g(and)f(the)h(net)m(w)m(ork,)j(as)c(the)h(hea)m(vy) h(user)g(will)c(not)i(b)s(e)h(a\017icted)0 2333 y(with)26 b(slo)m(wdo)m(wns)h(due)g(to)f(the)h(net)m(w)m(ork)h(and)e(the)h(net)m (w)m(ork)h(will)c(not)i(b)s(e)g(b)s(othered)h(with)f(lots)f(of)h(pac)m (k)m(ets)0 2453 y(whic)m(h)33 b(slo)m(ws)g(all)e(its)h(users)i(do)m (wn.)1926 5707 y(2)p eop end %%Page: 3 5 TeXDict begin 3 4 bop 0 407 a Fh(3)161 b(The)53 b(Library)0 626 y Fn(The)29 b(user)g(of)f(the)g Fl(SSL)f Fn(accesses)k(it)c(b)m(y)i (linking)d(his)i(or)f(her)i(program)e(to)g(a)h Fe(libr)-5 b(ary)p Fn(.)70 b(A)28 b(soft)m(w)m(are)h(library)0 746 y(is)k(t)m(ypically)g(a)g(single)f(\014le)i(whic)m(h)g(consists)g(of)f (some)h(link)-5 b(age)32 b(information)e(along)i(with)i(pre-compiled)0 867 y Fe(obje)-5 b(ct)27 b(c)-5 b(o)g(de)p Fn(;)26 b(unfortunately)-8 b(,)26 b(metho)s(ds)e(for)f(pro)s(ducing)h(a)g(library)e(and)j(linking) d(to)i(it)f(v)-5 b(ary)24 b(from)f(system)0 987 y(to)30 b(system)i(and)f(compiler)d(to)j(compiler.)40 b(Directions)30 b(for)g(sev)m(eral)h(systems)h(app)s(ear)f(in)f(the)h(Section)f(on)0 1107 y(Implemen)m(tation.)146 1228 y(Practically)k(sp)s(eaking,)i(a)f (library)g(is)g(comp)s(osed)h(of)f(a)g(n)m(um)m(b)s(er)h(of)g (pre-compiled)e(C)i(functions)f(to)0 1348 y(b)s(e)30 b(utilized)e(b)m(y)j(the)f(programmer.)41 b(The)31 b(calls)d(made)i(a)m (v)-5 b(ailable)27 b(in)i(the)h Fl(SSL)f Fn(are)h(reminiscen)m(t)f(of)g (those)0 1469 y(used)34 b(b)m(y)f(the)g(v)-5 b(arious)32 b(\014le)g(functions)h(in)f(the)h(C)g(language)e(\(see)j(T)-8 b(able)32 b(2\).)754 1762 y(T)-8 b(able)32 b(2:)43 b(Simple)31 b(So)s(c)m(k)m(ets)j(and)f(Related)f(File)f Fl(I/O)h Fn(F)-8 b(unctions)p 1209 1796 1482 4 v 1209 1813 V 1207 1933 4 121 v 1224 1933 V 1276 1897 a Fe(File)34 b(F)-7 b(unction)p 1897 1933 V 98 w(So)i(cket)35 b(F)-7 b(unction)p 2673 1933 V 2690 1933 V 1209 1937 1482 4 v 1207 2057 4 121 v 1224 2057 V 1276 2021 a Fn(fop)s(en)p 1897 2057 V 439 w(Sop)s(en)p 2673 2057 V 2690 2057 V 1207 2177 V 1224 2177 V 1276 2141 a(fclose)p 1897 2177 V 441 w(Sclose)p 2673 2177 V 2690 2177 V 1207 2298 V 1224 2298 V 1276 2262 a(fread)p 1897 2298 V 458 w(Sread)p 2673 2298 V 2690 2298 V 1207 2418 V 1224 2418 V 1276 2382 a(fwrite)p 1897 2418 V 425 w(Swrite)p 2673 2418 V 2690 2418 V 1207 2538 V 1224 2538 V 1276 2502 a(fgets)p 1897 2538 V 474 w(Sgets)p 2673 2538 V 2690 2538 V 1207 2659 V 1224 2659 V 1276 2623 a(fputs)p 1897 2659 V 458 w(Sputs)p 2673 2659 V 2690 2659 V 1207 2779 V 1224 2779 V 1276 2743 a(fprin)m(tf)p 1897 2779 V 403 w(Sprin)m(tf)p 2673 2779 V 2690 2779 V 1207 2900 V 1224 2900 V 1276 2863 a(fscanf)p 1897 2900 V 428 w(Sscanf)p 2673 2900 V 2690 2900 V 1209 2903 1482 4 v 1209 2920 V 146 3239 a(The)35 b(So)s(c)m(k)m(ets)h (library)c(dep)s(ends)k(up)s(on)e(the)g Fe(PortMaster)g Fn(running)g(on)g(y)m(our)g(host)g(mac)m(hine.)47 b(Only)0 3360 y(one)37 b(cop)m(y)g(of)f(the)h(P)m(ortMaster)h(need)f(b)s(e)g (running)f(at)g(an)m(y)h(time)e(on)h(a)g(giv)m(en)h(mac)m(hine,)g(and)g (ma)m(y)f(b)s(e)0 3480 y(started)h(up)g(b)m(y)g(an)m(y)m(one)h(b)m(y)f (running)f(the)g Fe(Spm)g Fn(program)f(in)h(the)g(bac)m(kground.)56 b(On)37 b(Unix,)g(the)g Fe(Spm)0 3600 y Fn(program)31 b(will)f(put)j(itself)e(in)m(to)g(the)i(bac)m(kground.)45 b(One)33 b(ma)m(y)f(determine)g(if)f(y)m(our)i(system)g(has)g(a)f(P)m (ort-)0 3721 y(Master)40 b(running)f(b)m(y)h(t)m(yping)g Fe(spmtable)e Fn(\014rst)i({)f(it)f(will)f(inform)h(y)m(ou)i(of)f(an)m (y)h(existing)f(serv)m(ers)i(if)e(the)0 3841 y(P)m(ortMaster)34 b(is)e(up)h(or)f(tell)f(y)m(ou)i(that)g(the)g(P)m(ortMaster)g(is)f(not) h(up)g(otherwise.)146 3961 y(A)25 b(new)g(feature)g(of)f(the)h Fl(SSL)f Fn(allo)m(ws)f(serv)m(ers)k(to)d(share)h(another)g(mac)m (hine's)g(P)m(ortMaster.)42 b(Th)m(us,)28 b(the)0 4082 y Fl(SSL)g Fn(supp)s(orts)i(b)s(oth)f(distributed)g(and)h(cen)m (tralized)f(so)s(c)m(k)m(et)i(name)e(to)g(p)s(ort)g(mapping.)40 b(If)30 b(the)f(mac)m(hine)0 4202 y(on)h(whic)m(h)g(a)g(serv)m(er)i(is) d(to)h(run)g(do)s(esn't)g(ha)m(v)m(e)i(a)d(P)m(ortMaster,)j(suc)m(h)f (as)f(older)f Fl(MSDOS)h Fn(mac)m(hines,)g(then)0 4323 y(it)i(can)g(\\b)s(orro)m(w")h(another)f(mac)m(hine's)h(P)m(ortMaster.) 146 4443 y(A)d(program)d(ma)m(y)j(op)s(en)f(a)g(serv)m(er)i(So)s(c)m(k) m(et,)g(a)d(clien)m(t)h(So)s(c)m(k)m(et,)i(or)e(an)g(accept)i(So)s(c)m (k)m(et.)43 b(F)-8 b(ollo)m(wing)27 b(the)0 4563 y(phone)g(system)g (analogy)-8 b(,)26 b(assume)g(that)g(a)f(serv)m(er)j(So)s(c)m(k)m(et)f (is)f(op)s(ened)h(\014rst.)41 b(Then,)28 b(a)d(di\013eren)m(t)h (program)0 4684 y(ma)m(y)39 b(op)s(en)g(a)f(clien)m(t)h(So)s(c)m(k)m (et)h(whic)m(h)f(attempts)g(to)g(connect)h(to)e(the)i(serv)m(er)g({)f (it)f(succeeds)j(when)g(the)0 4804 y(serv)m(er)e(program)c(\\notices")h (that)h(there)g(is)f(a)h(connection)g(w)m(aiting)e(on)i(the)g(serv)m (er)h(So)s(c)m(k)m(et)g(and)f(then)0 4924 y(generates)e(an)e(accept)i (So)s(c)m(k)m(et.)48 b(The)35 b(clien)m(t)e(So)s(c)m(k)m(et)i(can)f(op) s(en,)h(ho)m(w)m(ev)m(er,)h(b)s(efore)e(the)g(serv)m(er)i(accepts)0 5045 y(the)e(clien)m(t;)f(there)h(just)g(w)m(on't)g(b)s(e)g(an)m(y)g(t) m(w)m(o-w)m(a)m(y)h(comm)m(unication)c(un)m(til)h(the)i(serv)m(er)h(do) s(es)f(accept)h(the)0 5165 y(clien)m(t.)1926 5707 y(3)p eop end %%Page: 4 6 TeXDict begin 4 5 bop 0 407 a Fc(3.1)135 b(User)46 b(Guide)0 592 y Fn(Soft)m(w)m(are)e(using)g(C)g(m)m(ust)g Ff(#include)53 b("sockets.h")47 b Fn(and)d(m)m(ust)f(link)g(to)g(the)i Fl(SSL)p Fn(.)d(Directions)g(for)0 712 y(doing)35 b(so)h(will)e(v)-5 b(ary)36 b(from)f(system)i(to)e(system)i(and)f(also)f(dep)s(end)j(up)s (on)e(where)h(the)f(installer)e(placed)0 832 y(the)27 b(libraries.)40 b(Please)27 b(refer)g(to)g(y)m(our)g(compiler)e(do)s (cumen)m(tation)h(and)h(the)g Fl(SSL)f Fn(installer)f(to)h(kno)m(w)i (ho)m(w)0 953 y(to)k(set)i(up)e(library)f(link)-5 b(age)31 b(paths)i(and)g(for)f(the)h(include)f(path)h(to)f(the)h Fe(so)-5 b(ckets.h)32 b Fn(\014le.)146 1073 y(The)43 b(soft)m(w)m(are)g(b)s(elo)m(w)e(illustrates)f(some)i(t)m(ypical)e(So)s (c)m(k)m(et)j(co)s(de)f(fragmen)m(ts)g(to)f(get)h(a)f(connected)0 1193 y(so)s(c)m(k)m(et,)f(assuming)d(that)g(the)h Ff(sockets.h)i Fn(\014le)d(is)f(on)i(y)m(our)g(compiler's)e(include)h(searc)m(h)h (path.)58 b(If)38 b(the)0 1314 y Ff(sockets.h)j Fn(\014le)d(has)h(b)s (een)h(placed)e(in)g(a)h(standard)g(system)g(directory)g(\(not)g(wise)g (-)f(up)s(dates)h(to)g(the)0 1434 y(compiler)i(ma)m(y)j(wip)s(e)f(it)f (o\013)7 b(!\))76 b(then)44 b(y)m(ou)g(ma)m(y)f(ha)m(v)m(e)i(to)e (substitute)h Ff(#include)53 b()46 b Fn(for)0 1555 y Ff(#include)35 b Fn("so)s(c)m(k)m(ets.h"`)f(in)e(the)h(follo)m (wing)d(examples.)0 1783 y Fg(Example)37 b(3.1)83 b Fe(A)36 b(server)e(with)h(one)f(ac)-5 b(c)g(ept)205 2107 y Ff(#include)53 b("sockets.h")205 2227 y(Socket)g(*server;)205 2347 y(Socket)g(*skt;) 205 2468 y(server=)g(Sopen\("servername","s"\);)205 2588 y(skt)155 b(=)51 b(Saccept\(server\);)205 2709 y(...)205 2829 y(Sclose\(skt\);)205 2949 y(Sclose\(server\);)146 3298 y Fn(Note)33 b(in)f(Example)h(3.1)f(that)h(the)g(serv)m(ername)h (is)e(completely)g(up)h(to)g(the)g(programmer)e(to)h(select.)0 3418 y(Please)h(note)g(that)f(all)f(serv)m(ers)j(share)g(the)f(same)f (namespace)h(on)g(an)m(y)g(giv)m(en)g(mac)m(hine,)f(ho)m(w)m(ev)m(er.)0 3647 y Fg(Example)37 b(3.2)83 b Fe(A)36 b(server)e(with)h(multiple)f (ac)-5 b(c)g(epts)205 3971 y Ff(#include)53 b("sockets.h")205 4091 y(Socket)g(*server=NULL;)205 4211 y(Socket)g(*skt=NULL;)205 4332 y(server=)g(Sopen\("servername","s"\);)205 4452 y(do)f({)308 4572 y(skt=)g(Saccept\(server\);)308 4693 y(...)308 4813 y(Sclose\(skt\);)308 4934 y(})f(while\(whatever\);)205 5054 y(Sclose\(server\);)146 5403 y Fn(Again,)32 b(the)g(programmer)f (ma)m(y)h(select)h(an)m(y)g(serv)m(ername.)45 b(Note)32 b(that)g(the)h Fe(ac)-5 b(c)g(ept)32 b Fn(So)s(c)m(k)m(et)i(\(\\skt"\)) 0 5523 y(is)f(re-used)i(in)e(Example)g(3.2.)47 b(Actually)-8 b(,)33 b(co)s(ding)g(of)g(m)m(ultiple)e(accept)k(so)s(c)m(k)m(ets)h(is) d(usually)g(a)h(bit)f(more)1926 5707 y(4)p eop end %%Page: 5 7 TeXDict begin 5 6 bop 0 407 a Fn(in)m(v)m(olv)m(ed;)50 b(see)45 b Ff(multiskt.c)h Fn(in)e(the)g Fl(EXAMPLES)f Fn(directory)-8 b(.)77 b(I)44 b(usually)g(set)g(up)g(a)g(doubly-link)m (ed)0 527 y(list)d(con)m(taining)f(a)i(So)s(c)m(k)m(et)i(p)s(oin)m(ter) d(for)h(eac)m(h)h(suc)m(h)g(accepted)h(clien)m(t)d(and)h(put)h(them)e (on)h(the)h(mask)0 648 y(\(using)35 b Ff(Smaskset\(\))p Fn(\).)56 b(I)35 b(can)h(then)h(use)f Ff(Smaskwait\(\))j Fn(or)c Ff(Smasktimeoutwait\(\))41 b Fn(to)35 b(w)m(ait)g(for)g(an)m(y) 0 768 y(So)s(c)m(k)m(et,)i(including)c(the)i(serv)m(er)i(itself,)d (that)h(needs)h(atten)m(tion.)50 b(Up)s(on)35 b(closing)e(suc)m(h)j(a)f (So)s(c)m(k)m(et,)i(I)e(also)0 888 y(use)f Ff(Smaskunset\(\))h Fn(to)d(remo)m(v)m(e)i(it)d(from)h(the)h(mask)f(and)h(do)f(a)h (double-link)d(deletion.)0 1113 y Fg(Example)37 b(3.3)83 b Fe(A)36 b(client)205 1433 y Ff(#include)53 b("sockets.h")205 1554 y(Socket)g(*client;)205 1674 y(while\(1\))g({)308 1795 y(client=)g(Sopen\("serverName","c"\);)308 1915 y(if\(client\))h(break;)308 2035 y(sleep\(1\);)308 2156 y(})205 2276 y(...)205 2397 y(Sclose\(client\);)146 2741 y Fn(In)28 b(Example)e(3.3,)i(the)f Ff(serverName)i Fn(ma)m(y)e(b)s(e)g (in)f(the)i(optional)c(form)i Ff(serverName@machineName)p Fn(.)0 2862 y(Without)35 b(the)g(mac)m(hine)g(name)g(sp)s (eci\014cation,)g(the)h(P)m(ortMaster)g(on)g(the)f(mac)m(hine)g(that)g (the)h(clien)m(t)e(is)0 2982 y(running)24 b(on)g(will)e(b)s(e)i(searc)m (hed)i(for)e(the)h(serv)m(er.)42 b(The)26 b Ff(smsrvr.c)g Fn(and)e Ff(smclient.c)j Fn(example)d(programs)0 3102 y(pro)m(vided)33 b(in)f(the)h Fl(SSL)e Fn(distribution)g(giv)m(e)h (complete)g(illustrations)e(of)i(Examples)h(3.1)f(and)g(3.3.)146 3223 y(Note)k(that)f(the)h(Sop)s(en\(\))f(of)g(a)g(clien)m(t)g(will)e (fail)g(if)h(the)i(serv)m(er)h(is)d(not)i(already)e(up;)k(in)c(whic)m (h)i(case,)0 3343 y(a)i(n)m(ull)g(p)s(oin)m(ter)g(is)g(returned.)63 b(Example)38 b(3.3)g(illustrates)f(a)i(probing)f(metho)s(d)g(\(in)f (this)i(case,)i(once)e(a)0 3464 y(second\).)59 b(Example)37 b(3.4)g(sho)m(ws)i(an)f(option)e(to)h(ha)m(v)m(e)i(Sop)s(en\(\))e(blo)s (c)m(k)h(un)m(til)e(the)i(requested)h(serv)m(er)g(is)0 3584 y(a)m(v)-5 b(ailable.)0 3808 y Fg(Example)37 b(3.4)83 b Fe(A)36 b(blo)-5 b(cking)33 b(until)i(op)-5 b(en)35 b(client)205 4129 y Ff(#include)53 b("sockets.h")205 4249 y(Socket)g(*client;)205 4370 y(client=)g (Sopen\("serverName","b"\);)205 4490 y(...)205 4611 y (Sclose\(client\);)146 4955 y Fn(In)43 b(Example)f(3.4,)i(the)f (requested)i(serv)m(er)f(ma)m(y)e(or)g(ma)m(y)g(not)h(b)s(e)f(up)h (already)-8 b(.)72 b(If)42 b(the)h(serv)m(er)h(is)0 5076 y(a)m(v)-5 b(ailable,)29 b(a)h(normal)f(clien)m(t)h(connection)h(is)g (op)s(ened.)43 b(If)31 b(the)g(serv)m(er)i(is)d Fe(not)h Fn(a)m(v)-5 b(ailable,)29 b(then)i(the)h(clien)m(t)0 5196 y(will)27 b(blo)s(c)m(k)i(\(w)m(ait\))f(un)m(til)g(the)h(serv)m (er)i(is)e(brough)m(t)g(up.)42 b(In)m(ternally)-8 b(,)30 b(the)f(P)m(ortMaster)h(places)f(an)m(y)h(clien)m(ts)0 5316 y(that)40 b(op)s(en)h(using)f(this)h(option)e(on)i(a)f(w)m(aiting) f(list)g(when)j(the)f(serv)m(er)h(is)f(not)f(a)m(v)-5 b(ailable.)65 b(When)42 b(the)0 5437 y(serv)m(er)28 b(connects)g(to)e (the)h(P)m(ortMaster,)i(the)e(P)m(ortMaster)g(then)g(c)m(hec)m(ks)j (its)c(w)m(aiting)f(list)g(for)g(clien)m(ts)i(who)0 5557 y(wish)33 b(to)f(connect.)1926 5707 y(5)p eop end %%Page: 6 8 TeXDict begin 6 7 bop 0 407 a Fg(Example)37 b(3.5)48 b Fe(Using)35 b(Sop)-5 b(env)205 731 y Ff(#include)53 b("sockets.h")205 851 y(Socket)g(*client;)205 971 y(while\(1\))g({)308 1092 y(client=)g(Sopenv\("serverName","c","S)q(KTPA)q(TH")q(\);)308 1212 y(if\(client\))h(break;)308 1333 y(sleep\(1\);)308 1453 y(})205 1573 y(...)205 1694 y(Sclose\(client\);)146 2042 y Fn(The)42 b Fl(SSL)d Fn(allo)m(ws)g(the)h(programmer)f(to)h(set) h(up)f(a)g(group)g(of)g(mac)m(hines)g(for)g(making)f(clien)m(t)g(con-)0 2163 y(nections.)52 b(In)36 b(Example)f(3.5,)g(the)h Fl(SSL)e Fn(tries)h(to)h(op)s(en)f(a)g(clien)m(t)g(to)g(a)g(serv)m(er)i (named)e Ff(serverName)j Fn(on)0 2283 y(an)m(y)30 b(mac)m(hine)g(on)f (the)i Fl(SKTP)-8 b(A)g(TH)p Fn(.)29 b(The)i(\\)p Fl(SKTP)-8 b(A)g(TH)p Fn(")29 b(is)g(an)h(en)m(vironmen)m(t)g(v)-5 b(ariable)28 b(t)m(ypically)g(of)i(the)0 2403 y(form)i Ff(machine1:machine2:machi)q(ne3)p Fn(,)40 b(ie.)33 b(a)h(list)e(of)h (mac)m(hine)g(names)h(separated)h(b)m(y)f(colons.)47 b(This)0 2524 y(example)32 b(also)g(sho)m(ws)i(a)e(t)m(ypical)g(clien)m (t)g(connection)h(attempt)e(and)i(sleep)g(p)s(olling)d(lo)s(op.)146 2644 y(A)36 b(somewhat)f(larger)f(example)h(is)g(included)g(in)g(the)g (distribution:)48 b Ff(multiskt.c)p Fn(.)54 b(This)35 b(example)0 2765 y(program)k(concurren)m(tly)j(accepts)g(m)m(ultiple)c (clien)m(ts)j(on)f(a)g(single)g(serv)m(er,)45 b(reads)c(an)m(y)g (messages)h(sen)m(t)0 2885 y(its)36 b(w)m(a)m(y)h(from)f(an)m(y)h(of)e (its)h(clien)m(ts,)h(and)g(sends)h(a)e(mo)s(di\014ed)f(v)m(ersion)i (bac)m(k)g(to)f(the)h(sending)g(clien)m(t.)54 b(It)0 3005 y(uses)44 b(the)f Fe(Smaskwait)f Fn(functions)g(to)h(blo)s(c)m(k)f (the)h(m)m(ultiskt)f(pro)s(cess)i(for)e(friendly)g(m)m(ulti-tasking.)71 b(It)0 3126 y(is)32 b(a)g(useful)h(program)e(to)h(study)i(in)e (conjunction)g(with)h(the)g(Man)m(ual)f(b)s(elo)m(w.)146 3246 y(Connected)42 b(so)s(c)m(k)m(ets)g(are)f(a)e(pre-requisite)h(for) g(an)m(y)h(of)f(the)g Fl(I/O)g Fn(So)s(c)m(k)m(et)i(functions)e (describ)s(ed)h(in)0 3367 y(the)e(next)h(section.)63 b(Note)39 b(that)f(the)i(serv)m(er)g(should)f(ha)m(v)m(e)h(a)f(unique)g (name)g(on)g(an)m(y)g(giv)m(en)g(mac)m(hine.)0 3487 y(Serv)m(ers)c(ma)m (y)d(ha)m(v)m(e)i(the)g(same)e(name)h(on)f(di\013eren)m(t)h(mac)m (hines,)g(although)f(this)g(ma)m(y)h(b)s(e)g(confusing.)44 b(It)0 3607 y(is)26 b(suggested)h(that)g(one)f(use)h(the)g(name)f(of)f (the)i(pro)s(cess)h(\(at)d(least)h(as)h(a)f(pre\014x\))h(for)f(that)g (purp)s(ose.)42 b(Note)0 3728 y(that)31 b(the)g(only)g(things)f(that)h (one)g(can)h(do)f(with)f(a)h(serv)m(er)i(So)s(c)m(k)m(et)f(are:)43 b(op)s(en)31 b(one,)h(close)f(one,)g(generate)0 3848 y(an)37 b(accept)h(So)s(c)m(k)m(et)g(with)f(one,)h(and)f(test/blo)s(c)m (k)g(on)g(one)g(\(for)g(clien)m(ts)g(requesting)g(connection\).)57 b(The)0 3968 y Fl(SSL)28 b Fn(supp)s(orts)j(up)f(to)f(10)g(clien)m(ts)h (concurren)m(tly)g(a)m(w)m(aiting)f(acceptance)i(on)f(a)f(serv)m(er)i (So)s(c)m(k)m(et,)h(although)0 4089 y(man)m(y)h(mac)m(hines)f(will)e (limit)f(that)k(to)f(5)g(\(silen)m(tly\).)146 4209 y(The)c Fl(SSL)d Fn(supp)s(orts)i(t)m(w)m(o)h(w)m(a)m(y)f(comm)m(unication)d (of)i(data)h(b)s(et)m(w)m(een)h(a)e(clien)m(t)g(and)h(an)f(accept)i(So) s(c)m(k)m(et.)0 4330 y(Since)33 b(the)g(pro)s(cesses)h(are)f(not)f(lik) m(ely)f(to)i(b)s(e)f(sync)m(hronized,)j(often)d(one)h(pro)s(cess)h(m)m (ust)e(someho)m(w)h(w)m(ait)0 4450 y(un)m(til)e(the)h(other)g(pro)s (cess)h(has)g(sen)m(t)g(it)e(something.)42 b(There)33 b(are)f(t)m(w)m(o)h(metho)s(ds)f(to)f(supp)s(ort)i(this)e(under)0 4570 y(the)46 b Fl(SSL)p Fn(:)e(p)s(olling)e(and)j(in)m(terrupt-driv)m (en.)81 b(The)46 b(p)s(olling)c(metho)s(d)j(uses)h(a)f(lot)f(of)h Fl(CPU)g Fn(time,)i(but)0 4691 y(lets)33 b(the)h(program)e(do)h(other)h (tasks)g(in)f(the)h(mean)m(time.)44 b(The)34 b(in)m(terrupt-driv)m(en)g (approac)m(h)g(hangs)g(the)0 4811 y(pro)s(cess)d(\(ak)-5 b(a)29 b(blo)s(c)m(ks)h(and)g(susp)s(ends\))i(un)m(til)c(something)h (sho)m(ws)i(up)f(on)g(the)g(So)s(c)m(k)m(et.)44 b(The)30 b(Smask)p Fl(XXX)0 4932 y Fn(group)i(of)g(functions)g(allo)m(ws)g(one)g (to)g(hang)h(the)f(pro)s(cess)i(un)m(til)d(something)h(sho)m(ws)i(up)e (on)g(an)m(y)i(n)m(um)m(b)s(er)0 5052 y(of)e(So)s(c)m(k)m(ets)i({)f (sort)f(of)h(a)f(big)f Fl(OR)i Fn(gate!)146 5172 y(The)40 b(Smask)p Fl(XXX)f Fn(alternativ)m(e)e(to)i(p)s(olling)c(also)i(allo)m (ws)h(the)h(programmer)d(to)i(insert)h(non-so)s(c)m(k)m(et)0 5293 y(\014le)34 b(descriptors)h(in)m(to)f(the)h(mask)g(via)f (Smaskfdset)h(\(and)g(to)f(remo)m(v)m(e)h(them)g(via)f(Smaskunfdset\))h (suc)m(h)0 5413 y(as)e(serial)e(p)s(orts)i(\(ex.)44 b(op)s(en)33 b(with)f(DEVICE\),)h(graphics)g(queues)h(\(ex.)44 b Fl(SGI)p Fn(s)33 b(with)f(qgetfd\),)h(etc.)1926 5707 y(6)p eop end %%Page: 7 9 TeXDict begin 7 8 bop 0 407 a Fc(3.2)135 b(Reference)46 b(Man)l(ual)0 592 y Fn(This)d(section)f(con)m(tains)h(a)f(description)g (of)g(the)h(functions)f(a)m(v)-5 b(ailable)40 b(in)i(the)h(So)s(c)m(k)m (et)h(Library)-8 b(.)72 b(The)0 712 y Fl(SSL)35 b Fn(returns)j(three)f (t)m(yp)s(es)h(of)e(So)s(c)m(k)m(ets:)i(a)f(serv)m(er,)i(clien)m(t,)e (and)g(an)f(accept)i(So)s(c)m(k)m(et.)93 b(A)36 b(So)s(c)m(k)m(et)i (itself)0 832 y(is)29 b(a)g(data)g(structure)h Fe(typ)-5 b(e)30 b Fn(set)g(up)g(b)m(y)g(the)g Ff(sockets.h)h Fn(header)f (\014le.)42 b(The)30 b(So)s(c)m(k)m(et)h(is)e(delib)s(erately)f(used)0 953 y(in)36 b(a)h(fashion)f(reminiscen)m(t)h(of)f(the)h(use)h(of)f Fl(FILE)g Fn(p)s(oin)m(ters)f(so)i(that)e(the)i(C)f(user)h(who)f(kno)m (ws)i(ho)m(w)e(to)0 1073 y(read)c(and)f(write)h(a)f(\014le)g(will)e (immediately)g(feel)i(comfortable)f(with)h(reading)g(and)h(writing)e (So)s(c)m(k)m(ets.)p 255 1212 3391 4 v 255 1229 V 253 1349 4 121 v 270 1349 V 321 1313 a Fe(R)-5 b(eturn)p 1104 1349 V 543 w(F)e(unction)p 1790 1349 V 310 w(A)n(r)i(gument)p 3627 1349 V 3644 1349 V 253 1469 V 270 1469 V 321 1433 a(T)e(yp)i(e)p 1104 1469 V 634 w(Name)p 1790 1469 V 439 w(List)p 3627 1469 V 3644 1469 V 255 1473 3391 4 v 253 1593 4 121 v 270 1593 V 321 1557 a Fn(So)s(c)m(k)m(et)411 b(*)p 1104 1593 V 99 w(Saccept)p 1790 1593 V 362 w(\(So)s(c)m(k)m(et)34 b(*skt\))p 3627 1593 V 3644 1593 V 253 1713 V 270 1713 V 321 1677 a(v)m(oid)p 1104 1713 V 655 w(Sclose)p 1790 1713 V 431 w(\(So)s(c)m(k)m(et)g(*skt\))p 3627 1713 V 3644 1713 V 253 1834 V 270 1834 V 321 1798 a(c)m(har)505 b(*)p 1104 1834 V 99 w(Sgets)p 1790 1834 V 464 w(\(c)m(har)33 b(*buf,)g(in)m(t)f(maxbuf,)g(So)s(c)m(k)m(et)i(*skt\))p 3627 1834 V 3644 1834 V 253 1954 V 270 1954 V 321 1918 a(in)m(t)p 1104 1954 V 717 w(Smaskfdisset)p 1790 1954 V 143 w(\(in)m(t)e(fd\))p 3627 1954 V 3644 1954 V 253 2075 V 270 2075 V 321 2038 a(v)m(oid)p 1104 2075 V 655 w(Smaskfdset)p 1790 2075 V 209 w(\(in)m(t)g(fd\))p 3627 2075 V 3644 2075 V 253 2195 V 270 2195 V 321 2159 a(fd)p 411 2159 30 4 v 35 w(set)p 1104 2195 4 121 v 596 w(Smaskget)p 1790 2195 V 282 w(\(\))p 3627 2195 V 3644 2195 V 253 2315 V 270 2315 V 321 2279 a(in)m(t)p 1104 2315 V 717 w(Smaskisset)p 1790 2315 V 227 w(\(So)s(c)m(k)m(et)i(*skt\))p 3627 2315 V 3644 2315 V 253 2436 V 270 2436 V 321 2400 a(v)m(oid)p 1104 2436 V 655 w(Smaskp)s(op)p 1790 2436 V 252 w(\(\))p 3627 2436 V 3644 2436 V 253 2556 V 270 2556 V 321 2520 a(v)m(oid)p 1104 2556 V 655 w(Smaskpush)p 1790 2556 V 212 w(\(\))p 3627 2556 V 3644 2556 V 253 2676 V 270 2676 V 321 2640 a(v)m(oid)p 1104 2676 V 655 w(Smaskset)p 1790 2676 V 293 w(\(So)s(c)m(k)m(et)g(*skt\))p 3627 2676 V 3644 2676 V 253 2797 V 270 2797 V 321 2761 a(in)m(t)p 1104 2797 V 717 w(Smasktest)p 1790 2797 V 255 w(\(\))p 3627 2797 V 3644 2797 V 253 2917 V 270 2917 V 321 2881 a(v)m(oid)p 1104 2917 V 655 w(Smasktime)p 1790 2917 V 221 w(\(long)d(seconds,long)j(useconds\))p 3627 2917 V 3644 2917 V 253 3038 V 270 3038 V 321 3002 a(v)m(oid)p 1104 3038 V 655 w(Smaskunset)p 1790 3038 V 185 w(\(So)s(c)m(k)m(et)g(*skt\))p 3627 3038 V 3644 3038 V 253 3158 V 270 3158 V 321 3122 a(v)m(oid)p 1104 3158 V 655 w(Smaskunfdset)p 1790 3158 V 101 w(\(in)m(t)e(fd\))p 3627 3158 V 3644 3158 V 253 3278 V 270 3278 V 321 3242 a(v)m(oid)p 1104 3278 V 655 w(Smaskuse)p 1790 3278 V 277 w(\(fd)p 1969 3242 30 4 v 35 w(set)i(usermask\))p 3627 3278 4 121 v 3644 3278 V 253 3399 V 270 3399 V 321 3363 a(in)m(t)p 1104 3399 V 717 w(Smaskw)m(ait)p 1790 3399 V 230 w(\(\))p 3627 3399 V 3644 3399 V 253 3519 V 270 3519 V 321 3483 a(So)s(c)m(k)m(et)411 b(*)p 1104 3519 V 99 w(Sop)s(en)p 1790 3519 V 429 w(\(c)m(har)33 b(*skthost,)h(c)m(har)f(*mo)s(de\))p 3627 3519 V 3644 3519 V 253 3640 V 270 3640 V 321 3603 a(So)s(c)m(k)m(et)411 b(*)p 1104 3640 V 99 w(Sop)s(en)m(v)p 1790 3640 V 381 w(\(c)m(har)33 b(*srvrname,c)m(har)h(*ctrl,c)m(har)e(*en)m(vv)-5 b(ar\))p 3627 3640 V 3644 3640 V 253 3760 V 270 3760 V 321 3724 a(in)m(t)p 1104 3760 V 717 w(Sp)s(eek)p 1790 3760 V 438 w(\(So)s(c)m(k)m(et)34 b(*skt,)f(c)m(har)g(*buf,)g(in)m(t)f (bu\015en\))p 3627 3760 V 3644 3760 V 253 3880 V 270 3880 V 321 3844 a(unsigned)h(long)p 1104 3880 V 247 w(Sp)s(eeraddr)p 1790 3880 V 256 w(\(So)s(c)m(k)m(et)h(*skt\))p 3627 3880 V 3644 3880 V 253 4001 V 270 4001 V 321 3965 a(c)m(har)505 b(*)p 1104 4001 V 99 w(Sp)s(eername)p 1790 4001 V 223 w(\(So)s(c)m(k)m(et)34 b(*skt\))p 3627 4001 V 3644 4001 V 253 4121 V 270 4121 V 321 4085 a(v)m(oid)p 1104 4121 V 655 w(Sprin)m(tf)p 1790 4121 V 393 w(\(So)s(c)m(k)m(et)g(*skt,)f(c)m (har)g(*fm)m(t,...\))p 3627 4121 V 3644 4121 V 253 4241 V 270 4241 V 321 4205 a(c)m(har)505 b(*)p 1104 4241 V 99 w(Sprtskt)p 1790 4241 V 375 w(\(So)s(c)m(k)m(et)34 b(*skt\))p 3627 4241 V 3644 4241 V 253 4362 V 270 4362 V 321 4326 a(v)m(oid)p 1104 4362 V 655 w(Sputs)p 1790 4362 V 448 w(\(c)m(har)f(*buf,)g(So)s(c)m(k)m(et)h(*skt\))p 3627 4362 V 3644 4362 V 253 4482 V 270 4482 V 321 4446 a(in)m(t)p 1104 4482 V 717 w(Sread)p 1790 4482 V 448 w(\(So)s(c)m(k)m(et)g(*skt,)f(c)m(har)g(*buf,)g(in)m(t)f(bu\015en\))p 3627 4482 V 3644 4482 V 253 4603 V 270 4603 V 321 4566 a(in)m(t)p 1104 4603 V 717 w(Sreadb)m(ytes)p 1790 4603 V 227 w(\(So)s(c)m(k)m(et)i(*skt,)f(c)m(har)g(*buf,)g(in)m(t)f (bu\015en\))p 3627 4603 V 3644 4603 V 253 4723 V 270 4723 V 321 4687 a(in)m(t)p 1104 4723 V 717 w(Srmsrvr)p 1790 4723 V 347 w(\(c)m(har)h(*skthost\))p 3627 4723 V 3644 4723 V 253 4843 V 270 4843 V 321 4807 a(in)m(t)p 1104 4843 V 717 w(Sscanf)p 1790 4843 V 418 w(\(So)s(c)m(k)m(et)h(*skt,) f(c)m(har)g(*fm)m(t,)f(...\))p 3627 4843 V 3644 4843 V 253 4964 V 270 4964 V 321 4928 a(in)m(t)p 1104 4964 V 717 w(Stest)p 1790 4964 V 475 w(\(So)s(c)m(k)m(et)i(*skt\))p 3627 4964 V 3644 4964 V 253 5084 V 270 5084 V 321 5048 a(in)m(t)p 1104 5084 V 717 w(Stimeout)m(w)m(ait)p 1790 5084 V 121 w(\(So)s(c)m(k)m(et)g(*skt,long)e(seconds,long)h(useconds\)) p 3627 5084 V 3644 5084 V 253 5205 V 270 5205 V 321 5168 a(in)m(t)p 1104 5205 V 717 w(Svprin)m(tf)p 1790 5205 V 342 w(\(So)s(c)m(k)m(et)h(*skt,)f(c)m(har)g(*fm)m(t,)f(v)m(oid)g (*args\))p 3627 5205 V 3644 5205 V 253 5325 V 270 5325 V 321 5289 a(in)m(t)p 1104 5325 V 717 w(Sw)m(ait)p 1790 5325 V 450 w(\(So)s(c)m(k)m(et)i(*skt\))p 3627 5325 V 3644 5325 V 253 5445 V 270 5445 V 321 5409 a(in)m(t)p 1104 5445 V 717 w(Swrite)p 1790 5445 V 415 w(\(So)s(c)m(k)m(et)g(*skt,) f(c)m(har)g(*buf,)g(in)m(t)f(bu\015en\))p 3627 5445 V 3644 5445 V 255 5449 3391 4 v 255 5465 V 1926 5707 a(7)p eop end %%Page: 8 10 TeXDict begin 8 9 bop 0 407 a Fg(So)s(c)m(k)m(et)37 b(*Saccept\(So)s(c) m(k)m(et)g(*skt\))72 b Fn(This)23 b(function)f(tak)m(es)i(a)e(serv)m (er)j(So)s(c)m(k)m(et)f(and)f(pro)s(duces)h(a)f(So)s(c)m(k)m(et)244 527 y(whic)m(h)39 b(has)g(accepted)h(a)f(connection.)62 b(This)39 b(function)f(ma)m(y)h(b)s(e)f(used)i(as)f(often)g(as)g(w)m (an)m(ted)h(on)244 648 y(the)31 b(same)g(serv)m(er)i(So)s(c)m(k)m(et!) 44 b(Note)31 b(that)g(one)g(m)m(ust)g(ha)m(v)m(e)h(successfully)g(op)s (ened)g(a)f(serv)m(er)h(prior)e(to)244 768 y(using)i(Saccept)i(to)e (accept)i(connections)f(\(see)g(Examples)g(3.1)f(and)h(3.2\).)244 930 y(If)f(this)h(op)s(eration)e(is)h(unsuccessful,)j(then)e(Saccept)h (will)c(return)j(a)f(n)m(ull)g(So)s(c)m(k)m(et)i(p)s(oin)m(ter.)0 1133 y Fg(v)m(oid)j(Sclose\(So)s(c)m(k)m(et)f(*skt\))89 b Fn(This)41 b(function)f(closes)h(a)f(So)s(c)m(k)m(et)i(of)e(an)m(y)h (t)m(yp)s(e)g(\(serv)m(er,)k(clien)m(t,)c(ac-)244 1254 y(cept\).)i(The)31 b(Sclose)f(function)f(comm)m(unicates)g(with)g(the)h (lo)s(cal)e(P)m(ortMaster)j(whenev)m(er)h(a)d(serv)m(er)244 1374 y(is)j(closed.)0 1577 y Fg(c)m(har)38 b(*Sgets\(c)m(har)f(*buf,)h (in)m(t)f(maxbuf,)h(So)s(c)m(k)m(et)f(*skt\))88 b Fn(This)39 b(is)g(an)g(I/O)h(function)e(whic)m(h)i(as-)244 1698 y(sumes)51 b(that)f(one)h(has)g(already)e(op)s(ened)j(a)e(connected)i (So)s(c)m(k)m(et)f(\()p Fe(skt)p Fn(\).)97 b(It)51 b(will)d(attempt)h (to)244 1818 y(get)c(a)g(n)m(ull-terminated)e(string)h(from)h(the)g(So) s(c)m(k)m(et)i(\(up)e(to)g(maxbuf)g(c)m(haracters\).)83 b(This)46 b(call)244 1939 y(will)c(blo)s(c)m(k)i(\(ak)-5 b(a)43 b(hang,)k(sleep\))e(un)m(til)d(a)i(string)g(sho)m(ws)h(up,)j (but)c(otherwise)h(acts)f(m)m(uc)m(h)h(as)f(a)244 2059 y(fgets\(\))33 b(function)f(do)s(es.)244 2221 y(If)k(Sgets)h(has)g(a)f (so)s(c)m(k)m(et)j(error,)e(then)g(a)f(n)m(ull)f(p)s(oin)m(ter)h(is)g (returned.)57 b(Otherwise,)38 b(it)d(returns)j(the)244 2341 y(\\)p Fe(buf)p Fn(")32 b(p)s(oin)m(ter.)0 2545 y Fg(in)m(t)k(Smaskfdisset\(in)m(t)g(fd\))101 b Fn(The)53 b(Smaskfdisset\(\))g(function)f(w)m(orks)h(in)f(conjunction)g(with)g (the)244 2665 y(Smaskw)m(ait\(\))27 b(function.)42 b(After)28 b(the)g(Smaskw)m(ait\(\))f(function)h(returns,)i(one)e(can)g(use)h (Smaskfdis-)244 2785 y(set\(skt\))34 b(to)e(test)h(if)f(a)g(particular) f(\014le)h(descriptor)h(is)f(read-ready)-8 b(.)0 2989 y Fg(v)m(oid)37 b(Smaskfdset\(in)m(t)g(fd\))83 b Fn(The)36 b(Smask)p Fl(XXX)f Fn(functions)g(use)h(a)e Fe(mask)g Fn(of)h(t)m(yp)s(e)g Fe(fd)p 3293 2989 30 4 v 36 w(set)g Fn(in)m(ternally)-8 b(.)244 3109 y(Other)38 b(op)s(erations,)h(suc)m(h) h(as)e(use)i(of)d(a)h(serial)f(p)s(ort)h(under)h(Unix)f(or)g(the)h Fk(GL)f Fn(queue)i(for)e Fl(SGI)p Fn('s)244 3230 y(Irises)c(\(see)g (their)e(qgetfd\(\))i(function\))f(use)h(\014le)f(descriptors.)46 b(This)33 b(function)g(allo)m(ws)f(one)h(to)g(set)244 3350 y(up)g(the)g(Smask)p Fl(XXX)g Fn(mask)g(with)f(one)h(or)f(more)g (of)g(those)h(\014le)f(descriptors.)0 3553 y Fg(Smask)38 b(Smaskget\(\))78 b Fn(The)31 b(Smask)p Fl(XXX)g Fn(functions)f(use)h (a)f Fe(mask)f Fn(of)g(t)m(yp)s(e)i Fe(fd)p 3006 3553 V 36 w(set)f Fn(in)m(ternally)-8 b(.)41 b(Other)244 3674 y(op)s(erations,)28 b(suc)m(h)h(as)f(use)g(of)g(a)f(serial)f(p)s(ort)h (under)i(Unix,)f(can)g(also)f(b)s(e)h(used)h(to)e(set)h(masks.)43 b(This)244 3794 y(function)30 b(pro)m(vides)h(access)g(to)f(the)h(mask) f(set)h(up)g(b)m(y)g(Smaskset.)43 b(The)32 b(mate)d(to)h(this)g (function)f(is)244 3914 y(Smaskuse\(\).)0 4118 y Fg(in)m(t)36 b(Smaskisset\(So)s(c)m(k)m(et)h(*skt\))86 b Fn(The)40 b(Smaskisset\(\))e(function)g(w)m(orks)i(in)d(conjunction)i(with)f(the) 244 4238 y(Smaskw)m(ait\(\))d(function.)53 b(After)36 b(the)h(Smaskw)m(ait\(\))e(function)h(returns,)h(one)g(can)f(use)h (Smaskis-)244 4359 y(set\(skt\))27 b(to)f(test)g(if)e(a)i(particular)e (So)s(c)m(k)m(et)j(is)e(read-ready)-8 b(.)42 b(It)26 b(is)f(simpler)f(then)i(and)g(thereb)m(y)i(faster)244 4479 y(than)k(Smasktest\(\).)0 4682 y Fg(v)m(oid)37 b(Smaskp)s(op\(\)) 74 b Fn(The)27 b(Smaskp)s(op\(\))e(function,)h(along)e(with)h(the)h (Smaskpush\(\))h(function,)f(allo)m(ws)244 4803 y(the)44 b(programmer)d(to)j(manipulate)d(an)i(in)m(ternal)g(stac)m(k)h(of)f (masks.)77 b(The)44 b(\\top")f(mask)h(is)f(the)244 4923 y(curren)m(t)34 b(mask.)0 5127 y Fg(v)m(oid)j(Smaskpush\(\))86 b Fn(The)38 b(Smaskpush\(\))g(function,)f(along)f(with)g(the)h(Smaskp)s (op\(\))g(function,)h(al-)244 5247 y(lo)m(ws)29 b(the)g(programmer)e (to)h(manipulate)f(an)h(in)m(ternal)g(stac)m(k)i(of)e(masks.)43 b(The)29 b(\\top")g(mask)f(is)h(the)244 5367 y(curren)m(t)34 b(mask.)1926 5707 y(8)p eop end %%Page: 9 11 TeXDict begin 9 10 bop 0 407 a Fg(v)m(oid)37 b(Smaskset\(So)s(c)m(k)m (et)g(*skt\))74 b Fn(This)27 b(function)e(is)h(part)f(of)h(the)g Fe(Smask)p Fk(XXX)e Fn(group.)41 b(So)s(c)m(k)m(ets)28 b(ma)m(y)244 527 y(b)s(e)k(set)g(up)g(for)f(Smaskw)m(ait'ing)f(one)i (at)g(a)f(time.)42 b(Note)32 b(that)f(all)e(So)s(c)m(k)m(ets)34 b(are)d(e\013ectiv)m(ely)i Fl(OR)p Fn('ed)244 648 y(together)43 b(for)g(blo)s(c)m(king;)48 b(to)42 b(clear)h(the)h(mask,)i(pass)e(a)f Fl(NULL)g Fn(So)s(c)m(k)m(et)h(p)s(oin)m(ter)f(to)g(Smaskset:)244 768 y(Smaskset\(\(So)s(c)m(k)m(et)35 b(*\))d Fl(NULL)p Fn(\);.)0 971 y Fg(in)m(t)k(Smasktest\(\))84 b Fn(This)35 b(function)g(is)g(part)h(of)f(the)g Fe(Smask)p Fk(XXX)f Fn(group.)52 b(The)36 b(Smasktest)g(function)244 1092 y(supp)s(orts)j(p)s(olling)34 b({)k(one)g(ma)m(y)f(determine)h(if)f(an) m(ything)g(is)h(on)f(an)m(y)i(of)e(the)h(Smaskset)h(So)s(c)m(k)m(ets) 244 1212 y(and)30 b(immediately)d(receiv)m(e)32 b(a)e(p)s(ositiv)m(e)f (in)m(teger)h(if)g(there)g(is,)61 b(a)30 b(0)g(if)f(there)i(isn't,)f (and)h(a)f(negativ)m(e)244 1333 y(n)m(um)m(b)s(er)j(if)e(there's)j(an)f (error.)0 1536 y Fg(v)m(oid)k(Smasktime\(long)e(seconds,long)j (useconds\))78 b Fn(This)29 b(function)f(is)g(part)g(of)g(the)h Fe(Smask)p Fk(XXX)244 1656 y Fn(group.)77 b(Normally)41 b(Smaskw)m(ait)j(will)e(blo)s(c)m(k)h(\\forev)m(er")i(\(w)m(ell,)g(at)f (least)f(as)h(long)f(as)h(the)g(ma-)244 1777 y(c)m(hine)35 b(sta)m(ys)h(up!\).)51 b(Ho)m(w)m(ev)m(er,)38 b(one)d(can)g(sp)s(ecify) g(a)g(time)e(limit)e({)k(then)g(Smaskw)m(ait)g(will)d(return)244 1897 y(with)43 b(a)g(v)-5 b(alue)43 b(of)g(0)g(if)f(the)i(time)e(limit) e(is)j(exceeded.)78 b(One)44 b(ma)m(y)f(sp)s(ecify)h(the)g(time)e (limit)e(in)244 2017 y(seconds)d(and)f(micro-seconds.)53 b(T)-8 b(o)35 b(clear)h(the)g(time)e(limit)e(\(ie.)j(restore)i(Smaskw)m (ait)e(to)g(w)m(aiting)244 2138 y(forev)m(er\),)48 b(pass)d(a)e (negativ)m(e)i(time)d(in)i(either)g(or)f(b)s(oth)h(argumen)m(ts)g(to)g (Smasktime.)77 b(W)-8 b(aiting)244 2258 y(forev)m(er)33 b(is)f(also)g(set)h(up)g(when)h(b)s(oth)e(argumen)m(ts)h(to)f (Smasktime)g(are)g(zero.)0 2462 y Fg(v)m(oid)37 b(Smaskunfdset\(in)m(t) g(fd\))82 b Fn(This)34 b(function)f(is)g(part)g(of)g(the)h Fe(Smask)p Fk(XXX)d Fn(group.)46 b(File)32 b(descrip-)244 2582 y(tors)40 b(ma)m(y)g(b)s(e)h(en)m(tered)g(in)m(to)f(the)g(mask)g (via)g(the)h(Smaskfdset\(\))g(function,)g(and)g(this)e(function)244 2702 y(can)33 b(remo)m(v)m(e)g(it)f(from)f(the)i(mask.)43 b(This)33 b(function)f(is)g(similar)e(to)i(the)h(Smaskunset\(\))h (function.)0 2906 y Fg(v)m(oid)j(Smaskunset\(So)s(c)m(k)m(et)h(*skt\)) 83 b Fn(This)35 b(function)f(is)h(part)f(of)h(the)g Fe(Smask)p Fk(XXX)e Fn(group.)50 b(So)s(c)m(k)m(ets)244 3026 y(ma)m(y)43 b(b)s(e)g(remo)m(v)m(ed)h(from)e(the)h(Smaskw)m(ait's)h(mask)f(one)g (at)g(a)g(time)e(via)i(this)f(function.)75 b(Lik)m(e)244 3147 y Fe(Smaskset)p Fn(,)32 b(a)g Fe(Smaskunset\(\(So)-5 b(cket)33 b(*\))i Fk(NULL)p Fe(\);)c Fn(will)f(clear)i(the)h(en)m(tire) g(mask.)0 3350 y Fg(v)m(oid)k(Smaskuse\(Smask)h(usermask\))85 b Fn(This)36 b(function)f(is)g(part)g(of)g(the)h Fe(Smask)p Fk(XXX)d Fn(group.)52 b(The)244 3470 y(in)m(ternal)c Fe(mask)h Fn(in)g(Smask)p Fl(XXX)h Fn(can)g(b)s(e)f(set)h(up)g(b)m(y)h (the)f(user)g(via)f(this)g(function.)94 b(Often,)244 3591 y(Smaskset)42 b(will)d(b)s(e)j(used)h(to)e(set)h(up)g(an)f(in)m (ternal)f(mask,)k(Smaskget)e(will)d(b)s(e)i(used)i(to)e(obtain)244 3711 y(the)33 b(resulting)e(mask,)i(and)g(Smaskuse)h(will)c(b)s(e)j (used)g(to)g(apply)f(that)g(mask.)0 3914 y Fg(in)m(t)k(Smaskw)m (ait\(\))80 b Fn(This)33 b(function)f(is)g(part)g(of)g(the)h Fe(Smask)p Fk(XXX)d Fn(group.)44 b(The)33 b Fe(Smaskwait)e Fn(function)244 4035 y(will)41 b(blo)s(c)m(k)j(\(ak)-5 b(a)43 b(hang\))h(the)g(pro)s(cess)h(un)m(til)e(an)m(y)h(So)s(c)m(k)m (et)h(set)g(via)e(Smaskset)i(has)f(something)244 4155 y(w)m(aiting)27 b(on)h(it)f(to)h(b)s(e)h(read.)42 b(Note)28 b(that)g(So)s(c)m(k)m(ets)j(set)e(b)m(y)g(Smaskset)g(are)f(retained;)i (ie.)e(they)h(m)m(ust)244 4276 y(b)s(e)k(explicitly)d(cleared)j(b)m(y)g (passing)g(a)f Fl(NULL)h Fn(So)s(c)m(k)m(et)h(p)s(oin)m(ter)e(to)g (Smaskset.)244 4438 y(Smaskw)m(ait)24 b(returns)i(a)f(p)s(ositiv)m(e)f (n)m(um)m(b)s(er)h(if)e(something)h(is)g(w)m(aiting)g(on)g(a)h(So)s(c)m (k)m(et,)j(zero)d(if)e(a)i(time-)244 4558 y(out)32 b(o)s(ccurs,)i(and)e (a)h(negativ)m(e)f(n)m(um)m(b)s(er)h(on)g(an)f(error.)0 4761 y Fg(So)s(c)m(k)m(et)37 b(*Sop)s(en\(c)m(har)i(*skthost,)e(c)m (har)h(*mo)s(de\))82 b Fn(This)35 b(function)f(is)g(the)g(w)m(orkhorse) i(for)e(op)s(en-)244 4882 y(ing)d(So)s(c)m(k)m(ets.)46 b(Basically)-8 b(,)31 b(it)g(can)i(mak)m(e)g(either)f(a)g(serv)m(er)j (or)d(a)g(clien)m(t)g(dep)s(ending)h(on)f(the)h(mo)s(de.)1926 5707 y(9)p eop end %%Page: 10 12 TeXDict begin 10 11 bop 692 311 2761 4 v 690 431 4 121 v 741 395 a Fe(Mo)-5 b(de)1146 b(E\013e)-5 b(ct)p 3451 431 V 692 434 2761 4 v 690 555 4 121 v 835 518 a(s)193 b Fn(op)s(en)33 b(a)f(serv)m(er)p 3451 555 V 690 675 V 827 639 a Fe(S)186 b Fn(op)s(en)33 b(a)f(serv)m(er)i(but,)f(on)g (failure,)e(retry)i(after)f(using)g(Srmsrvr)p 3451 675 V 690 795 V 832 759 a Fe(c)191 b Fn(op)s(en)33 b(a)f(clien)m(t)p 3451 795 V 690 916 V 832 880 a Fe(b)191 b Fn(op)s(en)33 b(a)f(blo)s(c)m(king)f(clien)m(t)p 3451 916 V 690 1036 V 758 1000 a Fe(s)p Ff(###)117 b Fn(op)s(en)33 b(a)f(serv)m(er)i(with)e (the)h(sp)s(eci\014ed)h(p)s(ort)e(n)m(um)m(b)s(er)p 3451 1036 V 690 1156 V 750 1120 a Fe(S)p Ff(###)110 b Fn(lik)m(e)32 b Fe(S)g Fn(ab)s(o)m(v)m(e,)h(but)g(with)g(the)g(sp)s(eci\014ed)g(p)s (ort)p 3451 1156 V 690 1277 V 755 1241 a Fe(c)p Ff(###)115 b Fn(op)s(en)33 b(a)f(clien)m(t)g(to)g(a)g(serv)m(er)j(with)d(the)h(sp) s(eci\014ed)g(p)s(ort)p 3451 1277 V 692 1280 2761 4 v 244 1507 a(The)i Fe(skthost)f Fn(is)f(the)i(name)e(of)h(the)h(serv)m (er.)49 b(If)34 b(one)h(is)e(making)g(a)h Fe(client)f Fn(So)s(c)m(k)m(et,)j(then)f(one)f(ma)m(y)244 1628 y(optionally)i(use)j (the)g(form)e(\\serv)m(ername@hostname")j(for)e(the)h(skthost.)62 b(The)40 b(\\@hostname")244 1748 y(form)33 b(is)h(not)g(necessary)j (for)d(clien)m(ts)h(to)f(serv)m(ers)i(that)f(are)f(on)h(the)g(same)f (host)h(as)f(the)h(clien)m(t,)g(as)244 1868 y(the)g(default)g(host)g (is)g(the)g(lo)s(cal)e(host.)51 b(The)36 b(\\serv)m(ername@hostname")g (form)e(mak)m(es)h(no)g(sense)244 1989 y(for)30 b(serv)m(ers,)j(and)d (so,)i(for)d(op)s(ening)h(serv)m(ers,)j(Sop)s(en)e(will)d(ignore)i(an)m (y)h(\\@hostname")e(p)s(ortion)g(of)244 2109 y(skthost.)244 2271 y(The)43 b Fe(\\S")e Fn(mo)s(de)h(for)f(op)s(ening)h(serv)m(ers,) 47 b(lik)m(e)41 b(the)i Fe(\\s")e Fn(mo)s(de,)j(will)c(cause)j(Sop)s (en)g(to)f(attempt)244 2391 y(to)35 b(op)s(en)g(a)f(serv)m(er,)k(but)d (if)f(unsuccessful,)k(Sop)s(en)d(will)e(then)i(use)h(Srmsrvr)f(using)g (the)g(pro)m(vided)244 2512 y(skthost)d(and)e(then)h(retry)h(op)s (ening)d(the)i(serv)m(er.)45 b(In)31 b(the)g(case)g(of)f Fe(s)p Ff(###)h Fn(or)g Fe(S)p Ff(###)p Fn(,)g(the)g(serv)m(ers)i(are) 244 2632 y(set)j(up)f(with)g(the)g Fl(TCP/IP)68 b Fn(option)34 b Fl(SO)p 1772 2632 28 4 v 32 w(REUSEADDR)p Fn(.)h(This)g(option)f (alleviates)g(some)h(of)g(the)244 2752 y(di\016culties)c(asso)s(ciated) i(with)f(re-starting)g(serv)m(ers)i(with)f(\014xed)g(p)s(orts.)244 2914 y(If)i(the)h(skthost)h(is)e(n)m(ull)f(or)h(an)g(empt)m(y)h(string) f(\(""\),)g(the)h(P)m(ortMaster)h(is)e(b)m(ypassed.)54 b(One)36 b(m)m(ust)244 3035 y(sp)s(ecify)46 b(a)f(p)s(ort)g(n)m(um)m(b) s(er)h(to)f(use)i(in)d(that)i(case.)83 b(A)45 b(w)m(arning)h(is)f (issued)h(\(as)f(w)m(ell)g(as)h(a)f(n)m(ull)244 3155 y Ff(Socket*)p Fn(\))34 b(b)s(ecause)g(that)e(is)h(t)m(ypically)e(a)h (programming)e(error,)i(not)h(a)f(user)h(error.)244 3317 y(The)g(P)m(ortMaster)h(is)d(also)h(alw)m(a)m(ys)h(b)m(ypassed)h(for)e (clien)m(ts)g(whic)m(h)h(sp)s(ecify)g(p)s(ort)f(n)m(um)m(b)s(er)g(\()p Fe(c)p Ff(###)p Fn(\).)244 3437 y(In)37 b(the)h(latter)e(case,)i(a)f (clien)m(t)g(connection)g(is)g(immediately)d(attempted)j(to)g(the)h (user-sp)s(eci\014ed)244 3558 y(p)s(ort)32 b(n)m(um)m(b)s(er.)44 b(If)32 b(the)h(function)f(is)h(not)f(successful,)i(a)f(n)m(ull)e(So)s (c)m(k)m(et)j(p)s(oin)m(ter)e(is)g(returned.)244 3720 y(If)23 b(the)h(user-sp)s(eci\014ed)g(serv)m(er)h(p)s(ort)e(mo)s(de)f (is)h(used)h(with)f(a)g(skthost,)j(the)d(serv)m(er)i(will)c(b)s(e)j (registered)244 3840 y(with)30 b(its)g(P)m(ortMaster;)i(clien)m(ts)f (need)g Fe(not)f Fn(use)i(sp)s(eci\014ed-p)s(ort)e(mo)s(de)g(to)g (connect)i(\(ie.)e(they)h(ma)m(y)244 3960 y(set)i Ff(mode)h Fn(to)e Ff("c")p Fn(\))h(so)g(long)e(as)i(they)h(sp)s(ecify)f(the)g (correct)g(name)f(of)g(the)h(serv)m(er.)244 4122 y(P)m(ortMaster)41 b(sharing)e(\(b)m(y)i(setting)e(the)i(en)m(vironmen)m(t)f(v)-5 b(ariable)38 b Ff(PMSHARE)p Fn(\))k(causes)f(serv)m(ers)h(to)244 4243 y(w)m(ork)26 b(with)e(the)i Fk(PMSHARE)11 b Fn(-sp)s(eci\014ed)23 b(mac)m(hine's)i(P)m(ortMaster.)42 b(Clien)m(ts)25 b(should)g(use)h (the)f(name)244 4363 y(of)34 b(the)h(mac)m(hine)f(that)g(the)h Fe(PortMaster)g Fn(is)f(on;)h(the)g(ev)m(en)m(tual)h(connection)e(will) f(b)s(e)h(made)g(with)244 4483 y(the)d(appropriate)e(serv)m(er)j (program,)e(ev)m(en)i(though)f(it)e(is)h(running)g(on)g(a)g(di\013eren) m(t)h(mac)m(hine)f(than)244 4604 y(the)g(P)m(ortMaster)i(it)d(uses.)44 b(See)31 b(Example)e(4.1)h(for)f(an)h(illustration)d(of)j(ho)m(w)g(P)m (ortMaster)i(sharing)244 4724 y(w)m(orks.)0 4928 y Fg(So)s(c)m(k)m(et) 37 b(*Sop)s(en)m(v\(c)m(har)i(*srvrname,c)m(har)f(*ctrl,c)m(har)e(*en)m (vv)-6 b(ar\))99 b Fn(The)52 b Fe(Sop)-5 b(env)49 b Fn(function)h(is) 244 5048 y(used)44 b(to)e(op)s(en)g(clien)m(t)g(So)s(c)m(k)m(ets,)47 b(but)c(is)f(form)m(ulated)f(to)h(resem)m(ble)h(the)g Fe(Sop)-5 b(en)41 b Fn(function)h(with)244 5168 y(one)g(additional)d (argumen)m(t.)71 b(Assuming)41 b(y)m(our)i(computer)f(system)g(supp)s (orts)h(the)f(concept)h(of)244 5289 y(en)m(vironmen)m(t)c(v)-5 b(ariables,)38 b(the)h(Sop)s(en)m(v)g(function)f(can)h(use)g(an)f(en)m (vironmen)m(t)h(v)-5 b(ariable)36 b(of)i(y)m(our)244 5409 y(c)m(hoice)g(to)f(help)g(it)g(op)s(en)g(a)g(clien)m(t.)58 b(T)m(ypically)-8 b(,)37 b(a)g Fl(SKTP)-8 b(A)g(TH)37 b Fn(en)m(vironmen)m(t)h(v)-5 b(ariable)35 b(gets)j(set)244 5530 y(up)i(b)m(y)i(the)e(user)h(with)f(a)g(colon-separated)g(list)f (of)h(mac)m(hine)g(names)g(\(ex.)67 b(seten)m(v)42 b Fl(SKTP)-8 b(A)g(TH)1901 5707 y Fn(10)p eop end %%Page: 11 13 TeXDict begin 11 12 bop 244 407 a Fn(\\gryphon:dragon:xorn"\).)62 b(The)39 b(Sop)s(en)m(v)h(function)e(attempts)g(to)h(op)s(en)f(a)h (clien)m(t)f(to)g(a)g(serv)m(er)244 527 y(of)f(the)i(giv)m(en)f(name)g (on)g(the)g(curren)m(t)h(mac)m(hine)f(\014rst,)i(and)e(then)g(attempts) g(to)g(do)g(so)g(on)g(eac)m(h)244 648 y(mac)m(hine)28 b(in)g(the)h(giv)m(en)g(sequence.)45 b(If)29 b Ff(env_var)h Fn(is)e(NULL)h(or)g(a)f(n)m(ull)f(string,)i(then)h Ff(SKTPATH)g Fn(will)244 768 y(b)s(e)j(used)g(instead.)244 929 y(If)25 b(successful,)j(a)d(So)s(c)m(k)m(et)i(p)s(oin)m(ter)e(is)g(returned,)j (otherwise)e(a)f Fl(NULL)h Fn(So)s(c)m(k)m(et)h(p)s(oin)m(ter)e(is)g (returned.)244 1050 y(Please)33 b(see)h(Saccept)f(on)g(ho)m(w)g(to)f (use)i(serv)m(ers.)0 1252 y Fg(in)m(t)i(Sp)s(eek\(So)s(c)m(k)m(et)i (*skt,)g(c)m(har)f(*buf,)i(in)m(t)d(bu\015en\))85 b Fn(The)36 b Fe(Sp)-5 b(e)g(ek)35 b Fn(function)f(b)s(eha)m(v)m(es)k(lik)m(e)d (Sread)244 1372 y(|)e(up)h(to)g Fe(bu\015en)f Fn(b)m(ytes,)j(the)e (bu\013er)h(will)c(b)s(e)j(\014lled)f(b)m(y)h(whatev)m(er)i(is)d (curren)m(tly)i(on)e(the)i(So)s(c)m(k)m(et.)244 1492 y(This)e(function)g(do)s(es)h(not)f(remo)m(v)m(e)i(those)f(b)m(ytes)h (from)d(the)i(So)s(c)m(k)m(et,)h(ho)m(w)m(ev)m(er,)h(and)d(those)h(b)m (ytes)244 1613 y(will)e(b)s(e)k(returned)f(again)f(on)h(subsequen)m(t)j (Sp)s(eek,)f(Sread,)f(etc.)f(calls.)49 b(This)35 b(function)g(do)s(es)g (not)p 3759 1626 141 4 v 244 1733 a(blo)s(c)m(k)d(\(ak)-5 b(a)32 b(hang,)h(sleep\).)244 1894 y(It)c(will)e(return)j(EOF)f(on)g (select)h(error,)g(some)f(negativ)m(e)g(n)m(um)m(b)s(er)h(on)f(recv)i (error,)e(zero)h(if)e(no)h(data)244 2015 y(is)k(presen)m(t)i(on)e(the)h (So)s(c)m(k)m(et,)h(and)f(a)f(p)s(ositiv)m(e)f(coun)m(t)j(of)d(the)i(a) m(v)-5 b(ailable)31 b(b)m(ytes)k(otherwise.)47 b(In)34 b(the)244 2135 y(latter)d(case,)j Fe(buf)f Fn(will)d(ha)m(v)m(e)k(a)e (cop)m(y)i(of)e(the)h(b)m(ytes)h(a)m(v)-5 b(ailable.)244 2296 y Fl(MS-DOS)p Fn(:)44 b(Sp)s(eek)h(will)d(only)i(return)g(a)g(1)g (when)h(data)f(is)g(a)m(v)-5 b(ailable)41 b(on)j(the)h(So)s(c)m(k)m (et,)k(not)44 b(the)244 2417 y(n)m(um)m(b)s(er)f(of)g(b)m(ytes)i(a)m(v) -5 b(ailable.)72 b(F)-8 b(urthermore,)46 b(the)d(bu\013er)h Fe(buf)f Fn(will)e(b)s(e)i(a)g(zero-length)g(string)244 2537 y(with)32 b(just)h(a)f(n)m(ull)g(b)m(yte.)0 2739 y Fg(unsigned)38 b(long)f(Sp)s(eeraddr\(So)s(c)m(k)m(et)h(*skt\))97 b Fn(The)50 b Fe(Sp)-5 b(e)g(er)g(addr)47 b Fn(function)h(returns)i (the)f(in)m(ternet)244 2860 y(address)34 b(of)e(the)h(p)s(eer)g(So)s(c) m(k)m(et.)0 3062 y Fg(c)m(har)38 b(*Sp)s(eername\(So)s(c)m(k)m(et)f (*skt\))86 b Fn(The)37 b Fe(Sp)-5 b(e)g(ername)35 b Fn(function)i (returns)g(the)h(name)e(of)g(the)h(p)s(eer)244 3182 y(So)s(c)m(k)m(et.) 63 b(In)m(ternally)-8 b(,)39 b(it)f(has)h(three)g(bu\013ers;)j(th)m(us) e(it)e(can)g(b)s(e)h(used)h(up)f(to)f(three)h(times)f(in)g(the)244 3302 y(same)32 b(prin)m(tf)g(statemen)m(t.)0 3504 y Fg(v)m(oid)37 b(Sprin)m(tf\(So)s(c)m(k)m(et)f(*skt,)i(c)m(har)f(*fm)m(t,...\))70 b Fn(The)23 b Fe(Sprintf)f Fn(function)f(acts)h(in)g(an)f(analogous)g (fash-)244 3625 y(ion)29 b(to)h(fprin)m(tf,)g(sprin)m(tf,)h(etc,)g(b)m (y)h(putting)d(formatted)h(strings,)g(appropriately)f(n)m(ull)g(b)m (yte)j(termi-)244 3745 y(nated,)38 b(through)f(the)g(So)s(c)m(k)m(et.) 58 b(Th)m(us,)40 b(one)d(ma)m(y)g(use)g(either)g Fe(Sgets)g Fn(or)f(an)h(appropriate)f Fe(Ssc)-5 b(anf)244 3865 y Fn(to)32 b(receiv)m(e)i(the)f(information.)0 4068 y Fg(c)m(har)38 b(*Sprtskt\(So)s(c)m(k)m(et)e(*skt\))78 b Fn(The)30 b Fe(Sprtskt)g Fn(function)f(returns)h(a)f(string)g(describing)g(the)h (So)s(c)m(k)m(et.)0 4270 y Fg(v)m(oid)37 b(Sputs\(c)m(har)h(*buf,)g(So) s(c)m(k)m(et)f(*skt\))94 b Fn(The)47 b Fe(Sputs)f Fn(function)g(puts)g (a)g(n)m(ull)f(b)m(yte)i(terminated)244 4390 y(string)32 b(on)g(the)h(So)s(c)m(k)m(et)h(in)e(a)g(fashion)g(analogous)f(to)i (fputs.)0 4592 y Fg(in)m(t)j(Sread\(So)s(c)m(k)m(et)i(*skt,)f(c)m(har)h (*buf,)g(in)m(t)f(bu\015en\))73 b Fn(The)24 b Fe(Sr)-5 b(e)g(ad)23 b Fn(function)g(is)h(similar)c(to)j(the)h Fe(r)-5 b(e)g(ad)244 4712 y Fn(function)27 b(in)g(Unix.)42 b(This)28 b(function)g(can)g(blo)s(c)m(k)g(\(ak)-5 b(a)27 b(hang,)i(sleep\))f(if)f(nothing)g(is)g(on)h(the)h(So)s(c)m(k)m(et.)244 4833 y(Otherwise,)47 b(it)42 b(will)f(return)i(up)h(to)f Fe(bu\015en)g Fn(b)m(ytes)i(in)e(the)g(bu\013er)h(\\)p Fe(buf)p Fn(".)75 b(This)44 b(function)e(will)244 4953 y(return)31 b(whatev)m(er)i(is)d(on)h(the)g(So)s(c)m(k)m(et,)i(and)e (do)s(esn't)g(try)g(to)g(insure)g(that)f(bu\015en)i(b)m(ytes)h(are)e (read.)244 5074 y(It)i(returns)g(the)g(n)m(um)m(b)s(er)g(of)f(b)m(ytes) i(read)f(from)e(the)j(So)s(c)m(k)m(et.)244 5235 y(On)e(error,)h(an)f (EOF)h(is)f(returned.)0 5437 y Fg(in)m(t)k(Sreadb)m(ytes\(So)s(c)m(k)m (et)i(*skt,)g(c)m(har)f(*buf,)i(in)m(t)d(bu\015en\))85 b Fn(The)37 b Fe(Sr)-5 b(e)g(adbytes)35 b Fn(function)g(b)s(eha)m(v)m (es)244 5557 y(m)m(uc)m(h)40 b(lik)m(e)f(Sread,)j(and)e(it)e(to)s(o)h (can)h(blo)s(c)m(k)f(\(ak)-5 b(a)39 b(hang,)j(sleep\))e(if)e(nothing)h (is)g(on)g(the)i(So)s(c)m(k)m(et.)1901 5707 y(11)p eop end %%Page: 12 14 TeXDict begin 12 13 bop 244 407 a Fn(Ho)m(w)m(ev)m(er,)38 b(it)d(will)e(not)i(return)h(un)m(til)e(bu\015en)j(b)m(ytes)g(are)e (read)h(from)e(the)i(So)s(c)m(k)m(et)h(and)e(placed)h(in)244 527 y(\\buf)7 b(".)244 689 y(On)32 b(error,)h(an)f(EOF)h(is)f (returned.)0 892 y Fg(in)m(t)k(Srmsrvr\(c)m(har)h(*skthost\))74 b Fn(The)26 b Fe(Srmsrvr)f Fn(function)g(is)g(made)f(a)m(v)-5 b(ailable)23 b(to)i(tak)m(e)i(care)e(of)g(those)244 1013 y(situations)37 b(when)j Fl(skt)c(=)g(Sop)s(en\(\\serv)m (ername",\\s"\))k Fn(fails)d(b)s(ecause)j(the)f(serv)m(ername)h(has)f (b)s(een)244 1133 y(inadv)m(erten)m(tly)j(left)e(in)g(the)i(P)m (ortMaster's)g(P)m(ortT)-8 b(able.)69 b(This)42 b(un)m(to)m(w)m(ard)g (ev)m(en)m(t)h(can)e(happ)s(en,)244 1254 y(for)35 b(example,)g(when)i (a)e(pro)s(cess)i(is)e(ab)s(orted/exited)g(without)g(calling)e(Sclose)j (on)f(its)g(serv)m(er\(s\).)244 1374 y(The)46 b(Srmsrvr)g(function)e (will)f(remo)m(v)m(e)j(a)f(serv)m(er)i(\(or)e(serv)m(er@host\))j(from)c (the)h(P)m(ortMaster's)244 1494 y(P)m(ortT)-8 b(able.)40 b(Note:)f(it)21 b(will)f(not)p 1265 1507 141 4 v 23 w(close)i(the)h (asso)s(ciated)g(So)s(c)m(k)m(et,)j(nor)c(free)h(up)g(an)m(y)g(So)s(c)m (k)m(et)h(memory)-8 b(,)244 1615 y(and)33 b(is)f(not)p 532 1628 V 32 w(a)g(substitute)i(for)e(Sclose.)244 1777 y(The)37 b Fe(Srmsrvr)f Fn(function)g(will)e(return)j(either)f Fl(PM)p 2133 1777 28 4 v 33 w(OK)f Fn(\(if)g(successful\))j(or)e Fl(PM)p 3227 1777 V 33 w(SORR)-8 b(Y)36 b Fn(\(other-)244 1897 y(wise\).)0 2100 y Fg(in)m(t)g(Sscanf\(So)s(c)m(k)m(et)i(*skt,)g (c)m(har)f(*fm)m(t,)g(...\))82 b Fn(The)34 b Fe(Ssc)-5 b(anf)32 b Fn(function)h(acts)h(m)m(uc)m(h)f(the)h(same)f(as)h(ss-)244 2221 y(canf)29 b(and)h(fscanf,)h(taking)e(format)f(strings)h(and)h (additional)c(argumen)m(ts)k(in)f(a)g(lik)m(e)g(manner.)42 b(The)244 2341 y(argumen)m(ts)29 b(Sscanf)h(tak)m(es,)h(of)e(course,)i (m)m(ust)e(all)e(b)s(e)i(appropriate)f(p)s(oin)m(ters.)42 b(This)30 b(function)e(will)244 2462 y(blo)s(c)m(k)k(if)g(insu\016cien) m(t)h(data)f(is)g(a)m(v)-5 b(ailable)30 b(on)j(the)g(so)s(c)m(k)m(et)h (according)e(to)g(the)h Fe(fmt)p Fn(.)244 2623 y(The)40 b Fe(Ssc)-5 b(anf)38 b Fn(function)h(returns)h(the)g(n)m(um)m(b)s(er)f (of)g(argumen)m(ts)h(for)e(whic)m(h)i(it)e(read)i(data,)g(whic)m(h)244 2744 y(ma)m(y)f(b)s(e)h(zero)g(or)g(incomplete)e(if)g(a)i(so)s(c)m(k)m (et)h(error)f(o)s(ccurred.)65 b(Normally)-8 b(,)39 b(the)i(returned)f (coun)m(t)244 2864 y(should)32 b(equal)h(the)g(n)m(um)m(b)s(er)g(of)f (argumen)m(ts)h(with)f(whic)m(h)h(Sscanf)g(w)m(as)h(pro)m(vided.)0 3068 y Fg(in)m(t)i(Stest\(So)s(c)m(k)m(et)h(*skt\))74 b Fn(The)28 b Fe(Stest)e Fn(function)g(allo)m(ws)f(one)i(to)e (determine)h(if)g(an)m(ything)g(is)f(a)m(v)-5 b(ailable)244 3188 y(on)32 b(the)h(sp)s(eci\014ed)h(So)s(c)m(k)m(et,)g Fe(without)h(blo)-5 b(cking)p Fn(.)244 3350 y(It)29 b(will)e(return)j (EOF)f(on)g(select)h(error,)g(some)f(negativ)m(e)g(n)m(um)m(b)s(er)h (on)f(recv)i(error,)e(zero)h(if)e(no)h(data)244 3470 y(is)j(presen)m(t)i(on)f(the)g(So)s(c)m(k)m(et,)h(and)e(a)h(p)s(ositiv) m(e)f(coun)m(t)h(of)f(the)h(a)m(v)-5 b(ailable)30 b(b)m(ytes)k (otherwise.)244 3632 y Fl(MS-DOS)p Fn(:)23 b(Stest)i(will)c(only)i (return)h(a)g(1)f(when)i(data)e(is)g(a)m(v)-5 b(ailable)21 b(on)j(the)g(So)s(c)m(k)m(et,)j(not)c(the)i(n)m(um)m(b)s(er)244 3753 y(of)32 b(b)m(ytes)i(a)m(v)-5 b(ailable.)0 3956 y Fg(in)m(t)36 b(Stimeout)m(w)m(ait\(So)s(c)m(k)m(et)e(*skt,long)j (seconds,long)h(useconds\))85 b Fn(The)37 b Fe(Stime)-5 b(outwait)35 b Fn(func-)244 4076 y(tion)28 b(blo)s(c)m(ks)i(on)g(the)g (giv)m(en)f(So)s(c)m(k)m(et,)j(but)e(for)f(no)g(longer)g(than)h(the)g (n)m(um)m(b)s(er)g(of)f(seconds)i(plus)f(the)244 4197 y(n)m(um)m(b)s(er)i(of)f(microseconds)h(sp)s(eci\014ed.)44 b(The)32 b(function)g(returns)g(the)g(n)m(um)m(b)s(er)g(of)f(b)m(ytes)i (a)m(v)-5 b(ailable)244 4317 y(on)32 b(the)h(So)s(c)m(k)m(et)h(\(whic)m (h)f(ma)m(y)g(b)s(e)f(zero\),)h(-1)f(if)g(there)h(w)m(as)g(an)g(error,) f(and)h(-2)f(on)g(timeout.)0 4521 y Fg(in)m(t)k(Svprin)m(tf\(So)s(c)m (k)m(et)h(*skt,)g(c)m(har)h(*fm)m(t,)e(v)m(oid)h(*args\))95 b Fn(The)46 b Fe(Svprintf)g Fn(function)f(reads)h(b)m(ytes)244 4641 y(using)30 b(a)h(prin)m(tf)f(family)e(format)h(string)i(from)e (the)i(So)s(c)m(k)m(et.)44 b(As)32 b(eac)m(h)f(format)f(co)s(de)h(is)f (pro)s(cessed,)244 4761 y(the)e(asso)s(ciated)g(argumen)m(t)f(is)h(c)m (hanged)g(in)f(the)i Fe(ar)-5 b(gs)27 b Fn(v)m(ector.)43 b(It)28 b(returns)h(the)f(n)m(um)m(b)s(er)g(of)f(format)244 4882 y(items)32 b(pro)s(cessed.)0 5085 y Fg(in)m(t)k(Sw)m(ait\(So)s(c)m (k)m(et)g(*skt\))75 b Fn(The)26 b Fe(Swait)g Fn(function)f(will)f(blo)s (c)m(k)h(\(ak)-5 b(a)26 b(hang,)h(sleep\))f(un)m(til)f(the)h(sp)s (eci\014ed)244 5205 y(So)s(c)m(k)m(et)34 b(has)f(data)f(a)m(v)-5 b(ailable.)244 5367 y(It)29 b(will)e(return)j(EOF)f(on)g(select)h (error,)g(some)f(negativ)m(e)g(n)m(um)m(b)s(er)h(on)f(recv)i(error,)e (zero)h(if)e(no)h(data)244 5488 y(is)j(presen)m(t)i(on)f(the)g(So)s(c)m (k)m(et,)h(and)e(a)h(p)s(ositiv)m(e)f(coun)m(t)h(of)f(the)h(a)m(v)-5 b(ailable)30 b(b)m(ytes)k(otherwise.)1901 5707 y(12)p eop end %%Page: 13 15 TeXDict begin 13 14 bop 0 407 a Fg(in)m(t)36 b(Swrite\(So)s(c)m(k)m(et) g(*skt,)h(c)m(har)h(*buf,)g(in)m(t)f(bu\015en\))89 b Fn(The)41 b Fe(Swrite)f Fn(function)g(will)e(write)i Fe(bu\015en)244 527 y Fn(b)m(ytes)34 b(from)d(the)i Fe(buf)g Fn(bu\013er)g(on)m(to)g(the)g(sp)s(eci\014ed)g(So)s(c)m(k)m(et.)244 689 y(The)24 b(function)f(will)e(return)j(a)f(coun)m(t)g(of)g(the)h(n)m (um)m(b)s(er)g(of)e(b)m(ytes)j(transmitted)e(through)g(the)h(So)s(c)m (k)m(et,)244 809 y(whic)m(h)g(should)g(b)s(e)g(equal)g(to)f Fe(bu\015en)p Fn(.)41 b(If)23 b(the)h(output)g(is)g(less)g(than)g Fe(bu\015en)p Fn(,)h(then)g(an)f(error)f(o)s(ccurred)244 930 y(while)32 b(writing)f(to)h(the)h(So)s(c)m(k)m(et.)0 1219 y Fc(3.3)135 b(Hin)l(ts)0 1403 y Fn(The)38 b Fe(Hints)g Fn(b)s(elo)m(w)g(ha)m(v)m(e)g(b)s(een)h(found)e(useful)h(at)f(the)h(In) m(telligen)m(t)e(Rob)s(otics)h(Lab)s(oratory)-8 b(.)57 b(They)39 b(are)0 1524 y(based)34 b(on)e(almost)f(a)h(y)m(ear's)i(exp)s (erience)g(with)e(the)h Fl(SSL)p Fn(.)119 1752 y(1.)49 b(The)27 b(\\Sscanf)7 b(")27 b(function)f(is)g(dangerous.)42 b(It)26 b(will)f(blo)s(c)m(k)h(un)m(til)f(all)f(of)i(the)h(format)e(co) s(des)i(in)f(its)g Fe(fmt)244 1872 y Fn(string)h(ha)m(v)m(e)i(b)s(een)f (used.)43 b(If)27 b(someho)m(w)56 b(a)27 b(programmer)e(sends)30 b(an)d(improp)s(er)f(string)h(and)g(Sscanf)244 1993 y(is)34 b(used)h(to)f(receiv)m(e)h(it,)f(then)g(the)h(receiving)f(program)e (will)g(probably)i(hang)g(for)g(quite)g(a)g(while.)244 2113 y(Dr.)g(Campb)s(ell)e(has)j(found)f(that)h(it)e(is)h(somewhat)g (safer)h(to)f(use)h Fe(Sgets)f Fn(to)g(get)h(an)f(en)m(tire)h(string) 244 2234 y(from)c(the)i(So)s(c)m(k)m(et)h(and)f(then)g(use)h Fe(ssc)-5 b(anf)31 b Fn(and)i Fe(stpnxt)f Fn(to)h(parse)g(it.)119 2437 y(2.)49 b(P)m(olling)d(is)j(unfriendly)f(to)h(other)g(pro)s (cesses)i({)d(it)g(w)m(astes)j(a)d(tremendous)i(amoun)m(t)e(of)g Fl(CPU)244 2557 y Fn(time)33 b(merely)h(querying)h(the)g(So)s(c)m(k)m (et\(s\))i(to)d(see)i(if)d(an)m(ything)i(is)f(a)m(w)m(aiting)f(action.) 49 b(The)36 b(v)-5 b(arious)244 2678 y(blo)s(c)m(king)31 b(functions)i(are)f(m)m(uc)m(h)i(b)s(etter:)44 b(Sw)m(ait,)32 b(Stimeout)m(w)m(ait,)f(Smask)p Fl(XXX)p Fn(,)i(etc.)119 2881 y(3.)49 b(Unless)39 b(y)m(our)g(pro)s(cesses)i(will)36 b(alw)m(a)m(ys)j(run)g(on)f(the)h(same)f(kind)h(of)f(mac)m(hine,)h(p)s (ortabilit)m(y)d(con-)244 3002 y(siderations)k(argue)h(against)f(using) h(Sread)g(and)g(Swrite)g(to)g(mo)m(v)m(e)g(non-c)m(haracter)h(string)e (data)244 3122 y(around)33 b({)g(ie.)44 b(\015oats,)34 b(doubles,)f(and)g(ev)m(en)i(in)m(ts.)45 b(Ev)m(en)35 b(if)d(the)h(programmer)f(tests)i(out)f(the)g(ma-)244 3242 y(c)m(hines)j(and)f(v)m(eri\014es)i(that)e(\(s\)he)h(can)f(safely) h(mo)m(v)m(e,)g(sa)m(y)-8 b(,)36 b(a)f(double)g(around,)h(or)f(ev)m(en) i(a)e(v)m(ector)244 3363 y(of)h(doubles,)i(data)f(structures)h(\()p Ff(struct)53 b(XXX)f({)g(...)g(})p Fn(\))37 b(ma)m(y)f(ha)m(v)m(e)i (\\holes")f(in)f(them)g(placed)244 3483 y(there)c(for)f(w)m(ord)i(or)e (b)m(yte)i(alignmen)m(t)d(reasons.)44 b(These)33 b(\\holes")f(ma)m(y)f (not)h(b)s(e)f(there)i(\(or)e(ma)m(y)h(b)s(e)244 3604 y(placed)g(di\013eren)m(tly\))h(b)m(y)g(other)g(mac)m(hines)f(and)h (compilers.)119 3807 y(4.)49 b(The)25 b(Srmsrvr)g(function)f(is)g(a)g (rather)h(rude)g(function)f({)g(there)h(is)f(no)h(o)m(wnership)g(c)m (hec)m(k)i(of)d(a)g(serv)m(er.)244 3927 y(Please)33 b(use)h(y)m(our)g (pro)s(cess)g(name)f(\(or)g(y)m(our)g(id\))g(as)g(part)g(of)f(y)m(our)i (serv)m(er)h(name)e(so)g(that)g(serv)m(ers)244 4048 y(do)k(not)f (clash.)56 b(Remem)m(b)s(er:)c(y)m(our)37 b(serv)m(er's)i(name)e(is)f (in)g(only)g(one)i(\\name)e(space")h(shared)h(b)m(y)244 4168 y(all)30 b(users)k(on)f(y)m(our)g(mac)m(hine.)119 4371 y(5.)49 b(F)-8 b(or)38 b(those)i(of)e(y)m(ou)i(who)g(wish)f(to)f (use)i(other)g(services)g(\(ex.)g(serial)e(p)s(orts\))h(whic)m(h)g(can) h(use)g(the)244 4492 y Fe(sele)-5 b(ct)23 b Fn(function)h(pro)m(vided)g (b)m(y)h Fl(TCP/IP)c Fn(,)j(c)m(hec)m(k)j(out)c(Smaskfdset)i(and)f(its) f(mate,)j(Smaskunfdset.)119 4695 y(6.)49 b(The)23 b Fl(IRL)e Fn(has)h(b)s(een)g(using)g(a)f(leading)f(t)m(w)m(o)j(c)m(haracter)f (command)f(con)m(v)m(en)m(tion:)39 b Ff(tp~L~x~y~z)54 b(rx)e(ry)g(rz)244 4816 y Fn(will)34 b(tell)g(the)j(\\left")d(T3)j(rob) s(ot)e(to)h(mo)m(v)m(e)g(to)g(\\x)g(y)h(z")f(\(inc)m(hes\))h(in)e (space)i(with)f(an)g(orien)m(tation)244 4936 y(of)k(\\rx)i(ry)f(rz")g (degrees)h(\(roll,)f(pitc)m(h,)j(y)m(a)m(w\).)70 b(Longer)41 b(w)m(ords)h(pro)m(vide)f(more)f(readabilit)m(y)g(but)244 5056 y(tak)m(e)d(up)f(more)g(bandwidth.)55 b(Exp)s(erimen)m(tally)-8 b(,)36 b(Dr.)f(Campb)s(ell)g(has)h(found)h(that)f Fl(TCP/IP)d Fn(can)244 5177 y(transfer)40 b(ab)s(out)f(10,000)g(pac)m(k)m(ets)j(p)s (er)e(second)h(with)f(up)g(to)f(128)h(b)m(ytes)h(in)e(a)h(pac)m(k)m (et.)67 b(Loaded)244 5297 y(systems)34 b(will,)c(of)i(course,)i(ac)m (hiev)m(e)g(less)f(throughput.)1901 5707 y(13)p eop end %%Page: 14 16 TeXDict begin 14 15 bop 119 407 a Fn(7.)49 b(It)43 b(is)g(a)g(go)s(o)s (d)f(idea)g(for)h(clien)m(ts)g(to)g(inform)e(serv)m(ers)k(that)e(they)i (are)e(quitting.)74 b(The)44 b Fl(IRL)f Fn(has)244 527 y(used)31 b(the)f(follo)m(wing)c(con)m(v)m(en)m(tion:)44 b Ff(tq)30 b Fe(t)9 b Fn(ells)29 b(the)h(serv)m(er)h(that)f(the)g (messaging)e(clien)m(t)h(is)g Fe(q)9 b Fn(uitting.)244 648 y(Also,)33 b(a)g Ff(tQ)h Fn(tells)e(the)i(serv)m(er)i(to)d(sh)m(ut) h(itself)e(do)m(wn.)47 b(The)35 b(serv)m(er)g(then)f(emits)f(a)g Ff(tq)h Fn(to)f(all)e(of)i(its)244 768 y(clien)m(ts)f(to)g(inform)f (them)h(that)g(the)h(serv)m(er)h(is)e(sh)m(utting)h(do)m(wn)g(\(except) h(for)e(the)h(one)g(clien)m(t)f(who)244 888 y(issued)h(the)g(sh)m(utdo) m(wn)i(command\),)c(and)i(then)g(closes)g(itself)e(do)m(wn)j(with)e (Sclose.)119 1092 y(8.)49 b(The)36 b(serv)m(er-clien)m(t)h (relationship)d(is)h(in)m(timately)e(in)m(v)m(olv)m(ed)j(with)f(ob)5 b(ject-orien)m(ted)36 b(messaging)f({)244 1212 y(refer)e(to)f(the)h (literature)e(on)i(ob)5 b(ject-orien)m(ted)33 b(concepts.)119 1416 y(9.)49 b(The)35 b Fl(SSL)e Fn(can)h(b)s(e)h(used)g(to)f(supp)s (ort)g(a)g Fe(no)i(startup)h(se)-5 b(quencing)33 b Fn(paradigm.)46 b(T)m(ypically)-8 b(,)34 b(clien)m(ts)244 1536 y(who)f(attempt)f(to)g (Sop)s(en)h(and)g(fail)d(should)i(go)g(in)m(to)g(a)h(p)s(oll)d(-)i (sleep)h(lo)s(op:)244 1806 y Fg(Example)j(3.6)49 b Fe(Client)35 b(So)-5 b(cket)34 b(Pol)5 b(ling)705 2171 y Ff(skt=)53 b(Sopen\("servername","c"\);)705 2291 y(while\(!skt\))h({)808 2412 y(sleep\(1\);)808 2532 y(skt=)e(Sopen\("servername","c"\);)808 2653 y(})244 3043 y Fn(The)27 b Fe(multiskt.c)f Fn(program)f (illustrates)g(ho)m(w)i(serv)m(ers)i(should)d(b)s(e)g(able)g(to)g (accept)h(m)m(ultiple)d(clien)m(ts)244 3163 y(using)32 b(blo)s(c)m(king)g(judiciously)-8 b(.)244 3325 y(This)44 b(non-sequencing)h(approac)m(h)g(allo)m(ws)e(one)i(to)e(bring)h(up)g (programs)f(whic)m(h)i(ha)m(v)m(e)h(serv)m(ers)244 3445 y(and/or)33 b(clien)m(ts)h(without)g(w)m(orrying)g(ab)s(out)f(what)i (comes)f(\014rst.)48 b(F)-8 b(or)33 b(t)m(w)m(o)i(programs,)f(this)f (isn't)244 3566 y(terribly)38 b(serious,)i(but)g(at)e(the)h Fl(IRL)g Fn(n)m(umerous)g(programs)f(pro)m(viding)g(n)m(umerous)i (services)g(are)244 3686 y(a)m(v)-5 b(ailable)30 b(and)j(sequencing)h (w)m(ould)e(b)s(e)h(a)f(nigh)m(tmare.)70 3890 y(10.)49 b(As)25 b(alluded)f(to)h(earlier,)g(clien)m(ts)g(should)g(tell)e(serv)m (ers)k(and)f(serv)m(ers)h(should)e(tell)e(clien)m(ts)i(when)h(they)244 4010 y(are)d(going)e(do)m(wn.)41 b(The)24 b(program)e(that)g(is)h Fe(not)g Fn(quitting)e(should)i(return)g(to)g(an)g(\\a)m(w)m(aiting)e (another)244 4130 y(clien)m(t)26 b(\(or)h(serv)m(er\)")i(mo)s(de)d (\(ie.)h(see)h(the)g(preceding)f(item\).)41 b(Th)m(us,)28 b(a)f(troublesome)g(program)f(can)244 4251 y(b)s(e)j(brough)m(t)h(do)m (wn,)h(the)f(programs)e(to)h(whic)m(h)h(it)e(is)h(comm)m(unicating)e (will)g(gracefully)h(terminate)244 4371 y(their)c(connections,)j(and)e (the)g(programmer)e(can)i(then)h(\(hop)s(efully\))d(\014x)j(the)f (problem.)40 b(When)26 b(the)244 4491 y(program)d(is)g(restarted,)k (the)d(non-sequencing)h(approac)m(h)g(will)d(allo)m(w)g(the)j(program)d (to)i(seamlessly)244 4612 y(re-en)m(ter)33 b(in)m(to)f(comm)m (unications)f(with)h(the)h(other)g(soft)m(w)m(are.)70 4815 y(11.)49 b(When)28 b(a)e(mac)m(hine)h(is)f(do)m(wn,)j(and)e(an)g (attempt)f(to)h(connect)h(a)e(clien)m(t)g(So)s(c)m(k)m(et)j(using)d (either)h Fe(Sop)-5 b(en)244 4936 y Fn(directly)32 b(or)g Fe(Sop)-5 b(env)42 b Fn(to)33 b(a)f(serv)m(er)i(either)f(normally)d(or) i(p)s(ossibly)g(on)h(that)f(mac)m(hine,)h(the)g(Sop)s(en)244 5056 y(will)d(fail)g(but)j(will)e(tak)m(e)i(an)f(inordinately)f(long)g (time)h(doing)f(so)i(\(connection)g(timeout\).)70 5259 y(12.)49 b(When)27 b(a)g(program)e(dies)i(abruptly)-8 b(,)27 b(connected)h(So)s(c)m(k)m(ets)h(app)s(ear)d(to)h Fe(sele)-5 b(ct)p Fn(\(\))26 b(to)g(ha)m(v)m(e)i(something)244 5380 y(on)k(them)h(\(select)g(is)f(used)h(b)m(y)h(Stest,)f(Smasktest,)h (Sw)m(ait,)e(Smaskw)m(ait,)g(Sp)s(eek,)i(Stimeout)m(w)m(ait\).)1901 5707 y(14)p eop end %%Page: 15 17 TeXDict begin 15 16 bop 244 407 a Fn(Hence,)36 b(functions)e(whic)m(h)h (normally)c(blo)s(c)m(k)j(\(Smaskw)m(ait,)h(Sw)m(ait\))e(no)i(longer)e (blo)s(c)m(k.)48 b(On)34 b(com-)244 527 y(puters)j(whic)m(h)f(can)g Fl(MSG)p 1220 527 28 4 v 33 w(PEEK)f Fn(\(Unix,)i(Vms\),)f(the)g (Stest,)i(Sp)s(eek,)g(Sgets,)f(and)f(Sscanf)h(func-)244 648 y(tions)27 b(will)f(detect)j(this)e(situation)g(and)h(will)d (return)k(an)e(error)h(indication)e(\()p Fl(EOF)p Fn(,)i Fl(NULL)f Fn(p)s(oin)m(ter,)244 768 y(incomplete)j(argumen)m(t)h(pro)s (cessed)j(coun)m(t\))e(to)f(indicate)g(that)g(the)h(So)s(c)m(k)m(et)h (has)f(a)f(problem)g(\(one)244 888 y(should)h(then)i(Sclose)e(the)h (a\013ected)h(So)s(c)m(k)m(et\).)244 1050 y(F)-8 b(urthermore,)30 b(attempts)h(to)f(write)g(to)g(suc)m(h)j(dead)e(So)s(c)m(k)m(ets)h(ma)m (y)e(generate)i Fl(SIGPIPE)p Fn(s)e(on)g(Unix)244 1171 y(b)s(o)m(xes.)45 b(Unix)32 b(programmers)f(should)i(write)f(and)h (install)d(signal)h(handlers)i(for)f Fl(SIGPIPE)p Fn(s.)70 1374 y(13.)49 b(F)-8 b(or)43 b(m)m(ultiple)f(concurren)m(t)j(So)s(c)m (k)m(ets,)k(one)c(should)f(generate)g(routines)h(for)e(b)s(oth)h (closing)f(and)244 1494 y(op)s(ening)32 b(them.)244 1764 y Fg(Example)k(3.7)49 b Fe(Client)35 b(Op)-5 b(ening)33 b(F)-7 b(unction)705 2130 y Ff(#include)54 b("sockets.h")705 2250 y(typedef)f(struct)g(clientlist_str)i(ClientList;)705 2370 y(struct)e(clientlist_str)i({)910 2491 y(Socket)e(*skt;)910 2611 y(ClientList)h(*nxt,*prv;)910 2731 y(})705 2852 y(ClientList)g(*clhd=NULL;)705 2972 y(ClientList)g(*cltl=NULL;)757 3093 y(...)705 3213 y(ClientList)g(*openClient\(char)i(*srvrname\))705 3333 y({)705 3454 y(Socket)d(*skt;)705 3574 y(ClientList)h(*clist;)705 3694 y(while\(1\))g({)910 3815 y(skt=)f(Sopen\(srvrname,"c"\);)910 3935 y(if\(!skt\))h(sleep\(1\);)910 4056 y(})705 4176 y(clist=)f(\(ClientList)h(*\))e(malloc\(sizeof\(ClientList)q(\)\);)705 4296 y(if\(cltl\))i(cltl->nxt=)g(clist;)705 4417 y(else)258 b(clhd)f(=)52 b(clist;)705 4537 y(clist->prv=)i(cltl;)705 4658 y(clist->nxt=)g(NULL;)705 4778 y(cltl)309 b(=)51 b(clist;)705 4898 y(Smaskset\(skt\);)705 5019 y(clist->skt=)j(skt;)705 5139 y(return)f(clist;)705 5259 y(})1901 5707 y Fn(15)p eop end %%Page: 16 18 TeXDict begin 16 17 bop 244 407 a Fn(The)32 b Ff(openClient)p Fn(\(\))i(function)d(p)s(olls)e(once)j(a)f(second)i(in)d(attempting)g (to)h(op)s(en)g(a)g(clien)m(t)g(So)s(c)m(k)m(et.)244 527 y(Once)g(it)e(succeeds,)k(a)d(Clien)m(tList)f(data)h(structure)h (is)f(allo)s(cated,)f(double-link)m(ed,)g(and)i(a)f(p)s(oin)m(ter)244 648 y(to)i(it)g(returned.)44 b(In)33 b(addition,)e(the)i(new)h(clien)m (t)d(So)s(c)m(k)m(et)j(is)e(added)i(to)e(the)h(Smask.)244 917 y Fg(Example)j(3.8)49 b Fe(Client)35 b(Closing)e(F)-7 b(unction)705 1283 y Ff(void)53 b(closeClient\(ClientList)k(*clist\)) 705 1403 y({)705 1523 y(if\(clist\))d({)910 1644 y (Smaskunset\(clist->skt\);)910 1764 y(Sclose\(clist->skt\);)910 1885 y(clist->skt=)h(NULL;)910 2005 y(})705 2125 y(})244 2516 y Fn(The)33 b Ff(closeClient)p Fn(\(\))i(function)c(remo)m(v)m(es) i(the)g(clien)m(t)e(So)s(c)m(k)m(et)j(from)d(the)h(Smask)g(system,)h (closes)244 2636 y(the)40 b(So)s(c)m(k)m(et,)k(and)c(then)h(sets)g(the) g(skt)g(p)s(oin)m(ter)f(to)f(NULL)i(to)e(guaran)m(tee)i(that)f(the)h (no)m(w)f(dead)244 2756 y(so)s(c)m(k)m(et)34 b(w)m(on't)f(b)s(e)g (inadv)m(erten)m(tly)g(re-used)h(someho)m(w.)70 2960 y(14.)49 b(It)39 b(is)g(usually)g(advisable)g(to)g(use)h(some)f(sort)h (of)f(handshaking)g(proto)s(col)f(b)s(et)m(w)m(een)k(serv)m(er)f(and) 244 3080 y(clien)m(t,)e(esp)s(ecially)e(when)i(large)e(data)h(blo)s(c)m (ks)h(are)f(b)s(eing)f(mo)m(v)m(ed.)61 b(The)39 b Fl(TCP/IP)73 b Fn(bu\013ers)40 b(can)244 3200 y(easily)32 b(get)g(\014lled)g(and)h (data)f(get)h(lost)e(otherwise.)45 b(T)-8 b(o)32 b(facilitate)e(this,)j (the)g Fl(SSL)e Fn(sets)j(so)s(c)m(k)m(ets)h(up)244 3321 y(with)h(the)i Fl(TCP)p 842 3321 28 4 v 32 w(NODELA)-8 b(Y)37 b Fn(option)f(so)h(that)g(small)d(pac)m(k)m(ets)39 b(are)e(mo)m(v)m(ed)h(out)e(across)i(and)f(not)244 3441 y(collected)26 b(\(collection)f(of)h(small)e(pac)m(k)m(ets)29 b(normally)24 b(impro)m(v)m(es)j(net)m(w)m(ork)h(e\016ciency)h(since)e (there's)244 3562 y(less)33 b(o)m(v)m(erhead)h(p)s(er)f(b)m(yte)g(of)g (data\).)1901 5707 y(16)p eop end %%Page: 17 19 TeXDict begin 17 18 bop 0 407 a Fh(4)161 b(The)53 b(P)l(ortMaster)0 626 y Fn(Serv)m(ers)43 b(ha)m(v)m(e)f(names)f(pro)m(vided)g(b)m(y)g (the)h(program)d(whic)m(h)i(op)s(ens)h(them.)67 b(When)42 b(a)f(serv)m(er)h(is)e(to)h(b)s(e)0 746 y(op)s(ened,)f(the)e(Sop)s(en)g (function)f(temp)s(orarily)e(op)s(ens)j(a)f(So)s(c)m(k)m(et)i(to)e(the) h(P)m(ortMaster)h(running)e(on)h(the)0 867 y(same)25 b(mac)m(hine.)41 b(The)26 b(Sop)s(en)g(function)e(then)i(tells)f(the)g (P)m(ortMaster)i(the)e(serv)m(er's)j Fe(name)d Fn(and)g(the)h(\(ran-)0 987 y(dom\))h Fe(p)-5 b(ort)28 b Fn(assigned)h(to)f(the)g(new)h(serv)m (er,)i(and)e(then)f(closes)h(do)m(wn)g(the)g(connection.)42 b(The)29 b(P)m(ortMaster)0 1107 y(retains)j(a)h(list)e(of)h(all)e (activ)m(e)j(serv)m(ers)i(and)e(p)s(orts)f(running)g(on)h(its)f(mac)m (hine.)146 1228 y(A)j(clien)m(t)f(is)h(op)s(ened)g(using)g(the)g(Sop)s (en)g(function,)h(to)s(o.)49 b(In)35 b(that)g(case,)h(a)e(connection)h (is)g(made)f(to)0 1348 y(the)29 b(P)m(ortMaster)h(on)f(the)h(mac)m (hine)e(where)i(the)f(requested)j(serv)m(er)e(is)f(running.)41 b(The)30 b(P)m(ortMaster)g(then)0 1469 y(tells)42 b(the)h(Sop)s(en)g (function)g(the)g(p)s(ort)f(n)m(um)m(b)s(er)h(asso)s(ciated)g(with)g (the)g(requested)i(serv)m(er,)i(and)c(then)0 1589 y(closes)30 b(do)m(wn)g(the)g(temp)s(orary)f(connection.)42 b(The)31 b(Sop)s(en)f(function)f(then)h(attempts)f(to)g(connect)h(to)g(the)0 1709 y(serv)m(er)k(using)f(the)g(giv)m(en)f(p)s(ort.)146 1830 y(The)46 b(serv)m(er)h(program)c(can)i(use)h(its)e(serv)m(er)j(So) s(c)m(k)m(et)f(to)e(test)i(if)d(an)m(y)j(clien)m(ts)e(are)h(w)m(aiting) e(to)i(b)s(e)0 1950 y(connected)e(to)e(it)g(\(via)f(the)i(Stest)g (function\).)70 b(If)41 b(a)h(clien)m(t)e(is)h(w)m(aiting,)i(then)f (the)g(serv)m(er's)h(program)0 2070 y(can)34 b Fe(ac)-5 b(c)g(ept)34 b Fn(the)g(connection,)h(generating)e(an)h(accept)h(So)s (c)m(k)m(et)g(\(via)f(Saccept\).)49 b(Once)34 b(the)h(connection)0 2191 y(is)h(accepted,)k(the)d(program)e(attempting)g(to)i(op)s(en)g (the)g(clien)m(t)f(So)s(c)m(k)m(et)i(will)d(\014nally)g(receiv)m(e)j(a) f(So)s(c)m(k)m(et)0 2311 y(p)s(oin)m(ter.)0 2600 y Fc(4.1)135 b(Users)46 b(Guide)0 2785 y Fn(The)f(P)m(ortMaster)g(is)f(probably)g (the)g(simplest)f(program)g(to)h(run:)67 b(under)45 b Fl(UNIX)p Fn(,)f(t)m(yp)s(e)h Ff(Spm)52 b(&)45 b Fn(and)0 2905 y(under)33 b Fl(VMS)f Fn(t)m(yp)s(e)h Ff(run/detach)54 b(Spm)p Fn(.)44 b(The)33 b(P)m(ortMaster)h(will)29 b(only)j(allo)m(w)f (one)h(cop)m(y)h(of)f(itself)f(to)h(run)0 3026 y(on)i(an)m(y)i(giv)m (en)e(computer.)50 b(It)35 b(uses)h(a)e(\014xed)i(p)s(ort)e(address)i (\(1750,)e(no)m(w)h(registered)g(with)f Fl(IANA)p Fn(\))h(and)0 3146 y(implemen)m(ts)23 b(a)h(table)g(of)g(serv)m(er)i(names)f(mapping) e(to)h(random)f(p)s(orts.)41 b(Although)24 b(kno)m(wledgeable)h(users)0 3266 y(could)39 b(c)m(hange)h(the)f(P)m(ortMaster's)i(\014xed)f(p)s (ort,)g(this)f(is)g(discouraged:)56 b(hop)s(efully)-8 b(,)40 b(P)m(ortMasters)g(will)0 3387 y(proliferate)27 b(across)j(the)g(w)m(orld)f(and,)h(if)e(they)i(all)d(use)j(the)g(same)f (p)s(ort)g(on)g(their)f(mac)m(hines,)i(will)d(b)s(e)j(able)0 3507 y(to)35 b(comm)m(unicate)e(with)i(one)g(another.)50 b(In)36 b(other)f(w)m(ords,)h(the)g Fl(SSL)d Fn(will)g(b)s(e)i(unable)g (to)f(comm)m(unicate)0 3627 y(with)e(other)h Fl(SSL)e Fn(systems)j(whic)m(h)f(use)h(a)e(di\013eren)m(t)h(p)s(ort)f(for)g(its) g(P)m(ortMaster.)146 3748 y(Since)25 b Fl(MS-DOS)f Fn(is)g(not)g(a)g(m) m(ulti-tasking)d(op)s(erating)i(system,)k(unlik)m(e)d Fl(UNIX)p Fn(,)h Fl(VMS)p Fn(,)f(or)g Fl(Amiga-DOS)p Fn(,)0 3868 y(one)29 b(cannot)g(ha)m(v)m(e)h(a)e(P)m(ortMaster)i (running)e(in)f(the)j(bac)m(kground)f(|)f(there)i(is)e(no)g(bac)m (kground.)44 b(Hence,)0 3989 y Fl(MS-DOS)28 b Fn(programs)f(are)h (curren)m(tly)h(restricted)f(to)g(using)g(clien)m(t)f(So)s(c)m(k)m(ets) j(only)-8 b(,)28 b Fe(unless)g Fn(they)h(can)f(share)0 4109 y(another)33 b(mac)m(hine's)f(P)m(ortMaster)i(\(see)g(b)s(elo)m (w\).)146 4229 y(The)45 b(P)m(ortMaster)g(no)m(w)g(supp)s(orts)f(a)g (\014rew)m(all:)65 b(one)44 b(can)g(instruct)g(the)g(P)m(ortMaster)h (to)f(restrict)0 4350 y(access)38 b(to)f(a)f(group)g(of)h(mac)m(hines)f (b)m(y)i(their)e(host)h(addresses.)58 b(See)37 b(the)g(section)g(on)f Fe(The)i(PortMaster)0 4470 y(Fir)-5 b(ewal)5 b(l)31 b Fn(b)s(elo)m(w.)0 4759 y Fc(4.2)135 b(Sharing)45 b(P)l(ortMasters)0 4944 y Fn(P)m(ortMasters)g(can)e(no)m(w)h(b)s(e)f Fe(shar)-5 b(e)g(d)p Fn(.)74 b(This)43 b(feature)h(w)m(as)g(installed)d(mainly)g (to)h(supp)s(ort)i Fl(MSDOS)e Fn({)0 5064 y(since)f(it)e(do)s(esn't)i (ha)m(v)m(e)h(a)e(bac)m(kground)h(pro)s(cess)h(capabilit)m(y)-8 b(,)40 b(it)f(cannot)i(run)f(P)m(ortMasters.)69 b(Hence,)0 5184 y(it)41 b(is)h(normally)e(restricted)j(to)f(running)g(clien)m(ts)g (only)-8 b(,)44 b(b)s(ecause)g(serv)m(ers)g(normally)c(announce)j (their)0 5305 y(presence)28 b(to)d(their)g(host's)h(P)m(ortMaster.)42 b(If)26 b(the)g(en)m(vironmen)m(t)f(v)-5 b(ariable)24 b Ff(PMSHARE)j Fn(is)e(set)h(to)g(some)f(other)0 5425 y(mac)m(hine,)37 b(that)f(other)h(mac)m(hine's)f(P)m(ortMaster)i(will)c (b)s(e)i(used)i(b)m(y)f(the)g(host's)g(pro)s(cesses)i(attempting)1901 5707 y(17)p eop end %%Page: 18 20 TeXDict begin 18 19 bop 0 407 a Fn(to)33 b(op)s(en)h(serv)m(ers.)50 b(F)-8 b(rom)32 b(the)i(clien)m(t's)g(viewp)s(oin)m(t,)g(the)g(serv)m (er)h(app)s(ears)g(to)e(b)s(e)h(on)g(the)g(mac)m(hine)f(with)0 527 y(the)g(P)m(ortMaster)h({)e(the)h(clien)m(t)f(do)s(esn't)h(need)h (to)e(kno)m(w)i(ab)s(out)e(where)i(the)f(serv)m(er)h(actually)d(is.)0 756 y Fg(Example)37 b(4.1)48 b Fe(PortMaster)36 b(Sharing)p 33 786 2778 4 v 31 907 4 121 v 362 871 a Fg(Mac)m(hine)p 1104 907 V 498 w(Mac)m(hine)p 1855 907 V 439 w(Mac)m(hine)p 2809 907 V 31 1027 V 527 991 a(A)p 1104 1027 V 830 w(B)p 1855 1027 V 771 w(C)p 2809 1027 V 33 1031 2778 4 v 31 1151 4 121 v 1104 1151 V 1855 1151 V 2809 1151 V 31 1271 V 82 1235 a Fn(PMSHARE=mac)m(hineb)p 1104 1271 V 1855 1271 V 2809 1271 V 31 1392 V 1104 1392 V 1855 1392 V 2809 1392 V 31 1512 V 82 1476 a(op)s(ens)e(serv)m(er)g Fe(ASrvr)p 1104 1512 V 1855 1512 V 2809 1512 V 31 1632 V 1104 1632 V 1855 1632 V 2809 1632 V 31 1753 V 1104 1753 V 1156 1717 a Fn(B's)f(P)m(ortMaster)p 1855 1753 V 2809 1753 V 31 1873 V 1104 1873 V 1156 1837 a(no)m(w)g(has)g Fe(ASrvr)p 1855 1873 V 2809 1873 V 31 1994 V 1104 1994 V 1156 1958 a Fn(on)f(its)g(list)p 1855 1994 V 2809 1994 V 31 2114 V 1104 2114 V 1855 2114 V 2809 2114 V 31 2234 V 1104 2234 V 1855 2234 V 1907 2198 a(pgm)g(op)s(ens)h(clien)m(t)p 2809 2234 V 31 2355 V 1104 2355 V 1855 2355 V 1907 2319 a(to)f(ASrvr@mac)m(hineb)p 2809 2355 V 31 2475 V 1104 2475 V 1855 2475 V 2809 2475 V 31 2596 V 1104 2596 V 1156 2559 a(B's)h(P)m(ortMaster)p 1855 2596 V 2809 2596 V 31 2716 V 1104 2716 V 1156 2680 a(satis\014es)p 1855 2716 V 2809 2716 V 31 2836 V 1104 2836 V 1156 2800 a(clien)m(t's)f (request)p 1855 2836 V 2809 2836 V 31 2957 V 1104 2957 V 1855 2957 V 2809 2957 V 31 3077 V 1104 3077 V 1855 3077 V 1907 3041 a(pgm)g(has)h(clien)m(t)f(to)p 2809 3077 V 31 3197 V 1104 3197 V 1855 3197 V 1907 3161 a Fe(ASrvr)h Fn(on)f(A)p 2809 3197 V 33 3201 2778 4 v 146 3386 a(In)f(Example)f(4.1,)h(three)g(mac)m(hines)g(are)f(in)g(use.)44 b(Ho)m(w)m(ev)m(er,)33 b(mac)m(hines)e(B)g(and)f(C)h(could)f(ha)m(v)m (e)i(b)s(een)0 3507 y(the)d(same)g(mac)m(hine.)42 b(In)29 b(essence,)j(when)e(A)f(shares)h(B's)g(P)m(ortMaster,)g(the)g(serv)m (ers)h(on)e(A)f(app)s(ear)h(to)g(b)s(e)0 3627 y(on)j(B)g(insofar)g(as)g (Sop)s(en'ing)g(a)g(clien)m(t)f(is)h(concerned.)45 b(In)m(ternally)-8 b(,)32 b(of)g(course,)h(B's)g(P)m(ortMaster)g(kno)m(ws)0 3747 y(where)h(the)f Fe(ASrvr)g Fn(is,)f(and)g(clien)m(ts)h(end)g(up)g (b)s(eing)f(connected)i(to)e(the)h(serv)m(er)i(on)d(mac)m(hine)g(A.)0 4036 y Fc(4.3)135 b(Theory)45 b(of)g(Op)t(eration)0 4221 y Fn(Normally)-8 b(,)37 b(users)j(of)d(the)i Fl(SSL)e Fn(will)f(not)i(need)h(to)f(read)g(this)g(section.)60 b(Ho)m(w)m(ev)m(er,)42 b(for)c(those)g(who)h(are)0 4341 y(curious...)146 4462 y(There)k(are)f(t)m(w)m(o)g(main)e(b)s(ene\014ts) j(to)e(using)h(the)g Fl(SSL)p Fn(:)e(the)i(functions)g(are)f(similar)e (to)i(those)h(that)0 4582 y(the)32 b(C)h(programmer)d(already)h(kno)m (ws)j(ho)m(w)f(to)e(use)i(and)f(hence)i(the)e Fl(SSL)f Fn(has)h(a)g(rapid)f(learning)f(curv)m(e,)0 4702 y(and)k(second,)h (serv)m(ers)g(are)f(assigned)g(to)f(curren)m(tly)h(a)m(v)-5 b(ailable)31 b(p)s(orts.)46 b(The)35 b(P)m(ortMaster)f(is)f(in)m (tegral)f(to)0 4823 y(pro)m(viding)g(the)h(second)g(b)s(ene\014t.)146 4943 y(Berk)m(eley)38 b(so)s(c)m(k)m(ets)h(are)e(assigned)g(p)s(orts,)g (whic)m(h)g(are)g(basically)e(just)i(in)m(tegers.)56 b(The)38 b(p)s(ort)e(is)g(used)0 5064 y(in)m(ternally)f(to)h(assign)h (the)g(\015o)m(w)g(of)f(data)g(to)h(the)g(correct)g(places.)56 b(One)37 b(m)m(ust)f(assign)h(a)f(sp)s(eci\014c)h(p)s(ort)0 5184 y(to)28 b(a)h(serv)m(er)h(or,)g(alternativ)m(ely)-8 b(,)28 b(allo)m(w)f(the)i(system)h(to)e(assign)h(an)m(y)g(a)m(v)-5 b(ailable)26 b(p)s(ort)j(to)f(it.)41 b(Clien)m(ts)29 b(m)m(ust)0 5304 y(use)j(that)f(same)g(p)s(ort)g(n)m(um)m(b)s(er)h(to)f (connect)h(to)f(the)h(desired)g(serv)m(er.)45 b(Hence,)33 b(the)e(problem)f(with)h(using)0 5425 y(the)d(\\an)m(y)h(a)m(v)-5 b(ailable)25 b(p)s(ort")i(is)h(ho)m(w)g(to)g(get)f(the)i(clien)m(t)e (pro)s(cess)i(to)f(kno)m(w)h(what)f(the)g(curren)m(tly)h(assigned)0 5545 y(p)s(ort)42 b(is!)71 b(Programmers)41 b(using)h(Berk)m(eley)h(so) s(c)m(k)m(ets)i(ha)m(v)m(e)e(t)m(ypically)e(just)h(assigned)h(a)e (\014xed)j(p)s(ort)d(to)1901 5707 y(18)p eop end %%Page: 19 21 TeXDict begin 19 20 bop 0 407 a Fn(their)35 b(serv)m(er)j(and)e (hard-co)s(ded)g(the)h(clien)m(ts)e(with)h(that)g(p)s(ort.)53 b(If)36 b(some)f(other)h(pro)s(cess)i(just)e(happ)s(ens)0 527 y(to)31 b(use)i(that)e(same)g(p)s(ort,)g(then)i(things)e(get)g (messy)i({)e(re-compile,)f(w)m(ait)g(un)m(til)h(the)h(other)f(pro)s (cess)i(go)s(es)0 648 y(a)m(w)m(a)m(y)-8 b(,)38 b(etc.)54 b(On)36 b(a)g(mac)m(hine)f(where)i(there)g(are)f(man)m(y)g(users,)i (co-op)s(eration)c(b)s(et)m(w)m(een)k(the)f(users)g(ma)m(y)0 768 y(b)s(e)c(impractical.)146 888 y(The)25 b(P)m(ortMaster)g(solv)m (es)g(the)f(problem)f(of)g(asso)s(ciating)f(a)i(serv)m(er)i(name)d (with)h(a)f(randomly)g(assigned)0 1009 y(\(and)30 b(a)m(v)-5 b(ailable\))27 b(p)s(ort,)j(and)g(making)e(that)i(asso)s(ciation)e(a)m (v)-5 b(ailable)28 b(to)h(clien)m(ts.)42 b(The)31 b(P)m(ortMaster)g (itself)0 1129 y(uses)36 b(a)f(\014xed)h(p)s(ort,)g(and)f(so)g(serv)m (ers)i(and)e(clien)m(ts)g(alw)m(a)m(ys)h(kno)m(w)g(\\where")g(it)e(is.) 50 b(Whenev)m(er)37 b(a)e(serv)m(er)0 1249 y(op)s(ens)27 b(\(using)g(the)g(Sop)s(en\(")p Fl(XXX)p Fn(","s"\))g(call\),)g(the)g (Sop)s(en)g(function)f(mak)m(es)i(a)e(So)s(c)m(k)m(et)i(data)f (structure,)0 1370 y(creates)34 b(a)e(Berk)m(eley)i(so)s(c)m(k)m(et,)h (initializes)29 b(and)k(binds)g(the)g(so)s(c)m(k)m(et)h(with)f(an)m(y)g (a)m(v)-5 b(ailable)30 b(p)s(ort,)i(and)h(then)0 1490 y(connects)38 b(to)f(the)g(P)m(ortMaster,)i Fe(using)g(its)g(\014xe)-5 b(d)38 b(p)-5 b(ort)p Fn(.)56 b(It)37 b(then)h(sends)g(a)f(\\message")g (\()p Fl(PM)p 3479 1490 28 4 v 33 w(SER)-10 b(VER)p Fn(,)0 1611 y(whic)m(h)24 b(is)g(simply)e(an)i(in)m(teger\))f(to)h(the)g(P)m (ortMaster,)j(telling)21 b(it)i(the)h(t)m(yp)s(e)g(of)g(So)s(c)m(k)m (et)h(it)d(is.)41 b(Subsequen)m(tly)-8 b(,)0 1731 y(the)33 b(P)m(ortMaster)h(gets)f(the)g(new)g(serv)m(er's)i(name)d(and)h(the)g (p)s(ort)f(it)g(is)g(assigned)h(to.)146 1851 y(When)39 b(a)f(clien)m(t)g(op)s(ens,)i(it)d(mak)m(es)i(a)e(So)s(c)m(k)m(et,)k (initializes)35 b(a)j(Berk)m(eley)h(so)s(c)m(k)m(et)h(as)e(a)g(clien)m (t)f(\(using)0 1972 y(the)28 b Fl(AF)p 295 1972 V 34 w(INET)f Fn(format\),)h(gets)g(a)g(\\host")g(en)m(tit)m(y)h(p)s(oin)m (ter)e(\(the)i(serv)m(er's)h(mac)m(hine)e(is)f(kno)m(wn)j(as)e(a)g (host\),)0 2092 y(and)36 b(then)h(connects)h(to)d(the)i(P)m(ortMaster)g (on)f(the)g(host)h(mac)m(hine.)53 b(It)36 b(then)h(sends)h(a)e(\\)p Fl(PM)p 3473 2092 V 32 w(CLIENT)p Fn(")0 2213 y(to)j(that)g(P)m (ortMaster)i(and)e(the)h(desired)g(serv)m(er's)i(name;)g(that)e(P)m (ortMaster)g(will)d(resp)s(ond)j(with)g(the)0 2333 y(asso)s(ciated)k(p) s(ort)f(n)m(um)m(b)s(er)h(\(if)f(there)h(is)g(one\).)77 b(The)45 b(clien)m(t)e(then)h(closes)g(do)m(wn)h(the)f(connection)g(to) 0 2453 y(the)34 b(target)f(host's)h(P)m(ortMaster,)h(and)e(initializes) d(a)j(Berk)m(eley)i(so)s(c)m(k)m(et)g(with)e(the)h(p)s(ort)f(n)m(um)m (b)s(er)g(it)g(just)0 2574 y(receiv)m(ed)h(and)f(returns)g(a)f(clien)m (t)g(So)s(c)m(k)m(et)i(p)s(oin)m(ter)e(to)g(the)h(user.)146 2694 y(Th)m(us,)h(the)e Fl(SSL)p Fn('s)f(P)m(ortMaster)i(system)g(is)e (a)h(distributed)f(database.)44 b(There)33 b(are)f(adv)-5 b(an)m(tages)32 b(and)0 2814 y(disadv)-5 b(an)m(tages)25 b(to)f(this)g(sc)m(heme.)42 b(No)24 b(P)m(ortMaster)i(kno)m(ws)g(an)m (ything)e(ab)s(out)g(serv)m(ers)j(residing)c(on)i(other)0 2935 y(mac)m(hines;)30 b(if)f(a)g(mac)m(hine)f(go)s(es)i(do)m(wn,)h (other)e(mac)m(hines)g(whic)m(h)h(ha)m(v)m(e)h(no)e(need)h(to)f(comm)m (unicate)f(with)0 3055 y(the)33 b(do)m(wned)h(mac)m(hine)e(are)h(not)f (a\013ected.)146 3176 y(On)39 b(the)g(other)f(hand,)h(a)f(single)f(mac) m(hine)h(with)g(a)h(single)e(P)m(ortMaster)i(w)m(ould)g(ob)m(viate)f (the)h(need)0 3296 y(for)48 b(clien)m(ts)f(to)h(kno)m(w)h(what)g(mac)m (hines)f(they)h(wish)f(to)g(connect)h(to,)j(and)c(could)f(force)i(serv) m(ers)h(on)0 3416 y(all)41 b(mac)m(hines)j(to)f(ha)m(v)m(e)i(unique)f (names)f(\(as)h(it)e(is,)k(serv)m(ers)g(can)e(ha)m(v)m(e)h(the)e(same)h (name)f(so)g(long)g(as)0 3537 y(they)36 b(run)g(on)f(di\013eren)m(t)g (mac)m(hines\).)52 b(As)35 b(a)g(palliativ)m(e,)f(the)h Fe(Sop)-5 b(env)34 b Fn(function)h(supp)s(orts)h(the)g(concept)0 3657 y(of)f(a)f Fe(machine)i(p)-5 b(ath)35 b Fn(via)f(the)i(use)g(of)e (en)m(vironmen)m(t)i(v)-5 b(ariables.)50 b(Using)34 b(the)i(Sop)s(en)m (v)g(function,)f(clien)m(ts)0 3778 y(can)26 b(\\h)m(un)m(t")g(do)m(wn)h (a)e(giv)m(en)h(serv)m(er)h(b)m(y)g(attempting)d(to)h(op)s(en)h(a)f (clien)m(t)g(one)h(at)g(a)f(time)f(on)i(eac)m(h)g(mac)m(hine)0 3898 y(un)m(til)j(a)i(serv)m(er)h(of)f(that)f(name)h(is)f(found.)43 b(Th)m(us,)33 b(the)e(user)g(can)g(designate)g(a)g(lo)s(cal)d(group)j (of)f(mac)m(hines)0 4018 y(via)c(an)h(en)m(vironmen)m(t)h(v)-5 b(ariable)25 b(\(t)m(ypically)-8 b(,)27 b(the)g(\\)p Fl(SKTP)-8 b(A)g(TH)p Fn(")26 b(en)m(vironmen)m(t)i(v)-5 b(ariable)25 b(is)i(used)h(for)e(this)0 4139 y(purp)s(ose\).)146 4259 y(The)k(P)m(ortMaster)f(talks)f(to)g(its)g(temp)s(orary)f(clien)m (ts)h(using)g(a)g(relativ)m(ely)f(simple)g(proto)s(col)g(based)i(on)0 4379 y(\\messages")j(\(in)m(tegers\))f(de\014ned)i(in)e(the)g Ff(sockets.h)j Fn(header)e(\014le.)43 b(T)-8 b(able)31 b(3)g(illustrates)f(the)h(proto)s(col.)0 4500 y(If)k(the)h(P)m (ortMaster)h(is)d(using)h(its)g(\014rew)m(all)g(capabilit)m(y)-8 b(,)34 b(it)g(immediately)f(c)m(hec)m(ks)38 b(all)33 b(of)i(its)g(temp)s(orary)0 4620 y(clien)m(ts)25 b(for)g(appro)m(v)m (ed)i(mac)m(hine)e(status;)h(a)g Fl(PM)p 1757 4620 V 32 w(SORR)-8 b(Y)25 b Fn(is)g(issued)i(immediately)22 b(prior)i(to)i(the)f(proto)s(col)0 4741 y(in)32 b(T)-8 b(able)32 b(3)g(up)s(on)h(failure)e(to)h(b)s(e)h(appro)m(v)m(ed.)45 b(The)33 b(connection)g(is)f(then)h(summarily)d(sev)m(ered.)146 4861 y(As)i(indicated)f(in)g(T)-8 b(able)31 b(3,)h(the)f(P)m(ortMaster) i(handles)f(more)f(ev)m(en)m(ts)j(than)d(just)h(the)g Fl(PM)p 3506 4861 V 33 w(SER)-10 b(VER)0 4981 y Fn(and)33 b Fl(PM)p 340 4981 V 33 w(CLIENT)e Fn(ev)m(en)m(ts)k(men)m(tioned)d (earlier.)42 b(When)34 b(a)e(clien)m(t)g(op)s(ens)h(to)f(the)h(P)m (ortMaster,)h(it)e(iden-)0 5102 y(ti\014es)37 b(the)h(t)m(yp)s(e)h(of)e (service)h(it)f(wishes)h(b)m(y)h(sending)e(that)h(P)m(ortMaster)g(a)f (\\message":)54 b Fl(PM)p 3479 5102 V 33 w(SER)-10 b(VER)p Fn(,)0 5222 y Fl(PM)p 150 5222 V 33 w(CLIENT)p Fn(,)40 b Fl(PM)p 747 5222 V 33 w(CLOSE)p Fn(,)f Fl(PM)p 1298 5222 V 33 w(T)-8 b(ABLE)p Fn(,)41 b(or)f Fl(PM)p 1980 5222 V 33 w(QUIT)p Fn(.)h(These)h(messages)g(are)f(discussed)h(b)s(elo) m(w.)0 5342 y(Whenev)m(er)31 b(the)d(P)m(ortMaster)i(do)s(es)f(not)f (understand)i(the)f(initial)24 b(message)29 b(\(due)g(to)f(garbling)e (or)i(what-)0 5463 y(ev)m(er\),)53 b(the)47 b(P)m(ortMaster)i(will)c (immediately)g(issue)j(a)f Fl(PM)p 2269 5463 V 33 w(RESEND)g Fn(message)h(and)f(then)i(w)m(ait)d(for)1901 5707 y(19)p eop end %%Page: 20 22 TeXDict begin 20 21 bop 0 407 a Fn(data.)83 b(It)45 b(will)f(con)m(tin) m(ue)i(doing)f(so)h(for)f(up)h(to)f Fl(PM)p 2029 407 28 4 v 33 w(MAXTR)-8 b(Y)47 b Fn(times)d(\(in)h(the)h Ff(sockets.h)i Fn(\014le)e(as)0 527 y(sen)m(t,)36 b Fl(PM)p 383 527 V 33 w(MAXTR)-8 b(Y)35 b Fn(is)f(de\014ned)h(as)g(20\).)47 b(If)35 b(the)f(limit)d(of)j(re-tries)f(is)h(reac)m(hed,)i(the)f(P)m (ortMaster)g(will)0 648 y(p)s(eremptorily)42 b(close)h(do)m(wn)i(the)e (connection)h(and)g(go)f(bac)m(k)h(to)f(its)g(usual)g(quiescen)m(t)i (state)f(w)m(aiting)0 768 y(for)32 b(a)g(new)i(connection.)146 888 y(The)j(P)m(ortMaster)g(will)d(w)m(ait)i(no)g(more)f(than)h Fl(TIMEOUT)f Fn(seconds)j(for)d(data,)i(whic)m(h)g(is)e(set)i(to)e(20)0 1009 y(seconds)27 b(in)e Ff(Spm.c)i Fn(as)f(deliv)m(ered.)41 b(If)25 b(that)h(amoun)m(t)f(of)g(time)f(elapses,)k(the)e(P)m (ortMaster)g(will)d(summarily)0 1129 y(close)33 b(do)m(wn)g(the)g(temp) s(orary)f(clien)m(t)g(and)g(con)m(tin)m(ue)i(for)e(more)g(business.)0 1357 y Fm(PM)p 176 1357 32 4 v 38 w(CLIENT)47 b Fn(tells)41 b(the)h(P)m(ortMaster)g(that)f(a)h(clien)m(t)e(is)h(attempting)f(to)h (op)s(en.)70 b(The)43 b(P)m(ortMaster)244 1478 y(normally)20 b(resp)s(onds)j(with)f(a)f Fl(PM)p 1469 1478 28 4 v 33 w(OK)h Fn(and)g(the)g(program)f(attempting)g(to)g(op)s(en)i(a)e(clien)m (t)h(resp)s(onds)244 1598 y(with)44 b(a)h(n)m(ull-b)m(yte)f(terminated) f(string)h(\(the)i(requested)g(serv)m(er)h(name\).)79 b(If)45 b(the)g(P)m(ortMaster)244 1719 y(\014nds)31 b(the)f(requested)i (serv)m(er)f(in)e(its)g(list,)g(then)h(it)f(resp)s(onds)i(with)e(a)g Fl(PM)p 2948 1719 V 33 w(OK)g Fn(and)h(then)g(the)g(p)s(ort)244 1839 y(n)m(um)m(b)s(er,)j(otherwise)g(it)f(sends)i(a)e Fl(PM)p 1650 1839 V 33 w(SORR)-8 b(Y)p Fn(.)244 2001 y(If)33 b(the)h(P)m(ortMaster)h(is)e(using)g(a)g(\014rew)m(all,)g(it)g (ma)m(y)g(resp)s(ond)h(immediately)d(with)66 b(a)33 b Fl(PM)p 3556 2001 V 33 w(SORR)-8 b(Y)244 2121 y Fn(if)31 b(the)i(clien)m(t)f(is)g(originating)d(from)j(an)g(unappro)m(v)m(ed)j (mac)m(hine.)0 2325 y Fm(PM)p 176 2325 32 4 v 38 w(CLIENTW)-12 b(AIT)47 b Fn(acts)41 b(m)m(uc)m(h)g(lik)m(e)e(a)h Fl(PM)p 1848 2325 28 4 v 33 w(CLIENT)p Fn(,)f(except)j(that)e(the)g(P)m (ortMaster)i(will)37 b(w)m(ait)244 2445 y(\(blo)s(c)m(k\))d(b)s(efore)h (sending)f(the)h(\014nal)f Fl(PM)p 1767 2445 V 33 w(OK)g Fn(and)g(p)s(ort)g(n)m(um)m(b)s(er.)50 b(Th)m(us)36 b(clien)m(ts)e(can) h(request)h(a)244 2565 y(blo)s(c)m(k)c(un)m(til)g(the)h(desired)g(serv) m(er)h(is)e(up.)0 2769 y Fm(PM)p 176 2769 32 4 v 38 w(CLOSE)48 b Fn(tells)34 b(the)j(P)m(ortMaster)f(that)g(a)f(serv)m(er)j(is)d (closing)g(do)m(wn.)54 b(The)36 b(P)m(ortMaster)h(will)d(nor-)244 2889 y(mally)i(resp)s(ond)j(with)f(a)g Fl(PM)p 1355 2889 28 4 v 33 w(OK)p Fn(;)f(the)i(program)e(closing)g(do)m(wn)i(the)g(serv) m(er)h(\(via)d Fe(Sclose)p Fn(\))g(will)244 3010 y(then)j(send)h(the)f (p)s(ort)f(n)m(um)m(b)s(er.)64 b(The)41 b(P)m(ortMaster)f(will)e(then)i (remo)m(v)m(e)g(the)g(asso)s(ciated)f(serv)m(er)244 3130 y(from)28 b(its)g(in)m(ternal)g(list)f(of)i(serv)m(ers)i(and)e(resp)s (ond)h(with)e(a)h Fl(PM)p 2539 3130 V 33 w(OK)f Fn(if)g(the)h (designated)g(serv)m(er)i(w)m(as)244 3250 y(in)h(its)g(list)f(and)i(a)f Fl(PM)p 1078 3250 V 33 w(SORR)-8 b(Y)32 b Fn(otherwise.)0 3454 y Fm(PM)p 176 3454 32 4 v 38 w(FWINIT)48 b Fn(tells)26 b(the)h(P)m(ortMaster)i(to)d(re-read)h(its)g(\014rew)m(all)f (data\014le.)41 b(The)28 b(P)m(ortMaster)h(will)24 b(then)244 3574 y(resp)s(ond)33 b(with)f(a)h Fl(PM)p 1064 3574 28 4 v 33 w(OK)f Fn(if)f(it)h(w)m(ork)m(ed)i(or)e Fl(PM)p 2055 3574 V 33 w(RESEND)g Fn(if)g(something)f(got)h(garbled.)0 3778 y Fm(PM)p 176 3778 32 4 v 38 w(QUIT)48 b Fn(tells)34 b(the)h(P)m(ortMaster)g(that)g(a)f(sh)m(utdo)m(wn)j(command)c(is)h(to)g (b)s(e)h(sen)m(t.)50 b(The)36 b(P)m(ortMaster)244 3898 y(resp)s(onds)30 b(with)e(a)h Fl(PM)p 1091 3898 28 4 v 33 w(OK)p Fn(,)f(and)h(the)g(program)e(sh)m(utting)i(do)m(wn)g(the)h (P)m(ortMaster)f(issues)h(a)f(n)m(ull-)244 4018 y(b)m(yte)48 b(terminated)e(string,)j(\\P)m(ortMaster")f(\(just)f(to)f(guaran)m(tee) h(that)g(a)f(sh)m(utdo)m(wn)j(is)d(really)244 4139 y(w)m(an)m(ted\).)c (The)26 b(P)m(ortMaster)g(will)d(then)j(sh)m(utdo)m(wn.)43 b(This)25 b(op)s(eration)e(requires)j(some)f(kno)m(wledge)244 4259 y(of)32 b(the)h(proto)s(col)e(as)i(no)g Fl(SSL)f Fn(function)g(is)g(pro)m(vided)h(to)g(mak)m(e)f(sh)m(utting)h(do)m(wn)h (the)f(P)m(ortMaster)244 4379 y(easy)-8 b(.)44 b(Ho)m(w)m(ev)m(er,)35 b(the)e Ff(sktdbg)h Fn(program)d(do)s(es)i(pro)m(vide)g(an)f(easy)i(w)m (a)m(y)f(to)f(sh)m(ut)i(do)m(wn)f(the)g(P)m(ort-)244 4500 y(Master.)58 b(Concerned)38 b(system)h(administrators)34 b(ma)m(y)j(wish)g(to)g(remo)m(v)m(e)h(the)f(\\sh)m(ut")h(command)244 4620 y(from)26 b Ff(sktdbg)p Fn(.)44 b(Sh)m(utting)27 b(do)m(wn)h(the)g(P)m(ortMaster)h(do)s(es)f(not)f(a\013ect)h(curren)m (tly)g(connected)i(So)s(c)m(k-)244 4741 y(ets;)45 b(ho)m(w)m(ev)m(er,)f (new)d(connections)g(b)s(et)m(w)m(een)h(serv)m(ers)h(and)d(clien)m(ts)g (cannot)g(b)s(e)h(made.)65 b(On)41 b(the)244 4861 y(other)f(hand,)j (starting)d(up)g(a)h(new)g(P)m(ortMaster)g(is)f(easy)i(and)e(an)m(y)m (one)i(ma)m(y)e(do)h(so)f({)g(the)h Ff(Spm)244 4981 y Fn(program)35 b(itself)f(will)g(refuse)j(to)f(allo)m(w)e(t)m(w)m(o)j(P) m(ortMasters)h(to)e(run)g(concurren)m(tly)h(\(and)f(will)e(sa)m(y)244 5102 y(so\).)0 5305 y Fm(PM)p 176 5305 32 4 v 38 w(SER)-12 b(VER)50 b Fn(tells)23 b(the)i(P)m(ortMaster)g(that)f(a)g(serv)m(er)j (has)d(b)s(een)h(op)s(ened.)42 b(The)25 b(P)m(ortMaster)h(will)c(nor-) 244 5425 y(mally)k(resp)s(ond)j(with)e(a)h Fl(PM)p 1314 5425 28 4 v 33 w(OK)g Fn(and)g(then)h(the)f(program)f(op)s(ening)h(a)g (serv)m(er)i(will)25 b(send)30 b(a)e(string)244 5546 y(giving)j(the)i(new)g(serv)m(er's)i(name)d(and)h(then)g(will)e(send)i (its)f(p)s(ort.)1901 5707 y(20)p eop end %%Page: 21 23 TeXDict begin 21 22 bop 244 407 a Fn(The)49 b(P)m(ortMaster)h(will)c (then)j(resp)s(ond)g(with)f(a)g Fl(PM)p 2298 407 28 4 v 33 w(OK)g Fn(up)s(on)g(success)j(or)96 b(a)48 b Fl(PM)p 3556 407 V 33 w(SORR)-8 b(Y)244 527 y Fn(if)31 b(a)i(serv)m(er)h(b)m(y) f(that)g(name)f(already)g(exists.)244 689 y(If)k(the)g(P)m(ortMaster)h (is)f(using)g(a)f(\014rew)m(all,)i(it)d(ma)m(y)i(resp)s(ond)h (immediately)c(with)j(a)f Fl(PM)p 3556 689 V 33 w(SORR)-8 b(Y)244 809 y Fn(if)39 b(the)i(serv)m(er)h(is)e(originating)c(from)k (an)g(unappro)m(v)m(ed)i(mac)m(hine.)66 b(When)41 b(P)m(ortMaster)h (sharing)244 930 y(is)g(not)h(op)s(erating,)i(this)e(ev)m(en)m(t)h (should)f(nev)m(er)i(o)s(ccur,)h(as)d(serv)m(ers)j(can)d(then)h(only)e (b)s(e)h(legally)244 1050 y(generated)e(on)f(the)h(same)f(mac)m(hine)g (that)g(the)h(P)m(ortMaster)g(resides)h(up)s(on.)67 b(The)41 b(P)m(ortMaster)244 1171 y(en)m(ters)30 b(its)e(o)m(wn)i(host)f(on)m (to)g(its)f(in)m(ternal)g(\014rew)m(all)f(table)i(whenev)m(er)i(use)f (of)e(a)g(\014rew)m(all)g(is)h(enabled.)0 1374 y Fm(PM)p 176 1374 32 4 v 38 w(T)-9 b(ABLE)49 b Fn(tells)30 b(the)i(P)m (ortMaster)h(to)e(giv)m(e)g(out)g(a)g(list)f(of)h(the)h(serv)m(ers)i (it)c(curren)m(tly)i(kno)m(ws)h(ab)s(out.)244 1494 y(Normally)d(the)k (P)m(ortMaster)g(will)d(resp)s(ond)i(with)66 b(a)33 b Fl(PM)p 2397 1494 28 4 v 33 w(OK)p Fn(,)f(a)h(coun)m(t)g(of)g(serv)m (ers)i(\(in)d(net)m(w)m(ork)244 1615 y(standard)f(2-b)m(yte)g(format,)e (see)j(the)e(Berk)m(eley)i(\\n)m(tohs")f(function)f(for)g(details\),)g (and)g(a)g(sequence)244 1735 y(of)f(strings)h(giving)e(the)i(serv)m(er) h(name)e(and)h(asso)s(ciated)g(p)s(ort)f(n)m(um)m(b)s(er.)43 b(The)31 b Ff(spmtable)g Fn(program)244 1856 y(and)i Ff(sktdbg)p Fn('s)h(\\table")e(function)g(use)h(this)g(facilit)m(y)-8 b(.)0 2115 y Fg(4.3.1)112 b(The)38 b(P)m(ortMaster)f(Firew)m(all)0 2300 y Fn(The)d(P)m(ortMaster)g(supp)s(orts)g(a)f Fe(\014r)-5 b(ewal)5 b(l)32 b Fn(to)g(k)m(eep)j(out)e(so)s(c)m(k)m(et)h(requests)h (from)d(unappro)m(v)m(ed)j(mac)m(hines.)0 2420 y(The)g(\014rew)m(all)e (consists)i(of)e(a)h(list)e(of)i(mac)m(hines')g(in)m(ternet)g (addresses)i(in)e(a)f(\014le.)47 b(One)35 b(sp)s(eci\014es)g(the)f (\014le)0 2541 y(b)m(y)f(one)g(of)f(t)m(w)m(o)i(metho)s(ds:)119 2769 y(1.)49 b(Startup)33 b(with)83 b Ff(Spm)52 b(-f)p Fe(ful)5 b(l-p)-5 b(ath-to-\014lename)119 2973 y Fn(2.)49 b(Initialization)24 b(of)k(an)g(en)m(vironmen)m(t)h(v)-5 b(ariable,)28 b Fl(SPMFIREW)-10 b(ALL)p Fn(,)28 b(to)h(the)g Fe(ful)5 b(l-p)-5 b(ath-to-\014lename)p Fn(.)146 3201 y(The)34 b Fe(ful)5 b(l-p)-5 b(ath-to-\014lename)31 b Fn(\014le)h(con)m(tains)g(records)i(of)e(the)h(form:)103 3404 y Ff(*)51 b(*)h(number)g(number)h(number)g(number)146 3608 y Fn(where)37 b(the)f(four)f Ff(number)p Fn(s)i(are)f(the)g(in)m (ternet)f(addresses)j(of)d(the)h(mac)m(hines)f(p)s(ermitted)g(to)g (talk)f(to)0 3728 y(the)44 b(P)m(ortMaster.)76 b(The)44 b Ff(*)f Fn(indicates)g(accept)h(an)m(y)g(n)m(um)m(b)s(er)g(in)e(that)h (\014eld.)75 b(The)44 b(\014rew)m(all)e(function)0 3848 y(examines)33 b(incoming)d(in)m(ternet)j(addresses)h(b)m(y)g(use)f(of)g (the)g Fe(getp)-5 b(e)g(ername)31 b Fn(function.)146 3969 y(The)i(\014rew)m(all)d(\014le,)h(often)h(called)e Fe(spm\014r)-5 b(ewal)5 b(l.dat)p Fn(,)30 b(ma)m(y)h(con)m(tain)g (blank)g(lines.)42 b(The)33 b Ff(#)e Fn(is)g(assumed)0 4089 y(to)h(b)s(egin)g(a)g(commen)m(t)g(and)h(is)f(stripp)s(ed)h (o\013.)1901 5707 y(21)p eop end %%Page: 22 24 TeXDict begin 22 23 bop 0 407 a Fh(5)161 b(The)53 b(Utilities)0 626 y Fn(There)36 b(are)f(sev)m(eral)h(utilities)c(pro)m(vided)k(with)e (the)i Fl(SSL)p Fn(,)e(and)h(they)h(are)f(explained)f(b)s(elo)m(w.)51 b(These)37 b(are)0 746 y(all)30 b(complete)i(programs)g(in)g(themselv)m (es,)i(and)e(can)h(serv)m(e)i(as)d(lessons)i(on)e(ho)m(w)i(to)e(use)h (the)g Fl(SSL)p Fn(.)0 975 y Fg(sktdbg)49 b Ff(server-name)54 b({s|c})48 b Fe(sktdb)-5 b(g)45 b Fn(is)h(the)h Fl(SSL)p Fn('s)e(testing)h(program.)83 b(One)46 b(ma)m(y)g(op)s(en)g(serv)m(er) 244 1095 y(So)s(c)m(k)m(ets,)36 b(accept)g(So)s(c)m(k)m(ets,)g(and)f (clien)m(t)e(So)s(c)m(k)m(ets,)k(test)e(out)f(ho)m(w)h(other)f (program's)g(So)s(c)m(k)m(ets)i(are)244 1215 y(comm)m(unicating,)28 b(etc.)43 b(See)31 b(the)f(subsection)h(on)f Fe(sktdb)-5 b(g)30 b Fn(b)s(elo)m(w.)42 b(The)31 b(\\serv)m(er-name")f(ma)m(y)g (tak)m(e)244 1336 y(t)m(w)m(o)35 b(forms:)46 b Ff(servername)36 b Fn(or)e Ff(servername@machine-name)p Fn(.)54 b(The)35 b(latter)f(form)f(ma)m(y)g(b)s(e)i(used)244 1456 y(when)40 b(attempting)e(to)g(op)s(en)i(clien)m(ts)e(to)h(serv)m(ers)j(residing)c (on)h(mac)m(hines)g(other)g(than)g(the)h(one)244 1576 y(the)33 b(user)g(is)f(curren)m(tly)i(running)e Ff(sktdbg)i Fn(on.)0 1780 y Fg(spmc)m(hk)49 b Ff([machine])29 b Fn(This)e(program)e (tests)j(the)f(curren)m(t)h(mac)m(hine)e(b)m(y)i(default,)f(the)g (named)f(mac)m(hine)244 1900 y(otherwise,)44 b(for)d(the)g(presence)j (of)d(a)g(P)m(ortMaster.)70 b(It)42 b(will)d(return)i(a)g(0)g(if)f(the) i(P)m(ortMaster)g(is)244 2021 y(presen)m(t,)34 b(or)e(a)h(1)f (otherwise,)h(and)g(is)f(useful)h(in)e(scripts:)1232 2290 y(spmc)m(hk)j Ff(||)f Fn(\(noh)m(up)g(Spm)f Ff(>)h Fn(/dev/n)m(ull)f(&\))244 2560 y(T)-8 b(ranslated)37 b(for)f(non-csh/ksh)i(users:)54 b(if)35 b(spmc)m(hk)j(\014nds)g(no)f(P) m(ortMaster)h(on)e(the)h(curren)m(t)h(ma-)244 2681 y(c)m(hine,)32 b(start)g(one)g(up)g(in)f(the)i(bac)m(kground)g(in)e(\\no)g(hangup)h (on)g(user)h(exit")e(mo)s(de,)g(with)h(output)244 2801 y(headed)h(to)g(the)g(bit)e(buc)m(k)m(et.)46 b Fl(\(thanks)30 b(go)i(to)f(Mart)m(y)g(Olevitc)m(h)f(for)g(this)f(program\))p Fn(.)244 2963 y(F)-8 b(or)32 b Fl(VMS)g Fn(users:)572 3190 y Ff(spmchk:=)53 b([fullpath]spmchk.exe)572 3310 y(set)f(noon)572 3431 y(spmchk)572 3551 y(if)g('$SEVERITY')i(.ne.)e(1)g (then)g(run/detach)i([fullpath]Spm.exe)572 3671 y(set)e(on)0 4019 y Fg(spm)m(table)c Ff([machine)54 b([machine)f([machine)g(...]]]) 36 b Fn(This)f(program)e(lists)g(the)i(serv)m(ers)i(and)d(p)s(ort)244 4139 y(n)m(um)m(b)s(ers)e(on)f(the)h(requested)i(mac)m(hines.)43 b(If)31 b(no)g(mac)m(hine)g(is)g(listed,)f(then)i(the)g(curren)m(t)g (mac)m(hine)244 4259 y(will)e(b)s(e)j(used.)0 4463 y Fg(srmsrvr)48 b Ff([server-name)55 b([server-name)f([server-name)g (...]]])24 b Fn(Sometimes)c(the)i(all-kno)m(wledgeable)244 4583 y(and)h(omnip)s(oten)m(t)e(programmer)g(\014nds)j(a)f(need)g(to)g (hit)f(the)h(con)m(trol-c)f(k)m(ey)i(or)f(otherwise)g(kill)e(a)h(run-) 244 4704 y(ning)h(program)f(with)i(a)f(serv)m(er)j(So)s(c)m(k)m(et.)42 b(In)24 b(suc)m(h)h(cases,)i(the)e(P)m(ortMaster)g(do)s(es)f(not)g(get) f(informed)244 4824 y(that)30 b(the)h(serv)m(er)h(has)f(gone)g(do)m (wn.)44 b(This)30 b(utilit)m(y)f(will)f(tell)h(the)i(P)m(ortMaster)h (to)e(forcibly)f(remo)m(v)m(e)244 4944 y(the)k(named)f(serv)m(er\(s\))j (from)c(its)h(list.)146 5173 y(Except)41 b(when)g(using)d Ff(sktdbg)j Fn(to)e(op)s(en)g(a)g(serv)m(er)i(with)e Ff(sktdbg)p Fn(,)k(the)c(serv)m(er)i(names)f(ab)s(o)m(v)m(e)g(can)0 5293 y(also)45 b(ha)m(v)m(e)i(the)f(form)e Ff(srvr@machine-name)p Fn(.)87 b(This)46 b(name)f(sp)s(eci\014es)i(a)f(serv)m(er)h(on)f(a)f (sp)s(eci\014c)h(ma-)0 5413 y(c)m(hine.)81 b(Note)44 b(that)h(the)g(mac)m(hine-name)f(is)g(its)g(normal)f(abbreviation)g (\(ie.)i(hostname\))f(or)h(its)f(full)0 5534 y(name)32 b(\(ie.)g(hostname.someplace.com\).)1901 5707 y(22)p eop end %%Page: 23 25 TeXDict begin 23 24 bop 0 407 a Fc(5.1)135 b(The)45 b Fb(sktdbg)d Fc(Program)0 592 y Fn(The)31 b Ff(sktdbg)g Fn(program)e(w)m(as)i(originally)26 b(a)k(testing)f(facilit)m(y)f(to)i (debug)h(the)f Fl(SSL)f Fn(itself,)g(but)h(has)g(pro)m(v)m(en)0 712 y(exceptionally)i(useful)g(in)g(debugging)g(programs)g(whic)m(h)h (use)h(the)f Fl(SSL)p Fn(.)e(Consequen)m(tly)-8 b(,)35 b(it)c(is)h(pro)m(vided)0 832 y(as)h(part)f(of)g(the)h(pac)m(k)-5 b(age.)146 953 y(T)d(o)46 b(start)f(up)h Ff(sktdbg)p Fn(,)k(one)c(m)m(ust)g(c)m(ho)s(ose)g(b)s(et)m(w)m(een)i(starting)c(up) i(a)f(serv)m(er)i(or)e(attempting)f(to)0 1073 y(op)s(en)33 b(a)f(clien)m(t)g(So)s(c)m(k)m(et.)0 1298 y Fg(Example)37 b(5.1)48 b Fe(Starting)35 b(up)g(a)g(sktdb)-5 b(g)34 b(Server)35 1418 y(sktdb)-5 b(g)34 b(servername)g(s)0 1643 y Fg(Example)j(5.2)48 b Fe(Starting)35 b(up)g(a)g(sktdb)-5 b(g)34 b(Client)35 1763 y(sktdb)-5 b(g)34 b(servername)g(c)146 1988 y Fn(One)f(ma)m(y)g(also)e(ask)j(sktdbg)f(to)f(explain)g(itself.)0 2213 y Fg(Example)37 b(5.3)48 b Fe(sktdb)-5 b(g)35 b(Explanation)35 2333 y(sktdb)-5 b(g)34 b("?")146 2558 y Fn(When)44 b(the)g Ff(sktdbg)g Fn(program)e(is)g(started,)47 b(the)c(\014rst)h(thing)e(it) g(do)s(es)h(is)g(attempt)f(to)h(create)h(the)0 2678 y(requested)35 b(t)m(yp)s(e)f(of)e(So)s(c)m(k)m(et.)45 b(T)m(ypically)-8 b(,)32 b(attempts)h(to)f(mak)m(e)h(a)g(serv)m(er)h(will)d(succeed;)k (if)d(it)f(do)s(esn't,)j(it)0 2799 y(will)28 b(rep)s(ort)i(a)g(w)m (arning,)h(apply)f(Srmsrvr\(\),)h(and)f(try)h(a)f(second)h(time)e(to)h (op)s(en)h(the)f(serv)m(er)i(again.)42 b(If)30 b(it)0 2919 y(fails)h(t)m(wice,)i(then)g(usually)f(the)h(P)m(ortMaster)h(is)e (not)g(running)g(on)h(y)m(our)g(mac)m(hine.)146 3040 y(A)m(ttempts)g(to)f(op)s(en)h(a)f(clien)m(t)f(to)h(a)g(non-existen)m (t)i(serv)m(er)g(also)d(yields)h(an)g(error)h(message:)43 b(\\unable)0 3160 y(to)32 b(Sop)s(en\(srvrname,c\)".)45 b(If)32 b(the)h(serv)m(er)i(is)d(up)h(and)f(running,)g(then)i(a)e (clien)m(t)g(So)s(c)m(k)m(et)i(will)c(b)s(e)j(set)g(up.)146 3280 y(The)e Ff(sktdbg)h Fn(program)d(then)i(prin)m(ts)f(out)g(a)g (little)e(men)m(u)i(of)g(actions)g(that)g(the)h(user)g(can)f(tak)m(e)h (with)0 3401 y(it.)146 3521 y(The)24 b(\\En)m(ter")f(prompt)g(no)m(w)g (also)f(sho)m(ws)i(the)g(n)m(um)m(b)s(er)f(of)f(b)m(ytes)j(w)m(aiting)c (on)i(the)g(queue)h(for)f(reading.)0 3641 y(This)36 b(n)m(um)m(b)s(er)g (is)f(up)s(dated)h(only)g(when)h(the)f(prompt)f(is)g(generated;)j(ie.) 52 b(it)35 b(is)g(not)h(a)f(dynamic)g(v)-5 b(alue,)0 3762 y(but)33 b(is)f(often)h(useful.)146 3882 y(In)g(T)-8 b(able)32 b(4,)h(there)g(are)g(20)f(commands)g(a)m(v)-5 b(ailable,)30 b(and)j(are)f(describ)s(ed)h(b)s(elo)m(w.)0 4107 y Fg(accept)95 b Fn(Used)48 b(b)m(y)g(a)e(serv)m(er)j(So)s(c)m(k)m (et)f(to)e(accept)h(clien)m(ts.)86 b(Note)47 b(that)f(one)h(ma)m(y)g (\014rst)g(do)f Fe(test)h Fn(to)244 4227 y(determine)32 b(if)g(a)g(clien)m(t)g(is)g(w)m(aiting.)0 4430 y Fg(close)81 b Fn(Used)33 b(b)m(y)h(a)e(serv)m(er)i(So)s(c)m(k)m(et)g(to)f(close)f (do)m(wn)i(an)e(accept)i(So)s(c)m(k)m(et.)0 4632 y Fg(fput)80 b Fn(This)31 b(function)g(tak)m(es)h(a)e(\014lename,)h Fe(fput)j(\014lename)p Fn(,)c(whic)m(h)h(sktdbg)h(then)g(op)s(ens.)43 b(Ev)m(ery)33 b(line)d(in)244 4753 y(it,)j(min)m(us)g(trailing)e(white) j(space,)h(is)e(sen)m(t)i(via)e(Sputs)i(across)g(the)f(So)s(c)m(k)m (et.)49 b(Sktdbg)34 b(then)g(closes)244 4873 y(the)f(\014le.)0 5076 y Fg(fwinit)81 b Fn(This)33 b(call)f(issues)i(a)g Fl(PM)p 1275 5076 28 4 v 33 w(FWINIT)f Fn(to)g(the)h(lo)s(cal)e(mac)m (hine's)h(P)m(ortMaster.)47 b(The)35 b(P)m(ortMaster)244 5196 y(will)43 b(then)j(re-read)f(the)h(\014rew)m(all)f(data)g(\014le)g (that)g(it)f(w)m(as)i(optionally)d(started)j(up)g(with)f(\(if)f(it)244 5316 y(had)36 b(none,)h(then)g(this)e(command)g(will)e(ha)m(v)m(e)k(no) f(e\013ect\).)54 b(The)37 b(fwinit)e(command)f(is)i(useful)f(for)244 5437 y(the)g(o)m(wner)h(of)f(the)g(\014rew)m(all)f(data)h(\014le)f(to)h (c)m(hange)h(it)e(and)h(ha)m(v)m(e)h(the)g(P)m(ortMaster)g(up)s(date)f (itself)244 5557 y(without)d(bringing)f(do)m(wn)i(the)g(P)m(ortMaster)h (and)f(restarting)e(it.)1901 5707 y(23)p eop end %%Page: 24 26 TeXDict begin 24 25 bop 0 407 a Fg(get)88 b Fn(Uses)41 b(Sgets)f(to)f(get)g(a)g(n)m(ull-terminated)e(string)i(from)f(the)i (clien)m(t.)63 b(This)39 b(call)f(will)f(blo)s(c)m(k)i(un)m(til)244 527 y(something)31 b(arriv)m(es)i(for)f(up)h(to)g(60)f(seconds.)0 717 y Fg(isset)70 b Fn(Uses)24 b(Smaskw)m(ait\(\))e(with)f(negligible)f (timeout)g(\(1)i(microsecond!\))40 b(and)22 b(then)h(uses)h (Smaskisset\(\))244 837 y(to)31 b(determine)f(if)g(the)i(so)s(c)m(k)m (et)g(is)f(read-ready)-8 b(.)43 b(This)31 b(function)g(w)m(as)h (included)f(mostly)f(for)g(testing)244 957 y(Smaskisset\(\).)0 1147 y Fg(men)m(u)81 b Fn(Rep)s(eats)33 b(the)g Fe(So)-5 b(cket)35 b(T)-7 b(est)34 b(Commands)d Fn(men)m(u)i(\(just)f(lik)m(e)g (\\?")43 b(b)s(elo)m(w\).)0 1336 y Fg(p)s(eek)93 b Fn(Uses)44 b(Sp)s(eek)h(to)e(p)s(eek)h(at)f(what)g(the)h(clien)m(t)e(has)i(sen)m (t.)77 b(This)43 b(call)e(will)g(not)i(blo)s(c)m(k,)j(ev)m(en)f(if)244 1457 y(nothing)32 b(is)g(there)h(y)m(et.)0 1646 y Fg(prin)m(tf)48 b Fn(prin)m(tf)25 b(y)m(our-w)m(ord)i(Uses)g(Sprin)m(tf)e(to)h(send)h ("y)m(our-w)m(ord)f(7)g(8.)41 b(it)m(w)m(ork)m(ed!")26 b(through)g(the)h(So)s(c)m(k)m(et.)0 1836 y Fg(put)49 b Fn(put)29 b(y)m(our)h(v)-5 b(arious)28 b(sundry)i(strings)f(across)g (Uses)i(Sputs)f(to)e(send)i(y)m(our)g(strings)e(on)h(the)h(same)e(line) 244 1956 y(through)k(the)h(So)s(c)m(k)m(et.)0 2146 y Fg(q)87 b Fn(This)38 b(function)f(\\quits")h({)f(uses)i(Sclose)f(to)g (close)g(do)m(wn)h(all)c(So)s(c)m(k)m(ets)40 b(that)e Ff(sktdbg)h Fn(is)e(using)h(and)244 2266 y(exits.)44 b(Just)33 b(lik)m(e)f(\\quit".)0 2456 y Fg(quit)77 b Fn(This)30 b(function)e(\\quits")h({)g(uses)i(Sclose)f(to)e(close)i(do) m(wn)g(all)d(So)s(c)m(k)m(ets)k(that)e Ff(sktdbg)i Fn(is)e(using)g(and) 244 2576 y(exits.)44 b(Just)33 b(lik)m(e)f(\\q".)0 2766 y Fg(read)76 b Fn(This)26 b(function)g(uses)h(Sread)g(to)f(read)g (whatev)m(er)i(is)e(on)g(the)h(So)s(c)m(k)m(et,)i(and)d(prin)m(ts)g(it) g(out)g(assuming)244 2886 y(that)32 b(it)g(receiv)m(ed)i(a)e(string.)0 3075 y Fg(rmsrvr)48 b Fn(rmsrvr)32 b(serv)m(er-name)i(This)f(function)f (uses)i(Srmsrvr)f(to)f(remo)m(v)m(e)h(a)f(serv)m(er.)0 3265 y Fg(scanf)92 b Fn(This)42 b(function)g(accepts)h(a)f(subset)i(of) e(format)e(co)s(de:)63 b(\045c,)46 b(\045d,)f(\045f,)f(and)f(\045s.)73 b(It)42 b(will)e(call)244 3385 y(Sscanf)33 b(once)g(for)f(eac)m(h)i (format)d(co)s(de)i(giv)m(en)g(to)f(it.)0 3575 y Fg(sh)m(utdo)m(wn)85 b Fn(This)36 b(function)f(is)g Fe(danger)-5 b(ous)p Fn(!)51 b(It)36 b(will)d(sh)m(ut)k(do)m(wn)f(the)g(P)m(ortMaster)h(on)f(y)m (our)g(curren)m(t)244 3695 y(mac)m(hine)g(and)h(p)s(erform)e(a)h(quit.) 56 b(Use)37 b(of)f(this)h(function)f(is)g(strongly)g(discouraged)h (unless)g(it)e(is)244 3816 y(necessary)g(to)d(pull)f(do)m(wn)j(a)e(P)m (ortMaster.)0 4005 y Fg(table)82 b Fn(The)34 b Fe(table)f Fn(function)g(comm)m(unicates)f(with)h(the)h(P)m(ortMaster)g(and)g (prin)m(ts)f(out)67 b(a)33 b(table)f(of)h(all)244 4126 y(curren)m(t)h(serv)m(ers)g(and)f(their)f(p)s(orts)h(\(rather)f(lik)m (e)g(spm)m(table\).)0 4315 y Fg(test)88 b Fn(The)41 b Fe(test)f Fn(function)g(prin)m(ts)g(out)f(the)i(n)m(um)m(b)s(er)f(of)f (b)m(ytes)j(a)m(w)m(aiting)c(p)s(erusal)i(b)m(y)h(a)e(get)h(or)g(read) 244 4435 y(op)s(eration.)h(It)28 b(do)s(es)h(not)f(blo)s(c)m(k,)h(ev)m (en)h(if)e(nothing)f(is)h(w)m(aiting)f({)h(it)f(will)f(return)j(0)f(in) g(suc)m(h)i(a)e(case.)0 4625 y Fg(w)m(ait)79 b Fn(This)32 b(function)f(will)e(blo)s(c)m(k)i(the)h(pro)s(cess)h(un)m(til)d (something)g(sho)m(ws)j(up)f(on)f(the)h(accept)h(or)e(clien)m(t)244 4745 y(So)s(c)m(k)m(et.)0 4935 y Fg(write)47 b Fn(write)36 b(y)m(our)g(sundry)h(though)m(ts)f(and)f(w)m(ords)i(This)f(function)f (will)e Fe(Swrite)i Fn(y)m(our)h(w)m(ords,)i(appro-)244 5055 y(priately)28 b(n)m(ull-b)m(yte)g(terminated,)h(through)g(the)g (So)s(c)m(k)m(et.)44 b(It)28 b(can)i(b)s(e)f(read)g(b)m(y)h(the)f Fe(r)-5 b(e)g(ad)28 b Fn(function.)0 5245 y Fg(?)81 b Fn(Rep)s(eats)33 b(the)g Fe(So)-5 b(cket)35 b(T)-7 b(est)34 b(Commands)d Fn(men)m(u)h(\(just)h(lik)m(e)f(\\men)m(u")h(ab)s(o)m(v)m (e\).)146 5417 y(This)k(program)d(is)i(really)f(quite)h(simple)e(to)i (learn)f(and)i(run,)g(and)f(is)g(useful)g(to)g(help)g(the)g(installer)0 5538 y(v)m(erify)d(that)f(the)h Fl(SSL)f Fn(is)g(installed)f(correctly) -8 b(.)1901 5707 y(24)p eop end %%Page: 25 27 TeXDict begin 25 26 bop 0 407 a Fh(6)161 b(Installation)56 b(Instructions)0 626 y Fn(Installation)30 b(v)-5 b(aries,)32 b(of)g(course,)i(from)e(op)s(erating)f(system)i(to)g(op)s(erating)e (system.)0 913 y Fc(6.1)135 b(Unix)119 1098 y Fn(1.)49 b(Mak)m(e)37 b(a)e Ff(SKTS)h Fn(sub)s(directory)g(somewhere,)i(and)d (extract)h(the)g(con)m(ten)m(ts)h(of)e(the)h(tap)s(e)f(in)m(to)g(that) 244 1218 y(sub)s(directory)g(\(t)m(ypically)-8 b(,)34 b Ff(tar)52 b(-xvop)p Fn(,)37 b(but)e(systems)h(will)c(v)-5 b(ary)35 b(and)g(y)m(ou)h(ma)m(y)e(need)i(to)e(sp)s(ec-)244 1339 y(ify)e(a)g(tap)s(e)h(driv)m(e\).)119 1540 y(2.)49 b(If)36 b(y)m(our)h(mac)m(hine)e(is)h(not)g Fl(ANSI)d(C)i Fn(complian)m(t,)g(but)i(supp)s(orts)g(protot)m(yping)e(an)m(yw)m(a)m (y)-8 b(,)39 b(edit)d(the)244 1660 y Ff(sockets.h)f Fn(\014le)d(to)g Ff(#)p Fn(de\014ne)p 1353 1660 28 4 v 1385 1660 V 100 w Fl(PR)m(OTOTYPE)p 2010 1660 V 2042 1660 V 97 w Fn(for)g(y)m(our)h (mac)m(hine.)119 1861 y(3.)49 b(T)m(yp)s(e)34 b Ff(make)52 b(all)p Fn(.)146 2079 y(These)34 b(instructions)e(should)g(result)g(in) f(the)i Fl(SSL)d Fn(b)s(eing)i(compiled,)e(the)j(utilities)c(b)s(eing)j (compiled,)0 2199 y(and)22 b(the)h(P)m(ortMaster)g(b)s(eing)e (compiled.)61 b(A)22 b Fe(simpleskts.a)f Fn(library)f(results.)41 b(Although)21 b(the)i(P)m(ortMaster)0 2320 y(gets)30 b(started)g(b)m(y)g(the)g(mak)m(e)g(instructions,)g(y)m(ou)g(ma)m(y)f (o)s(ccasionally)e(need)k(to)e(re-start)g(it)g(\(for)f(example,)0 2440 y(after)41 b(the)g(computer)f(go)s(es)h(do)m(wn\).)69 b(System)41 b(administrators)e(should)i(kno)m(w)h(ho)m(w)f(to)f(mo)s (dify)f(their)0 2560 y(op)s(erating)31 b(system)j(to)e(automatically)d (bring)j(up)h(the)g(P)m(ortMaster)g(during)f(a)h(re-b)s(o)s(ot.)146 2681 y(Users)h(ma)m(y)f(wish)f(to)h(place)615 2890 y(seten)m(v)i(SKTP) -8 b(A)g(TH)34 b(mac)m(hine:mac)m(hine:mac)m(hine...`)152 b(csh)34 b(users)615 3011 y(exp)s(ort)f(SKTP)-8 b(A)g(TH=mac)m (hine:mac)m(hine:mac)m(hine...`)100 b(ksh)34 b(users)615 3131 y(SKTP)-8 b(A)g(TH:==mac)m(hine:mac)m(hine:mac)m(hine...`)306 b(vms)33 b(users)615 3251 y(set)h(SKTP)-8 b(A)g(TH=mac)m(hine:mac)m (hine:mac)m(hine...`)256 b(msdos)33 b(users)0 3462 y(in)23 b(their)g(.login,)h(.pro\014le,)h(login.com,)e(and)h(auto)s(exec.bat)h (resp)s(ectiv)m(ely)-8 b(.)41 b(T)-8 b(o)24 b(link)f(to)g(the)h Fl(SSL)p Fn(,)f(one)h(m)m(ust)0 3583 y(include)j(\\so)s(c)m(k)m (ets.h".)44 b(F)-8 b(or)26 b(example,)j(under)f Fl(UNIX)p Fn(,)g(a)f(user)h(should)g(ha)m(v)m(e)h(a)e Fl(.HDR)h Fn(sub)s(directory)g(with)0 3703 y(all)i(his/her)j(fa)m(v)m(orite)f (header)i(\014les)e(and)h(use)g(\\)p Ff(cc)52 b(...)103 b(-I~/.HDR)54 b(...)e(simpleskts.a)p Fn(".)0 3991 y Fc(6.2)135 b(Vms)119 4175 y Fn(1.)49 b(Mak)m(e)37 b(a)e Ff(SKTS)h Fn(sub)s(directory)g(somewhere,)i(and)d(extract)h(the)g(con)m(ten)m(ts) h(of)e(the)h(tap)s(e)f(in)m(to)g(that)244 4296 y(sub)s(directory)-8 b(.)56 b(The)37 b(original)c(tap)s(e)k(w)m(as)g(a)g(quarter-inc)m(h)f (cartridge)g(in)g(Unix)g(tar)h(format,)f(but)244 4416 y(y)m(ou)d(ma)m(y)f(w)m(ell)g(receiv)m(e)i(a)e(di\013eren)m(t)h (format.)119 4617 y(2.)49 b(T)m(yp)s(e)34 b Ff(@makeskts)146 4835 y Fn(The)e(\\mak)m(eskts")f(command)f(script)g(will)e(create)k (sev)m(eral)f(sub)s(directories,)g(compile)d(the)j Fl(SSL)p Fn(,)f(and)0 4955 y(set)37 b(up)f(a)f(\\simpleskts.olb")g(library)-8 b(.)51 b(It)36 b(will)e Fg(not)i Fn(attempt)f(to)g(start)h(up)g(the)h (P)m(ortMaster.)54 b(Change)0 5076 y(to)29 b(the)g(\\)p Fl(EXE)p Fn(")g(sub)s(directory)g(under)h(the)g Fl(SKTS)d Fn(sub)s(directory)-8 b(.)43 b(The)30 b(P)m(ortMaster)g(should)f(b)s(e) g(started)0 5196 y(via)c Ff(run/detach)54 b(Spm)p Fn(;)29 b(y)m(ou)d(ma)m(y)g(or)f(ma)m(y)h(not)f(ha)m(v)m(e)i(su\016cien)m(t)g (privileges)e(to)g(do)h(so.)41 b(One)26 b(ma)m(y)g(spa)m(wn)0 5316 y(the)40 b(P)m(ortMaster,)j(but)d(as)f(so)s(on)h(as)g(y)m(ou)g (log)e(o\013)h(the)h(P)m(ortMaster)h(will)c(rudely)j(terminate.)64 b(Due)39 b(to)0 5437 y(the)32 b(p)s(oten)m(tial)f(problem)f(with)i (privileges,)f(the)h(command)f(script)h(will)d(not)j(start)g(up)g(the)h (P)m(ortMaster)0 5557 y(itself.)1901 5707 y(25)p eop end %%Page: 26 28 TeXDict begin 26 27 bop 146 407 a Fn(In)45 b(order)g(to)f(mak)m(e)h (use)h(of)e(command-line)d(argumen)m(ts)k(for)f(sktdbg,)49 b(etc,)f Fl(VMS)d Fn(requires)g(that)0 527 y(y)m(ou)i(\014rst)h(mak)m (e)e(\\logical)e(sym)m(b)s(ols.")85 b(In)47 b(y)m(our)h Ff()p Fn(,)53 b(place)46 b(the)h(follo)m(wing)e(lines)g (\(with)0 648 y(appropriately)31 b(mo)s(di\014ed)h Fl(YOURDIR)p Fn(\):)742 864 y($)g(spmc)m(hk)164 b(:==)99 b($[)p Fl(YOURDIR.SKTS.EXE) p Fn(]spmc)m(hk.exe)742 984 y($)32 b(spm)m(table)100 b(:==)f($[)p Fl(YOURDIR.SKTS.EXE)p Fn(]spm)m(table.exe)742 1105 y($)32 b(spm)309 b(:==)99 b($[)p Fl(YOURDIR.SKTS.EXE)p Fn(]spm.exe)742 1225 y($)32 b(srmsrvr)160 b(:==)99 b($[)p Fl(YOURDIR.SKTS.EXE)p Fn(]srmsrvr.exe)0 1497 y Fc(6.3)135 b(Windo)l(ws)46 b(95)f(\()g(or)g(more)h(recen)l(t\))0 1682 y Fn(As)36 b(of)f(V)-8 b(ersion)35 b(2.08,)h(the)g Fl(SSL)e Fn(runs)i(under)h(Windo)m(ws)f(95.)52 b(One)35 b(ma)m(y)h(ha)m(v)m(e)h(a)e(P)m(ortMaster)h(running)0 1803 y(in)29 b(the)h(bac)m(kground)g(on)g(those)g(mac)m(hines,)g(to)s (o!)42 b(Since)29 b(the)h(presen)m(t)h(author)e(only)g(has)h(Borland)f (C++,)0 1923 y(only)35 b(that)g(compiler)f(has)i(b)s(een)g(tested.)54 b(Other)36 b(compilers)e(ma)m(y)i(need)g(to)f(mo)s(dify)f(the)i Ff(<)p Fn(Sinit.c)p Ff(>)f Fn(\014le)0 2043 y(to)d(include)g(an)m(y)h Fl(TCP/IP)63 b Fn(initialization)27 b(they)33 b(ma)m(y)g(require.)119 2263 y(1.)49 b(Set)33 b(up)g(y)m(our)g(system)h(with)e(an)g (appropriate)g(C)h(compiler,)e(Ethernet)i(card,)g(and)g Fl(TCP/IP)d Fn(.)119 2464 y(2.)49 b(Cop)m(y)34 b(the)f(con)m(ten)m(ts)h (of)e()h(on)m(to)f(y)m(our)h(computer.)119 2665 y(3.)49 b(Use)33 b(gunzip)g(and)f(un)m(tar)h(to)f(get)h(the)g (uncompressed)h(\014les)119 2866 y(4.)49 b(Op)s(en)33 b(a)f Fl(MSDOS)g Fn(console,)h(c)m(hange)g(directory)g(to)f(...)p Ff(\\)p Fl(COSMIC)119 3067 y Fn(5.)49 b(mkwin95)146 3287 y(The)32 b Fa(smplskts.lib)g Fn(and)e(v)-5 b(arious)30 b Fa(*.exe)h Fn(\014les)f(should)g(b)s(e)h(generated)g(in)f(the)g Fl(COSMIC)f Fn(sub)s(directory)-8 b(.)0 3407 y(Y)g(ou)32 b(ma)m(y)h(w)m(ell)e(w)m(an)m(t)j(to)e(ha)m(v)m(e)i(the)f(Simple)d(So)s (c)m(k)m(ets)k(Library's)f(P)m(ortMaster)g(\(Spm\))f(alw)m(a)m(ys)h (running)0 3527 y(in)f(bac)m(kground.)44 b(T)-8 b(o)33 b(accomplish)e(this:)119 3747 y(1.)49 b(On)32 b(y)m(our)i(w)m(orkb)s (enc)m(h,)h(clic)m(k)d(the)h(righ)m(t)e(mouse)i(button)119 3948 y(2.)49 b(Select)33 b Fa(New)119 4149 y Fn(3.)49 b(Select)33 b Fa(Sho)m(rtcut)119 4350 y Fn(4.)49 b(Put)33 b(the)g(fully)e(sp)s(eci\014ed)j(path)e(to)g(Spm.exe)i(in)e(the)h Fa(Command)f(Line)h Fn(dialog)d(b)s(o)m(x.)119 4551 y(5.)49 b(Put)33 b Fa(Spm)g Fn(as)g(the)g(shortcut's)g(name)119 4753 y(6.)49 b(Righ)m(t-mouse)31 b(clic)m(k)h(on)h(the)g Fa(Spm)g Fn(shortcut)119 4954 y(7.)49 b(Select)33 b Fa(Prop)s(erties) 119 5155 y Fn(8.)49 b(Select)33 b(the)g Fa(Sho)m(rtcut)h Fn(tab)119 5356 y(9.)49 b(In)33 b(the)g Fa(Run)f Fn(dialog,)e(left)i (mouse)h(clic)m(k)f(on)h(the)g(do)m(wn)g(arro)m(w)g(and)f(select)h Fa(minimized)p Fn(.)70 5557 y(10.)49 b(Bring)31 b(up)i(Explorer)1901 5707 y(26)p eop end %%Page: 27 29 TeXDict begin 27 28 bop 70 407 a Fn(11.)49 b(Clic)m(k)32 b(on)h(the)g Ff(+)f Fn(in)g(the)h(left)f(hand)h(windo)m(w)g(near)g Fa(Windo)m(ws)70 610 y Fn(12.)49 b(Clic)m(k)32 b(on)h(the)g Ff(+)f Fn(in)g(the)h(left)f(hand)h(windo)m(w)g(near)g Fa(Sta)m(rt)g(Menu)70 814 y Fn(13.)49 b(Clic)m(k)32 b(on)h(the)g Ff(+)f Fn(in)g(the)h(left)f(hand)h(windo)m(w)g(near)g Fa(Programs)70 1017 y Fn(14.)49 b(Double)32 b(clic)m(k)g(on)g Fa(Sta)m(rtUp)70 1220 y Fn(15.)49 b(Put)35 b(the)g(mouse)g(cursor)g(on) f(the)h Fa(Spm)g Fn(shortcut;)i(press)f(the)f(righ)m(t)f(mouse)g (button)h(and)g(drag)f(it)244 1341 y(o)m(v)m(er)g(the)f(righ)m(t)e (hand)i(Explorer)g(windo)m(w.)70 1544 y(16.)49 b(Select)28 b Fa(Cop)m(y)f(Here)p Fn(.)43 b(Y)-8 b(ou)27 b(will)e(no)m(w)j(need)h (to)e(re-b)s(o)s(ot)f(y)m(our)i(mac)m(hine)f(for)g(this)g(op)s(eration) f(to)h(tak)m(e)244 1665 y(e\013ect.)0 1953 y Fc(6.4)135 b(Older)46 b(Ms-Dos)0 2138 y Fn(The)23 b Fl(SSL)d Fn(w)m(as)j(compiled) d(and)i(tested)h(using)e(the)h(W)-8 b(ollongong)19 b Fl(TCP/IP)42 b Fn(pac)m(k)-5 b(age)22 b(with)f(MicroSoft)g(C)h (\(v6.0\).)0 2259 y(Other)30 b(compilers)f(and)h Fl(TCP/IP)57 b Fn(pac)m(k)-5 b(ages)31 b(ma)m(y)f(require)g(adjustmen)m(t)h(to)e (the)i Fl(SSL)e Fn(co)s(de.)43 b(Y)-8 b(ou)30 b Fg(m)m(ust)0 2379 y Fn(ha)m(v)m(e)k(a)e Fl(TCP/IP)d Fn(pac)m(k)-5 b(age)33 b(for)f(y)m(our)h(mac)m(hine,)f(ho)m(w)m(ev)m(er)i({)e(that)h (is)e(what)i(pro)m(vides)g(Berk)m(eley)h(so)s(c)m(k)m(ets)0 2499 y(o)m(v)m(er)39 b(whic)m(h)f(the)g Fl(SSL)f Fn(pro)m(vides)i(a)e (con)m(v)m(enien)m(t)j(o)m(v)m(erla)m(y)-8 b(.)60 b(Also,)38 b(y)m(ou)h Fg(m)m(ust)e Fn(ha)m(v)m(e)i(an)f(Ethernet)h(card)0 2620 y(for)f(y)m(our)i(mac)m(hine)e({)h(that)f(pro)m(vides)i(the)f (hardw)m(are)h(o)m(v)m(er)g(whic)m(h)f(the)h(information)35 b(\015o)m(ws.)64 b(Neither)0 2740 y(the)33 b Fl(TCP/IP)62 b Fn(pac)m(k)-5 b(age,)33 b(the)g(C)g(compiler,)e(nor)h(the)h(Ethernet) h(hardw)m(are)g(come)e(with)g(the)h Fl(SSL)p Fn(.)119 2968 y(1.)49 b(The)35 b Fl(SSL)f Fn(mak)m(es)h(sev)m(eral)h (assumptions,)f(unfortunately)-8 b(,)35 b(ab)s(out)f(where)i(include)e (\014les)g(are)h(\(ex.)244 3089 y(see)45 b Fe(Sp)-5 b(e)g(ek.c)6 b Fn(\).)78 b(The)46 b(installer)c(will)g(undoubtedly)j(need)h(to)e (customize)g(these)i(include)e(lines.)244 3209 y(These)34 b(areas)f(will)d(alw)m(a)m(ys)j(b)s(e)g(in)f Ff(#ifdef)53 b(MSDOS)34 b Fn(...)43 b Ff(#endif)35 b Fn(zones.)119 3413 y(2.)49 b(Acquire)33 b(a)f Fl(TCP/IP)e Fn(pac)m(k)-5 b(age)33 b(for)f(y)m(our)h(computer)g(\(ie.)f(W)-8 b(ollongong\).)119 3616 y(3.)49 b(Acquire)33 b(a)f(C)h(compiler)e(for)h(y)m(our)h (computer)g(\(ie.)f(Microsoft)g(C,)h(v6.0\).)119 3819 y(4.)49 b(Acquire)33 b(an)f(Ethernet)i(card)f(and)g Fl(TCP/IP)62 b Fn(address)34 b(for)e(y)m(our)h(computer.)119 4023 y(5.)49 b(Cop)m(y)34 b(the)f(con)m(ten)m(ts)h(of)e(the)h(pro)m(vided)g (disk)m(ette)h(in)m(to)e(y)m(our)h(sub)s(directory)-8 b(.)119 4226 y(6.)49 b(F)-8 b(or)32 b(those)h(of)f(y)m(ou)h(with)f(the) h(soft)m(w)m(are)h(men)m(tioned)e(in)g(T)-8 b(able)32 b(5:)285 4430 y(\(a\))48 b(Mak)m(e)34 b(a)f(directory:)43 b Ff(c:\\c600\\socket)280 4591 y Fn(\(b\))48 b(Mak)m(e)34 b(a)f(directory:)43 b Ff(c:\\c600\\socket\\exe)290 4753 y Fn(\(c\))49 b(Cop)m(y)34 b Fe(wintcp.lib)e Fn(to)g Ff(c:\\c600\\socket)280 4915 y Fn(\(d\))48 b(Cop)m(y)34 b Fe(so)-5 b(cket.lib)32 b Fn(to)g Ff(c:\\c600\\socket)290 5077 y Fn(\(e\))49 b(Cop)m(y)34 b Fe(slib)-5 b(c)g(e.lib)31 b Fn(to)i Ff(c:\\c600\\socket)297 5239 y Fn(\(f)7 b(\))48 b(Disable)c(the)i Fl(MSDOS)f Fn(link)m(er)g({)g(p)s(ossibly)g(b)m(y)i (renaming)d(it)g(to)i Fe(doslink)p Fn(.)81 b(Use)46 b(the)g(Mi-)458 5359 y(croSoft)33 b(C)g(link)m(er)f(instead.)285 5521 y(\(g\))48 b(Return)33 b(to)g(the)g(directory)f(where)i(y)m(ou)f (placed)g(the)g Fl(SSL)e Fn(soft)m(w)m(are.)1901 5707 y(27)p eop end %%Page: 28 30 TeXDict begin 28 29 bop 280 407 a Fn(\(h\))48 b(T)m(yp)s(e)36 b Fe(makeskt)d Fn(\(whic)m(h)h(will)e(use)j(the)f Fe(Makeskt.b)-5 b(at)33 b Fn(command)g(script\).)47 b(This)34 b(script)g(will)458 527 y(use)49 b Fe(Makelib.)p Fn(,)h(compile,)g(create)e(the)g Fe(smplskts.lib)e Fn(library)-8 b(,)49 b(and)f(generate)g Fe(sktdb)-5 b(g.exe)p Fn(,)458 648 y Fe(spmtable.exe)p Fn(,)32 b(and)g Fe(srmsrvr.exe)p Fn(.)307 809 y(\(i\))47 b(Y)-8 b(ou)33 b(should)f(b)s(e)h(done)g(installing)c(the)k(soft)m(w)m (are)h(at)e(this)h(p)s(oin)m(t.)119 1013 y(7.)49 b(If)23 b(y)m(our)h(compiler)d(is)h(not)h Fl(ANSI)e(C)i Fn(complian)m(t,)g(but) g(supp)s(orts)h(protot)m(yping,)h(edit)d(the)i Ff(sockets.h)244 1133 y Fn(\014le)32 b(to)g(de\014ne)p 808 1133 28 4 v 840 1133 V 100 w Fl(PR)m(OTOTYPE)p 1465 1133 V 1497 1133 V 96 w Fn(for)g(y)m(our)i(mac)m(hine.)119 1337 y(8.)49 b(F)-8 b(ollo)m(w)26 b(y)m(our)j(compiler's)e(directions)g(to)h (compile)e(to)i(ob)5 b(ject)29 b(\014le)f(format)e(all)g(the)j(C)f (\014les)h(in)e Ff(SKTS)244 1457 y Fn(and)33 b Ff(SKTS\\EXE)p Fn(.)119 1660 y(9.)49 b(F)-8 b(ollo)m(w)32 b(y)m(our)k(compiler's)d (directions)h(to)g(set)h(up)g(a)f(\\library")f(\(a)h Ff(.LIB)h Fn(\014le\))f(with)h(all)d(the)j Ff(.OBJ)244 1781 y Fn(\014les)e(in)e(the)i Ff(SKTS)h Fn(sub)s(directory)-8 b(.)70 1984 y(10.)49 b(Change)37 b(to)f(the)h Ff(SKTS\\EXE)i Fn(sub)s(directory)e(and)g(follo)m(w)d(y)m(our)k(compiler's)d (instructions)h(to)g(link)244 2105 y(eac)m(h)26 b(of)f(the)g(ob)5 b(ject)26 b(\014les,)h(one)f(at)e(a)h(time,)h(to)f(the)g (\\smplskts.lib")f(library)-8 b(,)25 b(the)h Fl(TCP/IP)48 b Fn(library)-8 b(,)244 2225 y(and)33 b(whatev)m(er)h(libraries)c(y)m (our)k(compiler)c(normally)g(needs.)146 2453 y(The)j(installation)c (should)j(yield)f(a)h Fe(smplskts.lib)f Fn(\(or)h(something)f (similar\))e(library)h(and)i(three)h(exe-)0 2574 y(cutable)f(\014les)h (\(sktdbg.exe,)i(spm)m(table.exe,)e(and)g(spm)m(table.exe\).)146 2694 y(Note)h(that)f(the)h(\\)p Fl(SPM.EXE)p Fn(")e(\014le)h(should)g (not)h(b)s(e)f(generated;)i(y)m(ou)f(could)f(generate)h(and)f(execute)0 2814 y(it,)j(but)h(y)m(our)g(clone)f(could)f(not)h(use)i(it)d(as)h(it)f (do)s(es)i(not)f(allo)m(w)f(the)i(P)m(ortMaster)g(to)f(run)g(in)g(the)g (bac)m(k-)0 2935 y(ground.)66 b(No)40 b(attempt)f(has)h(b)s(een)h(made) f(to)f(insure)h(that)g(the)h(P)m(ortMaster)g(is)e(actually)g (compilable)0 3055 y(under)e(MicroSoft)e(C,)i(either.)53 b(Someda)m(y)37 b(a)f(kludge)g(to)f(allo)m(w)g(MS-DOS)h(programs)f(to)g (b)s(e)i(their)e(o)m(wn)0 3176 y(P)m(ortMaster)30 b(ma)m(y)g(b)s(e)f (dev)m(elop)s(ed,)i(but)f(that)f(da)m(y)h(is)e(not)i(y)m(et.)43 b(Using)29 b(W)-8 b(ollongong)27 b Fl(TCP/IP)f Fn(,)k(one)f(will)0 3296 y(b)s(e)k(restricted)g(to)f(three)h(\(or)g(\014v)m(e)g(if)f(its)g (\\k)m(ernel")h(is)f(rebuilt\))f(clien)m(ts.)146 3416 y(The)40 b(soft)m(w)m(are)f(in)f(T)-8 b(able)39 b(5)f(w)m(as)h(used)h (b)m(y)g(the)f Fl(IRL)f Fn(and)g(is)g(kno)m(wn)i(to)f(w)m(ork)g(prop)s (erly)f(with)h(the)0 3537 y Fl(SSL)p Fn(.)31 b(Other)i(soft)m(w)m(are)h (ma)m(y)e(w)m(ork)i(but)f(has)f(not)h(b)s(een)g(tested.)1901 5707 y(28)p eop end %%Page: 29 31 TeXDict begin 29 30 bop 0 407 a Fh(7)161 b(App)t(endix:)71 b(Miscellaneous)55 b(F)-13 b(unctions)0 626 y Fn(The)41 b Fl(SSL)e Fn(uses)j(nine)e(functions)g(from)f(Dr.)h(Campb)s(ell's)f Fe(xtdio)h Fn(library;)i(these)g(ha)m(v)m(e)f(b)s(een)g(gathered)0 746 y(together)f(and)g(made)g(part)g(of)f(the)i Fe(simpleskts.a)d Fn(library)-8 b(.)65 b(Sev)m(eral)40 b(of)g(the)g(functions)g(use)h(a)f (sp)s(ecial)0 867 y(data)32 b(\014le,)g Fe(r)-5 b(dc)g(olor.dat)p Fn(.)146 987 y(Note:)47 b(the)34 b Fe(err)-5 b(or)34 b Fn(and)g Fe(outofmem)g Fn(functions)g(claim)e(they)j(will)c (\\terminate")i(under)i(certain)e(con-)0 1107 y(ditions.)56 b(Actually)-8 b(,)37 b(they)h(will)c(call)i(the)h(function)g Fe(\(*err)-5 b(or)p 2256 1107 30 4 v 35 w(exit\)\(int)39 b(rtn\))p Fn(,)f(whic)m(h)g(b)m(y)g(default)e(is)h(the)0 1228 y Fe(exit)e Fn(function.)51 b(Programmers)34 b(ma)m(y)h(easily)g (prev)m(en)m(t)i(or)e(otherwise)h(con)m(trol)e(termination)f(b)m(y)j (simply)0 1348 y(setting)c Fe(err)-5 b(or)p 539 1348 V 36 w(exit)33 b Fn(to)f(p)s(oin)m(t)f(to)i(some)f(other)h(function.)0 1540 y Fg(v)m(oid)k(error\(in)m(t)e(sev)m(erit)m(y)-9 b(,c)m(har)37 b(*fm)m(t,...\))70 b Fn(The)23 b Fe(err)-5 b(or)22 b Fn(function)f(prin)m(ts)h(out)g(an)g(error,)i(w)m(arning,)g (or)244 1660 y(note)29 b(t)m(yp)s(e)g(of)f(message)i(to)e(stdout.)43 b(This)28 b(function)h(tak)m(es)g(four)g(kinds)g(of)f(\\sev)m(erit)m (y":)43 b Fl(SEVERE)p Fn(,)244 1780 y Fl(ERR)m(OR)p Fn(,)33 b Fl(W)-10 b(ARNING)p Fn(,)35 b(and)e Fl(NOTE)p Fn(.)g(Both)g(the)h Fl(SEVERE)f Fn(and)g Fl(ERR)m(OR)h Fn(lev)m(els)f(will)e Fe(terminate)244 1901 y Fn(the)k(program.)48 b(The)36 b(other)f(t)m(w)m(o,)h Fl(W)-10 b(ARNING)35 b Fn(and)g Fl(NOTE)p Fn(,)f(will)f(not)h(do)h(so.)50 b(The)35 b(termination)244 2021 y(action)45 b(tends)i(to)f(enforce)h(a)f(standard)g(for)g(what)g (errors)h(v)m(ersus)h(w)m(arnings)e(mean!)84 b(If)46 b(y)m(our)244 2142 y(terminal)39 b(t)m(yp)s(e)k(is)f(supp)s(orted)h(b)m (y)g(the)f Fe(r)-5 b(dc)g(olor.dat)41 b Fn(\014le)h(\(see)h(rdcolor)e (b)s(elo)m(w\),)j Fl(SEVERE)d Fn(and)244 2262 y Fl(ERR)m(OR)32 b Fn(messages)g(are)g(prin)m(ted)g(with)g(a)g(red)g(leader,)g Fl(W)-10 b(ARNING)p Fn(s)33 b(with)f(a)f(y)m(ello)m(w)h(leader,)g(and) 244 2382 y Fl(NOTE)p Fn(s)g(with)g(a)h(cy)m(an)g(leader.)0 2577 y Fg(FILE)k(*fop)s(en)m(v\(c)m(har)i(*\014lename,c)m(har)e (*ctrl,c)m(har)f(*en)m(v)p 2437 2577 34 4 v 41 w(v)-6 b(ar\))93 b Fn(The)45 b Fe(fop)-5 b(env)43 b Fn(pro)m(vides)i(a)e (\014le)244 2697 y(op)s(ening)30 b(service)i(akin)e(to)h(that)f(pro)m (vided)i(b)m(y)g(the)f Fe(Sop)-5 b(env)30 b Fn(function)g(for)g(the)i Fl(SSL)p Fn(.)d(The)j Fe(fop)-5 b(en\(\))244 2817 y Fn(function)38 b(will)f(b)s(e)i(used)i(with)d(the)i(giv)m(en)f(\014lename)f(and)h (ctrl)g(strings,)h(and)f(up)s(on)h(failure,)f(the)244 2938 y(en)m(vironmen)m(t)31 b(v)-5 b(ariable)29 b(in)g Fe(env)p 1429 2938 30 4 v 36 w(var)h Fn(will)e(b)s(e)j(used)g(lik)m(e)f (a)g Fl(P)-8 b(A)g(TH)32 b Fn(v)-5 b(ariable)28 b(in)i(attempts)h(to)f (op)s(en)244 3058 y(the)39 b(\014le)g(in)f(one)h(directory)f(after)h (another)g(\(un)m(til)e(success\).)65 b(If)39 b(none)g(of)g(the)g Fe(fop)-5 b(en)7 b Fn(s)39 b(succeed,)244 3178 y(then)33 b(the)g Fe(fop)-5 b(env)32 b Fn(function)g(will)e(return)j(a)f Fl(NULL)h Fn(p)s(oin)m(ter.)0 3373 y Fg(v)m(oid)k(outofmem\(v)m(oid)e (*ptr,c)m(har)j(*fm)m(t,...\))76 b Fn(The)29 b Fe(outofmem)f Fn(function)g(c)m(hec)m(ks)j(if)c Fe(ptr)i Fn(is)f Fl(NULL)p Fn(;)244 3493 y(if)j(it)h(is)g(not,)g(the)h(function)g(immediately)c (returns.)244 3650 y(Ho)m(w)m(ev)m(er,)g(if)24 b(the)i Fe(ptr)f Fn(p)s(oin)m(ter)g(is)g(in)g(fact)g Fl(NULL)p Fn(,)g(then)h(the)g Fe(fmt)f Fn(and)g(an)m(y)h(subsequen)m(t)j(argumen) m(ts)244 3771 y(will)g(b)s(e)j(used)g(lik)m(e)f(a)g(regular)g(prin)m (tf)g(to)g(giv)m(e)g(a)h(message)f(to)h(the)g(user.)44 b(The)32 b(program)e(will)f(then)244 3891 y(terminate.)0 4085 y Fg(v)m(oid)37 b(rdcolor\(v)m(oid\))90 b Fn(This)45 b(function)e(reads)i(the)g Fe(r)-5 b(dc)g(olor.dat)43 b Fn(\014le,)k(whic)m(h)e(essen)m(tially)f(is)g(an)g(ex-)244 4206 y(tended)h(\\termcap")e(\014le.)77 b(It)44 b(uses)h(the)f (\\RDCOLOR")e(en)m(vironmen)m(t)j(v)-5 b(ariable)42 b(with)h Fe(fop)-5 b(env)244 4326 y Fn(to)38 b(searc)m(h)h(for)f(the)g Fe(r)-5 b(dc)g(olor.dat)38 b Fn(\014le.)59 b(The)39 b(function)f(uses)i (that)d(\014le)h(to)g(set)h(up)f(v)-5 b(arious)38 b(string)244 4446 y(v)-5 b(ariables)31 b(\()p Fl(RED)p Fn(,)i Fl(CLEAR)p Fn(,)f({)g(see)i(b)s(elo)m(w\).)0 4641 y Fg(v)m(oid)j(rdcputs\(c)m(har) g(*s,FILE)h(*fp\))79 b Fn(This)30 b(function)f(puts)i(a)e(string)h(out) f(to)h(the)g Fl(FILE)g Fn(p)s(oin)m(ter)f Fe(fp)p Fn(,)244 4761 y(except)37 b(that)f(those)g(strings)g(\()p Fl(XRED)p Fn(,)g Fl(XUWHITE)p Fn(,)g(etc.\))54 b(are)36 b(in)m(terpreted)g(using) g(the)g Fe(r)-5 b(dc)g(olor)p Fn(-)244 4881 y(pro)m(vided)33 b(string)f(instead.)0 5076 y Fg(c)m(har)38 b(*sprt\(c)m(har)f(*s\))94 b Fn(This)46 b(function)g(returns)h(a)f(p)s(oin)m(ter)f(to)h(a)f (static)h(bu\013er)h(\(there)f(are)g(four)244 5196 y(of)d(them\).)77 b(The)45 b(string)e Fe(s)g Fn(has)i(all)c(of)j(its)f(c)m(haracters)i (made)e(in)m(to)g(\\visible")f(forms:)66 b(con)m(trol)244 5316 y(c)m(haracters)30 b(b)s(ecome)1063 5291 y(^)1050 5316 y(A)g(through)1523 5291 y(^)1518 5316 y(Z)f(and)g(c)m(haracters)h (with)f Fl(ANSI)g Fn(v)-5 b(alues)29 b(greater)g(than)g(or)g(equal)244 5437 y(to)37 b(128)g(are)g(made)g(in)m(to)g Ff(~###)h Fn(sequences.)61 b(Characters)39 b(whic)m(h)f(are)f(normally)e(visible) h(are)i(left)244 5557 y(unc)m(hanged.)1901 5707 y(29)p eop end %%Page: 30 32 TeXDict begin 30 31 bop 0 407 a Fg(v)m(oid)37 b(srm)m(trblk\(c)m(har)e (*s\))83 b Fn(This)34 b(function)g(remo)m(v)m(es)h(an)m(y)g(trailing)30 b(\\blanks")k(\(white)g(space\))h(from)244 527 y(the)e(end)g(of)f(a)h (string.)0 731 y Fg(c)m(har)38 b(*stpblk\(c)m(har)e(*p\))80 b Fn(This)32 b(function)e(returns)i(a)f(p)s(oin)m(ter)g(to)g(the)g (\014rst)h(non-white)f(space)h(c)m(har-)244 851 y(acter)h(in)f(the)h (string)e Fe(p)i Fn(\(ie.)f(steps)i(past)f(blanks\).)0 1054 y Fg(c)m(har)38 b(*stpnxt\(c)m(har)f(*s,c)m(har)h(*fm)m(t\))83 b Fn(This)35 b(function)g(returns)h(a)g(p)s(oin)m(ter)e(to)h(the)h (\014rst)g(c)m(haracter)244 1175 y(in)e Fe(s)h Fn(whic)m(h)g(w)m(ould)g (not)g(ha)m(v)m(e)h(b)s(een)g(read)f(b)m(y)h(a)f Fe(ssc)-5 b(anf\(s,fmt,...\))48 b Fn(function.)j(Useful)35 b(for)f(quic)m(k)244 1295 y(and)f(dirt)m(y)f(parsing.)0 1499 y Fg(c)m(har)38 b(*strnxtfm)m(t\(c)m(har)d(*fm)m(t\))84 b Fn(The)37 b Fe(strnxtfmt)g Fn(function)f(returns)h(a)f(p)s(oin)m(ter)g(to)g(the)g (b)s(eginning)244 1619 y(of)29 b(the)h(\(next\))h(format)d(co)s(de)j (substring.)42 b(If)30 b Fe(fmt)g Fn(is)f Fl(NULL)p Fn(,)h(then)g(the)h (previous)f(format)e(string)h(is)244 1739 y(used)h(\(ie.)e(a)h(p)s(oin) m(ter)f(to)h(the)g(last)f Fe(fmt)h Fn(co)s(de)g(is)f(retained)h(and)g (the)g(a)g(p)s(oin)m(ter)f(to)g(the)i(next)f(format)244 1860 y(co)s(de)40 b(p)s(oin)m(ter)g(will)d(b)s(e)k(returned\).)66 b(This)41 b(function)e(b)s(ears)i(some)f(similarit)m(y)c(to)k Fl(strtok)g Fn(except)244 1980 y(that)32 b(it)g(jumps)g(from)g(format)f (co)s(de)i(to)f(format)f(co)s(de)i(\(used)g(b)m(y)h(Sscanf)7 b(\).)146 2208 y(The)31 b Fe(r)-5 b(dc)g(olor.dat)38 b Fn(\014le)29 b(describ)s(es)i(terminal)c(escap)s(e)k(sequences)h(to)e (use)g(to)f(con)m(trol)g(color)f(and)i(a)f(few)0 2329 y(other)38 b(actions.)57 b(Eac)m(h)39 b(line)d(whic)m(h)i(do)s(es)g (not)f(b)s(egin)g(with)g(a)g(white)g(space)i(c)m(haracter)f(is)f (assumed)h(to)0 2449 y(b)s(e)c(a)g(terminal)e(line:)45 b(terminal)31 b(t)m(yp)s(es)36 b(are)e(separated)h(b)m(y)g(v)m(ertical) e(bars)h(and)g(the)h(line)d(is)i(terminated)0 2570 y(b)m(y)f(a)g (colon.)42 b(There)34 b(are)f(a)f(n)m(um)m(b)s(er)h(of)f(strings)h (de\014ned)h(\(see)f(T)-8 b(able)33 b(6\).)146 2690 y(Escap)s(e)23 b(sequences)i(ma)m(y)d(include)f(the)h(sequence)i Ff(\\e)f Fn(for)e(the)h Fl(ESCAPE)f Fn(c)m(haracter)h(and)g Ff(\\b)g Fn(for)f(a)h(blank.)0 2810 y(Please)33 b(see)h(the)f Fe(r)-5 b(dc)g(olor.dat)31 b Fn(\014le)i(for)f(examples.)1901 5707 y(30)p eop end %%Page: 31 33 TeXDict begin 31 32 bop 1132 1043 a Fn(T)-8 b(able)32 b(3:)43 b Fg(The)38 b(P)m(ortMaster)f(Proto)s(col)p 613 1175 2675 4 v 613 1191 V 611 1312 4 121 v 628 1312 V 947 1275 a Fe(Event)p 1506 1312 V 391 w(Client)d(Sends)p 2187 1312 V 231 w(PortMaster)i(Sends)p 3269 1312 V 3286 1312 V 613 1315 2675 4 v 613 1331 V 611 1452 4 121 v 628 1452 V 679 1416 a Fl(PM)p 829 1416 28 4 v 33 w(CLIENT)p 1506 1452 4 121 v 2187 1452 V 3269 1452 V 3286 1452 V 611 1572 V 628 1572 V 1506 1572 V 2187 1572 V 2239 1536 a(PM)p 2389 1536 28 4 v 33 w(OK)30 b(/)g(PM)p 2814 1536 V 33 w(RESEND)p 3269 1572 4 121 v 3286 1572 V 611 1693 V 628 1693 V 1506 1693 V 1558 1656 a Fn("sktname")p 2187 1693 V 3269 1693 V 3286 1693 V 611 1813 V 628 1813 V 1506 1813 V 2187 1813 V 2239 1777 a Fl(PM)p 2389 1777 28 4 v 33 w(OK)g(/)g(PM)p 2814 1777 V 33 w(SORR)-8 b(Y)p 3269 1813 4 121 v 3286 1813 V 611 1933 V 628 1933 V 1506 1933 V 2187 1933 V 2239 1897 a Fn(p)s(ort)p 3269 1933 V 3286 1933 V 613 1937 2675 4 v 611 2057 4 121 v 628 2057 V 679 2021 a Fl(PM)p 829 2021 28 4 v 33 w(CLIENTW)e(AIT)p 1506 2057 4 121 v 2187 2057 V 3269 2057 V 3286 2057 V 611 2177 V 628 2177 V 1506 2177 V 2187 2177 V 2239 2141 a(PM)p 2389 2141 28 4 v 33 w(OK)30 b(/)g(PM)p 2814 2141 V 33 w(RESEND)p 3269 2177 4 121 v 3286 2177 V 611 2298 V 628 2298 V 1506 2298 V 1558 2262 a Fn("sktname")p 2187 2298 V 3269 2298 V 3286 2298 V 611 2418 V 628 2418 V 1506 2418 V 2187 2418 V 2239 2382 a Fl(PM)p 2389 2382 28 4 v 33 w(OK)g(/)g(PM)p 2814 2382 V 33 w(SORR)-8 b(Y)p 3269 2418 4 121 v 3286 2418 V 611 2539 V 628 2539 V 1506 2539 V 2187 2539 V 2239 2502 a Fn(p)s(ort)p 3269 2539 V 3286 2539 V 613 2542 2675 4 v 611 2662 4 121 v 628 2662 V 679 2626 a Fl(PM)p 829 2626 28 4 v 33 w(CLOSE)p 1506 2662 4 121 v 2187 2662 V 3269 2662 V 3286 2662 V 611 2783 V 628 2783 V 1506 2783 V 2187 2783 V 2239 2747 a(PM)p 2389 2747 28 4 v 33 w(OK)30 b(/)g(PM)p 2814 2747 V 33 w(RESEND)p 3269 2783 4 121 v 3286 2783 V 611 2903 V 628 2903 V 1506 2903 V 1558 2867 a Fn(p)s(ort)p 2187 2903 V 3269 2903 V 3286 2903 V 611 3023 V 628 3023 V 1506 3023 V 2187 3023 V 2239 2987 a Fl(PM)p 2389 2987 28 4 v 33 w(OK)g(/)g(PM)p 2814 2987 V 33 w(SORR)-8 b(Y)p 3269 3023 4 121 v 3286 3023 V 613 3027 2675 4 v 611 3147 4 121 v 628 3147 V 679 3111 a(PM)p 829 3111 28 4 v 33 w(QUIT)p 1506 3147 4 121 v 2187 3147 V 3269 3147 V 3286 3147 V 611 3268 V 628 3268 V 1506 3268 V 2187 3268 V 2239 3231 a(PM)p 2389 3231 28 4 v 33 w(OK)30 b(/)g(PM)p 2814 3231 V 33 w(RESEND)p 3269 3268 4 121 v 3286 3268 V 611 3388 V 628 3388 V 1506 3388 V 1558 3352 a Fn("P)m(ortMaster")p 2187 3388 V 3269 3388 V 3286 3388 V 613 3391 2675 4 v 611 3512 4 121 v 628 3512 V 679 3476 a Fl(PM)p 829 3476 28 4 v 33 w(SER)-10 b(VER)p 1506 3512 4 121 v 2187 3512 V 1015 w(PM)p 2389 3476 28 4 v 33 w(OK)30 b(/)g(PM)p 2814 3476 V 33 w(RESEND)p 3269 3512 4 121 v 3286 3512 V 611 3632 V 628 3632 V 1506 3632 V 1558 3596 a Fn("sktname")p 2187 3632 V 3269 3632 V 3286 3632 V 611 3752 V 628 3752 V 1506 3752 V 1558 3716 a(p)s(ort)p 2187 3752 V 3269 3752 V 3286 3752 V 611 3873 V 628 3873 V 1506 3873 V 2187 3873 V 2239 3837 a Fl(PM)p 2389 3837 28 4 v 33 w(OK)g(/)g(PM)p 2814 3837 V 33 w(SORR)-8 b(Y)p 3269 3873 4 121 v 3286 3873 V 613 3876 2675 4 v 611 3996 4 121 v 628 3996 V 1506 3996 V 1558 3960 a(PM)p 1708 3960 28 4 v 32 w(OK)p 2187 3996 4 121 v 3269 3996 V 3286 3996 V 613 4000 2675 4 v 611 4120 4 121 v 628 4120 V 679 4084 a(PM)p 829 4084 28 4 v 33 w(T)g(ABLE)p 1506 4120 4 121 v 2187 4120 V 3269 4120 V 3286 4120 V 611 4241 V 628 4241 V 1506 4241 V 2187 4241 V 2239 4204 a(PM)p 2389 4204 28 4 v 33 w(OK)30 b(/)g(PM)p 2814 4204 V 33 w(RESEND)p 3269 4241 4 121 v 3286 4241 V 611 4361 V 628 4361 V 1506 4361 V 2187 4361 V 2239 4325 a Fn(coun)m(t)j(of)f(serv)m(ers)p 3269 4361 V 3286 4361 V 611 4481 V 628 4481 V 1506 4481 V 2187 4481 V 2239 4445 a("serv)m(er)i(:)43 b(p)s(ort")p 3269 4481 V 3286 4481 V 611 4602 V 628 4602 V 1506 4602 V 2187 4602 V 2239 4566 a(...)p 3269 4602 V 3286 4602 V 613 4605 2675 4 v 611 4725 4 121 v 628 4725 V 679 4689 a Fl(PM)p 829 4689 28 4 v 33 w(FWINIT)p 1506 4725 4 121 v 2187 4725 V 3269 4725 V 3286 4725 V 611 4846 V 628 4846 V 1506 4846 V 2187 4846 V 2239 4810 a(PM)p 2389 4810 28 4 v 33 w(OK)30 b(/)g(PM)p 2814 4810 V 33 w(RESEND)p 3269 4846 4 121 v 3286 4846 V 613 4849 2675 4 v 613 4866 V 1901 5707 a Fn(31)p eop end %%Page: 32 34 TeXDict begin 32 33 bop 1363 716 a Fn(T)-8 b(able)32 b(4:)44 b(sktdbg)33 b(Help)f(Men)m(u)0 837 y Ff(Socket)53 b(Test)f(Commands)103 957 y(accept)103 1077 y(close)103 1198 y(fwinit)103 1318 y(fput)103 1438 y(get)103 1559 y(menu)103 1679 y(peek)103 1800 y(printf)103 1920 y(put)103 2040 y(q)103 2161 y(quit)103 2281 y(read)103 2401 y(rmsrvr)103 2522 y(scanf)103 2642 y(shutdown)103 2763 y(table)103 2883 y(test)103 3003 y(wait)103 3124 y(write)103 3244 y(?)0 3365 y(\()154 b(0)52 b(bytes\))g(Enter:)622 4342 y Fn(T)-8 b(able)33 b(5:)43 b Fg(Ms-Dos)38 b(Soft)m(w)m(are)g(kno)m(wn) g(to)f(w)m(ork)g(with)f(the)i Fm(SSL)927 4434 y Fe(Softwar)-5 b(e)34 b(Pr)-5 b(o)g(duct)785 b(Comp)-5 b(any)656 4554 y Fn(MicroSoft)32 b(C,)h(v6.0)610 b(MicroSoft)656 4675 y Fl(Win/API)32 b Fn(for)g Fl(DOS)p Fn(,)g(v4.1)381 b(The)33 b(W)-8 b(ollongong)30 b(Group,)i(Inc.)2022 4795 y(PO)g(Bo)m(x)h(51860) 2022 4916 y(P)m(alo)e(Alto,)h(CA)h(94303-4374)2022 5036 y(\(415\)-962-7100)656 5156 y(W)-8 b(ollongong)30 b(Win/)p Fl(TCP)p Fn(,)h(v4.1.1)100 b(The)33 b(W)-8 b(ollongong)30 b(Group,)i(Inc.)1901 5707 y(32)p eop end %%Page: 33 35 TeXDict begin 33 34 bop 1366 1053 a Fn(T)-8 b(able)32 b(6:)43 b(rdcolor.dat)32 b(strings)p 509 1084 2883 4 v 509 1101 V 507 1221 4 121 v 524 1221 V 575 1185 a Fe(String)j(Name)p 1225 1221 V 162 w(F)-7 b(unction)p 3373 1221 V 3390 1221 V 509 1224 2883 4 v 507 1345 4 121 v 524 1345 V 575 1309 a Fl(BLA)m(CK)p 1225 1345 V 379 w Fn(subsequen)m(t)35 b(c)m(hars)f(are)e(blac)m(k)p 3373 1345 V 3390 1345 V 507 1465 V 524 1465 V 575 1429 a Fl(RED)p 1225 1465 V 504 w Fn(subsequen)m(t)j(c)m(hars)f(are)e(red)p 3373 1465 V 3390 1465 V 507 1585 V 524 1585 V 575 1549 a Fl(GREEN)p 1225 1585 V 372 w Fn(subsequen)m(t)j(c)m(hars)f(are)e(green)p 3373 1585 V 3390 1585 V 507 1706 V 524 1706 V 575 1670 a Fl(YELLO)m(W)p 1225 1706 V 297 w Fn(subsequen)m(t)j(c)m(hars)f(are)e (y)m(ello)m(w)p 3373 1706 V 3390 1706 V 507 1826 V 524 1826 V 575 1790 a Fl(BLUE)p 1225 1826 V 451 w Fn(subsequen)m(t)j(c)m (hars)f(are)e(blue)p 3373 1826 V 3390 1826 V 507 1947 V 524 1947 V 575 1910 a Fl(MA)m(GENT)-8 b(A)p 1225 1947 V 227 w Fn(subsequen)m(t)35 b(c)m(hars)f(are)e(magen)m(ta)p 3373 1947 V 3390 1947 V 507 2067 V 524 2067 V 575 2031 a Fl(CY)-8 b(AN)p 1225 2067 V 440 w Fn(subsequen)m(t)35 b(c)m(hars)f(are)e(cy)m(an)p 3373 2067 V 3390 2067 V 507 2187 V 524 2187 V 575 2151 a Fl(WHITE)p 1225 2187 V 380 w Fn(subsequen)m(t)j(c)m(hars)f(are)e(white)p 3373 2187 V 3390 2187 V 507 2308 V 524 2308 V 1225 2308 V 3373 2308 V 3390 2308 V 507 2428 V 524 2428 V 575 2392 a Fl(UBLA)m(CK)p 1225 2428 V 311 w Fn(subsequen)m(t)j(c)m(hars)f(are)e (underlined)h(and)f(blac)m(k)p 3373 2428 V 3390 2428 V 507 2548 V 524 2548 V 575 2512 a Fl(URED)p 1225 2548 V 436 w Fn(subsequen)m(t)j(c)m(hars)f(are)e(underlined)h(and)f(red)p 3373 2548 V 3390 2548 V 507 2669 V 524 2669 V 575 2633 a Fl(UGREEN)p 1225 2669 V 304 w Fn(subsequen)m(t)j(c)m(hars)f(are)e (underlined)h(and)f(green)p 3373 2669 V 3390 2669 V 507 2789 V 524 2789 V 575 2753 a Fl(UYELLO)m(W)p 1225 2789 V 229 w Fn(subsequen)m(t)j(c)m(hars)f(are)e(underlined)h(and)f(y)m (ello)m(w)p 3373 2789 V 3390 2789 V 507 2910 V 524 2910 V 575 2874 a Fl(UBLUE)p 1225 2910 V 383 w Fn(subsequen)m(t)j(c)m(hars)f (are)e(underlined)h(and)f(blue)p 3373 2910 V 3390 2910 V 507 3030 V 524 3030 V 575 2994 a Fl(UMA)m(GENT)-8 b(A)p 1225 3030 V 159 w Fn(subsequen)m(t)35 b(c)m(hars)f(are)e(underlined)h (and)f(magen)m(ta)p 3373 3030 V 3390 3030 V 507 3150 V 524 3150 V 575 3114 a Fl(UCY)-8 b(AN)p 1225 3150 V 372 w Fn(subsequen)m(t)35 b(c)m(hars)f(are)e(underlined)h(and)f(cy)m (an)p 3373 3150 V 3390 3150 V 507 3271 V 524 3271 V 575 3235 a Fl(UWHITE)p 1225 3271 V 312 w Fn(subsequen)m(t)j(c)m(hars)f(are) e(underlined)h(and)f(white)p 3373 3271 V 3390 3271 V 507 3391 V 524 3391 V 1225 3391 V 3373 3391 V 3390 3391 V 507 3512 V 524 3512 V 575 3475 a Fl(R)-10 b(VBLA)m(CK)p 1225 3512 V 254 w Fn(subsequen)m(t)35 b(c)m(hars)f(are)e(rev)m (erse-video)j(and)d(blac)m(k)p 3373 3512 V 3390 3512 V 507 3632 V 524 3632 V 575 3596 a Fl(R)-10 b(VRED)p 1225 3632 V 379 w Fn(subsequen)m(t)35 b(c)m(hars)f(are)e(rev)m (erse-video)j(and)d(red)p 3373 3632 V 3390 3632 V 507 3752 V 524 3752 V 575 3716 a Fl(R)-10 b(V)m(GREEN)p 1225 3752 V 250 w Fn(subsequen)m(t)35 b(c)m(hars)f(are)e(rev)m(erse-video)j (and)d(green)p 3373 3752 V 3390 3752 V 507 3873 V 524 3873 V 575 3837 a Fl(R)-10 b(VYELLO)m(W)p 1225 3873 V 172 w Fn(subsequen)m(t)35 b(c)m(hars)f(are)e(rev)m(erse-video)j(and)d (y)m(ello)m(w)p 3373 3873 V 3390 3873 V 507 3993 V 524 3993 V 575 3957 a Fl(R)-10 b(VBLUE)p 1225 3993 V 326 w Fn(subsequen)m(t)35 b(c)m(hars)f(are)e(rev)m(erse-video)j(and)d(blue) p 3373 3993 V 3390 3993 V 507 4113 V 524 4113 V 575 4077 a Fl(R)-10 b(VMA)m(GENT)i(A)p 1225 4113 V 102 w Fn(subsequen)m(t)35 b(c)m(hars)f(are)e(rev)m(erse-video)j(and)d(magen)m(ta)p 3373 4113 V 3390 4113 V 507 4234 V 524 4234 V 575 4198 a Fl(R)-10 b(V)m(CY)i(AN)p 1225 4234 V 318 w Fn(subsequen)m(t)35 b(c)m(hars)f(are)e(rev)m(erse-video)j(and)d(cy)m(an)p 3373 4234 V 3390 4234 V 507 4354 V 524 4354 V 575 4318 a Fl(R)-10 b(VWHITE)p 1225 4354 V 255 w Fn(subsequen)m(t)35 b(c)m(hars)f(are)e(rev)m(erse-video)j(and)d(white)p 3373 4354 V 3390 4354 V 507 4475 V 524 4475 V 1225 4475 V 3373 4475 V 3390 4475 V 507 4595 V 524 4595 V 575 4559 a Fl(NRML)p 1225 4595 V 427 w Fn(subsequen)m(t)j(c)m(hars)f(are)e (\\normal")p 3373 4595 V 3390 4595 V 507 4715 V 524 4715 V 575 4679 a Fl(BOLD)p 1225 4715 V 441 w Fn(subsequen)m(t)j(c)m(hars)f (are)e(\\b)s(old")p 3373 4715 V 3390 4715 V 507 4836 V 524 4836 V 575 4800 a Fl(CLEAR)p 1225 4836 V 382 w Fn(the)h(screen)h(is)e(cleared)p 3373 4836 V 3390 4836 V 509 4839 2883 4 v 509 4856 V 1901 5707 a(33)p eop end %%Trailer userdict /end-hook known{end-hook}if %%EOF dmucs-0.6.1/COSMIC/DOC/sockets.tex0000644000175000017500000025665510360753042014555 0ustar samsam\documentclass[12pt]{article} \title{\textbf{The Simple Sockets Library \\ \normalsize\em Version 6}} \author{Charles E. Campbell, Jr., {\normalsize Ph.D.} \and Terry McRoberts} \def\COSMIC{{\small COSMIC}} \def\SSL{{\small SSL}} \def\IRL{{\small IRL}} \def\TCP{{\small TCP/IP }} \def\TradeMark{{\tiny (tm) }} \newtheorem{example}{Example}[section] \newcommand{\widepage}{ \setlength{\topmargin}{0.0in} \setlength{\textheight}{8.75in} \setlength{\footskip}{0.25in} \setlength{\oddsidemargin}{0in} \setlength{\textwidth}{6.5in} } \widepage \renewcommand{\thepage}{} \begin{document} \maketitle \begin{abstract} { The {\em Simple Sockets Library} (\SSL) allows~C~programmers to use interprocess communications via Berkeley sockets simply and quickly. The programmer is able to move information easily between processes on the same or different machines connected via Ethernet \TradeMark and using the \TCP\ protocol. Most of the \SSL's functions resemble C's file i/o functions, so~C~programmers will find the {\SSL} easy to learn. \vspace{1ex} The {\SSL} currently runs under various {\small UNIX \TradeMark} machines: {\small IRIX \TradeMark} (Silicon Graphics), SunOS \TradeMark (Sun), Domain O/S \TradeMark (Apollo), Ultrix \TradeMark (Dec), {\small AIX \TradeMark} ({\small IBM}), {\small SCO \TradeMark}, {\small OSF \TradeMark}, and {\small VMS} 5.x \TradeMark, and {\small MS-DOS \TradeMark} (using Borland C++ 5.0). } \vspace{.25in} \begin{table}[h] \begin{center} \small {\bf Keywords} \footnotesize \begin{tabular}{ll} Socket Interprocess Communications & Intermachine Communications \\ Berkeley Sockets & Ethernet \\ {\TCP} & Robotics \\ Machine Control & \end{tabular} \end{center} \end{table} \end{abstract} \titlepage \tableofcontents \newpage \setcounter{page}{1} \renewcommand{\thepage}{\arabic{page}} \section{Copyright} \begin{verbatim} Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. Permission is hereby granted to use and distribute this code and documentation, with or without modifications, provided that this copyright notice is copied with it. Like anything else that's free, the Simple Sockets Library is provided *as is* and comes with no warranty of any kind, either expressed or implied. By using this software, you agree that in no event will the copyright holder be liable for any damages resulting from the use of this software. \end{verbatim} \section{Introduction} The {\em Simple Sockets Library} (henceforth to be abbreviated as the \SSL) allows~C~programmers to develop systems of cooperating programs using Berkeley streaming Sockets running under the {\TCP} protocol over Ethernet. The {\SSL} provides simple ways to move information between programs running on the same or different machines and does so with little overhead. During experiments with the {\em Sreadbytes} and {\em Swrite} functions, for example, between two machines,~a~$44,000$ bytes/second transfer rate was achieved with 4~bytes per packet and over $1,000,000$ bytes/second was achieved with 128~bytes per packet. Of course, heavily loaded networks will affect the rate individual users achieve. The {\SSL} provides {\em two-way} communications. The {\SSL} was designed to resemble the {\small FILE} i/o system provided by the standard~C~libraries (ie.~fopen, fclose, fputs, etc. map to {\SSL} analogs Sopen, Sclose, Sputs, etc.). Thus,~C~programmers typically find the {\SSL} easy to learn. A~good analogy for the {\SSL} refers to the phone system. There are three types of Sockets supported by the {\SSL} that concern the user:~a~{\em server},~a~{\em client}, and an {\em accept} socket. ~A~server is analogous to someone waiting by several phones for~a~call,~a~client is analogous to someone making~a~call, and an accept is analogous to~a~(server) person accepting the call by picking up one of the phones. Thus, one must have~a~server for~a~client to make~a~successful connection. The server must in turn accept the connection. Unlike our overworked server person, however, the computer using the {\SSL} is perfectly happy handling multiple ``accept'' Sockets concurrently. The {\SSL} itself is provided in three main parts (see Table~\ref{three-parts}). The {\em Library} is composed of~C~functions and the {\em PortMaster} and the {\em Utilities} are self-contained programs. \begin{table}[ht] \caption{\bf The Three Parts of the \SSL} \label{three-parts} \begin{description} \item[Library] The functions that the users will link to are in the library. \item[PortMaster] The PortMaster is~a~d\"aemon program which runs in the background. It allows {\em clients} to connect to {\em servers} using any available ports. \item[Utilities] There are several utility programs provided with the \SSL: {\tt sktdbg}, {\tt srmsrvr}, and {\tt spmtable}. \end{description} \end{table} The {\SSL} was used at the Intelligent Robotics Laboratory (\IRL) since May, 1991. The software appears to be stable at the current writing and reasonably robust. For example, the PortMaster,~a~background process provided in the {\SSL} distribution, is resistant to hanging (and thereby being unresponsive). It uses {\em Stimeoutwait\/}s (see the Reference Manual) to return to its normal quiescent mode when communications with one of its clients ceases unexpectedly. The \IRL\ uses the {\SSL} to control its three robots; its use of the Ethernet is consequently somewhat heavy. Those of you who wish to control machinery or otherwise present~a~heavy load may wish to purchase~a~``bridge'' to isolate your machines from your local network. This isolation will benefit both the you and the network, as the heavy user will not be afflicted with slowdowns due to the network and the network will not be bothered with lots of packets which slows all its users down. \newpage \section{The Library} The user of the {\SSL} accesses it by linking his or her program to~a~{\em library}. ~A~software library is typically~a~single file which consists of some linkage information along with pre-compiled {\em object code}; unfortunately, methods for producing~a~library and linking to it vary from system to system and compiler to compiler. Directions for several systems appear in the Section on Implementation. Practically speaking,~a~library is composed of~a~number of pre-compiled C functions to be utilized by the programmer. The calls made available in the {\SSL} are reminiscent of those used by the various file functions in the C language (see Table~\ref{reminiscent}). \begin{table}[thb] \begin{center} \caption{Simple Sockets and Related File {\protect\small I/O} Functions} \label{reminiscent} \begin{tabular}{||l|l||} \hline\hline {\em File Function} & {\em Socket Function} \\ \hline fopen & Sopen \\ fclose & Sclose \\ fread & Sread \\ fwrite & Swrite \\ fgets & Sgets \\ fputs & Sputs \\ fprintf & Sprintf \\ fscanf & Sscanf \\ \hline\hline \end{tabular} \end{center} \end{table} The Sockets library depends upon the {\em PortMaster} running on your host machine. Only one copy of the PortMaster need be running at any time on~a~given machine, and may be started up by anyone by running the {\em Spm} program in the background. On Unix, the {\em Spm} program will put itself into the background. One may determine if your system has~a~PortMaster running by typing {\em spmtable} first -- it will inform you of any existing servers if the PortMaster is up or tell you that the PortMaster is not up otherwise. A~new feature of the {\SSL} allows servers to share another machine's PortMaster. Thus, the {\SSL} supports both distributed and centralized socket name to port mapping. If the machine on which~a~server is to run doesn't have~a~PortMaster, such as older {\small MSDOS} machines, then it can ``borrow'' another machine's PortMaster. A~program may open~a~server Socket,~a~client Socket, or an accept Socket. Following the phone system analogy, assume that~a~server Socket is opened first. Then,~a~different program may open~a~client Socket which attempts to connect to the server -- it succeeds when the server program ``notices'' that there is~a~connection waiting on the server Socket and then generates an accept Socket. The client Socket can open, however, before the server accepts the client; there just won't be any two-way communication until the server does accept the client. \subsection{User Guide} Software using~C~must \verb`#include "sockets.h"` and must link to the \SSL. Directions for doing so will vary from system to system and also depend upon where the installer placed the libraries. Please refer to your compiler documentation and the {\SSL} installer to know how to set up library linkage paths and for the include path to the {\em sockets.h} file. The software below illustrates some typical Socket code fragments to get a connected socket, assuming that the \verb`sockets.h` file is on your compiler's include search path. If the \verb`sockets.h` file has been placed in a standard system directory (not wise - updates to the compiler may wipe it off!) then you may have to substitute \verb`#include ` for \verb`#include` "sockets.h"` in the following examples. \begin{example}~A~server with one accept \\ \label{one-accept} \begin{verbatim} #include "sockets.h" Socket *server; Socket *skt; server= Sopen("servername","s"); skt = Saccept(server); ... Sclose(skt); Sclose(server); \end{verbatim} \end{example} Note in Example~\ref{one-accept} that the servername is completely up to the programmer to select. Please note that all servers share the same namespace on any given machine, however. \begin{example}~A~server with multiple accepts \\ \label{multi-accept} \begin{verbatim} #include "sockets.h" Socket *server=NULL; Socket *skt=NULL; server= Sopen("servername","s"); do { skt= Saccept(server); ... Sclose(skt); } while(whatever); Sclose(server); \end{verbatim} \end{example} Again, the programmer may select any servername. Note that the {\em accept} Socket (``skt'') is re-used in Example~\ref{multi-accept}. Actually, coding of multiple accept sockets is usually a bit more involved; see \verb`multiskt.c` in the {\small EXAMPLES} directory. I usually set up a doubly-linked list containing a Socket pointer for each such accepted client and put them on the mask (using \verb`Smaskset()`). I can then use \verb`Smaskwait()` or \verb`Smasktimeoutwait()` to wait for any Socket, including the server itself, that needs attention. Upon closing such a Socket, I also use \verb`Smaskunset()` to remove it from the mask and do a double-link deletion. \begin{example}~A~client \\ \label{client} \begin{verbatim} #include "sockets.h" Socket *client; while(1) { client= Sopen("serverName","c"); if(client) break; sleep(1); } ... Sclose(client); \end{verbatim} \end{example} In Example~\ref{client}, the \verb`serverName` may be in the optional form \verb`serverName@machineName`. Without the machine name specification, the PortMaster on the machine that the client is running on will be searched for the server. The \verb`smsrvr.c` and \verb`smclient.c` example programs provided in the {\SSL} distribution give complete illustrations of Examples~\ref{one-accept} and \ref{client}. Note that the Sopen() of a client will fail if the server is not already up; in which case, a null pointer is returned. Example~\ref{client} illustrates a probing method (in this case, once a second). Example~\ref{blockingclient} shows an option to have Sopen() block until the requested server is available. \begin{example}~A~blocking~until~open~client \\ \label{blockingclient} \begin{verbatim} #include "sockets.h" Socket *client; client= Sopen("serverName","b"); ... Sclose(client); \end{verbatim} \end{example} In Example~\ref{blockingclient}, the requested server may or may not be up already. If the server is available, a normal client connection is opened. If the server is {\it not} available, then the client will block (wait) until the server is brought up. Internally, the PortMaster places any clients that open using this option on a waiting list when the server is not available. When the server connects to the PortMaster, the PortMaster then checks its waiting list for clients who wish to connect. \begin{example} Using Sopenv \\ \label{using-sopenv} \begin{verbatim} #include "sockets.h" Socket *client; while(1) { client= Sopenv("serverName","c","SKTPATH"); if(client) break; sleep(1); } ... Sclose(client); \end{verbatim} \end{example} The {\SSL} allows the programmer to set up~a~group of machines for making client connections. In Example~\ref{using-sopenv}, the {\SSL} tries to open~a~client to~a~server named \verb`serverName` on any machine on the {\small SKTPATH}. The ``{\small SKTPATH}'' is an environment variable typically of the form \verb`machine1:machine2:machine3`, ie.~a list of machine names separated by colons. This example also shows~a~typical client connection attempt and sleep polling loop. A~somewhat larger example is included in the distribution: \verb`multiskt.c`. This example program concurrently accepts multiple clients on~a~single server, reads any messages sent its way from any of its clients, and sends~a~modified version back to the sending client. It uses the {\em Smaskwait} functions to block the multiskt process for friendly multi-tasking. It is~a~useful program to study in conjunction with the Manual below. Connected sockets are~a~pre-requisite for any of the {\small I/O} Socket functions described in the next section. Note that the server should have a unique name on any given machine. Servers may have the same name on different machines, although this may be confusing. It is suggested that one use the name of the process (at least as~a~prefix) for that purpose. Note that the only things that one can do with~a~server Socket are: open one, close one, generate an accept Socket with one, and test/block on one (for clients requesting connection). The {\SSL} supports up to $10$ clients concurrently awaiting acceptance on~a~server Socket, although many machines will limit that to $5$ (silently). The {\SSL} supports two way communication of data between~a~client and an accept Socket. Since the processes are not likely to be synchronized, often one process must somehow wait until the other process has sent it something. There are two methods to support this under the \SSL: polling and interrupt-driven. The polling method uses~a~lot of {\small CPU} time, but lets the program do other tasks in the meantime. The interrupt-driven approach hangs the process (aka blocks and suspends) until something shows up on the Socket. The Smask{\small XXX} group of functions allows one to hang the process until something shows up on any number of Sockets -- sort of~a~big {\small OR} gate! The Smask{\small XXX} alternative to polling also allows the programmer to insert non-socket file descriptors into the mask via Smaskfdset (and to remove them via Smaskunfdset) such as serial ports (ex. open with DEVICE), graphics queues (ex. {\small SGI}s with qgetfd), etc. \subsection{Reference Manual} This section contains~a~description of the functions available in the Socket Library. The {\SSL} returns three types of Sockets:~a~server, client, and an accept Socket. ~A~Socket itself is~a~data structure {\em type} set up by the \verb`sockets.h` header file. The Socket is deliberately used in~a~fashion reminiscent of the use of {\small FILE} pointers so that the~C~user who knows how to read and write~a~file will immediately feel comfortable with reading and writing Sockets. \begin{center} \begin{tabular}{||ll|l|l||} \hline\hline {\em Return} & & {\em Function} & {\em Argument} \\ {\em Type} & & {\em Name} & {\em List} \\ \hline Socket & * & Saccept & (Socket *skt) \\ void & & Sclose & (Socket *skt) \\ char & * & Sgets & (char *buf, int maxbuf, Socket *skt) \\ int & & Smaskfdisset & (int fd) \\ void & & Smaskfdset & (int fd) \\ fd\_set & & Smaskget & () \\ int & & Smaskisset & (Socket *skt) \\ void & & Smaskpop & () \\ void & & Smaskpush & () \\ void & & Smaskset & (Socket *skt) \\ int & & Smasktest & () \\ void & & Smasktime & (long seconds,long useconds) \\ void & & Smaskunset & (Socket *skt) \\ void & & Smaskunfdset & (int fd) \\ void & & Smaskuse & (fd\_set usermask) \\ int & & Smaskwait & () \\ Socket & * & Sopen & (char *skthost, char *mode) \\ Socket & * & Sopenv & (char *srvrname,char *ctrl,char *envvar) \\ int & & Speek & (Socket *skt, char *buf, int buflen) \\ unsigned long & & Speeraddr & (Socket *skt) \\ char & * & Speername & (Socket *skt) \\ void & & Sprintf & (Socket *skt, char *fmt,...) \\ char & * & Sprtskt & (Socket *skt) \\ void & & Sputs & (char *buf, Socket *skt) \\ int & & Sread & (Socket *skt, char *buf, int buflen) \\ int & & Sreadbytes & (Socket *skt, char *buf, int buflen) \\ int & & Srmsrvr & (char *skthost) \\ int & & Sscanf & (Socket *skt, char *fmt, ...) \\ int & & Stest & (Socket *skt) \\ int & & Stimeoutwait & (Socket *skt,long seconds,long useconds) \\ int & & Svprintf & (Socket *skt, char *fmt, void *args) \\ int & & Swait & (Socket *skt) \\ int & & Swrite & (Socket *skt, char *buf, int buflen) \\ \hline\hline \end{tabular} \end{center} \begin{description} \item[Socket *Saccept(Socket *skt)] \ This function takes~a~server Socket and produces~a~Socket which has accepted~a~connection. This function may be used as often as wanted on the same server Socket! Note that one must have successfully opened~a~server prior to using Saccept to accept connections (see Examples~\ref{one-accept} and \ref{multi-accept}). If this operation is unsuccessful, then Saccept will return~a~null Socket pointer. \item[void Sclose(Socket *skt)] \ This function closes~a~Socket of any type (server, client, accept). The Sclose function communicates with the local PortMaster whenever~a~server is closed. \item[char *Sgets(char *buf, int maxbuf, Socket *skt)] \ This is an I/O function which assumes that one has already opened a connected Socket ({\em skt}). It will attempt to get~a~null-terminated string from the Socket (up to maxbuf characters). This call will block (aka hang, sleep) until~a~string shows up, but otherwise acts much as a fgets() function does. If Sgets has~a~socket error, then~a~null pointer is returned. Otherwise, it returns the ``{\em buf}'' pointer. \item[int Smaskfdisset(int fd)] \ The Smaskfdisset() function works in conjunction with the Smaskwait() function. After the Smaskwait() function returns, one can use Smaskfdisset(skt) to test if~a~particular file descriptor is read-ready. \item[void Smaskfdset(int fd)] \ The Smask{\small XXX} functions use~a~{\it mask} of type {\it fd\_set} internally. Other operations, such as use of~a~serial port under Unix or the {\small\it GL} queue for {\small SGI}'s Irises (see their qgetfd() function) use file descriptors. This function allows one to set up the Smask{\small XXX} mask with one or more of those file descriptors. \item[Smask Smaskget()] \ The Smask{\small XXX} functions use~a~{\it mask} of type {\it fd\_set} internally. Other operations, such as use of~a~serial port under Unix, can also be used to set masks. This function provides access to the mask set up by Smaskset. The mate to this function is Smaskuse(). \item[int Smaskisset(Socket *skt)] \ The Smaskisset() function works in conjunction with the Smaskwait() function. After the Smaskwait() function returns, one can use Smaskisset(skt) to test if~a~particular Socket is read-ready. It is simpler then and thereby faster than Smasktest(). \item[void Smaskpop()] \ The Smaskpop() function, along with the Smaskpush() function, allows the programmer to manipulate an internal stack of masks. The ``top'' mask is the current mask. \item[void Smaskpush()] \ The Smaskpush() function, along with the Smaskpop() function, allows the programmer to manipulate an internal stack of masks. The ``top'' mask is the current mask. \item[void Smaskset(Socket *skt)] \ This function is part of the {\em Smask{\small XXX}} group. Sockets may be set up for Smaskwait'ing one at~a~time. Note that all Sockets are effectively {\small OR}'ed together for blocking; to clear the mask, pass a {\small NULL} Socket pointer to Smaskset: Smaskset((Socket *) {\small NULL});. \item[int Smasktest()] \ This function is part of the {\em Smask{\small XXX}} group. The Smasktest function supports polling -- one may determine if anything is on any of the Smaskset Sockets and immediately receive~a~positive integer if there is, ~a~0 if there isn't, and~a~negative number if there's an error. \item[void Smasktime(long seconds,long useconds)] \ This function is part of the {\em Smask{\small XXX}} group. Normally Smaskwait will block ``forever'' (well, at least as long as the machine stays up!). However, one can specify~a~time limit -- then Smaskwait will return with~a~value of 0 if the time limit is exceeded. One may specify the time limit in seconds and micro-seconds. To clear the time limit (ie.~restore Smaskwait to waiting forever), pass~a~negative time in either or both arguments to Smasktime. Waiting forever is also set up when both arguments to Smasktime are zero. \item[void Smaskunfdset(int fd)] \ This function is part of the {\em Smask{\small XXX}} group. File descriptors may be entered into the mask via the Smaskfdset() function, and this function can remove it from the mask. This function is similar to the Smaskunset() function. \item[void Smaskunset(Socket *skt)] \ This function is part of the {\em Smask{\small XXX}} group. Sockets may be removed from the Smaskwait's mask one at~a~time via this function. Like {\em Smaskset},~a~{\em Smaskunset((Socket *) {\small NULL});} will clear the entire mask. \item[void Smaskuse(Smask usermask)] \ This function is part of the {\em Smask{\small XXX}} group. The internal {\em mask} in Smask{\small XXX} can be set up by the user via this function. Often, Smaskset will be used to set up an internal mask, Smaskget will be used to obtain the resulting mask, and Smaskuse will be used to apply that mask. \item[int Smaskwait()] \ This function is part of the {\em Smask{\small XXX}} group. The {\em Smaskwait} function will block (aka hang) the process until any Socket set via Smaskset has something waiting on it to be read. Note that Sockets set by Smaskset are retained; ie.~they must be explicitly cleared by passing a {\small NULL} Socket pointer to Smaskset. Smaskwait returns~a~positive number if something is waiting on a Socket, zero if~a~timeout occurs, and~a~negative number on an error. \item[Socket *Sopen(char *skthost, char *mode)] \ This function is the workhorse for opening Sockets. Basically, it can make either~a~server or~a~client depending on the mode. \begin{center} \begin{tabular}{|cl|} \hline \multicolumn{1}{|c}{\em Mode} & \multicolumn{1}{c|}{\em Effect} \\ \hline {\em s} & open~a~server \\ {\em S} & open~a~server but, on failure, retry after using Srmsrvr \\ {\em c} & open~a~client \\ {\em b} & open~a~blocking~client \\ {\em s\verb`###`} & open~a~server with the specified port number \\ {\em S\verb`###`} & like {\em S} above, but with the specified port \\ {\em c\verb`###`} & open~a~client to~a~server with the specified port \\ \hline \end{tabular} \end{center} The {\em skthost} is the name of the server. If one is making~a~{\em client} Socket, then one may optionally use the form ``servername@hostname'' for the skthost. The ``@hostname'' form is not necessary for clients to servers that are on the same host as the client, as the default host is the local host. The ``servername@hostname'' form makes no sense for servers, and so, for opening servers, Sopen will ignore any ``@hostname'' portion of skthost. The {\em ``S''} mode for opening servers, like the {\em ``s''} mode, will cause Sopen to attempt to open~a~server, but if unsuccessful, Sopen will then use Srmsrvr using the provided skthost and then retry opening the server. In the case of {\em s\verb`###`} or {\em S\verb`###`}, the servers are set up with the \TCP\ option {\small SO\_REUSEADDR}. This option alleviates some of the difficulties associated with re-starting servers with fixed ports. If the skthost is null or an empty string (""), the PortMaster is bypassed. One must specify a port number to use in that case. A warning is issued (as well as a null \verb`Socket*`) because that is typically a programming error, not a user error. The PortMaster is also always bypassed for clients which specify port number ({\em c\verb`###`}). In the latter case,~a~client connection is immediately attempted to the user-specified port number. If the function is not successful,~a~null Socket pointer is returned. If the user-specified server port mode is used with a skthost, the server will be registered with its PortMaster; clients need {\em not} use specified-port mode to connect (ie.~they may set \verb`mode` to \verb`"c"`) so long as they specify the correct name of the server. PortMaster sharing (by setting the environment variable \verb`PMSHARE`) causes servers to work with the {\em\small PMSHARE\/}-specified machine's PortMaster. Clients should use the name of the machine that the {\em PortMaster} is on; the eventual connection will be made with the appropriate server program, even though it is running on~a~different machine than the PortMaster it uses. See Example~\ref{pmsharing} for an illustration of how PortMaster sharing works. \item[Socket *Sopenv(char *srvrname,char *ctrl,char *envvar)] \ The {\em Sopenv} function is used to open client Sockets, but is formulated to resemble the {\em Sopen} function with one additional argument. Assuming your computer system supports the concept of environment variables, the Sopenv function can use an environment variable of your choice to help it open~a~client. Typically,~a~{\small SKTPATH} environment variable gets set up by the user with~a~colon-separated list of machine names (ex. setenv {\small SKTPATH} ``gryphon:dragon:xorn''). The Sopenv function attempts to open~a~client to~a~server of the given name on the current machine first, and then attempts to do so on each machine in the given sequence. If \verb`env_var` is NULL or~a~null string, then \verb`SKTPATH` will be used instead. If successful,~a~Socket pointer is returned, otherwise~a~{\small NULL} Socket pointer is returned. Please see Saccept on how to use servers. \item[int Speek(Socket *skt, char *buf, int buflen)] \ The {\em Speek} function behaves like Sread --- up to {\em buflen} bytes, the buffer will be filled by whatever is currently on the Socket. This function does not remove those bytes from the Socket, however, and those bytes will be returned again on subsequent Speek, Sread, etc.\ calls. This function does \underline{not} block (aka hang, sleep). It will return EOF on select error, some negative number on recv error, zero if no data is present on the Socket, and~a~positive count of the available bytes otherwise. In the latter case, {\em buf} will have~a~copy of the bytes available. {\small MS-DOS}: Speek will only return~a~1 when data is available on the Socket, not the number of bytes available. Furthermore, the buffer {\em buf} will be~a~zero-length string with just~a~null byte. \item[unsigned long Speeraddr(Socket *skt)] \ The {\em Speeraddr} function returns the internet address of the peer Socket. \item[char *Speername(Socket *skt)] \ The {\em Speername} function returns the name of the peer Socket. Internally, it has three buffers; thus it can be used up to three times in the same printf statement. \item[void Sprintf(Socket *skt, char *fmt,...)] \ The {\em Sprintf} function acts in an analogous fashion to fprintf, sprintf, etc, by putting formatted strings, appropriately null byte terminated, through the Socket. Thus, one may use either {\em Sgets} or an appropriate {\em Sscanf} to receive the information. \item[char *Sprtskt(Socket *skt)] \ The {\em Sprtskt} function returns~a~string describing the Socket. \item[void Sputs(char *buf, Socket *skt)] \ The {\em Sputs} function puts~a~null byte terminated string on the Socket in~a~fashion analogous to fputs. \item[int Sread(Socket *skt, char *buf, int buflen)] \ The {\em Sread} function is similar to the {\em read} function in Unix. This function can block (aka hang, sleep) if nothing is on the Socket. Otherwise, it will return up to {\em buflen} bytes in the buffer ``{\em buf}''. This function will return whatever is on the Socket, and doesn't try to insure that buflen bytes are read. It returns the number of bytes read from the Socket. On error, an EOF is returned. \item[int Sreadbytes(Socket *skt, char *buf, int buflen)] \ The {\em Sreadbytes} function behaves much like Sread, and it too can block (aka hang, sleep) if nothing is on the Socket. However, it will not return until buflen bytes are read from the Socket and placed in ``buf''. On error, an EOF is returned. \item[int Srmsrvr(char *skthost)] \ The {\em Srmsrvr} function is made available to take care of those situations when {\small skt = Sopen(``servername'',``s'')} fails because the servername has been inadvertently left in the PortMaster's PortTable. This untoward event can happen, for example, when~a~process is aborted/exited without calling Sclose on its server(s). The Srmsrvr function will remove~a~server (or server@host) from the PortMaster's PortTable. Note: it will \underline{not} close the associated Socket, nor free up any Socket memory, and is \underline{not}~a~substitute for Sclose. The {\em Srmsrvr} function will return either {\small PM\_OK} (if successful) or {\small PM\_SORRY} (otherwise). \item[int Sscanf(Socket *skt, char *fmt, ...)] \ The {\em Sscanf} function acts much the same as sscanf and fscanf, taking format strings and additional arguments in~a~like manner. The arguments Sscanf takes, of course, must all be appropriate pointers. This function will block if insufficient data is available on the socket according to the {\em fmt}. The {\em Sscanf} function returns the number of arguments for which it read data, which may be zero or incomplete if~a~socket error occurred. Normally, the returned count should equal the number of arguments with which Sscanf was provided. \item[int Stest(Socket *skt)] \ The {\em Stest} function allows one to determine if anything is available on the specified Socket, {\em without blocking}. It will return EOF on select error, some negative number on recv error, zero if no data is present on the Socket, and~a~positive count of the available bytes otherwise. {\small MS-DOS}: Stest will only return~a~1 when data is available on the Socket, not the number of bytes available. \item[int Stimeoutwait(Socket *skt,long seconds,long useconds)] \ The {\em Stimeoutwait} function blocks on the given Socket, but for no longer than the number of seconds plus the number of microseconds specified. The function returns the number of bytes available on the Socket (which may be zero), -1 if there was an error, and -2 on timeout. \item[int Svprintf(Socket *skt, char *fmt, void *args)] \ The {\em Svprintf} function reads bytes using~a~printf family format string from the Socket. As each format code is processed, the associated argument is changed in the {\em args} vector. It returns the number of format items processed. \item[int Swait(Socket *skt)] \ The {\em Swait} function will block (aka hang, sleep) until the specified Socket has data available. It will return EOF on select error, some negative number on recv error, zero if no data is present on the Socket, and~a~positive count of the available bytes otherwise. \item[int Swrite(Socket *skt, char *buf, int buflen)] \ The {\em Swrite} function will write {\em buflen} bytes from the {\em buf} buffer onto the specified Socket. The function will return~a~count of the number of bytes transmitted through the Socket, which should be equal to {\em buflen}. If the output is less than {\em buflen}, then an error occurred while writing to the Socket. \end{description} \subsection{Hints} The {\em Hints} below have been found useful at the Intelligent Robotics Laboratory. They are based on almost a~year's experience with the \SSL. \begin{enumerate} \item The ``Sscanf'' function is dangerous. It will block until all of the format codes in its {\em fmt} string have been used. If somehow ~a~programmer sends an improper string and Sscanf is used to receive it, then the receiving program will probably hang for quite~a~while. Dr.~Campbell has found that it is somewhat safer to use {\em Sgets} to get an entire string from the Socket and then use {\em sscanf} and {\em stpnxt} to parse it. \item Polling is unfriendly to other processes -- it wastes~a~tremendous amount of {\small CPU} time merely querying the Socket(s) to see if anything is awaiting action. The various blocking functions are much better: Swait, Stimeoutwait, Smask{\small XXX}, etc. \item Unless your processes will always run on the same kind of machine, portability considerations argue against using Sread and Swrite to move non-character string data around -- ie. floats, doubles, and even ints. Even if the programmer tests out the machines and verifies that (s)he can safely move, say,~a~double around, or even~a~vector of doubles, data structures (\verb`struct XXX { ... }`) may have ``holes'' in them placed there for word or byte alignment reasons. These ``holes'' may not be there (or may be placed differently) by other machines and compilers. \item The Srmsrvr function is~a~rather rude function -- there is no ownership check of~a~server. Please use your process name (or your id) as part of your server name so that servers do not clash. Remember: your server's name is in only one ``name space'' shared by all users on your machine. \item For those of you who wish to use other services (ex.~serial ports) which can use the {\em select} function provided by \TCP, check out Smaskfdset and its mate, Smaskunfdset. \item The \IRL\ has been using~a~leading two character command convention: \verb`tp~L~x~y~z rx ry rz` will tell the ``left'' T3 robot to move to ``x~y~z'' (inches) in space with an orientation of ``rx ry rz'' degrees (roll, pitch, yaw). Longer words provide more readability but take up more bandwidth. Experimentally, Dr.~Campbell has found that \TCP can transfer about 10,000 packets per second with up to 128 bytes in a packet. Loaded systems will, of course, achieve less throughput. \item It is~a~good idea for clients to inform servers that they are quitting. The \IRL\ has used the following convention: \verb`tq` {\em t\/}ells the server that the messaging client is {\em q\/}uitting. Also,~a~\verb`tQ` tells the server to shut itself down. The server then emits~a~\verb`tq` to all of its clients to inform them that the server is shutting down (except for the one client who issued the shutdown command), and then closes itself down with Sclose. \item The server-client relationship is intimately involved with object-oriented messaging -- refer to the literature on object-oriented concepts. \item The {\SSL} can be used to support~a~{\em no startup sequencing} paradigm. Typically, clients who attempt to Sopen and fail should go into a poll - sleep loop: \begin{example} Client Socket Polling \\ \label{client-polling} \begin{verbatim} skt= Sopen("servername","c"); while(!skt) { sleep(1); skt= Sopen("servername","c"); } \end{verbatim} \end{example} The {\em multiskt.c} program illustrates how servers should be able to accept multiple clients using blocking judiciously. This non-sequencing approach allows one to bring up programs which have servers and/or clients without worrying about what comes first. For two programs, this isn't terribly serious, but at the \IRL\ numerous programs providing numerous services are available and sequencing would be~a~nightmare. \item As alluded to earlier, clients should tell servers and servers should tell clients when they are going down. The program that is {\em not} quitting should return to an ``awaiting another client (or server)'' mode (ie.~see the preceding item). Thus,~a~troublesome program can be brought down, the programs to which it is communicating will gracefully terminate their connections, and the programmer can then (hopefully) fix the problem. When the program is restarted, the non-sequencing approach will allow the program to seamlessly re-enter into communications with the other software. \item When~a~machine is down, and an attempt to connect~a~client Socket using either {\em Sopen\/} directly or {\em Sopenv\/} to~a~server either normally or possibly on that machine, the Sopen will fail but will take an inordinately long time doing so (connection timeout). \item When~a~program dies abruptly, connected Sockets appear to {\em select}() to have something on them (select is used by Stest, Smasktest, Swait, Smaskwait, Speek, Stimeoutwait). Hence, functions which normally block (Smaskwait, Swait) no longer block. On computers which can {\small MSG\_PEEK} (Unix, Vms), the Stest, Speek, Sgets, and Sscanf functions will detect this situation and will return an error indication ({\small EOF}, {\small NULL} pointer, incomplete argument processed count) to indicate that the Socket has~a~problem (one should then Sclose the affected Socket). Furthermore, attempts to write to such dead Sockets may generate {\small SIGPIPE}s on Unix boxes. Unix programmers should write and install signal handlers for {\small SIGPIPE}s. \item For multiple concurrent Sockets, one should generate routines for both closing and opening them. \begin{example} Client Opening Function \\ \label{client-opening} \begin{verbatim} #include "sockets.h" typedef struct clientlist_str ClientList; struct clientlist_str { Socket *skt; ClientList *nxt,*prv; } ClientList *clhd=NULL; ClientList *cltl=NULL; ... ClientList *openClient(char *srvrname) { Socket *skt; ClientList *clist; while(1) { skt= Sopen(srvrname,"c"); if(!skt) sleep(1); } clist= (ClientList *) malloc(sizeof(ClientList)); if(cltl) cltl->nxt= clist; else clhd = clist; clist->prv= cltl; clist->nxt= NULL; cltl = clist; Smaskset(skt); clist->skt= skt; return clist; } \end{verbatim} \end{example} The \verb`openClient`() function polls once~a~second in attempting to open~a~client Socket. Once it succeeds,~a~ClientList data structure is allocated, double-linked, and~a~pointer to it returned. In addition, the new client Socket is added to the Smask. \begin{example} Client Closing Function \\ \label{client-closing} \begin{verbatim} void closeClient(ClientList *clist) { if(clist) { Smaskunset(clist->skt); Sclose(clist->skt); clist->skt= NULL; } } \end{verbatim} \end{example} The \verb`closeClient`() function removes the client Socket from the Smask system, closes the Socket, and then sets the skt pointer to NULL to guarantee that the now dead socket won't be inadvertently re-used somehow. \item It is usually advisable to use some sort of handshaking protocol between server and client, especially when large data blocks are being moved. The {\TCP} buffers can easily get filled and data get lost otherwise. To facilitate this, the {\SSL} sets sockets up with the {\small TCP\_NODELAY} option so that small packets are moved out across and not collected (collection of small packets normally improves network efficiency since there's less overhead per byte of data). \end{enumerate} \newpage \section{The PortMaster} Servers have names provided by the program which opens them. When~a~server is to be opened, the Sopen function temporarily opens~a~Socket to the PortMaster running on the same machine. The Sopen function then tells the PortMaster the server's {\em name} and the (random) {\em port} assigned to the new server, and then closes down the connection. The PortMaster retains~a~list of all active servers and ports running on its machine. A~client is opened using the Sopen function, too. In that case,~a~connection is made to the PortMaster on the machine where the requested server is running. The PortMaster then tells the Sopen function the port number associated with the requested server, and then closes down the temporary connection. The Sopen function then attempts to connect to the server using the given port. The server program can use its server Socket to test if any clients are waiting to be connected to it (via the Stest function). If~a~client is waiting, then the server's program can {\em accept} the connection, generating an accept Socket (via Saccept). Once the connection is accepted, the program attempting to open the client Socket will finally receive~a~Socket pointer. \subsection{Users Guide} The PortMaster is probably the simplest program to run: under {\small UNIX}, type \verb`Spm &` and under {\small VMS} type \verb`run/detach Spm`. The PortMaster will only allow one copy of itself to run on any given computer. It uses~a~fixed port address ($1750$, now registered with {\small IANA}) and implements~a~table of server names mapping to random ports. Although knowledgeable users could change the PortMaster's fixed port, this is discouraged: hopefully, PortMasters will proliferate across the world and, if they all use the same port on their machines, will be able to communicate with one another. In other words, the {\SSL} will be unable to communicate with other {\SSL} systems which use~a~different port for its PortMaster. Since {\small MS-DOS} is not~a~multi-tasking operating system, unlike {\small UNIX}, {\small VMS}, or {\small Amiga-DOS}, one cannot have a PortMaster running in the background --- there is no background. Hence, {\small MS-DOS} programs are currently restricted to using client Sockets only, {\em unless} they can share another machine's PortMaster (see below). The PortMaster now supports~a~firewall: one can instruct the PortMaster to restrict access to~a~group of machines by their host addresses. See the section on {\em The PortMaster Firewall} below. \subsection{Sharing PortMasters} PortMasters can now be {\em shared}. This feature was installed mainly to support {\small MSDOS} -- since it doesn't have~a~background process capability, it cannot run PortMasters. Hence, it is normally restricted to running clients only, because servers normally announce their presence to their host's PortMaster. If the environment variable \verb`PMSHARE` is set to some other machine, that other machine's PortMaster will be used by the host's processes attempting to open servers. From the client's viewpoint, the server appears to be on the machine with the PortMaster -- the client doesn't need to know about where the server actually is. \begin{example} PortMaster Sharing \rm \\ \label{pmsharing} \begin{tabular}{|l|l|l|} \hline \multicolumn{1}{|c|}{\bf Machine} & \multicolumn{1}{c|}{\bf Machine} & \multicolumn{1}{c|}{\bf Machine} \\ \multicolumn{1}{|c|}{\bf A} & \multicolumn{1}{c|}{\bf B} & \multicolumn{1}{c|}{\bf C} \\ \hline & & \\ PMSHARE=machineb & & \\ & & \\ opens server {\em ASrvr} & & \\ & & \\ & B's PortMaster & \\ & now has {\em ASrvr} & \\ & on its list & \\ & & \\ & & pgm opens client \\ & & to ASrvr@machineb \\ & & \\ & B's PortMaster & \\ & satisfies & \\ & client's request & \\ & & \\ & & pgm has client to \\ & & {\em ASrvr} on~A~ \\ \hline \end{tabular} \end{example} In Example~\ref{pmsharing}, three machines are in use. However, machines B~and~C~could have been the same machine. In essence, when~A~shares B's PortMaster, the servers on~A~appear to be on~B~insofar as Sopen'ing~a~client is concerned. Internally, of course, B's PortMaster knows where the {\em ASrvr} is, and clients end up being connected to the server on machine A. \subsection{Theory of Operation} Normally, users of the {\SSL} will not need to read this section. However, for those who are curious... There are two main benefits to using the \SSL: the functions are similar to those that the~C~programmer already knows how to use and hence the {\SSL} has~a~rapid learning curve, and second, servers are assigned to currently available ports. The PortMaster is integral to providing the second benefit. Berkeley sockets are assigned ports, which are basically just integers. The port is used internally to assign the flow of data to the correct places. One must assign~a~specific port to~a~server or, alternatively, allow the system to assign any available port to it. Clients must use that same port number to connect to the desired server. Hence, the problem with using the ``any available port'' is how to get the client process to know what the currently assigned port is! Programmers using Berkeley sockets have typically just assigned~a~fixed port to their server and hard-coded the clients with that port. If some other process just happens to use that same port, then things get messy -- re-compile, wait until the other process goes away, etc. On a machine where there are many users, co-operation between the users may be impractical. The PortMaster solves the problem of associating~a~server name with~a~randomly assigned (and available) port, and making that association available to clients. The PortMaster itself uses~a~fixed port, and so servers and clients always know ``where'' it is. Whenever~a~server opens (using the Sopen("{\small XXX}","s") call), the Sopen function makes~a~Socket data structure, creates a Berkeley socket, initializes and binds the socket with any available port, and then connects to the PortMaster, {\em using its fixed port}. It then sends a ``message'' ({\small PM\_SERVER}, which is simply an integer) to the PortMaster, telling it the type of Socket it is. Subsequently, the PortMaster gets the new server's name and the port it is assigned to. When~a~client opens, it makes~a~Socket, initializes~a~Berkeley socket as a client (using the {\small AF\_INET} format), gets~a~``host'' entity pointer (the server's machine is known as~a~host), and then connects to the PortMaster on the host machine. It then sends~a~``{\small PM\_CLIENT}'' to that PortMaster and the desired server's name; that PortMaster will respond with the associated port number (if there is one). The client then closes down the connection to the target host's PortMaster, and initializes~a~Berkeley socket with the port number it just received and returns~a~client Socket pointer to the user. Thus, the \SSL's PortMaster system is~a~distributed database. There are advantages and disadvantages to this scheme. No PortMaster knows anything about servers residing on other machines; if~a~machine goes down, other machines which have no need to communicate with the downed machine are not affected. On the other hand,~a~single machine with~a~single PortMaster would obviate the need for clients to know what machines they wish to connect to, and could force servers on all machines to have unique names (as it is, servers can have the same name so long as they run on different machines). As~a~palliative, the {\em Sopenv} function supports the concept of~a~{\em machine path} via the use of environment variables. Using the Sopenv function, clients can ``hunt'' down~a~given server by attempting to open~a~client one at~a~time on each machine until~a~server of that name is found. Thus, the user can designate~a~local group of machines via an environment variable (typically, the ``{\small SKTPATH}'' environment variable is used for this purpose). The PortMaster talks to its temporary clients using~a~relatively simple protocol based on ``messages'' (integers) defined in the \verb`sockets.h` header file. Table~\ref{portmaster} illustrates the protocol. If the PortMaster is using its firewall capability, it immediately checks all of its temporary clients for approved machine status;~a~{\small PM\_SORRY} is issued immediately prior to the protocol in Table~\ref{portmaster} upon failure to be approved. The connection is then summarily severed. \begin{table}[thb] \begin{center} \caption{\bf The PortMaster Protocol} \vspace{.2in} \label{portmaster} \begin{tabular}{||l|l|l||} \hline\hline \multicolumn{1}{||c|}{\em Event} & \multicolumn{1}{c|}{\em Client Sends} & \multicolumn{1}{c||}{\em PortMaster Sends} \\ \hline\hline {\small PM\_CLIENT} & & \\ & & {\small PM\_OK / PM\_RESEND} \\ & "sktname" & \\ & & {\small PM\_OK / PM\_SORRY} \\ & & port \\ \hline {\small PM\_CLIENTWAIT} & & \\ & & {\small PM\_OK / PM\_RESEND} \\ & "sktname" & \\ & & {\small PM\_OK / PM\_SORRY} \\ & & port \\ \hline {\small PM\_CLOSE} & & \\ & & {\small PM\_OK / PM\_RESEND} \\ & port & \\ & & {\small PM\_OK / PM\_SORRY} \\ \hline {\small PM\_QUIT} & & \\ & & {\small PM\_OK / PM\_RESEND} \\ & "PortMaster" & \\ \hline {\small PM\_SERVER} & & {\small PM\_OK / PM\_RESEND} \\ & "sktname" & \\ & port & \\ & & {\small PM\_OK / PM\_SORRY} \\ \hline & {\small PM\_OK} & \\ \hline {\small PM\_TABLE} & & \\ & & {\small PM\_OK / PM\_RESEND} \\ & & count of servers \\ & & "server : port" \\ & & ... \\ \hline {\small PM\_FWINIT} & & \\ & & {\small PM\_OK / PM\_RESEND} \\ \hline\hline \end{tabular} \end{center} \end{table} As indicated in Table~\ref{portmaster}, the PortMaster handles more events than just the {\small PM\_SERVER} and {\small PM\_CLIENT} events mentioned earlier. When~a~client opens to the PortMaster, it identifies the type of service it wishes by sending that PortMaster~a~``message'': {\small PM\_SERVER}, {\small PM\_CLIENT}, {\small PM\_CLOSE}, {\small PM\_TABLE}, or {\small PM\_QUIT}. These messages are discussed below. Whenever the PortMaster does not understand the initial message (due to garbling or whatever), the PortMaster will immediately issue~a~{\small PM\_RESEND} message and then wait for data. It will continue doing so for up to {\small PM\_MAXTRY} times (in the \verb`sockets.h` file as sent, {\small PM\_MAXTRY} is defined as $20$). If the limit of re-tries is reached, the PortMaster will peremptorily close down the connection and go back to its usual quiescent state waiting for~a~new connection. The PortMaster will wait no more than {\small TIMEOUT} seconds for data, which is set to 20 seconds in \verb`Spm.c` as delivered. If that amount of time elapses, the PortMaster will summarily close down the temporary client and continue for more business. \begin{description} \item[{\small PM\_CLIENT}] tells the PortMaster that~a~client is attempting to open. The PortMaster normally responds with~a~{\small PM\_OK} and the program attempting to open~a~client responds with~a~null-byte terminated string (the requested server name). If the PortMaster finds the requested server in its list, then it responds with~a~{\small PM\_OK} and then the port number, otherwise it sends~a~{\small PM\_SORRY}. If the PortMaster is using~a~firewall, it may respond immediately with ~a~{\small PM\_SORRY} if the client is originating from an unapproved machine. \item[{\small PM\_CLIENTWAIT}] acts much like a {\small PM\_CLIENT}, except that the PortMaster will wait (block) before sending the final {\small PM\_OK} and port number. Thus clients can request a block until the desired server is up. \item[{\small PM\_CLOSE}] tells the PortMaster that~a~server is closing down. The PortMaster will normally respond with~a~{\small PM\_OK}; the program closing down the server (via {\em Sclose}) will then send the port number. The PortMaster will then remove the associated server from its internal list of servers and respond with~a~{\small PM\_OK} if the designated server was in its list and~a~{\small PM\_SORRY} otherwise. \item[{\small PM\_FWINIT}] tells the PortMaster to re-read its firewall datafile. The PortMaster will then respond with~a~{\small PM\_OK} if it worked or {\small PM\_RESEND} if something got garbled. \item[{\small PM\_QUIT}] tells the PortMaster that~a~shutdown command is to be sent. The PortMaster responds with~a~{\small PM\_OK}, and the program shutting down the PortMaster issues~a~null-byte terminated string, ``PortMaster'' (just to guarantee that~a~shutdown is really wanted). The PortMaster will then shutdown. This operation requires some knowledge of the protocol as no {\SSL} function is provided to make shutting down the PortMaster easy. However, the \verb`sktdbg` program does provide an easy way to shut down the PortMaster. Concerned system administrators may wish to remove the ``shut'' command from \verb`sktdbg`. Shutting down the PortMaster does not affect currently connected Sockets; however, new connections between servers and clients cannot be made. On the other hand, starting up~a~new PortMaster is easy and anyone may do so -- the \verb`Spm` program itself will refuse to allow two PortMasters to run concurrently (and will say so). \item[{\small PM\_SERVER}] tells the PortMaster that~a~server has been opened. The PortMaster will normally respond with~a~{\small PM\_OK} and then the program opening~a~server will send~a~string giving the new server's name and then will send its port. The PortMaster will then respond with~a~{\small PM\_OK} upon success or ~a~{\small PM\_SORRY} if~a~server by that name already exists. If the PortMaster is using~a~firewall, it may respond immediately with a {\small PM\_SORRY} if the server is originating from an unapproved machine. When PortMaster sharing is not operating, this event should never occur, as servers can then only be legally generated on the same machine that the PortMaster resides upon. The PortMaster enters its own host onto its internal firewall table whenever use of~a~firewall is enabled. \item[{\small PM\_TABLE}] tells the PortMaster to give out~a~list of the servers it currently knows about. Normally the PortMaster will respond with ~a~{\small PM\_OK},~a~count of servers (in network standard 2-byte format, see the Berkeley ``ntohs'' function for details), and~a~sequence of strings giving the server name and associated port number. The \verb`spmtable` program and \verb`sktdbg`'s ``table'' function use this facility. \end{description} \subsubsection{The PortMaster Firewall} The PortMaster supports~a~{\em firewall} to keep out socket requests from unapproved machines. The firewall consists of~a~list of machines' internet addresses in~a~file. One specifies the file by one of two methods: \begin{enumerate} \item Startup with \verb# Spm -f#{\em full-path-to-filename} \item Initialization of an environment variable, {\small SPMFIREWALL}, to the {\em full-path-to-filename}. \end{enumerate} The {\em full-path-to-filename} file contains records of the form: \begin{verbatim} * * number number number number \end{verbatim} where the four \verb`number`s are the internet addresses of the machines permitted to talk to the PortMaster. The \verb`*` indicates accept any number in that field. The firewall function examines incoming internet addresses by use of the {\em getpeername} function. The firewall file, often called {\em spmfirewall.dat}, may contain blank lines. The \verb`#` is assumed to begin~a~comment and is stripped off. \newpage \section{The Utilities} There are several utilities provided with the \SSL, and they are explained below. These are all complete programs in themselves, and can serve as lessons on how to use the \SSL. \begin{description} \item[sktdbg] \verb`server-name {s|c}` {\em sktdbg} is the \SSL's testing program. One may open server Sockets, accept Sockets, and client Sockets, test out how other program's Sockets are communicating, etc. See the subsection on {\em sktdbg} below. The ``server-name'' may take two forms: \verb`servername` or \verb`servername@machine-name`. The latter form may be used when attempting to open clients to servers residing on machines other than the one the user is currently running \verb`sktdbg` on. \item[spmchk] \verb`[machine]` This program tests the current machine by default, the named machine otherwise, for the presence of~a~PortMaster. It will return~a~0 if the PortMaster is present, or~a~1 otherwise, and is useful in scripts: \begin{center} spmchk \verb`||` (nohup Spm \verb`>` /dev/null \&) \end{center} Translated for non-csh/ksh users: if spmchk finds no PortMaster on the current machine, start one up in the background in ``no hangup on user exit'' mode, with output headed to the bit bucket. {\small (thanks go to Marty Olevitch for this program)}. For {\small VMS} users: \begin{center} \begin{minipage}[h]{5in} \begin{verbatim} spmchk:= [fullpath]spmchk.exe set noon spmchk if '$SEVERITY' .ne. 1 then run/detach [fullpath]Spm.exe set on \end{verbatim} \end{minipage} \end{center} \item[spmtable] \verb`[machine [machine [machine ...]]]` This program lists the servers and port numbers on the requested machines. If no machine is listed, then the current machine will be used. \item[srmsrvr] \verb`[server-name [server-name [server-name ...]]]` Sometimes the all-knowledgeable and omnipotent programmer finds~a~need to hit the control-c key or otherwise kill~a~running program with~a~server Socket. In such cases, the PortMaster does not get informed that the server has gone down. This utility will tell the PortMaster to forcibly remove the named server(s) from its list. \end{description} Except when using \verb`sktdbg` to open~a~server with \verb`sktdbg`, the server names above can also have the form \verb`srvr@machine-name`. This name specifies~a~server on~a~specific machine. Note that the machine-name is its normal abbreviation (ie.~hostname) or its full name (ie.~hostname.someplace.com). \subsection{The \texttt{sktdbg} Program} The \verb`sktdbg` program was originally~a~testing facility to debug the {\SSL} itself, but has proven exceptionally useful in debugging programs which use the \SSL. Consequently, it is provided as part of the package. To start up \verb`sktdbg`, one must choose between starting up~a~server or attempting to open~a~client Socket. \begin{example} Starting up~a~sktdbg Server \\ \label{sktdbg-srvr} sktdbg servername s \end{example} \begin{example} Starting up~a~sktdbg Client \\ \label{sktdbg-client} sktdbg servername c \end{example} One may also ask sktdbg to explain itself. \begin{example} sktdbg Explanation \\ \label{sktdbg-explain} sktdbg "?" \end{example} When the \verb`sktdbg` program is started, the first thing it does is attempt to create the requested type of Socket. Typically, attempts to make~a~server will succeed; if it doesn't, it will report~a~warning, apply Srmsrvr(), and try a~second time to open the server again. If it fails twice, then usually the PortMaster is not running on your machine. Attempts to open~a~client to~a~non-existent server also yields an error message: ``unable to Sopen(srvrname,c)''. If the server is up and running, then~a~client Socket will be set up. The \verb`sktdbg` program then prints out~a~little menu of actions that the user can take with it. \begin{table}[thb] \begin{center} \caption{sktdbg Help Menu} \label{sktdbg-help} \begin{verbatim} Socket Test Commands accept close fwinit fput get menu peek printf put q quit read rmsrvr scanf shutdown table test wait write ? ( 0 bytes) Enter: \end{verbatim} \end{center} \end{table} The ``Enter'' prompt now also shows the number of bytes waiting on the queue for reading. This number is updated only when the prompt is generated; ie. it is not~a~dynamic value, but is often useful. In Table~\ref{sktdbg-help}, there are 20 commands available, and are described below. \begin{description} \item[accept] \ Used by~a~server Socket to accept clients. Note that one may first do {\em test} to determine if~a~client is waiting. \item[close] \ Used by~a~server Socket to close down an accept Socket. \item[fput] \ This function takes~a~filename, {\em fput filename}, which sktdbg then opens. Every line in it, minus trailing white space, is sent via Sputs across the Socket. Sktdbg then closes the file. \item[fwinit] \ This call issues~a~{\small PM\_FWINIT} to the local machine's PortMaster. The PortMaster will then re-read the firewall data file that it was optionally started up with (if it had none, then this command will have no effect). The fwinit command is useful for the owner of the firewall data file to change it and have the PortMaster update itself without bringing down the PortMaster and restarting it. \item[get] \ Uses Sgets to get~a~null-terminated string from the client. This call will block until something arrives for up to 60 seconds. \item[isset] \ Uses Smaskwait() with negligible timeout (1 microsecond!) and then uses Smaskisset() to determine if the socket is read-ready. This function was included mostly for testing Smaskisset(). \item[menu] \ Repeats the {\em Socket Test Commands} menu (just like ``?'' below). \item[peek] \ Uses Speek to peek at what the client has sent. This call will not block, even if nothing is there yet. \item[printf] printf your-word Uses Sprintf to send "your-word 7 8. itworked!" through the Socket. \item[put] put your various sundry strings across Uses Sputs to send your strings on the same line through the Socket. \item[q] \ This function ``quits'' -- uses Sclose to close down all Sockets that \verb`sktdbg` is using and exits. Just like ``quit''. \item[quit] \ This function ``quits'' -- uses Sclose to close down all Sockets that \verb`sktdbg` is using and exits. Just like ``q''. \item[read] \ This function uses Sread to read whatever is on the Socket, and prints it out assuming that it received~a~string. \item[rmsrvr] rmsrvr server-name This function uses Srmsrvr to remove~a~server. \item[scanf] \ This function accepts~a~subset of format code: \%c, \%d, \%f, and \%s. It will call Sscanf once for each format code given to it. \item[shutdown] \ This function is {\em dangerous}! It will shut down the PortMaster on your current machine and perform~a~quit. Use of this function is strongly discouraged unless it is necessary to pull down~a~PortMaster. \item[table] \ The {\em table} function communicates with the PortMaster and prints out ~a~table of all current servers and their ports (rather like spmtable). \item[test] \ The {\em test} function prints out the number of bytes awaiting perusal by~a~get or read operation. It does not block, even if nothing is waiting -- it will return 0 in such~a~case. \item[wait] \ This function will block the process until something shows up on the accept or client Socket. \item[write] write your sundry thoughts and words This function will {\em Swrite} your words, appropriately null-byte terminated, through the Socket. It can be read by the {\em read} function. \item[?] \ Repeats the {\em Socket Test Commands} menu (just like ``menu'' above). \end{description} This program is really quite simple to learn and run, and is useful to help the installer verify that the {\SSL} is installed correctly. \newpage \section{Installation Instructions} Installation varies, of course, from operating system to operating system. \subsection{Unix} \begin{enumerate} \item Make~a~{\tt SKTS} subdirectory somewhere, and extract the contents of the tape into that subdirectory (typically, {\tt tar -xvop}, but systems will vary and you may need to specify~a~tape drive). \item If your machine is not {\small ANSI C} compliant, but supports prototyping anyway, edit the \verb`sockets.h` file to \verb`#`define {\small \_\_PROTOTYPE\_\_} for your machine. \item Type {\tt make all}. \end{enumerate} These instructions should result in the {\SSL} being compiled, the utilities being compiled, and the PortMaster being compiled. ~A~{\em simpleskts.a} library results. Although the PortMaster gets started by the make instructions, you may occasionally need to re-start it (for example, after the computer goes down). System administrators should know how to modify their operating system to automatically bring up the PortMaster during~a~re-boot. Users may wish to place \begin{center} \begin{tabular}{ll} setenv SKTPATH machine:machine:machine...` & csh users \\ export SKTPATH=machine:machine:machine...` & ksh users \\ SKTPATH:==machine:machine:machine...` & vms users \\ set SKTPATH=machine:machine:machine...` & msdos users \\ \end{tabular} \end{center} \noindent in their .login, .profile, login.com, and autoexec.bat respectively. To link to the \SSL, one must include ``sockets.h''. For example, under {\small UNIX}, a~user should have~a~{\small .HDR} subdirectory with all his/her favorite header files and use ``\verb`cc ... -I~/.HDR ... simpleskts.a`''. \subsection{Vms} \begin{enumerate} \item Make~a~{\tt SKTS} subdirectory somewhere, and extract the contents of the tape into that subdirectory. The original tape was~a~quarter-inch cartridge in Unix tar format, but you may well receive~a~different format. \item Type \verb`@makeskts` \end{enumerate} The ``makeskts'' command script will create several subdirectories, compile the \SSL, and set up~a~``simpleskts.olb'' library. It will {\bf not} attempt to start up the PortMaster. Change to the ``{\small EXE}'' subdirectory under the {\small SKTS} subdirectory. The PortMaster should be started via \verb`run/detach Spm`; you may or may not have sufficient privileges to do so. One may spawn the PortMaster, but as soon as you log off the PortMaster will rudely terminate. Due to the potential problem with privileges, the command script will not start up the PortMaster itself. In order to make use of command-line arguments for sktdbg, etc, {\small VMS} requires that you first make ``logical symbols.'' In your \verb``, place the following lines (with appropriately modified {\small YOURDIR}): \begin{center} \begin{tabular}{lcl} \$ spmchk & :== & \$[{\small YOURDIR.SKTS.EXE}]spmchk.exe \\ \$ spmtable & :== & \$[{\small YOURDIR.SKTS.EXE}]spmtable.exe \\ \$ spm & :== & \$[{\small YOURDIR.SKTS.EXE}]spm.exe \\ \$ srmsrvr & :== & \$[{\small YOURDIR.SKTS.EXE}]srmsrvr.exe \end{tabular} \end{center} \subsection{Windows 95 ( or more recent)} As of Version 2.08, the {\SSL} runs under Windows 95. One may have~a~PortMaster running in the background on those machines, too! Since the present author only has Borland C++, only that compiler has been tested. Other compilers may need to modify the \verb`<`Sinit.c\verb`>` file to include any \TCP\ initialization they may require. \begin{enumerate} \item Set up your system with an appropriate~C~compiler, Ethernet card, and \TCP. \item Copy the contents of onto your computer. \item Use gunzip and untar to get the uncompressed files \item Open~a~{\small MSDOS} console, change directory to ...\verb`\`{\COSMIC} \item mkwin95 \end{enumerate} The {\sf smplskts.lib} and various {\sf *.exe} files should be generated in the {\COSMIC} subdirectory. You may well want to have the Simple Sockets Library's PortMaster (Spm) always running in background. To accomplish this: \begin{enumerate} \item On your workbench, click the right mouse button \item Select {\sf New} \item Select {\sf Shortcut} \item Put the fully specified path to Spm.exe in the {\sf Command Line} dialog box. \item Put {\sf Spm} as the shortcut's name \item Right-mouse click on the {\sf Spm} shortcut \item Select {\sf Properties} \item Select the {\sf Shortcut} tab \item In the {\sf Run} dialog, left mouse click on the down arrow and select {\sf minimized}. \item Bring up Explorer \item Click on the \verb`+` in the left hand window near {\sf Windows} \item Click on the \verb`+` in the left hand window near {\sf Start Menu} \item Click on the \verb`+` in the left hand window near {\sf Programs} \item Double click on {\sf StartUp} \item Put the mouse cursor on the {\sf Spm} shortcut; press the right mouse button and drag it over the right hand Explorer window. \item Select {\sf Copy Here}. You will now need to re-boot your machine for this operation to take effect. \end{enumerate} \subsection{Older Ms-Dos} The {\SSL} was compiled and tested using the Wollongong {\TCP} package with MicroSoft~C~(v6.0). Other compilers and {\TCP} packages may require adjustment to the {\SSL} code. You {\bf must} have~a~\TCP package for your machine, however -- that is what provides Berkeley sockets over which the {\SSL} provides a~convenient overlay. Also, you {\bf must} have an Ethernet card for your machine -- that provides the hardware over which the information flows. Neither the {\TCP} package, the~C~compiler, nor the Ethernet hardware come with the \SSL. \begin{enumerate} \item The {\SSL} makes several assumptions, unfortunately, about where include files are (ex. see {\em Speek.c\/}). The installer will undoubtedly need to customize these include lines. These areas will always be in \verb`#ifdef MSDOS` ... \verb`#endif` zones. \item Acquire~a~\TCP package for your computer (ie.~Wollongong). \item Acquire~a~C compiler for your computer (ie.~Microsoft C, v6.0). \item Acquire an Ethernet card and {\TCP} address for your computer. \item Copy the contents of the provided diskette into your subdirectory. \item For those of you with the software mentioned in Table~\ref{msdos-swlist}: \begin{enumerate} \item Make~a~directory: \verb`c:\c600\socket` \item Make~a~directory: \verb`c:\c600\socket\exe` \item Copy {\em wintcp.lib} to \verb`c:\c600\socket` \item Copy {\em socket.lib} to \verb`c:\c600\socket` \item Copy {\em slibce.lib} to \verb`c:\c600\socket` \item Disable the {\small MSDOS} linker -- possibly by renaming it to {\em doslink}. Use the MicroSoft~C~linker instead. \item Return to the directory where you placed the {\SSL} software. \item Type {\em makeskt} (which will use the {\em Makeskt.bat} command script). This script will use {\em Makelib.}, compile, create the {\em smplskts.lib} library, and generate {\em sktdbg.exe}, {\em spmtable.exe}, and {\em srmsrvr.exe}. \item You should be done installing the software at this point. \end{enumerate} \item If your compiler is not {\small ANSI C} compliant, but supports prototyping, edit the \verb`sockets.h` file to define {\small \_\_PROTOTYPE\_\_} for your machine. \item Follow your compiler's directions to compile to object file format all the~C~files in \verb`SKTS` and \verb`SKTS\EXE`. \item Follow your compiler's directions to set up~a~``library'' (a {\tt .LIB} file) with all the {\tt .OBJ} files in the \verb`SKTS` subdirectory. \item Change to the \verb`SKTS\EXE` subdirectory and follow your compiler's instructions to link each of the object files, one at~a~time, to the ``smplskts.lib'' library, the {\TCP} library, and whatever libraries your compiler normally needs. \end{enumerate} The installation should yield~a~{\em smplskts.lib} (or something similar) library and three executable files (sktdbg.exe, spmtable.exe, and spmtable.exe). Note that the ``{\small SPM.EXE}'' file should not be generated; you could generate and execute it, but your clone could not use it as it does not allow the PortMaster to run in the background. No attempt has been made to insure that the PortMaster is actually compilable under MicroSoft C, either. Someday a~kludge to allow MS-DOS programs to be their own PortMaster may be developed, but that day is not yet. Using Wollongong \TCP, one will be restricted to three (or five if its ``kernel'' is rebuilt) clients. The software in Table~\ref{msdos-swlist} was used by the \IRL\ and is known to work properly with the \SSL. Other software may work but has not been tested. \begin{table}[h] \begin{center} \caption{\bf Ms-Dos Software known to work with the \protect{\small\bf SSL}} \label{msdos-swlist} \begin{tabular}{ll} \multicolumn{1}{c}{\em Software Product} & \multicolumn{1}{c}{\em Company} \\ MicroSoft C, v6.0 & MicroSoft \\ {\small Win/API} for {\small DOS}, v4.1 & The Wollongong Group, Inc. \\ & PO Box 51860 \\ & Palo Alto, CA 94303-4374 \\ & (415)-962-7100 \\ Wollongong Win/{\small TCP}, v4.1.1 & The Wollongong Group, Inc. \\ \end{tabular} \end{center} \end{table} \newpage \section{Appendix: Miscellaneous Functions} The {\SSL} uses nine functions from Dr.~Campbell's {\em xtdio} library; these have been gathered together and made part of the {\em simpleskts.a} library. Several of the functions use~a~special data file, {\em rdcolor.dat}. Note: the {\em error} and {\em outofmem} functions claim they will ``terminate'' under certain conditions. Actually, they will call the function {\em (*error\_exit)(int~rtn)}, which by default is the {\em exit} function. Programmers may easily prevent or otherwise control termination by simply setting {\em error\_exit} to point to some other function. \begin{description} \item[void error(int severity,char *fmt,...)] \ The {\em error} function prints out an error, warning, or note type of message to stdout. This function takes four kinds of ``severity'': {\small SEVERE}, {\small ERROR}, {\small WARNING}, and {\small NOTE}. Both the {\small SEVERE} and {\small ERROR} levels will {\em terminate} the program. The other two, {\small WARNING} and {\small NOTE}, will not do so. The termination action tends to enforce~a~standard for what errors versus warnings mean! If your terminal type is supported by the {\em rdcolor.dat} file (see rdcolor below), {\small SEVERE} and {\small ERROR} messages are printed with~a~red leader, {\small WARNING}s with~a~yellow leader, and {\small NOTE}s with~a~cyan leader. \item[FILE *fopenv(char *filename,char *ctrl,char *env\_var)] \ The {\em fopenv} provides~a~file opening service akin to that provided by the {\em Sopenv} function for the \SSL. The {\em fopen()} function will be used with the given filename and ctrl strings, and upon failure, the environment variable in {\em env\_var} will be used like a {\small PATH} variable in attempts to open the file in one directory after another (until success). If none of the {\em fopen\/}s succeed, then the {\em fopenv} function will return~a~{\small NULL} pointer. \item[void outofmem(void *ptr,char *fmt,...)] \ The {\em outofmem} function checks if {\em ptr} is {\small NULL}; if it is not, the function immediately returns. However, if the {\em ptr} pointer is in fact {\small NULL}, then the {\em fmt} and any subsequent arguments will be used like~a~regular printf to give~a~message to the user. The program will then terminate. \item[void rdcolor(void)] \ This function reads the {\em rdcolor.dat} file, which essentially is an extended ``termcap'' file. It uses the ``RDCOLOR'' environment variable with {\em fopenv} to search for the {\em rdcolor.dat} file. The function uses that file to set up various string variables ({\small RED}, {\small CLEAR}, -- see below). \item[void rdcputs(char *s,FILE *fp)] \ This function puts~a~string out to the {\small FILE} pointer {\em fp}, except that those strings ({\small XRED}, {\small XUWHITE}, etc.) are interpreted using the {\em rdcolor}-provided string instead. \item[char *sprt(char *s)] \ This function returns~a~pointer to~a~static buffer (there are four of them). The string {\em s} has all of its characters made into ``visible'' forms: control characters become \^A through \^Z and characters with {\small ANSI} values greater than or equal to $128$ are made into \verb`~###` sequences. Characters which are normally visible are left unchanged. \item[void srmtrblk(char *s)] \ This function removes any trailing ``blanks'' (white space) from the end of~a~string. \item[char *stpblk(char *p)] \ This function returns~a~pointer to the first non-white space character in the string {\em p} (ie.~steps past blanks). \item[char *stpnxt(char *s,char *fmt)] \ This function returns~a~pointer to the first character in {\em s} which would not have been read by~a~{\em sscanf(s,fmt,...)} function. Useful for quick and dirty parsing. \item[char *strnxtfmt(char *fmt)] \ The {\em strnxtfmt} function returns~a~pointer to the beginning of the (next) format code substring. If {\em fmt} is {\small NULL}, then the previous format string is used (ie.~a pointer to the last {\em fmt} code is retained and the~a~pointer to the next format code pointer will be returned). This function bears some similarity to {\small strtok} except that it jumps from format code to format code (used by Sscanf). \end{description} The {\em rdcolor.dat\/} file describes terminal escape sequences to use to control color and~a~few other actions. Each line which does not begin with~a~white space character is assumed to be~a~terminal line: terminal types are separated by vertical bars and the line is terminated by~a~colon. There are~a~number of strings defined (see Table~\ref{rdcolor}). \begin{table}[thb] \begin{center} \caption{rdcolor.dat strings} \label{rdcolor} \begin{tabular}{||l|l||} \hline\hline {\em String Name} & {\em Function} \\ \hline {\small BLACK} & subsequent chars are black \\ {\small RED} & subsequent chars are red \\ {\small GREEN} & subsequent chars are green \\ {\small YELLOW} & subsequent chars are yellow \\ {\small BLUE} & subsequent chars are blue \\ {\small MAGENTA} & subsequent chars are magenta \\ {\small CYAN} & subsequent chars are cyan \\ {\small WHITE} & subsequent chars are white \\ & \\ {\small UBLACK} & subsequent chars are underlined and black \\ {\small URED} & subsequent chars are underlined and red \\ {\small UGREEN} & subsequent chars are underlined and green \\ {\small UYELLOW} & subsequent chars are underlined and yellow \\ {\small UBLUE} & subsequent chars are underlined and blue \\ {\small UMAGENTA} & subsequent chars are underlined and magenta \\ {\small UCYAN} & subsequent chars are underlined and cyan \\ {\small UWHITE} & subsequent chars are underlined and white \\ & \\ {\small RVBLACK} & subsequent chars are reverse-video and black \\ {\small RVRED} & subsequent chars are reverse-video and red \\ {\small RVGREEN} & subsequent chars are reverse-video and green \\ {\small RVYELLOW} & subsequent chars are reverse-video and yellow \\ {\small RVBLUE} & subsequent chars are reverse-video and blue \\ {\small RVMAGENTA} & subsequent chars are reverse-video and magenta \\ {\small RVCYAN} & subsequent chars are reverse-video and cyan \\ {\small RVWHITE} & subsequent chars are reverse-video and white \\ & \\ {\small NRML} & subsequent chars are ``normal'' \\ {\small BOLD} & subsequent chars are ``bold'' \\ {\small CLEAR} & the screen is cleared \\ \hline\hline \end{tabular} \end{center} \end{table} Escape sequences may include the sequence \verb`\e` for the {\small ESCAPE} character and \verb`\b` for~a~blank. Please see the {\em rdcolor.dat} file for examples. \end{document} dmucs-0.6.1/COSMIC/DOC/sockets.txt0000644000175000017500000024201110360753042014551 0ustar samsam The Simple Sockets Library Version 2.09 Charles E. Campbell, Jr., Ph.D. Terry McRoberts April 18, 2001 Abstract The Simple Sockets Library (SSL) allows C programmers to use interprocess com- munications via Berkeley sockets simply and quickly. The programmer is able to move information easily between processes on the same or different machines connected via Ethernet (tm) and using the TCP/IP protocol. Most of the SSL's functions resemble C's file i/o functions, so C programmers will find the SSL easy to learn. The SSL currently runs under various UNIX (tm) machines: IRIX (tm) (Silicon Graphics), SunOS (tm) (Sun), Domain O/S (tm) (Apollo), Ultrix (tm) (Dec), AIX (tm) (IBM), SCO (tm) , OSF (tm) , and VMS 5.x (tm) , and MS-DOS (tm) (using Borland C++ 5.0). Keywords Socket Interprocess CommunicationsIntermachine Communications Berkeley Sockets Ethernet TCP/IP Robotics Machine Control Contents 1 Introduction 1 2 The Library 3 2.1 User Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 Reference Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.3 Hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3 The PortMaster 16 3.1 Users Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.2 Sharing PortMasters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.3 Theory of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.3.1 The PortMaster Firewall . . . . . . . . . . . . . . . . . . . . . . . . . 21 4 The Utilities 22 4.1 The sktdbg Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5 Installation Instructions 27 5.1 Unix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.2 Vms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.3 Windows 95 ( or more recent) . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5.4 Older Ms-Dos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 6 Appendix: Miscellaneous Functions 31 1 Introduction The Simple Sockets Library (henceforth to be abbreviated as the SSL) allows C programmers to develop systems of cooperating programs using Berkeley streaming Sockets running under the TCP/IP protocol over Ethernet. The SSL provides simple ways to move information between programs running on the same or different machines and does so with little overhead. During experiments with the Sreadbytes and Swrite functions, for example, between two machines, a 44; 000 bytes/second transfer rate was achieved with 4 bytes per packet and over 1; 000; 000 bytes/second was achieved with 128 bytes per packet. Of course, heavily loaded networks will affect the rate individual users achieve. The SSL provides two-way communications. The SSL was designed to resemble the FILE i/o system provided by the standard C li- braries (ie. fopen, fclose, fputs, etc. map to SSL analogs Sopen, Sclose, Sputs, etc.). Thus, C pro- grammers typically find the SSL easy to learn. A good analogy for the SSL refers to the phone system. There are three types of Sockets supported by the SSL that concern the user: a server, a client, and an accept socket. A server is analogous to someone waiting by several phones for a call, a client is analogous to someone making a call, and an accept is analogous to a (server) person accepting the call by picking up one of the phones. Thus, one must have a server for a client to make a successful connection. The server must in turn accept the connection. Unlike our overworked server person, however, the computer using the SSL is perfectly happy handling multiple \accept" Sockets concurrently. The SSL itself is provided in three main parts (see Table 1). The Library is composed of C functions and the PortMaster and the Utilities are self-contained programs. Table 1: The Three Parts of the SSL Library The functions that the users will link to are in the library. PortMaster The PortMaster is a daemon program which runs in the background. It allows clients to connect to servers using any available ports. UtilitiesThere are several utility programs provided with the SSL: sktdbg, srmsrvr, and spmtable. The SSL has been in use at NASA's Goddard Space Flight Center's Intelligent Robotics Laboratory (IRL) since May, 1991. The software appears to be stable at the current writing and reasonably robust. For example, the PortMaster, a background process provided in the SSL distribution, is resistant to hanging (and thereby being unresponsive). It uses Stimeoutwaits (see the Reference Manual) to return to its normal quiescent mode when communications with one of its clients ceases unexpectedly. The IRL uses the SSL to control its three robots; its use of the Ethernet is consequently somewhat heavy. Those of you who wish to control machinery or otherwise present a heavy 1 load may wish to purchase a \bridge" to isolate your machines from your local network. This isolation will benefit both the you and the network, as the heavy user will not be afflicted with slowdowns due to the network and the network will not be bothered with lots of packets which slows all its users down. Please contact COSMIC if you have serious difficulties (ie. bugs) with the SSL. 2 2 The Library ||| |||| The user of the SSL accesses|it|by|linking|his|or|her program to a library. A software library is typically a single file|which|consists|of|some|linkage|information along with pre-compiled object code; unfortunately,|methods|for|producing|a|library|and linking to it vary from system to system and compiler to|compiler.|Directions|for|several|systems|appear in the Section on Implementation. |||| || Practically speaking, a|library|is|composed|of a number of pre-compiled C functions to be utilized by the programmer.|The|calls|made|available|in|the SSL are reminiscent of those used by the various file functions|in|the|C|language|(see Table 2). ||||| ||||| ||||| ||||| |||||| Table 2: Simple|Sockets|and|Related|File|I/O|Functions||| |||| ___|___|File|FunctionS___ocket|Function ___ ___ ___|___|fopen||Sopen ___ ___ ___ ___|___|fclose|Sclose|___ ___ ___ ___|___|fread| Sread ___ ___ ___ | ___|___|fwrite|Swrite ___ ___ ___ | ___|___|fgets| Sgets ___ ___ ___ ___|___|fputs||Sputs ___ ___ ___ ___|___|fprintfSprintf___| ___ ___ || ___|___|fscanf Sscanf ___ ___ ___ The Sockets library depends upon the PortMaster running on your host machine. Only one copy of the PortMaster need be running at any time on a given machine, and may be started up by anyone by running the Spm program in the background. On Unix, the Spm program will put itself into the background. One may determine if your system has a Port- Master running by typing spmtable first { it will inform you of any existing servers if the PortMaster is up or tell you that the PortMaster is not up otherwise. A new feature of the SSL allows servers to share another machine's PortMaster. Thus, the SSL supports both distributed and centralized socket name to port mapping. If the machine on which a server is to run doesn't have a PortMaster, such as older MSDOS machines, then it can \borrow" another machine's PortMaster. A program may open a server Socket, a client Socket, or an accept Socket. Following the phone system analogy, assume that a server Socket is opened first. Then, a different program may open a client Socket which attempts to connect to the server { it succeeds when the server program \notices" that there is a connection waiting on the server Socket and then generates an accept Socket. The client Socket can open, however, before the server accepts the client; there just won't be any two-way communication until the server does accept the client. 3 2.1 User Guide Software using C must #include "sockets.h" and must link to the SSL. Directions for doing so will vary from system to system and also depend upon where the installer placed the libraries. Please refer to your compiler documentation and the SSL installer to know how to set up library linkage paths and for the include path to the sockets.h file. The software below illustrates some typical Socket code fragments to get a connected socket, assuming that the sockets.h file is on your compiler's include search path. If the sockets.h file has been placed in a standard system directory (not wise - updates to the compiler may wipe it off!) then you may have to substitute #include for #include "sockets.h" in the following examples. Example 2.1 A server with one accept #include "sockets.h" Socket *server; Socket *skt; server= Sopen("servername","s"); skt = Saccept(server); ... Sclose(skt); Sclose(server); Note in Example 2.1 that the servername is completely up to the programmer to select. Please note that all servers share the same namespace on any given machine, however. Example 2.2 A server with multiple accepts #include "sockets.h" Socket *server=NULL; Socket *skt=NULL; server= Sopen("servername","s"); do { skt = Saccept(server); ... Sclose(skt); } while(whatever); Sclose(server); Again, the programmer may select any servername. Note that the accept Socket (\skt") is re-used in Example 2.2. Example 2.3 A client #include "sockets.h" Socket *client; client= Sopen("serverName","c"); ... Sclose(client); 4 In Example 2.3, the serverName may be in the optional form serverName@machineName. Without the machine name specification, the PortMaster on the machine that the client is running on will be searched for the server. The smsrvr.c and smclient.c example programs provided in the SSL distribution give complete illustrations of Examples 2.1 and 2.3. Example 2.4 Using Sopenv #include "sockets.h" Socket *client; while(1) { client= Sopenv("serverName","c","SKTPATH"); if(client) break; sleep(1); } ... Sclose(client); The SSL allows the programmer to set up a group of machines for making client con- nections. In Example 2.4, the SSL tries to open a client to a server named serverName on any machine on the SKTPATH. The \SKTPATH" is an environment variable typically of the form machine1:machine2:machine3, ie. a list of machine names separated by colons. This example also shows a typical client connection attempt and sleep polling loop. A somewhat larger example is included in the distribution: multiskt.c. This example program concurrently accepts multiple clients on a single server, reads any messages sent its way from any of its clients, and sends a modified version back to the sending client. It uses the Smaskwait functions to block the multiskt process for friendly multi-tasking. It is a useful program to study in conjunction with the Manual below. Connected sockets are a pre-requisite for any of the I/O Socket functions described in the next section. Note that the server should have a unique name on any given machine. Servers may have the same name on different machines, although this may be confusing. It is suggested that one use the name of the process (at least as a prefix) for that purpose. Note that the only things that one can do with a server Socket are: open one, close one, generate an accept Socket with one, and test/block on one (for clients requesting connection). The SSL supports up to 10 clients concurrently awaiting acceptance on a server Socket, although many machines will limit that to 5 (silently). The SSL supports two way communication of data between a client and an accept Socket. Since the processes are not likely to be synchronized, often one process must somehow wait until the other process has sent it something. There are two methods to support this under the SSL: polling and interrupt-driven. The polling method uses a lot of CPU time, but lets the program do other tasks in the meantime. The interrupt-driven approach hangs the process (aka blocks and suspends) until something shows up on the Socket. The SmaskXXX group of functions allows one to hang the process until something shows up on any number of Sockets { sort of a big OR gate! The SmaskXXX alternative to polling also allows the programmer to insert non-socket file descriptors into the mask via Smaskfdset (and to remove them via Smaskunfdset) such as serial ports (ex. open with DEVICE), graphics queues (ex. SGIs with qgetfd), etc. 5 || || || || ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| |||||| ||| ||| ||| ||| ||| 2.2 ||Reference|Manual| ||||| This section|contains|a|description|of the functions available in the Socket Library. The SSL returns|three|types|of|Sockets:|a server, client, and an accept Socket. A Socket itself ||| is a data|structure|type|set up by the sockets.h header file. The Socket is deliberately used in a fashion|reminiscent|of|the|use|of|FILE pointers so that the C user who knows how to read and|write|a|file|will|immediately|feel comfortable with reading and writing Sockets. ||| ||| | ___|___ Return ___Function Ar___gument ___ ___ | ___|___ Type ___Name ___List ___ ___ ___ ___ Socket * ___Saccept (S___ocket *skt) ___ ___ ___ ___ void ___Sclose (S___ocket *skt) ___ ___ ___|___|char| * ___Sgets (c___har *buf, int maxbuf, Socket *skt) ___ ___ | ___|___|int| ___Smaskfdisset(i___nt fd) ___ ___ | ___|___|void| ___Smaskfdset (___int fd) ___ ___ ___|___|fd|set|| ___Smaskget (___) ___ ___ ___|___|int| ___Smaskisset (S___ocket *skt) ___ ___ || ___|___|void ___Smaskpop ___() ___ ___ ___|___|void|| ___Smaskpush (___) ___ ___ ___|___|void|| ___Smaskset (___Socket *skt) ___ ___ ___|___|int|| ___Smasktest (___) ___ ___ ___|___|void|| ___Smasktime (___long seconds,long useconds) ___ ___ ___|___|void|| ___Smaskunset (___Socket *skt) ___ ___ ___|___|void|| ___Smaskunfdset(___int fd) ___ ___ ___|___|void|| ___Smaskuse (___fd|set usermask) ___ ___ ___|___|int| ___Smaskwait (___) ___ ___ | ___|___|Socket| * ___Sopen (___char *skthost, char *mode) ___ ___ ___|___|Socket||* ___Sopenv (___char *srvrname,char *ctrl,char *envvar) ___ ___ ___|___|int| ___Speek (___Socket *skt, char *buf, int buflen) ___ ___ || ___|___|unsigned long_Speeraddr (S___ocket *skt) ___ ___ || ___|___|char * ___Speername (___Socket *skt) ___ ___ ___|___|void|| ___Sprintf (S___ocket *skt, char *fmt,...) ___ ___ ___|___|char|| * ___Sprtskt (S___ocket *skt) ___ ___ ___|___|void|| ___Sputs (___char *buf, Socket *skt) ___ ___ ___|___|int|| ___Sread (___Socket *skt, char *buf, int buflen) ___ ___ ___|___|int|| ___Sreadbytes (S___ocket *skt, char *buf, int buflen) ___ ___ ___|___|int|| ___Srmsrvr (___char *skthost) ___ ___ ___|___|int| ___Sscanf (S___ocket *skt, char *fmt, ...) ___ ___ | ___|___|int| ___Stest (S___ocket *skt) ___ ___ | ___|___|int| ___Stimeoutwait(S___ocket *skt,long seconds,long useconds) ___ ___ ___|___|int|| ___Svprintf (S___ocket *skt, char *fmt, void *args) ___ ___ ___|___|int| ___Swait (___Socket *skt) ___ ___ || ___|___|int ___Swrite (S___ocket *skt, char *buf, int buflen) ___ ___ 6 Socket *Saccept(Socket *skt) This function takes a server Socket and produces a Socket which has accepted a con- nection. This function may be used as often as wanted on the same server Socket! Note that one must have successfully opened a server prior to using Saccept to accept connections (see Examples 2.1 and 2.2). If this operation is unsuccessful, then Saccept will return a null Socket pointer. void Sclose(Socket *skt) This function closes a Socket of any type (server, client, accept). The Sclose function communicates with the local PortMaster whenever a server is closed. char *Sgets(char *buf, int maxbuf, Socket *skt) This is an I/O function which assumes that one has already opened a connected Socket (skt). It will attempt to get a null-terminated string from the Socket (up to maxbuf characters). This call will block (aka hang, sleep) until a string shows up, but otherwise acts much as a fgets() function does. If Sgets has a socket error, then a null pointer is returned. Otherwise, it returns the \buf" pointer. int Smaskfdisset(int fd) The Smaskfdisset() function works in conjunction with the Smaskwait() function. After the Smaskwait() function returns, one can use Smaskfdisset(skt) to test if a particular file descriptor is read-ready. void Smaskfdset(int fd) The SmaskXXX functions use a mask of type fd|set internally. Other operations, such as use of a serial port under Unix or the GL queue for SGI's Irises (see their qgetfd() function) use file descriptors. This function allows one to set up the SmaskXXX mask with one or more of those file descriptors. Smask Smaskget() The SmaskXXX functions use a mask of type fd|set internally. Other operations, such as use of a serial port under Unix, can also be used to set masks. This function provides access to the mask set up by Smaskset. The mate to this function is Smaskuse(). int Smaskisset(Socket *skt) The Smaskisset() function works in conjunction with the Smaskwait() function. After the Smaskwait() function returns, one can use Smaskisset(skt) to test if a particular Socket is read-ready. It is simpler then and thereby faster than Smasktest(). void Smaskpop() The Smaskpop() function, along with the Smaskpush() function, allows the program- mer to manipulate an internal stack of masks. The \top" mask is the current mask. 7 void Smaskpush() The Smaskpush() function, along with the Smaskpop() function, allows the program- mer to manipulate an internal stack of masks. The \top" mask is the current mask. void Smaskset(Socket *skt) This function is part of the SmaskXXX group. Sockets may be set up for Smaskwait'ing one at a time. Note that all Sockets are effectively OR'ed together for blocking; to clear the mask, pass a NULL Socket pointer to Smaskset: Smaskset((Socket *) NULL);. int Smasktest() This function is part of the SmaskXXX group. The Smasktest function supports polling { one may determine if anything is on any of the Smaskset Sockets and immediately receive a positive integer if there is, a 0 if there isn't, and a negative number if there's an error. void Smasktime(long seconds,long useconds) This function is part of the SmaskXXX group. Normally Smaskwait will block \forever" (well, at least as long as the machine stays up!). However, one can specify a time limit { then Smaskwait will return with a value of 0 if the time limit is exceeded. One may specify the time limit in seconds and micro-seconds. To clear the time limit (ie. restore Smaskwait to waiting forever), pass a negative time in either or both arguments to Smasktime. Waiting forever is also set up when both arguments to Smasktime are zero. void Smaskunfdset(int fd) This function is part of the SmaskXXX group. File descriptors may be entered into the mask via the Smaskfdset() function, and this function can remove it from the mask. This function is similar to the Smaskunset() function. void Smaskunset(Socket *skt) This function is part of the SmaskXXX group. Sockets may be removed from the Smaskwait's mask one at a time via this function. Like Smaskset, a Smaskunset((Socket *) NULL); will clear the entire mask. void Smaskuse(Smask usermask) This function is part of the SmaskXXX group. The internal mask in SmaskXXX can be set up by the user via this function. Often, Smaskset will be used to set up an internal mask, Smaskget will be used to obtain the resulting mask, and Smaskuse will be used to apply that mask. int Smaskwait() This function is part of the SmaskXXX group. The Smaskwait function will block (aka hang) the process until any Socket set via Smaskset has something waiting on it to be read. Note that Sockets set by Smaskset are retained; ie. they must be explicitly cleared by passing a NULL Socket pointer to Smaskset. 8 | | || || || || || || || || || || || || ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| |||| ||||| ||| ||| ||| ||| |||| Smaskwait|returns|a|positive|number|if something is waiting on a Socket, zero if a time- out occurs,|and|a|negative number on an error. ||| |||| Socket *Sopen(char|*skthost,|char|*mode)|| This function|is|the|workhorse|for|opening|Sockets. Basically, it can make either a server or a client|depending|on|the|mode.|| ||| ||| || ___|Mode|| Effect ___ ___|| s open a server ___ ___|| S open a server but, on failure, retry after using Srmsrvr ___ ___|| c open a client ___ ___||s###open a server with the specified port number ___ ___|S###like S above, but with the specified port ___ | ___| c###open a client to a server with the specified port ___ The skthost is the name of the server. If one is making a client Socket, then one may optionally use the form \servername@hostname" for the skthost. The \@hostname" form is not necessary for clients to servers that are on the same host as the client, as the default host is the local host. The \servername@hostname" form makes no sense for servers, and so, for opening servers, Sopen will ignore any \@hostname" portion of skthost. The \S" mode for opening servers, like the \s" mode, will cause Sopen to attempt to open a server, but if unsuccessful, Sopen will then use Srmsrvr using the provided skthost and then retry opening the server. In the case of s### or S###, the servers are set up with the TCP/IP option SO|REUSEADDR. This option alleviates some of the difficulties associated with re-starting servers with fixed ports. If the skthost is null or an empty string (""), the PortMaster is bypassed. One must specify a port number to use in that case. A warning is issued (as well as a null Socket*) because that is typically a programming error, not a user error. The PortMaster is also always bypassed for clients which specify port number (c###). In the latter case, a client connection is immediately attempted to the user-specified port number. If the function is not successful, a null Socket pointer is returned. If the user-specified server port mode is used with a skthost, the server will be registered with its PortMaster; clients need not use specified-port mode to connect (ie. they may set mode to "c") so long as they specify the correct name of the server. PortMaster sharing (by setting the environment variable PMSHARE) causes servers to work with the PMSHARE-specified machine's PortMaster. Clients should use the name of the machine that the PortMaster is on; the eventual connection will be made with the appropriate server program, even though it is running on a different machine than the PortMaster it uses. See Example 3.1 for an illustration of how PortMaster sharing works. 9 Socket *Sopenv(char *srvrname,char *ctrl,char *envvar) The Sopenv function is used to open client Sockets, but is formulated to resemble the Sopen function with one additional argument. Assuming your computer system supports the concept of environment variables, the Sopenv function can use an en- vironment variable of your choice to help it open a client. Typically, a SKTPATH environment variable gets set up by the user with a colon-separated list of machine names (ex. setenv SKTPATH \gryphon:dragon:xorn"). The Sopenv function attempts to open a client to a server of the given name on the current machine first, and then attempts to do so on each machine in the given sequence. If env_var is NULL or a null string, then SKTPATH will be used instead. If successful, a Socket pointer is returned, otherwise a NULL Socket pointer is returned. Please see Saccept on how to use servers. int Speek(Socket *skt, char *buf, int buflen) The Speek function behaves like Sread | up to buflen bytes, the buffer will be filled by whatever is currently on the Socket. This function does not remove those bytes from the Socket, however, and those bytes will be returned again on subsequent Speek, Sread, etc. calls. This function does not||block (aka hang, sleep). It will return EOF on select error, some negative number on recv error, zero if no data is present on the Socket, and a positive count of the available bytes otherwise. In the latter case, buf will have a copy of the bytes available. MS-DOS: Speek will only return a 1 when data is available on the Socket, not the number of bytes available. Furthermore, the buffer buf will be a zero-length string with just a null byte. unsigned long Speeraddr(Socket *skt) The Speeraddr function returns the internet address of the peer Socket. char *Speername(Socket *skt) The Speername function returns the name of the peer Socket. Internally, it has three buffers; thus it can be used up to three times in the same printf statement. void Sprintf(Socket *skt, char *fmt,...) The Sprintf function acts in an analogous fashion to fprintf, sprintf, etc, by putting formatted strings, appropriately null byte terminated, through the Socket. Thus, one may use either Sgets or an appropriate Sscanf to receive the information. char *Sprtskt(Socket *skt) The Sprtskt function returns a string describing the Socket. void Sputs(char *buf, Socket *skt) The Sputs function puts a null byte terminated string on the Socket in a fashion analogous to fputs. 10 int Sread(Socket *skt, char *buf, int buflen) The Sread function is similar to the read function in Unix. This function can block (aka hang, sleep) if nothing is on the Socket. Otherwise, it will return up to buflen bytes in the buffer \buf". This function will return whatever is on the Socket, and doesn't try to insure that buflen bytes are read. It returns the number of bytes read from the Socket. On error, an EOF is returned. int Sreadbytes(Socket *skt, char *buf, int buflen) The Sreadbytes function behaves much like Sread, and it too can block (aka hang, sleep) if nothing is on the Socket. However, it will not return until buflen bytes are read from the Socket and placed in \buf". On error, an EOF is returned. int Srmsrvr(char *skthost) The Srmsrvr function is made available to take care of those situations when skt = Sopen(\servername",\s") fails because the servername has been inadvertently left in the PortMaster's PortTable. This untoward event can happen, for example, when a process is aborted/exited without calling Sclose on its server(s). The Srmsrvr function will remove a server (or server@host) from the PortMaster's PortTable. Note: it will not|| close the associated Socket, nor free up any Socket memory, and is not||a substitute for Sclose. The Srmsrvr function will return either PM|OK (if successful) or PM|SORRY (other- wise). int Sscanf(Socket *skt, char *fmt, ...) The Sscanf function acts much the same as sscanf and fscanf, taking format strings and additional arguments in a like manner. The arguments Sscanf takes, of course, must all be appropriate pointers. This function will block if insufficient data is available on the socket according to the fmt. The Sscanf function returns the number of arguments for which it read data, which may be zero or incomplete if a socket error occurred. Normally, the returned count should equal the number of arguments with which Sscanf was provided. int Stest(Socket *skt) The Stest function allows one to determine if anything is available on the specified Socket, without blocking. It will return EOF on select error, some negative number on recv error, zero if no data is present on the Socket, and a positive count of the available bytes otherwise. MS-DOS: Stest will only return a 1 when data is available on the Socket, not the number of bytes available. 11 int Stimeoutwait(Socket *skt,long seconds,long useconds) The Stimeoutwait function blocks on the given Socket, but for no longer than the number of seconds plus the number of microseconds specified. The function returns the number of bytes available on the Socket (which may be zero), -1 if there was an error, and -2 on timeout. int Svprintf(Socket *skt, char *fmt, void *args) The Svprintf function reads bytes using a printf family format string from the Socket. As each format code is processed, the associated argument is changed in the args vector. It returns the number of format items processed. int Swait(Socket *skt) The Swait function will block (aka hang, sleep) until the specified Socket has data available. It will return EOF on select error, some negative number on recv error, zero if no data is present on the Socket, and a positive count of the available bytes otherwise. int Swrite(Socket *skt, char *buf, int buflen) The Swrite function will write buflen bytes from the buf buffer onto the specified Socket. The function will return a count of the number of bytes transmitted through the Socket, which should be equal to buflen. If the output is less than buflen, then an error occurred while writing to the Socket. 2.3 Hints The Hints below have been found useful at the Intelligent Robotics Laboratory at the God- dard Space Flight Center. They are based on almost a year's experience with the SSL. 1.The \Sscanf" function is dangerous. It will block until all of the format codes in its fmt string have been used. If somehow a programmer sends an improper string and Sscanf is used to receive it, then the receiving program will probably hang for quite a while. Dr. Campbell has found that it is somewhat safer to use Sgets to get an entire string from the Socket and then use sscanf and stpnxt to parse it. 2.Polling is unfriendly to other processes { it wastes a tremendous amount of CPU time merely querying the Socket(s) to see if anything is awaiting action. The various blocking functions are much better: Swait, Stimeoutwait, SmaskXXX, etc. 3.Unless your processes will always run on the same kind of machine, portability con- siderations argue against using Sread and Swrite to move non-character string data around { ie. floats, doubles, and even ints. Even if the programmer tests out the ma- chines and verifies that (s)he can safely move, say, a double around, or even a vector of doubles, data structures (struct XXX { ... }) may have \holes" in them placed there for word or byte alignment reasons. These \holes" may not be there (or may be placed differently) by other machines and compilers. 12 4.The Srmsrvr function is a rather rude function { there is no ownership check of a server. Please use your process name (or your id) as part of your server name so that servers do not clash. Remember: your server's name is in only one \name space" shared by all users on your machine. 5.For those of you who wish to use other services (ex. serial ports) which can use the select function provided by TCP/IP , check out Smaskfdset and its mate, Smaskunfdset. 6.The IRL has been using a leading two character command convention: tp~L~x~y~z rx ry rz will tell the \left" T3 robot to move to \x y z" (inches) in space with an orientation of \rx ry rz" degrees (roll, pitch, yaw). Longer words provide more readability but take up more bandwidth. Experimentally, Dr. Campbell has found that TCP/IP can transfer about 10,000 packets per second with up to 128 bytes in a packet. Loaded systems will, of course, achieve less throughput. 7.It is a good idea for clients to inform servers that they are quitting. The IRL has used the following convention: tq tells the server that the messaging client is quitting. Also, a tQ tells the server to shut itself down. The server then emits a tq to all of its clients to inform them that the server is shutting down (except for the one client who issued the shutdown command), and then closes itself down with Sclose. 8.The server-client relationship is intimately involved with object-oriented messaging { refer to the literature on object-oriented concepts. 9.The SSL can be used to support a no startup sequencing paradigm. Typically, clients who attempt to Sopen and fail should go into a poll - sleep loop: Example 2.5 Client Socket Polling skt= Sopen("servername","c"); while(!skt) { sleep(1); skt= Sopen("servername","c"); } The multiskt.c program illustrates how servers should be able to accept multiple clients using blocking judiciously. This non-sequencing approach allows one to bring up programs which have servers and/or clients without worrying about what comes first. For two programs, this isn't terribly serious, but at the IRL numerous programs providing numerous services are available and sequencing would be a nightmare. 10.As alluded to earlier, clients should tell servers and servers should tell clients when they are going down. The program that is not quitting should return to an \awaiting another client (or server)" mode (ie. see the preceding item). Thus, a troublesome program can be brought down, the programs to which it is communicating will gracefully terminate 13 their connections, and the programmer can then (hopefully) fix the problem. When the program is restarted, the non-sequencing approach will allow the program to seamlessly re-enter into communications with the other software. 11.When a machine is down, and an attempt to connect a client Socket using either Sopen directly or Sopenv to a server either normally or possibly on that machine, the Sopen will fail but will take an inordinately long time doing so (connection timeout). 12.When a program dies abruptly, connected Sockets appear to select() to have something on them (select is used by Stest, Smasktest, Swait, Smaskwait, Speek, Stimeoutwait). Hence, functions which normally block (Smaskwait, Swait) no longer block. On com- puters which can MSG|PEEK (Unix, Vms), the Stest, Speek, Sgets, and Sscanf func- tions will detect this situation and will return an error indication (EOF, NULL pointer, incomplete argument processed count) to indicate that the Socket has a problem (one should then Sclose the affected Socket). Furthermore, attempts to write to such dead Sockets may generate SIGPIPEs on Unix boxes. Unix programmers should write and install signal handlers for SIGPIPEs. 13.For multiple concurrent Sockets, one should generate routines for both closing and opening them. Example 2.6 Client Opening Function #include "sockets.h" typedef struct clientlist_str ClientList; struct clientlist_str { Socket *skt; ClientList *nxt,*prv; } ClientList *clhd=NULL; ClientList *cltl=NULL; ... ClientList *openClient(char *srvrname) { Socket *skt; ClientList *clist; while(1) { skt= Sopen(srvrname,"c"); if(!skt) sleep(1); } clist= (ClientList *) malloc(sizeof(ClientList)); if(cltl) cltl->nxt= clist; else clhd = clist; clist->prv= cltl; clist->nxt= NULL; 14 cltl = clist; Smaskset(skt); clist->skt= skt; return clist; } The openClient() function polls once a second in attempting to open a client Socket. Once it succeeds, a ClientList data structure is allocated, double-linked, and a pointer to it returned. In addition, the new client Socket is added to the Smask. Example 2.7 Client Closing Function void closeClient(ClientList *clist) { if(clist) { Smaskunset(clist->skt); Sclose(clist->skt); clist->skt= NULL; } } The closeClient() function removes the client Socket from the Smask system, closes the Socket, and then sets the skt pointer to NULL to guarantee that the now dead socket won't be inadvertently re-used somehow. 14.It is usually advisable to use some sort of handshaking protocol between server and client, especially when large data blocks are being moved. The TCP/IP buffers can easily get filled and data get lost otherwise. To facilitate this, the SSL sets sockets up with the TCP|NODELAY option so that small packets are moved out across and not collected (collection of small packets normally improves network efficiency since there's less overhead per byte of data). 15 3 The PortMaster Servers have names provided by the program which opens them. When a server is to be opened, the Sopen function temporarily opens a Socket to the PortMaster running on the same machine. The Sopen function then tells the PortMaster the server's name and the (ran- dom) port assigned to the new server, and then closes down the connection. The PortMaster retains a list of all active servers and ports running on its machine. A client is opened using the Sopen function, too. In that case, a connection is made to the PortMaster on the machine where the requested server is running. The PortMaster then tells the Sopen function the port number associated with the requested server, and then closes down the temporary connection. The Sopen function then attempts to connect to the server using the given port. The server program can use its server Socket to test if any clients are waiting to be connected to it (via the Stest function). If a client is waiting, then the server's program can accept the connection, generating an accept Socket (via Saccept). Once the connection is accepted, the program attempting to open the client Socket will finally receive a Socket pointer. 3.1 Users Guide The PortMaster is probably the simplest program to run: under UNIX, type Spm & and under VMS type run/detach Spm. The PortMaster will only allow one copy of itself to run on any given computer. It uses a fixed port address (1750, now registered with IANA) and implements a table of server names mapping to random ports. Although knowledgeable users could change the PortMaster's fixed port, this is discouraged: hopefully, PortMasters will proliferate across the world and, if they all use the same port on their machines, will be able to communicate with one another. In other words, the SSL will be unable to communicate with other SSL systems which use a different port for its PortMaster. Since MS-DOS is not a multi-tasking operating system, unlike UNIX, VMS, or Amiga-DOS, one cannot have a PortMaster running in the background | there is no background. Hence, MS-DOS programs are currently restricted to using client Sockets only, unless they can share another machine's PortMaster (see below). The PortMaster now supports a firewall: one can instruct the PortMaster to restrict access to a group of machines by their host addresses. See the section on The PortMaster Firewall below. 3.2 Sharing PortMasters PortMasters can now be shared. This feature was installed mainly to support MSDOS { since it doesn't have a background process capability, it cannot run PortMasters. Hence, it is normally restricted to running clients only, because servers normally announce their presence to their host's PortMaster. If the environment variable PMSHARE is set to some other machine, that other machine's PortMaster will be used by the host's processes attempting 16 | | | | || || || || || || || || || || || || || || || || || || || || || || || || || || || || || || |||| || || || ||| ||| to|open|servers.|From the client's viewpoint, the server appears to be on the machine with || the|PortMaster|{|the|client doesn't need to know about where the server actually is. ||| |||| Example|3.1|||PortMaster|Sharing || ___|| Machine ___Machine ___ Machine ___ || ___||| A ___ B ___ C ___ ___|| ___ ___ ___ ___|PMSHARE=machineb|___ ___ ___ ___|| ___ ___ ___ ___|opens server ASrvr ___ ___ ___ | ___| ___ ___ ___ | ___| B'___s PortMaster ___ ___ ___|| no___w has ASrvr ___ ___ ___|| on___its list ___ ___ ___|| ___ ___ ___ ___|| ___ ___pgm opens client ___ ___|| ___ ___to ASrvr@machineb ___ ___|| ___ ___ ___ ___|| B'___s PortMaster ___ ___ ___|| sa___tisfies ___ ___ ___|| cl___ient's request ___ ___ ___|| ___ ___ ___ ___| ___ ___pgm has client to ___ | ___| ___ ___ASrvr on A ___ In Example 3.1, three machines are in use. However, machines B and C could have been the same machine. In essence, when A shares B's PortMaster, the servers on A appear to be on B insofar as Sopen'ing a client is concerned. Internally, of course, B's PortMaster knows where the ASrvr is, and clients end up being connected to the server on machine A. 3.3 Theory of Operation Normally, users of the SSL will not need to read this section. However, for those who are curious... There are two main benefits to using the SSL: the functions are similar to those that the C programmer already knows how to use and hence the SSL has a rapid learning curve, and second, servers are assigned to currently available ports. The PortMaster is integral to providing the second benefit. Berkeley sockets are assigned ports, which are basically just integers. The port is used internally to assign the flow of data to the correct places. One must assign a specific port to a server or, alternatively, allow the system to assign any available port to it. Clients must use that same port number to connect to the desired server. Hence, the problem with using the \any available port" is how to get the client process to know what the currently assigned port is! Programmers using Berkeley sockets have typically just assigned a fixed port to 17 their server and hard-coded the clients with that port. If some other process just happens to use that same port, then things get messy { re-compile, wait until the other process goes away, etc. On a machine where there are many users, co-operation between the users may be impractical. The PortMaster solves the problem of associating a server name with a randomly assigned (and available) port, and making that association available to clients. The PortMaster itself uses a fixed port, and so servers and clients always know \where" it is. Whenever a server opens (using the Sopen("XXX","s") call), the Sopen function makes a Socket data structure, creates a Berkeley socket, initializes and binds the socket with any available port, and then connects to the PortMaster, using its fixed port. It then sends a \message" (PM|SERVER, which is simply an integer) to the PortMaster, telling it the type of Socket it is. Subsequently, the PortMaster gets the new server's name and the port it is assigned to. When a client opens, it makes a Socket, initializes a Berkeley socket as a client (using the AF|INET format), gets a \host" entity pointer (the server's machine is known as a host), and then connects to the PortMaster on the host machine. It then sends a \PM|CLIENT" to that PortMaster and the desired server's name; that PortMaster will respond with the associated port number (if there is one). The client then closes down the connection to the target host's PortMaster, and initializes a Berkeley socket with the port number it just received and returns a client Socket pointer to the user. Thus, the SSL's PortMaster system is a distributed database. There are advantages and disadvantages to this scheme. No PortMaster knows anything about servers residing on other machines; if a machine goes down, other machines which have no need to communicate with the downed machine are not affected. On the other hand, a single machine with a single PortMaster would obviate the need for clients to know what machines they wish to connect to, and could force servers on all machines to have unique names (as it is, servers can have the same name so long as they run on different machines). As a palliative, the Sopenv function supports the concept of a machine path via the use of environment variables. Using the Sopenv function, clients can \hunt" down a given server by attempting to open a client one at a time on each machine until a server of that name is found. Thus, the user can designate a local group of machines via an environment variable (typically, the \SKTPATH" environment variable is used for this purpose). The PortMaster talks to its temporary clients using a relatively simple protocol based on \messages" (integers) defined in the sockets.h header file. Table 3 illustrates the protocol. If the PortMaster is using its firewall capability, it immediately checks all of its temporary clients for approved machine status; a PM|SORRY is issued immediately prior to the protocol in Table 3 upon failure to be approved. The connection is then summarily severed. As indicated in Table 3, the PortMaster handles more events than just the PM|SERVER and PM|CLIENT events mentioned earlier. When a client opens to the PortMaster, it iden- tifies the type of service it wishes by sending that PortMaster a \message": PM|SERVER, PM|CLIENT, PM|CLOSE, PM|TABLE, or PM|QUIT. These messages are discussed below. Whenever the PortMaster does not understand the initial message (due to garbling or what- ever), the PortMaster will immediately issue a PM|RESEND message and then wait for 18 || || ||| |||| |||| |||| |||| |||| |||| |||| |||| |||| ||||| ||||| ||||| ||||| ||||| ||||| ||||| ||||| |||||| |||||| |||||| |||||| |||||| |||||| ||||||| ||||||| |||||||||| ||||||||||| ||||||| ||||||| |||||||| |||||||| |||||||| |||||||| ||||||||||| ||||||||Table|3:|The|PortMaster|Protocol| |||||||| ||||||||| ||||||| ___|___||||EventClie___nt|SendsPo___rtMaster Sends ___ ___ |||||| ___|___|PM|CLIENT||___||| ___ ___ ___ || ___|___|||||||||||| ___ ___PM|OK / PM|RESEND ___ ___ ___|___||||||||"sktn___ame"||||___ ___ ___ | ___|___||||||| ___ ___PM|OK / PM|SORRY ___ ___ ||||||| ___|___|||||||| ___ ___port ___ ___ ||| ___|___|PM|CLOSE||___||||| ___ ___ ___ ||| ___|___|||||||| ___ ___PM|OK / PM|RESEND ___ ___ || ___|___|||||| port ___ ___ ___ ___ |||||| ___|___||||||| ___ ___PM|OK / PM|SORRY ___ ___ ___|___|PM|QUIT||||___|||| ___ ___ ___ ___|___|||||| ___ ___PM|OK / PM|RESEND ___ ___ ||||| ___|___|||||| "Port___Master" ___ ___ ___ ___|___|PM|SERVER|___||||| ___PM|OK / PM|RESEND ___ ___ ___|___||||||| "sktn___ame" ___ ___ ___ ___|___||| port ___ ___ ___ ___ |||| ___|___|||||| ___ ___PM|OK / PM|SORRY ___ ___ ___|___|PM|TABLE||___|| ___ ___ ___ ___|___|||| ___ ___PM|OK / PM|RESEND ___ ___ | ___|___|||| ___ ___count of servers ___ ___ ___|___||| ___ ___"server : port" ___ ___ ||| ___|___|| ___ ___... ___ ___ || ___|___|PM|FWINIT ___ ___ ___ ___ || ___|___| ___ ___PM|OK / PM|RESEND ___ ___ data. It will continue doing so for up to PM|MAXTRY times (in the sockets.h file as sent, PM|MAXTRY is defined as 20). If the limit of re-tries is reached, the PortMaster will peremptorily close down the connection and go back to its usual quiescent state waiting for a new connection. The PortMaster will wait no more than TIMEOUT seconds for data, which is set to 20 seconds in Spm.c as delivered. If that amount of time elapses, the PortMaster will summarily close down the temporary client and continue for more business. PM|CLIENT tells the PortMaster that a client is attempting to open. The PortMaster normally responds with a PM|OK and the program attempting to open a client responds with a null-byte terminated string (the requested server name). If the PortMaster finds the requested server in its list, then it responds with a PM|OK and then the port number, otherwise it sends a PM|SORRY. 19 If the PortMaster is using a firewall, it may respond immediately with a PM|SORRY if the client is originating from an unapproved machine. PM|CLOSE tells the PortMaster that a server is closing down. The PortMaster will normally respond with a PM|OK; the program closing down the server (via Sclose) will then send the port number. The PortMaster will then remove the associated server from its internal list of servers and respond with a PM|OK if the designated server was in its list and a PM|SORRY otherwise. PM|FWINIT tells the PortMaster to re-read its firewall datafile. The PortMaster will then respond with a PM|OK if it worked or PM|RESEND if something got garbled. PM|QUIT tells the PortMaster that a shutdown command is to be sent. The PortMaster responds with a PM|OK, and the program shutting down the PortMaster issues a null- byte terminated string, \PortMaster" (just to guarantee that a shutdown is really wanted). The PortMaster will then shutdown. This operation requires some knowledge of the protocol as no SSL function is provided to make shutting down the PortMaster easy. However, the sktdbg program does provide an easy way to shut down the Port- Master. Concerned system administrators may wish to remove the \shut" command from sktdbg. Shutting down the PortMaster does not affect currently connected Sock- ets; however, new connections between servers and clients cannot be made. On the other hand, starting up a new PortMaster is easy and anyone may do so { the Spm program itself will refuse to allow two PortMasters to run concurrently (and will say so). PM|SERVER tells the PortMaster that a server has been opened. The PortMaster will nor- mally respond with a PM|OK and then the program opening a server will send a string giving the new server's name and then will send its port. The PortMaster will then respond with a PM|OK upon success or a PM|SORRY if a server by that name already exists. If the PortMaster is using a firewall, it may respond immediately with a PM|SORRY if the server is originating from an unapproved machine. When PortMaster sharing is not operating, this event should never occur, as servers can then only be legally generated on the same machine that the PortMaster resides upon. The PortMaster enters its own host onto its internal firewall table whenever use of a firewall is enabled. PM|TABLE tells the PortMaster to give out a list of the servers it currently knows about. Normally the PortMaster will respond with a PM|OK, a count of servers (in network standard 2-byte format, see the Berkeley \ntohs" function for details), and a sequence of strings giving the server name and associated port number. The spmtable program and sktdbg's \table" function use this facility. 20 3.3.1 The PortMaster Firewall The PortMaster supports a firewall to keep out socket requests from unapproved machines. The firewall consists of a list of machines' internet addresses in a file. One specifies the file by one of two methods: 1.Startup with Spm -ffull-path-to-filename 2.Initialization of an environment variable, SPMFIREWALL, to the full-path-to-filename. The full-path-to-filename file contains records of the form: * * number number number number where the four numbers are the internet addresses of the machines permitted to talk to the PortMaster. The * indicates accept any number in that field. The firewall function examines incoming internet addresses by use of the getpeername function. The firewall file, often called spmfirewall.dat, may contain blank lines. The # is assumed to begin a comment and is stripped off. 21 4 The Utilities There are several utilities provided with the SSL, and they are explained below. These are all complete programs in themselves, and can serve as lessons on how to use the SSL. sktdbg server-name {s|c} sktdbg is the SSL's testing program. One may open server Sockets, accept Sockets, and client Sockets, test out how other program's Sockets are communicating, etc. See the subsection on sktdbg below. The \server-name" may take two forms: servername or servername@machine-name. The latter form may be used when attempting to open clients to servers residing on machines other than the one the user is currently running sktdbg on. spmchk [machine] This program tests the current machine by default, the named machine otherwise, for the presence of a PortMaster. It will return a 0 if the PortMaster is present, or a 1 otherwise, and is useful in scripts: spmchk || (nohup Spm > /dev/null &) Translated for non-csh/ksh users: if spmchk finds no PortMaster on the current ma- chine, start one up in the background in \no hangup on user exit" mode, with output headed to the bit bucket. (thanks go to Marty Olevitch for this program). For VMS users: spmchk:= [fullpath]spmchk.exe set noon spmchk if '$SEVERITY' .ne. 1 then run/detach [fullpath]Spm.exe set on spmtable [machine [machine [machine ...]]] This program lists the servers and port numbers on the requested machines. If no machine is listed, then the current machine will be used. srmsrvr [server-name [server-name [server-name ...]]] Sometimes the all-knowledgeable and omnipotent programmer finds a need to hit the control-c key or otherwise kill a running program with a server Socket. In such cases, the PortMaster does not get informed that the server has gone down. This utility will tell the PortMaster to forcibly remove the named server(s) from its list. Except when using sktdbg to open a server with sktdbg, the server names above can also have the form srvr@machine-name. This name specifies a server on a specific ma- chine. Note that the machine-name is its normal abbreviation (ie. gryphon) or its full name (ie. gryphon.gsfc.nasa.gov). 22 4.1 The sktdbg Program The sktdbg program was originally a testing facility to debug the SSL itself, but has proven exceptionally useful in debugging programs which use the SSL. Consequently, it is provided as part of the package. To start up sktdbg, one must choose between starting up a server or attempting to open a client Socket. Example 4.1 Starting up a sktdbg Server sktdbg servername s Example 4.2 Starting up a sktdbg Client sktdbg servername c One may also ask sktdbg to explain itself. Example 4.3 sktdbg Explanation sktdbg "?" When the sktdbg program is started, the first thing it does is attempt to create the requested type of Socket. Typically, attempts to make a server will succeed; if it doesn't, it will report a warning, apply Srmsrvr(), and try a second time to open the server again. If it fails twice, then usually the PortMaster is not running on your machine. Attempts to open a client to a non-existent server also yields an error message: \unable to Sopen(srvrname,c)". If the server is up and running, then a client Socket will be set up. The sktdbg program then prints out a little menu of actions that the user can take with it. The \Enter" prompt now also shows the number of bytes waiting on the queue for reading. This number is updated only when the prompt is generated; ie. it is not a dynamic value, but is often useful. In Table 4, there are 20 commands available, and are described below. accept Used by a server Socket to accept clients. Note that one may first do test to determine if a client is waiting. close Used by a server Socket to close down an accept Socket. fput This function takes a filename, fput filename, which sktdbg then opens. Every line in it, minus trailing white space, is sent via Sputs across the Socket. Sktdbg then closes the file. 23 Table 4: sktdbg Help Menu Socket Test Commands accept close fwinit fput get menu peek printf put q quit read rmsrvr scanf shutdown table test wait write ? ( 0 bytes) Enter: fwinit This call issues a PM|FWINIT to the local machine's PortMaster. The PortMaster will then re-read the firewall data file that it was optionally started up with (if it had none, then this command will have no effect). The fwinit command is useful for the owner of the firewall data file to change it and have the PortMaster update itself without bringing down the PortMaster and restarting it. get Uses Sgets to get a null-terminated string from the client. This call will block until something arrives for up to 60 seconds. isset Uses Smaskwait() with negligible timeout (1 microsecond!) and then uses Smaskisset() to determine if the socket is read-ready. This function was included mostly for testing Smaskisset(). menu 24 Repeats the Socket Test Commands menu (just like \?" below). peek Uses Speek to peek at what the client has sent. This call will not block, even if nothing is there yet. printf printf your-word Uses Sprintf to send "your-word 7 8. itworked!" through the Socket. put put your various sundry strings across Uses Sputs to send your strings on the same line through the Socket. q This function \quits" { uses Sclose to close down all Sockets that sktdbg is using and exits. Just like \quit". quit This function \quits" { uses Sclose to close down all Sockets that sktdbg is using and exits. Just like \q". read This function uses Sread to read whatever is on the Socket, and prints it out assuming that it received a string. rmsrvr rmsrvr server-name This function uses Srmsrvr to remove a server. scanf This function accepts a subset of format code: %c, %d, %f, and %s. It will call Sscanf once for each format code given to it. shutdown This function is dangerous! It will shut down the PortMaster on your current machine and perform a quit. Use of this function is strongly discouraged unless it is necessary to pull down a PortMaster. table The table function communicates with the PortMaster and prints out a table of all current servers and their ports (rather like spmtable). test The test function prints out the number of bytes awaiting perusal by a get or read operation. It does not block, even if nothing is waiting { it will return 0 in such a case. wait This function will block the process until something shows up on the accept or client Socket. 25 write write your sundry thoughts and words This function will Swrite your words, appropriately null-byte terminated, through the Socket. It can be read by the read function. ? Repeats the Socket Test Commands menu (just like \menu" above). This program is really quite simple to learn and run, and is useful to help the installer verify that the SSL is installed correctly. 26 5 Installation Instructions Installation varies, of course, from operating system to operating system. 5.1 Unix 1.Make a SKTS subdirectory somewhere, and extract the contents of the tape into that subdirectory (typically, tar -xvop, but systems will vary and you may need to spec- ify a tape drive). 2.If your machine is not ANSI C compliant, but supports prototyping anyway, edit the sockets.h file to #define ||PROTOTYPE||for your machine. 3.Type make all. These instructions should result in the SSL being compiled, the utilities being compiled, and the PortMaster being compiled. A simpleskts.a library results. Although the PortMaster gets started by the make instructions, you may occasionally need to re-start it (for example, after the computer goes down). System administrators should know how to modify their operating system to automatically bring up the PortMaster during a re-boot. Users may wish to place setenv SKTPATH machine:machine:machine... csh users export SKTPATH=machine:machine:machine... ksh users SKTPATH:==machine:machine:machine... vms users set SKTPATH=machine:machine:machine... msdos users in their .login, .profile, login.com, and autoexec.bat respectively. To link to the SSL, one must include \sockets.h". For example, under UNIX, a user should have a .HDR subdirectory with all his/her favorite header files and use \cc ... -I~/.HDR ... simpleskts.a". 5.2 Vms 1.Make a SKTS subdirectory somewhere, and extract the contents of the tape into that subdirectory. The original tape was a quarter-inch cartridge in Unix tar format, but you may well receive a different format. 2.Type @makeskts The \makeskts" command script will create several subdirectories, compile the SSL, and set up a \simpleskts.olb" library. It will not attempt to start up the PortMaster. Change to the \EXE" subdirectory under the SKTS subdirectory. The PortMaster should be started via run/detach Spm; you may or may not have sufficient privileges to do so. One may spawn the PortMaster, but as soon as you log off the PortMaster will rudely terminate. Due to the potential problem with privileges, the command script will not start up the PortMaster itself. 27 In order to make use of command-line arguments for sktdbg, etc, VMS requires that you first make \logical symbols." In your , place the following lines (with appropriately modified YOURDIR): $ spmchk :== $[YOURDIR.SKTS.EXE]spmchk.exe $ spmtable :== $[YOURDIR.SKTS.EXE]spmtable.exe $ spm :== $[YOURDIR.SKTS.EXE]spm.exe $ srmsrvr :== $[YOURDIR.SKTS.EXE]srmsrvr.exe 5.3 Windows 95 ( or more recent) Version 2.08 (currently the latest) of the SSL now runs under Windows 95. One may have a PortMaster running in the background on those machines, too! Since the present author only has Borland C++, only that compiler has been tested. Other compilers may need to modify the file to include any TCP/IP initialization they may require. 1.Set up your system with an appropriate C compiler, Ethernet card, and TCP/IP . 2.Copy the contents of onto your computer. 3.Use gunzip and untar to get the uncompressed files 4.Open a MSDOS console, change directory to ...\COSMIC 5.mkwin95 The smplskts.lib and various *.exe files should be generated in the COSMIC subdirectory. You may well want to have the Simple Sockets Library's PortMaster (Spm) always running in background. To accomplish this: 1.On your workbench, click the right mouse button 2.Select New 3.Select Shortcut 4.Put the fully specified path to Spm.exe in the Command Line dialog box. 5.Put Spm as the shortcut's name 6.Right-mouse click on the Spm shortcut 7.Select Properties 8.Select the Shortcut tab 9.In the Run dialog, left mouse click on the down arrow and select minimized. 10.Bring up Explorer 28 11.Click on the + in the left hand window near Windows 12.Click on the + in the left hand window near Start Menu 13.Click on the + in the left hand window near Programs 14.Double click on StartUp 15.Put the mouse cursor on the Spm shortcut; press the right mouse button and drag it over the right hand Explorer window. 16.Select Copy Here. You will now need to re-boot your machine for this operation to take effect. 5.4 Older Ms-Dos The SSL was compiled and tested using the Wollongong TCP/IP package with MicroSoft C (v6.0). Other compilers and TCP/IP packages may require adjustment to the SSL code. You must have a TCP/IP package for your machine, however { that is what provides Berkeley sockets over which the SSL provides a convenient overlay. Also, you must have an Ethernet card for your machine { that provides the hardware over which the information flows. Neither the TCP/IP package, the C compiler, nor the Ethernet hardware come with the SSL. 1.The SSL makes several assumptions, unfortunately, about where include files are (ex. see Speek.c). The installer will undoubtedly need to customize these include lines. These areas will always be in #ifdef MSDOS ... #endif zones. 2.Acquire a TCP/IP package for your computer (ie. Wollongong). 3.Acquire a C compiler for your computer (ie. Microsoft C, v6.0). 4.Acquire an Ethernet card and TCP/IP address for your computer. 5.Copy the contents of the provided diskette into your subdirectory. 6.For those of you with the software mentioned in Table 5: (a) Make a directory: c:\c600\socket (b) Make a directory: c:\c600\socket\exe (c) Copy wintcp.lib to c:\c600\socket (d) Copy socket.lib to c:\c600\socket (e) Copy slibce.lib to c:\c600\socket (f) Disable the MSDOS linker { possibly by renaming it to doslink. Use the Mi- croSoft C linker instead. (g) Return to the directory where you placed the SSL software. 29 (h) Type makeskt (which will use the Makeskt.bat command script). This script will use Makelib., compile, create the smplskts.lib library, and generate sktdbg.exe, spmtable.exe, and srmsrvr.exe. (i)You should be done installing the software at this point. 7.If your compiler is not ANSI C compliant, but supports prototyping, edit the sockets.h file to define ||PROTOTYPE||for your machine. 8.Follow your compiler's directions to compile to object file format all the C files in SKTS and SKTS\EXE. 9.Follow your compiler's directions to set up a \library" (a .LIB file) with all the .OBJ files in the SKTS subdirectory. 10.Change to the SKTS\EXE subdirectory and follow your compiler's instructions to link each of the object files, one at a time, to the \smplskts.lib" library, the TCP/IP library, and whatever libraries your compiler normally needs. The installation should yield a smplskts.lib (or something similar) library and three exe- cutable files (sktdbg.exe, spmtable.exe, and spmtable.exe). Note that the \SPM.EXE" file should not be generated; you could generate and execute it, but your clone could not use it as it does not allow the PortMaster to run in the back- ground. No attempt has been made to insure that the PortMaster is actually compilable under MicroSoft C, either. Someday a kludge to allow MS-DOS programs to be their own PortMaster may be developed, but that day is not yet. Using Wollongong TCP/IP , one will be restricted to three (or five if its \kernel" is rebuilt) clients. The software in Table 5 was used by the IRL and is known to work properly with the SSL. Other software may work but has not been tested. Table 5: Ms-Dos Software known to work with the SSL Software Product Company MicroSoft C, v6.0 MicroSoft Win/API for DOS, v4.1 The Wollongong Group, Inc. PO Box 51860 Palo Alto, CA 94303-4374 (415)-962-7100 Wollongong Win/TCP, v4.1.1 The Wollongong Group, Inc. 30 6 Appendix: Miscellaneous Functions The SSL uses nine functions from Dr. Campbell's xtdio library; these have been gathered together and made part of the simpleskts.a library. Several of the functions use a special data file, rdcolor.dat. Note: the error and outofmem functions claim they will \terminate" under certain con- ditions. Actually, they will call the function (*error|exit)(int rtn), which by default is the exit function. Programmers may easily prevent or otherwise control termination by simply setting error|exit to point to some other function. void error(int severity,char *fmt,...) The error function prints out an error, warning, or note type of message to stdout. This function takes four kinds of \severity": SEVERE, ERROR, WARNING, and NOTE. Both the SEVERE and ERROR levels will terminate the program. The other two, WARNING and NOTE, will not do so. The termination action tends to enforce a standard for what errors versus warnings mean! If your terminal type is supported by the rdcolor.dat file (see rdcolor below), SEVERE and ERROR messages are printed with a red leader, WARNINGs with a yellow leader, and NOTEs with a cyan leader. FILE *fopenv(char *filename,char *ctrl,char *env|var) The fopenv provides a file opening service akin to that provided by the Sopenv function for the SSL. The fopen() function will be used with the given filename and ctrl strings, and upon failure, the environment variable in env|var will be used like a PATH variable in attempts to open the file in one directory after another (until success). If none of the fopens succeed, then the fopenv function will return a NULL pointer. void outofmem(void *ptr,char *fmt,...) The outofmem function checks if ptr is NULL; if it is not, the function immediately returns. However, if the ptr pointer is in fact NULL, then the fmt and any subsequent arguments will be used like a regular printf to give a message to the user. The program will then terminate. void rdcolor(void) This function reads the rdcolor.dat file, which essentially is an extended \termcap" file. It uses the \RDCOLOR" environment variable with fopenv to search for the rdcolor.dat file. The function uses that file to set up various string variables (RED, CLEAR, { see below). void rdcputs(char *s,FILE *fp) This function puts a string out to the FILE pointer fp, except that those strings (XRED, XUWHITE, etc.) are interpreted using the rdcolor-provided string instead. char *sprt(char *s) This function returns a pointer to a static buffer (there are four of them). The string 31 s has all of its characters made into \visible" forms: control characters become ^A through ^Z and characters with ANSI values greater than or equal to 128 are made into ~### sequences. Characters which are normally visible are left unchanged. void srmtrblk(char *s) This function removes any trailing \blanks" (white space) from the end of a string. char *stpblk(char *p) This function returns a pointer to the first non-white space character in the string p (ie. steps past blanks). char *stpnxt(char *s,char *fmt) This function returns a pointer to the first character in s which would not have been read by a sscanf(s,fmt,...) function. Useful for quick and dirty parsing. char *strnxtfmt(char *fmt) The strnxtfmt function returns a pointer to the beginning of the (next) format code substring. If fmt is NULL, then the previous format string is used (ie. a pointer to the last fmt code is retained and the a pointer to the next format code pointer will be returned). This function bears some similarity to strtok except that it jumps from format code to format code (used by Sscanf). The rdcolor.dat file describes terminal escape sequences to use to control color and a few other actions. Each line which does not begin with a white space character is assumed to be a terminal line: terminal types are separated by vertical bars and the line is terminated by a colon. There are a number of strings defined (see Table 6). Escape sequences may include the sequence \e for the ESCAPE character and \b for a blank. Please see the rdcolor.dat file for examples. 32 || || ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| |||||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| ||| |||||| Table 6: rdcolor.dat strings | ___|___ String NameFun___ction ___ ___ ___ ___ BLACK subs___equent chars are black ___ ___ ___ ___ RED subse___quent chars are red ___ ___ ___ ___ GREEN subs___equent chars are green ___ ___ ___ ___ YELLOW sub___sequent chars are yellow ___ ___ || ___|___|BLUE subs___equent chars are blue ___ ___ ___|___|MAGENTA|sub___sequent|chars are magenta ___ ___ ___|___|CYAN|| subs___equent chars are cyan ___ ___ ___|___|WHITE|| subs___equent chars are white ___ ___ ___|___||| ___ ___ ___ ___|___|UBLACK||subs___equent chars are underlined and black ___ ___ ___|___|URED|| subs___equent chars are underlined and red ___ ___ ___|___|UGREEN||sub___sequent chars are underlined and green ___ ___ ___|___|UYELLOW|sub___sequent chars are underlined and yellow ___ ___ | ___|___|UBLUE| subs___equent chars are underlined and blue ___ ___ ___|___|UMAGENTAsu___bsequent|chars|are underlined and magenta ___ ___ ___|___|UCYAN| subs___equent chars are underlined and cyan ___ ___ || ___|___|UWHITE subs___equent chars are underlined and white ___ ___ || ___|___| ___ ___ ___ ___|___|RVBLACK|sub___sequent|chars are reverse-video and black ___ ___ ___|___|RVRED|| subs___equent chars are reverse-video and red ___ ___ ___|___|RVGREEN|sub___sequent|chars are reverse-video and green ___ ___ ___|___|RVYELLOWsub___sequent|chars|are reverse-video and yellow ___ ___ ___|___|RVBLUE||subs___equent chars are reverse-video and blue ___ ___ ___|___|RVMAGENTAs___ubsequent|chars|are reverse-video and magenta ___ ___ ___|___|RVCYAN| subs___equent chars are reverse-video and cyan ___ ___ | ___|___|RVWHITE|sub___sequent chars are reverse-video and white ___ ___ | ___|___|| ___ ___ ___ ___|___|NRML|| subs___equent chars are \normal" ___ ___ ___|___|BOLD| subs___equent chars are \bold" ___ ___ || ___|___|CLEAR the ___screen is cleared ___ ___ 33 dmucs-0.6.1/COSMIC/EXAMPLES/0000755000175000017500000000000010457726375013166 5ustar samsamdmucs-0.6.1/COSMIC/EXAMPLES/CVS/0000755000175000017500000000000010457726375013621 5ustar samsamdmucs-0.6.1/COSMIC/EXAMPLES/CVS/Root0000644000175000017500000000007110457726374014464 0ustar samsam:ext:vic_norman@dmucs.cvs.sourceforge.net:/cvsroot/dmucs dmucs-0.6.1/COSMIC/EXAMPLES/CVS/Repository0000644000175000017500000000002610457726374015720 0ustar samsamdmucs/COSMIC/EXAMPLES dmucs-0.6.1/COSMIC/EXAMPLES/CVS/Entries0000644000175000017500000000077710457726375015170 0ustar samsam/Makefile/1.1.1.1/Tue Jan 10 15:43:30 2006// /multiskt.c/1.1.1.1/Tue Jan 10 15:43:30 2006// /oobrecv.c/1.1.1.1/Tue Jan 10 15:43:30 2006// /oobsend.c/1.1.1.1/Tue Jan 10 15:43:30 2006// /sktfork.c/1.1.1.1/Tue Jan 10 15:43:30 2006// /sktpoll.c/1.1.1.1/Tue Jan 10 15:43:30 2006// /sktsig.c/1.1.1.1/Tue Jan 10 15:43:30 2006// /smclient.c/1.1.1.1/Tue Jan 10 15:43:30 2006// /smsrvr.c/1.1.1.1/Tue Jan 10 15:43:30 2006// /talkclient.c/1.1.1.1/Tue Jan 10 15:43:30 2006// /talksrvr.c/1.1.1.1/Tue Jan 10 15:43:30 2006// D dmucs-0.6.1/COSMIC/EXAMPLES/Makefile0000644000175000017500000000136510360753042014613 0ustar samsam# Makefile for the Simple Socket Library's EXAMPLES # Note: not all the programs may build on your system, # (the oob*.c ones in particular) # EXES: list of executables to be made # Note: not all of these may compile correctly, # ie. sktsig/oobrecv/oobsend, which have BSD-Unix dependencies # # Cygwin, for example, will have problems with sigcontext structures # which affects oobrecv and sktsig. # ------------------------------------------------------------------------ EXES=smsrvr smclient multiskt sktpoll talksrvr talkclient sktsig oobrecv oobsend # to convert C into executables .c: $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) -o $@ # make all executables all : $(EXES) clean : /bin/rm -f *.o *.bak *.err $(EXES) dmucs-0.6.1/COSMIC/EXAMPLES/multiskt.c0000644000175000017500000000723010360753042015170 0ustar samsam/* multiskt.c: this program can open up multiple accepts on one server */ #include #include "xtdio.h" #include "sockets.h" /* ---------------------------------------------------------------------- * Definitions: */ #define BUFSIZE 128 /* ---------------------------------------------------------------------- * Typedefs: */ typedef struct sktlist_str SktList; /* ---------------------------------------------------------------------- * Data Structures: */ struct sktlist_str { int id; Socket *skt; SktList *nxt,*prv; }; /* ---------------------------------------------------------------------- * Global Data: */ Socket *srvr = NULL; SktList *shd = NULL; SktList *stl = NULL; /* ---------------------------------------------------------------------- */ /* main: */ #ifdef __PROTOTYPE__ int main( int argc, char **argv) #else /* __PROTOTYPE__ */ int main(argc,argv) int argc; char **argv; #endif /* __PROTOTYPE__ */ { char mesg[BUFSIZE]; Socket *skt = NULL; SktList *sktlist = NULL; SktList *sktlistnxt = NULL; rdcolor(); /* open server */ srvr= Sopen("multiskt","s"); if(!srvr) { /* if "multiskt" did not open, this code (rudely) attempts to remove * any servers by that name and then re-open */ Srmsrvr("multiskt"); srvr= Sopen("multiskt","s"); if(!srvr) error(XTDIO_ERROR,"unable to open as server\n"); } /* ok, read stuff into skt messages (so long as there are clients) */ Smaskset(srvr); do { /* block until a Socket needs service */ Smaskwait(); /* if client awaiting connection, go ahead and connect to it */ if(Stest(srvr)) { skt= Saccept(srvr); if(!skt) { error(XTDIO_WARNING,"unable to accept\n"); continue; } /* allocate a doubly-linked SktList */ sktlist= (SktList *) malloc(sizeof(SktList)); if(stl) stl->nxt= sktlist; else shd = sktlist; sktlist->prv= stl; sktlist->nxt= NULL; stl = sktlist; /* initialize the SktList */ sktlist->id = stl->prv? (stl->prv->id + 1) : 1; sktlist->skt= skt; /* set up Smaskwait mask -- all Sockets entered into this mask will * be waited upon as a group */ Smaskset(sktlist->skt); } else { /* process communication from a client */ sktlistnxt= NULL; /* scan all clients loop */ for(sktlist= shd; sktlist; sktlist= sktlistnxt) { sktlistnxt= sktlist->nxt; /* is something waiting on this Socket? */ if(Stest(sktlist->skt)) { /* something waiting on this Socket, get it */ Sgets(mesg,BUFSIZE,sktlist->skt); /* report on message */ printf("skt%d: mesg<%s>\n",sktlist->id,mesg); /* send message back */ Sprintf(sktlist->skt,"received <%s>\n",sprt(mesg)); /* sktlist is quitting on receipt of q */ if(!strcmp(mesg,"q")) { /* close down Socket */ Sclose(sktlist->skt); Smaskunset(sktlist->skt); /* remove sktlist entry from linked list */ if(sktlist->prv) sktlist->prv->nxt= sktlist->nxt; else shd = sktlist->nxt; if(sktlist->nxt) sktlist->nxt->prv= sktlist->prv; else stl = sktlist->prv; /* free up former sktlist memory */ free((char *) sktlist); } /* quit */ } /* get a message from a client */ } /* sktlist loop */ } /* client communications processing */ } while(shd); /* close down the server */ Sclose(srvr); return 0; } /* ---------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/EXAMPLES/oobrecv.c0000644000175000017500000000544110360753042014755 0ustar samsam/* oobrecv.c: tests out receipt of OOB data * Run oobrecv first, then in a second window, run oobsend * Author: Dr. Charles E. Campbell, Jr. */ #define _BSD_SIGNALS #include #include #include #include "sockets.h" /* ------------------------------------------------------------------------ * Definitions: */ #define BUFSIZE 256 #define SLEEPTIME 1 /* ------------------------------------------------------------------------ * Typedefs: */ /* ------------------------------------------------------------------------ * Local Data Structures: */ /* ------------------------------------------------------------------------ * Global Data: */ Socket *skt=NULL; /* ------------------------------------------------------------------------ * Explanation: */ /* ------------------------------------------------------------------------ * Prototypes: */ #ifdef __PROTOTYPE__ int main( int, char **); /* oobrecv.c */ int sigurg_handler(int,int,struct sigcontext *); /* oobrecv.c */ #else int main(); /* oobrecv.c */ int sigurg_handler(); /* oobrecv.c */ #endif /* ------------------------------------------------------------------------ * Source Code: */ /* main: */ #ifdef __PROTOTYPE__ int main( int argc, char **argv) #else /* __PROTOTYPE__ */ int main(argc,argv) int argc; char **argv; #endif /* __PROTOTYPE__ */ { char buf[BUFSIZE]; pid_t rcvpid; int sleeptime = SLEEPTIME; rdcolor(); if(argc > 1) sscanf(argv[1],"%d",&sleeptime); /* install SIGURG handler */ signal(SIGURG,(void *) sigurg_handler); /* poll once per second to open client */ for(; !skt; sleep(1)) skt= Sopen("oob","c"); printf("client to opened\n"); /* send pid */ rcvpid= getpid(); Sprintf(skt,"%d",rcvpid); Swait(skt); /* wait until something shows up */ printf("something has arrived, now sleeping\n"); printf("sleeping for %d seconds\n",sleeptime); sleep(sleeptime); Sgets(buf,BUFSIZE,skt); printf("normal rcvd: buf<%s>\n",sprt(buf)); Sclose(skt); printf("closed client to \n"); return 0; } /* --------------------------------------------------------------------- */ /* sigurg_handler: handles SIGURG signals */ #ifdef __PROTOTYPE__ int sigurg_handler( int sig, int code, struct sigcontext *sc) #else /* __PROTOTYPE__ */ int sigurg_handler(sig,code,sc) int sig,code; struct sigcontext *sc; #endif /* __PROTOTYPE__ */ { char buf[BUFSIZE]; int cnt; /* re-install SIGURG handler */ signal(SIGURG,(void *) sigurg_handler); cnt= recv(skt->skt,buf,BUFSIZE,MSG_OOB); printf("oob rcvd: cnt=%d buf<%c>\n",cnt,buf[0]); Sputs("oob recvd",skt); printf("sent normal\n"); } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/EXAMPLES/oobsend.c0000644000175000017500000000424510360753042014750 0ustar samsam/* oobsend.c: this file contains an Out-Of-Band Sockets example * Run oobrecv first, then in a second window, run oobsend * Author: Dr. Charles E. Campbell, Jr. */ #define _BSD_SIGNALS #include #include #include #include "sockets.h" /* ------------------------------------------------------------------------ * Definitions: */ #define BUFSIZE 256 /* ------------------------------------------------------------------------ * Typedefs: */ /* ------------------------------------------------------------------------ * Local Data Structures: */ /* ------------------------------------------------------------------------ * Global Data: */ /* ------------------------------------------------------------------------ * Explanation: */ /* ------------------------------------------------------------------------ * Prototypes: */ /* ------------------------------------------------------------------------ * Source Code: */ /* main: */ #ifdef __PROTOTYPE__ int main( int argc, char **argv) #else /* __PROTOTYPE__ */ int main(argc,argv) int argc; char **argv; #endif /* __PROTOTYPE__ */ { char buf[BUFSIZE]; char msg = 'T'; int cnt; pid_t rcvpid; Socket *srvr = NULL; Socket *skt = NULL; rdcolor(); srvr= Sopen("oob","S"); if(!srvr) error(XTDIO_ERROR,"unable to open oob server\n"); printf("opened server\n"); skt= Saccept(srvr); printf("accepted client\n"); /* get receiver's pid */ Sscanf(skt,"%d",&rcvpid); printf("rcvpid=%d\n",rcvpid); Sputs("something",skt); printf("sent \n"); /* put an OOB data transfer over the Socket */ if((cnt= send(skt->skt,&msg,1,MSG_OOB)) < 0) { /* socket error */ perror("oobsend"); error(XTDIO_WARNING,"socket error on OOB send\n"); } else { printf("send oob (cnt=%d)\n",cnt); kill(rcvpid,SIGURG); printf("sent SIGURG to rcvpid=%d\n",rcvpid); if(!Sgets(buf,BUFSIZE,skt)) printf("socket error on Sgets\n"); else printf("reply<%s>\n",sprt(buf)); } Sclose(skt); printf("closed accept socket\n"); Sclose(srvr); printf("closed server\n"); return 0; } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/EXAMPLES/sktfork.c0000644000175000017500000000515210360753042015000 0ustar samsam/* sktfork.c: this program illustrates use of fork under Unix SysV with a * simple server. */ #include #include #include #include #include "xtdio.h" #include "sockets.h" /* ------------------------------------------------------------------------ * Definitions: */ #define BUFSIZE 256 /* ------------------------------------------------------------------------ * Globals: */ int childstat= 0; /* ------------------------------------------------------------------------ * Prototypes: */ int main( int, char **); /* sktfork.c */ void sigchld_handler(void); /* sktfork.c */ /* ------------------------------------------------------------------------ * Source Code: */ /* main: */ int main( int argc, char **argv) { int sktcnt = 0; int istat; int ret; Socket *srvr = NULL; Socket *nskt = NULL; if (argc <= 1) { fprintf(stderr,"***usage*** sktfork srvrname\n"); exit(1); } srvr = Sopen(argv[1],"s"); if (!srvr) { fprintf(stderr, "***error*** unable to open <%s> server\n", argv[1]); exit(1); } /* install a SIGCHLD handler */ sigset(SIGCHLD, sigchld_handler); while(1) { printf("Wait for new socket to be accepted\n"); nskt = Saccept(srvr); if (!nskt) { /* presumably I just got a SIGCHLD */ printf("WEXITSTATUS(childstat=%d)=%d\n", childstat, WEXITSTATUS(childstat)); if (WEXITSTATUS(childstat) == 1) break; continue; } else { ++sktcnt; printf("normal new skt: sktcnt=%d\n", sktcnt); } ret = fork(); if (ret == 0) { /* child process */ char buf[BUFSIZE]; Socket *skt; printf("child() skt<%s>", Sprtskt(nskt)); skt = nskt; nskt = NULL; if (!Sgets(buf, BUFSIZE, skt)) { fprintf(stderr, "***error*** unable to Sgets\n"); _exit(0); } Sputs("goodbye!", skt); printf("got <%s>, goodbye!\n", buf); Sclose(skt); skt= NULL; if (!strcmp(buf, "Q")) { printf("return: child 1\n"); _exit(1); } printf("return: child 0\n"); _exit(0); } else if (ret == -1) { fprintf(stderr, "***error*** unable to fork\n"); if (nskt) Sclose(nskt); if (srvr) Sclose(srvr); srvr = nskt = NULL; break; } } printf("closing down server: sktcnt=%d\n", sktcnt); if (srvr) Sclose(srvr); srvr = NULL; return 0; } /* --------------------------------------------------------------------- */ /* sigchld_handler: this function */ void sigchld_handler() { wait(&childstat); } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/EXAMPLES/sktpoll.c0000644000175000017500000000117610360753042015007 0ustar samsam/* sktpoll: this program illustrates sleep-polls for clients */ #include #include "xtdio.h" #include "sockets.h" /* --------------------------------------------------------------------- */ /* main: begin here */ #ifdef __PROTOTYPE__ int main( int argc, char **argv) #else /* __PROTOTYPE__ */ int main(argc,argv) int argc; char **argv; #endif /* __PROTOTYPE__ */ { Socket *client=NULL; client= Sopenv("sktpoll","c","SKTPATH"); while(!client) { sleep(1); client= Sopenv("sktpoll","c","SKTPATH"); } Sputs("hello",client); Sclose(client); } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/EXAMPLES/sktsig.c0000644000175000017500000000610610360753042014621 0ustar samsam/* sktsig.c: set up a Socket so that it has a SIGIO interrupt whenever data * appears on the Socket (this is a unix sysv version) */ #include #include #include #include "xtdio.h" #include "sockets.h" /* ------------------------------------------------------------------------ * Definitions: */ #define BUFSIZE 256 /* ------------------------------------------------------------------------ * Typedefs: */ /* ------------------------------------------------------------------------ * Local Data Structures: */ /* ------------------------------------------------------------------------ * Global Data: */ /* ------------------------------------------------------------------------ * Explanation: */ /* ------------------------------------------------------------------------ * Prototypes: */ #ifdef __PROTOTYPE__ int main( int, char **); /* sktsig.c */ # ifdef __gnu_linux__ void sigio_handler(int); /* sktsig.c */ # else void sigio_handler(int,int,struct sigcontext *); /* sktsig.c */ # endif #else int main(); /* sktsig.c */ void sigio_handler(); /* sktsig.c */ #endif /* ------------------------------------------------------------------------ * Source Code: */ /* main: */ #ifdef __PROTOTYPE__ int main( int argc, char **argv) #else /* __PROTOTYPE__ */ int main(argc,argv) int argc; char **argv; #endif /* __PROTOTYPE__ */ { char buf[BUFSIZE]; Socket *srvr = NULL; Socket *skt = NULL; /* open server */ srvr= Sopen("sktsig","S"); if(!srvr) error(XTDIO_ERROR,"sktsig: cannot open a server \n"); printf("server now available\n"); /* wait for a client */ printf("waiting for a client\n"); skt= Saccept(srvr); if(!skt) { Sclose(srvr); error(XTDIO_ERROR,"sktsig: Saccept failed\n"); } /* set up SIGIO handler */ signal(SIGIO,sigio_handler); /* install sigio handler */ fcntl(skt->skt,F_SETOWN,getpid()); /* set ownership to self */ fcntl(skt->skt,F_SETFL,FASYNC); /* incoming data generates SIGIO */ Sputs("ready to receive",skt); printf("ready to receive\n"); while(1) { pause(); /* wait until a signal arrives */ if(!Sgets(buf,BUFSIZE,skt)) { /* socket error */ error(XTDIO_WARNING,"sktsig: socket error\n"); break; } printf("rcvd buf<%s>\n",sprt(buf)); Sprintf(skt,"rcvd buf <%s>",buf); if(!strcmp(buf,"q")) break; /* quit on "q" */ } /* close down Sockets */ Sclose(skt); Sclose(srvr); return 0; } /* --------------------------------------------------------------------- */ #if defined(__gnu_linux__) void sigio_handler(int sig) #elif defined(__PROTOYPE__) void sigio_handler( int sig, int code, struct sigcontext *sc) #else /* __PROTOTYPE__ */ void sigio_handler(sig,code,sc) int sig; int code; struct sigcontext *sc; #endif /* __PROTOTYPE__ */ { signal(SIGIO,sigio_handler); /* re-install sigio handler */ printf("caught a sigio\n"); } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/EXAMPLES/smclient.c0000644000175000017500000000071210360753042015130 0ustar samsam/* smclient.c: this file contains a small client example */ #include #include "sockets.h" /* --------------------------------------------------------------------- */ int main() { Socket *skt = NULL; char buf[128]; do { skt= Sopen("SmallServer","c"); if(!skt) sleep(1); } while(!skt); Sscanf(skt,"%s",buf); printf("buf<%s>\n",buf); Sclose(skt); return 0; } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/EXAMPLES/smsrvr.c0000644000175000017500000000063310360753042014650 0ustar samsam/* smsrvr.c: a real small server example */ #include #include "sockets.h" /* --------------------------------------------------------------------- */ int main() { Socket *srvr = NULL; Socket *skt = NULL; srvr= Sopen("SmallServer","s"); skt = Saccept(srvr); Sprintf(skt,"hello"); Sclose(skt); Sclose(srvr); return 0; } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/EXAMPLES/talkclient.c0000644000175000017500000000672410360753042015455 0ustar samsam/* talkclient.c: this program implements a client * Author: Dr Charles E Campbell, Jr * * Protocol * * server->client * m#...message message from #>0: client-id #==0: server * q tell client to quit * * client->server * m...message message from client * q client is quitting * Q client tells server to quit */ #include #include "xtdio.h" #include "sockets.h" /* ------------------------------------------------------------------------ * Definitions: */ #define BUFSIZE 256 #define SERVER "TalkServer" #define PROMPT "Client: " /* ------------------------------------------------------------------------ * Typedefs: */ /* ------------------------------------------------------------------------ * Local Data Structures: */ /* ------------------------------------------------------------------------ * Global Data: */ /* ------------------------------------------------------------------------ * Explanation: */ /* ------------------------------------------------------------------------ * Prototypes: */ /* ------------------------------------------------------------------------ * Source Code: */ /* main: */ int main( int argc, char **argv) { Socket *client = NULL; char buf[BUFSIZE]; int id; int result; rdcolor(); Smaskfdset(fileno(stdin)); /* put stdin into mask */ fputs(PROMPT,stdout); /* print prompt */ fflush(stdout); /* insure prompt is displayed */ /* attempt to open client at 1-second intervals */ while(1) { if(!client) { /* note: if server drops out, this client will attempt to * reconnect at one second intervals */ while(!client) { client= Sopen(SERVER,"c"); if(Smasktest() > 0) { fgets(buf,BUFSIZE,stdin); srmtrblk(buf); if(!strcmp(buf,"q")) exit(0); } if(!client) sleep(1); } Smaskset(client); } Smaskwait(); result= Stest(client); if(result > 0) { if(!Sgets(buf,BUFSIZE,client)) { error(XTDIO_WARNING,"error on Sgets\n"); Smaskunset(client); Sclose(client); client= NULL; } switch(buf[0]) { case 'm': /* m# message... */ sscanf(buf+1,"%d",&id); if(id == 0) printf("\nserver%s\n",buf+2); /* print message from server */ else printf("\nclient%s\n",buf+1); /* print message from another client */ fputs(PROMPT,stdout); /* print prompt */ fflush(stdout); /* insure prompt is displayed */ break; case 'q': /* server told this client to quit */ goto enditnow; default: error(XTDIO_WARNING,"protocol violation, I don't know what to do with <%s%s%s>\n", YELLOW, sprt(buf), GREEN); break; } } else if(result < 0) { error(XTDIO_WARNING,"error on Stest\n"); Smaskunset(client); Sclose(client); client= NULL; } else { fgets(buf,BUFSIZE,stdin); srmtrblk(buf); /* remove trailing white space */ fputs(PROMPT,stdout); /* print prompt */ fflush(stdout); /* insure prompt is displayed */ if(!strcmp(buf,"q")) { Sputs("q",client); } else if(!strcmp(buf,"Q")) { Sputs("Q",client); goto enditnow; } else { Sprintf(client,"m%s",buf); } } } /* that'suh that'sall folks! */ enditnow: if(client) { Smaskunset(client); Sclose(client); client= NULL; } return 0; } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/EXAMPLES/talksrvr.c0000644000175000017500000001431510360753042015166 0ustar samsam/* talksrvr.c: this program implements the TalkServer. * * The server here also acts as a pass-through: all * other clients get told what any client said. * * Author: Dr Charles E Campbell, Jr * * Protocol * * server->client * m#...message message from #>0: client-id #==0: server * q tell client to quit * * client->server * m...message message from client * q client is quitting * Q client tells server to quit */ #include #include #include "xtdio.h" #include "sockets.h" /* ------------------------------------------------------------------------ * Definitions: */ #define BUFSIZE 256 #define SERVER "TalkServer" #define PROMPT "Server: " /* ------------------------------------------------------------------------ * Typedefs: */ typedef struct Accept_str Accept; /* ------------------------------------------------------------------------ * Local Data Structures: */ struct Accept_str { int id; Socket *skt; Accept *nxt; Accept *prv; }; /* ------------------------------------------------------------------------ * Global Data: */ Accept *ahd= NULL; /* accept socket list head */ Accept *atl= NULL; /* accept socket list tail */ /* ------------------------------------------------------------------------ * Explanation: */ /* ------------------------------------------------------------------------ * Prototypes: */ int main( int, char **); /* talkserver.c */ void RemoveAccpt(Accept *); /* talkserver.c */ void SendAllbut(Accept *,char *); /* talkserver.c */ /* ------------------------------------------------------------------------ * Source Code: */ /* main: */ int main( int argc, char **argv) { Accept *accpt = NULL; Accept *accptnxt = NULL; Socket *srvr = NULL; char buf[BUFSIZE]; int didwork = 1; int doquit = 0; int result; static int id = 0; rdcolor(); /* attempt to open server */ srvr= Sopen(SERVER,"S"); /* this probably happens only when the PortMaster isn't up */ if(!srvr) error(XTDIO_ERROR,"unable to open <%s%s%s> server\n",YELLOW,SERVER,GREEN); Smaskset(srvr); /* enter server into mask */ Smaskfdset(fileno(stdin)); /* enter stdin into mask */ fputs(PROMPT,stdout); /* print out prompt */ fflush(stdout); /* force stdout out */ while(!doquit && didwork) { result = Smaskwait(); didwork = 0; if(result > 0) { /* if error, returns -1 */ if(Stest(srvr) > 0) { /* if error, returns -1 */ Socket *skt; didwork = 1; /* only indicate didwork when something was done */ /* accept a new Socket */ skt= Saccept(srvr); if(!skt) { error(XTDIO_WARNING,"server tested having data but unable to accept!\n"); break; } Smaskset(skt); /* allocate and doubly-link in new Accept */ accpt= (Accept *) malloc(sizeof(Accept)); if(atl) atl->nxt= accpt; else ahd = accpt; accpt->prv= atl; accpt->nxt= NULL; atl = accpt; /* initialize */ accpt->skt= skt; accpt->id = ++id; Smaskset(accpt->skt); } else { /* check out all accepted clients for any work to do */ for(accpt= ahd, accptnxt= NULL; accpt && !doquit; accpt= accptnxt) { accptnxt= accpt->nxt; /* note that RemoveAccpt may delete this accpt! */ if(accpt->skt) { result = Stest(accpt->skt); if(result > 0) { if(Sgets(buf,BUFSIZE,accpt->skt)) { char *b; Accept *snd; int fromid; didwork = 1; /* only indicate didwork when something was done */ /* translate command from client */ switch(buf[0]) { case 'q': /* client is quitting */ RemoveAccpt(accpt); break; case 'Q': /* client told server to quit */ doquit= 1; RemoveAccpt(accpt); break; case 'm': /* message from client */ for(b= buf+1; *b && isspace(*b); ++b) ; /* skip "m ..." */ printf("\nclient#%d: %s\n",accpt->id,b); SendAllbut(accpt,b); /* send message to all other clients */ fputs(PROMPT,stdout); /* print out prompt */ fflush(stdout); /* force stdout out */ break; } } else RemoveAccpt(accpt); } else if(result < 0) RemoveAccpt(accpt); } } } /* ok, didn't do anything with Sockets, so must be stdin */ if(!didwork) { didwork= 1; fgets(buf,BUFSIZE,stdin); /* get string from stdin */ srmtrblk(buf); /* remove trailing whitespace */ if(!strcmp(buf,"QUIT")) { /* user command server to QUIT */ break; } SendAllbut((Accept *) NULL,buf); /* send to ALL accept Sockets */ fputs(PROMPT,stdout); /* print out prompt */ fflush(stdout); /* force stdout out */ } } else break; } /* close everything down */ while(ahd) RemoveAccpt(ahd); Sclose(srvr); return 0; } /* --------------------------------------------------------------------- */ /* RemoveAccpt: this function removes given Accept* from linked list */ void RemoveAccpt(Accept *accpt) { /* sanity check */ if(!accpt || !accpt->skt) { error(XTDIO_SEVERE,"RemoveAccpt told to remove %s!\n", accpt? "accpt with null socket" : "null accpt"); } /* tell client to quit */ Sputs("q",accpt->skt); /* de-link */ if(accpt->prv) accpt->prv->nxt= accpt->nxt; else ahd = accpt->nxt; if(accpt->nxt) accpt->nxt->prv= accpt->prv; else atl = accpt->prv; Smaskunset(accpt->skt); /* remove from mask */ Sclose(accpt->skt); /* close socket */ free((char *) accpt); /* delete Accept */ } /* --------------------------------------------------------------------- */ /* SendAllbut: this function sends a message to all clients except the * one on the argument list */ void SendAllbut(Accept *notme,char *msg) { Accept *accpt= NULL; for(accpt= ahd; accpt; accpt= accpt->nxt) if(accpt != notme) { Sprintf(accpt->skt,"m%d %s",notme? notme->id : 0,msg); } } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/EXE/0000755000175000017500000000000010457726376012372 5ustar samsamdmucs-0.6.1/COSMIC/EXE/CVS/0000755000175000017500000000000010457726376013025 5ustar samsamdmucs-0.6.1/COSMIC/EXE/CVS/Root0000644000175000017500000000007110457726375013670 0ustar samsam:ext:vic_norman@dmucs.cvs.sourceforge.net:/cvsroot/dmucs dmucs-0.6.1/COSMIC/EXE/CVS/Repository0000644000175000017500000000002110457726375015117 0ustar samsamdmucs/COSMIC/EXE dmucs-0.6.1/COSMIC/EXE/CVS/Entries0000644000175000017500000000050110457726376014355 0ustar samsam/MAKEFILE.os2/1.1.1.1/Tue Jan 10 15:43:30 2006// /Makefile/1.1.1.1/Tue Jan 10 15:43:30 2006// /Spm.c/1.1.1.1/Tue Jan 10 15:43:30 2006// /sktdbg.c/1.1.1.1/Tue Jan 10 15:43:30 2006// /spmchk.c/1.1.1.1/Tue Jan 10 15:43:30 2006// /spmtable.c/1.1.1.1/Tue Jan 10 15:43:30 2006// /srmsrvr.c/1.1.1.1/Tue Jan 10 15:43:30 2006// D dmucs-0.6.1/COSMIC/EXE/MAKEFILE.os20000644000175000017500000000316410360753042014157 0ustar samsam# Makefile for the Simple Sockets Library (C version) Executables # # NASA -- Goddard Space Flight Center, Code 714.1 # Intelligent Robotics Laboratory # Robotics Branch # # Authors: Dr. Charles E. Campbell, Jr. # Terry McRoberts # # Modified for OS/2 Watcom v11.0a OS2 toolkit V4.5 # By Steve Richards # # for TCP version 4 (16bit stack) USE These two setups # instead of the ones below #libs = k:\srwork\sockets\cosmic\smplskts.lib & # w:\os2tk45\lib\so32dll.lib & # w:\os2tk45\lib\tcp32dll.lib & # w:\os2tk45\lib\tcpipdll.lib # #cFLAGS = /bt=os2 /dos2 /l=os2flat /dTCPV40HDRS $(libs) # # # # Change paths below as appropriate # .before SET INCLUDE=W:\WATCOM\H\OS2;W:\WATCOM\H;W:\WATCOM\SOM\INCLUDE;w:\os2tk45\som\include;w:\os2tk45\inc;w:\os2tk45\h\gl;w:\os2tk45\h;w:\os2tk45\h\libc;.; set include=$(%include)k:\srwork\sockets\cosmic\HDR; set lib=$(%lib);w:\watcom\lib386;w:\watcom\lib386\os2; set watcom=w:\watcom libs = k:\srwork\sockets\cosmic\smplskts.lib & w:\os2tk45\lib\tcpip32.lib hdrroot = k:\srwork\sockets\cosmic\HDR\ # list of executables EXES = Spm.exe sktdbg.exe spmtable.exe srmsrvr.exe spmchk.exe hdrs = $(hdrroot)sockets.h & $(hdrroot)xstdlib.h & $(hdrroot)xtdio.h & $(hdrroot)setproto.h & $(hdrroot)rdcolor.h CC = wcl386 cFLAGS = /bt=os2 /dos2 /l=os2flat /dxCPV40HDRS $(libs) # to convert C into executables .c.exe : .AUTODEPEND $(CC) $(CFLAGS) $[* del $*.map $*.obj $(EXES) :: $(hdrs) $(libs) all :: $(EXES) dmucs-0.6.1/COSMIC/EXE/Makefile0000644000175000017500000000100610360753042014006 0ustar samsam# Makefile for the Simple Sockets Library (C version) Executables # # NASA -- Goddard Space Flight Center, Code 714.1 # Intelligent Robotics Laboratory # Robotics Branch # # Authors: Dr. Charles E. Campbell, Jr. # Terry McRoberts # # list of executables EXES= Spm sktdbg spmtable srmsrvr spmchk # to convert C into executables .c: $(CC) $(CFLAGS) $(LDFLAGS) $< $(LOADLIBES) -o $(EXETGT)/$@ all : $(EXES) clean : /bin/rm -f *.o *.bak *.err Spm sktdbg spmchk spmtable srmsrvr dmucs-0.6.1/COSMIC/EXE/Spm.c0000644000175000017500000007654710360753042013277 0ustar samsam/* Spm: The PortMaster * This program is expected to run as a daemon on every machine * which uses Charles Campbell's and Terry McRoberts' Socket Library. * * Its purpose in life is to: * a) receive messages from processes starting up servers to maintain * a list of process names and associated ports, * b) to inform processes starting up client sockets about the port * numbers of designed servers. * * This program's services are generally hidden from the users, and is * accessed by the Sopen() functions. Since processes from anywhere * need to access this process, it has a fixed port number (PORTMASTER) * unless overridden from the command line. This information is hard-coded * into the header file. * * Routines Include: * int main( int argc, char **argv) * static Socket *Sopen_prtmstr() * static PortTable *makePortTable(SKTEVENT port,char *sharehost) * static void delPortTable(PortTable *p) * void pm_server(Socket *client) * void pm_client(Socket *client,int waiting) * void pm_close(Socket *client) * void pm_quit( Socket *server, Socket *client) * void pm_table(Socket *client) * void pm_rmserver(Socket *client) * int firewall(Socket *skt) * void firewall_init(char *fwfile) * void pm_fwinit(Socket *skt) */ #include #include "sockets.h" #include #ifdef __WIN32__ # include #endif #ifdef unix # include # include #endif /* ---------------------------------------------------------------------- * Definitions: */ #define SPMFIREWALL /* select PortMaster firewall code */ #define BUFSIZE 128 /* size of character buffers */ #define SPMFWDATA 6 /* SSL PortMaster Firewall data quantity */ #define TIMEOUT 20L /* wait no more than 20 seconds at a Sread... */ # ifdef unix /* # define CloseStdio */ # endif /* exceptions -- if char is normally unsigned */ #if !defined(sgi) # define SIGNEDHOSTADDR #endif /* ---------------------------------------------------------------------- * Typedefs: */ typedef struct ClientWaiting_str ClientWaiting; typedef struct PortTable_str PortTable; #ifdef SPMFIREWALL typedef struct spmfw_str SpmFW; #endif /* ---------------------------------------------------------------------- * Data Structures: */ /* PortTable: this data structure supports matching host/process name * to ports */ struct PortTable_str { char *sktname; /* name of skt */ char *sharehost; /* optional Portmaster-sharing hostname */ SKTEVENT port; /* port of socket */ PortTable *nxt; /* linked list support */ PortTable *prv; /* linked list support */ }; struct ClientWaiting_str { Socket *client; /* waiting client socket */ char *sktname; /* name of server client is waiting for */ ClientWaiting *nxt; /* linked list support */ ClientWaiting *prv; /* linked list support */ }; #ifdef SPMFIREWALL struct spmfw_str { int data[SPMFWDATA]; SpmFW *nxt; }; #endif /* ---------------------------------------------------------------------- * Global Data: */ static struct sockaddr_in sin; static char hostname[BUFSIZE]; static char hostaddr[4]; static char sktname[BUFSIZE]; static SKTEVENT pm_ok = 0; /* will be initialized to htons(PM_OK) */ static SKTEVENT pm_sorry = 0; /* will be initialized to htons(PM_SORRY) */ static SKTEVENT pm_resend = 0; /* will be initialized to htons(PM_RESEND) */ static SKTEVENT pm_okshare = 0; /* will be initialized to htons(PM_OKSHARE) */ static PortTable *phd = NULL; static PortTable *ptl = NULL; static jmp_buf timedout; static ClientWaiting *cwhd = NULL; static ClientWaiting *cwtl = NULL; #ifdef SPMFIREWALL static SpmFW *spmfwhd = NULL; #endif /* ---------------------------------------------------------------------- * Usage: */ static char *usage[]={ XYELLOW,"Spm ",XGREEN,"[",XCYAN,"-f firewallfilename",XGREEN,"]\n\n", XUWHITE,"Author",XGREEN,": Dr. Charles E. Campbell, Jr.\n\n", XUWHITE,"Options:\n\n", XCYAN," -f firewallfilename",XGREEN,": optional firewall file\n", XUWHITE,"Explanation:\n\n",XGREEN, "The ",XYELLOW,"Spm",XGREEN," is the PortMaster for the Sockets library\n", "written by Dr. Charles E. Campbell, Jr. and Terry McRoberts of NASA.\n", "The Spm program provides a \"phonebook\" of server names and their\n", "associated port identifiers used by the Sopen function. The data\n", "is maintained in an internal \"PortTable\" linked list in memory.\n", "The PortMaster (Spm) must be run on any machine using the Sockets\n", "library.\n\n", "The PortMaster is not intended to be used directly by the user.\n", "Instead, Sopen, Sclose, and Srmsrvr are the primary interfaces to the\n", "PortMaster for the user. These functions follow a simple protocol and\n", "pass PortMaster \"event\"s to and from the PortMaster.\n\n", "There are some additional functions that the PortMaster provides: one\n", "may use PortMaster events to close down the PortMaster (PM_QUIT) and\n", "to query the PortMaster as to what servers are available (PM_TABLE).\n", "These functions do not have nice interfaces provided; one must be\n", "conversant with the PortMaster protocol to get them to work.\n\n", "\n",XUWHITE,"Version",XGREEN,": ", #ifdef unix "unix", #endif #ifdef vms "vms", #endif #ifdef msdos "msdos", #endif "\n", "",""}; /* ---------------------------------------------------------------------- * Prototypes: */ #ifdef __PROTOTYPE__ int main( int, char **); /* Spm.c */ static Socket *Sopen_prtmstr(void); /* Spm.c */ static PortTable *makePortTable(SKTEVENT,char *); /* Spm.c */ static void delPortTable(PortTable *); /* Spm.c */ void pm_server(Socket *,SKTEVENT); /* Spm.c */ void pm_client(Socket *,int); /* Spm.c */ void pm_close(Socket *); /* Spm.c */ void pm_quit( Socket *, Socket *); /* Spm.c */ void pm_table(Socket *); /* Spm.c */ void pm_rmserver(Socket *); /* Spm.c */ #ifdef AS400 void pm_strtsv(char * ); /* SPMSTRTR.c */ #endif #ifdef SPMFIREWALL int firewall(Socket *); /* Spm.c */ void firewall_init(char *); /* Spm.c */ void pm_fwinit(Socket *); /* Spm.c */ #endif #else extern int main(); /* Spm.c */ static Socket *Sopen_prtmstr(); /* Spm.c */ static PortTable *makePortTable(); /* Spm.c */ static void delPortTable(); /* Spm.c */ extern void pm_server(); /* Spm.c */ extern void pm_client(); /* Spm.c */ extern void pm_close(); /* Spm.c */ extern void pm_quit(); /* Spm.c */ extern void pm_table(); /* Spm.c */ extern void pm_rmserver(); /* Spm.c */ #ifdef AS400 extern void pm_strtsv(); /* SPMSTRTR.c */ #endif #ifdef SPMFIREWALL extern int firewall(); /* Spm.c */ extern void firewall_init(); /* Spm.c */ extern void pm_fwinit(); /* Spm.c */ #endif #endif /* __PROTOTYPE__ */ /* ---------------------------------------------------------------------- */ /* main: this is where it starts, ladies and gentlemen! */ #ifdef __WIN32__ // WinMain: Entry point of all Windows programs int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) #else # ifdef __PROTOTYPE__ int main( int argc, char **argv) # else int main( argc, argv) int argc; char **argv; # endif #endif { SKTEVENT event; Socket *client = NULL; Socket *server = NULL; int resend_cnt = 0; struct hostent *he = NULL; #ifdef unix int daemon=0; daemon= fork(); if(daemon < 0) error(XTDIO_ERROR,"Spm: PortMaster cannot fork"); else if(daemon) { /* we're the parent, so bye-bye! */ /* give out credits */ fprintf(stderr,"\n"); fprintf(stderr," *** Simple Sockets PortMaster ***\n"); fprintf(stderr," Authors: Charles E. Campbell, Jr., Ph.D.\n"); fprintf(stderr," Terry McRoberts\n"); fprintf(stderr,"\n"); fprintf(stderr,"of Goddard Space Flight Center, Maryland, USA\n"); fprintf(stderr," (uses port %4d)\n",PORTMASTER); exit(0); } setsid(); /* release controlling terminal */ #elif defined(__WIN32__) static int argc = 1; static char argv[1][4]={"Spm"}; #else /* give out credits */ fprintf(stderr,"\n"); fprintf(stderr," *** Simple Sockets PortMaster ***\n"); fprintf(stderr," Authors: Charles E. Campbell, Jr., Ph.D.\n"); fprintf(stderr," Terry McRoberts\n"); fprintf(stderr,"\n"); fprintf(stderr,"of Goddard Space Flight Center, Maryland, USA\n"); fprintf(stderr," (uses port %4d)\n",PORTMASTER); #endif /* #if unix .. else if windoz ... endif */ rdcolor(); /* read color strings */ Sinit(); /* initialize sockets */ /* handle command line */ if(argc > 1 && !strcmp(argv[1],"?")) { /* give usage message */ char **u; for(u= usage; u[0][0] || u[1][0]; ++u) rdcputs(*u,stdout); exit(0); } /* initialize */ pm_ok = htons(PM_OK); pm_okshare= htons(PM_OKSHARE); pm_sorry = htons(PM_SORRY); pm_resend = htons(PM_RESEND); /* get the current hostname */ gethostname(hostname,BUFSIZE); #ifdef SPMFIREWALL he= gethostbyname(hostname); /* get host address */ if(he) { hostaddr[0]= he->h_addr_list[0][0]; hostaddr[1]= he->h_addr_list[0][1]; hostaddr[2]= he->h_addr_list[0][2]; hostaddr[3]= he->h_addr_list[0][3]; #ifdef SIGNEDHOSTADDR if(hostaddr[0] < 0) hostaddr[0]+= 256; if(hostaddr[1] < 0) hostaddr[1]+= 256; if(hostaddr[2] < 0) hostaddr[2]+= 256; if(hostaddr[3] < 0) hostaddr[3]+= 256; #endif /* initialize firewall: -f * If no such option, then the "SPMFIREWALL" environment variable * is examined */ if(argc > 1 && argv[1][0] == '-' && argv[1][1] == 'f') firewall_init(argv[1]+2); else firewall_init(""); } else hostaddr[0]= hostaddr[1]= hostaddr[2]= hostaddr[3]= '\0'; #endif /* open a server for the PortMaster */ server= Sopen_prtmstr(); if(!server) { error(XTDIO_ERROR,"%s PortMaster's port (#%d) already in use!!!\n", hostname, PORTMASTER); #ifdef vms exit(1); #else exit(0); #endif } #ifdef CloseStdio /* get rid of things we no longer need */ fflush(stdin); fflush(stdout); fflush(stderr); fclose(stdin); fclose(stdout); fclose(stderr); #endif /* set up a timeout return point */ (void) setjmp(timedout); /* accept clients */ while(1) { /* close out old connection */ if(client) { shutdown(client->skt,2); close(client->skt); client->skt= 0;; freeSocket(client); /* free client Socket */ client= NULL; /* paranoia is good medicine */ } /* accept a client connection */ client= Saccept(server); if(!client) { continue; } #ifdef SPMFIREWALL if(firewall(client)) { /* reject clients not inside firewall */ Swrite(client,(char *) &pm_sorry,sizeof(pm_sorry)); shutdown(client->skt,2); close(client->skt); client->skt= 0;; freeSocket(client); client = NULL; continue; } #endif /* SPMFIREWALL */ /* get a PrtMstrEvent */ resend_cnt= 0; do { /* get the event that PortMaster is to handle */ if(Stimeoutwait(client,TIMEOUT,0L) < 0) longjmp(timedout,1); Sreadbytes(client,(char *) &event,sizeof(event)); event= ntohs( event); /* The PortMaster handles several events: /===============================================\ | Client PortMaster | | Event Sends Sends | |===============================================| | PM_SERVER PM_OK / PM_RESEND | | sktname | | port | | PM_OK / PM_SORRY | | PM_OK | |-----------------------------------------------| | PM_CLIENT | PM_CLIENTWAIT acts just like PM_CLIENT, | PM_OK / PM_RESEND | except the second PM_OK will be deferred | sktname | until the requested server is available | PM_OK / PM_SORRY | | port | |-----------------------------------------------| | PM_CLOSE | | PM_OK / PM_RESEND | | port | | PM_OK / PM_SORRY | |-----------------------------------------------| | PM_TABLE | | PM_OK / PM_RESEND | | count of servers | | "server : port#" | |-----------------------------------------------| | PM_QUIT | | PM_OK / PM_RESEND | | "PortMaster" | |-----------------------------------------------| | PM_FWINIT | | PM_OK / PM_RESEND | |-----------------------------------------------| | PM_SHARE PM_OK / PM_RESEND | Supports new portmaster sharing mode. A | hostname | single Portmaster can support a number of | sktname | different machines. The main reason for | port | this is to support PC-only shops, but it | PM_OK / PM_SORRY | will work with any PortMaster. |-----------------------------------------------| | PM_CLIENT | | PM_OK / PM_RESEND | | sktname | PM_CLIENT + PM_OKSHARE handles | PM_OKSHARE / PM_SORRY| PortMaster sharing for clients. | hostname | | port | \===============================================/ */ switch(event) { case PM_SERVER: /* enter port into database */ case PM_SHARE: /* enter hostname & port into database */ pm_server(client,event); resend_cnt= 0; break; case PM_CLIENTWAIT: /* return port from database or wait until server shows up */ pm_client(client,1); if(cwtl && client == cwtl->client) client= NULL; /* prevent premature closure of accept socket to client */ resend_cnt= 0; break; case PM_CLIENT: /* return port from database */ pm_client(client,0); resend_cnt= 0; break; case PM_CLOSE: /* delete port from database */ pm_close(client); resend_cnt= 0; break; case PM_QUIT: /* this function terminates the PortMaster */ pm_quit(server,client); resend_cnt= 0; break; case PM_TABLE: /* print out the PortTable */ pm_table(client); resend_cnt= 0; break; case PM_RMSERVER: /* remove a server entry from the PortMaster */ pm_rmserver(client); resend_cnt= 0; break; #ifdef SPMFIREWALL case PM_FWINIT: /* re-read firewall file */ pm_fwinit(client); resend_cnt= 0; break; #endif default: /* huh? whaddaIdonow? */ Swrite(client,(char *) &pm_resend,sizeof(pm_resend)); /* terminate resending after PM_MAXTRY attempts */ if(++resend_cnt > PM_MAXTRY) { resend_cnt= 0; shutdown(client->skt,2); close(client->skt); client->skt= 0;; freeSocket(client); client = NULL; } break; } } while(resend_cnt); } } /* ---------------------------------------------------------------------- */ /* Sopen_prtmstr: this function opens a socket handle for the Portmaster */ static Socket *Sopen_prtmstr() { socklen_t length; int status = 1; Socket *skt = NULL; /* allocate a Socket */ skt= makeSocket(hostname,"PortMaster",PM_SERVER); /* create a socket */ if((skt->skt= socket(AF_INET, SOCK_STREAM, 0)) <0 ) { freeSocket(skt); skt= NULL; return skt; } #ifndef SSLNOSETSOCKOPT /* allow PortMaster to be brought back up quickly (this should seldom be necessary!) */ status= 1; if(setsockopt(skt->skt,SOL_SOCKET,SO_REUSEADDR,(char *) &status,sizeof(status)) < 0) { } #endif /* initialize socket data structure */ sin.sin_family = AF_INET; sin.sin_addr.s_addr = INADDR_ANY; sin.sin_port = htons((u_short) PORTMASTER); /* bind socket data structure to this socket */ if(bind(skt->skt,(struct sockaddr *) &sin,sizeof(sin))) { freeSocket(skt); skt= NULL; return skt; } /* getsockname fills in the socket structure with information, * such as the port number assigned to this socket */ length = sizeof(sin); if(getsockname(skt->skt,(struct sockaddr *) &sin,&length)) { freeSocket(skt); skt= NULL; return skt; } skt->port= ntohs(sin.sin_port); /* prepare socket queue for (up to) PM_MAXREQUESTS (nominally 10) connection requests. * Often, even though PM_MAXREQUESTS > 5, only 5 pending connection requests will be * permitted by your o/s settings. */ listen(skt->skt,PM_MAXREQUESTS); #ifndef MSDOS #ifndef _AIX /* turn off TCP's buffering algorithm so small packets don't get * needlessly delayed */ if(setsockopt(skt->skt,IPPROTO_TCP,TCP_NODELAY,(char *) &status,sizeof(status)) < 0) { } #endif /* #ifndef _AIX ... */ #endif /* #ifndef MSDOS ... */ /* return server socket */ return skt; } /* ---------------------------------------------------------------------- */ /* makePortTable: this function allocates, links, sets up a PortTable */ #ifdef __PROTOTYPE__ static PortTable *makePortTable( SKTEVENT port, char *sharehost) #else static PortTable *makePortTable(port,sharehost) SKTEVENT port; char *sharehost; #endif { PortTable *p= NULL; /* allocate a PortTable */ p= (PortTable *) malloc(sizeof(PortTable)); outofmem((void *) p,"attempt to makePortTable(%s,%d)",sktname,port); /* double link a PortTable */ if(ptl) ptl->nxt= p; else phd = p; p->nxt= NULL; p->prv= ptl; ptl = p; /* set up PortTable */ p->sktname= (char *) calloc((size_t) strlen(sktname)+1,sizeof(char)); outofmem((void *) p->sktname,"attempt to allocate sktname<%s>\n",sktname); strcpy(p->sktname,sktname); p->sharehost= NULL; p->port = port; /* set up optional sharehost */ if(sharehost) { p->sharehost= (char *) calloc((size_t) strlen(sharehost)+1,sizeof(char)); outofmem((void *) p->sharehost,"attempt to allocate sharehost<%s>\n",sharehost); strcpy(p->sharehost,sharehost); } return p; } /* ---------------------------------------------------------------------- */ /* delPortTable: this function deletes a PortTable */ #ifdef __PROTOTYPE__ static void delPortTable(PortTable *p) #else static void delPortTable(p) PortTable *p; #endif { /* free memory used by PortTable */ if(p->sktname) free(p->sktname); if(p->sharehost) free(p->sharehost); /* de-link the PortTable */ if(p->prv) p->prv->nxt= p->nxt; else phd = p->nxt; if(p->nxt) p->nxt->prv= p->prv; else ptl = p->prv; } /* ---------------------------------------------------------------------- */ /* pm_server: this function handles the PortMaster Server protocol */ #ifdef __PROTOTYPE__ void pm_server( Socket *client, /* temporary client->PortMaster socket */ SKTEVENT event) /* PM_SERVER or PM_SHARE */ #else void pm_server(client,event) Socket *client; SKTEVENT event; #endif { PortTable *p = NULL; SKTEVENT port; SKTEVENT mesg; static char sharehost[BUFSIZE]; ClientWaiting *cw = NULL; ClientWaiting *cwnxt = NULL; Swrite(client,(char *) &pm_ok,sizeof(pm_ok)); if(event == PM_SHARE) { if(Stimeoutwait(client,TIMEOUT,0L) < 0) longjmp(timedout,1); Sgets(sharehost,BUFSIZE,client); } else sharehost[0]= '\0'; if(Stimeoutwait(client,TIMEOUT,0L) < 0) longjmp(timedout,1); Sgets(sktname,BUFSIZE,client); /* check if sktname already in table */ for(p= phd; p; p= p->nxt) if(!strcmp(sktname,p->sktname)) { Swrite(client,(char *) &pm_sorry,sizeof(pm_sorry)); return; } if(Stimeoutwait(client,TIMEOUT,0L) < 0) longjmp(timedout,1); Sreadbytes(client,(char *) &port,sizeof(port)); port= ntohs( port); /* make a PortTable entry for the new server */ p= makePortTable(port,(event == PM_SHARE)? sharehost : NULL); /* unable to make PortTable entry */ if(!p) { Swrite(client,(char *) &pm_sorry,sizeof(pm_sorry)); } else { Swrite(client,(char *) &pm_ok,sizeof(pm_ok)); if(Stimeoutwait(client,TIMEOUT,0L) < 0) longjmp(timedout,1); Sreadbytes(client,(char *) &mesg,sizeof(mesg)); mesg= ntohs(mesg); if(mesg != PM_OK) longjmp(timedout,1); /* go through ClientWaiting list to let any clients waiting * to talk to this server that the server is now up */ for(cw= cwhd, cwnxt= NULL; cw; cw= cwnxt) if(!strcmp(cw->sktname,sktname)) { /* found a matching ClientWaiting */ cwnxt= cw->nxt; /* respond with PM_OK (normally) or PM_OKSHARE for PortMaster-sharing */ if(p->sharehost) { Swrite(cw->client,(char *) &pm_okshare,sizeof(pm_okshare)); Sputs(p->sharehost,cw->client); } else { Swrite(cw->client,(char *) &pm_ok,sizeof(pm_ok)); } /* return port number */ port= htons(p->port); Swrite(cw->client,(char *) &port,sizeof(port)); /* de-link ClientWaiting */ if(cw->prv) cw->prv->nxt= cw->nxt; else cwhd = cw->nxt; if(cw->nxt) cw->nxt->prv= cw->prv; else cwtl = cw->prv; free(cw->sktname); Sclose(cw->client); free((char *) cw); } } } /* ---------------------------------------------------------------------- */ /* pm_client: handle PortMaster client protocol (looks up server port) */ #ifdef __PROTOTYPE__ void pm_client(Socket *client,int waiting) #else void pm_client(client,waiting) Socket *client; int waiting; #endif { PortTable *p = NULL; SKTEVENT port; /* send first PM_OK, letting client know that the PortMaster is alive */ Swrite(client,(char *) &pm_ok,sizeof(pm_ok)); /* get requested server's sktname from client */ if(Stimeoutwait(client,TIMEOUT,0L) < 0) longjmp(timedout,1); Sgets(sktname,BUFSIZE,client); /* attempt to look up sktname in PortTable linked list */ for(p= phd; p; p= p->nxt) { if(!strcmp(p->sktname,sktname)) { /* respond with PM_OK (normally) or PM_OKSHARE for PortMaster-sharing */ if(p->sharehost) { Swrite(client,(char *) &pm_okshare,sizeof(pm_okshare)); Sputs(p->sharehost,client); } else { Swrite(client,(char *) &pm_ok,sizeof(pm_ok)); } /* return port number */ port= htons(p->port); Swrite(client,(char *) &port,sizeof(port)); break; } } /* if unable to find server */ if(!p) { if(waiting) { /* put request on ClientWaiting list */ ClientWaiting *cw= NULL; /* double-link and initialize a ClientWaiting structure */ cw= (ClientWaiting *) malloc(sizeof(ClientWaiting)); if(cw) { if(cwtl) cwtl->nxt= cw; else cwhd = cw; cw->prv = cwtl; cw->nxt = (ClientWaiting *) NULL; cwtl = cw; cw->client = client; cw->sktname = calloc(strlen(sktname)+1,sizeof(char)); strcpy(cw->sktname,sktname); return; } } /* send PM_SORRY to indicate to client that server cannot be located (yet) */ #ifdef AS400 pm_strtsv(sktname); #endif Swrite(client,(char *) &pm_sorry,sizeof(pm_sorry)); } } /* ---------------------------------------------------------------------- */ /* pm_close: this function handles a server close (removes server from * PortTable) */ #ifdef __PROTOTYPE__ void pm_close(Socket *client) #else void pm_close(client) Socket *client; #endif { PortTable *p = NULL; SKTEVENT port; Swrite(client,(char *) &pm_ok,sizeof(pm_ok)); /* get port of skt to be closed */ if(Stimeoutwait(client,TIMEOUT,0L) < 0) longjmp(timedout,1); Sreadbytes(client,(char *) &port,sizeof(port)); port= ntohs( port); for(p= phd; p; p= p->nxt) { if(p->port == port) { Swrite(client,(char *) &pm_ok,sizeof(pm_ok)); delPortTable(p); break; } } /* report if unable to find requested port */ if(!p) { Swrite(client,(char *) &pm_sorry,sizeof(pm_sorry)); } } /* ---------------------------------------------------------------------- */ /* pm_quit: this function causes the PortMaster to quit (shutdown) */ #ifdef __PROTOTYPE__ void pm_quit( Socket *server, Socket *client) #else void pm_quit( server, client) Socket *server; Socket *client; #endif { Swrite(client,(char *) &pm_ok,sizeof(pm_ok)); /* get sktname (should be PortMaster) */ if(Stimeoutwait(client,TIMEOUT,0L) < 0) longjmp(timedout,1); Sgets(sktname,BUFSIZE,client); /* if sktname was "PortMaster", then quit */ if(!strcmp(sktname,"PortMaster")) { if(client) { shutdown(client->skt,2); close(client->skt); client->skt= 0;; freeSocket(client); } if(server) { shutdown(client->skt,2); close(server->skt); server->skt= 0;; freeSocket(server); } #ifdef vms exit(1); #else exit(0); #endif } /* if not "PortMaster", then don't quit */ else { Swrite(client,(char *) &pm_sorry,sizeof(pm_sorry)); } } /* ---------------------------------------------------------------------- */ /* pm_table: this function returns the PortMaster's PortTable through the * socket to it */ #ifdef __PROTOTYPE__ void pm_table(Socket *client) #else void pm_table(client) Socket *client; #endif { PortTable *p = NULL; SKTEVENT cnt; Swrite(client,(char *) &pm_ok,sizeof(pm_ok)); /* count table entries */ for(p= phd, cnt= 0; p; p= p->nxt) ++cnt; cnt= htons(cnt); Swrite(client,(char *) &cnt,sizeof(cnt)); /* send PortMaster table out the socket */ for(p= phd; p; p= p->nxt) { if(p->sharehost) Sprintf(client,"%s@%s : %d",p->sktname,p->sharehost,p->port); else Sprintf(client,"%s : %d",p->sktname,p->port); } } /* ---------------------------------------------------------------------- */ /* pm_rmserver: this function removes a server entry from the PortTable */ #ifdef __PROTOTYPE__ void pm_rmserver(Socket *client) #else void pm_rmserver(client) Socket *client; #endif { char locbuf[BUFSIZE]; PortTable *p = NULL; Swrite(client,(char *) &pm_ok,sizeof(pm_ok)); /* get name of server to be removed from PortTable */ if(Stimeoutwait(client,TIMEOUT,0L) < 0) longjmp(timedout,1); Sgets(locbuf,BUFSIZE,client); for(p= phd; p; p= p->nxt) { if(!strcmp(p->sktname,locbuf)) { Swrite(client,(char *) &pm_ok,sizeof(pm_ok)); delPortTable(p); break; } } /* report if unable to find requested port */ if(!p) { Swrite(client,(char *) &pm_sorry,sizeof(pm_sorry)); } } /* --------------------------------------------------------------------- */ #ifdef SPMFIREWALL /* firewall: how to keep out unwanted types * Environment Variable: SPMFIREWALL=spfirewall.dat file * * format: * [#*] [#*] [#*] [#*] [#*] [#*] * * Use a number to restrict entry; an * for accept all * * Returns: 0=accept * 1=reject */ #ifdef __PROTOTYPE__ int firewall(Socket *skt) #else int firewall(skt) Socket *skt; #endif { int ret = 1; /* default: flag as reject */ static struct sockaddr name; static socklen_t namelen= sizeof(name.sa_data); SpmFW *spmfw = NULL; if(!spmfwhd) { return 0; } /* get connecting socket's internet address (peername) */ if(getpeername(skt->skt,&name,&namelen) == -1) { } else { /* check that connecting socket's internet address is approved */ int i; int datum; for(spmfw= spmfwhd; spmfw; spmfw= spmfw->nxt) { for(i= 0; i < SPMFWDATA; ++i) { datum= name.sa_data[i]; if(datum < 0) datum+= 256; if(spmfw->data[i] != -1 && spmfw->data[i] != datum) break; } if(i >= SPMFWDATA) { /* name in firewall */ ret= 0; /* accept */ break; } } } return ret; } /* --------------------------------------------------------------------- */ /* firewall_init: initialize PortMaster firewall */ #ifdef __PROTOTYPE__ void firewall_init(char *fwfile) #else void firewall_init(fwfile) char *fwfile; #endif { char buf[BUFSIZE]; char *b = NULL; int i; FILE *fp = NULL; SpmFW *spmfw = NULL; /* free up old firewall data (if any) */ if(spmfwhd) { SpmFW *spmfwnxt=NULL; for(spmfw= spmfwhd; spmfw; spmfw= spmfwnxt) { spmfwnxt= spmfw->nxt; free((char *) spmfw); } spmfwhd= NULL; } if(!fwfile || !fwfile[0]) { /* get fwfile from environment SPMFIREWALL */ fwfile= getenv("SPMFIREWALL"); } if(fwfile) { fp= fopen(fwfile,"r"); if(fp) { /* allocate and forward-link a SpmFW */ spmfw= (SpmFW *) malloc(sizeof(SpmFW)); if(!spmfw) { error(XTDIO_WARNING, "unable to allocate a SpmFW in firewall_init()\n"); return; } spmfw->nxt = spmfwhd; spmfwhd = spmfw; /* insure that the PortMaster host is on the firewall list */ spmfw->data[0]= -1; spmfw->data[1]= -1; spmfw->data[2]= hostaddr[0]; spmfw->data[3]= hostaddr[1]; spmfw->data[4]= hostaddr[2]; spmfw->data[5]= hostaddr[3]; /* read in file */ while(fgets(buf,BUFSIZE,fp)) { /* ignore comments, ignore blank lines */ b= strchr(buf,'#'); if(b) *b= '\0'; b= stpblk(buf); if(!b[0]) continue; /* allocate and forward-link a SpmFW */ spmfw= (SpmFW *) malloc(sizeof(SpmFW)); if(!spmfw) { error(XTDIO_WARNING, "unable to allocate a SpmFW in firewall_init()\n"); return; } spmfw->nxt= spmfwhd; spmfwhd = spmfw; for(i= 0; i < SPMFWDATA; ++i) { if(*b == '*') { spmfw->data[i]= -1; b = stpblk(b+1); } else { sscanf(b,"%d",&spmfw->data[i]); b= stpnxt(b,"%d%b"); } } } } } } /* --------------------------------------------------------------------- */ /* pm_fwinit: handles PortMaster firewall re-initialize */ #ifdef __PROTOTYPE__ void pm_fwinit(Socket *client) #else void pm_fwinit(client) Socket *client; #endif { firewall_init(""); Swrite(client,(char *) &pm_ok,sizeof(pm_ok)); } #endif /* SPMFIREWALL */ /* --------------------------------------------------------------------- */ #ifdef STRTSRVR_PGM /* pm_strtsv: Starts server if it is not registered * * Author: Steve Richards * * We will take the name and spawn a program that will actually start the * server so it can register the documenation can be adjusted to tell the * client requester that if they get a pm_sorry to delay a bit (5 seconds say) and * retry the request. * * I didn't want to change the protocol by sending a different response but it * would be possible to send say a "retry" and keep track of how many times the * server was tried to be started etc... * I have added the server starting program name to the */ #ifdef __PROTOTYPE__ void pm_strtsv(char *sktname) #else void pm_strtsv(sktname) char *sktname; #endif { char command_string[1024] = ""; strcpy (command_string,STRTSRVR_PGM); strcat (command_string," "); #ifdef AS400 strcat (command_string,"("); strcat (command_string,sktname); strcat (command_string,")"); #else strcat (command_string,sktname); #endif fprintf(stderr,"trying to start %s\n",command_string); system(command_string); } #endif /* STRTSV */ /* --------------------------------------------------------------------- * vim: ts=4 */ dmucs-0.6.1/COSMIC/EXE/sktdbg.c0000644000175000017500000005020410360753042013774 0ustar samsam/* sktdbg.c: this program supports testing the Sockets library * sktdbg {s|c} sktname */ #include #include "xtdio.h" #include "sockets.h" /* ------------------------------------------------------------------------- * Local Definitions: */ /* #define ansi_escapes -- experimental, doesn't work yet */ #define BIGBUFSIZE 8192 #define BUFSIZE 128 #define PLAINPROMPT 0 #define BYTESPROMPT 1 #define DYNAMICPROMPT 2 #define TIMEOUT 30L /* ------------------------------------------------------------------------- * Prototypes: */ #ifdef __PROTOTYPE__ void Taccept(char *buf); void Tclose(char *buf); void Tmenu(char *buf); void Tdebug(char *buf); void Tpeek(char *buf); void Ttest(char *buf); void Tfwinit(char *buf); void Tfput(char *buf); void Tgets(char *buf); void Tprintf(char *buf); void Tputs(char *buf); void Tshut(char *buf); void Tquit(char *buf); void Tread(char *buf); void Trmsrvr(char *buf); void Tscanf(char *buf); void Ttable(char *buf); void Twait(char *buf); void Twrite(char *buf); void Tisset(char *buf); #else extern main(); /* sktdbg.c */ extern void Taccept(); /* sktdbg.c */ extern void Tclose(); /* sktdbg.c */ extern void Tmenu(); /* sktdbg.c */ extern void Tdebug(); /* sktdbg.c */ extern void Tpeek(); /* sktdbg.c */ extern void Ttest(); /* sktdbg.c */ extern void Tfwinit(); /* sktdbg.c */ extern void Tfput(); /* sktdbg.c */ extern void Tgets(); /* sktdbg.c */ extern void Tputs(); /* sktdbg.c */ extern void Tshut(); /* sktdbg.c */ extern void Tquit(); /* sktdbg.c */ extern void Tread(); /* sktdbg.c */ extern void Twrite(); /* sktdbg.c */ extern void Twait(); /* sktdbg.c */ extern void Tscanf(); /* sktdbg.c */ extern void Tprintf(); /* sktdbg.c */ extern void Ttable(); /* sktdbg.c */ extern void Trmsrvr(); /* sktdbg.c */ extern void Tisset(); /* sktdbg.c */ #endif /* ------------------------------------------------------------------------- * Global Data */ #ifdef __PROTOTYPE__ struct menu_str{ char *cmd; void (*test)(char *); } menu[]= #else struct menu_str{ char *cmd; void (*test)(); } menu[]= #endif {{"accept" , Taccept}, {"close" , Tclose}, {"fput" , Tfput}, {"fwinit" , Tfwinit}, {"get" , Tgets}, {"isset" , Tisset}, {"menu" , Tmenu}, {"peek" , Tpeek}, {"printf" , Tprintf}, {"put" , Tputs}, {"q" , Tquit}, {"quit" , Tquit}, {"read" , Tread}, {"rmsrvr" , Trmsrvr}, {"scanf" , Tscanf}, {"shutdown", Tshut}, {"table" , Ttable}, {"test" , Ttest}, {"wait" , Twait}, {"write" , Twrite}, #ifdef DEBUG {"D" , Tdebug}, #endif {"?" , Tmenu} }; int nmenu = sizeof(menu)/sizeof(struct menu_str); Socket *skt = NULL; Socket *server = NULL; #ifdef ansi_escapes int pflag= DYNAMICPROMPT; #else int pflag= BYTESPROMPT; #endif /* ------------------------------------------------------------------------- * Source Code: */ /* main: */ #ifdef __PROTOTYPE__ int main( int argc, char **argv) #else /* __PROTOTYPE__ */ int main(argc,argv) int argc; char **argv; #endif /* __PROTOTYPE__ */ { char *b = NULL; char buf[BUFSIZE]; char cmdbuf[BUFSIZE]; int icmd; #ifdef ansi_escapes int fd; Smask fdmask; int newcnt = 0; int oldcnt = 0; Smask sktmask; #endif rdcolor(); /* initialize ANSI escape sequences */ if(argc < 3) { /* give usage */ static char *usage[]={ XYELLOW,"sktdbg ", XCYAN,"sktname ",XGREEN, "{",XCYAN,"sScb",XGREEN,"}\n\n", XUWHITE,"Author:\n",XGREEN,"Dr. Charles E. Campbell\n\n", XUWHITE,"Explanation:\n",XGREEN, "This program is designed to test out the Sockets Library.\n", "The ",XCYAN,"sktname",XGREEN," is the name of the socket.\n", "It can be sktname@hostname or just sktname (current host is then used)\n", "The ",XCYAN,"s",XGREEN," yields a server/accept socket.\n", "The ",XCYAN,"c",XGREEN," yields a client socket.\n", "The ",XCYAN,"b",XGREEN," yields a client-wait socket.\n\n", "The Sockets Library was written by Dr. Charles E. Campbell, Jr. and\n", "Terry McRoberts of Goddard Space Flight Center, NASA\n", "",""}; char **u; /* print out explanation */ for(u= usage; **u || **(u+1); ++u) rdcputs(*u,stdout); #ifdef vms exit(1); #else exit(0); #endif } Sinit(); /* initialize sockets */ /* open a socket of the appropriate type */ skt= Sopenv(argv[1],argv[2],"SKTDBG"); if(!skt) { if(!strcmp(argv[2],"s")) { error(XTDIO_WARNING,"unable to Sopen(%s,%s), removing <%s>\n", argv[1],argv[2],argv[1]); Srmsrvr(argv[1]); skt= Sopenv(argv[1],argv[2],"SKTDBG"); if(!skt) error(XTDIO_ERROR,"2nd try: unable to Sopen(%s,%s)\n",argv[1],argv[2]); else error(XTDIO_NOTE,"second try to Sopen(%s,%s) succeeded\n",argv[1],argv[2]); } else error(XTDIO_ERROR,"unable to Sopen(%s,%s)\n",argv[1],argv[2]); } /* print out menu */ fputc('\n',stdout); Tmenu(""); /* command loop */ while(1) { /* get command from user */ switch(pflag) { case PLAINPROMPT: printf("%sEnter: %s",CYAN,GREEN); break; case BYTESPROMPT: printf("%s(%s%4d%s bytes) Enter: %s", CYAN,GREEN,Stest(skt), CYAN,GREEN); break; #ifdef ansi_escapes case DYNAMICPROMPT: /* set up Smaskwait */ Smaskset((Socket *) NULL); fd= fileno(stdin); Smaskfdset(fd); fdmask= Smaskget(); Smaskset(skt); sktmask= Smaskget(); printf("%s(%s%4d%s bytes) Enter: %s", CYAN,GREEN,Stest(skt), CYAN,GREEN); fflush(stdout); while(1) { /* block until skt or keyboard sends something */ Smaskwait(); Smaskuse(fdmask); if(Smasktest()) break; Smaskuse(sktmask); /* update screen */ newcnt= Stest(skt); if(newcnt == oldcnt) continue; oldcnt= newcnt; printf("\033[20D%s(%s%4d%s bytes) Enter: %s", CYAN,GREEN,newcnt, CYAN,GREEN); fflush(stdout); sleep(1); } break; #endif /* ansi_escapes */ } /* get prompt from user */ fgets(buf,BUFSIZE,stdin); srmtrblk(buf); b= stpblk(buf); if(!*b) continue; /* get command from b */ sscanf(buf,"%s",cmdbuf); b= stpnxt(buf,"%s%b"); /* point past command string */ /* handle option */ if(*b == '-') { switch(b[1]) { case 'p': /* prompt mode control */ #ifdef ansi_escapes if(++pflag > DYNAMICPROMPT) pflag= PLAINPROMPT; #else if(++pflag > BYTESPROMPT) pflag= PLAINPROMPT; #endif break; default: error(XTDIO_WARNING,"I don't know the <%s%s%s> command\n", MAGENTA,cmdbuf,GREEN); break; } continue; } /* identify command */ for(icmd= 0; icmd < nmenu; ++icmd) if(!strcmp(menu[icmd].cmd,cmdbuf)) break; if(icmd >= nmenu) { error(XTDIO_WARNING,"I don't know the <%s%s%s> command\n", MAGENTA,cmdbuf,GREEN); continue; } /* pass control to command */ (*menu[icmd].test)(b); } } /* ------------------------------------------------------------------------- */ /* Taccept: this function allows a server to accept a connection */ #ifdef __PROTOTYPE__ void Taccept(char *buf) #else /* __PROTOTYPE__ */ void Taccept(buf) char *buf; #endif /* __PROTOTYPE__ */ { /* If server is null, then the skt *is* a server. Copy it over. * Otherwise, if there's a skt, close it before accepting */ if(!server) { if(skt->type == PM_SERVER) { server= skt; skt = NULL; } else { error(XTDIO_WARNING,"cannot Saccept with a skt<%s>\n",Sprtskt(skt)); return; } } else if(skt) { Sclose(skt); skt= NULL; } /* only wait up to TIMEOUT seconds */ if(Stimeoutwait(server,TIMEOUT,0L) <= 0) { error(XTDIO_WARNING,"accept timed out (waited %ld seconds)\n",TIMEOUT); return; } skt = Saccept(server); printf(" %sSaccept%s => <%s%s%s>\n", YELLOW,GREEN,MAGENTA,skt? Sprtskt(skt) : "null",GREEN); } /* ------------------------------------------------------------------------- */ /* Tclose: this function closes the socket and, * for non-accept sockets, exits the program */ #ifdef __PROTOTYPE__ void Tclose(char *buf) #else /* __PROTOTYPE__ */ void Tclose(buf) char *buf; #endif /* __PROTOTYPE__ */ { switch(skt->type) { case PM_ACCEPT: Sclose(skt); skt = server; server= NULL; printf(" %sSclose%s: closed accept Socket\n",YELLOW,GREEN); printf(" server socket still available\n"); break; case PM_CLIENT: Sclose(skt); printf(" %sSclose%s: closed client Socket\n",YELLOW,GREEN); #ifdef vms exit(1); #else exit(0); #endif case PM_SERVER: Sclose(skt); skt= server= NULL; printf(" %sSclose%s: closed server Socket\n",YELLOW,GREEN); #ifdef vms exit(1); #else exit(0); #endif } } /* ------------------------------------------------------------------------- */ /* Tmenu: this function print out the commands */ #ifdef __PROTOTYPE__ void Tmenu(char *buf) #else /* __PROTOTYPE__ */ void Tmenu(buf) char *buf; #endif /* __PROTOTYPE__ */ { int i; printf("%sSocket Test Commands%s\n",UWHITE,GREEN); for(i= 0; i < nmenu; ++i) printf(" %s\n",menu[i].cmd); } /* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */ /* Tpeek: this function does a Speek */ #ifdef __PROTOTYPE__ void Tpeek(char *buf) #else /* __PROTOTYPE__ */ void Tpeek(buf) char *buf; #endif /* __PROTOTYPE__ */ { static char locbuf[BIGBUFSIZE]; int buflen; buflen= Speek(skt,locbuf,BIGBUFSIZE); printf(" %sSpeek%s=> skt<%s> locbuf<%s> buflen=%d\n", YELLOW,GREEN,Sprtskt(skt),sprt(locbuf),buflen); } /* ------------------------------------------------------------------------- */ /* Ttest: this function does a STell */ #ifdef __PROTOTYPE__ void Ttest(char *buf) #else /* __PROTOTYPE__ */ void Ttest(buf) char *buf; #endif /* __PROTOTYPE__ */ { int buflen; buflen= Stest(skt); buf[0]= '\0'; printf(" %sStest%s => skt<%s> %d\n",YELLOW,GREEN,Sprtskt(skt),buflen); } /* ------------------------------------------------------------------------- */ /* Tfwinit: sends a PM_FW to the PortMaster */ #ifdef __PROTOTYPE__ void Tfwinit(char *buf) #else /* __PROTOTYPE__ */ void Tfwinit(buf) char *buf; #endif /* __PROTOTYPE__ */ { int trycnt; Socket *pmskt; SKTEVENT mesg; /* begin PortMaster firewall re-initialize */ pmskt= Sopen_clientport(buf,"PMClient",PORTMASTER); if(!pmskt) { freeSocket(pmskt); return; } /* send a PM_FWINIT */ for(trycnt= 0; trycnt < PM_MAXTRY; ++trycnt) { /* this is where the PM_FWINIT gets sent */ mesg= htons(PM_FWINIT); Swrite(pmskt,(char *) &mesg,sizeof(mesg)); /* wait for PortMaster to respond with PM_OK (I hope) */ if(Stimeoutwait(pmskt,20L,0L) < 0) { Sclose(pmskt); return; } /* read PortMaster response */ Sread(pmskt,(char *) &mesg,sizeof(mesg)); mesg= ntohs(mesg); if(mesg != PM_RESEND) break; } if(mesg == PM_OK) printf("PortMaster firewall re-initialized\n"); else printf("PortMaster isn't handling firewalls\n"); } /* ------------------------------------------------------------------------- */ /* Tfput: puts the entire contents of a file, line by line, across a Socket */ #ifdef __PROTOTYPE__ void Tfput(char *buf) #else /* __PROTOTYPE__ */ void Tfput(buf) char *buf; #endif /* __PROTOTYPE__ */ { char *b = NULL; char locbuf[BUFSIZE]; FILE *fp = NULL; srmtrblk(buf); b = stpblk(buf); if(*b && skt) { fp= fopen(b,"r"); if(!fp) { error(XTDIO_WARNING,"unable to open file<%s>\n",sprt(b)); return; } while(fgets(locbuf,BUFSIZE,fp)) { srmtrblk(locbuf); Sputs(locbuf,skt); printf(" %sSputs%s(locbuf<%s>,skt<%s>)\n", YELLOW, GREEN, sprt(locbuf), Sprtskt(skt)); } fclose(fp); } } /* --------------------------------------------------------------------- */ /* Tgets: this function does a Sread */ #ifdef __PROTOTYPE__ void Tgets(char *buf) #else /* __PROTOTYPE__ */ void Tgets(buf) char *buf; #endif /* __PROTOTYPE__ */ { char locbuf[BUFSIZE]; /* only wait up to TIMEOUT seconds */ if(Stimeoutwait(skt,TIMEOUT,0L) <= 0) { error(XTDIO_WARNING,"get timed out (waited %ld seconds)\n",TIMEOUT); return; } (void *) Sgets(locbuf,BUFSIZE,skt); printf(" %sSgets%s: skt<%s> locbuf<%s>\n", YELLOW,GREEN,Sprtskt(skt),sprt(locbuf)); } /* ------------------------------------------------------------------------- */ /* Tputs: this function does a Swrite * Supports \a - \z for control character insertion */ #ifdef __PROTOTYPE__ void Tputs(char *buf) #else /* __PROTOTYPE__ */ void Tputs(buf) char *buf; #endif /* __PROTOTYPE__ */ { char locbuf[BUFSIZE]; char *backslash; char *b; char *lb; backslash= strchr(buf,'\\'); if(backslash) { for(b= buf, lb= locbuf; *b; ++b) { *lb= *b; if(*b == '\\') { ++b; if (*b == '\\') continue; else if('a' <= *b && *b <= 'z') *lb= (*b) - 'a' + 1; } } *lb= '\0'; Sputs(locbuf,skt); printf(" %sSputs%s(buf<%s>,skt<%s>)\n",YELLOW,GREEN,sprt(locbuf),Sprtskt(skt)); } else { Sputs(buf,skt); printf(" %sSputs%s(buf<%s>,skt<%s>)\n",YELLOW,GREEN,sprt(buf),Sprtskt(skt)); } } /* ------------------------------------------------------------------------- */ /* Tshut: this function shuts down the PortMaster */ #ifdef __PROTOTYPE__ void Tshut(char *buf) #else /* __PROTOTYPE__ */ void Tshut(buf) char *buf; #endif /* __PROTOTYPE__ */ { int trycnt; Socket *pmskt; SKTEVENT mesg; /* shut down client/accept socket */ printf(" %sSclose%s(skt<%s>)",YELLOW,GREEN,Sprtskt(skt)); Sclose(skt); skt= NULL; /* if server, shut down server socket */ if(server) { printf(" %sSclose%s(server<%s>)",YELLOW,GREEN,Sprtskt(server)); Sclose(server); server= NULL; } /* begin PortMaster shutdown sequence */ pmskt= Sopen_clientport(buf,"PMClient",PORTMASTER); if(!pmskt) { freeSocket(pmskt); return; } /* send a QUIT */ for(trycnt= 0; trycnt < PM_MAXTRY; ++trycnt) { mesg= htons(PM_QUIT); Swrite(pmskt,(char *) &mesg,sizeof(mesg)); if(Stimeoutwait(pmskt,20L,0L) < 0) { Sclose(pmskt); return; } Sread(pmskt,(char *) &mesg,sizeof(mesg)); mesg= ntohs(mesg); if(mesg == PM_OK) break; } /* finish up termination sequence */ Sputs("PortMaster",pmskt); Sclose(pmskt); printf(" %sclosed down%s PortMaster\n",YELLOW,GREEN); /* ok, exit the program */ #ifdef vms exit(1); #else exit(0); #endif } /* ------------------------------------------------------------------------- */ /* Tquit: this function quits */ #ifdef __PROTOTYPE__ void Tquit(char *buf) #else /* __PROTOTYPE__ */ void Tquit(buf) char *buf; #endif /* __PROTOTYPE__ */ { if(skt) { printf(" %sSclose%s(skt<%s>)\n",YELLOW,GREEN,Sprtskt(skt)); Sclose(skt); } if(server) { printf(" %sSclose%s(server<%s>)\n",YELLOW,GREEN,Sprtskt(server)); Sclose(server); } #ifdef vms exit(1); #else exit(0); #endif } /* ------------------------------------------------------------------------- */ /* Tread: this function does a Sread */ #ifdef __PROTOTYPE__ void Tread(char *buf) #else /* __PROTOTYPE__ */ void Tread(buf) char *buf; #endif /* __PROTOTYPE__ */ { char locbuf[BUFSIZE]; int buflen; int ibuf; buflen= Sread(skt,locbuf,BUFSIZE); printf(" %sSread%s: skt<%s> locbuf<",YELLOW,GREEN,Sprtskt(skt)); for(ibuf=0; ibuf < buflen; ++ibuf) printf("%s ",cprt(locbuf[ibuf])); printf("> buflen=%d\n",buflen); } /* ------------------------------------------------------------------------- */ /* Twrite: this function does a Swrite */ #ifdef __PROTOTYPE__ void Twrite(char *buf) #else /* __PROTOTYPE__ */ void Twrite(buf) char *buf; #endif /* __PROTOTYPE__ */ { int buflen; buflen= Swrite(skt,buf,strlen(buf)+1); printf(" %sSwrite%s: skt<%s> buf<%s> buflen=%d\n", YELLOW,GREEN,Sprtskt(skt),sprt(buf),buflen); } /* ------------------------------------------------------------------------- */ /* Twait: this function does a Swait */ #ifdef __PROTOTYPE__ void Twait(char *buf) #else /* __PROTOTYPE__ */ void Twait(buf) char *buf; #endif /* __PROTOTYPE__ */ { int buflen; buflen= Swait(skt); printf(" %sSwait%s: skt<%s> buflen=%d\n",YELLOW,GREEN,Sprtskt(skt),buflen); } /* ------------------------------------------------------------------------- */ /* Tscanf: this function tests Sscanf with "%s %d %lf %s" */ #ifdef __PROTOTYPE__ void Tscanf(char *buf) #else /* __PROTOTYPE__ */ void Tscanf(buf) char *buf; #endif /* __PROTOTYPE__ */ { char *b = NULL; char buf1[BUFSIZE]; int i; double d; for(b= strchr(buf,'%'); b; b= strchr(b+1,'%')) { /* only wait up to TIMEOUT seconds */ if(Stimeoutwait(skt,TIMEOUT,0L) <= 0) { error(XTDIO_WARNING,"scanf timed out (waited %ld seconds)\n",TIMEOUT); return; } /* skip over 'l' and 'h' modifier */ if (b[1] == 'l') ++b; else if(b[1] == 'h') ++b; /* process data on Socket */ switch(b[1]) { case 'c': Sscanf(skt,"%c",buf1); printf(" %sSscanf%s with %%c: rcvd<%s%c%s>\n", YELLOW,CYAN, GREEN,buf1[0],CYAN); break; case 'd': Sscanf(skt,"%d",&i); printf(" %sSscanf%s with %%d: rcvd<%s%d%s>\n", YELLOW,CYAN, GREEN,i,CYAN); break; case 'f': Sscanf(skt,"%lf",&d); printf(" %sSscanf%s with %%lf: rcvd<%s%f%s>\n", YELLOW,CYAN, GREEN,d,CYAN); break; case 's': Sscanf(skt,"%s",buf1); printf(" %sSscanf%s with %%s: rcvd<%s%s%s>\n", YELLOW,CYAN, GREEN,sprt(buf1),CYAN); break; default: error(XTDIO_WARNING,"sktdbg doesn't support format code <%s>\n",sprt(b)); break; } } } /* ------------------------------------------------------------------------- */ /* Tprintf: this function tests Sprintf with "%s %d %s" */ #ifdef __PROTOTYPE__ void Tprintf(char *buf) #else /* __PROTOTYPE__ */ void Tprintf(buf) char *buf; #endif /* __PROTOTYPE__ */ { int i = 7; double d = 8.; Sprintf(skt,"%s %d %f itworked!",buf,i,d); printf(" %sSprintf%s: skt<%s> i=%d d=%f itworked!\n", YELLOW,GREEN,Sprtskt(skt),i,d); } /* ------------------------------------------------------------------------- */ /* Ttable: this function queries the PortMaster for a table, and then * prints it out */ #ifdef __PROTOTYPE__ void Ttable(char *buf) #else /* __PROTOTYPE__ */ void Ttable(buf) char *buf; #endif /* __PROTOTYPE__ */ { int trycnt; Socket *pmskt = NULL; SKTEVENT mesg; SKTEVENT cnt; pmskt= Sopen_clientport(buf,"PMClient",PORTMASTER); if(!pmskt) { freeSocket(pmskt); return; } /* send a PM_TABLE request */ for(trycnt= 0; trycnt < PM_MAXTRY; ++trycnt) { mesg= PM_TABLE; mesg= htons(mesg); Swrite(pmskt,(char *) &mesg,sizeof(mesg)); Sread(pmskt,(char *) &mesg,sizeof(mesg)); mesg= ntohs(mesg); if(mesg == PM_OK) break; } /* find out how many entries in table there are */ Sread(pmskt,(char *) &cnt,sizeof(cnt)); cnt= ntohs(cnt); /* begin to receive table */ for(; cnt > 0; --cnt) { Sgets(buf,BUFSIZE,pmskt); printf("%2d: %s\n",cnt,buf); } /* close socket to PortMaster */ Sclose(pmskt); } /* ------------------------------------------------------------------------- */ /* Trmsrvr: this function removes a server from the PortMaster's PortTable */ #ifdef __PROTOTYPE__ void Trmsrvr(char *buf) #else /* __PROTOTYPE__ */ void Trmsrvr(buf) char *buf; #endif /* __PROTOTYPE__ */ { SKTEVENT mesg; mesg= Srmsrvr(buf); printf(" %sSrmsrvr%s: buf<%s> mesg=%s\n", YELLOW,GREEN,sprt(buf),(mesg == PM_OK)? "success" : "failure"); } /* ------------------------------------------------------------------------- */ /* Tisset: this function tests if Smaskisset works: * it does so by using Smaskwait() with zero timeout * and then invokves Smaskisset() to test the * Socket. This function is primarily intended to * debug & test the Smaskisset() function. */ #ifdef __PROTOTYPE__ void Tisset(char *buf) #else void Tisset(buf) char *buf; #endif { int ret; Smasktime(0L,1L); Smaskset(skt); Smaskwait(); ret= Smaskisset(skt); printf(" %ssocket %s%s%s read-ready\n", GREEN, YELLOW, ret? "is" : "is not", GREEN); } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/EXE/spmchk.c0000644000175000017500000000257710360753042014015 0ustar samsam/* spmchk: see if there is a portmaster running on the specified machine * by attempting to open a Socket on it. If the attempt fails, return 1, * otherwise 0. * * XTDIO_USAGE: spmchk [machine] * * This can be used in a script like so: * * spmchk || Spm * * -or- * * spmchk || (nohup Spm > /dev/null)& * * to avoid having Spm print out an error message if it is already * running. * * Author: Marty Olevitch, Dec 1993 * (This routine is placed into the public domain.) */ #include #include #include "sockets.h" /* --------------------------------------------------------------------- * Definitions: */ #define BUFSIZE 256 /* --------------------------------------------------------------------- * Prototypes: */ #ifdef __PROTOTYPE__ int main(int, char **); #else extern main(); #endif /* --------------------------------------------------------------------- * Source Code: */ #ifdef __PROTOTYPE__ int main( int argc, char **argv) #else int main(argc, argv) int argc; char **argv; #endif { char hostnm[BUFSIZE]; Socket *s; Sinit(); if(argc > 1) strcpy(hostnm, argv[1]); else gethostname(hostnm,BUFSIZE); s = Sopen_clientport(hostnm, "PMClient", PORTMASTER); if (!s) { exit(2); } Sclose(s); #ifdef vms exit(1); #else exit(0); #endif } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/EXE/spmtable.c0000644000175000017500000001113510360753042014325 0ustar samsam/* Spmtable: this program prints out a list of servers currently on the * requested PortMaster * * spmtable machine machine machine ... * spmtable * spmtable -ENVVARNAME */ #include #include "xtdio.h" #include "sockets.h" /* ---------------------------------------------------------------------- * Definitions: */ #define BUFSIZE 256 #define MACHINE_SEP ':' #define MAXTIME 5L /* max time for PM_TABLE response, in sec */ /* ---------------------------------------------------------------------- * Prototypes: */ #ifdef __PROTOTYPE__ int main(int,char **); /* Spmtable.c */ void printPMtable(char *); /* Spmtable.c */ #else extern main(); /* spmtable.c */ extern void printPMtable(); /* spmtable.c */ #endif /* ---------------------------------------------------------------------- */ /* main: */ #ifdef __PROTOTYPE__ int main(int argc,char **argv) #else int main(argc,argv) int argc; char **argv; #endif { char localhost[BUFSIZE]; rdcolor(); Sinit(); if(argc > 1) { for(++argv; argc > 1; --argc, ++argv) { /* for every machine mentioned on the cmd line */ if(argv[0][0] == '-') { /* report on SKTPATH machines */ char *envvar= argv[0] + 1; char *machines; char *mend; /* look up the SKTPATH */ machines= getenv(*envvar? envvar : "SKTPATH"); if(!machines) { error(XTDIO_WARNING,"unable to getenv(%s%s%s)\n", YELLOW,sprt(*envvar? envvar : "SKTPATH"),GREEN); continue; } /* make a multiple machine report */ printf(" %sMultiple Machine PortMaster Tables\n",WHITE); printf(" %s%s%s<%s%s%s>%s\n\n", CYAN,*envvar? envvar : "SKTPATH",YELLOW, GREEN,machines,YELLOW,NRML); mend= strchr(machines,MACHINE_SEP); while(mend) { *mend = '\0'; printPMtable(machines); *mend = MACHINE_SEP; machines= mend + 1; mend = strchr(machines,MACHINE_SEP); } if(machines) printPMtable(machines); printf("%s\n",NRML); } else printPMtable(*argv); /* report on mentioned machine */ } } else { /* report on local machine */ char *pmshare= NULL; pmshare= getenv("PMSHARE"); if(pmshare) printPMtable(pmshare); /* if PMSHARE, default to its PortMaster */ else { gethostname(localhost,BUFSIZE); /* otherwise, use localhost's PortMaster */ printPMtable(localhost); } } #ifdef vms return 1; #else return 0; #endif } /* ---------------------------------------------------------------------- */ /* printPMtable: this function queries the PortMaster for a table, and then * prints it out */ #ifdef __PROTOTYPE__ void printPMtable(char *buf) #else /* __PROTOTYPE__ */ void printPMtable(buf) char *buf; #endif /* __PROTOTYPE__ */ { char locbuf[BUFSIZE]; int icnt; int itry; Socket *pmskt; SKTEVENT mesg; SKTEVENT cnt; /* open a client socket to the PortMaster */ pmskt= Sopen_clientport(buf,"PMClient",PORTMASTER); if(!pmskt) { error(XTDIO_WARNING,"unable to connect to <%s%s%s>'s PortMaster\n", RVCYAN,buf,GREEN); return; } /* send a PM_TABLE request */ for(itry= 0; itry < PM_MAXTRY; ++itry) { mesg= PM_TABLE; mesg= htons(mesg); Swrite(pmskt,(char *) &mesg,sizeof(mesg)); /* wait for response */ if(Stimeoutwait(pmskt,MAXTIME,0L) < 0) { Sclose(pmskt); error(XTDIO_WARNING,"%s's PortMaster is not responding\n",sprt(buf)); return; } Sread(pmskt,(char *) &mesg,sizeof(mesg)); /* translate reponse */ mesg= ntohs(mesg); if (mesg == PM_OK) break; else if(mesg == PM_SORRY) { error(XTDIO_WARNING,"%s's PortMaster is refusing connections\n",sprt(buf)); return; } } /* find out how many entries in table there are */ if(Stimeoutwait(pmskt,MAXTIME,0L) < 0) { Sclose(pmskt); error(XTDIO_WARNING,"%s's PortMaster is not responding with entry count\n",sprt(buf)); return; } Sread(pmskt,(char *) &cnt,sizeof(cnt)); cnt= ntohs(cnt); if(cnt) { printf("\n%sCurrent %s%s%s Portmaster Servers\n", UWHITE, RVCYAN, buf, UWHITE); /* begin to receive table */ for(icnt= 1; cnt > 0; --cnt, ++icnt) { if(Stimeoutwait(pmskt,MAXTIME,0L) < 0) { error(XTDIO_WARNING,"%s abruptly ceased sending server names\n",sprt(buf)); break; } if(!Sgets(locbuf,BUFSIZE,pmskt)) { error(XTDIO_WARNING,"%s disconnected unexpectedly!\n",sprt(buf)); break; } printf("%s%2d: %s%s\n",CYAN,icnt,GREEN,locbuf); } puts(NRML); } else printf("%s%s%s's PortMaster currently has no servers%s\n",RVCYAN,buf,GREEN,NRML); /* close socket to PortMaster */ Sclose(pmskt); } /* --------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/EXE/srmsrvr.c0000644000175000017500000000134110360753042014232 0ustar samsam/* srmsrvr.c: this program is dangerous, but it does allow one to forcibly * remove servers from the PortMaster's desmesne. */ #include #include "xtdio.h" #include "sockets.h" /* ---------------------------------------------------------------------- */ /* main: */ #ifdef __PROTOTYPE__ int main( int argc, char **argv) #else /* __PROTOTYPE__ */ int main(argc,argv) int argc; char **argv; #endif /* __PROTOTYPE__ */ { rdcolor(); Sinit(); for(--argc, ++argv; argc > 0; --argc, ++argv) { if(Srmsrvr(*argv) != PM_OK) error(XTDIO_WARNING,"failed to remove <%s%s%s>\n",MAGENTA,*argv,GREEN); } #ifdef vms return 1; #else return 0; #endif } /* ---------------------------------------------------------------------- */ dmucs-0.6.1/COSMIC/HDR/0000755000175000017500000000000010457726376012366 5ustar samsamdmucs-0.6.1/COSMIC/HDR/CVS/0000755000175000017500000000000010457726376013021 5ustar samsamdmucs-0.6.1/COSMIC/HDR/CVS/Root0000644000175000017500000000007110457726376013665 0ustar samsam:ext:vic_norman@dmucs.cvs.sourceforge.net:/cvsroot/dmucs dmucs-0.6.1/COSMIC/HDR/CVS/Repository0000644000175000017500000000002110457726376015114 0ustar samsamdmucs/COSMIC/HDR dmucs-0.6.1/COSMIC/HDR/CVS/Entries0000644000175000017500000000034310457726376014355 0ustar samsam/rdcolor.h/1.1.1.1/Tue Jan 10 15:43:30 2006// /setproto.h/1.1.1.1/Tue Jan 10 15:43:30 2006// /sockets.h/1.2/Thu Jun 22 13:47:15 2006// /xstdlib.h/1.1.1.1/Tue Jan 10 15:43:31 2006// /xtdio.h/1.1.1.1/Tue Jan 10 15:43:31 2006// D dmucs-0.6.1/COSMIC/HDR/rdcolor.h0000644000175000017500000000600110360753042014157 0ustar samsam/* rdcolor.h: this file specifies that all colors are actually pointers to * color strings. It is expected that the function "rdcolor()" will * be used to initialize the colors. "rdcolor()" examines a colorfile * called "color.dat" for color strings: color ... where the ellipsis * is the desired escape string. The default value of such color strings * is set for a color ASCII monitor (8 colors) and the IDS Prism printer. * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * sockets.h is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #ifndef RDCOLOR_H #define RDCOLOR_H #ifndef __GL_GL_H__ extern char *BLACK; extern char *RED; extern char *GREEN; extern char *YELLOW; extern char *BLUE; extern char *MAGENTA; extern char *CYAN; extern char *WHITE; #endif extern char *RD_BLACK; /* same as BLACK */ extern char *RD_RED; /* same as RED */ extern char *RD_GREEN; /* same as GREEN */ extern char *RD_YELLOW; /* same as YELLOW */ extern char *RD_BLUE; /* same as BLUE */ extern char *RD_MAGENTA; /* same as MAGENTA */ extern char *RD_CYAN; /* same as CYAN */ extern char *RD_WHITE; /* same as WHITE */ extern char *UBLACK; extern char *URED; extern char *UGREEN; extern char *UYELLOW; extern char *UBLUE; extern char *UMAGENTA; extern char *UCYAN; extern char *UWHITE; extern char *RVBLACK; extern char *RVRED; extern char *RVGREEN; extern char *RVYELLOW; extern char *RVBLUE; extern char *RVMAGENTA; extern char *RVCYAN; extern char *RVWHITE; #ifndef VIM__H extern char *CLEAR; #endif extern char *BOLD; extern char *NRML; extern char *PYELLOW; extern char *PRED; extern char *PCYAN; extern char *PBLACK; /* for rdcputs's benefit... */ #define XBLACK "\255X0" #define XRED "\255X1" #define XGREEN "\255X2" #define XYELLOW "\255X3" #define XBLUE "\255X4" #define XMAGENTA "\255X5" #define XCYAN "\255X6" #define XWHITE "\255X7" #define XUBLACK "\255X8" #define XURED "\255X9" #define XUGREEN "\255X10" #define XUYELLOW "\255X11" #define XUBLUE "\255X12" #define XUMAGENTA "\255X13" #define XUCYAN "\255X14" #define XUWHITE "\255X15" #define XRVBLACK "\255X16" #define XRVRED "\255X17" #define XRVGREEN "\255X18" #define XRVYELLOW "\255X19" #define XRVBLUE "\255X20" #define XRVMAGENTA "\255X21" #define XRVCYAN "\255X22" #define XRVWHITE "\255X23" #define XBOLD "\255X24" #define XNRML "\255X25" #define XPYELLOW "\255X26" #define XPRED "\255X27" #define XPCYAN "\255X28" #define XPBLACK "\255X29" #define XCLEAR "\255X30" #endif dmucs-0.6.1/COSMIC/HDR/setproto.h0000644000175000017500000000270610360753042014402 0ustar samsam/* : determine if prototype using or not * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * sockets.h is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #ifndef SETPROTO_H # define SETPROTO_H /* --------------------------------------------------------------------- */ # ifndef __PROTOTYPE__ # ifdef vms # ifndef oldvms # define __PROTOTYPE__ # endif # else # if defined(sgi) || defined(apollo) || defined(__STDC__) || \ defined(MCH_AMIGA) || defined(_AIX) || defined(__MSDOS__) || \ defined(ultrix) || defined(__DECC) || defined(__alpha) || \ defined(__osf__) || defined(__WIN32__) || defined(__linux__) || \ defined(_MSC_VER) || defined(os2) || defined(AS400) # define __PROTOTYPE__ # endif # endif # endif /* --------------------------------------------------------------------- */ #endif /* SETPROTO_H */ dmucs-0.6.1/COSMIC/HDR/sockets.h0000644000175000017500000004704710446517543014216 0ustar samsam/* sockets.h: this file is the header file for the Simple Sockets Library * Version: 3 * Authors: Charles E. Campbell, Ph.D. * Terry McRoberts * Date: Apr 2, 2004 */ #ifndef SOCKETS_H #define SOCKETS_H #ifdef __cplusplus extern "C" { #endif /* -------------------------------------------------------------------------- * Standard Include Section */ /* for amigas */ #ifdef MCH_AMIGA typedef unsigned short u_short; typedef unsigned long fd_set; # ifdef SSLNEEDTIME # include # endif #endif /* for ibm's AIX o/s */ #ifdef _AIX # define SSLNOSETSOCKOPT # define _NO_BITFIELDS # include # include struct ip_firstfour { /* copied from , who knows why it isn't getting defined!!! */ u_char ip_fvhl; u_char ip_ftos; u_short ip_flen; # define ip_fwin ip_flen }; # include # include # include # include # include # include # include # ifdef SSLNEEDTIME # include # endif #endif #ifdef apollo # include # include # include # include # include # include # ifdef SSLNEEDTIME # include # endif #endif /* for ibm's AS/400 */ #ifdef AS400 # define STRTSRVR_PGM "*libl/startau17" /* # define SSLNOSETSOCKOPT */ # include # include # include # include # include # include # ifdef SSLNEEDTIME # include # endif #endif /* for Apple's MAC OS-X - thanks to Paul Bourke */ #ifdef __APPLE__ # define macosx #endif #ifdef macosx # include # include # include # include # include # include # include # include # include # include # ifdef SSLNEEDTIME # include # endif #endif #ifdef __CYGWIN__ # include # include # include # include # include # include # include # include # include # include # include # ifdef SSLNEEDTIME # include # endif #endif /* for Linux */ #ifdef __linux # include # include # include # include # include # include # include # include # include # ifdef SSLNEEDTIME # include # endif # ifndef __USE_BSD typedef unsigned short u_short; #endif #endif #ifdef MSC # define SSLNOPEEK # define SSLNOSETSOCKOPT # define SSLNEEDTOSHAREPM # define SSLSKTZERO # define Sscanf sktscanf # define Sprintf sktprintf # define Stimeoutwait sktwait # define close(skt) sock_close(skt) # include typedef unsigned short u_short; # ifdef IRL_PC # include # include # include # include # include # include # include # ifdef SSLNEEDTIME # include "c:\c600\iptcp\include\sys\time.h" # endif # endif #endif /* for Microsoft Developer Studio */ #ifdef _MSC_VER # define close(s) closesocket(s) # include # include /* corresponds to version 2.2.x of the WinSock API */ # include typedef unsigned short u_short; # ifdef SSLNEEDTIME # include # endif #endif /* for Watcomm C++ on OS/2 */ #ifdef os2 # define STRTSRVR_PGM "startsrv.cmd" # include /* # include */ # include # include # include # include # include # include /* order is important */ # ifndef TCPV40HDRS # include # include # define _lswap(x) ((x<<24)|(x>>24)|((x&0xff00)<<8)|((x&0xff0000)>>8)) # define _bswap(x) (((unsigned)x<<8)|((unsigned)x>>8)) # endif # ifdef SSLNEEDTIME # include # endif #endif /* for OSF */ #ifdef __osf__ # include # include # include # include # include # ifdef SSLNEEDTIME # include # endif #endif /* for FreeBSD */ #ifdef __FreeBSD__ # include # include # include # include # include # include # include # ifdef SSLNEEDTIME # include # endif #endif /* for SCO Unix's cc compiler */ #if defined(M_I386) && defined(M_SYSV) # include # include # include # include # include # include # include # ifdef SSLNEEDTIME # include # endif #endif #ifdef sgi # include # include # include # include # include # include # include # include # include # ifdef SSLNEEDTIME # include int select(int,fd_set*,fd_set*,fd_set*,struct timeval *); # endif #endif #ifdef sun # include # include # include # include # include # include # ifdef SSLNEEDTIME # include # endif #endif #ifdef ultrix # include # include # include # include # include # include # include # ifdef SSLNEEDTIME # include # endif #endif #ifdef vms # define Sscanf Sktscanf # define Sprintf Sktprintf # include # include # include # include # include # include # include # ifdef OldVMS # include # else # include # include # endif # ifdef SSLNEEDTIME # include time # endif typedef int fd_set; /* at least on my current version of vms I need this, sheesh */ #endif /* win32 (it works for borland c) */ #ifdef __WIN32__ # define SSLSKTZERO # define Sscanf sktscanf # define Sprintf sktprintf # define Stimeoutwait sktwait # define close(s) closesocket(s) # include # include # include typedef unsigned short u_short; # ifdef SSLNEEDTIME # include # endif #endif /* -------------------------------------------------------------------------- * Definitions Section */ #define PORTMASTER ((u_short) 1750) /* standard PortMaster port -- IANA registered */ #ifdef vms /* typedef unsigned long fd_set; */ # define FD_SET(n,p) (*p|= (1<fds_bits[0] |= (1<fds_bits[0] &= ~(1<fds_bits[0] & (1<fds_bits[0] = 0) #endif /* end of types ============================================================ */ /* PortMaster messages */ #define PM_SERVER ((u_short) 1) #define PM_CLIENT ((u_short) 2) #define PM_CLOSE ((u_short) 3) #define PM_RESEND ((u_short) 4) #define PM_QUIT ((u_short) 5) #define PM_SORRY ((u_short) 6) #define PM_OK ((u_short) 7) #define PM_ACCEPT ((u_short) 8) #define PM_TABLE ((u_short) 9) #define PM_RMSERVER ((u_short) 10) #define PM_FWINIT ((u_short) 11) #define PM_SHARE ((u_short) 12) #define PM_OKSHARE ((u_short) 13) #define PM_CLIENTWAIT ((u_short) 14) #define PM_BIGBUF 1024 #define PM_MAXTRY 20 /* max number of resends to PortMaster */ #define PM_MAXREQUESTS 10 /* max pending connects */ /* -------------------------------------------------------------------------- * Typedef Section */ typedef int PrtMstrEvent; typedef struct Skt_str Socket; typedef struct Smask_str Smask; typedef u_short SKTEVENT; #if !defined(MCH_AMIGA) && !defined(__WIN32__) typedef struct sockaddr_in sinpt; #endif /* -------------------------------------------------------------------------- * Data Structures: */ struct Skt_str { int skt; /* skt handle */ SKTEVENT port; /* associated port */ int type; /* PM_SERVER, PM_CLIENT, PM_ACCEPT */ char *sktname; /* name of socket */ char *hostname; /* name of host */ }; struct Smask_str { fd_set mask; unsigned waitall; }; #ifdef __cplusplus } #endif /* --------------------------------------------------------------------- * Additional XTDIO Includes: */ #include "xtdio.h" /* --------------------------------------------------------------------- * Prototypes: */ #ifdef __cplusplus extern "C" { #endif #ifdef __PROTOTYPE__ /* XTDIO: SKTS routines */ Socket *Saccept(Socket *); /* Saccept.c */ void Sclose(Socket *); /* Sclose.c */ char *Sgets( char *, int, Socket *); /* Sgets.c */ void Sinit(void); /* Sinit.c */ int Smaskwait(void); /* Smaskwait.c */ void Smaskset(Socket *); /* Smaskwait.c */ void Smaskfdset(int); /* Smaskwait.c */ void Smasktime(long,long); /* Smaskwait.c */ int Smasktest(void); /* Smaskwait.c */ void Smaskunset(Socket *); /* Smaskwait.c */ void Smaskunfdset(int); /* Smaskwait.c */ Smask Smaskget(void); /* Smaskwait.c */ void Smaskuse(Smask); /* Smaskwait.c */ void Smaskpush(void); /* Smaskwait.c */ void Smaskpop(void); /* Smaskwait.c */ int Smaskisset(Socket *); /* Smaskwait.c */ int Smaskfdisset(int); /* Smaskwait.c */ Socket *makeSocket( char *, char *, int); /* Smkskt.c */ void freeSocket(Socket *); /* Smkskt.c */ Socket *Sopen( char *, char *); /* Sopen.c */ Socket *Sopen_clientport( char *, char *, u_short); /* Sopen.c */ Socket *Sopenv( char *, char *, char *); /* Sopenv.c */ int Speek( Socket *, void *, int); /* Speek.c */ unsigned long Speeraddr(Socket *); /* Speeraddr.c */ char *Speername(Socket *); /* Speername.c */ int Sprintf( Socket *, char *, ...); /* Sprintf.c */ char *Sprtskt(Socket *); /* Sprtskt.c */ void Sputs( char *, Socket *); /* Sputs.c */ int Sread( Socket *, void *, int); /* Sread.c */ int Sreadbytes( Socket *, void *, int); /* Sreadbytes.c */ SKTEVENT Srmsrvr(char *); /* Srmsrvr.c */ int Sscanf(Socket *,char *,...); /* Sscanf.c */ int Stest(Socket *); /* Stest.c */ int Stimeoutwait(Socket *,long,long); /* Stimeoutwait.c */ int Svprintf( Socket *, char *, void *); /* Svprintf.c */ int Swait(Socket *); /* Swait.c */ int Swrite( Socket *, void *, int); /* Swrite.c */ #else /* XTDIO: SKTS routines */ extern Socket *Saccept(); /* Saccept.c */ extern void Sclose(); /* Sclose.c */ extern char *Sgets(); /* Sgets.c */ extern void Sinit(); /* Sinit.c */ extern int Smaskwait(); /* Smaskwait.c */ extern void Smaskset(); /* Smaskwait.c */ extern void Smaskfdset(); /* Smaskwait.c */ extern void Smasktime(); /* Smaskwait.c */ extern int Smasktest(); /* Smaskwait.c */ extern void Smaskunset(); /* Smaskwait.c */ extern void Smaskunfdset(); /* Smaskwait.c */ extern Smask Smaskget(); /* Smaskwait.c */ extern void Smaskuse(); /* Smaskwait.c */ extern void Smaskpush(); /* Smaskwait.c */ extern void Smaskpop(); /* Smaskwait.c */ extern int Smaskisset(); /* Smaskwait.c */ extern int Smaskfdisset(); /* Smaskwait.c */ extern Socket *makeSocket(); /* Smkskt.c */ extern void freeSocket(); /* Smkskt.c */ extern Socket *Sopen(); /* Sopen.c */ extern Socket *Sopen_clientport(); /* Sopen.c */ extern Socket *Sopenv(); /* Sopenv.c */ extern int Speek(); /* Speek.c */ extern unsigned long Speeraddr(); /* Speeraddr.c */ extern char *Speername(); /* Speername.c */ extern int Sprintf(); /* Sprintf.c */ extern char *Sprtskt(); /* Sprtskt.c */ extern void Sputs(); /* Sputs.c */ extern int Sread(); /* Sread.c */ extern int Sreadbytes(); /* Sreadbytes.c */ extern SKTEVENT Srmsrvr(); /* Srmsrvr.c */ extern int Sscanf(); /* Sscanf.c */ extern int Stest(); /* Stest.c */ extern int Stimeoutwait(); /* Stimeoutwait.c */ extern int Svprintf(); /* Svprintf.c */ extern int Swait(); /* Swait.c */ extern int Swrite(); /* Swrite.c */ #endif # ifdef __cplusplus } # endif #endif /* #ifndef SOCKETS_H */ dmucs-0.6.1/COSMIC/HDR/xstdlib.h0000644000175000017500000000203110360753043014164 0ustar samsam/* xstdlib.h: has standard library function prototypes * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * xstdlib.h is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #ifndef XSTDLIB_H #define XSTDLIB_H #include /* Prototypes for standard library functions */ extern char *calloc(); extern void exit(); extern char *getenv(); extern char *index(); extern char *malloc(); extern char *strchr(); extern char *strrchr(); #define remove unlink #endif dmucs-0.6.1/COSMIC/HDR/xtdio.h0000644000175000017500000001047410360753043013654 0ustar samsam/* xtdio.h: * Authors: Charles E. Campbell, Jr. * Terry McRoberts * Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1 * Permission is hereby granted to use and distribute this code, * with or without modifications, provided that this copyright * notice is copied with it. Like anything else that's free, * sockets.h is provided *as is* and comes with no warranty * of any kind, either expressed or implied. By using this * software, you agree that in no event will the copyright * holder be liable for any damages resulting from the use * of this software. * Date: Aug 22, 2005 */ #ifndef XTDIO_H #define XTDIO_H /* --------------------------------------------------------------------- */ #ifdef AS400 # include # include # include #endif #ifdef _AIX # include # include # include #endif #ifdef apollo # include # include # include #endif #ifdef __CYGWIN__ # include # include #endif #ifdef __linux__ # include # include # include # include #endif #ifdef _MSC_VER # include # include # include # include #endif #ifdef os2 # include # include # include # include #endif #ifdef MSDOS # include # include # include #endif /* SCO Unix */ #if defined(M_I386) && defined(M_SYSV) # include # include #endif #ifdef __osf__ # include # include # include #endif #ifdef sgi # include # include # include #endif #ifdef sun # include # ifdef __STDC__ # include # include # else # include "xstdlib.h" # include "varargs.h" # endif #endif #ifdef ultrix # include # include "xstdlib.h" # include #endif #ifdef vms # include # include # include #endif #ifdef __WIN32__ # include # include # include #endif #include "rdcolor.h" #include "setproto.h" /* --------------------------------------------------------------------- * Definitions: */ #define XTDIO_SEVERE 0 #define XTDIO_ERROR 1 #define XTDIO_WARNING 2 #define XTDIO_NOTE 3 /* if your compiler supports prototyping, but does *not* support the keyword * "const", then move the following line out of this comment #define const */ /* --------------------------------------------------------------------- * Typedefs: */ /* --------------------------------------------------------------------- * Global Variables: */ #ifdef __PROTOTYPE__ extern void (*error_exit)(int); #else extern void (*error_exit)(); #endif /* --------------------------------------------------------------------- * Prototypes: */ # ifdef __PROTOTYPE__ char *cprt(const char); /* cprt.c */ void error(int, char *, ...); /* error.c */ FILE *fopenv(char *, char *, char *); /* fopenv.c */ void outofmem(void *, char *, ...); /* outofmem.c */ void rdcolor(void); /* rdcolor.c */ void rdcputs(char *, FILE *); /* rdcolor.c */ char *sprt(const char *); /* sprt.c */ void srmtrblk(char *); /* srmtrblk.c */ char *stpblk(char *); /* stpblk.c */ char *stpnxt(char *, char *); /* stpnxt.c */ char *strnxtfmt(char *); /* strnxtfmt.c */ # else /* __PROTOTYPE__ */ extern char *cprt(); /* cprt.c */ extern char *stpnxt(); /* stpnxt.c */ extern char *stpblk(); /* stpblk.c */ extern FILE *fopenv(); /* fopenv.c */ extern char *sprt(); /* sprt.c */ extern char *strnxtfmt(); /* strnxtfmt.c */ # endif /* __PROTOTYPE__ */ #endif dmucs-0.6.1/autom4te.cache/0000755000175000017500000000000010457726377013601 5ustar samsamdmucs-0.6.1/autom4te.cache/CVS/0000755000175000017500000000000010457726377014234 5ustar samsamdmucs-0.6.1/autom4te.cache/CVS/Root0000644000175000017500000000007110457726376015077 0ustar samsam:ext:vic_norman@dmucs.cvs.sourceforge.net:/cvsroot/dmucs dmucs-0.6.1/autom4te.cache/CVS/Repository0000644000175000017500000000002510457726376016332 0ustar samsamdmucs/autom4te.cache dmucs-0.6.1/autom4te.cache/CVS/Entries0000644000175000017500000000032710457726377015572 0ustar samsam/output.0/1.1.1.1/Tue Jan 10 15:43:31 2006// /output.1/1.5/Fri Mar 17 15:15:03 2006// /requests/1.7/Thu Jul 20 16:18:10 2006// /traces.0/1.1.1.1/Tue Jan 10 15:43:31 2006// /traces.1/1.5/Fri Mar 17 15:15:03 2006// D dmucs-0.6.1/autom4te.cache/output.00000644000175000017500000050501710360753043015211 0ustar samsam@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.58 for dmucs 0.5. @%:@ @%:@ Report bugs to . @%:@ @%:@ 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='dmucs' PACKAGE_TARNAME='dmucs' PACKAGE_VERSION='0.5' PACKAGE_STRING='dmucs 0.5' PACKAGE_BUGREPORT='vic.norman@gmail.com' ac_unique_file="dmucs_pkt.h" # 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 CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC CPP EGREP LIB@&t@OBJS 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_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS 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_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_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 dmucs 0.5 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 _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of dmucs 0.5:";; esac cat <<\_ACEOF Some influential environment variables: CXX C++ compiler command CXXFLAGS 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 CC C compiler command CFLAGS C compiler flags 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. Report bugs to . _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 case "$ac_dir" in .) ac_abs_builddir=$ac_builddir;; *) case $ac_builddir in .) ac_abs_builddir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; *) ac_abs_builddir="$ac_dir"/$ac_builddir;; esac;; esac case "$ac_dir" in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; esac;; esac case "$ac_dir" in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; esac;; esac case "$ac_dir" in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir="$ac_dir"/$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 dmucs configure 0.5 generated by GNU Autoconf 2.58 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 dmucs $as_me 0.5, which was generated by GNU Autoconf 2.58. 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 ac_config_headers="$ac_config_headers config.h" # Checks for programs. ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC 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_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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_CXX="$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 CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC 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_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # 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_cxx_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_cxx_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_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_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_cxx_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_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi 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_cxx_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_cxx_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 ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu 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); } 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 # Checks for libraries. # FIXME: Replace `main' with a function in `-lnsl': 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" fi # FIXME: Replace `main' with a function in `-lrt': echo "$as_me:$LINENO: checking for nanosleep in -lrt" >&5 echo $ECHO_N "checking for nanosleep in -lrt... $ECHO_C" >&6 if test "${ac_cv_lib_rt_nanosleep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $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 nanosleep (); int main () { nanosleep (); ; 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_rt_nanosleep=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_rt_nanosleep=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_rt_nanosleep" >&5 echo "${ECHO_T}$ac_cv_lib_rt_nanosleep" >&6 if test $ac_cv_lib_rt_nanosleep = yes; then cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" fi # FIXME: Replace `main' with a function in `-lsocket': 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" fi # Checks for header files. 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 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 for ac_header in arpa/inet.h netdb.h netinet/in.h sys/socket.h unistd.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 vic.norman@gmail.com @%:@@%:@ @%:@@%:@ ----------------------------------- @%:@@%:@ _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 # Checks for typedefs, structures, and compiler characteristics. echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6 if test "${ac_cv_header_stdbool_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 #ifndef bool # error bool is not defined #endif #ifndef false # error false is not defined #endif #if false # error false is not 0 #endif #ifndef true # error true is not defined #endif #if true != 1 # error true is not 1 #endif #ifndef __bool_true_false_are_defined # error __bool_true_false_are_defined is not defined #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) -0.5 == true ? 1 : -1]; bool e = &s; char f[(_Bool) -0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; int main () { return !a + !b + !c + !d + !e + !f + !g + !h + !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_header_stdbool_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdbool_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 echo "$as_me:$LINENO: checking for _Bool" >&5 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 if test "${ac_cv_type__Bool+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 ((_Bool *) 0) return 0; if (sizeof (_Bool)) 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__Bool=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type__Bool=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 echo "${ECHO_T}$ac_cv_type__Bool" >&6 if test $ac_cv_type__Bool = yes; then cat >>confdefs.h <<_ACEOF @%:@define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_STDBOOL_H 1 _ACEOF fi echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+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 () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF @%:@define const _ACEOF fi echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #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 ac_cv_c_inline=$ac_kw; 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 fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac # Checks for library functions. echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_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 ((pid_t *) 0) return 0; if (sizeof (pid_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_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi for ac_header in unistd.h vfork.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 vic.norman@gmail.com @%:@@%:@ @%:@@%:@ ----------------------------------- @%:@@%:@ _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 fork vfork 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 if test "x$ac_cv_func_fork" = xyes; then echo "$as_me:$LINENO: checking for working fork" >&5 echo $ECHO_N "checking for working fork... $ECHO_C" >&6 if test "${ac_cv_func_fork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_fork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* By Ruediger Kuhlmann. */ #include #if HAVE_UNISTD_H # include #endif /* Some systems only have a dummy stub for fork() */ int main () { if (fork() < 0) exit (1); 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 ac_cv_func_fork_works=yes 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_func_fork_works=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 echo "${ECHO_T}$ac_cv_func_fork_works" >&6 else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then echo "$as_me:$LINENO: checking for working vfork" >&5 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 if test "${ac_cv_func_vfork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_vfork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ #include #include #include #include #include #if HAVE_UNISTD_H # include #endif #if HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; exit( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 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_func_vfork_works=yes 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_func_vfork_works=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_WORKING_VFORK 1 _ACEOF else cat >>confdefs.h <<\_ACEOF @%:@define vfork fork _ACEOF fi if test "x$ac_cv_func_fork_works" = xyes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_WORKING_FORK 1 _ACEOF 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 for ac_func in gethostbyaddr gethostbyname gethostname inet_ntoa putenv strerror 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 ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, 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 : $LIB@&t@OBJS; 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 LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${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 dmucs $as_me 0.5, which was generated by GNU Autoconf 2.58. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ dmucs config.status 0.5 configured by $0, generated by GNU Autoconf 2.58, 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 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@LIB@&t@OBJS@,$LIB@&t@OBJS,;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 case "$ac_dir" in .) ac_abs_builddir=$ac_builddir;; *) case $ac_builddir in .) ac_abs_builddir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; *) ac_abs_builddir="$ac_dir"/$ac_builddir;; esac;; esac case "$ac_dir" in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; esac;; esac case "$ac_dir" in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; esac;; esac case "$ac_dir" in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; esac;; 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 " $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 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 dmucs-0.6.1/autom4te.cache/output.10000644000175000017500000063213610406551167015221 0ustar samsam@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.58 for dmucs 0.5. @%:@ @%:@ Report bugs to . @%:@ @%:@ 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='dmucs' PACKAGE_TARNAME='dmucs' PACKAGE_VERSION='0.5' PACKAGE_STRING='dmucs 0.5' PACKAGE_BUGREPORT='vic.norman@gmail.com' ac_unique_file="dmucs_pkt.h" # 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 AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LIB@&t@OBJS 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_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS 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_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_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 dmucs 0.5 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 dmucs 0.5:";; 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 builds --enable-dependency-tracking Do not reject slow dependency extractors Some influential environment variables: CXX C++ compiler command CXXFLAGS 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 CC C compiler command CFLAGS C compiler flags 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. Report bugs to . _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 case "$ac_dir" in .) ac_abs_builddir=$ac_builddir;; *) case $ac_builddir in .) ac_abs_builddir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; *) ac_abs_builddir="$ac_dir"/$ac_builddir;; esac;; esac case "$ac_dir" in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; esac;; esac case "$ac_dir" in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; esac;; esac case "$ac_dir" in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir="$ac_dir"/$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 dmucs configure 0.5 generated by GNU Autoconf 2.58 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 dmucs $as_me 0.5, which was generated by GNU Autoconf 2.58. 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 ac_config_headers="$ac_config_headers config.h" am__api_version="1.7" 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 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='dmucs' VERSION='0.5' 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"} AMTAR=${AMTAR-"${am_missing_run}tar"} 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. # Checks for programs. ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC 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_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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_CXX="$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 CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC 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_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # 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_cxx_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_cxx_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_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_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_cxx_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_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi 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_cxx_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_cxx_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 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="$CXX" 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_CXX_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_CXX_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 : > 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 # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_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 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); } 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 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 : > 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 # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' 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 # Checks for libraries. 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" fi echo "$as_me:$LINENO: checking for gethostbyaddr_r in -lnsl" >&5 echo $ECHO_N "checking for gethostbyaddr_r in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyaddr_r+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 gethostbyaddr_r (); int main () { gethostbyaddr_r (); ; 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_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyaddr_r=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_gethostbyaddr_r" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyaddr_r" >&6 if test $ac_cv_lib_nsl_gethostbyaddr_r = yes; then cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBNSL 1 _ACEOF LIBS="-lnsl $LIBS" fi 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" fi echo "$as_me:$LINENO: checking for pthread_mutex_lock in -lpthread" >&5 echo $ECHO_N "checking for pthread_mutex_lock in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_mutex_lock+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $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 pthread_mutex_lock (); int main () { pthread_mutex_lock (); ; 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_pthread_pthread_mutex_lock=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthread_pthread_mutex_lock=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_pthread_pthread_mutex_lock" >&5 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_lock" >&6 if test $ac_cv_lib_pthread_pthread_mutex_lock = yes; then cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi # Checks for header files. 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 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 for ac_header in arpa/inet.h netdb.h netinet/in.h sys/socket.h unistd.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 vic.norman@gmail.com @%:@@%:@ @%:@@%:@ ----------------------------------- @%:@@%:@ _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 # Checks for typedefs, structures, and compiler characteristics. echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6 if test "${ac_cv_header_stdbool_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 #ifndef bool # error bool is not defined #endif #ifndef false # error false is not defined #endif #if false # error false is not 0 #endif #ifndef true # error true is not defined #endif #if true != 1 # error true is not 1 #endif #ifndef __bool_true_false_are_defined # error __bool_true_false_are_defined is not defined #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) -0.5 == true ? 1 : -1]; bool e = &s; char f[(_Bool) -0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; int main () { return !a + !b + !c + !d + !e + !f + !g + !h + !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_header_stdbool_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdbool_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6 echo "$as_me:$LINENO: checking for _Bool" >&5 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6 if test "${ac_cv_type__Bool+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 ((_Bool *) 0) return 0; if (sizeof (_Bool)) 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__Bool=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type__Bool=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 echo "${ECHO_T}$ac_cv_type__Bool" >&6 if test $ac_cv_type__Bool = yes; then cat >>confdefs.h <<_ACEOF @%:@define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_STDBOOL_H 1 _ACEOF fi echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+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 () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF @%:@define const _ACEOF fi echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #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 ac_cv_c_inline=$ac_kw; 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 fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac # Checks for library functions. echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_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 ((pid_t *) 0) return 0; if (sizeof (pid_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_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi for ac_header in unistd.h vfork.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 vic.norman@gmail.com @%:@@%:@ @%:@@%:@ ----------------------------------- @%:@@%:@ _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 fork vfork 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 if test "x$ac_cv_func_fork" = xyes; then echo "$as_me:$LINENO: checking for working fork" >&5 echo $ECHO_N "checking for working fork... $ECHO_C" >&6 if test "${ac_cv_func_fork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_fork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* By Ruediger Kuhlmann. */ #include #if HAVE_UNISTD_H # include #endif /* Some systems only have a dummy stub for fork() */ int main () { if (fork() < 0) exit (1); 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 ac_cv_func_fork_works=yes 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_func_fork_works=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 echo "${ECHO_T}$ac_cv_func_fork_works" >&6 else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then echo "$as_me:$LINENO: checking for working vfork" >&5 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 if test "${ac_cv_func_vfork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_vfork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ #include #include #include #include #include #if HAVE_UNISTD_H # include #endif #if HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; exit( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 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_func_vfork_works=yes 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_func_vfork_works=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_WORKING_VFORK 1 _ACEOF else cat >>confdefs.h <<\_ACEOF @%:@define vfork fork _ACEOF fi if test "x$ac_cv_func_fork_works" = xyes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_WORKING_FORK 1 _ACEOF 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 for ac_func in gethostbyaddr gethostbyaddr_r gethostbyname gethostname inet_ntoa putenv strerror 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 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" fi echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyaddr_r+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 gethostbyaddr_r to an innocuous variant, in case declares gethostbyaddr_r. For example, HP-UX 11i declares gettimeofday. */ #define gethostbyaddr_r innocuous_gethostbyaddr_r /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyaddr_r (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef gethostbyaddr_r /* 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 gethostbyaddr_r (); /* 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_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r) choke me #else char (*f) () = gethostbyaddr_r; #endif #ifdef __cplusplus } #endif int main () { return f != gethostbyaddr_r; ; 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_gethostbyaddr_r=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyaddr_r=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyaddr_r" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyaddr_r" >&6 if test $ac_cv_func_gethostbyaddr_r = yes; then echo "$as_me:$LINENO: checking signature of gethostbyaddr_r" >&5 echo $ECHO_N "checking signature of gethostbyaddr_r... $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 int main () { struct hostent *h, *hp; char *a, *b; int l, bl, t, e; (void) gethostbyaddr_r(a, l, t, h, b, bl, &hp, &e) ; 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 cat >>confdefs.h <<\_ACEOF @%:@define HAVE_GETHOSTBYADDR_R_8_ARGS 1 _ACEOF echo "$as_me:$LINENO: result: 8 args" >&5 echo "${ECHO_T}8 args" >&6 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. */ # include int main () { struct hostent *h; char *a, *b; int l, bl, t, e; (void) gethostbyaddr_r(a, l, t, h, b, bl, &e) ; 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 cat >>confdefs.h <<\_ACEOF @%:@define HAVE_GETHOSTBYADDR_R_7_ARGS 1 _ACEOF echo "$as_me:$LINENO: result: 7 args" >&5 echo "${ECHO_T}7 args" >&6 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. */ # include int main () { struct hostent_data *d; struct hostent *h; char a, int l, t; (void) gethostbyaddr_r(a, l, t, h, d) ; 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 cat >>confdefs.h <<\_ACEOF @%:@define HAVE_GETHOSTBYADDR_R_5_ARGS 1 _ACEOF echo "$as_me:$LINENO: result: 5 args" >&5 echo "${ECHO_T}5 args" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: unrecognised" >&5 echo "${ECHO_T}unrecognised" >&6 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, 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 : $LIB@&t@OBJS; 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 LIB@&t@OBJS=$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__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" 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 dmucs $as_me 0.5, which was generated by GNU Autoconf 2.58. 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="\\ dmucs config.status 0.5 configured by $0, generated by GNU Autoconf 2.58, 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. "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,@AMTAR@,$AMTAR,;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,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;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,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;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,@LIB@&t@OBJS@,$LIB@&t@OBJS,;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 case "$ac_dir" in .) ac_abs_builddir=$ac_builddir;; *) case $ac_builddir in .) ac_abs_builddir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; *) ac_abs_builddir="$ac_dir"/$ac_builddir;; esac;; esac case "$ac_dir" in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; esac;; esac case "$ac_dir" in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; esac;; esac case "$ac_dir" in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir="$ac_dir"/$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 case "$ac_dir" in .) ac_abs_builddir=$ac_builddir;; *) case $ac_builddir in .) ac_abs_builddir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; *) ac_abs_builddir="$ac_dir"/$ac_builddir;; esac;; esac case "$ac_dir" in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; esac;; esac case "$ac_dir" in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; esac;; esac case "$ac_dir" in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir="$ac_dir"/$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 grep '^DEP_FILES *= *[^ @%:@]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # 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 -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //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 dmucs-0.6.1/autom4te.cache/requests0000644000175000017500000005447110457726302015376 0ustar samsam# This file was generated. # It contains the lists of macros which have been traced. # It can be safely removed. @request = ( bless( [ '0', 1, [ '/opt/sfw/share/autoconf' ], [ '/opt/sfw/share/autoconf/autoconf/autoconf.m4f', 'configure.ac' ], { 'm4_pattern_forbid' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, 'AC_TYPE_OFF_T' => 1, 'AC_C_VOLATILE' => 1, 'AC_FUNC_CLOSEDIR_VOID' => 1, 'AC_REPLACE_FNMATCH' => 1, 'AC_PROG_LIBTOOL' => 1, 'AC_FUNC_STAT' => 1, 'AC_HEADER_TIME' => 1, 'AC_FUNC_WAIT3' => 1, 'AC_STRUCT_TM' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'AC_FUNC_LSTAT' => 1, 'AC_FUNC_GETMNTENT' => 1, 'AC_TYPE_MODE_T' => 1, 'AC_CHECK_HEADERS' => 1, 'AC_FUNC_STRTOD' => 1, 'AC_FUNC_STRNLEN' => 1, 'm4_sinclude' => 1, 'AC_PROG_CXX' => 1, 'AC_PATH_X' => 1, 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1, 'AC_PROG_AWK' => 1, '_m4_warn' => 1, 'AC_HEADER_STDC' => 1, 'AC_HEADER_MAJOR' => 1, 'AC_FUNC_ERROR_AT_LINE' => 1, 'AC_PROG_GCC_TRADITIONAL' => 1, 'AC_LIBSOURCE' => 1, 'AC_FUNC_MBRTOWC' => 1, 'AC_STRUCT_ST_BLOCKS' => 1, 'AC_TYPE_SIGNAL' => 1, 'AC_TYPE_UID_T' => 1, 'AC_PROG_MAKE_SET' => 1, 'AC_CONFIG_AUX_DIR' => 1, 'm4_pattern_allow' => 1, 'sinclude' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, 'AC_FUNC_STRERROR_R' => 1, 'AC_PROG_CC' => 1, 'AC_DECL_SYS_SIGLIST' => 1, 'AC_FUNC_FORK' => 1, 'AC_FUNC_VPRINTF' => 1, 'AC_FUNC_STRCOLL' => 1, 'AC_PROG_YACC' => 1, 'AC_INIT' => 1, 'AC_STRUCT_TIMEZONE' => 1, 'AC_FUNC_CHOWN' => 1, 'AC_SUBST' => 1, 'AC_FUNC_ALLOCA' => 1, 'AC_CANONICAL_HOST' => 1, 'AC_FUNC_GETPGRP' => 1, 'AC_PROG_RANLIB' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_FUNC_SETPGRP' => 1, 'AC_CONFIG_SUBDIRS' => 1, 'AC_FUNC_MMAP' => 1, 'AC_FUNC_REALLOC' => 1, 'AC_TYPE_SIZE_T' => 1, 'AC_CONFIG_LINKS' => 1, 'AC_CHECK_TYPES' => 1, 'AC_CHECK_MEMBERS' => 1, 'AM_MAINTAINER_MODE' => 1, 'AC_FUNC_UTIME_NULL' => 1, 'AC_FUNC_SELECT_ARGTYPES' => 1, 'AC_HEADER_STAT' => 1, 'AC_FUNC_STRFTIME' => 1, 'AC_PROG_CPP' => 1, 'AC_C_INLINE' => 1, 'AC_PROG_LEX' => 1, 'AC_C_CONST' => 1, 'AM_ENABLE_MULTILIB' => 1, 'AC_TYPE_PID_T' => 1, 'AC_CONFIG_FILES' => 1, 'include' => 1, 'AC_FUNC_SETVBUF_REVERSED' => 1, 'AC_PROG_INSTALL' => 1, 'AM_GNU_GETTEXT' => 1, 'AC_CHECK_LIB' => 1, 'AC_FUNC_OBSTACK' => 1, 'AC_FUNC_MALLOC' => 1, 'AC_FUNC_GETGROUPS' => 1, 'AC_FUNC_GETLOADAVG' => 1, 'AH_OUTPUT' => 1, 'AC_FUNC_FSEEKO' => 1, 'AM_PROG_CC_C_O' => 1, 'AC_FUNC_MKTIME' => 1, 'AC_CANONICAL_SYSTEM' => 1, 'AM_CONDITIONAL' => 1, 'AC_CONFIG_HEADERS' => 1, 'AC_HEADER_SYS_WAIT' => 1, 'AC_PROG_LN_S' => 1, 'AC_FUNC_MEMCMP' => 1, 'm4_include' => 1, 'AC_HEADER_DIRENT' => 1, 'AC_CHECK_FUNCS' => 1 } ], 'Autom4te::Request' ), bless( [ '1', 1, [ '/opt/sfw/share/autoconf' ], [ '/opt/sfw/share/autoconf/autoconf/autoconf.m4f', 'aclocal.m4', 'configure.ac' ], { 'm4_pattern_forbid' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, 'AC_TYPE_OFF_T' => 1, 'AC_C_VOLATILE' => 1, 'AC_FUNC_CLOSEDIR_VOID' => 1, 'AC_REPLACE_FNMATCH' => 1, 'AC_PROG_LIBTOOL' => 1, 'AC_FUNC_STAT' => 1, 'AC_HEADER_TIME' => 1, 'AC_FUNC_WAIT3' => 1, 'AC_STRUCT_TM' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'AC_FUNC_LSTAT' => 1, 'AC_FUNC_GETMNTENT' => 1, 'AC_TYPE_MODE_T' => 1, 'AC_CHECK_HEADERS' => 1, 'AC_FUNC_STRTOD' => 1, 'AC_FUNC_STRNLEN' => 1, 'm4_sinclude' => 1, 'AC_PROG_CXX' => 1, 'AC_PATH_X' => 1, 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1, 'AC_PROG_AWK' => 1, '_m4_warn' => 1, 'AC_HEADER_STDC' => 1, 'AC_PREREQ' => 1, 'AC_HEADER_MAJOR' => 1, 'AC_FUNC_ERROR_AT_LINE' => 1, 'AC_PROG_GCC_TRADITIONAL' => 1, 'AC_LIBSOURCE' => 1, 'AC_FUNC_MBRTOWC' => 1, 'AC_STRUCT_ST_BLOCKS' => 1, 'AC_TYPE_SIGNAL' => 1, 'AC_TYPE_UID_T' => 1, 'AC_PROG_MAKE_SET' => 1, 'AC_CONFIG_AUX_DIR' => 1, 'm4_pattern_allow' => 1, 'sinclude' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, 'AC_FUNC_STRERROR_R' => 1, 'AC_PROG_CC' => 1, 'AC_DECL_SYS_SIGLIST' => 1, 'AC_FUNC_FORK' => 1, 'AC_FUNC_VPRINTF' => 1, 'AC_FUNC_STRCOLL' => 1, 'AC_PROG_YACC' => 1, 'AC_INIT' => 1, 'AC_STRUCT_TIMEZONE' => 1, 'AC_FUNC_CHOWN' => 1, 'AC_SUBST' => 1, 'AC_FUNC_ALLOCA' => 1, 'AC_CANONICAL_HOST' => 1, 'AC_FUNC_GETPGRP' => 1, 'AC_PROG_RANLIB' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_FUNC_SETPGRP' => 1, 'AC_CONFIG_SUBDIRS' => 1, 'AC_FUNC_MMAP' => 1, 'AC_FUNC_REALLOC' => 1, 'AC_TYPE_SIZE_T' => 1, 'AC_CONFIG_LINKS' => 1, 'AC_CHECK_TYPES' => 1, 'AC_CHECK_MEMBERS' => 1, 'AM_MAINTAINER_MODE' => 1, 'AC_FUNC_UTIME_NULL' => 1, 'AC_FUNC_SELECT_ARGTYPES' => 1, 'AC_HEADER_STAT' => 1, 'AC_FUNC_STRFTIME' => 1, 'AC_HEADER_STDBOOL' => 1, 'AC_PROG_CPP' => 1, 'AC_C_INLINE' => 1, 'AC_PROG_LEX' => 1, 'AC_C_CONST' => 1, 'AM_ENABLE_MULTILIB' => 1, 'AC_TYPE_PID_T' => 1, 'AC_CONFIG_FILES' => 1, 'include' => 1, 'AC_FUNC_SETVBUF_REVERSED' => 1, 'AC_PROG_INSTALL' => 1, 'AM_GNU_GETTEXT' => 1, 'AC_CHECK_LIB' => 1, 'AC_FUNC_OBSTACK' => 1, 'AC_FUNC_MALLOC' => 1, 'AC_FUNC_GETGROUPS' => 1, 'AC_FUNC_GETLOADAVG' => 1, 'AH_OUTPUT' => 1, 'AC_FUNC_FSEEKO' => 1, 'AM_PROG_CC_C_O' => 1, 'AC_FUNC_MKTIME' => 1, 'AC_CANONICAL_SYSTEM' => 1, 'AM_CONDITIONAL' => 1, 'AC_CONFIG_HEADERS' => 1, 'AC_HEADER_SYS_WAIT' => 1, 'AC_PROG_LN_S' => 1, 'AC_FUNC_MEMCMP' => 1, 'm4_include' => 1, 'AC_HEADER_DIRENT' => 1, 'AC_CHECK_FUNCS' => 1 } ], 'Autom4te::Request' ), bless( [ '2', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', 'aclocal.m4', 'configure.ac' ], { '_LT_AC_TAGCONFIG' => 1, 'm4_pattern_forbid' => 1, 'AC_CANONICAL_TARGET' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, 'AC_TYPE_OFF_T' => 1, 'AC_C_VOLATILE' => 1, 'AC_FUNC_CLOSEDIR_VOID' => 1, 'AC_REPLACE_FNMATCH' => 1, 'AC_PROG_LIBTOOL' => 1, 'AC_FUNC_STAT' => 1, 'AC_HEADER_TIME' => 1, 'AC_FUNC_WAIT3' => 1, 'AC_STRUCT_TM' => 1, 'AC_FUNC_LSTAT' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'AC_TYPE_MODE_T' => 1, 'AC_FUNC_GETMNTENT' => 1, 'AC_FUNC_STRTOD' => 1, 'AC_CHECK_HEADERS' => 1, 'AC_FUNC_STRNLEN' => 1, 'm4_sinclude' => 1, 'AC_PROG_CXX' => 1, 'AC_PATH_X' => 1, 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1, 'AC_PROG_AWK' => 1, '_m4_warn' => 1, 'AC_HEADER_STDC' => 1, 'AC_HEADER_MAJOR' => 1, 'AC_FUNC_ERROR_AT_LINE' => 1, 'AC_PROG_GCC_TRADITIONAL' => 1, 'AC_LIBSOURCE' => 1, 'AC_FUNC_MBRTOWC' => 1, 'AC_STRUCT_ST_BLOCKS' => 1, 'AC_CANONICAL_BUILD' => 1, 'AC_TYPE_SIGNAL' => 1, 'AC_TYPE_UID_T' => 1, 'AC_PROG_MAKE_SET' => 1, 'AC_CONFIG_AUX_DIR' => 1, 'sinclude' => 1, 'm4_pattern_allow' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, 'AC_FUNC_STRERROR_R' => 1, 'AC_PROG_CC' => 1, 'AC_FUNC_FORK' => 1, 'AC_DECL_SYS_SIGLIST' => 1, 'AC_FUNC_VPRINTF' => 1, 'AC_FUNC_STRCOLL' => 1, 'AC_PROG_YACC' => 1, 'AC_STRUCT_TIMEZONE' => 1, 'AC_INIT' => 1, 'AC_FUNC_CHOWN' => 1, 'AC_SUBST' => 1, 'AC_FUNC_ALLOCA' => 1, 'AC_CANONICAL_HOST' => 1, 'AC_FUNC_GETPGRP' => 1, 'AC_PROG_RANLIB' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_FUNC_SETPGRP' => 1, 'AC_CONFIG_SUBDIRS' => 1, 'AC_FUNC_MMAP' => 1, 'AC_FUNC_REALLOC' => 1, 'AC_TYPE_SIZE_T' => 1, 'AC_CONFIG_LINKS' => 1, 'AC_CHECK_TYPES' => 1, 'LT_SUPPORTED_TAG' => 1, 'AC_CHECK_MEMBERS' => 1, 'AM_MAINTAINER_MODE' => 1, 'AC_FUNC_UTIME_NULL' => 1, 'AC_FUNC_SELECT_ARGTYPES' => 1, 'AC_FUNC_STRFTIME' => 1, 'AC_HEADER_STAT' => 1, 'AC_PROG_CPP' => 1, 'AC_C_INLINE' => 1, 'AC_TYPE_PID_T' => 1, 'AC_PROG_LEX' => 1, 'AC_C_CONST' => 1, 'AM_ENABLE_MULTILIB' => 1, 'AC_CONFIG_FILES' => 1, 'include' => 1, 'AC_FUNC_SETVBUF_REVERSED' => 1, 'AC_PROG_INSTALL' => 1, 'AM_GNU_GETTEXT' => 1, 'AC_CHECK_LIB' => 1, 'AC_FUNC_OBSTACK' => 1, 'AC_FUNC_MALLOC' => 1, 'AC_FUNC_GETGROUPS' => 1, 'AC_FUNC_GETLOADAVG' => 1, 'AH_OUTPUT' => 1, 'AC_FUNC_FSEEKO' => 1, 'AM_PROG_CC_C_O' => 1, 'AC_CANONICAL_SYSTEM' => 1, 'AM_CONDITIONAL' => 1, 'AC_FUNC_MKTIME' => 1, 'AC_CONFIG_HEADERS' => 1, 'AC_HEADER_SYS_WAIT' => 1, 'AC_PROG_LN_S' => 1, 'AC_FUNC_MEMCMP' => 1, 'm4_include' => 1, 'AC_HEADER_DIRENT' => 1, 'AC_CHECK_FUNCS' => 1 } ], 'Autom4te::Request' ), bless( [ '3', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', '/usr/share/aclocal-1.9/amversion.m4', '/usr/share/aclocal-1.9/auxdir.m4', '/usr/share/aclocal-1.9/cond.m4', '/usr/share/aclocal-1.9/depend.m4', '/usr/share/aclocal-1.9/depout.m4', '/usr/share/aclocal-1.9/init.m4', '/usr/share/aclocal-1.9/install-sh.m4', '/usr/share/aclocal-1.9/lead-dot.m4', '/usr/share/aclocal-1.9/make.m4', '/usr/share/aclocal-1.9/missing.m4', '/usr/share/aclocal-1.9/mkdirp.m4', '/usr/share/aclocal-1.9/options.m4', '/usr/share/aclocal-1.9/runlog.m4', '/usr/share/aclocal-1.9/sanity.m4', '/usr/share/aclocal-1.9/strip.m4', '/usr/share/aclocal-1.9/tar.m4', 'configure.ac' ], { 'm4_pattern_forbid' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, 'AC_TYPE_OFF_T' => 1, 'AC_C_VOLATILE' => 1, 'AC_FUNC_CLOSEDIR_VOID' => 1, 'AC_REPLACE_FNMATCH' => 1, 'AC_DEFUN' => 1, 'AC_PROG_LIBTOOL' => 1, 'AC_FUNC_STAT' => 1, 'AM_PROG_MKDIR_P' => 1, 'AC_HEADER_TIME' => 1, 'AC_FUNC_WAIT3' => 1, 'AC_STRUCT_TM' => 1, 'AC_FUNC_LSTAT' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'AC_TYPE_MODE_T' => 1, 'AC_FUNC_GETMNTENT' => 1, 'AM_MISSING_HAS_RUN' => 1, 'AC_FUNC_STRTOD' => 1, 'AC_CHECK_HEADERS' => 1, 'AM_MISSING_PROG' => 1, 'AC_FUNC_STRNLEN' => 1, 'm4_sinclude' => 1, 'AC_PROG_CXX' => 1, 'AC_PATH_X' => 1, 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1, 'AM_PROG_INSTALL_STRIP' => 1, 'AC_PROG_AWK' => 1, '_m4_warn' => 1, 'AC_HEADER_STDC' => 1, 'AC_HEADER_MAJOR' => 1, 'AM_SANITY_CHECK' => 1, '_AM_PROG_TAR' => 1, 'AC_FUNC_ERROR_AT_LINE' => 1, 'AC_PROG_GCC_TRADITIONAL' => 1, 'AC_LIBSOURCE' => 1, 'AM_DEP_TRACK' => 1, 'AC_FUNC_MBRTOWC' => 1, 'AC_STRUCT_ST_BLOCKS' => 1, 'AC_TYPE_SIGNAL' => 1, 'AC_TYPE_UID_T' => 1, '_AM_IF_OPTION' => 1, 'AC_CONFIG_AUX_DIR' => 1, 'AC_PROG_MAKE_SET' => 1, 'sinclude' => 1, 'm4_pattern_allow' => 1, 'AM_SET_LEADING_DOT' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, '_AM_DEPENDENCIES' => 1, 'AC_FUNC_STRERROR_R' => 1, 'AC_PROG_CC' => 1, 'AC_FUNC_FORK' => 1, 'AC_DECL_SYS_SIGLIST' => 1, 'AC_FUNC_VPRINTF' => 1, 'AC_FUNC_STRCOLL' => 1, 'AU_DEFUN' => 1, 'AC_PROG_YACC' => 1, 'AC_INIT' => 1, 'AC_STRUCT_TIMEZONE' => 1, 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, 'AC_FUNC_CHOWN' => 1, 'AC_SUBST' => 1, 'AC_FUNC_ALLOCA' => 1, '_AM_SET_OPTION' => 1, 'AC_PTHREAD_FREEBSD' => 1, 'AC_CANONICAL_HOST' => 1, 'AC_FUNC_GETPGRP' => 1, 'AC_PROG_RANLIB' => 1, 'LIB_SOCKET_NSL' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_FUNC_SETPGRP' => 1, 'AC_CONFIG_SUBDIRS' => 1, 'AC_FUNC_MMAP' => 1, 'AC_FUNC_REALLOC' => 1, 'AC_TYPE_SIZE_T' => 1, 'AC_CONFIG_LINKS' => 1, 'AC_CHECK_TYPES' => 1, 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'AC_CHECK_MEMBERS' => 1, 'AM_MAINTAINER_MODE' => 1, 'AC_DEFUN_ONCE' => 1, 'AC_FUNC_UTIME_NULL' => 1, 'AC_FUNC_SELECT_ARGTYPES' => 1, 'AC_HEADER_STAT' => 1, 'AC_FUNC_STRFTIME' => 1, 'AC_PROG_CPP' => 1, 'AC_C_INLINE' => 1, 'AC_TYPE_PID_T' => 1, 'AC_PROG_LEX' => 1, 'AC_C_CONST' => 1, 'AC_CONFIG_FILES' => 1, 'include' => 1, 'AC_FUNC_SETVBUF_REVERSED' => 1, 'AC_PROG_INSTALL' => 1, 'AM_AUX_DIR_EXPAND' => 1, 'AM_GNU_GETTEXT' => 1, 'AC_CHECK_LIB' => 1, 'AC_FUNC_OBSTACK' => 1, '_AM_SET_OPTIONS' => 1, 'AC_FUNC_MALLOC' => 1, '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'AM_RUN_LOG' => 1, 'AC_FUNC_GETGROUPS' => 1, 'AC_FUNC_GETLOADAVG' => 1, 'AH_OUTPUT' => 1, 'AC_FUNC_FSEEKO' => 1, 'AM_PROG_CC_C_O' => 1, '_AM_MANGLE_OPTION' => 1, 'AC_CANONICAL_SYSTEM' => 1, 'AM_CONDITIONAL' => 1, 'AC_FUNC_MKTIME' => 1, 'AC_CONFIG_HEADERS' => 1, 'AM_SET_DEPDIR' => 1, 'AC_HEADER_SYS_WAIT' => 1, 'AC_PROG_LN_S' => 1, 'AC_FUNC_MEMCMP' => 1, 'm4_include' => 1, 'AM_PROG_INSTALL_SH' => 1, 'AC_HEADER_DIRENT' => 1, 'AC_CHECK_FUNCS' => 1, '_AC_AM_CONFIG_HEADER_HOOK' => 1, 'AM_MAKE_INCLUDE' => 1 } ], 'Autom4te::Request' ) ); dmucs-0.6.1/autom4te.cache/traces.00000644000175000017500000002770710360753043015137 0ustar samsamm4trace:configure.ac:5: -1- AC_INIT([dmucs], [0.5], [vic.norman@gmail.com]) m4trace:configure.ac:5: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:5: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:5: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.ac:5: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.ac:5: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.ac:5: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.ac:5: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.ac:5: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}]) m4trace:configure.ac:5: -1- AC_SUBST([PATH_SEPARATOR]) m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) m4trace:configure.ac:5: -1- AC_SUBST([exec_prefix], [NONE]) m4trace:configure.ac:5: -1- AC_SUBST([prefix], [NONE]) m4trace:configure.ac:5: -1- AC_SUBST([program_transform_name], [s,x,x,]) m4trace:configure.ac:5: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) m4trace:configure.ac:5: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) m4trace:configure.ac:5: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) m4trace:configure.ac:5: -1- AC_SUBST([datadir], ['${prefix}/share']) m4trace:configure.ac:5: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) m4trace:configure.ac:5: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) m4trace:configure.ac:5: -1- AC_SUBST([localstatedir], ['${prefix}/var']) m4trace:configure.ac:5: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) m4trace:configure.ac:5: -1- AC_SUBST([includedir], ['${prefix}/include']) m4trace:configure.ac:5: -1- AC_SUBST([oldincludedir], ['/usr/include']) m4trace:configure.ac:5: -1- AC_SUBST([infodir], ['${prefix}/info']) m4trace:configure.ac:5: -1- AC_SUBST([mandir], ['${prefix}/man']) m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ #undef PACKAGE_NAME]) m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME]) m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ #undef PACKAGE_VERSION]) m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ #undef PACKAGE_STRING]) m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT]) m4trace:configure.ac:5: -1- AC_SUBST([build_alias]) m4trace:configure.ac:5: -1- AC_SUBST([host_alias]) m4trace:configure.ac:5: -1- AC_SUBST([target_alias]) m4trace:configure.ac:5: -1- AC_SUBST([DEFS]) m4trace:configure.ac:5: -1- AC_SUBST([ECHO_C]) m4trace:configure.ac:5: -1- AC_SUBST([ECHO_N]) m4trace:configure.ac:5: -1- AC_SUBST([ECHO_T]) m4trace:configure.ac:5: -1- AC_SUBST([LIBS]) m4trace:configure.ac:7: -1- AC_CONFIG_HEADERS([config.h]) m4trace:configure.ac:10: -1- AC_PROG_CXX m4trace:configure.ac:10: -1- AC_SUBST([CXX]) m4trace:configure.ac:10: -1- AC_SUBST([CXXFLAGS]) m4trace:configure.ac:10: -1- AC_SUBST([LDFLAGS]) m4trace:configure.ac:10: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:10: -1- AC_SUBST([CXX]) m4trace:configure.ac:10: -1- AC_SUBST([ac_ct_CXX]) m4trace:configure.ac:10: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) m4trace:configure.ac:10: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) m4trace:configure.ac:11: -1- AC_PROG_CC m4trace:configure.ac:11: -1- AC_SUBST([CC]) m4trace:configure.ac:11: -1- AC_SUBST([CFLAGS]) m4trace:configure.ac:11: -1- AC_SUBST([LDFLAGS]) m4trace:configure.ac:11: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:11: -1- AC_SUBST([CC]) m4trace:configure.ac:11: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.ac:11: -1- AC_SUBST([CC]) m4trace:configure.ac:11: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.ac:11: -1- AC_SUBST([CC]) m4trace:configure.ac:11: -1- AC_SUBST([CC]) m4trace:configure.ac:11: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.ac:15: -1- AC_CHECK_LIB([nsl], [gethostbyname]) m4trace:configure.ac:15: -1- AH_OUTPUT([HAVE_LIBNSL], [/* Define to 1 if you have the `nsl\' library (-lnsl). */ #undef HAVE_LIBNSL]) m4trace:configure.ac:15: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBNSL]) m4trace:configure.ac:17: -1- AC_CHECK_LIB([rt], [nanosleep]) m4trace:configure.ac:17: -1- AH_OUTPUT([HAVE_LIBRT], [/* Define to 1 if you have the `rt\' library (-lrt). */ #undef HAVE_LIBRT]) m4trace:configure.ac:17: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRT]) m4trace:configure.ac:19: -1- AC_CHECK_LIB([socket], [socket]) m4trace:configure.ac:19: -1- AH_OUTPUT([HAVE_LIBSOCKET], [/* Define to 1 if you have the `socket\' library (-lsocket). */ #undef HAVE_LIBSOCKET]) m4trace:configure.ac:19: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSOCKET]) m4trace:configure.ac:22: -1- AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h sys/socket.h unistd.h]) m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_ARPA_INET_H], [/* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H]) m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_NETDB_H], [/* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H]) m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H]) m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H]) m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H]) m4trace:configure.ac:22: -1- AC_HEADER_STDC m4trace:configure.ac:22: -1- AC_PROG_CPP m4trace:configure.ac:22: -1- AC_SUBST([CPP]) m4trace:configure.ac:22: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:22: -1- AC_SUBST([CPP]) m4trace:configure.ac:22: -1- AC_SUBST([EGREP]) m4trace:configure.ac:22: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.ac:22: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS]) m4trace:configure.ac:22: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default]) m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H]) m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H]) m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H]) m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRING_H]) m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H]) m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H]) m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H]) m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H]) m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H]) m4trace:configure.ac:25: -1- AC_CHECK_TYPES([_Bool]) m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([HAVE__BOOL]) m4trace:configure.ac:25: -1- AH_OUTPUT([HAVE__BOOL], [/* Define to 1 if the system has the type `_Bool\'. */ #undef HAVE__BOOL]) m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDBOOL_H]) m4trace:configure.ac:25: -1- AH_OUTPUT([HAVE_STDBOOL_H], [/* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H]) m4trace:configure.ac:26: -1- AC_C_CONST m4trace:configure.ac:26: -1- AC_DEFINE_TRACE_LITERAL([const]) m4trace:configure.ac:26: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */ #undef const]) m4trace:configure.ac:27: -1- AC_C_INLINE m4trace:configure.ac:27: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler calls it, or to nothing if \'inline\' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif]) m4trace:configure.ac:30: -1- AC_FUNC_FORK m4trace:configure.ac:30: -1- AC_TYPE_PID_T m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([pid_t]) m4trace:configure.ac:30: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if does not define. */ #undef pid_t]) m4trace:configure.ac:30: -1- AC_CHECK_HEADERS([unistd.h vfork.h]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_VFORK_H], [/* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H]) m4trace:configure.ac:30: -1- AC_CHECK_FUNCS([fork vfork]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_FORK], [/* Define to 1 if you have the `fork\' function. */ #undef HAVE_FORK]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_VFORK], [/* Define to 1 if you have the `vfork\' function. */ #undef HAVE_VFORK]) m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_VFORK]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_WORKING_VFORK], [/* Define to 1 if `vfork\' works. */ #undef HAVE_WORKING_VFORK]) m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([vfork]) m4trace:configure.ac:30: -1- AH_OUTPUT([vfork], [/* Define as `fork\' if `vfork\' does not work. */ #undef vfork]) m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_FORK]) m4trace:configure.ac:30: -1- AH_OUTPUT([HAVE_WORKING_FORK], [/* Define to 1 if `fork\' works. */ #undef HAVE_WORKING_FORK]) m4trace:configure.ac:31: -1- AC_HEADER_STDC m4trace:configure.ac:31: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.ac:31: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS]) m4trace:configure.ac:32: -1- AC_CHECK_FUNCS([gethostbyaddr gethostbyname gethostname inet_ntoa putenv strerror]) m4trace:configure.ac:32: -1- AH_OUTPUT([HAVE_GETHOSTBYADDR], [/* Define to 1 if you have the `gethostbyaddr\' function. */ #undef HAVE_GETHOSTBYADDR]) m4trace:configure.ac:32: -1- AH_OUTPUT([HAVE_GETHOSTBYNAME], [/* Define to 1 if you have the `gethostbyname\' function. */ #undef HAVE_GETHOSTBYNAME]) m4trace:configure.ac:32: -1- AH_OUTPUT([HAVE_GETHOSTNAME], [/* Define to 1 if you have the `gethostname\' function. */ #undef HAVE_GETHOSTNAME]) m4trace:configure.ac:32: -1- AH_OUTPUT([HAVE_INET_NTOA], [/* Define to 1 if you have the `inet_ntoa\' function. */ #undef HAVE_INET_NTOA]) m4trace:configure.ac:32: -1- AH_OUTPUT([HAVE_PUTENV], [/* Define to 1 if you have the `putenv\' function. */ #undef HAVE_PUTENV]) m4trace:configure.ac:32: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */ #undef HAVE_STRERROR]) m4trace:configure.ac:34: -1- AC_CONFIG_FILES([Makefile]) m4trace:configure.ac:35: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) m4trace:configure.ac:35: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) dmucs-0.6.1/autom4te.cache/traces.10000644000175000017500000004314110406551167015132 0ustar samsamm4trace:aclocal.m4:39: -1- AC_PREREQ([2.54]) m4trace:aclocal.m4:43: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:aclocal.m4:380: -1- AC_PREREQ([2.50]) m4trace:aclocal.m4:813: -1- AC_PREREQ([2.52]) m4trace:configure.ac:4: -1- AC_PREREQ([2.58]) m4trace:configure.ac:5: -1- AC_INIT([dmucs], [0.5], [vic.norman@gmail.com]) m4trace:configure.ac:5: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:5: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:5: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.ac:5: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.ac:5: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.ac:5: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.ac:5: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.ac:5: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}]) m4trace:configure.ac:5: -1- AC_SUBST([PATH_SEPARATOR]) m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) m4trace:configure.ac:5: -1- AC_SUBST([exec_prefix], [NONE]) m4trace:configure.ac:5: -1- AC_SUBST([prefix], [NONE]) m4trace:configure.ac:5: -1- AC_SUBST([program_transform_name], [s,x,x,]) m4trace:configure.ac:5: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) m4trace:configure.ac:5: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) m4trace:configure.ac:5: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) m4trace:configure.ac:5: -1- AC_SUBST([datadir], ['${prefix}/share']) m4trace:configure.ac:5: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) m4trace:configure.ac:5: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) m4trace:configure.ac:5: -1- AC_SUBST([localstatedir], ['${prefix}/var']) m4trace:configure.ac:5: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) m4trace:configure.ac:5: -1- AC_SUBST([includedir], ['${prefix}/include']) m4trace:configure.ac:5: -1- AC_SUBST([oldincludedir], ['/usr/include']) m4trace:configure.ac:5: -1- AC_SUBST([infodir], ['${prefix}/info']) m4trace:configure.ac:5: -1- AC_SUBST([mandir], ['${prefix}/man']) m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ #undef PACKAGE_NAME]) m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME]) m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ #undef PACKAGE_VERSION]) m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ #undef PACKAGE_STRING]) m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT]) m4trace:configure.ac:5: -1- AC_SUBST([build_alias]) m4trace:configure.ac:5: -1- AC_SUBST([host_alias]) m4trace:configure.ac:5: -1- AC_SUBST([target_alias]) m4trace:configure.ac:5: -1- AC_SUBST([DEFS]) m4trace:configure.ac:5: -1- AC_SUBST([ECHO_C]) m4trace:configure.ac:5: -1- AC_SUBST([ECHO_N]) m4trace:configure.ac:5: -1- AC_SUBST([ECHO_T]) m4trace:configure.ac:5: -1- AC_SUBST([LIBS]) m4trace:configure.ac:7: -1- AC_CONFIG_HEADERS([config.h]) m4trace:configure.ac:8: -1- AM_INIT_AUTOMAKE m4trace:configure.ac:8: -1- AM_AUTOMAKE_VERSION([1.7.9]) m4trace:configure.ac:8: -1- AC_PROG_INSTALL m4trace:configure.ac:8: -1- AC_SUBST([INSTALL_PROGRAM]) m4trace:configure.ac:8: -1- AC_SUBST([INSTALL_SCRIPT]) m4trace:configure.ac:8: -1- AC_SUBST([INSTALL_DATA]) m4trace:configure.ac:8: -1- AC_SUBST([CYGPATH_W]) m4trace:configure.ac:8: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME']) m4trace:configure.ac:8: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION']) m4trace:configure.ac:8: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) m4trace:configure.ac:8: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ #undef PACKAGE]) m4trace:configure.ac:8: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) m4trace:configure.ac:8: -1- AH_OUTPUT([VERSION], [/* Version number of package */ #undef VERSION]) m4trace:configure.ac:8: -1- AC_SUBST([ACLOCAL]) m4trace:configure.ac:8: -1- AC_SUBST([AUTOCONF]) m4trace:configure.ac:8: -1- AC_SUBST([AUTOMAKE]) m4trace:configure.ac:8: -1- AC_SUBST([AUTOHEADER]) m4trace:configure.ac:8: -1- AC_SUBST([MAKEINFO]) m4trace:configure.ac:8: -1- AC_SUBST([AMTAR]) m4trace:configure.ac:8: -1- AC_SUBST([install_sh]) m4trace:configure.ac:8: -1- AC_SUBST([STRIP]) m4trace:configure.ac:8: -1- AC_SUBST([ac_ct_STRIP]) m4trace:configure.ac:8: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) m4trace:configure.ac:8: -1- AC_PROG_AWK m4trace:configure.ac:8: -1- AC_SUBST([AWK]) m4trace:configure.ac:8: -1- AC_PROG_MAKE_SET m4trace:configure.ac:8: -1- AC_SUBST([SET_MAKE]) m4trace:configure.ac:8: -1- AC_SUBST([am__leading_dot]) m4trace:configure.ac:11: -1- AC_PROG_CXX m4trace:configure.ac:11: -1- AC_SUBST([CXX]) m4trace:configure.ac:11: -1- AC_SUBST([CXXFLAGS]) m4trace:configure.ac:11: -1- AC_SUBST([LDFLAGS]) m4trace:configure.ac:11: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:11: -1- AC_SUBST([CXX]) m4trace:configure.ac:11: -1- AC_SUBST([ac_ct_CXX]) m4trace:configure.ac:11: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) m4trace:configure.ac:11: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) m4trace:configure.ac:11: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"]) m4trace:configure.ac:11: -1- AC_SUBST([am__include]) m4trace:configure.ac:11: -1- AC_SUBST([am__quote]) m4trace:configure.ac:11: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) m4trace:configure.ac:11: -1- AC_SUBST([AMDEP_TRUE]) m4trace:configure.ac:11: -1- AC_SUBST([AMDEP_FALSE]) m4trace:configure.ac:11: -1- AC_SUBST([AMDEPBACKSLASH]) m4trace:configure.ac:11: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type]) m4trace:configure.ac:11: -1- AM_CONDITIONAL([am__fastdepCXX], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:11: -1- AC_SUBST([am__fastdepCXX_TRUE]) m4trace:configure.ac:11: -1- AC_SUBST([am__fastdepCXX_FALSE]) m4trace:configure.ac:12: -1- AC_PROG_CC m4trace:configure.ac:12: -1- AC_SUBST([CC]) m4trace:configure.ac:12: -1- AC_SUBST([CFLAGS]) m4trace:configure.ac:12: -1- AC_SUBST([LDFLAGS]) m4trace:configure.ac:12: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:12: -1- AC_SUBST([CC]) m4trace:configure.ac:12: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.ac:12: -1- AC_SUBST([CC]) m4trace:configure.ac:12: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.ac:12: -1- AC_SUBST([CC]) m4trace:configure.ac:12: -1- AC_SUBST([CC]) m4trace:configure.ac:12: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.ac:12: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) m4trace:configure.ac:12: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:12: -1- AC_SUBST([am__fastdepCC_TRUE]) m4trace:configure.ac:12: -1- AC_SUBST([am__fastdepCC_FALSE]) m4trace:configure.ac:15: -1- AC_CHECK_LIB([nsl], [gethostbyname]) m4trace:configure.ac:15: -1- AH_OUTPUT([HAVE_LIBNSL], [/* Define to 1 if you have the `nsl\' library (-lnsl). */ #undef HAVE_LIBNSL]) m4trace:configure.ac:15: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBNSL]) m4trace:configure.ac:16: -1- AC_CHECK_LIB([nsl], [gethostbyaddr_r]) m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_LIBNSL], [/* Define to 1 if you have the `nsl\' library (-lnsl). */ #undef HAVE_LIBNSL]) m4trace:configure.ac:16: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBNSL]) m4trace:configure.ac:17: -1- AC_CHECK_LIB([socket], [socket]) m4trace:configure.ac:17: -1- AH_OUTPUT([HAVE_LIBSOCKET], [/* Define to 1 if you have the `socket\' library (-lsocket). */ #undef HAVE_LIBSOCKET]) m4trace:configure.ac:17: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSOCKET]) m4trace:configure.ac:18: -1- AC_CHECK_LIB([pthread], [pthread_mutex_lock]) m4trace:configure.ac:18: -1- AH_OUTPUT([HAVE_LIBPTHREAD], [/* Define to 1 if you have the `pthread\' library (-lpthread). */ #undef HAVE_LIBPTHREAD]) m4trace:configure.ac:18: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBPTHREAD]) m4trace:configure.ac:21: -1- AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h sys/socket.h unistd.h]) m4trace:configure.ac:21: -1- AH_OUTPUT([HAVE_ARPA_INET_H], [/* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H]) m4trace:configure.ac:21: -1- AH_OUTPUT([HAVE_NETDB_H], [/* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H]) m4trace:configure.ac:21: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H]) m4trace:configure.ac:21: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H]) m4trace:configure.ac:21: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H]) m4trace:configure.ac:21: -1- AC_HEADER_STDC m4trace:configure.ac:21: -1- AC_PROG_CPP m4trace:configure.ac:21: -1- AC_SUBST([CPP]) m4trace:configure.ac:21: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:21: -1- AC_SUBST([CPP]) m4trace:configure.ac:21: -1- AC_SUBST([EGREP]) m4trace:configure.ac:21: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.ac:21: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS]) m4trace:configure.ac:21: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default]) m4trace:configure.ac:21: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H]) m4trace:configure.ac:21: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H]) m4trace:configure.ac:21: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H]) m4trace:configure.ac:21: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRING_H]) m4trace:configure.ac:21: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H]) m4trace:configure.ac:21: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H]) m4trace:configure.ac:21: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H]) m4trace:configure.ac:21: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H]) m4trace:configure.ac:21: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H]) m4trace:configure.ac:24: -1- AC_HEADER_STDBOOL m4trace:configure.ac:24: -1- AC_CHECK_TYPES([_Bool]) m4trace:configure.ac:24: -1- AC_DEFINE_TRACE_LITERAL([HAVE__BOOL]) m4trace:configure.ac:24: -1- AH_OUTPUT([HAVE__BOOL], [/* Define to 1 if the system has the type `_Bool\'. */ #undef HAVE__BOOL]) m4trace:configure.ac:24: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDBOOL_H]) m4trace:configure.ac:24: -1- AH_OUTPUT([HAVE_STDBOOL_H], [/* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H]) m4trace:configure.ac:25: -1- AC_C_CONST m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([const]) m4trace:configure.ac:25: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */ #undef const]) m4trace:configure.ac:26: -1- AC_C_INLINE m4trace:configure.ac:26: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler calls it, or to nothing if \'inline\' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif]) m4trace:configure.ac:29: -1- AC_FUNC_FORK m4trace:configure.ac:29: -1- AC_TYPE_PID_T m4trace:configure.ac:29: -1- AC_DEFINE_TRACE_LITERAL([pid_t]) m4trace:configure.ac:29: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if does not define. */ #undef pid_t]) m4trace:configure.ac:29: -1- AC_CHECK_HEADERS([unistd.h vfork.h]) m4trace:configure.ac:29: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H]) m4trace:configure.ac:29: -1- AH_OUTPUT([HAVE_VFORK_H], [/* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H]) m4trace:configure.ac:29: -1- AC_CHECK_FUNCS([fork vfork]) m4trace:configure.ac:29: -1- AH_OUTPUT([HAVE_FORK], [/* Define to 1 if you have the `fork\' function. */ #undef HAVE_FORK]) m4trace:configure.ac:29: -1- AH_OUTPUT([HAVE_VFORK], [/* Define to 1 if you have the `vfork\' function. */ #undef HAVE_VFORK]) m4trace:configure.ac:29: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_VFORK]) m4trace:configure.ac:29: -1- AH_OUTPUT([HAVE_WORKING_VFORK], [/* Define to 1 if `vfork\' works. */ #undef HAVE_WORKING_VFORK]) m4trace:configure.ac:29: -1- AC_DEFINE_TRACE_LITERAL([vfork]) m4trace:configure.ac:29: -1- AH_OUTPUT([vfork], [/* Define as `fork\' if `vfork\' does not work. */ #undef vfork]) m4trace:configure.ac:29: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_FORK]) m4trace:configure.ac:29: -1- AH_OUTPUT([HAVE_WORKING_FORK], [/* Define to 1 if `fork\' works. */ #undef HAVE_WORKING_FORK]) m4trace:configure.ac:30: -1- AC_HEADER_STDC m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.ac:30: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS]) m4trace:configure.ac:31: -1- AC_CHECK_FUNCS([gethostbyaddr gethostbyaddr_r gethostbyname gethostname inet_ntoa putenv strerror]) m4trace:configure.ac:31: -1- AH_OUTPUT([HAVE_GETHOSTBYADDR], [/* Define to 1 if you have the `gethostbyaddr\' function. */ #undef HAVE_GETHOSTBYADDR]) m4trace:configure.ac:31: -1- AH_OUTPUT([HAVE_GETHOSTBYADDR_R], [/* Define to 1 if you have the `gethostbyaddr_r\' function. */ #undef HAVE_GETHOSTBYADDR_R]) m4trace:configure.ac:31: -1- AH_OUTPUT([HAVE_GETHOSTBYNAME], [/* Define to 1 if you have the `gethostbyname\' function. */ #undef HAVE_GETHOSTBYNAME]) m4trace:configure.ac:31: -1- AH_OUTPUT([HAVE_GETHOSTNAME], [/* Define to 1 if you have the `gethostname\' function. */ #undef HAVE_GETHOSTNAME]) m4trace:configure.ac:31: -1- AH_OUTPUT([HAVE_INET_NTOA], [/* Define to 1 if you have the `inet_ntoa\' function. */ #undef HAVE_INET_NTOA]) m4trace:configure.ac:31: -1- AH_OUTPUT([HAVE_PUTENV], [/* Define to 1 if you have the `putenv\' function. */ #undef HAVE_PUTENV]) m4trace:configure.ac:31: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */ #undef HAVE_STRERROR]) m4trace:configure.ac:39: -1- AC_CHECK_LIB([nsl], [gethostbyname]) m4trace:configure.ac:39: -1- AH_OUTPUT([HAVE_LIBNSL], [/* Define to 1 if you have the `nsl\' library (-lnsl). */ #undef HAVE_LIBNSL]) m4trace:configure.ac:39: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBNSL]) m4trace:configure.ac:86: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from... autoconf/functions.m4:74: AC_CHECK_FUNC is expanded from... configure.ac:86: the top level]) m4trace:configure.ac:86: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETHOSTBYADDR_R_8_ARGS]) m4trace:configure.ac:86: -1- AH_OUTPUT([HAVE_GETHOSTBYADDR_R_8_ARGS], [/* Define if gethostbyaddr_r() exists and takes 8 arguments */ #undef HAVE_GETHOSTBYADDR_R_8_ARGS]) m4trace:configure.ac:86: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from... autoconf/general.m4:2173: AC_COMPILE_IFELSE is expanded from... autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from... autoconf/functions.m4:74: AC_CHECK_FUNC is expanded from... configure.ac:86: the top level]) m4trace:configure.ac:86: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETHOSTBYADDR_R_7_ARGS]) m4trace:configure.ac:86: -1- AH_OUTPUT([HAVE_GETHOSTBYADDR_R_7_ARGS], [/* Define if gethostbyaddr_r() exists and takes 7 arguments */ #undef HAVE_GETHOSTBYADDR_R_7_ARGS]) m4trace:configure.ac:86: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from... autoconf/general.m4:2173: AC_COMPILE_IFELSE is expanded from... autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from... autoconf/general.m4:2173: AC_COMPILE_IFELSE is expanded from... autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from... autoconf/functions.m4:74: AC_CHECK_FUNC is expanded from... configure.ac:86: the top level]) m4trace:configure.ac:86: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETHOSTBYADDR_R_5_ARGS]) m4trace:configure.ac:86: -1- AH_OUTPUT([HAVE_GETHOSTBYADDR_R_5_ARGS], [/* Define if gethostbyaddr_r() exists and takes 5 arguments */ #undef HAVE_GETHOSTBYADDR_R_5_ARGS]) m4trace:configure.ac:89: -1- AC_CONFIG_FILES([Makefile]) m4trace:configure.ac:90: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) m4trace:configure.ac:90: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) dmucs-0.6.1/scripts/0000755000175000017500000000000010457726377012464 5ustar samsamdmucs-0.6.1/scripts/CVS/0000755000175000017500000000000010457726377013117 5ustar samsamdmucs-0.6.1/scripts/CVS/Root0000644000175000017500000000007110457726377013763 0ustar samsam:ext:vic_norman@dmucs.cvs.sourceforge.net:/cvsroot/dmucs dmucs-0.6.1/scripts/CVS/Repository0000644000175000017500000000001610457726377015216 0ustar samsamdmucs/scripts dmucs-0.6.1/scripts/CVS/Entries0000644000175000017500000000021410457726377014450 0ustar samsam/disable-host/1.2/Fri Jan 20 20:48:23 2006// /enable-host/1.2/Fri Jan 20 20:48:23 2006// /watch-ssaver/1.1.1.1/Tue Jan 10 15:43:31 2006// D dmucs-0.6.1/scripts/disable-host0000755000175000017500000000207610364246227014761 0ustar samsam#!/usr/bin/env sh DMUCS_DIR=/us/bfsbld/Compilers/distcc # # This script undoes what the enable-host script does. Specifically, it # kills the dmucs loadavg daemon, and, then sends a "remove host" message # to the dmucs server (note that a loadavg message from a machine adds # the host to the dmucs database if it is not already there, but lack of # periodic load average messages from a host does NOT remove the host from # the database -- that's why we have to send a "remove host" message. # # Then, this script kills the distccd daemons. # # Arguments: 1: the name of the machine on which the dmucs server is running. # if [ $# -eq 0 ] ; then echo "Usage: $0 " exit fi server=$1 echo "Stopping the loadavg daemon" /bin/ps -ef | /bin/grep 'loadavg' | /bin/grep -v grep | /usr/bin/awk '{print $2}' | /usr/bin/xargs /bin/kill echo "done" echo "Removing this host from the dmucs server" $DMUCS_DIR/bin/removehost -s $server echo "done" echo "Stopping the distccd daemons" pidfile=$DMUCS_DIR/pids/`hostname`.pid /bin/kill -HUP `cat $pidfile` echo "done" dmucs-0.6.1/scripts/enable-host0000755000175000017500000000163310364246227014602 0ustar samsam#!/usr/bin/env sh DMUCS_DIR=/us/bfsbld/Compilers/distcc # # This shell script simply starts up the distccd daemons and the # loadavg daemon on this host. The only argument to it is the location of # the dmucs server ('dmucs'). # if [ $# -eq 0 ] ; then echo "Usage: $0 " exit fi server=$1 echo "Starting distcc daemons" logfile=$DMUCS_DIR/log/`hostname`.log pidfile=$DMUCS_DIR/pids/`hostname`.pid # # NOTE NOTE NOTE: you probably want to change the value of the "--allow" # argument to something more restrictive. See the distcc documentation for # more information. # $DMUCS_DIR/bin/distccd --daemon --log-file=$logfile --pid-file $DMUCS_DIR/pids/`hostname`.pid --allow 0.0.0.0/0 echo "done: daemons writing to log file" $logfile echo " master daemon pid" `cat $pidfile` echo "Starting loadavg daemon, communicating with $server" $DMUCS_DIR/bin/loadavg -s $server & echo "done" dmucs-0.6.1/scripts/watch-ssaver0000755000175000017500000000115610360753043015003 0ustar samsam#!/usr/bin/perl my $numArgs = @ARGV; my $host = ""; if ($numArgs == 1) { $host = $ARGV[0]; } my $blanked = 0; open (IN, "xscreensaver-command -watch |"); while () { if (m/^(BLANK|LOCK)/) { if (!$blanked) { if ($host == "") { system("/us/bfsbld/Compilers/distcc/bin/enable-host"); } else { system("/us/bfsbld/Compilers/distcc/bin/enable-host $host"); } $blanked = 1; } } elsif (m/^UNBLANK/) { if ($host == "") { system("/us/bfsbld/Compilers/distcc/bin/disable-host"); } else { system("/us/bfsbld/Compilers/distcc/bin/disable-host $host"); } $blanked = 0; } }